(function(U,V,O,v,P,q,w,r,n,k,G,qa,p,s,y,E,C,W,t,F,x,H,B,z,A,da,I,K,M,D,R,ra,L,Q,$,S,X,Y,N,ea,sa,fa,ga,aa,Z,ha,ia,ja,ka,la,ba,ma,na,ca,oa,pa,c,e,T){Jmol.___JmolDate="$Date: 2015-01-20 12:29:14 -0600 (Tue, 20 Jan 2015) $";Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="14.2.11_2015.01.20";(function(a){a._Loader.registerPackages("java",["io","lang","lang.reflect","util"]);var b=java.util;a._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.Calendar java.text.SimpleDateFormat java.text.DateFormat java.util.concurrent.Executors".split(" "));
Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});if(a._supportsNativeObject)for(var d=0;d<a._extendedObjectMethods.length-2;d++){var g=a._extendedObjectMethods[d];Array.prototype[g]=a._O.prototype[g];Number.prototype[g]=a._O.prototype[g]}java.lang.Number=Number;Number.__CLASS_NAME__="Number";X(Number,java.io.Serializable);Number.equals=a._innerFunctions.equals;Number.getName=a._innerFunctions.getName;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())});e(Number,"hashCode",function(){return this.valueOf()});java.lang.Integer=Integer=function(){n(this,arguments)};Q(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()};N(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;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 b=1;0==a>>>16&&(b+=16,a<<=16);0==a>>>24&&(b+=8,a<<=8);0==a>>>28&&(b+=4,a<<=4);0==a>>>30&&(b+=2,a<<=2);return b-(a>>>31)},"Number");Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;c(Integer,"numberOfTrailingZeros",
function(a){if(0==a)return 32;var b=31,d=a<<16;0!=d&&(b-=16,a=d);d=a<<8;0!=d&&(b-=8,a=d);d=a<<4;0!=d&&(b-=4,a=d);d=a<<2;0!=d&&(b-=2,a=d);return b-(a<<1>>>31)},"Number");Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;c(Integer,"parseIntRadix",function(a,b){if(null==a)throw new NumberFormatException("null");if(2>b)throw new NumberFormatException("radix "+b+" less than Character.MIN_RADIX");if(36<b)throw new NumberFormatException("radix "+b+" greater than Character.MAX_RADIX");
if(10==b)for(var d=a.length;0<=--d;){var g=a.charCodeAt(d);if(!(48<=g&&57>=g)&&(0<d||43!=g&&45!=g))throw new NumberFormatException("Not a Number : "+a);}d=parseInt(a,b);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"String, Number");Integer.parseIntRadix=Integer.prototype.parseIntRadix;c(Integer,"parseInt",function(a){return Integer.parseIntRadix(a,10)},"String");Integer.parseInt=Integer.prototype.parseInt;e(Integer,"$valueOf",function(a){return new Integer(a)});Integer.$valueOf=
Integer.prototype.$valueOf;e(Integer,"equals",function(a){return null==a||!w(a,Integer)?!1:a.valueOf()==this.valueOf()},"Object");Integer.toHexString=Integer.prototype.toHexString=function(a){a.valueOf&&(a=a.valueOf());if(0>a){var b=a&16777215;return(a>>24&255)._numberToString(16)+(b=b._numberToString(16)).substring(b.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 b=a.startsWith("-")?1:0;a=a.replace(/\#/,"0x").toLowerCase();b=a.startsWith("0x",b)?16:a.startsWith("0",b)?8:10;a=Number(a);return 8==b?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");e(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){n(this,arguments)};Q(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()};N(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,b){return Integer.parseInteger(a,b||10)});Long.parseLong=Long.prototype.parseLong;e(Long,"$valueOf",function(a){return new Long(a)});Long.$valueOf=Long.prototype.$valueOf;e(Long,"equals",function(a){return null==a||!w(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(){n(this,arguments)};Q(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()};
N(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,b){return Integer.parseIntRadix(a,b).shortValue()},"String, Number");Short.parseShortRadix=Short.prototype.parseShortRadix;c(Short,"parseShort",function(a){return Short.parseShortRadix(a,10)},
"String");Short.parseShort=Short.prototype.parseShort;e(Short,"$valueOf",function(a){return new Short(a)});Short.$valueOf=Short.prototype.$valueOf;e(Short,"equals",function(a){return null==a||!w(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(){n(this,arguments)};Q(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()};p(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,b){return Integer.parseIntRadix(a,b).byteValue()},"String, Number");Byte.parseByteRadix=Byte.prototype.parseByteRadix;c(Byte,"parseByte",function(a){return Byte.parseByte(a,10)},"String");
Byte.parseByte=Byte.prototype.parseByte;e(Byte,"$valueOf",function(a){return new Byte(a)});Byte.$valueOf=Byte.prototype.$valueOf;e(Byte,"equals",function(a){return null==a||!w(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");a._floatToString=function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");return a};java.lang.Float=Float=function(){n(this,arguments)};Q(Float,"Float",Number,Comparable,null,!0);Float.prototype.valueOf=function(){return 0};Float.toString=Float.prototype.toString=function(){return 0!=arguments.length?a._floatToString(arguments[0]):this===Float?"class java.lang.Float":a._floatToString(this.valueOf())};
N(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=3.4028235E38;Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4E-45;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 b=Number(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"String");Float.parseFloat=Float.prototype.parseFloat;e(Float,"$valueOf",function(a){return new Float(a)});Float.$valueOf=Float.prototype.$valueOf;c(Float,"isNaN",function(a){return isNaN(a)},"Number");Float.isNaN=Float.prototype.isNaN;c(Float,"isInfinite",function(a){return!isFinite(a)},"Number");Float.isInfinite=Float.prototype.isInfinite;e(Float,"equals",function(a){return null==
a||!w(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){n(this,arguments)};Q(Double,"Double",Number,Comparable,null,!0);Double.prototype.valueOf=function(){return 0};Double.toString=Double.prototype.toString=function(){return 0!=arguments.length?a._floatToString(arguments[0]):this===Double?"class java.lang.Double":a._floatToString(this.valueOf())};N(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(a)},"Number");Double.isNaN=Double.prototype.isNaN;c(Double,"isInfinite",function(a){return!isFinite(a)},
"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 b=Number(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"String");Double.parseDouble=Double.prototype.parseDouble;c(Double,"$valueOf",function(a){return new Double(a)},"Number");Double.$valueOf=Double.prototype.$valueOf;e(Double,"equals",function(a){return null==a||!w(a,Double)?!1:a.valueOf()==
this.valueOf()},"Object");Boolean=java.lang.Boolean=Boolean||function(){n(this,arguments)};if(a._supportsNativeObject)for(d=0;d<a._extendedObjectMethods.length;d++)g=a._extendedObjectMethods[d],Boolean.prototype[g]=a._O.prototype[g];Boolean.__CLASS_NAME__="Boolean";X(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=a._innerFunctions.equals;Boolean.getName=a._innerFunctions.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;N(Boolean,function(a){var b=
("string"==typeof a?Boolean.toBoolean(a):a)?!0:!1;this.valueOf=function(){return b}},"~O");Boolean.parseBoolean=c(Boolean,"parseBoolean",function(a){return Boolean.toBoolean(a)},"~S");c(Boolean,"booleanValue",function(){return this.valueOf()});Boolean.$valueOf=e(Boolean,"$valueOf",function(a){return("string"==typeof a?"true".equalsIgnoreCase(a):a)?Boolean.TRUE:Boolean.FALSE});e(Boolean,"toString",function(){return this.valueOf()?"true":"false"});e(Boolean,"hashCode",function(){return this.valueOf()?
1231:1237});e(Boolean,"equals",function(a){return w(a,Boolean)?this.booleanValue()==a.booleanValue():!1},"~O");Boolean.getBoolean=c(Boolean,"getBoolean",function(a){var b=!1;try{b=Boolean.toBoolean(System.getProperty(a))}catch(d){if(!w(d,IllegalArgumentException)&&!w(d,NullPointerException))throw d;}return b},"~S");e(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;a._Encoding={};(function(b){b.UTF8="utf-8";b.UTF16="utf-16";b.ASCII="ascii";b.guessEncoding=function(a){return 239==a.charCodeAt(0)&&187==a.charCodeAt(1)&&191==a.charCodeAt(2)?b.UTF8:255==a.charCodeAt(0)&&254==a.charCodeAt(1)?b.UTF16:b.ASCII};b.readUTF8=function(a){var d=this.guessEncoding(a),g=0;d==b.UTF8?g=3:d==b.UTF16&&
(g=2);for(d=[];g<a.length;g++){var c=a.charCodeAt(g);if(128>c)d[d.length]=a.charAt(g);else if(192<c&&224>c){c&=31;g++;var h=a.charCodeAt(g)&63,c=(c<<6)+h;d[d.length]=String.fromCharCode(c)}else if(224<=c){c&=15;g++;h=a.charCodeAt(g)&63;g++;var e=a.charCodeAt(g)&63,c=(c<<12)+(h<<6)+e;d[d.length]=String.fromCharCode(c)}}return d.join("")};b.convert2UTF8=function(a){var d=this.guessEncoding(a),g=0;if(d==b.UTF8)return a;d==b.UTF16&&(g=2);for(var d=Array(0+a.length-g),c=g;c<a.length;c++){var h=a.charCodeAt(c);
if(128>h)d[0+c-g]=a.charAt(c);else if(2047>=h){var e=192+((h&1984)>>6),m=128+(h&63);d[0+c-g]=String.fromCharCode(e)+String.fromCharCode(m)}else e=224+((h&61440)>>12),m=128+((h&4032)>>6),h=128+(h&63),d[0+c-g]=String.fromCharCode(e)+String.fromCharCode(m)+String.fromCharCode(h)}return d.join("")};b.base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");b.encodeBase64=function(a){if(null==a||0==a.length)return a;for(var d=b.base64Chars,g=a.length,c=0,h=[],e,m;c<g;)e=
a.charCodeAt(c++),h[h.length]=d[e>>2],c<g?(m=a.charCodeAt(c++),h[h.length]=d[e<<4&48|m>>4],c<g?(e=a.charCodeAt(c++),h[h.length]=d[m<<2&60|e>>6],h[h.length]=d[e&63]):(h[h.length]=d[m<<2&60],h[h.length]="=")):(h[h.length]=d[e<<4&48],h[h.length]="=",h[h.length]="=");return h.join("")};b.decodeBase64=function(a){if(null==a||0==a.length)return a;var d=b.base64Chars,g=b.xBase64Chars;if(null==b.xBase64Chars){for(var g={},c=0;c<d.length;c++)g[d[c]]=c;b.xBase64Chars=g}for(var d=a.length,c=0,h=[],e,m,p,n,k=
0;c<d&&6E4>k++;)e=g[a.charAt(c++)],m=g[a.charAt(c++)],p=g[a.charAt(c++)],n=g[a.charAt(c++)],h[h.length]=String.fromCharCode(e<<2&255|m>>4),null!=p&&(h[h.length]=String.fromCharCode(m<<4&255|p>>2),null!=n&&(h[h.length]=String.fromCharCode(p<<6&255|n)));return h.join("")};if(null==String.prototype.$replace){java.lang.String=String;if(a._supportsNativeObject)for(var d=0;d<a._extendedObjectMethods.length;d++){var g=a._extendedObjectMethods[d];"to$tring"==g||("toString"==g||"equals"==g||"hashCode"==g)||
(String.prototype[g]=a._O.prototype[g])}X(String,[java.io.Serializable,CharSequence,Comparable]);String.getName=a._innerFunctions.getName;String.serialVersionUID=String.prototype.serialVersionUID=-0x5f0f5bc785c44c00;(function(a){a.$replace=function(a,b){if(a==b||0>this.indexOf(a))return""+this;1==a.length?0<="\\$.*+|?^{}()[]".indexOf(a)&&(a="\\"+a):a=a.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function(a,b){return"\\"+b});return this.replace(RegExp(a,"gm"),b)};a.$generateExpFunction=function(a){var b=
[],d=[],g=0;b[0]="";for(var c=0;c<a.length;c++){var f=a.charAt(c);c!=a.length-1&&"\\"==f?(c++,f=a.charAt(c),"\\"==f&&(b[g]+="\\"),b[g]+=f):c!=a.length-1&&"$"==f?(c++,d[g]=parseInt(a.charAt(c)),g++,b[g]=""):b[g]="\r"==f?b[g]+"\\r":"\n"==f?b[g]+"\\n":"\t"==f?b[g]+"\\t":'"'==f?b[g]+'\\"':b[g]+f}a="f = function (";g=Math.max.apply({},d);for(c=0;c<=g;c++)a+="$"+c,c!=g&&(a+=", ");a+=") { return ";for(c=0;c<b.length-1;c++)a+='"'+b[c]+'" + $'+d[c]+" + ";a+='"'+b[c]+'"; }';eval(a);return null};a.replaceAll=
function(a,b){return this.replace(RegExp(a,"gm"),this.$generateExpFunction(b))};a.replaceFirst=function(a,b){return this.replace(RegExp(a,"m"),this.$generateExpFunction(b))};a.matches=function(a){null!=a&&(a="^("+a+")$");a=this.match(RegExp(a,"gm"));return null!=a&&0!=a.length};a.regionMatches=function(a,b,d,g,c){if("number"==typeof a||!0!=a&&!1!=a)c=g,g=d,d=b,b=a,a=!1;if(0>g||0>b||b>this.length-c||g>d.length-c)return!1;b=this.substring(b,b+c);d=d.substring(g,g+c);a&&(b=b.toLowerCase(),d=d.toLowerCase());
return b==d};a.$plit=function(a,b){if(!b&&" "==a)return this.split(a);if(null!=b&&0<b){if(1==b)return this;var d=RegExp("("+a+")","gm"),g=1,c=this.replace(d,function(a){g++;return g==b?"@@_@@":a}),d=RegExp(a,"gm"),d=this.split(d);d.length>b&&(d[b-1]=c.substring(c.indexOf("@@_@@")+5),d.length=b);return d}d=RegExp(a,"gm");return this.split(d)};a.trim||(a.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")});if(!a.startsWith||!a.endsWith){var d=function(a,b,d){var g=d,c=0,f=b.length;
if(0>d||d>a.length-f)return!1;for(;0<=--f;)if(a.charAt(g++)!=b.charAt(c++))return!1;return!0};a.startsWith=function(a){return 1==arguments.length?d(this,arguments[0],0):2==arguments.length?d(this,arguments[0],arguments[1]):!1};a.endsWith=function(a){return d(this,a,this.length-a.length)}}a.equals=function(a){return this.valueOf()==a};a.equalsIgnoreCase=function(a){return null==a?!1:this==a||this.toLowerCase()==a.toLowerCase()};a.hash=0;a.hashCode=function(){var a=this.hash;if(0==a){for(var b=0,d=
this.length,g=0;g<d;g++)a=31*a+this.charCodeAt(b++),a&=4294967295;this.hash=a}return a};a.getBytes=function(){if(4==arguments.length)return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);var a=this;if(1==arguments.length){for(var d=arguments[0].toString().toLowerCase(),g="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),c=!1,h=0;h<g.length;h++)if(g[h]==d){c=!0;break}if(!c)throw new java.io.UnsupportedEncodingException;if("utf-8"==d||"utf8"==d)a=b.convert2UTF8(this)}d=
Array(a.length);for(h=c=g=0;h<a.length;h++)g=a.charCodeAt(h),255<g?(d[c]=26,d[c+1]=g&255,d[c+2]=(g&65280)>>8,c+=2):d[c]=g,c++;return d};a.contains=function(a){return 0<=this.indexOf(a)};a.compareTo=function(a){return this>a?1:this<a?-1:0};a.toCharArray=function(){for(var a=Array(this.length),b=0;b<this.length;b++)a[b]=this.charAt(b);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 b=arguments[1],d=arguments[2],g=Array(d),c=0;c<d;c++)g[c]=a[b+c];return g.join("")}return""+a};a.subSequence=function(a,b){return this.substring(a,b)};a.compareToIgnoreCase=function(a){if(null==a)throw new NullPointerException;var b=this.toUpperCase(),d=a.toUpperCase();if(b==d)return 0;b=this.toLowerCase();d=a.toLowerCase();return b==d?0:b>d?1:-1};a.contentEquals=function(a){if(this.length!=a.length())return!1;a=a.getValue();for(var b=0,d=0,g=this.length;0!=g--;)if(this.charCodeAt(b++)!=a[d++])return!1;
return!0};a.getChars=function(a,b,d,g){if(0>a)throw new StringIndexOutOfBoundsException(a);if(b>this.length)throw new StringIndexOutOfBoundsException(b);if(a>b)throw new StringIndexOutOfBoundsException(b-a);if(null==d)throw new NullPointerException;for(var c=0;c<b-a;c++)d[g+c]=this.charAt(a+c)};a.$concat=a.concat;a.concat=function(a){if(null==a)throw new NullPointerException;return this.$concat(a)};a.$lastIndexOf=a.lastIndexOf;a.lastIndexOf=function(a,b){return null!=b&&0>=b+this.length?-1:null!=
b?this.$lastIndexOf(a,b):this.$lastIndexOf(a)};a.intern=function(){return this.valueOf()};String.copyValueOf=a.copyValueOf=function(){return 1==arguments.length?String.instantialize(arguments[0]):String.instantialize(arguments[0],arguments[1],arguments[2])};a.codePointAt||(a.codePointAt=a.charCodeAt)})(String.prototype);String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var a=arguments[0];if("string"==typeof a||a instanceof String)return new String(a);if(a instanceof
Array||a instanceof Int32Array){if(0==a.length)return"";if("number"!=typeof a[0])return a.join("");for(var d=Array(a.length),g=0;g<a.length;g++)d[g]=String.fromCharCode(a[g]&255);return b.readUTF8(d.join(""))}if("StringBuffer"==a.__CLASS_NAME__||"java.lang.StringBuffer"==a.__CLASS_NAME__){for(var d=a.shareValue(),c=a.length(),a=Array(c),g=0;g<c;g++)a[g]=d[g];return a.join("")}return""+a;case 2:return a=arguments[0],c=arguments[1],"string"==typeof c?String.instantialize(a,0,a.length,c):String.instantialize(a,
c,0,a.length);case 3:var a=arguments[0],h=arguments[1],c=arguments[2];arguments[2]instanceof Array&&(a=arguments[2],h=arguments[0],c=arguments[1]);d=Array(c);if(0>h||c+h>a.length)throw new IndexOutOfBoundsException;if(0<c)if(null!=a[h].length)for(g=0;g<c;g++)d[g]=a[h+g];else for(g=0;g<c;g++)d[g]=String.fromCharCode(a[h+g]);return d.join("");case 4:var a=arguments[0],e=arguments[3];if("string"==typeof e||e instanceof String){h=arguments[1];c=arguments[2];d=Array(c);for(g=0;g<c;g++)d[g]=a[h+g],"number"==
typeof d[g]&&(d[g]=String.fromCharCode(d[g]&255));g=e.toLowerCase();return"utf-8"==g||"utf8"==g?b.readUTF8(d.join("")):d.join("")}g=arguments[3];h=arguments[2];c=arguments[1];d=Array(g);if(0==c)for(;0<g--;)d[g]=String.fromCharCode(a[g+h]&255);else for(c<<=8;0<g--;)d[g]=String.fromCharCode(c|a[g+h]&255);return d.join("");default:d="";for(g=0;g<arguments.length;g++)d+=arguments[g];return d}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this.valueOf()})}})(a._Encoding);
c$=k(function(){this.value=0;n(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);p(c$,function(a){this.value=a},"~N");c(c$,"charValue",function(){return this.value});e(c$,"hashCode",function(){return this.value.charCodeAt(0)});e(c$,"equals",function(a){return w(a,Character)?this.value.charCodeAt(0)==a.charValue().charCodeAt(0):!1},"~O");e(c$,"compareTo",function(a){return this.value.charCodeAt(0)-a.value.charCodeAt(0)},"Character");c$.toLowerCase=c(c$,"toLowerCase",function(a){return(""+
a).toLowerCase().charAt(0)},"~N");c$.toUpperCase=c(c$,"toUpperCase",function(a){return(""+a).toUpperCase().charAt(0)},"~N");c$.isDigit=c(c$,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~N");c$.isUpperCase=c(c$,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~N");c$.isLowerCase=c(c$,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~N");c$.isWhitespace=c(c$,"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");c$.isLetter=c(c$,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~N");c$.isLetterOrDigit=c(c$,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~N");c$.isSpaceChar=c(c$,"isSpaceChar",function(a){a=a.charCodeAt(0);if(32==a||160==a||5760==a)return!0;if(8192>a)return!1;8203>=returni||8232==a||8233==a||8239==a||12288==a},"~N");c$.digit=c(c$,"digit",function(a,b){var d=
a.charCodeAt(0);if(2<=b&&36>=b&&128>d){var g=-1;48<=d&&57>=d?g=d-48:97<=d&&122>=d?g=d-87:65<=d&&90>=d&&(g=d-55);return g<b?g:-1}return-1},"~N,~N");e(c$,"toString",function(){return String.valueOf([this.value])});c$.toString=e(c$,"toString",function(a){return this===Character?"class java.lang.Character":String.valueOf(a)},"~N");C(c$,"MIN_VALUE","\x00","MAX_VALUE","\uffff","MIN_RADIX",2,"MAX_RADIX",36,"TYPE",null);java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character;Array.getComponentType=
function(){return Object};c$=t(java.lang.reflect,"Array");c$.newInstance=c(c$,"newInstance",function(){return D(length)},"Class,~N");b.Date=Date;Date.TYPE="javautil.Date";Date.__CLASS_NAME__="Date";X(Date,[java.io.Serializable,java.lang.Comparable]);c(b.Date,"clone",function(){return new Date(this.getTime())});c(b.Date,"before",function(a){return this.getTime()<a.getTime()},"javautil.Date");c(b.Date,"after",function(a){return this.getTime()>a.getTime()},"javautil.Date");c(b.Date,"equals",function(a){return w(a,
b.Date)&&this.getTime()==a.getTime()},"Object");c(b.Date,"compareTo",function(a){var b=this.getTime();a=a.getTime();return b<a?-1:b==a?0:1},"javautil.Date");c(b.Date,"compareTo",function(a){return this.compareTo(a)},"Object");e(b.Date,"hashCode",function(){var a=this.getTime();return parseInt(a)^parseInt(a>>32)});c$=k(function(){this.source=null;n(this,arguments)},b,"EventObject",null,java.io.Serializable);p(c$,function(a){if(null!=a)this.source=a;else throw new IllegalArgumentException;},"~O");c(c$,
"getSource",function(){return this.source});e(c$,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});B(b,"EventListener");c$=k(function(){this.listener=null;n(this,arguments)},b,"EventListenerProxy",null,b.EventListener);p(c$,function(a){this.listener=a},"javautil.EventListener");c(c$,"getListener",function(){return this.listener});B(b,"Iterator");B(b,"ListIterator",b.Iterator);B(b,"Enumeration");B(b,"Collection",Iterable);B(b,"Set",b.Collection);B(b,
"Map");B(b.Map,"Entry");B(b,"List",b.Collection);B(b,"Queue",b.Collection);B(b,"RandomAccess");c$=k(function(){this.stackTrace=this.cause=this.detailMessage=null;n(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);F(c$,function(){this.cause=this});p(c$,function(){this.fillInStackTrace()});p(c$,function(a){this.fillInStackTrace();this.detailMessage=a},"~S");p(c$,function(a,b){this.fillInStackTrace();this.detailMessage=a;this.cause=b},"~S,Throwable");p(c$,function(a){this.fillInStackTrace();
this.detailMessage=null==a?null:a.toString();this.cause=a},"Throwable");c(c$,"getMessage",function(){return this.message||this.detailMessage||this.toString()});c(c$,"getLocalizedMessage",function(){return this.getMessage()});c(c$,"getCause",function(){return this.cause===this?null:this.cause});c(c$,"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");e(c$,"toString",function(){var a=this.getClass().getName(),b=this.message||this.detailMessage;return b?a+": "+b:a});c(c$,"printStackTrace",function(){System.err.println(this.getStackTrace?this.getStackTrace():this.message+" "+ca())});c(c$,"getStackTrace",function(){for(var a=""+this+"\n",b=0;b<this.stackTrace.length;b++){var d=this.stackTrace[b],g=d.methodName.indexOf("(");if("construct"!=d.methodName.substring(0,g).replace(/\s+/g,"")||null==d.nativeClazz||0>fa(d.nativeClazz,Throwable))a+=
d+"\n"}return a});c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(c$,"fillInStackTrace",function(){this.stackTrace=[];for(var b=arguments.callee.caller,d=null,g=[],c=a._callingStackTraces.length-1,e=!0;-1<c||null!=b;){var u=null;if(!e||b==na||b==L||null==b){if(0>c)break;e=!0;d=a._callingStackTraces[c].caller;u=a._callingStackTraces[c].owner;c--}else d=b,null!=d.claxxOwner?u=d.claxxOwner:
null!=d.exClazz&&(u=d.exClazz);b=new StackTraceElement(null!=u&&0!=u.__CLASS_NAME__.length?u.__CLASS_NAME__:"anonymous",(null==d.exName?"anonymous":d.exName)+" ("+ga(d.arguments)+")",null,-1);b.nativeClazz=u;this.stackTrace[this.stackTrace.length]=b;for(u=0;u<g.length;u++)g[u]==d&&(b=new StackTraceElement("lost","missing",null,-3),b.nativeClazz=null,this.stackTrace[this.stackTrace.length]=b,e=!1);null!=d&&(g[g.length]=d);b=d.arguments.callee.caller}a._initializingException=!1;return this});c(c$,"setStackTrace",
function(a){a=a.clone();for(var b=0;b<a.length;b++)if(null==a[b])throw new NullPointerException("stackTrace["+b+"]");this.stackTrace=a},"~A");c$=k(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;n(this,arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);p(c$,function(a,b,d,g){if(null==a||null==b)throw new NullPointerException;this.declaringClass=a;this.methodName=b;this.fileName=d;this.lineNumber=g},"~S,~S,~S,~N");e(c$,"equals",function(a){if(!w(a,
StackTraceElement)||(null==this.methodName||null==a.methodName)||!this.getMethodName().equals(a.getMethodName())||!this.getClassName().equals(a.getClassName()))return!1;var b=this.getFileName();if(null==b){if(null!=a.getFileName())return!1}else if(!b.equals(a.getFileName()))return!1;return this.getLineNumber()!=a.getLineNumber()?!1:!0},"~O");c(c$,"getClassName",function(){return null==this.declaringClass?"<unknown class>":this.declaringClass});c(c$,"getFileName",function(){return this.fileName});
c(c$,"getLineNumber",function(){return this.lineNumber});c(c$,"getMethodName",function(){return null==this.methodName?"<unknown method>":this.methodName});e(c$,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(c$,"isNativeMethod",function(){return-2==this.lineNumber});e(c$,"toString",function(){var a=new StringBuilder(80);a.append(this.getClassName());a.append(".");a.append(this.getMethodName());if(this.isNativeMethod())a.append("(Native Method)");
else{var b=this.getFileName();if(null==b)a.append("(Unknown Source)");else{var d=this.getLineNumber();a.append("(");a.append(b);0<=d&&(a.append(":"),a.append(d));a.append(")")}}return a.toString()});TypeError.prototype.getMessage||(TypeError.prototype.getMessage=function(){return(this.message||this.toString())+(this.getStackTrace?this.getStackTrace():ca())});c$=t(java.lang,"Error",Throwable);c$=t(java.lang,"LinkageError",Error);c$=t(java.lang,"IncompatibleClassChangeError",LinkageError);c$=t(java.lang,
"AbstractMethodError",IncompatibleClassChangeError);c$=t(java.lang,"AssertionError",Error);p(c$,function(a){x(this,AssertionError,[String.valueOf(a),w(a,Throwable)?a:null])},"~O");p(c$,function(a){this.construct(""+a)},"~B");p(c$,function(a){this.construct(""+a)},"~N");c$=t(java.lang,"ClassCircularityError",LinkageError);c$=t(java.lang,"ClassFormatError",LinkageError);c$=k(function(){this.exception=null;n(this,arguments)},java.lang,"ExceptionInInitializerError",LinkageError);p(c$,function(){x(this,
ExceptionInInitializerError);this.initCause(null)});p(c$,function(a){x(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");p(c$,function(a){x(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(c$,"getException",function(){return this.exception});e(c$,"getCause",function(){return this.exception});c$=t(java.lang,"IllegalAccessError",IncompatibleClassChangeError);c$=t(java.lang,"InstantiationError",IncompatibleClassChangeError);c$=t(java.lang,"VirtualMachineError",
Error);c$=t(java.lang,"InternalError",VirtualMachineError);c$=t(java.lang,"NoClassDefFoundError",LinkageError);c$=t(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);c$=t(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);c$=t(java.lang,"OutOfMemoryError",VirtualMachineError);c$=t(java.lang,"StackOverflowError",VirtualMachineError);c$=t(java.lang,"UnknownError",VirtualMachineError);c$=t(java.lang,"UnsatisfiedLinkError",LinkageError);c$=t(java.lang,"UnsupportedClassVersionError",
ClassFormatError);c$=t(java.lang,"VerifyError",LinkageError);c$=t(java.lang,"ThreadDeath",Error);p(c$,function(){x(this,ThreadDeath,[])});c$=t(java.lang,"Exception",Throwable);c$=t(java.lang,"RuntimeException",Exception);c$=t(java.lang,"ArithmeticException",RuntimeException);c$=t(java.lang,"IndexOutOfBoundsException",RuntimeException);c$=t(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);p(c$,function(a){x(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},
"~N");c$=t(java.lang,"ArrayStoreException",RuntimeException);c$=t(java.lang,"ClassCastException",RuntimeException);c$=k(function(){this.ex=null;n(this,arguments)},java.lang,"ClassNotFoundException",Exception);p(c$,function(){x(this,ClassNotFoundException,[R("Throwable")])});p(c$,function(a){x(this,ClassNotFoundException,[a,null])},"~S");p(c$,function(a,b){x(this,ClassNotFoundException,[a]);this.ex=b},"~S,Throwable");c(c$,"getException",function(){return this.ex});e(c$,"getCause",function(){return this.ex});
c$=t(java.lang,"CloneNotSupportedException",Exception);c$=t(java.lang,"IllegalAccessException",Exception);c$=t(java.lang,"IllegalArgumentException",RuntimeException);p(c$,function(a){x(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"IllegalMonitorStateException",RuntimeException);c$=t(java.lang,"IllegalStateException",RuntimeException);p(c$,function(a){x(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"IllegalThreadStateException",
IllegalArgumentException);c$=t(java.lang,"InstantiationException",Exception);c$=t(java.lang,"InterruptedException",Exception);c$=t(java.lang,"NegativeArraySizeException",RuntimeException);c$=t(java.lang,"NoSuchFieldException",Exception);c$=t(java.lang,"NoSuchMethodException",Exception);c$=t(java.lang,"NullPointerException",RuntimeException);c$=t(java.lang,"NumberFormatException",IllegalArgumentException);c$=t(java.lang,"SecurityException",RuntimeException);p(c$,function(a){x(this,SecurityException,
[null==a?null:a.toString(),a])},"Throwable");c$=t(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);p(c$,function(a){x(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");c$=t(java.lang,"UnsupportedOperationException",RuntimeException);p(c$,function(){x(this,UnsupportedOperationException,[])});p(c$,function(a){x(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");c$=k(function(){this.target=null;n(this,arguments)},java.lang.reflect,
"InvocationTargetException",Exception);p(c$,function(){x(this,java.lang.reflect.InvocationTargetException,[R("Throwable")])});p(c$,function(a){x(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");p(c$,function(a,b){x(this,java.lang.reflect.InvocationTargetException,[b,a]);this.target=a},"Throwable,~S");c(c$,"getTargetException",function(){return this.target});e(c$,"getCause",function(){return this.target});c$=k(function(){this.undeclaredThrowable=null;n(this,arguments)},
java.lang.reflect,"UndeclaredThrowableException",RuntimeException);p(c$,function(a){x(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");p(c$,function(a,b){x(this,java.lang.reflect.UndeclaredThrowableException,[b]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S");c(c$,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});e(c$,"getCause",function(){return this.undeclaredThrowable});c$=t(java.io,"IOException",
Exception);c$=t(java.io,"CharConversionException",java.io.IOException);c$=t(java.io,"EOFException",java.io.IOException);c$=t(java.io,"FileNotFoundException",java.io.IOException);c$=k(function(){this.bytesTransferred=0;n(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);c$=t(java.io,"ObjectStreamException",java.io.IOException);c$=k(function(){this.classname=null;n(this,arguments)},java.io,"InvalidClassException",java.io.ObjectStreamException);p(c$,function(a,b){x(this,java.io.InvalidClassException,
[b]);this.classname=a},"~S,~S");c(c$,"getMessage",function(){var a=L(this,java.io.InvalidClassException,"getMessage",[]);null!=this.classname&&(a=this.classname+"; "+a);return a});c$=t(java.io,"InvalidObjectException",java.io.ObjectStreamException);c$=t(java.io,"NotActiveException",java.io.ObjectStreamException);c$=t(java.io,"NotSerializableException",java.io.ObjectStreamException);c$=k(function(){this.eof=!1;this.length=0;n(this,arguments)},java.io,"OptionalDataException",java.io.ObjectStreamException);
c$=t(java.io,"StreamCorruptedException",java.io.ObjectStreamException);c$=t(java.io,"SyncFailedException",java.io.IOException);c$=t(java.io,"UnsupportedEncodingException",java.io.IOException);c$=t(java.io,"UTFDataFormatException",java.io.IOException);c$=k(function(){this.detail=null;n(this,arguments)},java.io,"WriteAbortedException",java.io.ObjectStreamException);p(c$,function(a,b){x(this,java.io.WriteAbortedException,[a]);this.detail=b;this.initCause(b)},"~S,Exception");c(c$,"getMessage",function(){var a=
L(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?a+"; "+this.detail.toString():a});e(c$,"getCause",function(){return this.detail});c$=t(b,"ConcurrentModificationException",RuntimeException);p(c$,function(){x(this,b.ConcurrentModificationException,[])});c$=t(b,"EmptyStackException",RuntimeException);c$=k(function(){this.key=this.className=null;n(this,arguments)},b,"MissingResourceException",RuntimeException);p(c$,function(a,d,g){x(this,b.MissingResourceException,[a]);this.className=
d;this.key=g},"~S,~S,~S");c(c$,"getClassName",function(){return this.className});c(c$,"getKey",function(){return this.key});c$=t(b,"NoSuchElementException",RuntimeException);c$=t(b,"TooManyListenersException",Exception);c$=t(java.lang,"Void");C(c$,"TYPE",null);java.lang.Void.TYPE=java.lang.Void;B(java.lang.reflect,"GenericDeclaration");B(java.lang.reflect,"AnnotatedElement");c$=t(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);p(c$,function(){});c(c$,"isAccessible",function(){return!1});
c$.setAccessible=c(c$,"setAccessible",function(){},"~A,~B");c(c$,"setAccessible",function(){},"~B");e(c$,"isAnnotationPresent",function(){return!1},"Class");e(c$,"getDeclaredAnnotations",function(){return[]});e(c$,"getAnnotations",function(){return[]});e(c$,"getAnnotation",function(){return null},"Class");c$.marshallArguments=c(c$,"marshallArguments",function(){return null},"~A,~A");c(c$,"invokeV",function(){},"~O,~A");c(c$,"invokeL",function(){return null},"~O,~A");c(c$,"invokeI",function(){return 0},
"~O,~A");c(c$,"invokeJ",function(){return 0},"~O,~A");c(c$,"invokeF",function(){return 0},"~O,~A");c(c$,"invokeD",function(){return 0},"~O,~A");c$.emptyArgs=c$.prototype.emptyArgs=[];B(java.lang.reflect,"InvocationHandler");c$=B(java.lang.reflect,"Member");C(c$,"PUBLIC",0,"DECLARED",1);c$=t(java.lang.reflect,"Modifier");p(c$,function(){});c$.isAbstract=c(c$,"isAbstract",function(a){return 0!=(a&1024)},"~N");c$.isFinal=c(c$,"isFinal",function(a){return 0!=(a&16)},"~N");c$.isInterface=c(c$,"isInterface",
function(a){return 0!=(a&512)},"~N");c$.isNative=c(c$,"isNative",function(a){return 0!=(a&256)},"~N");c$.isPrivate=c(c$,"isPrivate",function(a){return 0!=(a&2)},"~N");c$.isProtected=c(c$,"isProtected",function(a){return 0!=(a&4)},"~N");c$.isPublic=c(c$,"isPublic",function(a){return 0!=(a&1)},"~N");c$.isStatic=c(c$,"isStatic",function(a){return 0!=(a&8)},"~N");c$.isStrict=c(c$,"isStrict",function(a){return 0!=(a&2048)},"~N");c$.isSynchronized=c(c$,"isSynchronized",function(a){return 0!=(a&32)},"~N");
c$.isTransient=c(c$,"isTransient",function(a){return 0!=(a&128)},"~N");c$.isVolatile=c(c$,"isVolatile",function(a){return 0!=(a&64)},"~N");c$.toString=c(c$,"toString",function(a){var b=[];java.lang.reflect.Modifier.isPublic(a)&&(b[b.length]="public");java.lang.reflect.Modifier.isProtected(a)&&(b[b.length]="protected");java.lang.reflect.Modifier.isPrivate(a)&&(b[b.length]="private");java.lang.reflect.Modifier.isAbstract(a)&&(b[b.length]="abstract");java.lang.reflect.Modifier.isStatic(a)&&(b[b.length]=
"static");java.lang.reflect.Modifier.isFinal(a)&&(b[b.length]="final");java.lang.reflect.Modifier.isTransient(a)&&(b[b.length]="transient");java.lang.reflect.Modifier.isVolatile(a)&&(b[b.length]="volatile");java.lang.reflect.Modifier.isSynchronized(a)&&(b[b.length]="synchronized");java.lang.reflect.Modifier.isNative(a)&&(b[b.length]="native");java.lang.reflect.Modifier.isStrict(a)&&(b[b.length]="strictfp");java.lang.reflect.Modifier.isInterface(a)&&(b[b.length]="interface");return 0<b.length?b.join(" "):
""},"~N");C(c$,"PUBLIC",1,"PRIVATE",2,"PROTECTED",4,"STATIC",8,"FINAL",16,"SYNCHRONIZED",32,"VOLATILE",64,"TRANSIENT",128,"NATIVE",256,"INTERFACE",512,"ABSTRACT",1024,"STRICT",2048,"BRIDGE",64,"VARARGS",128,"SYNTHETIC",4096,"ANNOTATION",8192,"ENUM",16384);c$=k(function(){this.exceptionTypes=this.parameterTypes=this.clazz=null;this.modifiers=0;n(this,arguments)},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);p(c$,
function(a,b,d,g){x(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=b;this.exceptionTypes=d;this.modifiers=g},"Class,~A,~A,~N");e(c$,"getTypeParameters",function(){return null});c(c$,"toGenericString",function(){return null});c(c$,"getGenericParameterTypes",function(){return null});c(c$,"getGenericExceptionTypes",function(){return null});c(c$,"getParameterAnnotations",function(){return null});c(c$,"isVarArgs",function(){return!1});e(c$,"isSynthetic",function(){return!1});e(c$,
"equals",function(a){if(null!=a&&w(a,java.lang.reflect.Constructor)&&this.getDeclaringClass()===a.getDeclaringClass()){var b=this.parameterTypes;a=a.parameterTypes;if(b.length==a.length){for(var d=0;d<b.length;d++)if(b[d]!==a[d])return!1;return!0}}return!1},"~O");e(c$,"getDeclaringClass",function(){return this.clazz});c(c$,"getExceptionTypes",function(){return this.exceptionTypes});e(c$,"getModifiers",function(){return this.modifiers});e(c$,"getName",function(){return this.getDeclaringClass().getName()});
c(c$,"getParameterTypes",function(){return this.parameterTypes});e(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});c(c$,"newInstance",function(a){var b=new this.clazz(oa);n(b,a);return b},"~A");e(c$,"toString",function(){return null});c$=t(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);e(c$,"isSynthetic",function(){return!1});c(c$,"toGenericString",function(){return null});c(c$,"isEnumConstant",function(){return!1});c(c$,"getGenericType",
function(){return null});e(c$,"equals",function(){return!1},"~O");e(c$,"getDeclaringClass",function(){return null});e(c$,"getName",function(){return null});c(c$,"getType",function(){return null});e(c$,"hashCode",function(){return 0});e(c$,"toString",function(){return null});c$=k(function(){this.exceptionTypes=this.parameterTypes=this.returnType=this.name=this.clazz=null;this.modifiers=0;n(this,arguments)},java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,
java.lang.reflect.Member]);p(c$,function(a,b,d,g,c,e){x(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=b;this.parameterTypes=d;this.returnType=g;this.exceptionTypes=c;this.modifiers=e},"Class,~S,~A,Class,~A,~N");e(c$,"getTypeParameters",function(){return null});c(c$,"toGenericString",function(){return null});c(c$,"getGenericParameterTypes",function(){return null});c(c$,"getGenericExceptionTypes",function(){return null});c(c$,"getGenericReturnType",function(){return null});c(c$,"getParameterAnnotations",
function(){return null});c(c$,"isVarArgs",function(){return!1});c(c$,"isBridge",function(){return!1});e(c$,"isSynthetic",function(){return!1});c(c$,"getDefaultValue",function(){return null});e(c$,"equals",function(a){if(null!=a&&w(a,java.lang.reflect.Method)&&this.getDeclaringClass()===a.getDeclaringClass()&&this.getName()===a.getName()){var b=this.parameterTypes;a=a.parameterTypes;if(b.length==a.length){for(var d=0;d<b.length;d++)if(b[d]!==a[d])return!1;return!0}}return!1},"~O");e(c$,"getDeclaringClass",
function(){return this.clazz});c(c$,"getExceptionTypes",function(){return this.exceptionTypes});e(c$,"getModifiers",function(){return this.modifiers});e(c$,"getName",function(){return this.name});c(c$,"getParameterTypes",function(){return this.parameterTypes});c(c$,"getReturnType",function(){return this.returnType});e(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode()});c(c$,"invoke",function(a,b){var d=this.clazz.prototype[this.getName()];null==
d&&(d=this.clazz[this.getName()]);null!=d&&d.apply(a,b)},"~O,~A");e(c$,"toString",function(){return null})})(U);Jmol._debugCode||(r(null,"java.lang.AbstractStringBuilder","java.io.InvalidObjectException java.lang.ArrayIndexOutOfBoundsException $.IndexOutOfBoundsException $.NegativeArraySizeException $.NullPointerException $.StringIndexOutOfBoundsException".split(" "),function(){c$=k(function(){this.value=null;this.count=0;this.shared=!1;n(this,arguments)},java.lang,"AbstractStringBuilder");c(c$,"getValue",
function(){return this.value});c(c$,"shareValue",function(){this.shared=!0;return this.value});c(c$,"set",function(a,b){null==a&&(a=D(0,"\x00"));if(a.length<b)throw new java.io.InvalidObjectException("K0199");this.shared=!1;this.value=a;this.count=b},"~A,~N");p(c$,function(){this.value=D(16,"\x00")});p(c$,function(a){if(0>a)throw new NegativeArraySizeException;this.value=D(a,"\x00")},"~N");p(c$,function(a){this.count=a.length;this.shared=!1;this.value=D(this.count+16,"\x00");a.getChars(0,this.count,
this.value,0)},"~S");c(c$,"enlargeBuffer",($fz=function(a){var b=(this.value.length<<1)+2;a=D(a>b?a:b,"\x00");System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1},$fz.isPrivate=!0,$fz),"~N");c(c$,"appendNull",function(){var a=this.count+4;a>this.value.length?this.enlargeBuffer(a):this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[this.count++]="n";this.value[this.count++]="u";this.value[this.count++]="l";this.value[this.count++]="l"});c(c$,"append0",function(a){var b=
this.count+a.length;b>this.value.length?this.enlargeBuffer(b):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,0,this.value,this.count,a.length);this.count=b},"~A");c(c$,"append0",function(a,b,d){if(null==a)throw new NullPointerException;if(0<=b&&0<=d&&d<=a.length-b){var g=this.count+d;g>this.value.length?this.enlargeBuffer(g):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,b,this.value,this.count,d);this.count=g}else throw new ArrayIndexOutOfBoundsException;
},"~A,~N,~N");c(c$,"append0",function(a){this.count==this.value.length&&this.enlargeBuffer(this.count+1);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[this.count++]=a},"~N");c(c$,"append0",function(a){if(null==a)this.appendNull();else{var b=a.length,d=this.count+b;d>this.value.length?this.enlargeBuffer(d):this.shared&&(this.value=this.value.clone(),this.shared=!1);a.getChars(0,b,this.value,this.count);this.count=d}},"~S");c(c$,"append0",function(a,b,d){null==a&&(a="null");
if(0>b||0>d||b>d||d>a.length())throw new IndexOutOfBoundsException;this.append0(a.subSequence(b,d).toString())},"CharSequence,~N,~N");c(c$,"capacity",function(){return this.value.length});c(c$,"charAt",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);return this.value[a]},"~N");c(c$,"delete0",function(a,b){if(0<=a){b>this.count&&(b=this.count);if(b==a)return;if(b>a){var d=this.count-b;if(0<d)if(this.shared){var g=D(this.value.length,"\x00");System.arraycopy(this.value,
0,g,0,a);System.arraycopy(this.value,b,g,a,d);this.value=g;this.shared=!1}else System.arraycopy(this.value,b,this.value,a,d);this.count-=b-a;return}}throw new StringIndexOutOfBoundsException;},"~N,~N");c(c$,"deleteCharAt0",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);var b=this.count-a-1;if(0<b)if(this.shared){var d=D(this.value.length,"\x00");System.arraycopy(this.value,0,d,0,a);System.arraycopy(this.value,a+1,d,a,b);this.value=d;this.shared=!1}else System.arraycopy(this.value,
a+1,this.value,a,b);this.count--},"~N");c(c$,"ensureCapacity",function(a){a>this.value.length&&this.enlargeBuffer(a)},"~N");c(c$,"getChars",function(a,b,d,g){if(a>this.count||b>this.count||a>b)throw new StringIndexOutOfBoundsException;System.arraycopy(this.value,a,d,g,b-a)},"~N,~N,~A,~N");c(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new StringIndexOutOfBoundsException(a);0!=b.length&&(this.move(b.length,a),System.arraycopy(b,0,this.value,a,b.length),this.count+=b.length)},"~N,~A");c(c$,
"insert0",function(a,b,d,g){if(0<=a&&a<=this.count){if(0<=d&&0<=g&&g<=b.length-d){0!=g&&(this.move(g,a),System.arraycopy(b,d,this.value,a,g),this.count+=g);return}throw new StringIndexOutOfBoundsException("offset "+d+", len "+g+", array.length "+b.length);}throw new StringIndexOutOfBoundsException(a);},"~N,~A,~N,~N");c(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new ArrayIndexOutOfBoundsException(a);this.move(1,a);this.value[a]=b;this.count++},"~N,~N");c(c$,"insert0",function(a,b){if(0<=
a&&a<=this.count){null==b&&(b="null");var d=b.length;0!=d&&(this.move(d,a),b.getChars(0,d,this.value,a),this.count+=d)}else throw new StringIndexOutOfBoundsException(a);},"~N,~S");c(c$,"insert0",function(a,b,d,g){null==b&&(b="null");if(0>a||a>this.count||0>d||0>g||d>g||g>b.length())throw new IndexOutOfBoundsException;this.insert0(a,b.subSequence(d,g).toString())},"~N,CharSequence,~N,~N");c(c$,"length",function(){return this.count});c(c$,"move",($fz=function(a,b){var d;if(this.value.length-this.count>=
a){if(!this.shared){System.arraycopy(this.value,b,this.value,b+a,this.count-b);return}d=this.value.length}else{d=this.count+a;var g=(this.value.length<<1)+2;d=d>g?d:g}d=D(d,"\x00");System.arraycopy(this.value,0,d,0,b);System.arraycopy(this.value,b,d,b+a,this.count-b);this.value=d;this.shared=!1},$fz.isPrivate=!0,$fz),"~N,~N");c(c$,"replace0",function(a,b,d){if(0<=a){b>this.count&&(b=this.count);if(b>a){var g=d.length,c=b-a-g;if(0<c)if(this.shared){var h=D(this.value.length,"\x00");System.arraycopy(this.value,
0,h,0,a);System.arraycopy(this.value,b,h,a+g,this.count-b);this.value=h;this.shared=!1}else System.arraycopy(this.value,b,this.value,a+g,this.count-b);else 0>c?this.move(-c,b):this.shared&&(this.value=this.value.clone(),this.shared=!1);d.getChars(0,g,this.value,a);this.count-=c;return}if(a==b){if(null==d)throw new NullPointerException;this.insert0(a,d);return}}throw new StringIndexOutOfBoundsException;},"~N,~N,~S");c(c$,"reverse0",function(){if(!(2>this.count))if(this.shared){for(var a=D(this.value.length,
"\x00"),b=0,d=this.count;b<this.count;b++)a[--d]=this.value[b];this.value=a;this.shared=!1}else for(var b=0,d=this.count,a=Math.floor(this.count/2);b<a;b++){var g=this.value[--d];this.value[d]=this.value[b];this.value[b]=g}});c(c$,"setCharAt",function(a,b){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[a]=b},"~N,~N");c(c$,"setLength",function(a){if(0>a)throw new StringIndexOutOfBoundsException(a);if(this.count<
a)if(a>this.value.length)this.enlargeBuffer(a);else if(this.shared){var b=D(this.value.length,"\x00");System.arraycopy(this.value,0,b,0,this.count);this.value=b;this.shared=!1}else for(b=this.count;b<a;b++)this.value[b]=String.fromCharCode(0);this.count=a},"~N");c(c$,"substring",function(a){if(0<=a&&a<=this.count){if(a==this.count)return"";this.shared=!0;return String.instantialize(a,this.count-a,this.value)}throw new StringIndexOutOfBoundsException(a);},"~N");c(c$,"substring",function(a,b){if(0<=
a&&a<=b&&b<=this.count){if(a==b)return"";this.shared=!0;return String.instantialize(this.value,a,b-a)}throw new StringIndexOutOfBoundsException;},"~N,~N");e(c$,"toString",function(){if(0==this.count)return"";if(256<=this.count&&this.count<=this.value.length>>1)return String.instantialize(this.value,0,this.count);this.shared=!0;return String.instantialize(0,this.count,this.value)});c(c$,"subSequence",function(a,b){return this.substring(a,b)},"~N,~N");c(c$,"indexOf",function(a){return this.indexOf(a,
0)},"~S");c(c$,"indexOf",function(a,b){0>b&&(b=0);var d=a.length;if(0<d){if(d+b>this.count)return-1;for(var g=a.charAt(0);;){for(var c=b,h=!1;c<this.count;c++)if(this.value[c].charCodeAt(0)==g.charCodeAt(0)){h=!0;break}if(!h||d+c>this.count)return-1;for(var h=c,e=0;++e<d&&this.value[++h].charCodeAt(0)==a.charAt(e).charCodeAt(0););if(e==d)return c;b=c+1}}return b<this.count||0==b?b:this.count},"~S,~N");c(c$,"lastIndexOf",function(a){return this.lastIndexOf(a,this.count)},"~S");c(c$,"lastIndexOf",function(a,
b){var d=a.length;if(d<=this.count&&0<=b){if(0<d){b>this.count-d&&(b=this.count-d);for(var g=a.charAt(0);;){for(var c=b,h=!1;0<=c;--c)if(this.value[c].charCodeAt(0)==g.charCodeAt(0)){h=!0;break}if(!h)return-1;for(var h=c,e=0;++e<d&&this.value[++h].charCodeAt(0)==a.charAt(e).charCodeAt(0););if(e==d)return c;b=c-1}}return b<this.count?b:this.count}return-1},"~S,~N");c(c$,"trimToSize",function(){if(this.count<this.value.length){var a=D(this.count,"\x00");System.arraycopy(this.value,0,a,0,this.count);
this.value=a;this.shared=!1}});C(c$,"INITIAL_CAPACITY",16)}),r(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=k(function(){this.$name=null;this.$ordinal=0;n(this,arguments)},java.lang,"Enum",null,[java.io.Serializable,Comparable]);p(c$,function(a,b){this.$name=a;this.$ordinal=b},"~S,~N");c(c$,"name",function(){return this.$name});c(c$,"ordinal",function(){return this.$ordinal});e(c$,"toString",function(){return this.$name});
e(c$,"equals",function(a){return this===a},"~O");e(c$,"hashCode",function(){return this.$ordinal+(null==this.$name?0:this.$name.hashCode())});e(c$,"clone",function(){throw new CloneNotSupportedException("KA004");});e(c$,"compareTo",function(a){return this.$ordinal-a.$ordinal},"~O");c(c$,"getDeclaringClass",function(){var a=this.getClass(),b=a.getSuperclass();return Enum===b?a:b});c$.$valueOf=c(c$,"$valueOf",function(a,b){if(null==a||null==b)throw new NullPointerException("KA001");var d=Enum.getValues(a);
if(null==d)throw new IllegalArgumentException("KA005");for(var g,c=0;c<d.length&&((g=d[c])||1);c++)if(g.$name.equals(b))return g;throw new IllegalArgumentException("KA006");},"Class,~S");c$.getValues=c(c$,"getValues",function(a){return a.values()},"Class")}),r(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){c$=t(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);
p(c$,function(a){if(null==a)throw new NullPointerException;x(this,StringBuffer,[a.toString()])},"CharSequence");c(c$,"append",function(a){return this.append(a?"true":"false")},"~B");c(c$,"append",function(a){this.append0(a);return this},"~N");c(c$,"append",function(a){return this.append(Double.toString(a))},"~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");c(c$,"append",function(a){this.append0(a);return this},"~S");c(c$,"append",function(a){null==
a?this.appendNull():this.append0(a.getValue(),0,a.length());return this},"StringBuffer");c(c$,"append",function(a){this.append0(a);return this},"~A");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"~A,~N,~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"CharSequence");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"CharSequence,~N,~N");c(c$,"appendCodePoint",function(a){return this.append(Character.toChars(a))},"~N");
c(c$,"$delete",function(a,b){this.delete0(a,b);return this},"~N,~N");c(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,b?"true":"false")},"~N,~B");c(c$,"insert",function(a,b){return this.insert(a,Integer.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Long.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Double.toString(b))},
"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Float.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,null==b?"null":b.toString())},"~N,~O");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~S");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~A");c(c$,"insert",function(a,b,d,g){this.insert0(a,b,d,g);return this},"~N,~A,~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,CharSequence");c(c$,
"insert",function(a,b,d,g){this.insert0(a,b,d,g);return this},"~N,CharSequence,~N,~N");c(c$,"replace",function(a,b,d){this.replace0(a,b,d);return this},"~N,~N,~S");c(c$,"reverse",function(){this.reverse0();return this});e(c$,"subSequence",function(a,b){return L(this,StringBuffer,"substring",[a,b])},"~N,~N")}),r(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){c$=t(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,
CharSequence,java.io.Serializable]);p(c$,function(a){x(this,StringBuilder,[a.toString()])},"CharSequence");c(c$,"append",function(a){this.append0(a?"true":"false");return this},"~B");c(c$,"append",function(a){this.append0(a);return this},"~N");c(c$,"append",function(a){this.append0(Integer.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Long.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Float.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Double.toString(a));
return this},"~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");c(c$,"append",function(a){this.append0(a);return this},"~S");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.getValue(),0,a.length());return this},"StringBuffer");c(c$,"append",function(a){this.append0(a);return this},"~A");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"~A,~N,~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());
return this},"CharSequence");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"CharSequence,~N,~N");c(c$,"$delete",function(a,b){this.delete0(a,b);return this},"~N,~N");c(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");c(c$,"insert",function(a,b){this.insert0(a,b?"true":"false");return this},"~N,~B");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Integer.toString(b));return this},"~N,~N");c(c$,"insert",
function(a,b){this.insert0(a,Long.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Float.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Double.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,~O");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~S");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~A");c(c$,"insert",function(a,b,d,g){this.insert0(a,
b,d,g);return this},"~N,~A,~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,CharSequence");c(c$,"insert",function(a,b,d,g){this.insert0(a,b,d,g);return this},"~N,CharSequence,~N,~N");c(c$,"replace",function(a,b,d){this.replace0(a,b,d);return this},"~N,~N,~S");c(c$,"reverse",function(){this.reverse0();return this})}),r(null,"java.lang.Thread",["java.lang.IllegalArgumentException","$.ThreadGroup","java.util.Date"],function(){c$=k(function(){this.name=
this.group=this.target=null;this.priority=0;n(this,arguments)},java.lang,"Thread",null,Runnable);c$.currentThread=c(c$,"currentThread",function(){null==Thread.J2S_THREAD&&(Thread.J2S_THREAD=new Thread,Thread.prototype.J2S_THREAD=Thread.J2S_THREAD);return Thread.J2S_THREAD});c$.sleep=c(c$,"sleep",function(){pa("Thread.sleep is not implemented in Java2Script!")},"~N");p(c$,function(){});p(c$,function(a){this.init(null,a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");p(c$,function(a,
b){this.init(a,b,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");p(c$,function(a){this.init(null,null,a,0)},"~S");p(c$,function(a,b){this.init(a,null,b,0)},"ThreadGroup,~S");p(c$,function(a,b){this.init(null,a,b,0)},"Runnable,~S");p(c$,function(a,b,d){this.init(a,b,d,0)},"ThreadGroup,Runnable,~S");p(c$,function(a,b,d,g){this.init(a,b,d,g)},"ThreadGroup,Runnable,~S,~N");c(c$,"init",($fz=function(a,b,d){null==a&&(a=new ThreadGroup);this.group=a;this.target=b;this.name=
d;this.priority=5},$fz.isPrivate=!0,$fz),"ThreadGroup,Runnable,~S,~N");c(c$,"start",function(){window.setTimeout(function(a){return function(){a.run()}}(this),0)});c(c$,"run",function(){null!=this.target&&this.target.run()});c(c$,"setPriority",function(a){if(10<a||1>a)throw new IllegalArgumentException;this.priority=a},"~N");c(c$,"getPriority",function(){return this.priority});c(c$,"interrupt",function(){});c(c$,"setName",function(a){this.name=a},"~S");c(c$,"getName",function(){return String.valueOf(this.name)});
c(c$,"getThreadGroup",function(){return this.group});e(c$,"toString",function(){var a=this.getThreadGroup();return null!=a?"Thread["+this.getName()+","+this.getPriority()+","+a.getName()+"]":"Thread["+this.getName()+","+this.getPriority()+",]"});C(c$,"MIN_PRIORITY",1,"NORM_PRIORITY",5,"MAX_PRIORITY",10,"J2S_THREAD",null)}),r(null,"java.lang.ThreadGroup",["java.lang.NullPointerException","$.Thread"],function(){c$=k(function(){this.name=this.parent=null;this.maxPriority=0;n(this,arguments)},java.lang,
"ThreadGroup");p(c$,function(){this.name="system";this.maxPriority=10});p(c$,function(a){this.construct(Thread.currentThread().getThreadGroup(),a)},"~S");p(c$,function(a,b){if(null==a)throw new NullPointerException;this.name=b;this.parent=a;this.maxPriority=10},"ThreadGroup,~S");c(c$,"getName",function(){return this.name});c(c$,"getParent",function(){return this.parent});c(c$,"getMaxPriority",function(){return this.maxPriority})}),r(["java.io.FilterInputStream"],"java.io.BufferedInputStream",["java.io.IOException",
"java.lang.IndexOutOfBoundsException"],function(){c$=k(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;this.marklimit=0;n(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);c(c$,"getInIfOpen",function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");return a});c(c$,"getBufIfOpen",function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");return a});e(c$,"resetStream",function(){});p(c$,function(a){x(this,java.io.BufferedInputStream,
[a]);this.buf=H(8192,0)},"java.io.InputStream");c(c$,"fill",function(){var a=this.getBufIfOpen();if(0>this.markpos)this.pos=0;else if(this.pos>=a.length)if(0<this.markpos){var b=this.pos-this.markpos;System.arraycopy(a,this.markpos,a,0,b);this.pos=b;this.markpos=0}else a.length>=this.marklimit?(this.markpos=-1,this.pos=0):(b=2*this.pos,b>this.marklimit&&(b=this.marklimit),b=H(b,0),System.arraycopy(a,0,b,0,this.pos),a=this.buf=b);this.count=this.pos;a=this.getInIfOpen().read(a,this.pos,a.length-this.pos);
0<a&&(this.count=a+this.pos)});e(c$,"readByteAsInt",function(){return this.pos>=this.count&&(this.fill(),this.pos>=this.count)?-1:this.getBufIfOpen()[this.pos++]&255});c(c$,"read1",function(a,b,d){var g=this.count-this.pos;if(0>=g){if(d>=this.getBufIfOpen().length&&0>this.markpos)return this.getInIfOpen().read(a,b,d);this.fill();g=this.count-this.pos;if(0>=g)return-1}d=g<d?g:d;System.arraycopy(this.getBufIfOpen(),this.pos,a,b,d);this.pos+=d;return d},"~A,~N,~N");e(c$,"read",function(a,b,d){this.getBufIfOpen();
if(0>(b|d|b+d|a.length-(b+d)))throw new IndexOutOfBoundsException;if(0==d)return 0;for(var g=0;;){var c=this.read1(a,b+g,d-g);if(0>=c)return 0==g?c:g;g+=c;if(g>=d)return g;c=this.$in;if(null!=c&&0>=c.available())return g}},"~A,~N,~N");e(c$,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var b=this.count-this.pos;if(0>=b){if(0>this.markpos)return this.getInIfOpen().skip(a);this.fill();b=this.count-this.pos;if(0>=b)return 0}a=b<a?b:a;this.pos+=a;return a},"~N");e(c$,"available",function(){var a=
this.count-this.pos,b=this.getInIfOpen().available();return a>2147483647-b?2147483647:a+b});e(c$,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");e(c$,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});e(c$,"markSupported",function(){return!0});e(c$,"close",function(){var a=this.$in;this.$in=null;null!=a&&a.close()});C(c$,"DEFAULT_BUFFER_SIZE",8192)}),r(["java.io.Reader"],"java.io.BufferedReader",
["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","JU.SB"],function(){c$=k(function(){this.cb=this.$in=null;this.nextChar=this.nChars=0;this.markedChar=-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;n(this,arguments)},java.io,"BufferedReader",java.io.Reader);c(c$,"setSize",function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=S(a,"\x00");this.nextChar=this.nChars=0},"~N");p(c$,function(a){x(this,java.io.BufferedReader,
[a]);this.$in=a;this.setSize(8192)},"java.io.Reader");c(c$,"ensureOpen",function(){if(null==this.$in)throw new java.io.IOException("Stream closed");});c(c$,"fill",function(){var a;if(-1>=this.markedChar)a=0;else{var b=this.nextChar-this.markedChar;b>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,this.markedChar,this.cb,0,b):(a=S(this.readAheadLimit,"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,b),this.cb=a),this.markedChar=
0,this.nextChar=this.nChars=a=b)}do b=this.$in.read(this.cb,a,this.cb.length-a);while(0==b);0<b&&(this.nChars=a+b,this.nextChar=a)});c(c$,"read1",function(a,b,d){if(this.nextChar>=this.nChars){if(d>=this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,b,d);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;d=Math.min(d,this.nChars-this.nextChar);
System.arraycopy(this.cb,this.nextChar,a,b,d);this.nextChar+=d;return d},"~A,~N,~N");c(c$,"read",function(a,b,d){this.ensureOpen();if(0>b||b>a.length||0>d||b+d>a.length||0>b+d)throw new IndexOutOfBoundsException;if(0==d)return 0;var g=this.read1(a,b,d);if(0>=g)return g;for(;g<d&&this.$in.ready();){var c=this.read1(a,b+g,d-g);if(0>=c)break;g+=c}return g},"~A,~N,~N");c(c$,"readLine1",function(a){var b=null,d;this.ensureOpen();for(var g=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=
this.nChars)return null!=b&&0<b.length()?b.toString():null;var c=!1;a=String.fromCharCode(0);var h;g&&"\n"==this.cb[this.nextChar]&&this.nextChar++;g=this.skipLF=!1;h=this.nextChar;a:for(;h<this.nChars;h++)if(a=this.cb[h],"\n"==a||"\r"==a){c=!0;break a}d=this.nextChar;this.nextChar=h;if(c)return null==b?b=String.instantialize(this.cb,d,h-d):(b.appendCB(this.cb,d,h-d),b=b.toString()),this.nextChar++,"\r"==a&&(this.skipLF=!0),b;null==b&&(b=JU.SB.newN(80));b.appendCB(this.cb,d,h-d)}},"~B");c(c$,"readLine",
function(){return this.readLine1(!1)});e(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");this.ensureOpen();for(var b=a;0<b;){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 d=this.nChars-this.nextChar;if(b<=d){this.nextChar+=b;b=0;break}b-=d;this.nextChar=this.nChars}return a-b},"~N");c(c$,"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()});e(c$,"markSupported",function(){return!0});e(c$,"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");e(c$,"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(c$,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in=null)});C(c$,"INVALIDATED",-2,"UNMARKED",-1,"DEFAULT_CHAR_BUFFER_SIZE",8192,"DEFAULT_EXPECTED_LINE_LENGTH",80)}),r(["java.io.Writer"],"java.io.BufferedWriter",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringIndexOutOfBoundsException"],function(){c$=k(function(){this.buf=
this.out=null;this.pos=0;this.lineSeparator="\r\n";n(this,arguments)},java.io,"BufferedWriter",java.io.Writer);p(c$,function(a){x(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=D(8192,"\x00")},"java.io.Writer");p(c$,function(a,b){x(this,java.io.BufferedWriter,[a]);if(0<b)this.out=a,this.buf=D(b,"\x00");else throw new IllegalArgumentException("K0058");},"java.io.Writer,~N");c(c$,"close",function(){this.isOpen()&&(this.flush(),this.out.close(),this.out=this.buf=null)});c(c$,"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(c$,"isOpen",($fz=function(){return null!=this.out},$fz.isPrivate=!0,$fz));c(c$,"newLine",function(){this.write("\r\n",0,2)});c(c$,"write",function(a,b,d){if(!this.isOpen())throw new java.io.IOException("K005d");if(0>b||b>a.length-d||0>d)throw new IndexOutOfBoundsException;if(0==this.pos&&d>=this.buf.length)this.out.write(a,b,d);else{var g=this.buf.length-this.pos;d<g&&(g=d);0<
g&&(System.arraycopy(a,b,this.buf,this.pos,g),this.pos+=g);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,d>g&&(b+=g,g=d-g,g>=this.buf.length?this.out.write(a,b,g):(System.arraycopy(a,b,this.buf,this.pos,g),this.pos+=g)))}},"~A,~N,~N");c(c$,"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(c$,"write",
function(a,b,d){if(!this.isOpen())throw new java.io.IOException("K005d");if(!(0>=d)){if(b>a.length-d||0>b)throw new StringIndexOutOfBoundsException;if(0==this.pos&&d>=this.buf.length){var g=D(d,"\x00");a.getChars(b,b+d,g,0);this.out.write(g,0,d)}else{var c=this.buf.length-this.pos;d<c&&(c=d);0<c&&(a.getChars(b,b+c,this.buf,this.pos),this.pos+=c);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,d>c&&(b+=c,c=d-c,c>=this.buf.length?(g=D(d,"\x00"),a.getChars(b,b+c,g,0),
this.out.write(g,0,c)):(a.getChars(b,b+c,this.buf,this.pos),this.pos+=c)))}}},"~S,~N,~N")}),r(["java.io.InputStream"],"java.io.ByteArrayInputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=k(function(){this.buf=null;this.count=this.$mark=this.pos=0;n(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);p(c$,function(a){x(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},"~A");e(c$,"readByteAsInt",function(){return this.pos<
this.count?this.buf[this.pos++]&255:-1});e(c$,"read",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||0>d||d>a.length-b)throw new IndexOutOfBoundsException;if(this.pos>=this.count)return-1;var g=this.count-this.pos;d>g&&(d=g);if(0>=d)return 0;System.arraycopy(this.buf,this.pos,a,b,d);this.pos+=d;return d},"~A,~N,~N");e(c$,"skip",function(a){var b=this.count-this.pos;a<b&&(b=0>a?0:a);this.pos+=b;return b},"~N");e(c$,"available",function(){return this.count-this.pos});e(c$,"markSupported",
function(){return!0});e(c$,"mark",function(){this.$mark=this.pos},"~N");e(c$,"resetStream",function(){});e(c$,"reset",function(){this.pos=this.$mark});e(c$,"close",function(){})}),r(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.OutOfMemoryError"],function(){c$=k(function(){this.buf=null;this.count=0;n(this,arguments)},java.io,"ByteArrayOutputStream",java.io.OutputStream);p(c$,function(){this.construct(32)});p(c$,function(a){x(this,
java.io.ByteArrayOutputStream,[]);if(0>a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=H(a,0)},"~N");c(c$,"ensureCapacity",function(a){0<a-this.buf.length&&this.grow(a)},"~N");c(c$,"grow",function(a){var b=this.buf.length<<1;0>b-a&&(b=a);if(0>b){if(0>a)throw new OutOfMemoryError;b=a}this.buf=java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,b)},"~N");c$.arrayCopyByte=c(c$,"arrayCopyByte",function(a,b){var d=H(b,0);System.arraycopy(a,0,d,0,a.length<b?a.length:b);return d},
"~A,~N");e(c$,"writeByteAsInt",function(a){this.ensureCapacity(this.count+1);this.buf[this.count]=a;this.count+=1},"~N");c(c$,"write",function(a,b,d){if(0>b||b>a.length||0>d||0<b+d-a.length)throw new IndexOutOfBoundsException;this.ensureCapacity(this.count+d);System.arraycopy(a,b,this.buf,this.count,d);this.count+=d},"~A,~N,~N");c(c$,"writeTo",function(a){a.write(this.buf,0,this.count)},"java.io.OutputStream");c(c$,"reset",function(){this.count=0});c(c$,"toByteArray",function(){return this.count==
this.buf.length?this.buf:java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,this.count)});c(c$,"size",function(){return this.count});e(c$,"toString",function(){return String.instantialize(this.buf,0,this.count)});e(c$,"close",function(){})}),r(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){c$=k(function(){this.$in=null;n(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);p(c$,function(a){x(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");
c(c$,"readByteAsInt",function(){return this.$in.readByteAsInt()});c(c$,"read",function(a,b,d){return this.$in.read(a,b,d)},"~A,~N,~N");c(c$,"skip",function(a){return this.$in.skip(a)},"~N");c(c$,"available",function(){return this.$in.available()});c(c$,"close",function(){this.$in.close()});c(c$,"mark",function(a){this.$in.mark(a)},"~N");c(c$,"reset",function(){this.$in.reset()});c(c$,"markSupported",function(){return this.$in.markSupported()})}),r(null,"java.io.InputStream",["java.io.IOException",
"java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=t(java.io,"InputStream");c(c$,"read",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||0>d||d>a.length-b)throw new IndexOutOfBoundsException;if(0==d)return 0;var g=this.readByteAsInt();if(-1==g)return-1;a[b]=g;var c=1;try{for(;c<d;c++){g=this.readByteAsInt();if(-1==g)break;a[b+c]=g}}catch(h){if(!y(h,java.io.IOException))throw h;}return c},"~A,~N,~N");c(c$,"skip",function(a){var b=a,d;null==java.io.InputStream.skipBuffer&&
(java.io.InputStream.skipBuffer=H(2048,0));var g=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<b;){d=this.read(g,0,Math.min(2048,b));if(0>d)break;b-=d}return a-b},"~N");c(c$,"available",function(){return 0});c(c$,"close",function(){});c(c$,"mark",function(){},"~N");c(c$,"reset",function(){throw new java.io.IOException("mark/reset not supported");});c(c$,"markSupported",function(){return!1});c(c$,"resetStream",function(){});C(c$,"SKIP_BUFFER_SIZE",2048,"skipBuffer",null)}),r(["java.io.Reader"],
"java.io.InputStreamReader",["java.lang.NullPointerException"],function(){c$=k(function(){this.$in=null;this.isOpen=!0;this.charsetName=null;this.isUTF8=!1;this.bytearr=null;this.pos=0;n(this,arguments)},java.io,"InputStreamReader",java.io.Reader);p(c$,function(a,b){x(this,java.io.InputStreamReader,[a]);this.$in=a;this.charsetName=b;if(!(this.isUTF8="UTF-8".equals(b))&&!"ISO-8859-1".equals(b))throw new NullPointerException("charsetName");},"java.io.InputStream,~S");c(c$,"getEncoding",function(){return this.charsetName});
e(c$,"read",function(a,b,d){if(null==this.bytearr||this.bytearr.length<d)this.bytearr=H(d,0);var g,c,h=0,e=b,j=this.$in.read(this.bytearr,this.pos,d-this.pos),l=this.$in.available();if(0>j)return-1;for(var u=j;h<u;){d=this.bytearr[h]&255;if(this.isUTF8)switch(d>>4){case 12:case 13:if(h+1>=j){if(1<=l){u=h;continue}}else if(128==((g=this.bytearr[h+1])&192)){a[e++]=String.fromCharCode((d&31)<<6|g&63);h+=2;continue}this.isUTF8=!1;break;case 14:if(h+2>=j){if(2<=l){u=h;continue}}else if(128==((g=this.bytearr[h+
1])&192)&&128==((c=this.bytearr[h+2])&192)){a[e++]=String.fromCharCode((d&15)<<12|(g&63)<<6|c&63);h+=3;continue}this.isUTF8=!1}h++;a[e++]=String.fromCharCode(d)}this.pos=j-h;for(a=0;a<this.pos;a++)this.bytearr[a]=this.bytearr[h++];return e-b},"~A,~N,~N");e(c$,"ready",function(){return this.isOpen});e(c$,"close",function(){this.$in.close();this.isOpen=!1})}),r(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=t(java.io,
"OutputStream",null,[java.io.Closeable,java.io.Flushable]);c(c$,"write",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||b>a.length||0>d||b+d>a.length||0>b+d)throw new IndexOutOfBoundsException;if(0!=d)for(var g=0;g<d;g++)this.writeByteAsInt(a[b+g])},"~A,~N,~N");e(c$,"flush",function(){});e(c$,"close",function(){})}),r(["java.io.Closeable"],"java.io.Reader",["java.io.IOException","java.lang.IllegalArgumentException","$.NullPointerException"],function(){c$=k(function(){this.skipBuffer=
this.lock=null;n(this,arguments)},java.io,"Reader",null,java.io.Closeable);p(c$,function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");c(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");var b=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.length<b)this.skipBuffer=S(b,"\x00");for(var d=a;0<d;){var g=this.read(this.skipBuffer,0,Math.min(d,b));if(-1==g)break;d-=g}return a-d},"~N");c(c$,"ready",function(){return!1});c(c$,"markSupported",
function(){return!1});c(c$,"mark",function(){throw new java.io.IOException("mark() not supported");},"~N");c(c$,"reset",function(){throw new java.io.IOException("reset() not supported");});C(c$,"MAX_SKIP_BUFFE_SIZE",8192)}),r(["java.io.Reader"],"java.io.StringReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException"],function(){c$=k(function(){this.str=null;this.$mark=this.next=this.length=0;n(this,arguments)},java.io,"StringReader",java.io.Reader);p(c$,function(a){x(this,
java.io.StringReader,[a]);this.str=a;this.length=a.length},"~S");c(c$,"ensureOpen",function(){if(null==this.str)throw new java.io.IOException("Stream closed");});e(c$,"read",function(a,b,d){this.ensureOpen();if(0>b||b>a.length||0>d||b+d>a.length||0>b+d)throw new IndexOutOfBoundsException;if(0==d)return 0;if(this.next>=this.length)return-1;d=Math.min(this.length-this.next,d);this.str.getChars(this.next,this.next+d,a,b);this.next+=d;return d},"~A,~N,~N");e(c$,"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");e(c$,"ready",function(){this.ensureOpen();return!0});e(c$,"markSupported",function(){return!0});e(c$,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.$mark=this.next},"~N");e(c$,"reset",function(){this.ensureOpen();this.next=this.$mark});e(c$,"close",function(){this.str=null})}),r(["java.io.Closeable","$.Flushable","java.lang.Appendable"],
"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){c$=k(function(){this.lock=null;n(this,arguments)},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);p(c$,function(){this.lock=this});p(c$,function(a){if(null!=a)this.lock=a;else throw new NullPointerException;},"~O");c(c$,"write",function(a){this.write(a,0,a.length)},"~A");c(c$,"write",function(a){var b=D(1,"\x00");b[0]=String.fromCharCode(a);this.write(b)},"~N");c(c$,"write",function(a){var b=
D(a.length,"\x00");a.getChars(0,b.length,b,0);this.write(b)},"~S");c(c$,"write",function(a,b,d){if(0<=d){var g=D(d,"\x00");a.getChars(b,b+d,g,0);this.write(g)}else throw new StringIndexOutOfBoundsException;},"~S,~N,~N");c(c$,"append",function(a){this.write(a.charCodeAt(0));return this},"~N");c(c$,"append",function(a){null==a?this.write("null"):this.write(a.toString());return this},"CharSequence");c(c$,"append",function(a,b,d){null==a?this.write("null".substring(b,d)):this.write(a.subSequence(b,d).toString());
return this},"CharSequence,~N,~N");C(c$,"TOKEN_NULL","null")}),q("java.net"),r(["java.io.IOException"],"java.net.MalformedURLException",null,function(){c$=t(java.net,"MalformedURLException",java.io.IOException);p(c$,function(){x(this,java.net.MalformedURLException,[])})}),q("java.net"),r(["java.util.Hashtable"],"java.net.URL",["java.io.IOException","java.lang.Character","$.Error","java.net.MalformedURLException"],function(){c$=k(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;n(this,arguments)},java.net,"URL",null,java.io.Serializable);p(c$,function(a,b,d){var g,c,h,e=0,j=null,l=!1,u=!1;if(null!=d){var p=System.getSecurityManager();null!=p&&this.checkSpecifyHandler(p)}try{for(c=b.length;0<c&&" ">=b.charAt(c-1);)c--;for(;e<c&&" ">=b.charAt(e);)e++;b.regionMatches(!0,e,"url:",0,4)&&(e+=4);e<b.length&&"#"==b.charAt(e)&&(l=!0);for(g=e;!l&&g<c&&47!=(h=b.charCodeAt(g));g++)if(58==h){var n=b.substring(e,
g).toLowerCase();this.isValidProtocol(n)&&(j=n,e=g+1);break}this.protocol=j;if(null!=a&&(null==j||j.equalsIgnoreCase(a.protocol)))null==d&&(d=a.handler),null!=a.path&&a.path.startsWith("/")&&(j=null),null==j&&(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,u=!0);if(null==this.protocol)throw new java.net.MalformedURLException("no protocol: "+b);if(null==d&&null==(d=java.net.URL.getURLStreamHandler(this.protocol)))throw new java.net.MalformedURLException("unknown protocol: "+
this.protocol);this.handler=d;g=b.indexOf("#",e);0<=g&&(this.ref=b.substring(g+1,c),c=g);u&&e==c&&(this.query=a.query,null==this.ref&&(this.ref=a.ref));d.parseURL(this,b,e,c)}catch(k){if(y(k,java.net.MalformedURLException))throw k;if(y(k,Exception))throw a=k,b=new java.net.MalformedURLException(a.getMessage()),b.initCause(a),b;throw k;}},"java.net.URL,~S,java.net.URLStreamHandler");c(c$,"isValidProtocol",function(a){var b=a.length;if(1>b)return!1;var d=a.charAt(0);if(!Character.isLetter(d))return!1;
for(var g=1;g<b;g++)if(d=a.charAt(g),!Character.isLetterOrDigit(d)&&"."!=d&&"+"!=d&&"-"!=d)return!1;return!0},"~S");c(c$,"checkSpecifyHandler",function(){},"SecurityManager");c(c$,"set5",function(a,b,d,g,c){this.protocol=a;this.host=b;this.authority=-1==d?b:b+":"+d;this.port=d;this.file=g;this.ref=c;this.$hashCode=-1;a=g.lastIndexOf("?");-1!=a?(this.query=g.substring(a+1),this.path=g.substring(0,a)):this.path=g},"~S,~S,~N,~S,~S");c(c$,"set",function(a,b,d,g,c,h,e,j){this.protocol=a;this.host=b;this.port=
d;this.file=null==e?h:h+"?"+e;this.userInfo=c;this.path=h;this.ref=j;this.$hashCode=-1;this.query=e;this.authority=g},"~S,~S,~N,~S,~S,~S,~S,~S");c(c$,"getQuery",function(){return this.query});c(c$,"getPath",function(){return this.path});c(c$,"getUserInfo",function(){return this.userInfo});c(c$,"getAuthority",function(){return this.authority});c(c$,"getPort",function(){return this.port});c(c$,"getDefaultPort",function(){return this.handler.getDefaultPort()});c(c$,"getProtocol",function(){return this.protocol});
c(c$,"getHost",function(){return this.host});c(c$,"getFile",function(){return this.file});c(c$,"getRef",function(){return this.ref});e(c$,"equals",function(a){return!w(a,java.net.URL)?!1:this.handler.equals2(this,a)},"~O");e(c$,"hashCode",function(){return-1!=this.$hashCode?this.$hashCode:this.$hashCode=this.handler.hashCode(this)});c(c$,"sameFile",function(a){return this.handler.sameFile(this,a)},"java.net.URL");e(c$,"toString",function(){return this.toExternalForm()});c(c$,"toExternalForm",function(){return this.handler.toExternalForm(this)});
c(c$,"openConnection",function(){return this.handler.openConnection(this)});c(c$,"openStream",function(){return this.openConnection().getInputStream()});c(c$,"getContent",function(){return this.openConnection().getInputStream()});c$.setURLStreamHandlerFactory=c(c$,"setURLStreamHandlerFactory",function(a){if(null!=java.net.URL.factory)throw Error("factory already defined");var b=System.getSecurityManager();null!=b&&b.checkSetFactory();java.net.URL.handlers.clear();java.net.URL.factory=a},"java.net.URLStreamHandlerFactory");
c$.getURLStreamHandler=c(c$,"getURLStreamHandler",function(a){var b=java.net.URL.handlers.get(a);null==b&&null!=java.net.URL.factory&&(b=java.net.URL.factory.createURLStreamHandler(a));return b},"~S");C(c$,"factory",null);c$.handlers=c$.prototype.handlers=new java.util.Hashtable;c$.streamHandlerLock=c$.prototype.streamHandlerLock=new U._O}),q("java.net"),r(null,"java.net.URLConnection",["java.lang.IllegalStateException","$.NullPointerException","java.net.UnknownServiceException","JU.Lst"],function(){c$=
k(function(){this.url=null;this.doInput=!0;this.connected=this.doOutput=!1;this.requests=null;n(this,arguments)},java.net,"URLConnection");c(c$,"setDoInput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doInput=a},"~B");c(c$,"getDoInput",function(){return this.doInput});c(c$,"setDoOutput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doOutput=a},"~B");c(c$,"getDoOutput",function(){return this.doOutput});p(c$,function(a){this.url=
a},"java.net.URL");c(c$,"getURL",function(){return this.url});c(c$,"getInputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support input");});c(c$,"getOutputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support output");});c(c$,"setRequestProperty",function(a,b){if(this.connected)throw new IllegalStateException("Already connected");if(null==a)throw new NullPointerException("key is null");null==this.requests&&(this.requests=new JU.Lst);
for(var d=this.requests.size();0<=--d;)if(this.requests.get(d)[0].equals(a)){this.requests.get(d)[1]=b;return}this.requests.addLast([a,b])},"~S,~S")}),q("java.net"),c$=t(java.net,"URLEncoder"),c$.encode=c(c$,"encode",function(a){return encodeURIComponent(a)},"~S"),c$.encode=c(c$,"encode",function(a){return encodeURIComponent(a)},"~S,~S"),C(c$,"digits","0123456789ABCDEF"),q("java.net"),r(null,"java.net.URLStreamHandler",["java.lang.IllegalArgumentException","$.SecurityException","$.UnsupportedOperationException"],
function(){c$=t(java.net,"URLStreamHandler");c(c$,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");},"java.net.URL,java.net.Proxy");c(c$,"parseURL",function(a,b,d,g){var c=a.getProtocol(),h=a.getAuthority(),e=a.getUserInfo(),j=a.getHost(),l=a.getPort(),u=a.getPath(),p=a.getQuery(),n=a.getRef(),k=!1,s=!1;if(d<g){var q=b.indexOf("?"),s=q==d;-1!=q&&q<g&&(p=b.substring(q+1,g),g>q&&(g=q),b=b.substring(0,q))}var r=0;if(!(d<=g-4&&"/"==b.charAt(d)&&"/"==
b.charAt(d+1)&&"/"==b.charAt(d+2)&&"/"==b.charAt(d+3))&&d<=g-2&&"/"==b.charAt(d)&&"/"==b.charAt(d+1)){d+=2;r=b.indexOf("/",d);0>r&&(r=b.indexOf("?",d),0>r&&(r=g));j=h=b.substring(d,r);q=h.indexOf("@");-1!=q?(e=h.substring(0,q),j=h.substring(q+1)):e=null;if(null!=j){if(0<j.length&&"["==j.charAt(0))throw new IllegalArgumentException("Invalid host: "+j);q=j.indexOf(":");l=-1;0<=q&&(j.length>q+1&&(l=Integer.parseInt(j.substring(q+1))),j=j.substring(0,q))}else j="";if(-1>l)throw new IllegalArgumentException("Invalid port number :"+
l);d=r;0<h.length&&(u="")}null==j&&(j="");d<g?"/"==b.charAt(d)?u=b.substring(d,g):null!=u&&0<u.length?(k=!0,q=u.lastIndexOf("/"),s="",-1==q&&null!=h&&(s="/"),u=u.substring(0,q+1)+s+b.substring(d,g)):u=(null!=h?"/":"")+b.substring(d,g):s&&null!=u&&(q=u.lastIndexOf("/"),0>q&&(q=0),u=u.substring(0,q)+"/");null==u&&(u="");if(k){for(;0<=(r=u.indexOf("/./"));)u=u.substring(0,r)+u.substring(r+2);for(r=0;0<=(r=u.indexOf("/../",r));)0<r&&0<=(g=u.lastIndexOf("/",r-1))&&0!=u.indexOf("/../",g)?(u=u.substring(0,
g)+u.substring(r+3),r=0):r+=3;for(;u.endsWith("/..");)if(r=u.indexOf("/.."),0<=(g=u.lastIndexOf("/",r-1)))u=u.substring(0,g+1);else break;u.startsWith("./")&&2<u.length&&(u=u.substring(2));u.endsWith("/.")&&(u=u.substring(0,u.length-1))}this.setURL(a,c,j,l,h,e,u,p,n)},"java.net.URL,~S,~N,~N");c(c$,"getDefaultPort",function(){return-1});c(c$,"equals2",function(a,b){var d=a.getRef(),g=b.getRef();return(d===g||null!=d&&d.equals(g))&&this.sameFile(a,b)},"java.net.URL,java.net.URL");c(c$,"hashCode",function(a){var b=
0,d=a.getProtocol();null!=d&&(b+=d.hashCode());b+=a.toString().hashCode();d=a.getFile();null!=d&&(b+=d.hashCode());b=-1==a.getPort()?b+this.getDefaultPort():b+a.getPort();a=a.getRef();null!=a&&(b+=a.hashCode());return b},"java.net.URL");c(c$,"sameFile",function(a,b){if(!(a.getProtocol()===b.getProtocol()||null!=a.getProtocol()&&a.getProtocol().equalsIgnoreCase(b.getProtocol()))||!(a.getFile()===b.getFile()||null!=a.getFile()&&a.getFile().equals(b.getFile())))return!1;var d,g;d=-1!=a.getPort()?a.getPort():
a.handler.getDefaultPort();g=-1!=b.getPort()?b.getPort():b.handler.getDefaultPort();return d!=g||!this.hostsEqual(a,b)?!1:!0},"java.net.URL,java.net.URL");c(c$,"hostsEqual",function(a,b){return null!=a.getHost()&&null!=b.getHost()?a.getHost().equalsIgnoreCase(b.getHost()):null==a.getHost()&&null==b.getHost()},"java.net.URL,java.net.URL");c(c$,"toExternalForm",function(){return""},"java.net.URL");c(c$,"setURL",function(a,b,d,g,c,h,e,j,l){if(this!==a.handler)throw new SecurityException("handler for url different from this handler");
a.set(a.getProtocol(),d,g,c,h,e,j,l)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");c(c$,"setURLDeprecated",function(a,b,d,g,c,h){var e=null,j=null;if(null!=d&&0!=d.length){var e=-1==g?d:d+":"+g,l=d.lastIndexOf("@");-1!=l&&(j=d.substring(0,l),d=d.substring(l+1))}var u=null,l=null;null!=c&&(u=c.lastIndexOf("?"),-1!=u?(l=c.substring(u+1),u=c.substring(0,u)):u=c);this.setURL(a,b,d,g,e,j,u,l,h)},"java.net.URL,~S,~S,~N,~S,~S")}),q("java.net"),B(java.net,"URLStreamHandlerFactory"),q("java.text"),c$=k(function(){this.pattern=
null;n(this,arguments)},java.text,"MessageFormat"),p(c$,function(a){this.pattern=a},"~S"),p(c$,function(a){this.pattern=a},"~S,java.util.Locale"),c$.format=c(c$,"format",function(a,b){return a.replace(/\{(\d+)\}/g,function(a,g){var c=parseInt(g);return null==b?null:b[c]})},"~S,~A"),c(c$,"format",function(a){return java.text.MessageFormat.format(this.pattern,[a])},"~O"),r(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],
function(){c$=t(java.util,"AbstractCollection",null,java.util.Collection);p(c$,function(){});e(c$,"add",function(){throw new UnsupportedOperationException;},"~O");e(c$,"addAll",function(a){var b=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(b=!0);return b},"java.util.Collection");e(c$,"clear",function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});e(c$,"contains",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return!0}else for(;b.hasNext();)if(null==
b.next())return!0;return!1},"~O");e(c$,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},"java.util.Collection");e(c$,"isEmpty",function(){return 0==this.size()});e(c$,"remove",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.remove(),!0}else for(;b.hasNext();)if(null==b.next())return b.remove(),!0;return!1},"~O");e(c$,"removeAll",function(a){for(var b=!1,d=this.iterator();d.hasNext();)a.contains(d.next())&&
(d.remove(),b=!0);return b},"java.util.Collection");e(c$,"retainAll",function(a){for(var b=!1,d=this.iterator();d.hasNext();)a.contains(d.next())||(d.remove(),b=!0);return b},"java.util.Collection");c(c$,"toArray",function(){for(var a=this.size(),b=0,d=this.iterator(),g=Array(a);b<a;)g[b++]=d.next();return g});c(c$,"toArray",function(a){var b=this.size(),d=0;b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(var g,b=this.iterator();b.hasNext()&&((g=b.next())||
1);)a[d++]=g;d<a.length&&(a[d]=null);return a},"~A");e(c$,"toString",function(){if(this.isEmpty())return"[]";var a=new StringBuilder(16*this.size());a.append("[");for(var b=this.iterator();b.hasNext();){var d=b.next();d!==this?a.append(d):a.append("(this Collection)");b.hasNext()&&a.append(", ")}a.append("]");return a.toString()})}),r("java.util.AbstractCollection $.Iterator $.List $.ListIterator $.RandomAccess $.NoSuchElementException".split(" "),"java.util.AbstractList",["java.lang.IllegalArgumentException",
"$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){c$=k(function(){this.modCount=0;n(this,arguments)},java.util,"AbstractList",java.util.AbstractCollection,java.util.List);c(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(c$,"add",function(a){this.add(this.size(),a);return!0},"~O");c(c$,"addAll",function(a,b){for(var d=b.iterator();d.hasNext();)this.add(a++,d.next());return!b.isEmpty()},
"~N,java.util.Collection");e(c$,"clear",function(){this.removeRange(0,this.size())});e(c$,"equals",function(a){if(this===a)return!0;if(w(a,java.util.List)){if(a.size()!=this.size())return!1;var b=this.iterator();for(a=a.iterator();b.hasNext();){var d=b.next(),g=a.next();if(!(null==d?null==g:d.equals(g)))return!1}return!0}return!1},"~O");e(c$,"hashCode",function(){for(var a=1,b=this.iterator();b.hasNext();)var d=b.next(),a=31*a+(null==d?0:d.hashCode());return a});e(c$,"indexOf",function(a){var b=this.listIterator();
if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.previousIndex()}else for(;b.hasNext();)if(null==b.next())return b.previousIndex();return-1},"~O");e(c$,"iterator",function(){return new java.util.AbstractListSimpleListIterator(this)});e(c$,"lastIndexOf",function(a){var b=this.listIterator(this.size());if(null!=a)for(;b.hasPrevious();){if(a.equals(b.previous()))return b.nextIndex()}else for(;b.hasPrevious();)if(null==b.previous())return b.nextIndex();return-1},"~O");c(c$,"listIterator",
function(a){a||(a=0);return new java.util.AbstractListFullListIterator(this,a)},"~N");c(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");c(c$,"removeRange",function(a,b){for(var d=this.listIterator(a),g=a;g<b;g++)d.next(),d.remove()},"~N,~N");e(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");e(c$,"subList",function(a,b){if(0<=a&&b<=this.size()){if(a<=b)return w(this,java.util.RandomAccess)?new java.util.AbstractList.SubAbstractListRandomAccess(this,a,b):
new java.util.AbstractList.SubAbstractList(this,a,b);throw new IllegalArgumentException;}throw new IndexOutOfBoundsException;},"~N,~N");A(self.c$);c$=k(function(){this.pos=-1;this.expectedModCount=0;this.lastPosition=-1;n(this,arguments)},java.util,"AbstractListSimpleListIterator",null,java.util.Iterator);p(c$,function(a){this._list=a;this.expectedModCount=a.modCount},"java.util.AbstractList");e(c$,"hasNext",function(){return this.pos+1<this._list.size()});e(c$,"next",function(){if(this.expectedModCount==
this._list.modCount)try{var a=this._list.get(this.pos+1);this.lastPosition=++this.pos;return a}catch(b){if(w(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}throw new java.util.ConcurrentModificationException;});e(c$,"remove",function(){if(this.expectedModCount==this._list.modCount){try{this._list.remove(this.lastPosition)}catch(a){if(w(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;});c$=z();A(self.c$);c$=k(function(){n(this,arguments)},java.util,"AbstractListFullListIterator",java.util.AbstractListSimpleListIterator,java.util.ListIterator);p(c$,function(a,b){x(this,java.util.AbstractListFullListIterator,[a]);if(0<=b&&b<=this._list.size())this.pos=b-1;else throw new IndexOutOfBoundsException;},"java.util.AbstractList,~N");e(c$,"add",function(a){if(this.expectedModCount==
this._list.modCount){try{this._list.add(this.pos+1,a)}catch(b){if(w(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}this.pos++;this.lastPosition=-1;this._list.modCount!=this.expectedModCount&&this.expectedModCount++}else throw new java.util.ConcurrentModificationException;},"~O");e(c$,"hasPrevious",function(){return 0<=this.pos});e(c$,"nextIndex",function(){return this.pos+1});e(c$,"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(b){if(w(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}throw new java.util.ConcurrentModificationException;});e(c$,"previousIndex",function(){return this.pos});e(c$,"set",function(a){if(this.expectedModCount==this._list.modCount)try{this._list.set(this.lastPosition,a)}catch(b){if(w(b,IndexOutOfBoundsException))throw new IllegalStateException;throw b;}else throw new java.util.ConcurrentModificationException;},"~O");
c$=z();A(self.c$);c$=t(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);c$=z();A(self.c$);c$=k(function(){this.fullList=null;this.$size=this.offset=0;n(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);p(c$,function(a,b,d){x(this,java.util.AbstractList.SubAbstractList);this.fullList=a;this.modCount=this.fullList.modCount;this.offset=b;this.$size=d-b},"java.util.AbstractList,~N,~N");c(c$,"add",function(a,
b){if(this.modCount==this.fullList.modCount)if(0<=a&&a<=this.$size)this.fullList.add(a+this.offset,b),this.$size++,this.modCount=this.fullList.modCount;else throw new IndexOutOfBoundsException;else throw new java.util.ConcurrentModificationException;},"~N,~O");c(c$,"addAll",function(a,b){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size){var d=this.fullList.addAll(a+this.offset,b);d&&(this.$size+=b.size(),this.modCount=this.fullList.modCount);return d}throw new IndexOutOfBoundsException;
}throw new java.util.ConcurrentModificationException;},"~N,java.util.Collection");c(c$,"addAll",function(a){if(this.modCount==this.fullList.modCount){var b=this.fullList.addAll(this.offset+this.$size,a);b&&(this.$size+=a.size(),this.modCount=this.fullList.modCount);return b}throw new java.util.ConcurrentModificationException;},"java.util.Collection");c(c$,"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");e(c$,"iterator",function(){return this.listIterator(0)});c(c$,"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(c$,"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(c$,"removeRange",function(a,b){if(a!=b)if(this.modCount==this.fullList.modCount)this.fullList.removeRange(a+this.offset,b+this.offset),this.$size-=b-a,this.modCount=this.fullList.modCount;else throw new java.util.ConcurrentModificationException;},"~N,~N");c(c$,
"set",function(a,b){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.set(a+this.offset,b);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,~O");e(c$,"size",function(){return this.$size});c(c$,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},"~B");A(self.c$);c$=k(function(){this.iterator=this.subList=null;this.end=this.start=0;n(this,arguments)},java.util.AbstractList.SubAbstractList,
"SubAbstractListIterator",null,java.util.ListIterator);p(c$,function(a,b,d,g){this.iterator=a;this.subList=b;this.start=d;this.end=this.start+g},"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");c(c$,"add",function(a){this.iterator.add(a);this.subList.sizeChanged(!0);this.end++},"~O");e(c$,"hasNext",function(){return this.iterator.nextIndex()<this.end});e(c$,"hasPrevious",function(){return this.iterator.previousIndex()>=this.start});c(c$,"next",function(){if(this.iterator.nextIndex()<
this.end)return this.iterator.next();throw new java.util.NoSuchElementException;});c(c$,"nextIndex",function(){return this.iterator.nextIndex()-this.start});c(c$,"previous",function(){if(this.iterator.previousIndex()>=this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});c(c$,"previousIndex",function(){var a=this.iterator.previousIndex();return a>=this.start?a-this.start:-1});c(c$,"remove",function(){this.iterator.remove();this.subList.sizeChanged(!1);this.end--});
c(c$,"set",function(a){this.iterator.set(a)},"~O");c$=z();c$=z()}),r(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){c$=k(function(){this.valuesCollection=this.$keySet=null;n(this,arguments)},java.util,"AbstractMap",null,java.util.Map);p(c$,function(){});e(c$,"clear",function(){this.entrySet().clear()});e(c$,"containsKey",function(a){var b=this.entrySet().iterator();if(null!=
a)for(;b.hasNext();){if(a.equals(b.next().getKey()))return!0}else for(;b.hasNext();)if(null==b.next().getKey())return!0;return!1},"~O");e(c$,"containsValue",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next().getValue()))return!0}else for(;b.hasNext();)if(null==b.next().getValue())return!0;return!1},"~O");e(c$,"equals",function(a){if(this===a)return!0;if(w(a,java.util.Map)){if(this.size()!=a.size())return!1;a=a.entrySet();for(var b=this.entrySet().iterator();b.hasNext();)if(!a.contains(b.next()))return!1;
return!0}return!1},"~O");e(c$,"get",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){var d=b.next();if(a.equals(d.getKey()))return d.getValue()}else for(;b.hasNext();)if(d=b.next(),null==d.getKey())return d.getValue();return null},"~O");e(c$,"hashCode",function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)a+=b.next().hashCode();return a});e(c$,"isEmpty",function(){return 0==this.size()});e(c$,"keySet",function(){null==this.$keySet&&(this.$keySet=(K("java.util.AbstractMap$1")?
0:java.util.AbstractMap.$AbstractMap$1$(),I(java.util.AbstractMap$1,this,null)));return this.$keySet});e(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");e(c$,"putAll",function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())},"java.util.Map");e(c$,"remove",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){var d=b.next();if(a.equals(d.getKey()))return b.remove(),d.getValue()}else for(;b.hasNext();)if(d=
b.next(),null==d.getKey())return b.remove(),d.getValue();return null},"~O");e(c$,"size",function(){return this.entrySet().size()});e(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var b=this.entrySet().iterator();b.hasNext();){var d=b.next(),g=d.getKey();g!==this?a.append(g):a.append("(this Map)");a.append("=");d=d.getValue();d!==this?a.append(d):a.append("(this Map)");b.hasNext()&&a.append(", ")}a.append("}");return a.toString()});
e(c$,"values",function(){null==this.valuesCollection&&(this.valuesCollection=(K("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$(),I(java.util.AbstractMap$2,this,null)));return this.valuesCollection});c(c$,"clone",function(){var a=L(this,java.util.AbstractMap,"clone",[]);a.$keySet=null;a.valuesCollection=null;return a});c$.$AbstractMap$1$=function(){A(self.c$);c$=T(java.util,"AbstractMap$1",java.util.AbstractSet);e(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},
"~O");e(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});e(c$,"iterator",function(){return K("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$(),I(java.util.AbstractMap$1$1,this,null)});c$=z()};c$.$AbstractMap$1$1$=function(){A(self.c$);c$=k(function(){M(this,arguments);this.setIterator=null;n(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);F(c$,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});e(c$,
"hasNext",function(){return this.setIterator.hasNext()});e(c$,"next",function(){return this.setIterator.next().getKey()});e(c$,"remove",function(){this.setIterator.remove()});c$=z()};c$.$AbstractMap$2$=function(){A(self.c$);c$=T(java.util,"AbstractMap$2",java.util.AbstractCollection);e(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});e(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},"~O");e(c$,"iterator",function(){return K("java.util.AbstractMap$2$1")?
0:java.util.AbstractMap.$AbstractMap$2$1$(),I(java.util.AbstractMap$2$1,this,null)});c$=z()};c$.$AbstractMap$2$1$=function(){A(self.c$);c$=k(function(){M(this,arguments);this.setIterator=null;n(this,arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);F(c$,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});e(c$,"hasNext",function(){return this.setIterator.hasNext()});e(c$,"next",function(){return this.setIterator.next().getValue()});e(c$,"remove",function(){this.setIterator.remove()});
c$=z()}}),r(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){c$=t(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);e(c$,"equals",function(a){return this===a?!0:w(a,java.util.Set)?this.size()==a.size()&&this.containsAll(a):!1},"~O");e(c$,"hashCode",function(){for(var a=0,b=this.iterator();b.hasNext();)var d=b.next(),a=a+(null==d?0:d.hashCode());return a});e(c$,"removeAll",function(a){var b=!1;if(this.size()<=a.size())for(var d=this.iterator();d.hasNext();)a.contains(d.next())&&
(d.remove(),b=!0);else for(d=a.iterator();d.hasNext();)b=this.remove(d.next())||b;return b},"java.util.Collection")}),r(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){c$=k(function(){this.lastIndex=this.firstIndex=0;this.array=null;n(this,arguments)},java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);
N(c$,function(){this.setup(0)});c(c$,"setup",function(a){this.firstIndex=this.lastIndex=0;try{this.array=this.newElementArray(a)}catch(b){if(w(b,NegativeArraySizeException))throw new IllegalArgumentException;throw b;}},"~N");c(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");e(c$,"add",function(a,b){if(1==arguments.length)return this.add1(a);var d=this.size();if(0<a&&a<d){if(0==this.firstIndex&&this.lastIndex==this.array.length)this.growForInsert(a,1);else if(a<Math.floor(d/
2)&&0<this.firstIndex||this.lastIndex==this.array.length)System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,a);else{var g=a+this.firstIndex;System.arraycopy(this.array,g,this.array,g+1,d-a);this.lastIndex++}this.array[a+this.firstIndex]=b}else if(0==a)0==this.firstIndex&&this.growAtFront(1),this.array[--this.firstIndex]=b;else if(a==d)this.lastIndex==this.array.length&&this.growAtEnd(1),this.array[this.lastIndex++]=b;else throw new IndexOutOfBoundsException;this.modCount++},
"~N,~O");e(c$,"add1",function(a){this.lastIndex==this.array.length&&this.growAtEnd(1);this.array[this.lastIndex++]=a;this.modCount++;return!0},"~O");e(c$,"addAll",function(a){var b=a.size();if(0<b){this.lastIndex>this.array.length-b&&this.growAtEnd(b);a=a.iterator();for(b=this.lastIndex+b;this.lastIndex<b;)this.array[this.lastIndex++]=a.next();this.modCount++;return!0}return!1},"java.util.Collection");e(c$,"clear",function(){this.firstIndex!=this.lastIndex&&(this.fill(this.firstIndex,this.lastIndex),
this.firstIndex=this.lastIndex=0,this.modCount++)});c(c$,"fill",function(a,b){for(var d=b;--d>=a;)this.array[d]=null},"~N,~N");c(c$,"clone",function(){try{var a=L(this,java.util.ArrayList,"clone",[]);a.array=this.array.clone();return a}catch(b){if(w(b,CloneNotSupportedException))return null;throw b;}});e(c$,"contains",function(a){if(null!=a)for(var b=this.firstIndex;b<this.lastIndex;b++){if(a.equals(this.array[b]))return!0}else for(b=this.firstIndex;b<this.lastIndex;b++)if(null==this.array[b])return!0;
return!1},"~O");c(c$,"ensureCapacity",function(a){this.array.length<a&&(0<this.firstIndex?this.growAtFront(a-this.array.length):this.growAtEnd(a-this.array.length))},"~N");e(c$,"get",function(a){if(0<=a&&a<this.size())return this.array[this.firstIndex+a];throw new IndexOutOfBoundsException;},"~N");c(c$,"growAtEnd",($fz=function(a){var b=this.size();if(this.firstIndex>=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,0<b&&(System.arraycopy(this.array,this.firstIndex,this.array,
0,b),this.fill(a<this.firstIndex?this.firstIndex:a,this.array.length)),this.firstIndex=0,this.lastIndex=a;else{var d=Math.floor(b/2);a>d&&(d=a);12>d&&(d=12);a=this.newElementArray(b+d);0<b&&System.arraycopy(this.array,this.firstIndex,a,this.firstIndex,b);this.array=a}},$fz.isPrivate=!0,$fz),"~N");c(c$,"growAtFront",($fz=function(a){var b=this.size();if(this.array.length-this.lastIndex>=a)a=this.array.length-b,0<b&&(System.arraycopy(this.array,this.firstIndex,this.array,a,b),this.fill(this.firstIndex,
this.firstIndex+b>a?a:this.firstIndex+b)),this.firstIndex=a,this.lastIndex=this.array.length;else{var d=Math.floor(b/2);a>d&&(d=a);12>d&&(d=12);a=this.newElementArray(b+d);0<b&&System.arraycopy(this.array,this.firstIndex,a,a.length-b,b);this.firstIndex=a.length-b;this.lastIndex=a.length;this.array=a}},$fz.isPrivate=!0,$fz),"~N");c(c$,"growForInsert",($fz=function(a,b){var d=this.size(),g=Math.floor(d/2);b>g&&(g=b);12>g&&(g=12);var c=this.newElementArray(d+g);if(a<Math.floor(d/2)){var h=c.length-(d+
b);System.arraycopy(this.array,a,c,a+g,d-a);System.arraycopy(this.array,this.firstIndex,c,h,a);this.firstIndex=h;this.lastIndex=c.length}else System.arraycopy(this.array,this.firstIndex,c,0,a),System.arraycopy(this.array,a,c,a+b,d-a),this.firstIndex=0,this.lastIndex+=b;this.array=c},$fz.isPrivate=!0,$fz),"~N,~N");e(c$,"indexOf",function(a){if(null!=a)for(var b=this.firstIndex;b<this.lastIndex;b++){if(a.equals(this.array[b]))return b-this.firstIndex}else for(b=this.firstIndex;b<this.lastIndex;b++)if(null==
this.array[b])return b-this.firstIndex;return-1},"~O");e(c$,"isEmpty",function(){return this.lastIndex==this.firstIndex});e(c$,"lastIndexOf",function(a){if(null!=a)for(var b=this.lastIndex-1;b>=this.firstIndex;b--){if(a.equals(this.array[b]))return b-this.firstIndex}else for(b=this.lastIndex-1;b>=this.firstIndex;b--)if(null==this.array[b])return b-this.firstIndex;return-1},"~O");e(c$,"remove",function(a){var b,d=this.size();if(0<=a&&a<d)if(a==d-1)b=this.array[--this.lastIndex],this.array[this.lastIndex]=
null;else if(0==a)b=this.array[this.firstIndex],this.array[this.firstIndex++]=null;else{var g=this.firstIndex+a;b=this.array[g];a<Math.floor(d/2)?(System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,a),this.array[this.firstIndex++]=null):(System.arraycopy(this.array,g+1,this.array,g,d-a-1),this.array[--this.lastIndex]=null)}else throw new IndexOutOfBoundsException;this.modCount++;return b},"~N");c(c$,"removeObject",function(a){a=this.indexOf(a);return 0>a?null:this.remove(a)},
"~O");e(c$,"removeRange",function(a,b){if(0<=a&&a<=b&&b<=this.size()){if(a!=b){var d=this.size();b==d?(this.fill(this.firstIndex+a,this.lastIndex),this.lastIndex=this.firstIndex+a):0==a?(this.fill(this.firstIndex,this.firstIndex+b),this.firstIndex+=b):(System.arraycopy(this.array,this.firstIndex+b,this.array,this.firstIndex+a,d-b),d=this.lastIndex+a-b,this.fill(d,this.lastIndex),this.lastIndex=d);this.modCount++}}else throw new IndexOutOfBoundsException;},"~N,~N");e(c$,"set",function(a,b){if(0<=a&&
a<this.size()){var d=this.array[this.firstIndex+a];this.array[this.firstIndex+a]=b;return d}throw new IndexOutOfBoundsException;},"~N,~O");e(c$,"size",function(){return this.lastIndex-this.firstIndex});e(c$,"toArray",function(a){var b=this.size();if(!a||b>a.length)a=Array(b);System.arraycopy(this.array,this.firstIndex,a,0,b);b<a.length&&(a[b]=null);return a},"~O");c(c$,"trimToSize",function(){var a=this.size(),b=this.newElementArray(a);System.arraycopy(this.array,this.firstIndex,b,0,a);this.array=
b;this.firstIndex=0;this.lastIndex=this.array.length})}),r(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=t(java.util,"Arrays");c$.sort=e(c$,"sort",function(a,b,d,g){switch(arguments.length){case 1:for(var c=a.sort(function(a,b){return"string"==typeof a||a instanceof Comparable?a.compareTo(b):a-b}),h=0;h<a.length;h++)a[h]=c[h];break;case 2:c=a.sort(function(a,d){return null!=
b?b.compare(a,d):"string"==typeof a||a instanceof Comparable?a.compareTo(d):a-d});for(h=0;h<a.length;h++)a[h]=c[h];break;case 3:var e=b,j=d;this.rangeCheck(a.length,e,j);c=[];for(h=e;h<j;h++)c[h-e]=a[h];c=c.sort(function(a,b){return"string"==typeof a||a instanceof Comparable?a.compareTo(b):a-b});for(h=e;h<j;h++)a[h]=c[h-e];break;case 4:e=b;j=d;b=g;this.rangeCheck(a.length,e,j);c=[];for(h=e;h<j;h++)c[h-e]=a[h];c=c.sort(function(a,d){return null!=b?b.compare(a,d):"string"==typeof a||a instanceof Comparable?
a.compareTo(d):a-d});for(h=e;h<j;h++)a[h]=c[h-e]}});c$.rangeCheck=c(c$,"rangeCheck",($fz=function(a,b,d){if(b>d)throw new IllegalArgumentException("fromIndex("+b+") > toIndex("+d+")");if(0>b)throw new ArrayIndexOutOfBoundsException(b);if(d>a)throw new ArrayIndexOutOfBoundsException(d);},$fz.isPrivate=!0,$fz),"~N,~N,~N");c$.binarySearch=c(c$,"binarySearch",function(a,b){for(var d=0,g=a.length-1;d<=g;){var c=d+g>>1,h=a[c];if(h<b)d=c+1;else if(h>b)g=c-1;else return c}return-(d+1)},"~A,~N");c$.binarySearch=
c(c$,"binarySearch",function(a,b){for(var d=0,g=a.length-1;d<=g;){var c=d+g>>1,h=a[c].compareTo(b);if(0>h)d=c+1;else if(0<h)g=c-1;else return c}return-(d+1)},"~A,~O");c$.binarySearch=c(c$,"binarySearch",function(a,b,d){if(null==d)return java.util.Arrays.binarySearch(a,b);for(var g=0,c=a.length-1;g<=c;){var h=g+c>>1,e=d.compare(a[h],b);if(0>e)g=h+1;else if(0<e)c=h-1;else return h}return-(g+1)},"~A,~O,java.util.Comparator");c$.equals=c(c$,"equals",function(a,b){if(a===b)return!0;if(null==a||null==b)return!1;
var d=a.length;if(b.length!=d)return!1;for(var g=0;g<d;g++){var c=a[g],h=b[g];if(!(null==c?null==h:null==c.equals?c==h:c.equals(h)))return!1}return!0},"~A,~A");c$.fill=e(c$,"fill",function(a,b,d,g){2==arguments.length&&(g=b,b=0,d=a.length);java.util.Arrays.rangeCheck(a.length,b,d);for(var c=b;c<d;c++)a[c]=g});c$.asList=c(c$,"asList",function(a){return new java.util.Arrays.ArrayList(a)},"~A");A(self.c$);c$=k(function(){this.a=null;n(this,arguments)},java.util.Arrays,"ArrayList",java.util.AbstractList,
[java.util.RandomAccess,java.io.Serializable]);p(c$,function(a){x(this,java.util.Arrays.ArrayList,[]);if(null==a)throw new NullPointerException;this.a=a},"~A");e(c$,"size",function(){return this.a.length});c(c$,"toArray",function(){return this.a.clone()});e(c$,"get",function(a){return this.a[a]},"~N");e(c$,"set",function(a,b){var d=this.a[a];this.a[a]=b;return d},"~N,~O");e(c$,"indexOf",function(a){if(null==a)for(var b=0;b<this.a.length;b++){if(null==this.a[b])return b}else for(b=0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;
return-1},"~O");e(c$,"contains",function(a){return-1!=this.indexOf(a)},"~O");c$=z();C(c$,"INSERTIONSORT_THRESHOLD",7)}),r("java.util.AbstractList $.AbstractMap $.AbstractSet $.Collection $.Iterator $.List $.ListIterator $.Map $.RandomAccess $.Set $.SortedMap $.SortedSet java.lang.NullPointerException $.UnsupportedOperationException java.lang.reflect.Array".split(" "),"java.util.Collections","java.lang.ArrayIndexOutOfBoundsException $.ClassCastException $.IllegalArgumentException $.IndexOutOfBoundsException java.util.ArrayList $.Arrays $.Enumeration java.util.Map.Entry java.util.NoSuchElementException $.Random".split(" "),
function(){c$=t(java.util,"Collections");c$.binarySearch=c(c$,"binarySearch",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return-1;if(!w(a,java.util.RandomAccess)){for(var d=a.listIterator();d.hasNext();){var g;if(0>=(g=b.compareTo(d.next())))return 0==g?d.previousIndex():-d.previousIndex()-1}return-a.size()-1}var d=0,c=a.size(),h=c-1;for(g=-1;d<=h;)if(c=d+h>>1,0<(g=b.compareTo(a.get(c))))d=c+1;else{if(0==g)return c;h=c-1}return-c-(0>g?1:2)},"java.util.List,~O");c$.binarySearch=
c(c$,"binarySearch",function(a,b,d){if(null==d)return java.util.Collections.binarySearch(a,b);if(!w(a,java.util.RandomAccess)){for(var g=a.listIterator();g.hasNext();){var c;if(0>=(c=d.compare(b,g.next())))return 0==c?g.previousIndex():-g.previousIndex()-1}return-a.size()-1}var g=0,h=a.size(),e=h-1;for(c=-1;g<=e;)if(h=g+e>>1,0<(c=d.compare(b,a.get(h))))g=h+1;else{if(0==c)return h;e=h-1}return-h-(0>c?1:2)},"java.util.List,~O,java.util.Comparator");c$.copy=c(c$,"copy",function(a,b){if(a.size()<b.size())throw new ArrayIndexOutOfBoundsException;
for(var d=b.iterator(),g=a.listIterator();d.hasNext();){try{g.next()}catch(c){if(w(c,java.util.NoSuchElementException))throw new ArrayIndexOutOfBoundsException;throw c;}g.set(d.next())}},"java.util.List,java.util.List");c$.enumeration=c(c$,"enumeration",function(a){K("java.util.Collections$1")||java.util.Collections.$Collections$1$(a);return I(java.util.Collections$1,this,null)},"java.util.Collection");c$.fill=c(c$,"fill",function(a,b){for(var d=a.listIterator();d.hasNext();)d.next(),d.set(b)},"java.util.List,~O");
c$.max=c(c$,"max",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var d=a.next();0>b.compareTo(d)&&(b=d)}return b},"java.util.Collection");c$.max=c(c$,"max",function(a,b){for(var d=a.iterator(),g=d.next();d.hasNext();){var c=d.next();0>b.compare(g,c)&&(g=c)}return g},"java.util.Collection,java.util.Comparator");c$.min=c(c$,"min",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var d=a.next();0<b.compareTo(d)&&(b=d)}return b},"java.util.Collection");c$.min=c(c$,"min",function(a,
b){for(var d=a.iterator(),g=d.next();d.hasNext();){var c=d.next();0<b.compare(g,c)&&(g=c)}return g},"java.util.Collection,java.util.Comparator");c$.nCopies=c(c$,"nCopies",function(a,b){return new java.util.Collections.CopiesList(a,b)},"~N,~O");c$.reverse=c(c$,"reverse",function(a){var b=a.size(),d=a.listIterator();a=a.listIterator(b);for(var g=0;g<Math.floor(b/2);g++){var c=d.next(),h=a.previous();d.set(h);a.set(c)}},"java.util.List");c$.reverseOrder=c(c$,"reverseOrder",function(){return new java.util.Collections.ReverseComparator});
c$.reverseOrder=c(c$,"reverseOrder",function(a){return null==a?java.util.Collections.reverseOrder():new java.util.Collections.ReverseComparatorWithComparator(a)},"java.util.Comparator");c$.shuffle=c(c$,"shuffle",function(a){java.util.Collections.shuffle(a,new java.util.Random)},"java.util.List");c$.shuffle=c(c$,"shuffle",function(a,b){if(w(a,java.util.RandomAccess))for(g=a.size()-1;0<g;g--)c=b.nextInt()%(g+1),0>c&&(c=-c),a.set(c,a.set(g,a.get(c)));else{for(var d=a.toArray(),g=d.length-1;0<g;g--){var c=
b.nextInt()%(g+1);0>c&&(c=-c);var h=d[g];d[g]=d[c];d[c]=h}g=0;for(c=a.listIterator();c.hasNext();)c.next(),c.set(d[g++])}},"java.util.List,java.util.Random");c$.singleton=c(c$,"singleton",function(a){return new java.util.Collections.SingletonSet(a)},"~O");c$.singletonList=c(c$,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");c$.singletonMap=c(c$,"singletonMap",function(a,b){return new java.util.Collections.SingletonMap(a,b)},"~O,~O");c$.sort=c(c$,"sort",function(a){var b=
a.toArray();java.util.Arrays.sort(b);var d=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(b[d++])},"java.util.List");c$.sort=c(c$,"sort",function(a,b){var d=a.toArray(Array(a.size()));java.util.Arrays.sort(d,b);for(var g=0,c=a.listIterator();c.hasNext();)c.next(),c.set(d[g++])},"java.util.List,java.util.Comparator");c$.swap=c(c$,"swap",function(a,b,d){if(null==a)throw new NullPointerException;b!=d&&a.set(d,a.set(b,a.get(d)))},"java.util.List,~N,~N");c$.replaceAll=c(c$,"replaceAll",function(a,
b,d){for(var g,c=!1;-1<(g=a.indexOf(b));)c=!0,a.set(g,d);return c},"java.util.List,~O,~O");c$.rotate=c(c$,"rotate",function(a,b){var d=a.size();if(0!=d){var g;g=0<b?b%d:d- -1*(b%d);if(!(0==g||g==d))if(w(a,java.util.RandomAccess))for(var c=a.get(0),h=0,e=0,j=0;j<d;j++)h=(h+g)%d,c=a.set(h,c),h==e&&(h=++e,c=a.get(e));else c=(d-g)%d,g=a.subList(0,c),d=a.subList(c,d),java.util.Collections.reverse(g),java.util.Collections.reverse(d),java.util.Collections.reverse(a)}},"java.util.List,~N");c$.indexOfSubList=
c(c$,"indexOfSubList",function(a,b){var d=a.size(),g=b.size();if(g>d)return-1;if(0==g)return 0;var c=b.get(0),h=a.indexOf(c);if(-1==h)return-1;for(;h<d&&d-h>=g;){var e=a.listIterator(h);if(null==c?null==e.next():c.equals(e.next())){for(var j=b.listIterator(1),l=!1;j.hasNext();){var u=j.next();if(!e.hasNext())return-1;if(null==u?null!=e.next():!u.equals(e.next())){l=!0;break}}if(!l)return h}h++}return-1},"java.util.List,java.util.List");c$.lastIndexOfSubList=c(c$,"lastIndexOfSubList",function(a,b){var d=
b.size(),g=a.size();if(d>g)return-1;if(0==d)return g;for(var g=b.get(d-1),c=a.lastIndexOf(g);-1<c&&c+1>=d;){var h=a.listIterator(c+1);if(null==g?null==h.previous():g.equals(h.previous())){for(var e=b.listIterator(d-1),j=!1;e.hasPrevious();){var l=e.previous();if(!h.hasPrevious())return-1;if(null==l?null!=h.previous():!l.equals(h.previous())){j=!0;break}}if(!j)return h.nextIndex()}c--}return-1},"java.util.List,java.util.List");c$.list=c(c$,"list",function(a){for(var b=new java.util.ArrayList;a.hasMoreElements();)b.add(a.nextElement());
return b},"java.util.Enumeration");c$.synchronizedCollection=c(c$,"synchronizedCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");c$.synchronizedList=c(c$,"synchronizedList",function(a){if(null==a)throw new NullPointerException;return w(a,java.util.RandomAccess)?new java.util.Collections.SynchronizedRandomAccessList(a):new java.util.Collections.SynchronizedList(a)},"java.util.List");c$.synchronizedMap=
c(c$,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},"java.util.Map");c$.synchronizedSet=c(c$,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)},"java.util.Set");c$.synchronizedSortedMap=c(c$,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},"java.util.SortedMap");
c$.synchronizedSortedSet=c(c$,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},"java.util.SortedSet");c$.unmodifiableCollection=c(c$,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");c$.unmodifiableList=c(c$,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return w(a,java.util.RandomAccess)?
new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");c$.unmodifiableMap=c(c$,"unmodifiableMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map");c$.unmodifiableSet=c(c$,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");c$.unmodifiableSortedMap=c(c$,"unmodifiableSortedMap",
function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");c$.unmodifiableSortedSet=c(c$,"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)},"java.util.SortedSet");c$.frequency=c(c$,"frequency",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var d=0,g=a.iterator();g.hasNext();){var c=g.next();(null==b?
null==c:b.equals(c))&&d++}return d},"java.util.Collection,~O");c$.emptyList=c(c$,"emptyList",function(){return java.util.Collections.EMPTY_LIST});c$.emptySet=c(c$,"emptySet",function(){return java.util.Collections.EMPTY_SET});c$.emptyMap=c(c$,"emptyMap",function(){return java.util.Collections.EMPTY_MAP});c$.checkedCollection=c(c$,"checkedCollection",function(a,b){return new java.util.Collections.CheckedCollection(a,b)},"java.util.Collection,Class");c$.checkedMap=c(c$,"checkedMap",function(a,b,d){return new java.util.Collections.CheckedMap(a,
b,d)},"java.util.Map,Class,Class");c$.checkedList=c(c$,"checkedList",function(a,b){return w(a,java.util.RandomAccess)?new java.util.Collections.CheckedRandomAccessList(a,b):new java.util.Collections.CheckedList(a,b)},"java.util.List,Class");c$.checkedSet=c(c$,"checkedSet",function(a,b){return new java.util.Collections.CheckedSet(a,b)},"java.util.Set,Class");c$.checkedSortedMap=c(c$,"checkedSortedMap",function(a,b,d){return new java.util.Collections.CheckedSortedMap(a,b,d)},"java.util.SortedMap,Class,Class");
c$.checkedSortedSet=c(c$,"checkedSortedSet",function(a,b){return new java.util.Collections.CheckedSortedSet(a,b)},"java.util.SortedSet,Class");c$.addAll=c(c$,"addAll",function(a,b){for(var d=!1,g=0;g<b.length;g++)d=(new Boolean(d|a.add(b[g]))).valueOf();return d},"java.util.Collection,~A");c$.disjoint=c(c$,"disjoint",function(a,b){if(w(a,java.util.Set)&&!w(b,java.util.Set)||b.size()>a.size()){var d=a;a=b;b=d}for(d=a.iterator();d.hasNext();)if(b.contains(d.next()))return!1;return!0},"java.util.Collection,java.util.Collection");
c$.checkType=c(c$,"checkType",function(a,b){if(!b.isInstance(a))throw new ClassCastException("Attempt to insert "+a.getClass()+" element into collection with element type "+b);return a},"~O,Class");c$.$Collections$1$=function(a){A(self.c$);c$=k(function(){M(this,arguments);this.it=null;n(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);F(c$,function(){this.it=a.iterator()});c(c$,"hasMoreElements",function(){return this.it.hasNext()});c(c$,"nextElement",function(){return this.it.next()});
c$=z()};A(self.c$);c$=k(function(){this.n=0;this.element=null;n(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);p(c$,function(a,b){x(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=b},"~N,~O");e(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(c$,"size",function(){return this.n});e(c$,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;
},"~N");c$=z();A(self.c$);c$=t(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);e(c$,"contains",function(){return!1},"~O");e(c$,"size",function(){return 0});e(c$,"get",function(){throw new IndexOutOfBoundsException;},"~N");c$=z();A(self.c$);c$=t(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);e(c$,"contains",function(){return!1},"~O");e(c$,"size",function(){return 0});e(c$,"iterator",function(){return K("java.util.Collections$EmptySet$1")?
0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),I(java.util.Collections$EmptySet$1,this,null)});c$.$Collections$EmptySet$1$=function(){A(self.c$);c$=T(java.util,"Collections$EmptySet$1",null,java.util.Iterator);e(c$,"hasNext",function(){return!1});e(c$,"next",function(){throw new java.util.NoSuchElementException;});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=z()};c$=z();A(self.c$);c$=t(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
e(c$,"containsKey",function(){return!1},"~O");e(c$,"containsValue",function(){return!1},"~O");e(c$,"entrySet",function(){return java.util.Collections.EMPTY_SET});e(c$,"get",function(){return null},"~O");e(c$,"keySet",function(){return java.util.Collections.EMPTY_SET});e(c$,"values",function(){return java.util.Collections.EMPTY_LIST});c$=z();A(self.c$);c$=t(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);e(c$,"compare",function(a,b){return b.compareTo(a)},
"~O,~O");c$=z();A(self.c$);c$=k(function(){this.comparator=null;n(this,arguments)},java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);p(c$,function(a){this.comparator=a},"java.util.Comparator");c(c$,"compare",function(a,b){return this.comparator.compare(b,a)},"~O,~O");c$=z();A(self.c$);c$=k(function(){this.element=null;n(this,arguments)},java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);p(c$,function(a){x(this,java.util.Collections.SingletonSet,
[]);this.element=a},"~O");e(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(c$,"size",function(){return 1});e(c$,"iterator",function(){return K("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),I(java.util.Collections$SingletonSet$1,this,null)});c$.$Collections$SingletonSet$1$=function(){A(self.c$);c$=k(function(){M(this,arguments);this.$hasNext=!0;n(this,arguments)},java.util,"Collections$SingletonSet$1",
null,java.util.Iterator);e(c$,"hasNext",function(){return this.$hasNext});e(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=z()};c$=z();A(self.c$);c$=k(function(){this.element=null;n(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);p(c$,function(a){x(this,java.util.Collections.SingletonList,
[]);this.element=a},"~O");e(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");e(c$,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");e(c$,"size",function(){return 1});c$=z();A(self.c$);c$=k(function(){this.v=this.k=null;n(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);p(c$,function(a,b){x(this,java.util.Collections.SingletonMap,[]);this.k=a;this.v=b},"~O,~O");e(c$,"containsKey",
function(a){return null==this.k?null==a:this.k.equals(a)},"~O");e(c$,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");e(c$,"get",function(a){return this.containsKey(a)?this.v:null},"~O");e(c$,"size",function(){return 1});e(c$,"entrySet",function(){return K("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),I(java.util.Collections$SingletonMap$1,this,null)});c$.$Collections$SingletonMap$1$=function(){A(self.c$);
c$=T(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);e(c$,"contains",function(a){return w(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");e(c$,"size",function(){return 1});e(c$,"iterator",function(){return K("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),I(java.util.Collections$SingletonMap$1$1,this,null)});
c$=z()};c$.$Collections$SingletonMap$1$1$=function(){A(self.c$);c$=k(function(){M(this,arguments);this.$hasNext=!0;n(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);e(c$,"hasNext",function(){return this.$hasNext});e(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,K("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),I(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;
});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=z()};c$.$Collections$SingletonMap$1$1$1$=function(){A(self.c$);c$=T(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);e(c$,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");e(c$,"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});e(c$,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});e(c$,"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())});e(c$,"setValue",function(){throw new UnsupportedOperationException;},"~O");c$=z()};c$=z();A(self.c$);c$=k(function(){this.mutex=this.c=null;n(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);p(c$,function(a){this.c=
a;this.mutex=this},"java.util.Collection");p(c$,function(a,b){this.c=a;this.mutex=b},"java.util.Collection,~O");c(c$,"add",function(a){return this.c.add(a)},"~O");c(c$,"addAll",function(a){return this.c.addAll(a)},"java.util.Collection");c(c$,"clear",function(){this.c.clear()});c(c$,"contains",function(a){return this.c.contains(a)},"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"iterator",function(){return this.c.iterator()});
c(c$,"remove",function(a){return this.c.remove(a)},"~O");c(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(c$,"size",function(){return this.c.size()});c(c$,"toArray",function(){return this.c.toArray()});c(c$,"toString",function(){return this.c.toString()});c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c$=z();A(self.c$);c$=t(java.util.Collections,"SynchronizedRandomAccessList",
java.util.Collections.SynchronizedList,java.util.RandomAccess);e(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex)},"~N,~N");c$=z();A(self.c$);c$=k(function(){this.list=null;n(this,arguments)},java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);p(c$,function(a){x(this,java.util.Collections.SynchronizedList,[a]);this.list=a},"java.util.List");p(c$,function(a,b){x(this,java.util.Collections.SynchronizedList,
[a,b]);this.list=a},"java.util.List,~O");c(c$,"add",function(a,b){this.list.add(a,b)},"~N,~O");c(c$,"addAll",function(a,b){return this.list.addAll(a,b)},"~N,java.util.Collection");e(c$,"equals",function(a){return this.list.equals(a)},"~O");c(c$,"get",function(a){return this.list.get(a)},"~N");e(c$,"hashCode",function(){return this.list.hashCode()});c(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(c$,"listIterator",
function(a){a||(a=0);return this.list.listIterator(a)},"~N");c(c$,"remove",function(a){return this.list.remove(a)},"~N");c(c$,"set",function(a,b){return this.list.set(a,b)},"~N,~O");c(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex)},"~N,~N");c$=z();A(self.c$);c$=k(function(){this.mutex=this.m=null;n(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);p(c$,function(a){this.m=a;this.mutex=
this},"java.util.Map");p(c$,function(a,b){this.m=a;this.mutex=b},"java.util.Map,~O");c(c$,"clear",function(){this.m.clear()});c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(c$,"entrySet",function(){return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex)});e(c$,"equals",function(a){return this.m.equals(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},"~O");e(c$,"hashCode",function(){return this.m.hashCode()});
c(c$,"isEmpty",function(){return this.m.isEmpty()});c(c$,"keySet",function(){return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex)});c(c$,"put",function(a,b){return this.m.put(a,b)},"~O,~O");c(c$,"putAll",function(a){this.m.putAll(a)},"java.util.Map");c(c$,"remove",function(a){return this.m.remove(a)},"~O");c(c$,"size",function(){return this.m.size()});c(c$,"values",function(){return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex)});c(c$,"toString",
function(){return this.m.toString()});c$=z();A(self.c$);c$=t(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},"~O");e(c$,"hashCode",function(){return this.c.hashCode()});c$=z();A(self.c$);c$=k(function(){this.sm=null;n(this,arguments)},java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);p(c$,function(a){x(this,java.util.Collections.SynchronizedSortedMap,
[a]);this.sm=a},"java.util.SortedMap");p(c$,function(a,b){x(this,java.util.Collections.SynchronizedSortedMap,[a,b]);this.sm=a},"java.util.SortedMap,~O");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"headMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex)},"~O");c(c$,"lastKey",function(){return this.sm.lastKey()});c(c$,"subMap",function(a,b){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,
b),this.mutex)},"~O,~O");c(c$,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex)},"~O");c$=z();A(self.c$);c$=k(function(){this.ss=null;n(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);p(c$,function(a){x(this,java.util.Collections.SynchronizedSortedSet,[a]);this.ss=a},"java.util.SortedSet");p(c$,function(a,b){x(this,java.util.Collections.SynchronizedSortedSet,[a,b]);this.ss=
a},"java.util.SortedSet,~O");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"first",function(){return this.ss.first()});c(c$,"headSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex)},"~O");c(c$,"last",function(){return this.ss.last()});c(c$,"subSet",function(a,b){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex)},"~O,~O");c(c$,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),
this.mutex)},"~O");c$=z();A(self.c$);c$=k(function(){this.c=null;n(this,arguments)},java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);p(c$,function(a){this.c=a},"java.util.Collection");e(c$,"add",function(){throw new UnsupportedOperationException;},"~O");e(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");e(c$,"clear",function(){throw new UnsupportedOperationException;});c(c$,"contains",function(a){return this.c.contains(a)},
"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"iterator",function(){return K("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),I(java.util.Collections$UnmodifiableCollection$1,this,null)});e(c$,"remove",function(){throw new UnsupportedOperationException;},"~O");e(c$,"removeAll",function(){throw new UnsupportedOperationException;
},"java.util.Collection");e(c$,"retainAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(c$,"size",function(){return this.c.size()});c(c$,"toArray",function(){return this.c.toArray()});c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c(c$,"toString",function(){return this.c.toString()});c$.$Collections$UnmodifiableCollection$1$=function(){A(self.c$);c$=k(function(){M(this,arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",
null,java.util.Iterator);F(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator()});c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"next",function(){return this.iterator.next()});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=z()};c$=z();A(self.c$);c$=t(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);e(c$,"subList",function(a,b){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,
b))},"~N,~N");c$=z();A(self.c$);c$=k(function(){this.list=null;n(this,arguments)},java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);p(c$,function(a){x(this,java.util.Collections.UnmodifiableList,[a]);this.list=a},"java.util.List");c(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(c$,"addAll",function(){throw new UnsupportedOperationException;},"~N,java.util.Collection");e(c$,"equals",function(a){return this.list.equals(a)},
"~O");c(c$,"get",function(a){return this.list.get(a)},"~N");e(c$,"hashcode",function(){return this.list.hashCode()});c(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(c$,"listIterator",function(){return K("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),I(java.util.Collections$UnmodifiableList$1,this,null)},"~N");c(c$,"remove",function(){throw new UnsupportedOperationException;
},"~N");e(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");c(c$,"subList",function(a,b){return new java.util.Collections.UnmodifiableList(this.list.subList(a,b))},"~N,~N");c$.$Collections$UnmodifiableList$1$=function(){A(self.c$);c$=k(function(){M(this,arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);F(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location)});
e(c$,"add",function(){throw new UnsupportedOperationException;},"~O");c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"hasPrevious",function(){return this.iterator.hasPrevious()});c(c$,"next",function(){return this.iterator.next()});c(c$,"nextIndex",function(){return this.iterator.nextIndex()});c(c$,"previous",function(){return this.iterator.previous()});c(c$,"previousIndex",function(){return this.iterator.previousIndex()});e(c$,"remove",function(){throw new UnsupportedOperationException;
});e(c$,"set",function(){throw new UnsupportedOperationException;},"~O");c$=z()};c$=z();A(self.c$);c$=k(function(){this.m=null;n(this,arguments)},java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);p(c$,function(a){this.m=a},"java.util.Map");e(c$,"clear",function(){throw new UnsupportedOperationException;});c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(c$,"entrySet",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet())});
e(c$,"equals",function(a){return this.m.equals(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},"~O");e(c$,"hashcode",function(){return this.m.hashCode()});c(c$,"isEmpty",function(){return this.m.isEmpty()});c(c$,"keySet",function(){return new java.util.Collections.UnmodifiableSet(this.m.keySet())});e(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");e(c$,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");e(c$,"remove",function(){throw new UnsupportedOperationException;
},"~O");c(c$,"size",function(){return this.m.size()});c(c$,"values",function(){return new java.util.Collections.UnmodifiableCollection(this.m.values())});c(c$,"toString",function(){return this.m.toString()});A(self.c$);c$=t(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);e(c$,"iterator",function(){return K("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),
I(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null)});c(c$,"toArray",function(){for(var a=this.c.size(),b=Array(a),d=this.iterator();0<=--a;)b[a]=d.next();return b});c(c$,"toArray",function(a){var b=this.c.size(),d=0,g=this.iterator();b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(;d<b;)a[d++]=g.next();d<a.length&&(a[d]=null);return a},"~A");c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){A(self.c$);c$=k(function(){M(this,
arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);F(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator()});c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"next",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next())});e(c$,"remove",function(){throw new UnsupportedOperationException;
});c$=z()};A(self.c$);c$=k(function(){this.mapEntry=null;n(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);p(c$,function(a){this.mapEntry=a},"java.util.Map.Entry");e(c$,"equals",function(a){return this.mapEntry.equals(a)},"~O");c(c$,"getKey",function(){return this.mapEntry.getKey()});c(c$,"getValue",function(){return this.mapEntry.getValue()});e(c$,"hashcode",function(){return this.mapEntry.hashCode()});e(c$,"setValue",function(){throw new UnsupportedOperationException;
},"~O");c(c$,"toString",function(){return this.mapEntry.toString()});c$=z();c$=z();c$=z();A(self.c$);c$=t(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},"~O");e(c$,"hashCode",function(){return this.c.hashCode()});c$=z();A(self.c$);c$=k(function(){this.sm=null;n(this,arguments)},java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);p(c$,function(a){x(this,
java.util.Collections.UnmodifiableSortedMap,[a]);this.sm=a},"java.util.SortedMap");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"headMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a))},"~O");c(c$,"lastKey",function(){return this.sm.lastKey()});c(c$,"subMap",function(a,b){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b))},"~O,~O");c(c$,"tailMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},
"~O");c$=z();A(self.c$);c$=k(function(){this.ss=null;n(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);p(c$,function(a){x(this,java.util.Collections.UnmodifiableSortedSet,[a]);this.ss=a},"java.util.SortedSet");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"first",function(){return this.ss.first()});c(c$,"headSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a))},"~O");
c(c$,"last",function(){return this.ss.last()});c(c$,"subSet",function(a,b){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b))},"~O,~O");c(c$,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},"~O");c$=z();A(self.c$);c$=k(function(){this.type=this.c=null;n(this,arguments)},java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);p(c$,function(a,b){if(null==a||null==b)throw new NullPointerException;
this.c=a;this.type=b},"java.util.Collection,Class");c(c$,"size",function(){return this.c.size()});c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"contains",function(a){return this.c.contains(a)},"~O");c(c$,"iterator",function(){var a=this.c.iterator();w(a,java.util.ListIterator)&&(a=new java.util.Collections.CheckedListIterator(a,this.type));return a});c(c$,"toArray",function(){return this.c.toArray()});c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c(c$,"add",function(a){return this.c.add(java.util.Collections.checkType(a,
this.type))},"~O");c(c$,"remove",function(a){return this.c.remove(a)},"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");e(c$,"addAll",function(a){var b=a.size();if(0==b)return!1;var d=Array(b);a=a.iterator();for(var g=0;g<b;g++)d[g]=java.util.Collections.checkType(a.next(),this.type);a=!1;for(g=0;g<b;g++)a=(new Boolean(a|this.c.add(d[g]))).valueOf();return a},"java.util.Collection");c(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");
c(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(c$,"clear",function(){this.c.clear()});c(c$,"toString",function(){return this.c.toString()});c$=z();A(self.c$);c$=k(function(){this.type=this.i=null;n(this,arguments)},java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);p(c$,function(a,b){this.i=a;this.type=b},"java.util.ListIterator,Class");c(c$,"hasNext",function(){return this.i.hasNext()});c(c$,"next",function(){return this.i.next()});c(c$,"remove",
function(){this.i.remove()});c(c$,"hasPrevious",function(){return this.i.hasPrevious()});c(c$,"previous",function(){return this.i.previous()});c(c$,"nextIndex",function(){return this.i.nextIndex()});c(c$,"previousIndex",function(){return this.i.previousIndex()});c(c$,"set",function(a){this.i.set(java.util.Collections.checkType(a,this.type))},"~O");c(c$,"add",function(a){this.i.add(java.util.Collections.checkType(a,this.type))},"~O");c$=z();A(self.c$);c$=k(function(){this.l=null;n(this,arguments)},
java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);p(c$,function(a,b){x(this,java.util.Collections.CheckedList,[a,b]);this.l=a},"java.util.List,Class");c(c$,"addAll",function(a,b){var d=b.size();if(0==d)return!1;for(var g=Array(d),c=b.iterator(),h=0;h<d;h++)g[h]=java.util.Collections.checkType(c.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(g))},"~N,java.util.Collection");c(c$,"get",function(a){return this.l.get(a)},"~N");c(c$,"set",function(a,
b){return this.l.set(a,java.util.Collections.checkType(b,this.type))},"~N,~O");c(c$,"add",function(a,b){this.l.add(a,java.util.Collections.checkType(b,this.type))},"~N,~O");c(c$,"remove",function(a){return this.l.remove(a)},"~N");c(c$,"indexOf",function(a){return this.l.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.l.lastIndexOf(a)},"~O");c(c$,"listIterator",function(a){a||(a=0);return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type)},"~N");c(c$,"subList",
function(a,b){return java.util.Collections.checkedList(this.l.subList(a,b),this.type)},"~N,~N");e(c$,"equals",function(a){return this.l.equals(a)},"~O");e(c$,"hashcode",function(){return this.l.hashCode()});c$=z();A(self.c$);c$=t(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);c$=z();A(self.c$);c$=t(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);e(c$,"equals",function(a){return this.c.equals(a)},"~O");
e(c$,"hashCode",function(){return this.c.hashCode()});c$=z();A(self.c$);c$=k(function(){this.valueType=this.keyType=this.m=null;n(this,arguments)},java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);p(c$,($fz=function(a,b,d){if(null==a||null==b||null==d)throw new NullPointerException;this.m=a;this.keyType=b;this.valueType=d},$fz.isPrivate=!0,$fz),"java.util.Map,Class,Class");c(c$,"size",function(){return this.m.size()});c(c$,"isEmpty",function(){return this.m.isEmpty()});
c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},"~O");c(c$,"put",function(a,b){return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType))},"~O,~O");c(c$,"remove",function(a){return this.m.remove(a)},"~O");e(c$,"putAll",function(a){var b=a.size();if(0!=b){var d=Array(b);a=a.entrySet().iterator();for(var g=0;g<
b;g++){var c=a.next();java.util.Collections.checkType(c.getKey(),this.keyType);java.util.Collections.checkType(c.getValue(),this.valueType);d[g]=c}for(c=0;c<b;c++)this.m.put(d[c].getKey(),d[c].getValue())}},"java.util.Map");c(c$,"clear",function(){this.m.clear()});c(c$,"keySet",function(){return this.m.keySet()});c(c$,"values",function(){return this.m.values()});c(c$,"entrySet",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType)});e(c$,"equals",
function(a){return this.m.equals(a)},"~O");e(c$,"hashcode",function(){return this.m.hashCode()});c(c$,"toString",function(){return this.m.toString()});A(self.c$);c$=k(function(){this.valueType=this.e=null;n(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);p(c$,function(a,b){if(null==a)throw new NullPointerException;this.e=a;this.valueType=b},"java.util.Map.Entry,Class");c(c$,"getKey",function(){return this.e.getKey()});c(c$,"getValue",function(){return this.e.getValue()});
c(c$,"setValue",function(a){return this.e.setValue(java.util.Collections.checkType(a,this.valueType))},"~O");e(c$,"equals",function(a){return this.e.equals(a)},"~O");e(c$,"hashcode",function(){return this.e.hashCode()});c$=z();A(self.c$);c$=k(function(){this.valueType=this.s=null;n(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);p(c$,function(a,b){this.s=a;this.valueType=b},"java.util.Set,Class");c(c$,"iterator",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),
this.valueType)});c(c$,"toArray",function(){for(var a=this.size(),b=Array(a),d=this.iterator(),g=0;g<a;g++)b[g]=d.next();return b});c(c$,"toArray",function(a){var b=this.size();if(a.length<b){var d=a.getClass().getComponentType();a=java.lang.reflect.Array.newInstance(d,b)}for(var d=this.iterator(),g=0;g<b;g++)a[g]=d.next();b<a.length&&(a[b]=null);return a},"~A");c(c$,"retainAll",function(a){return this.s.retainAll(a)},"java.util.Collection");c(c$,"removeAll",function(a){return this.s.removeAll(a)},
"java.util.Collection");c(c$,"containsAll",function(a){return this.s.containsAll(a)},"java.util.Collection");e(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(c$,"remove",function(a){return this.s.remove(a)},"~O");c(c$,"contains",function(a){return this.s.contains(a)},"~O");e(c$,"add",function(){throw new UnsupportedOperationException;},"java.util.Map.Entry");c(c$,"isEmpty",function(){return this.s.isEmpty()});c(c$,"clear",function(){this.s.clear()});c(c$,
"size",function(){return this.s.size()});e(c$,"hashcode",function(){return this.s.hashCode()});e(c$,"equals",function(a){return this.s.equals(a)},"~O");A(self.c$);c$=k(function(){this.valueType=this.i=null;n(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);p(c$,function(a,b){this.i=a;this.valueType=b},"java.util.Iterator,Class");c(c$,"hasNext",function(){return this.i.hasNext()});c(c$,"remove",function(){this.i.remove()});c(c$,"next",
function(){return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType)});c$=z();c$=z();c$=z();A(self.c$);c$=k(function(){this.ss=null;n(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);p(c$,function(a,b){x(this,java.util.Collections.CheckedSortedSet,[a,b]);this.ss=a},"java.util.SortedSet,Class");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"subSet",function(a,b){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,
b),this.type)},"~O,~O");c(c$,"headSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type)},"~O");c(c$,"tailSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type)},"~O");c(c$,"first",function(){return this.ss.first()});c(c$,"last",function(){return this.ss.last()});c$=z();A(self.c$);c$=k(function(){this.sm=null;n(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);
p(c$,function(a,b,d){x(this,java.util.Collections.CheckedSortedMap,[a,b,d]);this.sm=a},"java.util.SortedMap,Class,Class");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"subMap",function(a,b){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType)},"~O,~O");c(c$,"headMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType)},"~O");c(c$,"tailMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),
this.keyType,this.valueType)},"~O");c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"lastKey",function(){return this.sm.lastKey()});c$=z();c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList;c$.EMPTY_SET=c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet;c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap}),c$=t(java.util,"Dictionary"),p(c$,function(){}),r([],"java.util.HashtableIterator",[],function(){c$=k(function(){this.expectedModCount=
this.position=0;this.lastEntry=this.type=null;this.lastPosition=0;this.canRemove=!1;n(this,arguments)},java.util,"HashtableIterator",null,java.util.Iterator);p(c$,function(a){this.type=a;this.h$=a.h$;this.position=this.h$.lastSlot;this.expectedModCount=this.h$.modCount},"java.util.AbstractSet");e(c$,"hasNext",function(){if(this.lastEntry&&this.lastEntry.next)return!0;for(;this.position>=this.h$.firstSlot;)if(null==this.h$.elementData[this.position])this.position--;else return!0;return!1});e(c$,"next",
function(){if(this.expectedModCount==this.h$.modCount){this.lastEntry&&(this.lastEntry=this.lastEntry.next);if(null==this.lastEntry){for(;this.position>=this.h$.firstSlot&&null==(this.lastEntry=this.h$.elementData[this.position]);)this.position--;this.lastEntry&&(this.lastPosition=this.position,this.position--)}if(this.lastEntry)return this.canRemove=!0,this.type.get(this.lastEntry);throw new java.util.NoSuchElementException;}throw new java.util.ConcurrentModificationException;});e(c$,"remove",function(){if(this.expectedModCount==
this.h$.modCount)if(this.canRemove){var a=this.canRemove=!1,b=this.h$.elementData[this.lastPosition];if(b===this.lastEntry)this.h$.elementData[this.lastPosition]=b.next,a=!0;else{for(;b&&b.next!==this.lastEntry;)b=b.next;b&&(b.next=this.lastEntry.next,a=!0)}if(a){this.h$.modCount++;this.h$.elementCount--;this.expectedModCount++;return}}else throw new IllegalStateException;throw new java.util.ConcurrentModificationException;})}),r([],"java.util.HashtableEnumerator",[],function(){c$=k(function(){this.key=
!1;this.start=0;this.entry=null;n(this,arguments)},java.util,"HashtableEnumerator",null,java.util.Enumeration);p(c$,function(a,b){this.key=a;if(this.h$=b)this.start=this.h$.lastSlot+1},"~B,java.util.Hashtable");e(c$,"hasMoreElements",function(){if(!this.h$)return!1;if(this.entry)return!0;for(;--this.start>=this.h$.firstSlot;)if(this.h$.elementData[this.start])return this.entry=this.h$.elementData[this.start],!0;return!1});e(c$,"nextElement",function(){if(this.hasMoreElements()){var a=this.key?this.entry.key:
this.entry.value;this.entry=this.entry.next;return a}throw new java.util.NoSuchElementException;})}),r([],"java.util.HashtableEntrySet",[],function(){c$=k(function(){n(this,arguments)},java.util,"HashtableEntrySet",null,java.util.AbstractSet);p(c$,function(a){this.h$=a},"java.util.Hashtable");e(c$,"size",function(){return this.h$.elementCount});e(c$,"clear",function(){this.h$.clear()});e(c$,"remove",function(a){return this.contains(a)?(this.h$.remove(a.getKey()),!0):!1},"~O");c(c$,"contains",function(a){var b=
this.h$.getEntry(a.getKey());return a.equals(b)},"~O");e(c$,"get",function(a){return a},"java.util.MapEntry");c(c$,"iterator",function(){return new java.util.HashtableIterator(this)})}),r([],"java.util.HashtableKeySet",[],function(){c$=k(function(){n(this,arguments)},java.util,"HashtableKeySet",null,java.util.AbstractSet);p(c$,function(a){this.h$=a},"java.util.Hashtable");e(c$,"contains",function(a){return this.h$.containsKey(a)},"~O");e(c$,"size",function(){return this.h$.elementCount});e(c$,"clear",
function(){this.h$.clear()});e(c$,"remove",function(a){return this.h$.containsKey(a)?(this.h$.remove(a),!0):!1},"~O");e(c$,"get",function(a){return a.key},"java.util.MapEntry");e(c$,"iterator",function(){return new java.util.HashtableIterator(this)})}),r([],"java.util.HashtableValueCollection",[],function(){c$=k(function(){n(this,arguments)},java.util,"HashtableValueCollection",null,java.util.AbstractCollection);p(c$,function(a){this.h$=a},"java.util.Hashtable");e(c$,"contains",function(a){return this.h$.contains(a)},
"~O");e(c$,"size",function(){return this.h$.elementCount});e(c$,"clear",function(){this.h$.clear()});e(c$,"get",function(a){return a.value},"java.util.MapEntry");e(c$,"iterator",function(){return new java.util.HashtableIterator(this)})}),r(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){c$=k(function(){this.next=null;this.hashcode=0;n(this,arguments)},java.util,"HashtableEntry",java.util.MapEntry);N(c$,function(a,b){this.key=a;this.value=b;this.hashcode=a.hashCode()});c(c$,"clone",
function(){var a=L(this,java.util.HashtableEntry,"clone",[]);null!=this.next&&(a.next=this.next.clone());return a});e(c$,"setValue",function(a){if(null==a)throw new NullPointerException;var b=this.value;this.value=a;return b},"~O");c(c$,"getKeyHash",function(){return this.key.hashCode()});c(c$,"equalsKey",function(a){return this.hashcode==(!a.hashCode||a.hashCode())&&this.key.equals(a)},"~O,~N");e(c$,"toString",function(){return this.key+"="+this.value})}),r("java.util.Dictionary $.Enumeration $.HashtableEnumerator $.Iterator $.Map $.MapEntry $.NoSuchElementException".split(" "),
"java.util.Hashtable","java.lang.IllegalArgumentException $.IllegalStateException $.NullPointerException $.StringBuilder java.util.AbstractCollection $.AbstractSet $.Arrays $.Collections $.ConcurrentModificationException java.util.MapEntry.Type java.util.HashtableEntry".split(" "),function(){c$=k(function(){this.elementCount=0;this.elementData=null;this.firstSlot=this.threshold=this.loadFactor=0;this.lastSlot=-1;this.modCount=0;n(this,arguments)},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,
Cloneable,java.io.Serializable]);c$.newEntry=c(c$,"newEntry",($fz=function(a,b){return new java.util.HashtableEntry(a,b)},$fz.isPrivate=!0,$fz),"~O,~O,~N");N(c$,function(){this.elementCount=0;this.elementData=this.newElementArray(11);this.firstSlot=this.elementData.length;this.loadFactor=0.75;this.computeMaxSize()});c(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");e(c$,"clear",function(){this.elementCount=0;for(var a=this.elementData.length;0<=--a;)this.elementData[a]=
null;this.modCount++});c(c$,"clone",function(){try{var a=L(this,java.util.Hashtable,"clone",[]);a.elementData=this.elementData.clone();for(var b,d=this.elementData.length;0<=--d;)if(b=this.elementData[d])a.elementData[d]=b.clone();return a}catch(g){if(w(g,CloneNotSupportedException))return null;throw g;}});c(c$,"computeMaxSize",($fz=function(){this.threshold=Math.round(this.elementData.length*this.loadFactor)},$fz.isPrivate=!0,$fz));c(c$,"contains",function(a){if(null==a)throw new NullPointerException;
for(var b=this.elementData.length;0<=--b;)for(var d=this.elementData[b];d;){if(a.equals(d.value))return!0;d=d.next}return!1},"~O");e(c$,"containsKey",function(a){a.hashCode||(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this==a}));return null!=this.getEntry(a)},"~O");e(c$,"containsValue",function(a){return this.contains(a)},"~O");e(c$,"elements",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:new java.util.HashtableEnumerator(!1,this)});e(c$,
"entrySet",function(){return new java.util.HashtableEntrySet(this)});e(c$,"equals",function(a){if(this===a)return!0;if(w(a,java.util.Map)){if(this.size()!=a.size())return!1;var b=this.entrySet(),d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);)if(!b.contains(d))return!1;return!0}return!1},"~O");e(c$,"get",function(a){a.hashCode||(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this==a}));for(var b=a.hashCode(),d=this.elementData[(b&2147483647)%this.elementData.length];d;){if(d.equalsKey(a,
b))return d.value;d=d.next}return null},"~O");c(c$,"getEntry",function(a){for(var b=a.hashCode(),d=this.elementData[(b&2147483647)%this.elementData.length];d;){if(d.equalsKey(a,b))return d;d=d.next}return null},"~O");e(c$,"hashCode",function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)var d=b.next(),g=d.getKey(),d=d.getValue(),g=(g!==this?g.hashCode():0)^(d!==this?null!=d?d.hashCode():0:0),a=a+g;return a});e(c$,"isEmpty",function(){return 0==this.elementCount});e(c$,"keys",function(){return 0==
this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:new java.util.HashtableEnumerator(!0,this)});e(c$,"keySet",function(){return new java.util.HashtableKeySet(this)});e(c$,"put",function(a,b){if(null!=a&&null!=b){a.hashCode||(a.hashCode=function(){return 1},a.equals||(a.equals=function(a){return this==a}));for(var d=a.hashCode(),g=(d&2147483647)%this.elementData.length,c=this.elementData[g];null!=c&&!c.equalsKey(a,d);)c=c.next;if(null==c)return this.modCount++,++this.elementCount>this.threshold&&
(this.rehash(),g=(d&2147483647)%this.elementData.length),g<this.firstSlot&&(this.firstSlot=g),g>this.lastSlot&&(this.lastSlot=g),c=java.util.Hashtable.newEntry(a,b,d),c.next=this.elementData[g],this.elementData[g]=c,null;d=c.value;c.value=b;return d}throw new NullPointerException;},"~O,~O");e(c$,"putAll",function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())},"java.util.Map");c(c$,"rehash",function(){var a=(this.elementData.length<<1)+1;0==
a&&(a=1);for(var b=a,d=-1,g=this.newElementArray(a),c=this.lastSlot+1;--c>=this.firstSlot;)for(var h=this.elementData[c];null!=h;){var e=(h.getKeyHash()&2147483647)%a;e<b&&(b=e);e>d&&(d=e);var j=h.next;h.next=g[e];g[e]=h;h=j}this.firstSlot=b;this.lastSlot=d;this.elementData=g;this.computeMaxSize()});e(c$,"remove",function(a){for(var b=a.hashCode(),d=(b&2147483647)%this.elementData.length,c=null,f=this.elementData[d];null!=f&&!f.equalsKey(a,b);)c=f,f=f.next;return null!=f?(this.modCount++,null==c?
this.elementData[d]=f.next:c.next=f.next,this.elementCount--,a=f.value,f.value=null,a):null},"~O");e(c$,"size",function(){return this.elementCount});e(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var b=this.lastSlot;b>=this.firstSlot;b--)for(var d=this.elementData[b];null!=d;)d.key!==this?a.append(d.key):a.append("(this Map)"),a.append("="),d.value!==this?a.append(d.value):a.append("(this Map)"),a.append(", "),d=d.next;0<this.elementCount&&
a.setLength(a.length()-2);a.append("}");return a.toString()});e(c$,"values",function(){return new java.util.HashtableValueCollection(this)});java.util.Hashtable.EMPTY_ENUMERATION=new java.util.HashtableEnumerator}),r(["java.util.Map"],"java.util.MapEntry",null,function(){c$=k(function(){this.value=this.key=null;n(this,arguments)},java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);p(c$,function(a){this.key=a},"~O");p(c$,function(a,b){this.key=a;this.value=b},"~O,~O");c(c$,"clone",function(){try{return L(this,
java.util.MapEntry,"clone",[])}catch(a){if(w(a,CloneNotSupportedException))return null;throw a;}});e(c$,"equals",function(a){return this===a?!0:w(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");e(c$,"getKey",function(){return this.key});e(c$,"getValue",function(){return this.value});e(c$,"hashCode",function(){return(null==this.key?0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});
e(c$,"setValue",function(a){var b=this.value;this.value=a;return b},"~O");e(c$,"toString",function(){return this.key+"="+this.value});B(java.util.MapEntry,"Type")}),r(["java.util.Hashtable"],"java.util.Properties",["java.lang.NullPointerException","$.StringBuffer"],function(){c$=k(function(){this.defaults=this.builder=null;n(this,arguments)},java.util,"Properties",java.util.Hashtable);p(c$,function(a){x(this,java.util.Properties,[]);this.defaults=a},"java.util.Properties");c(c$,"dumpString",($fz=
function(a,b,d){var c=0;!d&&(c<b.length&&32==b.charAt(c).charCodeAt(0))&&(a.append("\\ "),c++);for(;c<b.length;c++){var f=b.charAt(c);switch(f){case "\t":a.append("\\t");break;case "\n":a.append("\\n");break;case "\f":a.append("\\f");break;case "\r":a.append("\\r");break;default:(0<="\\#!=:".indexOf(f)||d&&32==f.charCodeAt(0))&&a.append("\\");if(!(32<=f.charCodeAt(0)&&126>=f.charCodeAt(0))){f=Integer.toHexString(f.charCodeAt(0));a.append("\\u");for(var h=0;h<4-f.length;h++)a.append("0")}a.append(f)}}},
$fz.isPrivate=!0,$fz),"StringBuilder,~S,~B");c(c$,"getProperty",function(a){var b=this.get(a),b=w(b,String)?b:null;null==b&&null!=this.defaults&&(b=this.defaults.getProperty(a));return b},"~S");c(c$,"getProperty",function(a,b){var d=this.get(a),d=w(d,String)?d:null;null==d&&null!=this.defaults&&(d=this.defaults.getProperty(a));return null==d?b:d},"~S,~S");c(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var b=new StringBuffer(80),d=this.propertyNames();d.hasMoreElements();){var c=
d.nextElement();b.append(c);b.append("=");for(var f=this.get(c),h=this.defaults;null==f;)f=h.get(c),h=h.defaults;40<f.length?(b.append(f.substring(0,37)),b.append("...")):b.append(f);a.println(b.toString());b.setLength(0)}},"java.io.PrintStream");c(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var b=new StringBuffer(80),d=this.propertyNames();d.hasMoreElements();){var c=d.nextElement();b.append(c);b.append("=");for(var f=this.get(c),h=this.defaults;null==f;)f=h.get(c),h=h.defaults;
40<f.length?(b.append(f.substring(0,37)),b.append("...")):b.append(f);a.println(b.toString());b.setLength(0)}},"java.io.PrintWriter");c(c$,"load",function(){},"java.io.InputStream");c(c$,"propertyNames",function(){if(null==this.defaults)return this.keys();for(var a=new java.util.Hashtable(this.defaults.size()+this.size()),b=this.defaults.propertyNames();b.hasMoreElements();)a.put(b.nextElement(),a);for(b=this.keys();b.hasMoreElements();)a.put(b.nextElement(),a);return a.keys()});c(c$,"save",function(a,
b){try{this.store(a,b)}catch(d){if(!w(d,java.io.IOException))throw d;}},"java.io.OutputStream,~S");c(c$,"setProperty",function(a,b){return this.put(a,b)},"~S,~S");c(c$,"store",function(){},"java.io.OutputStream,~S");c(c$,"loadFromXML",function(){},"java.io.InputStream");c(c$,"storeToXML",function(){},"java.io.OutputStream,~S");c(c$,"storeToXML",function(){},"java.io.OutputStream,~S,~S");c(c$,"substitutePredefinedEntries",($fz=function(a){return a.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">",
"&gt;").replaceAll("'","&apos;").replaceAll('"',"&quot;")},$fz.isPrivate=!0,$fz),"~S");C(c$,"PROP_DTD_NAME","http://java.sun.com/dtd/properties.dtd","PROP_DTD",'<?xml version="1.0" encoding="UTF-8"?>    <!ELEMENT properties (comment?, entry*) >    <!ATTLIST properties version CDATA #FIXED "1.0" >    <!ELEMENT comment (#PCDATA) >    <!ELEMENT entry (#PCDATA) >    <!ATTLIST entry key CDATA #REQUIRED >',"NONE",0,"SLASH",1,"UNICODE",2,"CONTINUE",3,"KEY_DONE",4,"IGNORE",5,"lineSeparator",null)}),r(null,
"java.util.Random",["java.lang.IllegalArgumentException"],function(){c$=k(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;n(this,arguments)},java.util,"Random",null,java.io.Serializable);p(c$,function(){this.setSeed(System.currentTimeMillis())});p(c$,function(a){this.setSeed(a)},"~N");c(c$,"next",function(a){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>48-a},"~N");c(c$,"nextBoolean",function(){return 0.5<Math.random()});c(c$,"nextBytes",function(){for(var a=
0;a<bytes.length;a++)bytes[a]=Math.round(256*Math.random())},"~A");c(c$,"nextDouble",function(){return Math.random()});c(c$,"nextFloat",function(){return Math.random()});c(c$,"nextGaussian",function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=!1,this.nextNextGaussian;var a,b,d;do a=2*this.nextDouble()-1,b=2*this.nextDouble()-1,d=a*a+b*b;while(1<=d);d=Math.sqrt(-2*Math.log(d)/d);this.nextNextGaussian=b*d;this.haveNextNextGaussian=!0;return a*d});c(c$,"nextInt",function(){return Math.ceil(65535*
Math.random())-32768});c(c$,"nextInt",function(a){if(0<a){if((a&-a)==a)return a*this.next(31)>>31;var b,d;do b=this.next(31),d=b%a;while(0>b-d+(a-1));return d}throw new IllegalArgumentException;},"~N");c(c$,"nextLong",function(){return Math.ceil(4294967295*Math.random())-2147483648});c(c$,"setSeed",function(a){this.seed=(a^25214903917)&0xffffffffffff;this.haveNextNextGaussian=!1},"~N");C(c$,"multiplier",25214903917)}),r(["java.util.Map"],"java.util.SortedMap",null,function(){B(java.util,"SortedMap",
java.util.Map)}),r(["java.util.Set"],"java.util.SortedSet",null,function(){B(java.util,"SortedSet",java.util.Set)}),r(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){c$=k(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;n(this,arguments)},java.util,"StringTokenizer",null,java.util.Enumeration);p(c$,function(a){this.construct(a," \t\n\r\f",!1)},"~S");p(c$,function(a,b){this.construct(a,
b,!1)},"~S,~S");p(c$,function(a,b,d){if(null!=a)this.string=a,this.delimiters=b,this.returnDelimiters=d,this.position=0;else throw new NullPointerException;},"~S,~S,~B");c(c$,"countTokens",function(){for(var a=0,b=!1,d=this.position,c=this.string.length;d<c;d++)0<=this.delimiters.indexOf(this.string.charAt(d),0)?(this.returnDelimiters&&a++,b&&(a++,b=!1)):b=!0;b&&a++;return a});e(c$,"hasMoreElements",function(){return this.hasMoreTokens()});c(c$,"hasMoreTokens",function(){var a=this.string.length;
if(this.position<a){if(this.returnDelimiters)return!0;for(var b=this.position;b<a;b++)if(-1==this.delimiters.indexOf(this.string.charAt(b),0))return!0}return!1});e(c$,"nextElement",function(){return this.nextToken()});c(c$,"nextToken",function(){var a=this.position,b=this.string.length;if(a<b){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<b;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<b&&0<=this.delimiters.indexOf(this.string.charAt(a),0);)a++;this.position=a;if(a<b){for(this.position++;this.position<b;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;});c(c$,"nextToken",function(a){this.delimiters=
a;return this.nextToken()},"~S")}),q("javajs.api"),B(javajs.api,"BytePoster"),q("javajs.api"),B(javajs.api,"EventManager"),q("javajs.api"),B(javajs.api,"FontManager"),q("javajs.api"),B(javajs.api,"GenericColor"),q("javajs.api"),B(javajs.api,"GenericFileInterface"),q("javajs.api"),B(javajs.api,"GenericMenuInterface"),q("javajs.api"),B(javajs.api,"GenericMouseInterface"),q("javajs.api"),r(["javajs.api.FontManager"],"javajs.api.GenericPlatform",null,function(){c$=B(javajs.api,"GenericPlatform",javajs.api.FontManager);
C(c$,"CURSOR_DEFAULT",0,"CURSOR_CROSSHAIR",1,"CURSOR_WAIT",3,"CURSOR_ZOOM",8,"CURSOR_HAND",12,"CURSOR_MOVE",13)}),q("javajs.api"),B(javajs.api,"JSInterface"),q("javajs.api"),B(javajs.api,"JSONEncodable"),q("javajs.api"),B(javajs.api,"PlatformViewer"),q("javajs.api"),B(javajs.api,"ZInputStream"),q("javajs.awt"),r(["javajs.api.GenericColor"],"javajs.awt.Color",null,function(){c$=k(function(){this.argb=0;n(this,arguments)},javajs.awt,"Color",null,javajs.api.GenericColor);e(c$,"getRGB",function(){return this.argb&
16777215});e(c$,"getOpacity255",function(){return this.argb>>24&255});e(c$,"setOpacity255",function(a){this.argb=this.argb&16777215|(a&255)<<24},"~N");c$.get1=c(c$,"get1",function(a){var b=new javajs.awt.Color;b.argb=a|4278190080;return b},"~N");c$.get3=c(c$,"get3",function(a,b,d){return(new javajs.awt.Color).set4(a,b,d,255)},"~N,~N,~N");c$.get4=c(c$,"get4",function(a,b,d,c){return(new javajs.awt.Color).set4(a,b,d,c)},"~N,~N,~N,~N");c(c$,"set4",function(a,b,d,c){this.argb=(c<<24|a<<16|b<<8|d)&4294967295;
return this},"~N,~N,~N,~N");e(c$,"toString",function(){var a="00000000"+Integer.toHexString(this.argb);return"[0x"+a.substring(a.length-8,a.length)+"]"})}),q("javajs.awt"),c$=k(function(){this.height=this.width=0;n(this,arguments)},javajs.awt,"Dimension"),p(c$,function(a,b){this.set(a,b)},"~N,~N"),c(c$,"set",function(a,b){this.width=a;this.height=b;return this},"~N,~N"),q("javajs.awt.event"),c$=k(function(){this.source=null;n(this,arguments)},javajs.awt.event,"Event"),c(c$,"getSource",function(){return this.source}),
C(c$,"MOUSE_LEFT",16,"MOUSE_MIDDLE",8,"MOUSE_RIGHT",4,"MOUSE_WHEEL",32,"MAC_COMMAND",20,"BUTTON_MASK",28,"MOUSE_DOWN",501,"MOUSE_UP",502,"MOUSE_MOVE",503,"MOUSE_ENTER",504,"MOUSE_EXIT",505,"MOUSE_DRAG",506,"SHIFT_MASK",1,"ALT_MASK",8,"CTRL_MASK",2,"CTRL_ALT",10,"CTRL_SHIFT",3,"META_MASK",4,"VK_SHIFT",16,"VK_ALT",18,"VK_CONTROL",17,"VK_META",157,"VK_LEFT",37,"VK_RIGHT",39,"VK_PERIOD",46,"VK_SPACE",32,"VK_DOWN",40,"VK_UP",38,"VK_ESCAPE",27,"VK_DELETE",127,"VK_BACK_SPACE",8,"VK_PAGE_DOWN",34,"VK_PAGE_UP",
33,"MOVED",0,"DRAGGED",1,"CLICKED",2,"WHEELED",3,"PRESSED",4,"RELEASED",5),q("javajs.awt"),r(null,"javajs.awt.Font",["JU.AU"],function(){c$=k(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;n(this,arguments)},javajs.awt,"Font");p(c$,function(a,b,d,c,f,h,e){this.manager=a;this.fid=b;this.fontFace=javajs.awt.Font.fontFaces[d];
this.fontStyle=javajs.awt.Font.fontStyles[c];this.idFontFace=d;this.idFontStyle=c;this.fontSize=f;this.isBold=1==(c&1);this.isItalic=2==(c&2);this.fontSizeNominal=h;this.font=a.newFont(javajs.awt.Font.fontFaces[d],this.isBold,this.isItalic,f);this.fontMetrics=a.getFontMetrics(this,e);this.descent=a.getFontDescent(this.fontMetrics);this.ascent=a.getFontAscent(this.fontMetrics)},"javajs.api.FontManager,~N,~N,~N,~N,~N,~O");c$.getFont3D=c(c$,"getFont3D",function(a){return javajs.awt.Font.font3ds[a&255]},
"~N");c$.createFont3D=c(c$,"createFont3D",function(a,b,d,c,f,h){255<d&&(d=255);for(var e=G(d)<<4,e=a&3|(b&3)<<2|e<<4,j=javajs.awt.Font.fontkeyCount;0<--j;)if(e==javajs.awt.Font.fontkeys[j]&&javajs.awt.Font.font3ds[j].fontSizeNominal==c)return javajs.awt.Font.font3ds[j];j=javajs.awt.Font.fontkeyCount++;j==javajs.awt.Font.fontkeys.length&&(javajs.awt.Font.fontkeys=JU.AU.arrayCopyI(javajs.awt.Font.fontkeys,j+8));javajs.awt.Font.font3ds=JU.AU.arrayCopyObject(javajs.awt.Font.font3ds,j+8);a=new javajs.awt.Font(f,
j,a,b,d,c,h);javajs.awt.Font.font3ds[j]=a;javajs.awt.Font.fontkeys[j]=e;return a},"~N,~N,~N,~N,javajs.api.FontManager,~O");c$.getFontFaceID=c(c$,"getFontFaceID",function(a){return"Monospaced".equalsIgnoreCase(a)?2:"Serif".equalsIgnoreCase(a)?1:0},"~S");c$.getFontStyleID=c(c$,"getFontStyleID",function(a){for(var b=4;0<=--b;)if(javajs.awt.Font.fontStyles[b].equalsIgnoreCase(a))return b;return-1},"~S");c(c$,"getAscent",function(){return this.ascent});c(c$,"getDescent",function(){return this.descent});
c(c$,"getHeight",function(){return this.getAscent()+this.getDescent()});c(c$,"getFontMetrics",function(){return this.fontMetrics});c(c$,"stringWidth",function(a){return this.manager.fontStringWidth(this,a)},"~S");c(c$,"getInfo",function(){return this.fontSizeNominal+" "+this.fontFace+" "+this.fontStyle});C(c$,"FONT_ALLOCATION_UNIT",8,"fontkeyCount",1,"fontkeys",E(8,0));c$.font3ds=c$.prototype.font3ds=Array(8);C(c$,"FONT_FACE_SANS",0,"FONT_FACE_SERIF",1,"FONT_FACE_MONO",2,"fontFaces",["SansSerif",
"Serif","Monospaced",""],"FONT_STYLE_PLAIN",0,"FONT_STYLE_BOLD",1,"FONT_STYLE_ITALIC",2,"FONT_STYLE_BOLDITALIC",3,"fontStyles",["Plain","Bold","Italic","BoldItalic"])}),q("JU"),r(["javajs.api.JSONEncodable"],"JU.A4",["JU.T3"],function(){c$=k(function(){this.angle=this.z=this.y=this.x=0;n(this,arguments)},JU,"A4",null,[javajs.api.JSONEncodable,java.io.Serializable]);p(c$,function(){this.z=1});c$.new4=c(c$,"new4",function(a,b,d,c){var f=new JU.A4;f.set4(a,b,d,c);return f},"~N,~N,~N,~N");c$.newAA=c(c$,
"newAA",function(a){var b=new JU.A4;b.set4(a.x,a.y,a.z,a.angle);return b},"JU.A4");c$.newVA=c(c$,"newVA",function(a,b){var d=new JU.A4;d.setVA(a,b);return d},"JU.V3,~N");c(c$,"setVA",function(a,b){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=b},"JU.V3,~N");c(c$,"set4",function(a,b,d,c){this.x=a;this.y=b;this.z=d;this.angle=c},"~N,~N,~N,~N");c(c$,"setAA",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=a.angle},"JU.A4");c(c$,"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(c$,"setFromMat",function(a,b,d,c,f,h,e,j,l){a=0.5*(a+f+l-1);this.x=j-h;this.y=d-e;this.z=c-b;b=0.5*Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);this.angle=Math.atan2(b,a)},"~N,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.x)^JU.T3.floatToIntBits0(this.y)^JU.T3.floatToIntBits0(this.z)^JU.T3.floatToIntBits0(this.angle)});e(c$,"equals",function(a){return!w(a,JU.A4)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.angle==a.angle},
"~O");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.angle+")"});e(c$,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+","+180*this.angle/3.141592653589793+"]"})}),q("JU"),r(["java.net.URLConnection"],"JU.AjaxURLConnection",null,function(){c$=k(function(){this.bytesOut=null;this.postOut="";n(this,arguments)},JU,"AjaxURLConnection",java.net.URLConnection);c(c$,"doAjax",function(){return Jmol._doAjax(this.url,this.postOut,this.bytesOut)});e(c$,"connect",function(){});
c(c$,"outputBytes",function(a){this.bytesOut=a},"~A");c(c$,"outputString",function(a){this.postOut=a},"~S");c(c$,"getContents",function(){return this.doAjax()})}),q("JU"),r(["java.net.URLStreamHandler"],"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){c$=k(function(){this.protocol=null;n(this,arguments)},JU,"AjaxURLStreamHandler",java.net.URLStreamHandler);p(c$,function(a){x(this,JU.AjaxURLStreamHandler,[]);this.protocol=a},"~S");e(c$,"openConnection",function(a){return new JU.AjaxURLConnection(a)},
"java.net.URL");e(c$,"toExternalForm",function(a){var b=new JU.SB;b.append(a.getProtocol());b.append(":");null!=a.getAuthority()&&0<a.getAuthority().length&&(b.append("//"),b.append(a.getAuthority()));null!=a.getPath()&&b.append(a.getPath());null!=a.getQuery()&&(b.append("?"),b.append(a.getQuery()));null!=a.getRef()&&(b.append("#"),b.append(a.getRef()));return b.toString()},"java.net.URL")}),q("JU"),r(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],
function(){c$=k(function(){this.htFactories=null;n(this,arguments)},JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);F(c$,function(){this.htFactories=new java.util.Hashtable});e(c$,"createURLStreamHandler",function(a){var b=this.htFactories.get(a);null==b&&this.htFactories.put(a,b=new JU.AjaxURLStreamHandler(a));return null==b.protocol?null:b},"~S")}),q("JU"),r(null,"JU.AU",["java.util.Arrays","JU.Lst"],function(){c$=t(JU,"AU");c$.ensureLength=c(c$,"ensureLength",function(a,
b){return null!=a&&JU.AU.getLength(a)>=b?a:JU.AU.arrayCopyObject(a,b)},"~O,~N");c$.ensureLengthS=c(c$,"ensureLengthS",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyS(a,b)},"~A,~N");c$.ensureLengthA=c(c$,"ensureLengthA",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyF(a,b)},"~A,~N");c$.ensureLengthI=c(c$,"ensureLengthI",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyI(a,b)},"~A,~N");c$.ensureLengthShort=c(c$,"ensureLengthShort",function(a,b){return null!=a&&a.length>=
b?a:JU.AU.arrayCopyShort(a,b)},"~A,~N");c$.ensureLengthByte=c(c$,"ensureLengthByte",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyByte(a,b)},"~A,~N");c$.doubleLength=c(c$,"doubleLength",function(a){return JU.AU.arrayCopyObject(a,null==a?16:2*JU.AU.getLength(a))},"~O");c$.doubleLengthS=c(c$,"doubleLengthS",function(a){return JU.AU.arrayCopyS(a,null==a?16:2*a.length)},"~A");c$.doubleLengthF=c(c$,"doubleLengthF",function(a){return JU.AU.arrayCopyF(a,null==a?16:2*a.length)},"~A");c$.doubleLengthI=
c(c$,"doubleLengthI",function(a){return JU.AU.arrayCopyI(a,null==a?16:2*a.length)},"~A");c$.doubleLengthShort=c(c$,"doubleLengthShort",function(a){return JU.AU.arrayCopyShort(a,null==a?16:2*a.length)},"~A");c$.doubleLengthByte=c(c$,"doubleLengthByte",function(a){return JU.AU.arrayCopyByte(a,null==a?16:2*a.length)},"~A");c$.doubleLengthBool=c(c$,"doubleLengthBool",function(a){return JU.AU.arrayCopyBool(a,null==a?16:2*a.length)},"~A");c$.deleteElements=c(c$,"deleteElements",function(a,b,d){if(0==d||
null==a)return a;var c=JU.AU.getLength(a);if(b>=c)return a;c-=b+d;0>c&&(c=0);var f=JU.AU.newInstanceO(a,b+c);0<b&&System.arraycopy(a,0,f,0,b);0<c&&System.arraycopy(a,b+d,f,b,c);return f},"~O,~N,~N");c$.arrayCopyObject=c(c$,"arrayCopyObject",function(a,b){if(null==a)return null;var d=JU.AU.getLength(a);if(b==d)return a;var c=JU.AU.newInstanceO(a,b);System.arraycopy(a,0,c,0,d<b?d:b);return c},"~O,~N");c$.newInstanceO=c(c$,"newInstanceO",function(a,b){return Array(b)},"~O,~N");c$.getLength=c(c$,"getLength",
function(a){return a.length},"~O");c$.arrayCopyS=c(c$,"arrayCopyS",function(a,b){0>b&&(b=a.length);var d=Array(b);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");c$.arrayCopyII=c(c$,"arrayCopyII",function(a,b){var d=JU.AU.newInt2(b);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");c$.arrayCopyPt=c(c$,"arrayCopyPt",function(a,b){0>b&&(b=a.length);var d=Array(b);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");
c$.arrayCopyF=c(c$,"arrayCopyF",function(a,b){0>b&&(b=a.length);var d=W(b,0);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");c$.arrayCopyI=c(c$,"arrayCopyI",function(a,b){0>b&&(b=a.length);var d=E(b,0);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");c$.arrayCopyRangeI=c(c$,"arrayCopyRangeI",function(a,b,d){if(null==a)return null;var c=a.length;-1==d&&(d=c);-2==d&&(d=v(c/2));d-=b;c=E(d,0);System.arraycopy(a,b,c,0,d);return c},"~A,~N,~N");
c$.arrayCopyRangeRevI=c(c$,"arrayCopyRangeRevI",function(a,b,d){if(null==a)return null;b=JU.AU.arrayCopyRangeI(a,b,d);0>d&&(d=a.length);for(a=v(d/2);0<=--a;)JU.AU.swapInt(b,a,d-1-a);return b},"~A,~N,~N");c$.arrayCopyShort=c(c$,"arrayCopyShort",function(a,b){0>b&&(b=a.length);var d=da(b,0);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");c$.arrayCopyByte=c(c$,"arrayCopyByte",function(a,b){0>b&&(b=a.length);var d=H(b,0);if(null!=a){var c=a.length;System.arraycopy(a,0,
d,0,c<b?c:b)}return d},"~A,~N");c$.arrayCopyBool=c(c$,"arrayCopyBool",function(a,b){0>b&&(b=a.length);var d=$(b,!1);if(null!=a){var c=a.length;System.arraycopy(a,0,d,0,c<b?c:b)}return d},"~A,~N");c$.swapInt=c(c$,"swapInt",function(a,b,d){var c=a[b];a[b]=a[d];a[d]=c},"~A,~N,~N");c$.dumpArray=c(c$,"dumpArray",function(a,b,d,c,f,h){a="dumpArray: "+a+"\n";for(var e=d;e<=c;e++)a+="\t*"+e+"*";for(;h>=f;h--){a+="\n*"+h+"*";for(e=d;e<=c;e++)a+="\t"+(e<b.length&&h<b[e].length?b[e][h]:NaN)}return a},"~S,~A,~N,~N,~N,~N");
c$.dumpIntArray=c(c$,"dumpIntArray",function(a,b){for(var d="",c=0;c<b;c++)d+=" "+a[c];return d},"~A,~N");c$.sortedItem=c(c$,"sortedItem",function(a,b){if(0==a.size())return null;if(1==a.size())return a.get(0);var d=a.toArray(Array(a.size()));java.util.Arrays.sort(d);return d[b%d.length]},"JU.Lst,~N");c$.createArrayOfArrayList=c(c$,"createArrayOfArrayList",function(a){return Array(a)},"~N");c$.createArrayOfHashtable=c(c$,"createArrayOfHashtable",function(a){return Array(a)},"~N");c$.swap=c(c$,"swap",
function(a,b,d){var c=a[b];a[b]=a[d];a[d]=c},"~A,~N,~N");c$.newFloat2=c(c$,"newFloat2",function(a){return D(a,null)},"~N");c$.newInt2=c(c$,"newInt2",function(a){return D(a,null)},"~N");c$.newInt3=c(c$,"newInt3",function(a){return D(a,null)},"~N,~N");c$.newFloat3=c(c$,"newFloat3",function(a){return D(a,null)},"~N,~N");c$.newInt4=c(c$,"newInt4",function(a){return D(a,null)},"~N");c$.newShort2=c(c$,"newShort2",function(a){return D(a,null)},"~N");c$.newByte2=c(c$,"newByte2",function(a){return D(a,null)},
"~N");c$.newDouble2=c(c$,"newDouble2",function(a){return D(a,null)},"~N");c$.removeMapKeys=c(c$,"removeMapKeys",function(a,b){for(var d=new JU.Lst,c,f=a.keySet().iterator();f.hasNext()&&((c=f.next())||1);)c.startsWith(b)&&d.addLast(c);for(c=d.size();0<=--c;)a.remove(d.get(c));return d.size()},"java.util.Map,~S")}),q("JU"),r(null,"JU.Base64",["JU.SB"],function(){c$=t(JU,"Base64");c$.getBytes64=c(c$,"getBytes64",function(a){return JU.Base64.getBase64(a).toBytes(0,-1)},"~A");c$.getBase64=c(c$,"getBase64",
function(a){var b=a.length,d=new JU.SB;if(0==b)return d;for(var c=0,f=0;c<b&&0==f;){0==c%75&&0!=c&&d.append("\r\n");var f=c+2==b?1:c+1==b?2:0,h=a[c++]<<16&16711680|(2==f?0:a[c++]<<8)&65280|(1<=f?0:a[c++])&255;d.appendC(JU.Base64.base64.charAt(h>>18&63));d.appendC(JU.Base64.base64.charAt(h>>12&63));d.appendC(2==f?"=":JU.Base64.base64.charAt(h>>6&63));d.appendC(1<=f?"=":JU.Base64.base64.charAt(h&63))}return d},"~A");c$.decodeBase64=c(c$,"decodeBase64",function(a){var b=0,d,c=a.indexOf(";base64,")+1;
0<c&&(c+=7);a=a.toCharArray();var f=a.length;if(0==f)return H(0,0);for(var h=f;--h>=c;)b+=65==(d=a[h].charCodeAt(0)&127)||0<JU.Base64.decode64[d]?3:0;for(var b=b>>2,e=H(b,0),j=18,h=c,l=c=0;h<f;h++)if(0<JU.Base64.decode64[d=a[h].charCodeAt(0)&127]||65==d||61==d)l|=JU.Base64.decode64[d]<<j,j-=6,0>j&&(e[c++]=(l&16711680)>>16,c<b&&(e[c++]=(l&65280)>>8),c<b&&(e[c++]=l&255),j=18,l=0);return e},"~S");C(c$,"base64","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","decode64",[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])}),q("JU"),r(["javajs.api.JSONEncodable"],"JU.BS",["java.lang.IndexOutOfBoundsException","$.NegativeArraySizeException","JU.PT","$.SB"],function(){c$=k(function(){this.words=null;this.wordsInUse=0;this.sizeIsSticky=
!1;n(this,arguments)},JU,"BS",null,[Cloneable,javajs.api.JSONEncodable]);c$.wordIndex=c(c$,"wordIndex",function(a){return a>>5},"~N");c(c$,"recalculateWordsInUse",function(){var a;for(a=this.wordsInUse-1;0<=a&&0==this.words[a];a--);this.wordsInUse=a+1});p(c$,function(){this.initWords(32);this.sizeIsSticky=!1});c$.newN=c(c$,"newN",function(a){var b=new JU.BS;b.init(a);return b},"~N");c(c$,"init",function(a){if(0>a)throw new NegativeArraySizeException("nbits < 0: "+a);this.initWords(a);this.sizeIsSticky=
!0},"~N");c(c$,"initWords",function(a){this.words=E(JU.BS.wordIndex(a-1)+1,0)},"~N");c(c$,"ensureCapacity",function(a){this.words.length<a&&(a=Math.max(2*this.words.length,a),this.setLength(a),this.sizeIsSticky=!1)},"~N");c(c$,"expandTo",function(a){a+=1;this.wordsInUse<a&&(this.ensureCapacity(a),this.wordsInUse=a)},"~N");c(c$,"set",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=JU.BS.wordIndex(a);this.expandTo(b);this.words[b]|=1<<a},"~N");c(c$,"setBitTo",function(a,
b){b?this.set(a):this.clear(a)},"~N,~B");c(c$,"setBits",function(a,b){if(a!=b){var d=JU.BS.wordIndex(a),c=JU.BS.wordIndex(b-1);this.expandTo(c);var f=-1<<a,h=-1>>>-b;if(d==c)this.words[d]|=f&h;else{this.words[d]|=f;for(d+=1;d<c;d++)this.words[d]=-1;this.words[c]|=h}}},"~N,~N");c(c$,"clear",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=JU.BS.wordIndex(a);b>=this.wordsInUse||(this.words[b]&=~(1<<a),this.recalculateWordsInUse())},"~N");c(c$,"clearBits",function(a,b){if(a!=
b){var d=JU.BS.wordIndex(a);if(!(d>=this.wordsInUse)){var c=JU.BS.wordIndex(b-1);c>=this.wordsInUse&&(b=this.length(),c=this.wordsInUse-1);var f=-1<<a,h=-1>>>-b;if(d==c)this.words[d]&=~(f&h);else{this.words[d]&=~f;for(d+=1;d<c;d++)this.words[d]=0;this.words[c]&=~h}this.recalculateWordsInUse()}}},"~N,~N");c(c$,"clearAll",function(){for(;0<this.wordsInUse;)this.words[--this.wordsInUse]=0});c(c$,"get",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=JU.BS.wordIndex(a);
return b<this.wordsInUse&&0!=(this.words[b]&1<<a)},"~N");c(c$,"nextSetBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var b=JU.BS.wordIndex(a);if(b>=this.wordsInUse)return-1;for(a=this.words[b]&-1<<a;;){if(0!=a)return 32*b+Integer.numberOfTrailingZeros(a);if(++b==this.wordsInUse)return-1;a=this.words[b]}},"~N");c(c$,"nextClearBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var b=JU.BS.wordIndex(a);if(b>=this.wordsInUse)return a;for(a=
~this.words[b]&-1<<a;;){if(0!=a)return 32*b+Integer.numberOfTrailingZeros(a);if(++b==this.wordsInUse)return 32*this.wordsInUse;a=~this.words[b]}},"~N");c(c$,"length",function(){return 0==this.wordsInUse?0:32*(this.wordsInUse-1)+(32-Integer.numberOfLeadingZeros(this.words[this.wordsInUse-1]))});c(c$,"isEmpty",function(){return 0==this.wordsInUse});c(c$,"intersects",function(a){for(var b=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=b;b--)if(0!=(this.words[b]&a.words[b]))return!0;return!1},"JU.BS");c(c$,
"cardinality",function(){for(var a=0,b=0;b<this.wordsInUse;b++)a+=Integer.bitCount(this.words[b]);return a});c(c$,"and",function(a){if(this!==a){for(;this.wordsInUse>a.wordsInUse;)this.words[--this.wordsInUse]=0;for(var b=0;b<this.wordsInUse;b++)this.words[b]&=a.words[b];this.recalculateWordsInUse()}},"JU.BS");c(c$,"or",function(a){if(this!==a){var b=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var d=0;d<
b;d++)this.words[d]|=a.words[d];b<a.wordsInUse&&System.arraycopy(a.words,b,this.words,b,this.wordsInUse-b)}},"JU.BS");c(c$,"xor",function(a){var b=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var d=0;d<b;d++)this.words[d]^=a.words[d];b<a.wordsInUse&&System.arraycopy(a.words,b,this.words,b,a.wordsInUse-b);this.recalculateWordsInUse()},"JU.BS");c(c$,"andNot",function(a){for(var b=Math.min(this.wordsInUse,a.wordsInUse)-
1;0<=b;b--)this.words[b]&=~a.words[b];this.recalculateWordsInUse()},"JU.BS");e(c$,"hashCode",function(){for(var a=1234,b=this.wordsInUse;0<=--b;)a^=this.words[b]*(b+1);return a>>32^a});c(c$,"size",function(){return 32*this.words.length});e(c$,"equals",function(a){if(!w(a,JU.BS))return!1;if(this===a)return!0;if(this.wordsInUse!=a.wordsInUse)return!1;for(var b=0;b<this.wordsInUse;b++)if(this.words[b]!=a.words[b])return!1;return!0},"~O");e(c$,"clone",function(){!this.sizeIsSticky&&this.wordsInUse!=this.words.length&&
this.setLength(this.wordsInUse);return JU.BS.copy(this)});c(c$,"setLength",function(a){var b=E(a,0);System.arraycopy(this.words,0,b,0,Math.min(this.wordsInUse,a));this.words=b},"~N");e(c$,"toString",function(){return JU.BS.escape(this,"{","}")});c$.copy=c(c$,"copy",function(a){var b;b=ea(a);var d=a.wordsInUse;0==d?b.words=JU.BS.emptyBitmap:(b.words=E(b.wordsInUse=d,0),System.arraycopy(a.words,0,b.words,0,d));return b},"JU.BS");c(c$,"cardinalityN",function(a){for(var b=this.cardinality(),d=this.length();--d>=
a;)this.get(d)&&b--;return b},"~N");e(c$,"toJSON",function(){var a=128<this.wordsInUse?this.cardinality():32*this.wordsInUse,a=JU.SB.newN(6*a+2);a.appendC("[");var b=this.nextSetBit(0);if(-1!=b){a.appendI(b);for(b=this.nextSetBit(b+1);0<=b;b=this.nextSetBit(b+1)){var d=this.nextClearBit(b);do a.append(", ").appendI(b);while(++b<d)}}a.appendC("]");return a.toString()});c$.escape=c(c$,"escape",function(a,b,d){if(null==a)return b+"{}"+d;var c=new JU.SB;c.append(b+"{");b=a.length();for(var f=-1,h=-2,
e=-1;++e<=b;){var j=a.get(e);if(e==b||0<=f&&!j){0<=f&&h!=f&&c.append((h==f-1?" ":":")+f);if(e==b)break;f=-1}a.get(e)&&(0>f&&(c.append((-2==h?"":" ")+e),h=e),f=e)}c.append("}").appendC(d);return c.toString()},"JU.BS,~S,~S");c$.unescape=c(c$,"unescape",function(a){var b,d;if(null==a||4>(d=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(b=a.charAt(0))&&"["!=b||a.charAt(d-1)!=("("==b?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=d-2)return null;for(var c=d-=2;2<=--c;)if(!JU.PT.isDigit(b=a.charAt(c))&&
" "!=b&&"\t"!=b&&":"!=b)return null;for(var f=d;JU.PT.isDigit(a.charAt(--f)););if(++f==d)f=0;else try{f=Integer.parseInt(a.substring(f,d))}catch(h){if(y(h,NumberFormatException))return null;throw h;}for(var e=JU.BS.newN(f),j=f=-1,l=-2,c=2;c<=d;c++)switch(b=a.charAt(c)){case "\t":case " ":case "}":if(0>l)break;if(l<f)return null;f=l;0>j&&(j=l);e.setBits(j,l+1);j=-1;l=-2;break;case ":":j=f=l;l=-2;break;default:JU.PT.isDigit(b)&&(0>l&&(l=0),l=10*l+(b.charCodeAt(0)-48))}return 0<=j?null:e},"~S");C(c$,
"ADDRESS_BITS_PER_WORD",5,"BITS_PER_WORD",32,"WORD_MASK",4294967295,"emptyBitmap",E(0,0))}),q("JU"),r(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){c$=t(JU,"CU");c$.toRGBHexString=c(c$,"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 c="00"+Integer.toHexString(d>>8&255),c=c.substring(c.length-2),d="00"+Integer.toHexString(d&255),d=d.substring(d.length-2);return a+c+d},"javajs.api.GenericColor");c$.toCSSString=
c(c$,"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");c$.getArgbFromString=c(c$,"getArgbFromString",function(a){var d=0;if(null==a||0==(d=a.length))return 0;if("["==a.charAt(0)&&"]"==a.charAt(d-1)){var c;if(0<=a.indexOf(",")){c=JU.PT.split(a.substring(1,a.length-1),",");if(3!=c.length)return 0;a=JU.PT.parseFloat(c[0]);d=JU.PT.parseFloat(c[1]);c=JU.PT.parseFloat(c[2]);
return JU.CU.colorTriadToFFRGB(a,d,c)}switch(d){case 9:c="x";break;case 10:c="0x";break;default:return 0}if(1!=a.indexOf(c))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(f){if(y(f,Exception))return 0;throw f;}a=JU.CU.mapJavaScriptColors.get(a.toLowerCase());return null==a?0:a.intValue()},"~S");c$.colorTriadToFFRGB=c(c$,"colorTriadToFFRGB",function(a,d,c){1>=a&&(1>=d&&1>=c)&&(0<a&&(a=256*a-1),0<d&&(d=256*d-1),
0<c&&(c=256*c-1));return JU.CU.rgb(G(a),G(d),G(c))},"~N,~N,~N");c$.rgb=c(c$,"rgb",function(a,d,c){return 4278190080|a<<16|d<<8|c},"~N,~N,~N");c$.colorPtFromString=c(c$,"colorPtFromString",function(a){return JU.CU.colorPtFromInt(JU.CU.getArgbFromString(a),null)},"~S");c$.colorPtFromInt=c(c$,"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");c$.colorPtToFFRGB=c(c$,"colorPtToFFRGB",function(a){return JU.CU.colorTriadToFFRGB(a.x,a.y,a.z)},"JU.T3");
c$.toRGB3f=c(c$,"toRGB3f",function(a,d){d[0]=(a>>16&255)/255;d[1]=(a>>8&255)/255;d[2]=(a&255)/255},"~N,~A");c$.toFFGGGfromRGB=c(c$,"toFFGGGfromRGB",function(a){a=v((2989*(a>>16&255)+5870*(a>>8&255)+1140*(a&255)+5E3)/1E4)&16777215;return JU.CU.rgb(a,a,a)},"~N");c$.rgbToHSL=c(c$,"rgbToHSL",function(a,d){var c=a.x/255,f=a.y/255,h=a.z/255,e=Math.min(c,Math.min(f,h)),j=Math.max(c,Math.max(f,h)),l=j+e,e=j-e,c=60*(0==e?0:j==c?(f-h)/e+6:j==f?(h-c)/e+2:(c-f)/e+4)%360,f=e/(0==e?1:1>=l?l:2-l);return d?JU.P3.new3(Math.round(10*
c)/10,Math.round(1E3*f)/10,Math.round(500*l)/10):JU.P3.new3(c,100*f,50*l)},"JU.P3,~B");c$.hslToRGB=c(c$,"hslToRGB",function(a){var d=Math.max(0,Math.min(360,a.x))/60,c=Math.max(0,Math.min(100,a.y))/100;a=Math.max(0,Math.min(100,a.z))/100;var c=a-(0.5>a?a:1-a)*c,f=2*(a-c);a=JU.CU.toRGB(c,f,d+2);var h=JU.CU.toRGB(c,f,d),d=JU.CU.toRGB(c,f,d-2);return JU.P3.new3(Math.round(255*a),Math.round(255*h),Math.round(255*d))},"JU.P3");c$.toRGB=c(c$,"toRGB",function(a,d,c){return 1>(c+=0>c?6:6<c?-6:0)?a+d*c:3>
c?a+d:4>c?a+d*(4-c):a},"~N,~N,~N");C(c$,"colorNames","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 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 pinktint redorange yellowtint".split(" "),
"colorArgbs",[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,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,4294945723,4294919424,4294375029]);c$.mapJavaScriptColors=c$.prototype.mapJavaScriptColors=new java.util.Hashtable;for(var a=JU.CU.colorNames.length;0<=--a;)JU.CU.mapJavaScriptColors.put(JU.CU.colorNames[a],Integer.$valueOf(JU.CU.colorArgbs[a]))}),q("JU"),r(["java.lang.Boolean"],
"JU.DF",["java.lang.Double","$.Float","JU.PT","$.SB"],function(){c$=t(JU,"DF");c$.setUseNumberLocalization=c(c$,"setUseNumberLocalization",function(a){JU.DF.useNumberLocalization[0]=a?Boolean.TRUE:Boolean.FALSE},"~B");c$.formatDecimalDbl=c(c$,"formatDecimalDbl",function(a,b){return 2147483647==b||-Infinity==a||Infinity==a||Double.isNaN(a)?""+a:JU.DF.formatDecimal(a,b)},"~N,~N");c$.formatDecimal=c(c$,"formatDecimal",function(a,b){if(2147483647==b||-Infinity==a||Infinity==a||Float.isNaN(a))return""+
a;var d;if(0>b){b=-b;b>JU.DF.formattingStrings.length&&(b=JU.DF.formattingStrings.length);if(0==a)return JU.DF.formattingStrings[b]+"E+0";var c;1>Math.abs(a)?(d=10,c=1E-10*a):(d=-10,c=1E10*a);c=(""+c).toUpperCase();var f=c.indexOf("E");d=JU.PT.parseInt(c.substring(f+1))+d;return 0>f?""+a:JU.DF.formatDecimal(JU.PT.parseFloat(c.substring(0,f)),b-1)+"E"+(0<=d?"+":"")+d}b>=JU.DF.formattingStrings.length&&(b=JU.DF.formattingStrings.length-1);c=(""+a).toUpperCase();var h=c.startsWith("-");h&&(c=c.substring(1));
d=c.indexOf(".");if(0>d)return c+JU.DF.formattingStrings[b].substring(1);f=c.indexOf("E-");0<f&&(d=JU.PT.parseInt(c.substring(f+1)),c="0."+"0000000000000000000000000000000000000000".substring(0,-d-1)+c.substring(0,1)+c.substring(2,f),d=1);f=c.indexOf("E");0<f&&(d=JU.PT.parseInt(c.substring(f+1)),c=c.substring(0,1)+c.substring(2,f)+"0000000000000000000000000000000000000000",c=c.substring(0,d+1)+"."+c.substring(d+1),d=c.indexOf("."));var e=c.length,f=b+d+1;if(f<e&&"5"<=c.charAt(f))return JU.DF.formatDecimal(a+
(h?-1:1)*JU.DF.formatAdds[b],b);for(var j=JU.SB.newS(c.substring(0,0==b?d:++d)),f=0;f<b;f++,d++)d<e?j.appendC(c.charAt(d)):j.appendC("0");c=(h?"-":"")+j;return Boolean.TRUE.equals(JU.DF.useNumberLocalization[0])?c:c.$replace(",",".")},"~N,~N");c$.formatDecimalTrimmed=c(c$,"formatDecimalTrimmed",function(a,b){for(var d=JU.DF.formatDecimalDbl(a,b),c=d.length-1;0<=c&&"0"==d.charAt(c);)c--;return d.substring(0,c+1)},"~N,~N");C(c$,"formattingStrings","0 0.0 0.00 0.000 0.0000 0.00000 0.000000 0.0000000 0.00000000 0.000000000".split(" "),
"zeros","0000000000000000000000000000000000000000","formatAdds",[0.5,0.05,0.005,5E-4,5E-5,5E-6,5E-7,5E-8,5E-9,5E-10]);c$.useNumberLocalization=c$.prototype.useNumberLocalization=[Boolean.TRUE]}),q("JU"),r(["java.lang.Enum"],"JU.Encoding",null,function(){c$=t(JU,"Encoding",Enum);s(c$,"NONE",0,[]);s(c$,"UTF8",1,[]);s(c$,"UTF_16BE",2,[]);s(c$,"UTF_16LE",3,[]);s(c$,"UTF_32BE",4,[]);s(c$,"UTF_32LE",5,[])}),q("JU"),r(["java.util.ArrayList"],"JU.Lst",null,function(){c$=t(JU,"Lst",java.util.ArrayList);c(c$,
"addLast",function(a){return this.add1(a)},"~O");c(c$,"removeObj",function(a){return this.removeObject(a)},"~O")}),q("JU"),r(null,"JU.M34",["java.lang.ArrayIndexOutOfBoundsException"],function(){c$=k(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;n(this,arguments)},JU,"M34");c(c$,"setAA33",function(a){var b=a.x,d=a.y,c=a.z;a=a.angle;var f=Math.sqrt(b*b+d*d+c*c),f=1/f,b=b*f,d=d*f,c=c*f,h=Math.cos(a);a=Math.sin(a);f=1-h;this.m00=h+b*b*f;this.m11=h+d*d*
f;this.m22=h+c*c*f;var h=b*d*f,e=c*a;this.m01=h-e;this.m10=h+e;h=b*c*f;e=d*a;this.m02=h+e;this.m20=h-e;h=d*c*f;e=b*a;this.m12=h-e;this.m21=h+e},"JU.A4");c(c$,"rotate",function(a){this.rotate2(a,a)},"JU.T3");c(c$,"rotate2",function(a,b){b.set(this.m00*a.x+this.m01*a.y+this.m02*a.z,this.m10*a.x+this.m11*a.y+this.m12*a.z,this.m20*a.x+this.m21*a.y+this.m22*a.z)},"JU.T3,JU.T3");c(c$,"setM33",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.M34");c(c$,"clear33",function(){this.m00=this.m01=this.m02=this.m10=this.m11=this.m12=this.m20=this.m21=this.m22=0});c(c$,"set33",function(a,b,d){switch(a){case 0:switch(b){case 0:this.m00=d;return;case 1:this.m01=d;return;case 2:this.m02=d;return}break;case 1:switch(b){case 0:this.m10=d;return;case 1:this.m11=d;return;case 2:this.m12=d;return}break;case 2:switch(b){case 0:this.m20=d;return;case 1:this.m21=d;return;case 2:this.m22=d;return}}this.err()},"~N,~N,~N");
c(c$,"get33",function(a,b){switch(a){case 0:switch(b){case 0:return this.m00;case 1:return this.m01;case 2:return this.m02}break;case 1:switch(b){case 0:return this.m10;case 1:return this.m11;case 2:return this.m12}break;case 2:switch(b){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22}}this.err();return 0},"~N,~N");c(c$,"setRow33",function(a,b){switch(a){case 0:this.m00=b[0];this.m01=b[1];this.m02=b[2];break;case 1:this.m10=b[0];this.m11=b[1];this.m12=b[2];break;case 2:this.m20=
b[0];this.m21=b[1];this.m22=b[2];break;default:this.err()}},"~N,~A");c(c$,"getRow33",function(a,b){switch(a){case 0:b[0]=this.m00;b[1]=this.m01;b[2]=this.m02;return;case 1:b[0]=this.m10;b[1]=this.m11;b[2]=this.m12;return;case 2:b[0]=this.m20;b[1]=this.m21;b[2]=this.m22;return}this.err()},"~N,~A");c(c$,"setColumn33",function(a,b){switch(a){case 0:this.m00=b[0];this.m10=b[1];this.m20=b[2];break;case 1:this.m01=b[0];this.m11=b[1];this.m21=b[2];break;case 2:this.m02=b[0];this.m12=b[1];this.m22=b[2];break;
default:this.err()}},"~N,~A");c(c$,"getColumn33",function(a,b){switch(a){case 0:b[0]=this.m00;b[1]=this.m10;b[2]=this.m20;break;case 1:b[0]=this.m01;b[1]=this.m11;b[2]=this.m21;break;case 2:b[0]=this.m02;b[1]=this.m12;b[2]=this.m22;break;default:this.err()}},"~N,~A");c(c$,"add33",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.M34");c(c$,"sub33",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.M34");c(c$,"mul33",function(a){this.m00*=a;this.m01*=a;this.m02*=a;this.m10*=a;this.m11*=a;this.m12*=a;this.m20*=a;this.m21*=a;this.m22*=a},"~N");c(c$,"transpose33",function(){var a=this.m01;this.m01=this.m10;this.m10=a;a=this.m02;this.m02=this.m20;this.m20=a;a=this.m12;this.m12=this.m21;this.m21=a});c(c$,"setXRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m02=
this.m01=0;this.m11=b;this.m12=-a;this.m20=0;this.m21=a;this.m22=b},"~N");c(c$,"setYRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=0;this.m02=a;this.m10=0;this.m11=1;this.m12=0;this.m20=-a;this.m21=0;this.m22=b},"~N");c(c$,"setZRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=-a;this.m02=0;this.m10=a;this.m11=b;this.m21=this.m20=this.m12=0;this.m22=1},"~N");c(c$,"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(c$,"err",function(){throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");})}),q("JU"),r(["JU.M34"],"JU.M3",["JU.T3"],function(){c$=t(JU,"M3",JU.M34,java.io.Serializable);c$.newA9=c(c$,"newA9",function(a){var b=new JU.M3;b.setA(a);return b},"~A");c$.newM3=c(c$,"newM3",function(a){var b=new JU.M3;if(null==a)return b.setScale(1),b;b.m00=a.m00;b.m01=a.m01;b.m02=a.m02;b.m10=a.m10;b.m11=a.m11;b.m12=a.m12;
b.m20=a.m20;b.m21=a.m21;b.m22=a.m22;return b},"JU.M3");c(c$,"setScale",function(a){this.clear33();this.m00=this.m11=this.m22=a},"~N");c(c$,"setM3",function(a){this.setM33(a)},"JU.M34");c(c$,"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(c$,"setElement",function(a,b,d){this.set33(a,b,d)},"~N,~N,~N");c(c$,"getElement",function(a,b){return this.get33(a,b)},"~N,~N");c(c$,"setRow",function(a,b,d,
c){switch(a){case 0:this.m00=b;this.m01=d;this.m02=c;break;case 1:this.m10=b;this.m11=d;this.m12=c;break;case 2:this.m20=b;this.m21=d;this.m22=c;break;default:this.err()}},"~N,~N,~N,~N");c(c$,"setRowV",function(a,b){switch(a){case 0:this.m00=b.x;this.m01=b.y;this.m02=b.z;break;case 1:this.m10=b.x;this.m11=b.y;this.m12=b.z;break;case 2:this.m20=b.x;this.m21=b.y;this.m22=b.z;break;default:this.err()}},"~N,JU.T3");c(c$,"setRowA",function(a,b){this.setRow33(a,b)},"~N,~A");e(c$,"getRow",function(a,b){this.getRow33(a,
b)},"~N,~A");c(c$,"setColumn3",function(a,b,d,c){switch(a){case 0:this.m00=b;this.m10=d;this.m20=c;break;case 1:this.m01=b;this.m11=d;this.m21=c;break;case 2:this.m02=b;this.m12=d;this.m22=c;break;default:this.err()}},"~N,~N,~N,~N");c(c$,"setColumnV",function(a,b){switch(a){case 0:this.m00=b.x;this.m10=b.y;this.m20=b.z;break;case 1:this.m01=b.x;this.m11=b.y;this.m21=b.z;break;case 2:this.m02=b.x;this.m12=b.y;this.m22=b.z;break;default:this.err()}},"~N,JU.T3");c(c$,"getColumnV",function(a,b){switch(a){case 0:b.x=
this.m00;b.y=this.m10;b.z=this.m20;break;case 1:b.x=this.m01;b.y=this.m11;b.z=this.m21;break;case 2:b.x=this.m02;b.y=this.m12;b.z=this.m22;break;default:this.err()}},"~N,JU.T3");c(c$,"setColumnA",function(a,b){this.setColumn33(a,b)},"~N,~A");c(c$,"getColumn",function(a,b){this.getColumn33(a,b)},"~N,~A");c(c$,"add",function(a){this.add33(a)},"JU.M3");c(c$,"sub",function(a){this.sub33(a)},"JU.M3");c(c$,"transpose",function(){this.transpose33()});c(c$,"transposeM",function(a){this.setM33(a);this.transpose33()},
"JU.M3");c(c$,"invertM",function(a){this.setM33(a);this.invert()},"JU.M3");c(c$,"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(c$,"setAsXRotation",
function(a){this.setXRot(a);return this},"~N");c(c$,"setAsYRotation",function(a){this.setYRot(a);return this},"~N");c(c$,"setAsZRotation",function(a){this.setZRot(a);return this},"~N");c(c$,"scale",function(a){this.mul33(a)},"~N");c(c$,"mul",function(a){this.mul2(this,a)},"JU.M3");c(c$,"mul2",function(a,b){this.set9(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21,a.m00*b.m02+a.m01*b.m12+a.m02*b.m22,a.m10*b.m00+a.m11*b.m10+a.m12*b.m20,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21,a.m10*
b.m02+a.m11*b.m12+a.m12*b.m22,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20,a.m20*b.m01+a.m21*b.m11+a.m22*b.m21,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22)},"JU.M3,JU.M3");e(c$,"equals",function(a){return!w(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");e(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.m00)^JU.T3.floatToIntBits0(this.m01)^JU.T3.floatToIntBits0(this.m02)^JU.T3.floatToIntBits0(this.m10)^
JU.T3.floatToIntBits0(this.m11)^JU.T3.floatToIntBits0(this.m12)^JU.T3.floatToIntBits0(this.m20)^JU.T3.floatToIntBits0(this.m21)^JU.T3.floatToIntBits0(this.m22)});c(c$,"setZero",function(){this.clear33()});c(c$,"set9",function(a,b,d,c,f,h,e,j,l){this.m00=a;this.m01=b;this.m02=d;this.m10=c;this.m11=f;this.m12=h;this.m20=e;this.m21=j;this.m22=l},"~N,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"toString",function(){return"[\n  ["+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(c$,"setAA",function(a){this.setAA33(a);return this},"JU.A4");c(c$,"setAsBallRotation",function(a,b,d){var c=Math.sqrt(b*b+d*d),f=c*a;if(0==f)return this.setScale(1),!1;a=Math.cos(f);f=Math.sin(f);d=-d/c;b/=c;c=a-1;this.m00=1+c*d*d;this.m01=this.m10=c*d*b;this.m20=-(this.m02=f*d);this.m11=1+c*b*b;this.m21=-(this.m12=f*b);this.m22=a;return!0},"~N,~N,~N");c(c$,"isRotation",function(){return 0.001>Math.abs(this.determinant3()-1)})}),q("JU"),r(["JU.M34"],
"JU.M4",["JU.T3"],function(){c$=k(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m13=this.m03=0;n(this,arguments)},JU,"M4",JU.M34);c$.newA16=c(c$,"newA16",function(a){var b=new JU.M4;b.m00=a[0];b.m01=a[1];b.m02=a[2];b.m03=a[3];b.m10=a[4];b.m11=a[5];b.m12=a[6];b.m13=a[7];b.m20=a[8];b.m21=a[9];b.m22=a[10];b.m23=a[11];b.m30=a[12];b.m31=a[13];b.m32=a[14];b.m33=a[15];return b},"~A");c$.newM4=c(c$,"newM4",function(a){var b=new JU.M4;if(null==a)return b.setIdentity(),b;b.setToM3(a);b.m03=a.m03;
b.m13=a.m13;b.m23=a.m23;b.m30=a.m30;b.m31=a.m31;b.m32=a.m32;b.m33=a.m33;return b},"JU.M4");c$.newMV=c(c$,"newMV",function(a,b){var d=new JU.M4;d.setMV(a,b);return d},"JU.M3,JU.T3");c(c$,"setZero",function(){this.clear33();this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=this.m33=0});c(c$,"setIdentity",function(){this.setZero();this.m00=this.m11=this.m22=this.m33=1});c(c$,"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(c$,"setMV",function(a,b){this.setM33(a);this.setTranslation(b);this.m33=1},"JU.M3,JU.T3");c(c$,"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(c$,"setToAA",function(a){this.setIdentity();this.setAA33(a)},"JU.A4");c(c$,"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(c$,"setTranslation",function(a){this.m03=a.x;this.m13=a.y;this.m23=a.z},"JU.T3");c(c$,"setElement",function(a,b,d){if(3>a&&3>b)this.set33(a,b,d);else{(3<a||3<b)&&this.err();switch(a){case 0:this.m03=d;return;case 1:this.m13=d;return;case 2:this.m23=d;return}switch(b){case 0:this.m30=d;break;case 1:this.m31=d;break;case 2:this.m32=d;break;case 3:this.m33=d}}},"~N,~N,~N");c(c$,"getElement",function(a,b){if(3>a&&3>b)return this.get33(a,
b);if(3<a||3<b)return this.err(),0;switch(a){case 0:return this.m03;case 1:return this.m13;case 2:return this.m23;default:switch(b){case 0:return this.m30;case 1:return this.m31;case 2:return this.m32;default:return this.m33}}},"~N,~N");c(c$,"getTranslation",function(a){a.x=this.m03;a.y=this.m13;a.z=this.m23},"JU.T3");c(c$,"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(c$,"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(c$,"setRowA",function(a,b){3>a&&this.setRow33(a,b);switch(a){case 0:this.m03=b[3];return;case 1:this.m13=b[3];return;case 2:this.m23=b[3];return;case 3:this.m30=b[0];this.m31=b[1];this.m32=b[2];this.m33=b[3];return}this.err()},"~N,~A");e(c$,"getRow",function(a,b){3>a&&this.getRow33(a,b);switch(a){case 0:b[3]=this.m03;
return;case 1:b[3]=this.m13;return;case 2:b[3]=this.m23;return;case 3:b[0]=this.m30;b[1]=this.m31;b[2]=this.m32;b[3]=this.m33;return}this.err()},"~N,~A");c(c$,"setColumn4",function(a,b,d,c,f){0==a?(this.m00=b,this.m10=d,this.m20=c,this.m30=f):1==a?(this.m01=b,this.m11=d,this.m21=c,this.m31=f):2==a?(this.m02=b,this.m12=d,this.m22=c,this.m32=f):3==a?(this.m03=b,this.m13=d,this.m23=c,this.m33=f):this.err()},"~N,~N,~N,~N,~N");c(c$,"setColumnA",function(a,b){3>a&&this.setColumn33(a,b);switch(a){case 0:this.m30=
b[3];break;case 1:this.m31=b[3];break;case 2:this.m32=b[3];break;case 3:this.m03=b[0];this.m13=b[1];this.m23=b[2];this.m33=b[3];break;default:this.err()}},"~N,~A");c(c$,"getColumn",function(a,b){3>a&&this.getColumn33(a,b);switch(a){case 0:b[3]=this.m30;break;case 1:b[3]=this.m31;break;case 2:b[3]=this.m32;break;case 3:b[0]=this.m03;b[1]=this.m13;b[2]=this.m23;b[3]=this.m33;break;default:this.err()}},"~N,~A");c(c$,"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(c$,"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(c$,"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(c$,"set",function(a,b,d,c,f,h,e,j,l,u,p,n,k,q,s,r){this.m00=a;this.m01=b;this.m02=d;this.m03=c;this.m10=f;this.m11=h;this.m12=e;this.m13=j;this.m20=l;this.m21=u;this.m22=p;this.m23=n;this.m30=k;this.m31=q;this.m32=s;this.m33=r},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(c$,"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(c$,"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(c$,"mul",function(a){this.mul2(this,
a)},"JU.M4");c(c$,"mul2",function(a,b){this.set(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20+a.m03*b.m30,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21+a.m03*b.m31,a.m00*b.m02+a.m01*b.m12+a.m02*b.m22+a.m03*b.m32,a.m00*b.m03+a.m01*b.m13+a.m02*b.m23+a.m03*b.m33,a.m10*b.m00+a.m11*b.m10+a.m12*b.m20+a.m13*b.m30,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21+a.m13*b.m31,a.m10*b.m02+a.m11*b.m12+a.m12*b.m22+a.m13*b.m32,a.m10*b.m03+a.m11*b.m13+a.m12*b.m23+a.m13*b.m33,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20+a.m23*b.m30,a.m20*b.m01+a.m21*b.m11+
a.m22*b.m21+a.m23*b.m31,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22+a.m23*b.m32,a.m20*b.m03+a.m21*b.m13+a.m22*b.m23+a.m23*b.m33,a.m30*b.m00+a.m31*b.m10+a.m32*b.m20+a.m33*b.m30,a.m30*b.m01+a.m31*b.m11+a.m32*b.m21+a.m33*b.m31,a.m30*b.m02+a.m31*b.m12+a.m32*b.m22+a.m33*b.m32,a.m30*b.m03+a.m31*b.m13+a.m32*b.m23+a.m33*b.m33)},"JU.M4,JU.M4");c(c$,"transform",function(a){this.transform2(a,a)},"JU.T4");c(c$,"transform2",function(a,b){b.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(c$,"rotTrans",function(a){this.rotTrans2(a,a)},"JU.T3");c(c$,"rotTrans2",function(a,b){b.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 b},"JU.T3,JU.T3");c(c$,"setAsXYRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);
this.m22=b;this.m23=-a;this.m32=a;this.m33=b;return this},"~N");c(c$,"setAsYZRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m03=-a;this.m30=a;this.m33=b;return this},"~N");c(c$,"setAsXZRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m11=b;this.m13=-a;this.m31=a;this.m33=b;return this},"~N");e(c$,"equals",function(a){return!w(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");e(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.m00)^JU.T3.floatToIntBits0(this.m01)^JU.T3.floatToIntBits0(this.m02)^JU.T3.floatToIntBits0(this.m03)^JU.T3.floatToIntBits0(this.m10)^JU.T3.floatToIntBits0(this.m11)^JU.T3.floatToIntBits0(this.m12)^JU.T3.floatToIntBits0(this.m13)^JU.T3.floatToIntBits0(this.m20)^
JU.T3.floatToIntBits0(this.m21)^JU.T3.floatToIntBits0(this.m22)^JU.T3.floatToIntBits0(this.m23)^JU.T3.floatToIntBits0(this.m30)^JU.T3.floatToIntBits0(this.m31)^JU.T3.floatToIntBits0(this.m32)^JU.T3.floatToIntBits0(this.m33)});e(c$,"toString",function(){return"[\n  ["+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+"] ]"})}),
q("JU"),r(["java.io.OutputStream"],"JU.OC",["java.io.BufferedWriter","$.ByteArrayOutputStream","$.OutputStreamWriter","JU.Base64","$.SB"],function(){c$=k(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;n(this,arguments)},JU,"OC",java.io.OutputStream);c(c$,"setParams",function(a,b,d,c){this.bytePoster=a;this.fileName=b;if(this.$isBase64=";base64,".equals(b))b=
null,this.os0=c,c=null;this.os=c;this.isLocalFile=null!=b&&!JU.OC.isRemote(b);d&&(!this.$isBase64&&null!=c)&&(this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(c)));return this},"javajs.api.BytePoster,~S,~B,java.io.OutputStream");c(c$,"setBytes",function(a){this.bytes=a;return this},"~A");c(c$,"getFileName",function(){return this.fileName});c(c$,"getName",function(){return null==this.fileName?null:this.fileName.substring(this.fileName.lastIndexOf("/")+1)});c(c$,"getByteCount",function(){return this.byteCount});
c(c$,"setType",function(a){this.type=a},"~S");c(c$,"getType",function(){return this.type});c(c$,"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 b=a.getBytes();this.os.write(b,0,b.length);this.byteCount+=b.length;return this}}catch(d){if(!y(d,java.io.IOException))throw d;}this.byteCount+=a.length;return this},"~S");c(c$,"reset",function(){this.sb=null;this.initOS()});c(c$,"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(b){if(y(b,Exception))System.out.println(b.toString());else throw b;}this.byteCount=0}});e(c$,"write",function(a,b,d){null==this.os&&this.initOS();try{this.os.write(a,b,d)}catch(c){if(!y(c,java.io.IOException))throw c;}this.byteCount+=d},"~A,~N,~N");e(c$,"writeByteAsInt",
function(a){null==this.os&&this.initOS();this.os.writeByteAsInt(a);this.byteCount++},"~N");c(c$,"cancel",function(){this.isCanceled=!0;this.closeChannel()});c(c$,"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(!y(a,Exception))throw a;}if(this.isCanceled)return this.closed=!0,null;if(null==this.fileName){if(this.$isBase64){var b=
this.getBase64();null!=this.os0&&(this.os=this.os0,this.append(b));this.sb=new JU.SB;this.sb.append(b);this.$isBase64=!1;return this.closeChannel()}return null==this.sb?null:this.sb.toString()}this.closed=!0;b=null==this.sb?this.toByteArray():this.sb.toString();"function"==typeof this.fileName?this.fileName(b):Jmol._doAjax(this.fileName,null,b);return null});c(c$,"isBase64",function(){return this.$isBase64});c(c$,"getBase64",function(){return JU.Base64.getBase64(this.toByteArray()).toString()});c(c$,
"toByteArray",function(){return null!=this.bytes?this.bytes:w(this.os,java.io.ByteArrayOutputStream)?this.os.toByteArray():null});c(c$,"close",function(){this.closeChannel()});e(c$,"toString",function(){if(null!=this.bw)try{this.bw.flush()}catch(a){if(!y(a,java.io.IOException))throw a;}return null!=this.sb?this.closeChannel():this.byteCount+" bytes"});c(c$,"postByteArray",function(){var a=null==this.sb?this.toByteArray():this.sb.toString().getBytes();return this.bytePoster.postByteArray(this.fileName,
a)});c$.isRemote=c(c$,"isRemote",function(a){if(null==a)return!1;a=JU.OC.urlTypeIndex(a);return 0<=a&&4!=a},"~S");c$.isLocal=c(c$,"isLocal",function(a){if(null==a)return!1;a=JU.OC.urlTypeIndex(a);return 0>a||4==a},"~S");c$.urlTypeIndex=c(c$,"urlTypeIndex",function(a){if(null==a)return-2;for(var b=0;b<JU.OC.urlPrefixes.length;++b)if(a.startsWith(JU.OC.urlPrefixes[b]))return b;return-1},"~S");C(c$,"urlPrefixes",["http:","https:","sftp:","ftp:","file:"],"URL_LOCAL",4)}),q("JU"),r(["JU.T3"],"JU.P3",null,
function(){c$=t(JU,"P3",JU.T3);c$.newP=c(c$,"newP",function(a){var b=new JU.P3;b.x=a.x;b.y=a.y;b.z=a.z;return b},"JU.T3");c$.getUnlikely=c(c$,"getUnlikely",function(){return null==JU.P3.unlikely?JU.P3.unlikely=JU.P3.new3(3.141592653589793,2.718281828459045,8.539734222673566):JU.P3.unlikely});c$.new3=c(c$,"new3",function(a,b,d){var c=new JU.P3;c.x=a;c.y=b;c.z=d;return c},"~N,~N,~N");C(c$,"unlikely",null)}),q("JU"),r(["JU.T3i"],"JU.P3i",null,function(){c$=t(JU,"P3i",JU.T3i);c$.new3=c(c$,"new3",function(a,
b,d){var c=new JU.P3i;c.x=a;c.y=b;c.z=d;return c},"~N,~N,~N")}),q("JU"),r(["JU.T4"],"JU.P4",null,function(){c$=t(JU,"P4",JU.T4);c$.new4=c(c$,"new4",function(a,b,d,c){var f=new JU.P4;f.set4(a,b,d,c);return f},"~N,~N,~N,~N");c$.newPt=c(c$,"newPt",function(a){var b=new JU.P4;b.set4(a.x,a.y,a.z,a.w);return b},"JU.P4");c(c$,"distance4",function(a){var b=this.x-a.x,d=this.y-a.y,c=this.z-a.z;a=this.w-a.w;return Math.sqrt(b*b+d*d+c*c+a*a)},"JU.P4")}),q("JU"),r(null,"JU.PT","java.lang.Boolean $.Double $.Float $.Number java.util.Map javajs.api.JSONEncodable JU.AU $.DF $.Lst $.M34 $.M4 $.SB".split(" "),
function(){c$=t(JU,"PT");c$.parseInt=c(c$,"parseInt",function(a){return JU.PT.parseIntNext(a,[0])},"~S");c$.parseIntNext=c(c$,"parseIntNext",function(a,b){var d=a.length;return 0>b[0]||b[0]>=d?-2147483648:JU.PT.parseIntChecked(a,d,b)},"~S,~A");c$.parseIntChecked=c(c$,"parseIntChecked",function(a,b,d){var c=!1,f=0,h=d[0];if(0>h)return-2147483648;for(var e;h<b&&JU.PT.isWhiteSpace(a,h);)++h;var j=!1;h<b&&45==a.charCodeAt(h)&&(j=!0,++h);for(;h<b&&48<=(e=a.charCodeAt(h))&&57>=e;)f=10*f+(e-48),c=!0,++h;
c?j&&(f=-f):f=-2147483648;d[0]=h;return f},"~S,~N,~A");c$.isWhiteSpace=c(c$,"isWhiteSpace",function(a,b){var d;return 0<=b&&(" "==(d=a.charAt(b))||"\t"==d||"\n"==d)},"~S,~N");c$.parseFloatChecked=c(c$,"parseFloatChecked",function(a,b,d,c){var f=!1,h=d[0];if(c&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;h<b&&JU.PT.isWhiteSpace(a,h);)++h;var e=!1;h<b&&"-"==a.charAt(h)&&(++h,e=!0);for(var j=0,l=0,u=0;h<b&&48<=(j=a.charCodeAt(h))&&57>=j;)l=10*l+1*(j-48),++h,f=!0;var p=!1,n=0,k=0==l?-1:0;if(46==
j)for(p=!0;++h<b&&48<=(j=a.charCodeAt(h))&&57>=j;){f=!0;if(0>k){if(48==j){k--;continue}k=-k}n<JU.PT.decimalScale.length&&(u=10*u+1*(j-48),n++)}f?0<u?(f=u*JU.PT.decimalScale[n-1],f=1<k?k-2<JU.PT.decimalScale.length?f*JU.PT.decimalScale[k-2]:f*Math.pow(10,1-k):f+l):f=l:f=NaN;l=!1;if(h<b&&(69==j||101==j||68==j)){l=!0;if(++h>=b)return NaN;j=a.charCodeAt(h);if(43==j&&++h>=b)return NaN;d[0]=h;h=JU.PT.parseIntChecked(a,b,d);if(-2147483648==h)return NaN;0<h&&h<=JU.PT.tensScale.length?f*=JU.PT.tensScale[h-
1]:0>h&&-h<=JU.PT.decimalScale.length?f*=JU.PT.decimalScale[-h-1]:0!=h&&(f*=Math.pow(10,h))}else d[0]=h;e&&(f=-f);Infinity==f&&(f=3.4028235E38);return!c||(!l||p)&&JU.PT.checkTrailingText(a,d[0],b)?f:NaN},"~S,~N,~A,~B");c$.checkTrailingText=c(c$,"checkTrailingText",function(a,b,d){for(var c;b<d&&(JU.PT.isWhitespace(c=a.charAt(b))||";"==c);)++b;return b==d},"~S,~N,~N");c$.parseFloatArray=c(c$,"parseFloatArray",function(a){return JU.PT.parseFloatArrayNext(a,E(1,0),null,null,null)},"~S");c$.parseFloatArrayInfested=
c(c$,"parseFloatArrayInfested",function(a,b){for(var d=b.length,c=a.length,f=0,h=0,e=0;0<=e&&e<d&&f<c;e++){for(var j;Float.isNaN(j=JU.PT.parseFloat(a[f++]))&&f<c;);Float.isNaN(j)||(b[h=e]=j);if(f==c)break}return h+1},"~A,~A");c$.parseFloatArrayNext=c(c$,"parseFloatArrayNext",function(a,b,d,c,f){var h=0,e=b[0];0<=e&&(null!=c&&(h=a.indexOf(c,e),0<=h&&(b[0]=h+c.length)),a=a.substring(b[0]),e=null==f?-1:a.indexOf(f),0>e?e=a.length:a=a.substring(0,e),b[0]+=e+1,a=JU.PT.getTokens(a),null==d&&(d=W(a.length,
0)),h=JU.PT.parseFloatArrayInfested(a,d));if(null==d)return W(0,0);for(a=h;a<d.length;a++)d[a]=NaN;return d},"~S,~A,~A,~S,~S");c$.parseFloatRange=c(c$,"parseFloatRange",function(a,b,d){var c=a.length;b>c&&(b=c);return 0>d[0]||d[0]>=b?NaN:JU.PT.parseFloatChecked(a,b,d,!1)},"~S,~N,~A");c$.parseFloatNext=c(c$,"parseFloatNext",function(a,b){var d=null==a?-1:a.length;return 0>b[0]||b[0]>=d?NaN:JU.PT.parseFloatChecked(a,d,b,!1)},"~S,~A");c$.parseFloatStrict=c(c$,"parseFloatStrict",function(a){var b=a.length;
return 0==b?NaN:JU.PT.parseFloatChecked(a,b,[0],!0)},"~S");c$.parseFloat=c(c$,"parseFloat",function(a){return JU.PT.parseFloatNext(a,[0])},"~S");c$.parseIntRadix=c(c$,"parseIntRadix",function(a,b){return Integer.parseIntRadix(a,b)},"~S,~N");c$.getTokens=c(c$,"getTokens",function(a){return JU.PT.getTokensAt(a,0)},"~S");c$.parseToken=c(c$,"parseToken",function(a){return JU.PT.parseTokenNext(a,[0])},"~S");c$.parseTrimmed=c(c$,"parseTrimmed",function(a){return JU.PT.parseTrimmedRange(a,0,a.length)},"~S");
c$.parseTrimmedAt=c(c$,"parseTrimmedAt",function(a,b){return JU.PT.parseTrimmedRange(a,b,a.length)},"~S,~N");c$.parseTrimmedRange=c(c$,"parseTrimmedRange",function(a,b,d){var c=a.length;d<c&&(c=d);return c<b?"":JU.PT.parseTrimmedChecked(a,b,c)},"~S,~N,~N");c$.getTokensAt=c(c$,"getTokensAt",function(a,b){if(null==a)return null;var d=a.length;if(0>b||b>d)return null;var c=JU.PT.countTokens(a,b),f=Array(c),h=E(1,0);h[0]=b;for(var e=0;e<c;++e)f[e]=JU.PT.parseTokenChecked(a,d,h);return f},"~S,~N");c$.countTokens=
c(c$,"countTokens",function(a,b){var d=0;if(null!=a)for(var c=a.length;;){for(;b<c&&JU.PT.isWhiteSpace(a,b);)++b;if(b==c)break;++d;do++b;while(b<c&&!JU.PT.isWhiteSpace(a,b))}return d},"~S,~N");c$.parseTokenNext=c(c$,"parseTokenNext",function(a,b){var d=a.length;return 0>b[0]||b[0]>=d?null:JU.PT.parseTokenChecked(a,d,b)},"~S,~A");c$.parseTokenRange=c(c$,"parseTokenRange",function(a,b,d){var c=a.length;b>c&&(b=c);return 0>d[0]||d[0]>=b?null:JU.PT.parseTokenChecked(a,b,d)},"~S,~N,~A");c$.parseTokenChecked=
c(c$,"parseTokenChecked",function(a,b,d){for(var c=d[0];c<b&&JU.PT.isWhiteSpace(a,c);)++c;for(var f=c;c<b&&!JU.PT.isWhiteSpace(a,c);)++c;d[0]=c;return f==c?null:a.substring(f,c)},"~S,~N,~A");c$.parseTrimmedChecked=c(c$,"parseTrimmedChecked",function(a,b,d){for(;b<d&&JU.PT.isWhiteSpace(a,b);)++b;for(d-=1;d>=b&&JU.PT.isWhiteSpace(a,d);)--d;return d<b?"":a.substring(b,d+1)},"~S,~N,~N");c$.dVal=c(c$,"dVal",function(a){if(null==a)throw new NumberFormatException("null");var b=parseFloat(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+
a);return b},"~S");c$.fVal=c(c$,"fVal",function(a){return this.dVal(a)},"~S");c$.parseIntRange=c(c$,"parseIntRange",function(a,b,d){var c=a.length;b>c&&(b=c);return 0>d[0]||d[0]>=b?-2147483648:JU.PT.parseIntChecked(a,b,d)},"~S,~N,~A");c$.parseFloatArrayData=c(c$,"parseFloatArrayData",function(a,b){JU.PT.parseFloatArrayDataN(a,b,b.length)},"~A,~A");c$.parseFloatArrayDataN=c(c$,"parseFloatArrayDataN",function(a,b,d){for(;0<=--d;)b[d]=d>=a.length?NaN:JU.PT.parseFloat(a[d])},"~A,~A,~N");c$.split=c(c$,
"split",function(a,b){if(0==a.length)return[];var d=1,c=a.indexOf(b),f,h=b.length;if(0>c||0==h)return f=Array(1),f[0]=a,f;for(var e=a.length-h;0<=c&&c<e;d++)c=a.indexOf(b,c+h);f=Array(d);for(var j=c=0,l=0;0<=(j=a.indexOf(b,c))&&l+1<d;)f[l++]=a.substring(c,j),c=j+h;a.indexOf(b,e)!=e&&(e+=h);f[l]=a.substring(c,e);return f},"~S,~S");c$.getQuotedStringAt=c(c$,"getQuotedStringAt",function(a,b){return JU.PT.getQuotedStringNext(a,[b])},"~S,~N");c$.getQuotedStringNext=c(c$,"getQuotedStringNext",function(a,
b){var d=b[0];if(0>d||0>(d=a.indexOf('"',d)))return"";for(var c=d+1,f=a.length;++d<f&&'"'!=a.charAt(d);)"\\"==a.charAt(d)&&d++;b[0]=d+1;return a.substring(c,d)},"~S,~A");c$.getCSVString=c(c$,"getCSVString",function(a,b){var d=b[1];if(0>d||0>(d=a.indexOf('"',d)))return null;for(var c=b[0]=d,f=a.length,h=!1,e=!1;++d<f&&('"'!=a.charAt(d)||(h=d+1<f&&'"'==a.charAt(d+1)));)h&&(h=!1,e=!0,d++);if(d>=f)return b[1]=-1,null;b[1]=d+1;d=a.substring(c+1,d);return e?JU.PT.rep(JU.PT.rep(d,'""',"\x00"),"\x00",'"'):
d},"~S,~A");c$.isOneOf=c(c$,"isOneOf",function(a,b){if(0==b.length)return!1;";"!=b.charAt(0)&&(b=";"+b+";");return 0>a.indexOf(";")&&0<=b.indexOf(";"+a+";")},"~S,~S");c$.getQuotedAttribute=c(c$,"getQuotedAttribute",function(a,b){var d=a.indexOf(b+"=");return 0>d?null:JU.PT.getQuotedStringAt(a,d)},"~S,~S");c$.approx=c(c$,"approx",function(a,b){return Math.round(a*b)/b},"~N,~N");c$.rep=c(c$,"rep",function(a,b,d){if(null==a||0==b.length||0>a.indexOf(b))return a;var c=0<=d.indexOf(b);do a=a.$replace(b,
d);while(!c&&0<=a.indexOf(b));return a},"~S,~S,~S");c$.formatF=c(c$,"formatF",function(a,b,d,c,f){return JU.PT.formatS(JU.DF.formatDecimal(a,d),b,0,c,f)},"~N,~N,~N,~B,~B");c$.formatD=c(c$,"formatD",function(a,b,d,c,f){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-d),b,0,c,f)},"~N,~N,~N,~B,~B,~B");c$.formatS=c(c$,"formatS",function(a,b,d,c,f){if(null==a)return"";var h=a.length;2147483647!=d&&0<d&&d<h?a=a.substring(0,d):0>d&&0<=h+d&&(a=a.substring(h+d+1));d=b-a.length;if(0>=d)return a;b=f&&!c&&"-"==
a.charAt(0);f=f?"0":" ";var e=b?"-":f,h=new JU.SB;c&&h.append(a);for(h.appendC(e);0<--d;)h.appendC(f);c||h.append(b?f+a.substring(1):a);return h.toString()},"~S,~N,~N,~B,~B");c$.replaceWithCharacter=c(c$,"replaceWithCharacter",function(a,b,d){if(null==a)return null;for(var c=b.length;0<=--c;)a=a.$replace(b.charAt(c),d);return a},"~S,~S,~S");c$.replaceAllCharacters=c(c$,"replaceAllCharacters",function(a,b,d){for(var c=b.length;0<=--c;){var f=b.substring(c,c+1);a=JU.PT.rep(a,f,d)}return a},"~S,~S,~S");
c$.trim=c(c$,"trim",function(a,b){if(0==b.length)return a.trim();for(var d=a.length,c=0;c<d&&0<=b.indexOf(a.charAt(c));)c++;for(d=a.length-1;d>c&&0<=b.indexOf(a.charAt(d));)d--;return a.substring(c,d+1)},"~S,~S");c$.trimQuotes=c(c$,"trimQuotes",function(a){return null!=a&&1<a.length&&a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a},"~S");c$.isNonStringPrimitive=c(c$,"isNonStringPrimitive",function(a){return w(a,Number)||w(a,Boolean)},"~O");c$.arrayGet=c(c$,"arrayGet",function(a,b){return a[b]},
"~O,~N");c$.toJSON=c(c$,"toJSON",function(a,b){if(null==b)return JU.PT.packageJSON(a,null);if(JU.PT.isNonStringPrimitive(b))return JU.PT.packageJSON(a,b.toString());for(var d=null,c=null;;){if(w(b,String)){d=b;"undefined"==typeof d&&(d="null");0!=d.indexOf('{"')&&(d=JU.PT.rep(d,'"','\\"'),d=JU.PT.rep(d,"\n","\\n"),d='"'+d+'"');break}if(w(b,javajs.api.JSONEncodable)){if(null==(d=b.toJSON()))d="null";break}c=new JU.SB;if(w(b,java.util.Map)){c.append("{ ");for(var f="",h,e=b.keySet().iterator();e.hasNext()&&
((h=e.next())||1);)c.append(f).append(JU.PT.packageJSON(h,JU.PT.toJSON(null,b.get(h)))),f=",";c.append(" }");break}if(w(b,JU.Lst)){c.append("[ ");h=b.size();for(f=0;f<h;f++)0<f&&c.appendC(","),c.append(JU.PT.toJSON(null,b.get(f)));c.append(" ]");break}if(w(b,JU.M34)){h=w(b,JU.M4)?4:3;var e=W(h,0),j=b;c.appendC("[");for(f=0;f<h;f++)0<f&&c.appendC(","),j.getRow(f,e),c.append(JU.PT.toJSON(null,e));c.appendC("]");break}d=JU.PT.nonArrayString(b);if(null==d){c.append("[");h=JU.AU.getLength(b);for(f=0;f<
h;f++)0<f&&c.appendC(","),c.append(JU.PT.toJSON(null,JU.PT.arrayGet(b,f)));c.append("]");break}b=b.toString()}return JU.PT.packageJSON(a,null==d?c.toString():d)},"~S,~O");c$.nonArrayString=c(c$,"nonArrayString",function(a){a=a.toString();return a.startsWith("[object")&&a.endsWith("Array]")?null:a},"~O");c$.byteArrayToJSON=c(c$,"byteArrayToJSON",function(a){var b=new JU.SB;b.append("[");for(var d=a.length,c=0;c<d;c++)0<c&&b.appendC(","),b.appendI(a[c]&255);b.append("]");return b.toString()},"~A");
c$.packageJSON=c(c$,"packageJSON",function(a,b){return null==a?b:'"'+a+'": '+b},"~S,~S");c$.isAS=c(c$,"isAS",function(a){return ha(a)},"~O");c$.isASS=c(c$,"isASS",function(a){return ia(a)},"~O");c$.isAP=c(c$,"isAP",function(a){return ja(a)},"~O");c$.isAF=c(c$,"isAF",function(a){return aa(a)},"~O");c$.isAFloat=c(c$,"isAFloat",function(a){return ka(a)},"~O");c$.isAD=c(c$,"isAD",function(a){return aa(a)},"~O");c$.isADD=c(c$,"isADD",function(a){return ba(a)},"~O");c$.isAB=c(c$,"isAB",function(a){return Z(a)},
"~O");c$.isAI=c(c$,"isAI",function(a){return Z(a)},"~O");c$.isAII=c(c$,"isAII",function(a){return la(a)},"~O");c$.isAFF=c(c$,"isAFF",function(a){return ba(a)},"~O");c$.isAFFF=c(c$,"isAFFF",function(a){return ma(a)},"~O");c$.escapeUrl=c(c$,"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,"]","%5D");return a=JU.PT.rep(a," ","%20")},"~S");c$.esc=c(c$,"esc",function(a){if(null==a||0==a.length)return'""';for(var b=!1,
d=0;10>d;d+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(d))){b=!0;break}if(b)for(;10>d;){for(var b=-1,c='\\\\\tt\rr\nn""'.charAt(d++),f='\\\\\tt\rr\nn""'.charAt(d++),h=new JU.SB,e=0;0<=(b=a.indexOf(c,b+1));)h.append(a.substring(e,b)).appendC("\\").appendC(f),e=b+1;h.append(a.substring(e,a.length));a=h.toString()}return'"'+JU.PT.escUnicode(a)+'"'},"~S");c$.escUnicode=c(c$,"escUnicode",function(a){for(var b=a.length;0<=--b;)if(127<a.charCodeAt(b)){var d="0000"+Integer.toHexString(a.charCodeAt(b));a=
a.substring(0,b)+"\\u"+d.substring(d.length-4)+a.substring(b+1)}return a},"~S");c$.escF=c(c$,"escF",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");return a},"~N");c$.join=c(c$,"join",function(a,b,d){if(a.length<d)return null;var c=new JU.SB;for(c.append(a[d++]);d<a.length;d++)c.appendC(b).append(a[d]);return c.toString()},"~A,~S,~N");c$.isLike=c(c$,"isLike",function(a,b){var d=a.equals(b);if(d)return!0;var c=b.startsWith("*"),f=b.endsWith("*");return!c&&!f?d:c&&f?1==b.length||a.contains(b.substring(1,
b.length-1)):c?a.endsWith(b.substring(1)):a.startsWith(b.substring(0,b.length-1))},"~S,~S");c$.getMapValueNoCase=c(c$,"getMapValueNoCase",function(a,b){if("this".equals(b))return a;var d=a.get(b);if(null==d)for(var c,f=a.entrySet().iterator();f.hasNext()&&((c=f.next())||1);)if(c.getKey().equalsIgnoreCase(b))return c.getValue();return d},"java.util.Map,~S");c$.getMapSubset=c(c$,"getMapSubset",function(a,b,d){var c=a.get(b);if(null!=c)d.put(b,c);else{var f;for(a=a.entrySet().iterator();a.hasNext()&&
((f=a.next())||1);)c=f.getKey(),JU.PT.isLike(c,b)&&d.put(c,f.getValue())}},"java.util.Map,~S,java.util.Map");c$.clean=c(c$,"clean",function(a){return JU.PT.rep(JU.PT.replaceAllCharacters(a," \t\n\r"," "),"  "," ").trim()},"~S");c$.fdup=c(c$,"fdup",function(a,b,d){for(var c,f=0,h=b;1<=--h;)if(!JU.PT.isDigit(c=a.charAt(h)))switch(c){case ".":if(0!=f++)return a;continue;case "-":if(1!=h&&"."!=a.charAt(h-1))return a;continue;default:return a}c=a.substring(0,b+1);f=new JU.SB;for(h=0;h<d;h++)f.append(c);
f.append(a.substring(b+1));return f.toString()},"~S,~N,~N");c$.formatString=c(c$,"formatString",function(a,b,d,c,f,h){if(null==a)return null;if("".equals(a))return"";var e=b.length;if(0>a.indexOf("%")||0==e||0>a.indexOf(b))return a;var j="",l,u,p;for(l=0;0<=(u=a.indexOf("%",l))&&0<=(p=a.indexOf(b,u+1));)if(l!=u&&(j+=a.substring(l,u)),l=u+1,p>u+6)j+="%";else try{var n=!1;"-"==a.charAt(l)&&(n=!0,++l);var k=!1;"0"==a.charAt(l)&&(k=!0,++l);for(var q,s=0;"0"<=(q=a.charAt(l))&&"9">=q;)s=10*s+(q.charCodeAt(0)-
48),++l;var r=2147483647,t=!1;if("."==a.charAt(l)){++l;if("-"==(q=a.charAt(l)))t=!0,++l;if("0"<=(q=a.charAt(l))&&"9">=q)r=q.charCodeAt(0)-48,++l;t&&(r=-r-(null==d?1:0))}if(a.substring(l,l+e).equals(b)){if(l+=e,Float.isNaN(c)?null!=d?j+=JU.PT.formatS(d,s,r,n,k):Double.isNaN(f)||(j+=JU.PT.formatD(f,s,r,n,k,!0)):j+=JU.PT.formatF(c,s,r,n,k),h)break}else l=u+1,j+="%"}catch(w){if(y(w,IndexOutOfBoundsException)){l=u;break}else throw w;}return j+=a.substring(l)},"~S,~S,~S,~N,~N,~B");c$.formatStringS=c(c$,
"formatStringS",function(a,b,d){return JU.PT.formatString(a,b,d,NaN,NaN,!1)},"~S,~S,~S");c$.formatStringF=c(c$,"formatStringF",function(a,b,d){return JU.PT.formatString(a,b,null,d,NaN,!1)},"~S,~S,~N");c$.formatStringI=c(c$,"formatStringI",function(a,b,d){return JU.PT.formatString(a,b,""+d,NaN,NaN,!1)},"~S,~S,~N");c$.sprintf=c(c$,"sprintf",function(a,b,d){if(null==d)return a;var c=b.length;if(c==d.length)try{for(var f=0;f<c;f++)if(null!=d[f])switch(b.charAt(f)){case "s":a=JU.PT.formatString(a,"s",
d[f],NaN,NaN,!0);break;case "f":a=JU.PT.formatString(a,"f",null,d[f].floatValue(),NaN,!0);break;case "i":a=JU.PT.formatString(a,"d",""+d[f],NaN,NaN,!0);a=JU.PT.formatString(a,"i",""+d[f],NaN,NaN,!0);break;case "d":a=JU.PT.formatString(a,"e",null,NaN,d[f].doubleValue(),!0);break;case "p":var h=d[f];a=JU.PT.formatString(a,"p",null,h.x,NaN,!0);a=JU.PT.formatString(a,"p",null,h.y,NaN,!0);a=JU.PT.formatString(a,"p",null,h.z,NaN,!0);break;case "q":var e=d[f];a=JU.PT.formatString(a,"q",null,e.x,NaN,!0);
a=JU.PT.formatString(a,"q",null,e.y,NaN,!0);a=JU.PT.formatString(a,"q",null,e.z,NaN,!0);a=JU.PT.formatString(a,"q",null,e.w,NaN,!0);break;case "S":for(var j=d[f],l=0;l<j.length;l++)a=JU.PT.formatString(a,"s",j[l],NaN,NaN,!0);break;case "F":for(var u=d[f],l=0;l<u.length;l++)a=JU.PT.formatString(a,"f",null,u[l],NaN,!0);break;case "I":for(var p=d[f],l=0;l<p.length;l++)a=JU.PT.formatString(a,"d",""+p[l],NaN,NaN,!0);for(l=0;l<p.length;l++)a=JU.PT.formatString(a,"i",""+p[l],NaN,NaN,!0);break;case "D":for(var n=
d[f],l=0;l<n.length;l++)a=JU.PT.formatString(a,"e",null,NaN,n[l],!0)}return JU.PT.rep(a,"%%","%")}catch(k){if(!y(k,Exception))throw k;}System.out.println("TextFormat.sprintf error "+b+" "+a);return JU.PT.rep(a,"%","?")},"~S,~S,~A");c$.formatCheck=c(c$,"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 b=new JU.SB;b.append(a[0]);for(var d=1;d<a.length;d++){var c=
"%"+a[d],f;if(3<=c.length){if(0<=(f=c.indexOf("p")))c=JU.PT.fdup(c,f,3);if(0<=(f=c.indexOf("q")))c=JU.PT.fdup(c,f,4)}b.append(c)}return b.toString().$replace("\u0001","%")},"~S");c$.leftJustify=c(c$,"leftJustify",function(a,b,d){a.append(d);d=b.length-d.length;0<d&&a.append(b.substring(0,d))},"JU.SB,~S,~S");c$.rightJustify=c(c$,"rightJustify",function(a,b,d){var c=b.length-d.length;0<c&&a.append(b.substring(0,c));a.append(d)},"JU.SB,~S,~S");c$.safeTruncate=c(c$,"safeTruncate",function(a,b){-0.001<
a&&0.001>a&&(a=0);return(a+"         ").substring(0,b)},"~N,~N");c$.isWild=c(c$,"isWild",function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");c$.isMatch=c(c$,"isMatch",function(a,b,d,c){if(a.equals(b))return!0;var f=b.length;if(0==f)return!1;var h=d&&c?"*"==b.charAt(0):!1;if(1==f&&h)return!0;var e=d&&b.endsWith("*");if(!(0<=b.indexOf("?"))){if(h)return e?3>f||0<=a.indexOf(b.substring(1,f-1)):a.endsWith(b.substring(1));if(e)return a.startsWith(b.substring(0,f-1))}for(var j=a.length,
l="????",u=4;u<j;)l+=l,u+=4;d&&(h&&(b=l+b.substring(1),f+=u-1),e&&(b=b.substring(0,f-1)+l,f+=u-1));if(f<j)return!1;for(d=0;f>j;){if(c&&"?"==b.charAt(d))++d;else if("?"!=b.charAt(d+f-1))return!1;--f}for(c=j;0<=--c;)if(f=b.charAt(d+c),"?"!=f&&(j=a.charAt(c),f!=j&&("\u0001"!=f||"?"!=j)))return!1;return!0},"~S,~S,~B,~B");c$.replaceQuotedStrings=c(c$,"replaceQuotedStrings",function(a,b,d){for(var c=b.size(),f=0;f<c;f++){var h=b.get(f),e=d.get(f);e.equals(h)||(a=JU.PT.rep(a,'"'+h+'"','"'+e+'"'))}return a},
"~S,JU.Lst,JU.Lst");c$.replaceStrings=c(c$,"replaceStrings",function(a,b,d){for(var c=b.size(),f=0;f<c;f++){var h=b.get(f),e=d.get(f);e.equals(h)||(a=JU.PT.rep(a,h,e))}return a},"~S,JU.Lst,JU.Lst");c$.isDigit=c(c$,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~S");c$.isUpperCase=c(c$,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~S");c$.isLowerCase=c(c$,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~S");c$.isLetter=c(c$,"isLetter",function(a){a=
a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~S");c$.isLetterOrDigit=c(c$,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~S");c$.isWhitespace=c(c$,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a},"~S");c$.fixPtFloats=c(c$,"fixPtFloats",function(a,b){a.x=Math.round(a.x*b)/b;a.y=Math.round(a.y*b)/b;a.z=Math.round(a.z*b)/b},"JU.T3,~N");c$.fixDouble=c(c$,"fixDouble",function(a,b){return Math.round(a*b)/b},"~N,~N");
c$.parseFloatFraction=c(c$,"parseFloatFraction",function(a){var b=a.indexOf("/");return 0>b?JU.PT.parseFloat(a):JU.PT.parseFloat(a.substring(0,b))/JU.PT.parseFloat(a.substring(b+1))},"~S");C(c$,"tensScale",[10,100,1E3,1E4,1E5,1E6],"decimalScale",[0.1,0.01,0.001,1E-4,1E-5,1E-6,1E-7,1E-8,1E-9],"FLOAT_MIN_SAFE",2E-45,"escapable",'\\\\\tt\rr\nn""',"FRACTIONAL_PRECISION",1E5,"CARTESIAN_PRECISION",1E4)}),q("JU"),c$=k(function(){this.s=this.sb=null;n(this,arguments)},JU,"SB"),p(c$,function(){this.s=""}),
c$.newN=c(c$,"newN",function(){return new JU.SB},"~N"),c$.newS=c(c$,"newS",function(a){var b=new JU.SB;b.s=a;return b},"~S"),c(c$,"append",function(a){this.s+=a;return this},"~S"),c(c$,"appendC",function(a){this.s+=a;return this},"~S"),c(c$,"appendI",function(a){this.s+=a;return this},"~N"),c(c$,"appendB",function(a){this.s+=a;return this},"~B"),c(c$,"appendF",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N"),c(c$,"appendD",function(a){a=""+a;0>a.indexOf(".")&&
0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N"),c(c$,"appendSB",function(a){this.s+=a.s;return this},"JU.SB"),c(c$,"appendO",function(a){null!=a&&(this.s+=a.toString());return this},"~O"),c(c$,"appendCB",function(a,b,d){for(;0<=--d;)this.s+=a[b++]},"~A,~N,~N"),e(c$,"toString",function(){return this.s}),c(c$,"length",function(){return this.s.length}),c(c$,"indexOf",function(a){return this.s.indexOf(a)},"~S"),c(c$,"charAt",function(a){return this.s.charAt(a)},"~N"),c(c$,"charCodeAt",function(a){return this.s.charCodeAt(a)},
"~N"),c(c$,"setLength",function(a){this.s=this.s.substring(0,a)},"~N"),c(c$,"lastIndexOf",function(a){return this.s.lastIndexOf(a)},"~S"),c(c$,"indexOf2",function(a,b){return this.s.indexOf(a,b)},"~S,~N"),c(c$,"substring",function(a){return this.s.substring(a)},"~N"),c(c$,"substring2",function(a,b){return this.s.substring(a,b)},"~N,~N"),c(c$,"toBytes",function(a,b){0>b&&(b=this.length()-a);for(var d=H(b,0),c=a+b,f=c-a;--c>=a;)d[--f]=this.charAt(c).charCodeAt(0);return d},"~N,~N"),q("JU"),r(["javajs.api.JSONEncodable"],
"JU.T3",["java.lang.Float"],function(){c$=k(function(){this.z=this.y=this.x=0;n(this,arguments)},JU,"T3",null,[javajs.api.JSONEncodable,java.io.Serializable]);c(c$,"set",function(a,b,d){this.x=a;this.y=b;this.z=d},"~N,~N,~N");c(c$,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");c(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3");c(c$,"add2",function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z},"JU.T3,JU.T3");c(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=
a.z},"JU.T3");c(c$,"distanceSquared",function(a){var b=this.x-a.x,d=this.y-a.y;a=this.z-a.z;return b*b+d*d+a*a},"JU.T3");c(c$,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},"JU.T3");c(c$,"sub2",function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z},"JU.T3,JU.T3");c(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3");c(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");c(c$,"add3",function(a,b,d){this.x+=a;this.y+=b;this.z+=d},"~N,~N,~N");c(c$,"scaleT",
function(a){this.x*=a.x;this.y*=a.y;this.z*=a.z},"JU.T3");c(c$,"scaleAdd2",function(a,b,d){this.x=a*b.x+d.x;this.y=a*b.y+d.y;this.z=a*b.z+d.z},"~N,JU.T3,JU.T3");c(c$,"ave",function(a,b){this.x=(a.x+b.x)/2;this.y=(a.y+b.y)/2;this.z=(a.z+b.z)/2},"JU.T3,JU.T3");c(c$,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.T3");c(c$,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(c$,"length",function(){return Math.sqrt(this.lengthSquared())});c(c$,"normalize",function(){var a=
this.length();this.x/=a;this.y/=a;this.z/=a});c(c$,"cross",function(a,b){this.set(a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x)},"JU.T3,JU.T3");e(c$,"hashCode",function(){var a;a=31+JU.T3.floatToIntBits0(this.x);a=31*a+JU.T3.floatToIntBits0(this.y);a=31*a+JU.T3.floatToIntBits0(this.z);return a^a>>32});c$.floatToIntBits0=c(c$,"floatToIntBits0",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");e(c$,"equals",function(a){return!w(a,JU.T3)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");e(c$,
"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});e(c$,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+"]"})}),q("JU"),c$=k(function(){this.z=this.y=this.x=0;n(this,arguments)},JU,"T3i",null,java.io.Serializable),p(c$,function(){}),c(c$,"set",function(a,b,d){this.x=a;this.y=b;this.z=d},"~N,~N,~N"),c(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3i"),c(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3i"),c(c$,"scaleAdd",function(a,b,d){this.x=
a*b.x+d.x;this.y=a*b.y+d.y;this.z=a*b.z+d.z},"~N,JU.T3i,JU.T3i"),e(c$,"hashCode",function(){return this.x^this.y^this.z}),e(c$,"equals",function(a){return!w(a,JU.T3i)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O"),e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+")"}),q("JU"),r(["JU.T3"],"JU.T4",null,function(){c$=k(function(){this.w=0;n(this,arguments)},JU,"T4",JU.T3);c(c$,"set4",function(a,b,d,c){this.x=a;this.y=b;this.z=d;this.w=c},"~N,~N,~N,~N");c(c$,"scale4",function(a){this.scale(a);
this.w*=a},"~N");e(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.x)^JU.T3.floatToIntBits0(this.y)^JU.T3.floatToIntBits0(this.z)^JU.T3.floatToIntBits0(this.w)});e(c$,"equals",function(a){return!w(a,JU.T4)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.w==a.w},"~O");e(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"});e(c$,"toJSON",function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"})}),q("JU"),r(["JU.T3"],"JU.V3",null,function(){c$=t(JU,
"V3",JU.T3);p(c$,function(){});c$.newV=c(c$,"newV",function(a){return JU.V3.new3(a.x,a.y,a.z)},"JU.T3");c$.newVsub=c(c$,"newVsub",function(a,b){return JU.V3.new3(a.x-b.x,a.y-b.y,a.z-b.z)},"JU.T3,JU.T3");c$.new3=c(c$,"new3",function(a,b,d){var c=new JU.V3;c.x=a;c.y=b;c.z=d;return c},"~N,~N,~N");c(c$,"angle",function(a){var b=this.y*a.z-this.z*a.y,d=this.z*a.x-this.x*a.z,c=this.x*a.y-this.y*a.x,b=Math.sqrt(b*b+d*d+c*c);return Math.abs(Math.atan2(b,this.dot(a)))},"JU.V3")}),q("JU"),r(["JU.LoggerInterface"],
"JU.DefaultLogger",["JU.Logger"],function(){c$=t(JU,"DefaultLogger",null,JU.LoggerInterface);c(c$,"log",function(a,b,d,c){a===System.err&&System.out.flush();if(null!=a&&(null!=d||null!=c))if(a.println((JU.Logger.logLevel()?"["+JU.Logger.getLevel(b)+"] ":"")+(null!=d?d:"")+(null!=c?": "+c.toString():"")),null!=c&&(b=c.getStackTrace(),null!=b))for(d=0;d<b.length;d++)a.println(b[d].getClassName()+" - "+b[d].getLineNumber()+" - "+b[d].getMethodName());a===System.err&&System.err.flush()},"java.io.PrintStream,~N,~S,Throwable");
e(c$,"debug",function(a){this.log(System.out,5,a,null)},"~S");e(c$,"info",function(a){this.log(System.out,4,a,null)},"~S");e(c$,"warn",function(a){this.log(System.out,3,a,null)},"~S");e(c$,"warnEx",function(a,b){this.log(System.out,3,a,b)},"~S,Throwable");e(c$,"error",function(a){this.log(System.err,2,a,null)},"~S");e(c$,"errorEx",function(a,b){this.log(System.err,2,a,b)},"~S,Throwable");e(c$,"fatal",function(a){this.log(System.err,1,a,null)},"~S");e(c$,"fatalEx",function(a,b){this.log(System.err,
1,a,b)},"~S,Throwable")}),q("JU"),r(["java.util.Hashtable","JU.DefaultLogger"],"JU.Logger",["java.lang.Long"],function(){c$=t(JU,"Logger");c$.getProperty=c(c$,"getProperty",function(a,b){try{var d=System.getProperty("jmol.logger."+a,null);if(null!=d)return d.equalsIgnoreCase("true")}catch(c){if(!y(c,Exception))throw c;}return b},"~S,~B");c$.setLogger=c(c$,"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");c$.isActiveLevel=c(c$,"isActiveLevel",function(a){return null!=JU.Logger._logger&&0<=a&&7>a&&JU.Logger._activeLevels[a]},"~N");c$.setActiveLevel=c(c$,"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");c$.setLogLevel=c(c$,"setLogLevel",function(a){for(var b=
7;0<=--b;)JU.Logger.setActiveLevel(b,b<=a)},"~N");c$.getLevel=c(c$,"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");c$.logLevel=c(c$,"logLevel",function(){return JU.Logger._logLevel});c$.doLogLevel=c(c$,"doLogLevel",function(a){JU.Logger._logLevel=a},"~B");c$.debug=c(c$,"debug",function(a){if(JU.Logger.debugging)try{JU.Logger._logger.debug(a)}catch(b){}},"~S");c$.info=
c(c$,"info",function(a){try{JU.Logger.isActiveLevel(4)&&JU.Logger._logger.info(a)}catch(b){}},"~S");c$.warn=c(c$,"warn",function(a){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warn(a)}catch(b){}},"~S");c$.warnEx=c(c$,"warnEx",function(a,b){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warnEx(a,b)}catch(d){}},"~S,Throwable");c$.error=c(c$,"error",function(a){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.error(a)}catch(b){}},"~S");c$.errorEx=c(c$,"errorEx",function(a,b){try{JU.Logger.isActiveLevel(2)&&
JU.Logger._logger.errorEx(a,b)}catch(d){}},"~S,Throwable");c$.getLogLevel=c(c$,"getLogLevel",function(){for(var a=7;0<=--a;)if(JU.Logger.isActiveLevel(a))return a;return 0});c$.fatal=c(c$,"fatal",function(a){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatal(a)}catch(b){}},"~S");c$.fatalEx=c(c$,"fatalEx",function(a,b){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatalEx(a,b)}catch(d){}},"~S,Throwable");c$.startTimer=c(c$,"startTimer",function(a){null!=a&&JU.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},
"~S");c$.getTimerMsg=c(c$,"getTimerMsg",function(a,b){0==b&&(b=JU.Logger.getTimeFrom(a));return"Time for "+a+": "+b+" ms"},"~S,~N");c$.getTimeFrom=c(c$,"getTimeFrom",function(a){var b;return null==a||null==(b=JU.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-b.longValue()},"~S");c$.checkTimer=c(c$,"checkTimer",function(a,b){var d=JU.Logger.getTimeFrom(a);0<=d&&!a.startsWith("(")&&JU.Logger.info(JU.Logger.getTimerMsg(a,d));b&&JU.Logger.startTimer(a);return d},"~S,~B");c$.checkMemory=c(c$,"checkMemory",
function(){JU.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});c$._logger=c$.prototype._logger=new JU.DefaultLogger;C(c$,"LEVEL_FATAL",1,"LEVEL_ERROR",2,"LEVEL_WARN",3,"LEVEL_INFO",4,"LEVEL_DEBUG",5,"LEVEL_DEBUGHIGH",6,"LEVEL_MAX",7,"_activeLevels",$(7,!1),"_logLevel",!1,"debugging",!1,"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];c$.htTiming=c$.prototype.htTiming=new java.util.Hashtable}),q("JU"),B(JU,"LoggerInterface"),
q("J.api"),B(J.api,"JmolJDXMOLParser"),q("J.api"),B(J.api,"JmolJDXMOLReader"),q("J.jsv"),r(["J.api.JmolJDXMOLParser"],"J.jsv.JDXMOLParser","java.util.Hashtable JU.BS $.Lst $.PT $.SB JU.Logger".split(" "),function(){c$=k(function(){this.line=null;this.lastModel="";this.baseModel=this.thisModelID=null;this.vibScale=0;this.loader=this.piUnitsY=this.piUnitsX=null;this.modelIdList="";this.peakFilePath=this.peakIndex=null;n(this,arguments)},J.jsv,"JDXMOLParser",null,J.api.JmolJDXMOLParser);p(c$,function(){});
e(c$,"set",function(a,b,d){this.loader=a;this.peakFilePath=b;this.peakIndex=E(1,0);null!=d&&(d.remove("modelNumber"),d.containsKey("zipSet")&&(this.peakIndex=d.get("peakIndex"),null==this.peakIndex&&(this.peakIndex=E(1,0),d.put("peakIndex",this.peakIndex)),d.containsKey("subFileName")||(this.peakFilePath=JU.PT.split(b,"|")[0])));return this},"J.api.JmolJDXMOLReader,~S,java.util.Map");e(c$,"getAttribute",function(a,b){var d=JU.PT.getQuotedAttribute(a,b);return null==d?"":d},"~S,~S");e(c$,"getRecord",
function(a){if(null==this.line||0>this.line.indexOf(a))return null;for(a=this.line;0>a.indexOf(">");)a+=" "+this.readLine();return this.line=a},"~S");e(c$,"readModels",function(){if(!this.findRecord("Models"))return!1;this.thisModelID=this.line="";for(var a=!0;;){this.line=this.loader.discardLinesUntilNonBlank();if(null==this.getRecord("<ModelData"))break;this.getModelData(a);a=!1}return!0});e(c$,"readACDMolFile",function(){var a=new JU.SB;for(a.append(this.line.substring(this.line.indexOf("=")+1)).appendC("\n");null!=
this.readLine()&&!this.line.contains("$$$$");)a.append(this.line).appendC("\n");return JU.PT.rep(a.toString(),"  $$ Empty String","")});e(c$,"readACDAssignments",function(a,b){var d=new JU.Lst;try{this.readLine();0>a&&(a=2147483647);for(var c=0;c<a;c++){var f=this.readLine();if(null==f||0==f.indexOf("#"))break;if(b){for(;0>f.indexOf(">");)f+=" "+this.readLine();f=f.trim()}f=JU.PT.replaceAllCharacters(f,"()<>"," ").trim();if(0==f.length)break;var h=f.indexOf("'");if(0<=h)var e=f.indexOf("'",h+1),f=
f.substring(0,h)+JU.PT.rep(f.substring(h+1,e),",",";")+f.substring(e+1);JU.Logger.info("Peak Assignment: "+f);var j=JU.PT.split(f,",");d.addLast(j)}}catch(l){if(y(l,Exception))JU.Logger.error("Error reading peak assignments at "+this.line+": "+l);else throw l;}return d},"~N,~B");e(c$,"setACDAssignments",function(a,b,d,c,f){try{0<=d&&(this.peakIndex=[d]);var h=0==b.indexOf("MASS"),e=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/"));a=" model="+JU.PT.esc(a+" (assigned)");this.piUnitsY=this.piUnitsX=
"";var j=this.getACDPeakWidth(b)/2,l=new java.util.Hashtable,u=new JU.Lst;d=null;var p,n,k=0;if(h){d=new java.util.Hashtable;for(var q=JU.PT.split(f,"M  ZZC"),r=q.length;1<=--r;){var s=JU.PT.getTokens(q[r]),k=Math.max(k,JU.PT.parseInt(s[0]));d.put(s[1],s[0])}p=4;n=0}else 0<=b.indexOf("NMR")?(p=0,n=3):(p=0,n=2);for(var t=c.size(),r=0;r<t;r++){var w=c.get(r),v=JU.PT.parseFloat(w[p]),x=w[n],x=h?this.fixACDAtomList(x,d,k):x.$replace(";",",");if(0<=x.indexOf("select")){var z=x.indexOf("select atomno=");
if(0>z)continue;x=JU.PT.split(x.substring(z+14)," ")[0]}var A=h?"m/z="+Math.round(v)+": "+w[2]+" ("+w[1]+")":2==n?""+Math.round(10*v)/10:null;this.getStringInfo(e,A,b,a,x,l,""+v,u,' atoms="%ATOMS%" xMin="'+(v-j)+'" xMax="'+(v+j)+'">')}return this.setPeakData(u,0)}catch(B){if(y(B,Exception))return 0;throw B;}},"~S,~S,~N,JU.Lst,~S");c(c$,"fixACDAtomList",function(a,b,d){a=a.trim();a=JU.PT.getTokens(a.$replace(";"," "));for(var c=new JU.BS,f=!1,h=0;h<a.length;h++){var e=a[h];(f=0<=e.indexOf("M"))&&(e=
"1-"+d);var j=e.indexOf("-");if(0<=j)for(var l=JU.PT.parseInt(e.substring(0,j)),e=JU.PT.parseInt(e.substring(j+1))+1;l<e;l++)c.set(f?l:JU.PT.parseInt(b.get(""+l)));else c.set(JU.PT.parseInt(b.get(e)))}b=c.toJSON();return b.substring(1,b.length-1)},"~S,java.util.Map,~N");c(c$,"getACDPeakWidth",function(a){return 0<=a.indexOf("HNMR")?0.05:0<=a.indexOf("CNMR")?1:0<=a.indexOf("MASS")?1:10},"~S");e(c$,"readPeaks",function(a,b){try{0<=b&&(this.peakIndex=[b]);var d=a?1:0,c=a?"Signals":"Peaks",f=a?"<Signal":
"<PeakData";if(!this.findRecord(c))return 0;var h=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/")),e=JU.PT.getQuotedAttribute(this.line,"model"),e=" model="+JU.PT.esc(null==e?this.thisModelID:e),j=JU.PT.getQuotedAttribute(this.line,"type");this.piUnitsX=JU.PT.getQuotedAttribute(this.line,"xLabel");this.piUnitsY=JU.PT.getQuotedAttribute(this.line,"yLabel");for(var l=new java.util.Hashtable,u=new JU.Lst;null!=this.readLine()&&!(this.line=this.line.trim()).startsWith("</"+c);)if(this.line.startsWith(f)){this.getRecord(f);
JU.Logger.info(this.line);var p=JU.PT.getQuotedAttribute(this.line,"title");null==j&&(j=JU.PT.getQuotedAttribute(this.line,"type"));var n=JU.PT.getQuotedAttribute(this.line,"atoms"),k=G(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMin")))+"_"+G(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMax")));this.getStringInfo(h,p,j,null==JU.PT.getQuotedAttribute(this.line,"model")?e:"",n,l,k,u,this.line.substring(f.length).trim())}return this.setPeakData(u,d)}catch(q){if(y(q,Exception))return 0;
throw q;}},"~B,~N");c(c$,"setPeakData",function(a,b){for(var d=0,c=a.size(),f=0;f<c;f++){var h=a.get(f),e=JU.PT.rep(h[0],"%INDEX%",""+ ++this.peakIndex[0]),j=h[1];if(null!=j){for(var h="",l=j.nextSetBit(0);0<=l;l=j.nextSetBit(l+1))h+=","+(l+b);j=j.cardinality();d+=j;e=JU.PT.rep(e,"%ATOMS%",h.substring(1));e=JU.PT.rep(e,"%S%",1==j?"":"s");e=JU.PT.rep(e,"%NATOMS%",""+j)}JU.Logger.info("adding PeakData "+e);this.loader.addPeakData(e)}this.loader.setSpectrumPeaks(d,this.piUnitsX,this.piUnitsY);return c},
"JU.Lst,~N");c(c$,"getStringInfo",function(a,b,d,c,f,h,e,j,l){"HNMR".equals(d)?d="1HNMR":"CNMR".equals(d)&&(d="13CNMR");var u=null==d?"":" type="+JU.PT.esc(d);null==b&&(b="1HNMR".equals(d)?"atom%S%: %ATOMS%; integration: %NATOMS%":"");b=" title="+JU.PT.esc(b);a="<PeakData "+a+' index="%INDEX%"'+b+u+c+" "+l;null!=f&&(a=JU.PT.rep(a,'atoms="'+f+'"','atoms="%ATOMS%"'));b=h.get(e);null==b&&(b=[a,null==f?null:new JU.BS],h.put(e,b),j.addLast(b));null!=f&&(h=b[1],f=f.$replace(","," "),f.equals("*")&&(f="0:1000"),
h.or(JU.BS.unescape("({"+f+"})")))},"~S,~S,~S,~S,~S,java.util.Map,~S,JU.Lst,~S");c(c$,"getModelData",function(a){this.lastModel=this.thisModelID;this.thisModelID=this.getAttribute(this.line,"id");var b=";"+this.thisModelID+";";if(0<=this.modelIdList.indexOf(b))this.line=this.loader.discardLinesUntilContains("</ModelData>");else{this.modelIdList+=b;for(this.baseModel=this.getAttribute(this.line,"baseModel");0>this.line.indexOf(">")&&0>this.line.indexOf("type");)this.readLine();b=this.getAttribute(this.line,
"type").toLowerCase();this.vibScale=JU.PT.parseFloat(this.getAttribute(this.line,"vibrationScale"));b.equals("xyzvib")?b="xyz":0==b.length&&(b=null);for(var d=new JU.SB;null!=this.readLine()&&!this.line.contains("</ModelData>");)d.append(this.line).appendC("\n");this.loader.processModelData(d.toString(),this.thisModelID,b,this.baseModel,this.lastModel,NaN,this.vibScale,a)}},"~B");c(c$,"findRecord",function(a){null==this.line&&this.readLine();0>this.line.indexOf("<"+a)&&(this.line=this.loader.discardLinesUntilContains2("<"+
a,"##"));return 0<=this.line.indexOf("<"+a)},"~S");c(c$,"readLine",function(){return this.line=this.loader.rd()});e(c$,"setLine",function(a){this.line=a},"~S")}),q("JSV.api"),B(JSV.api,"AnnotationData"),q("JSV.api"),B(JSV.api,"AppletFrame"),q("JSV.api"),r(["JSV.api.JSVAppletInterface","$.ScriptInterface"],"JSV.api.JSVAppInterface",null,function(){B(JSV.api,"JSVAppInterface",[JSV.api.JSVAppletInterface,JSV.api.ScriptInterface])}),q("JSV.api"),B(JSV.api,"JSVAppletInterface"),q("JSV.api"),B(JSV.api,
"JSVFileHelper"),q("JSV.api"),r(["JSV.api.JSVViewPanel"],"JSV.api.JSVMainPanel",null,function(){B(JSV.api,"JSVMainPanel",JSV.api.JSVViewPanel)}),q("JSV.api"),r(["JSV.api.JSVViewPanel"],"JSV.api.JSVPanel",null,function(){B(JSV.api,"JSVPanel",JSV.api.JSVViewPanel)}),q("JSV.api"),B(JSV.api,"JSVTree"),q("JSV.api"),B(JSV.api,"JSVTreeNode"),q("JSV.api"),B(JSV.api,"JSVTreePath"),q("JSV.api"),B(JSV.api,"JSVViewPanel"),q("JSV.api"),B(JSV.api,"JSVZipReader"),q("JSV.api"),B(JSV.api,"PanelListener"),q("JSV.api"),
B(JSV.api,"ScriptInterface"),q("JSV.app"),r(["JSV.api.JSVAppInterface","$.PanelListener"],"JSV.app.JSVApp","java.lang.Double JU.Lst $.PT JSV.common.Coordinate $.JSVFileManager $.JSViewer $.PeakPickEvent $.ScriptToken $.SubSpecChangeEvent $.ZoomEvent JU.Logger".split(" "),function(){c$=k(function(){this.appletFrame=null;this.isNewWindow=!1;this.prevPanel=this.vwr=this.syncCallbackFunctionName=this.peakCallbackFunctionName=this.loadFileCallbackFunctionName=this.coordCallbackFunctionName=this.appletReadyCallbackFunctionName=
null;n(this,arguments)},JSV.app,"JSVApp",null,[JSV.api.PanelListener,JSV.api.JSVAppInterface]);p(c$,function(a,b){this.appletFrame=a;this.initViewer(b);this.initParams(a.getParameter("script"))},"JSV.api.AppletFrame,~B");c(c$,"initViewer",function(a){this.vwr=new JSV.common.JSViewer(this,!0,a);this.appletFrame.setDropTargetListener(this.isSigned(),this.vwr);a=this.appletFrame.getDocumentBase();JSV.common.JSVFileManager.setDocumentBase(this.vwr,a)},"~B");e(c$,"isPro",function(){return this.isSigned()});
e(c$,"isSigned",function(){return!0});c(c$,"getAppletFrame",function(){return this.appletFrame});c(c$,"dispose",function(){try{this.vwr.dispose()}catch(a){if(y(a,Exception))a.printStackTrace();else throw a;}});e(c$,"getPropertyAsJavaObject",function(a){return this.vwr.getPropertyAsJavaObject(a)},"~S");e(c$,"getPropertyAsJSON",function(a){return JU.PT.toJSON(null,this.getPropertyAsJavaObject(a))},"~S");e(c$,"getCoordinate",function(){return this.vwr.getCoordinate()});e(c$,"loadInline",function(a){this.siOpenDataOrFile(a,
null,null,null,-1,-1,!0,null,null);this.appletFrame.validateContent(3)},"~S");e(c$,"exportSpectrum",function(a,b){return this.vwr.$export(a,b)},"~S,~N");e(c$,"setFilePath",function(a){this.runScript("load "+JU.PT.esc(a))},"~S");e(c$,"setSpectrumNumber",function(a){this.runScript(JSV.common.ScriptToken.SPECTRUMNUMBER+" "+a)},"~N");e(c$,"reversePlot",function(){this.toggle(JSV.common.ScriptToken.REVERSEPLOT)});e(c$,"toggleGrid",function(){this.toggle(JSV.common.ScriptToken.GRIDON)});e(c$,"toggleCoordinate",
function(){this.toggle(JSV.common.ScriptToken.COORDINATESON)});e(c$,"toggleIntegration",function(){this.toggle(JSV.common.ScriptToken.INTEGRATE)});c(c$,"toggle",function(a){null!=this.vwr.selectedPanel&&this.runScript(a+" TOGGLE")},"JSV.common.ScriptToken");e(c$,"addHighlight",function(a,b,d,c,f,h){this.runScript("HIGHLIGHT "+a+" "+b+" "+d+" "+c+" "+f+" "+h)},"~N,~N,~N,~N,~N,~N");e(c$,"removeHighlight",function(a,b){this.runScript("HIGHLIGHT "+a+" "+b+" OFF")},"~N,~N");e(c$,"removeAllHighlights",
function(){this.runScript("HIGHLIGHT OFF")});e(c$,"syncScript",function(a){this.vwr.syncScript(a)},"~S");e(c$,"writeStatus",function(a){JU.Logger.info(a)},"~S");c(c$,"initParams",function(a){this.vwr.parseInitScript(a);this.newAppletPanel();this.vwr.setPopupMenu(this.vwr.allowMenu,this.vwr.parameters.getBoolean(JSV.common.ScriptToken.ENABLEZOOM));this.vwr.allowMenu&&this.vwr.closeSource(null);this.runScriptNow(a)},"~S");c(c$,"newAppletPanel",function(){JU.Logger.info("newAppletPanel");this.appletFrame.createMainPanel(this.vwr)});
e(c$,"repaint",function(){var a=null==this.vwr?null:this.vwr.html5Applet;a&&self.Jmol&&Jmol._repaint&&Jmol._repaint(a,!0)});c(c$,"updateJS",function(){},"~N,~N");e(c$,"runScriptNow",function(a){return this.vwr.runScriptNow(a)},"~S");c(c$,"checkCallbacks",function(){if(!(null==this.coordCallbackFunctionName&&null==this.peakCallbackFunctionName)){var a=new JSV.common.Coordinate,b=null==this.peakCallbackFunctionName?null:new JSV.common.Coordinate;if(this.vwr.pd().getPickedCoordinates(a,b)){var d=this.vwr.mainPanel.getCurrentPanelIndex();
null==b?this.appletFrame.callToJavaScript(this.coordCallbackFunctionName,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Integer.$valueOf(d+1)]):this.appletFrame.callToJavaScript(this.peakCallbackFunctionName,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Double.$valueOf(b.getXVal()),Double.$valueOf(b.getYVal()),Integer.$valueOf(d+1)])}}});c(c$,"doAdvanced",function(){},"~S");e(c$,"panelEvent",function(a){w(a,JSV.common.PeakPickEvent)?this.vwr.processPeakPickEvent(a,!1):w(a,
JSV.common.ZoomEvent)||w(a,JSV.common.SubSpecChangeEvent)},"~O");e(c$,"getSolnColour",function(){return this.vwr.getSolutionColorStr(!0)});c(c$,"updateJSView",function(a){var b=this.vwr.html5Applet,d=null==b?null:this.vwr.selectedPanel;b&&null!=b._viewSet&&b._updateView(d,a)},"~S");e(c$,"syncToJmol",function(a){this.updateJSView(a);null!=this.syncCallbackFunctionName&&(JU.Logger.info("JSVApp.syncToJmol JSV>Jmol "+a),this.appletFrame.callToJavaScript(this.syncCallbackFunctionName,[this.vwr.fullName,
a]))},"~S");e(c$,"setVisible",function(a){this.appletFrame.setPanelVisible(a)},"~B");e(c$,"setCursor",function(a){this.vwr.apiPlatform.setCursor(a,this.appletFrame)},"~N");e(c$,"runScript",function(a){this.vwr.runScript(a)},"~S");e(c$,"getScriptQueue",function(){return this.vwr.scriptQueue});e(c$,"siSetCurrentSource",function(a){this.vwr.currentSource=a},"JSV.source.JDXSource");e(c$,"siSendPanelChange",function(){this.vwr.selectedPanel!==this.prevPanel&&(this.prevPanel=this.vwr.selectedPanel,this.vwr.sendPanelChange())});
e(c$,"siNewWindow",function(a,b){this.isNewWindow=a;b?null!=this.vwr.jsvpPopupMenu&&this.vwr.jsvpPopupMenu.setSelected("Window",!1):this.appletFrame.newWindow(a)},"~B,~B");e(c$,"siValidateAndRepaint",function(){var a=this.vwr.pd();null!=a&&(a.taintedAll=!0);this.appletFrame.validate();this.repaint()},"~B");e(c$,"siSyncLoad",function(a){this.newAppletPanel();JU.Logger.info("JSVP syncLoad reading "+a);this.siOpenDataOrFile(null,null,null,a,-1,-1,!1,null,null);this.appletFrame.validateContent(3)},"~S");
e(c$,"siOpenDataOrFile",function(a,b,d,c,f,h,e,j,l){switch(this.vwr.openDataOrFile(a,b,d,c,f,h,e,l)){case 0:null!=j&&this.runScript(j);break;case -1:return;default:this.siSetSelectedPanel(null);return}null!=this.vwr.jsvpPopupMenu&&this.vwr.jsvpPopupMenu.setCompoundMenu(this.vwr.panelNodes,this.vwr.allowCompoundMenu);JU.Logger.info(this.appletFrame.getAppletInfo()+" File "+this.vwr.currentSource.getFilePath()+" Loaded Successfully")},"~O,~S,JU.Lst,~S,~N,~N,~B,~S,~S");e(c$,"siProcessCommand",function(a){this.vwr.runScriptNow(a)},
"~S");e(c$,"siSetSelectedPanel",function(a){this.vwr.mainPanel.setSelectedPanel(this.vwr,a,this.vwr.panelNodes);this.vwr.selectedPanel=a;this.vwr.spectraTree.setSelectedPanel(this,a);null==a&&(this.vwr.selectedPanel=a=this.appletFrame.getJSVPanel(this.vwr,null),this.vwr.mainPanel.setSelectedPanel(this.vwr,a,null));this.appletFrame.validate();null!=a&&(a.setEnabled(!0),a.setFocusable(!0))},"JSV.api.JSVPanel");e(c$,"siExecSetCallback",function(a,b){switch(a){case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:this.appletReadyCallbackFunctionName=
b;break;case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.loadFileCallbackFunctionName=b;break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:this.peakCallbackFunctionName=b;break;case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.syncCallbackFunctionName=b;break;case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:this.coordCallbackFunctionName=b}},"JSV.common.ScriptToken,~S");e(c$,"siLoaded",function(a){null!=this.loadFileCallbackFunctionName&&this.appletFrame.callToJavaScript(this.loadFileCallbackFunctionName,
[this.vwr.appletName,a]);this.updateJSView(null);return null},"~S");e(c$,"siExecHidden",function(){},"~B");e(c$,"siExecScriptComplete",function(a){this.vwr.showMessage(a);this.siValidateAndRepaint(!1)},"~S,~B");e(c$,"siUpdateBoolean",function(){},"JSV.common.ScriptToken,~B");e(c$,"siCheckCallbacks",function(){this.checkCallbacks()},"~S");e(c$,"siNodeSet",function(){this.appletFrame.validateContent(2);this.siValidateAndRepaint(!1)},"JSV.common.PanelNode");e(c$,"siSourceClosed",function(){},"JSV.source.JDXSource");
e(c$,"siGetNewJSVPanel",function(a){if(null==a)return this.vwr.initialEndIndex=this.vwr.initialStartIndex=-1,null;var b=new JU.Lst;b.addLast(a);a=this.appletFrame.getJSVPanel(this.vwr,b);a.getPanelData().addListener(this);this.vwr.parameters.setFor(a,null,!0);return a},"JSV.common.Spectrum");e(c$,"siGetNewJSVPanel2",function(a){if(null==a)return this.vwr.initialEndIndex=this.vwr.initialStartIndex=-1,this.appletFrame.getJSVPanel(this.vwr,null);a=this.appletFrame.getJSVPanel(this.vwr,a);this.vwr.initialEndIndex=
this.vwr.initialStartIndex=-1;a.getPanelData().addListener(this);this.vwr.parameters.setFor(a,null,!0);return a},"JU.Lst");e(c$,"siSetPropertiesFromPreferences",function(){this.vwr.checkAutoIntegrate()},"JSV.api.JSVPanel,~B");e(c$,"siSetLoaded",function(){},"~S,~S");e(c$,"siSetMenuEnables",function(){},"JSV.common.PanelNode,~B");e(c$,"siUpdateRecentMenus",function(){},"~S");e(c$,"siExecTest",function(){this.loadInline("")},"~S");e(c$,"print",function(a){return this.vwr.print(a)},"~S")}),q("JSV.app"),
r(["javajs.api.GenericMouseInterface","javajs.awt.event.Event"],"JSV.app.GenericMouse",["JU.Logger"],function(){c$=k(function(){this.jsvp=this.pd=null;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=0;this.disposed=this.isMouseDown=!1;n(this,arguments)},JSV.app,"GenericMouse",null,javajs.api.GenericMouseInterface);p(c$,function(a){this.jsvp=a;this.pd=a.getPanelData()},"JSV.api.JSVPanel");e(c$,"clear",function(){});e(c$,"processEvent",function(a,b,d,c,f){if(null==this.pd)return!this.disposed&&
(501==a&&0!=(c&4))&&this.jsvp.showMenu(b,d),!0;-1!=a&&(c=JSV.app.GenericMouse.applyLeftMouse(c));switch(a){case -1:this.wheeled(f,b,c|32);break;case 501:this.xWhenPressed=b;this.yWhenPressed=d;this.modifiersWhenPressed10=c;this.pressed(f,b,d,c,!1);break;case 506:this.dragged(f,b,d,c);break;case 504:this.entered(f,b,d);break;case 505:this.exited(f,b,d);break;case 503:this.moved(f,b,d,c);break;case 502:this.released(f,b,d,c);b==this.xWhenPressed&&(d==this.yWhenPressed&&c==this.modifiersWhenPressed10)&&
this.clicked(f,b,d,c,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");c(c$,"mouseEntered",function(a){this.entered(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(c$,"mouseExited",function(a){this.exited(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(c$,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},
"java.awt.event.MouseEvent");c(c$,"mouseDragged",function(a){var b=a.getModifiers();0==(b&28)&&(b|=16);this.dragged(a.getWhen(),a.getX(),a.getY(),b)},"java.awt.event.MouseEvent");c(c$,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");c(c$,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),
a.getWheelRotation(),a.getModifiers()|32)},"java.awt.event.MouseWheelEvent");c(c$,"keyTyped",function(a){if(null!=this.pd){var b=a.getKeyChar(),d=a.getModifiers();JU.Logger.info("MouseManager keyTyped: "+b+" "+(0+b.charCodeAt(0))+" "+d);this.pd.keyTyped(b.charCodeAt(0),d)&&a.consume()}},"java.awt.event.KeyEvent");c(c$,"keyPressed",function(a){null!=this.pd&&this.pd.keyPressed(a.getKeyCode(),a.getModifiers())&&a.consume()},"java.awt.event.KeyEvent");c(c$,"keyReleased",function(a){null!=this.pd&&this.pd.keyReleased(a.getKeyCode())},
"java.awt.event.KeyEvent");c(c$,"entered",function(a,b,d){null!=this.pd&&this.pd.mouseEnterExit(a,b,d,!1)},"~N,~N,~N");c(c$,"exited",function(a,b,d){null!=this.pd&&this.pd.mouseEnterExit(a,b,d,!0)},"~N,~N,~N");c(c$,"clicked",function(a,b,d,c){null!=this.pd&&this.pd.mouseAction(2,a,b,d,1,c)},"~N,~N,~N,~N,~N");c(c$,"moved",function(a,b,d,c){null!=this.pd&&(this.isMouseDown?this.pd.mouseAction(1,a,b,d,0,JSV.app.GenericMouse.applyLeftMouse(c)):this.pd.mouseAction(0,a,b,d,0,c&-29))},"~N,~N,~N,~N");c(c$,
"wheeled",function(a,b,d){null!=this.pd&&this.pd.mouseAction(3,a,0,b,0,d)},"~N,~N,~N");c(c$,"pressed",function(a,b,d,c){null==this.pd?this.disposed||this.jsvp.showMenu(b,d):(this.isMouseDown=!0,this.pd.mouseAction(4,a,b,d,0,c))},"~N,~N,~N,~N,~B");c(c$,"released",function(a,b,d,c){null!=this.pd&&(this.isMouseDown=!1,this.pd.mouseAction(5,a,b,d,0,c))},"~N,~N,~N,~N");c(c$,"dragged",function(a,b,d,c){null!=this.pd&&(20==(c&20)&&(c=c&-5|2),this.pd.mouseAction(1,a,b,d,0,c))},"~N,~N,~N,~N");c$.applyLeftMouse=
c(c$,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");e(c$,"processTwoPointGesture",function(){},"~A");e(c$,"dispose",function(){this.jsvp=this.pd=null;this.disposed=!0})}),q("JSV.appletjs"),r(["javajs.api.JSInterface","JSV.api.AppletFrame","$.JSVAppletInterface"],"JSV.appletjs.JSVApplet","java.lang.Boolean java.net.URL java.util.Hashtable JU.PT JSV.app.JSVApp JSV.common.JSVersion JSV.js2d.JsMainPanel $.JsPanel JU.Logger".split(" "),function(){c$=k(function(){this.viewer=this.app=null;
this.isStandalone=!1;this.htParams=this.viewerOptions=null;n(this,arguments)},JSV.appletjs,"JSVApplet",null,[JSV.api.JSVAppletInterface,JSV.api.AppletFrame,javajs.api.JSInterface]);p(c$,function(a){null==a&&(a=new java.util.Hashtable);this.viewerOptions=a;this.htParams=new java.util.Hashtable;var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.htParams.put(b.getKey().toLowerCase(),b.getValue());this.init()},"java.util.Map");c(c$,"init",function(){this.app=new JSV.app.JSVApp(this,
!0);this.initViewer();null!=this.app.appletReadyCallbackFunctionName&&null!=this.viewer.fullName&&this.callToJavaScript(this.app.appletReadyCallbackFunctionName,[this.viewer.appletName,this.viewer.fullName,Boolean.TRUE,this])});c(c$,"initViewer",function(){this.viewer=this.app.vwr;this.setLogging();this.viewerOptions.remove("debug");var a=this.viewerOptions.get("display"),a=document.getElementById(a);this.viewer.setDisplay(a);JU.Logger.info(this.getAppletInfo())});c(c$,"setLogging",function(){var a=
this.getValue("logLevel",this.getBooleanValue("debug",!1)?"5":"4").charCodeAt(0)-48;4!=a&&System.out.println("setting logLevel="+a+' -- To change, use script "set logLevel [0-5]"');JU.Logger.setLogLevel(a)});c(c$,"getParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:String.instantialize(a.toString())},"~S");c(c$,"getBooleanValue",function(a,b){var d=this.getValue(a,b?"true":"");return d.equalsIgnoreCase("true")||d.equalsIgnoreCase("on")||d.equalsIgnoreCase("yes")},"~S,~B");
c(c$,"getValue",function(a,b){var d=this.getParameter(a);System.out.println("getValue "+a+" = "+d);return null!=d?d:b},"~S,~S");e(c$,"isPro",function(){return this.app.isPro()});e(c$,"isSigned",function(){return this.app.isSigned()});e(c$,"finalize",function(){System.out.println("JSpecView "+this+" finalized")});e(c$,"destroy",function(){this.app.dispose();this.app=null});c(c$,"getParameter",function(a,b){return this.isStandalone?System.getProperty(a,b):null!=this.getParameter(a)?this.getParameter(a):
b},"~S,~S");e(c$,"getAppletInfo",function(){return"JSpecView Applet "+JSV.common.JSVersion.VERSION});e(c$,"getSolnColour",function(){return this.app.getSolnColour()});e(c$,"getCoordinate",function(){return this.app.getCoordinate()});e(c$,"loadInline",function(a){this.app.loadInline(a)},"~S");c(c$,"$export",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");e(c$,"exportSpectrum",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");e(c$,"setFilePath",function(a){this.app.setFilePath(a)},
"~S");e(c$,"setSpectrumNumber",function(a){this.app.setSpectrumNumber(a)},"~N");e(c$,"toggleGrid",function(){this.app.toggleGrid()});e(c$,"toggleCoordinate",function(){this.app.toggleCoordinate()});e(c$,"toggleIntegration",function(){this.app.toggleIntegration()});e(c$,"addHighlight",function(a,b,d,c,f,h){this.app.addHighlight(a,b,d,c,f,h)},"~N,~N,~N,~N,~N,~N");e(c$,"removeAllHighlights",function(){this.app.removeAllHighlights()});e(c$,"removeHighlight",function(a,b){this.app.removeHighlight(a,b)},
"~N,~N");e(c$,"reversePlot",function(){this.app.reversePlot()});c(c$,"script",function(a){this.app.initParams(a)},"~S");e(c$,"runScript",function(a){this.app.runScript(a)},"~S");e(c$,"syncScript",function(a){this.app.syncScript(a)},"~S");e(c$,"writeStatus",function(a){this.app.writeStatus(a)},"~S");e(c$,"getPropertyAsJavaObject",function(a){return this.app.getPropertyAsJavaObject(a)},"~S");e(c$,"getPropertyAsJSON",function(a){return this.app.getPropertyAsJSON(a)},"~S");e(c$,"runScriptNow",function(a){return this.app.runScriptNow(a)},
"~S");e(c$,"print",function(a){return this.app.print(a)},"~S");e(c$,"setDropTargetListener",function(){},"~B,JSV.common.JSViewer");e(c$,"validateContent",function(){},"~N");e(c$,"createMainPanel",function(a){a.mainPanel=new JSV.js2d.JsMainPanel},"JSV.common.JSViewer");e(c$,"newWindow",function(){},"~B");e(c$,"callToJavaScript",function(a,b){var d=JU.PT.split(a,".");try{for(var c=window[d[0]],f=1;f<d.length;f++)c=c[d[f]];return c(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9])}catch(h){System.out.println(a+
" failed "+h)}},"~S,~A");e(c$,"setPanelVisible",function(){},"~B");e(c$,"getJSVPanel",function(a,b){return null==b?JSV.js2d.JsPanel.getEmptyPanel(a):JSV.js2d.JsPanel.getPanelMany(a,b)},"JSV.common.JSViewer,JU.Lst");e(c$,"setVisible",function(){},"~B");e(c$,"getDocumentBase",function(){try{return new java.net.URL(R("java.net.URL"),this.viewerOptions.get("documentBase"),null)}catch(a){if(y(a,java.net.MalformedURLException))return null;throw a;}});e(c$,"repaint",function(){});e(c$,"validate",function(){});
e(c$,"doExitJmol",function(){});e(c$,"getApp",function(){return this.app});e(c$,"setStatusDragDropped",function(){return!0},"~N,~N,~N,~S");e(c$,"cacheFileByName",function(){return 0},"~S,~B");e(c$,"cachePut",function(){},"~S,~O");e(c$,"getGLmolView",function(){return null});e(c$,"getFullName",function(){return this.app.vwr.fullName});e(c$,"processMouseEvent",function(a,b,d,c,f){return this.app.vwr.processMouseEvent(a,b,d,c,f)},"~N,~N,~N,~N,~N");e(c$,"setDisplay",function(a){this.app.vwr.setDisplay(a)},
"~O");e(c$,"startHoverWatcher",function(){},"~B");e(c$,"update",function(){this.app.vwr.updateJS()});e(c$,"loadInlineString",function(){return null},"~S,~S,~B");e(c$,"openFile",function(a){this.app.vwr.openFile(a,!0);return null},"~S");e(c$,"openFileAsyncSpecial",function(a,b){this.app.vwr.openFileAsyncSpecial(a,b)},"~S,~N");e(c$,"processTwoPointGesture",function(a){this.app.vwr.processTwoPointGesture(a)},"~A");e(c$,"setScreenDimension",function(a,b){this.app.vwr.setScreenDimension(a,b)},"~N,~N")}),
q("JSV.common"),r(["java.lang.Enum","JSV.common.Coordinate"],"JSV.common.Annotation",["java.lang.Double","JU.CU"],function(){c$=k(function(){this.text="";this.is2D=this.$isPixels=!1;this.offsetY=this.offsetX=0;this.spec=null;n(this,arguments)},JSV.common,"Annotation",JSV.common.Coordinate);c(c$,"setA",function(a,b,d,c,f,h,e,j){this.set(a,b);this.spec=d;this.text=c;this.$isPixels=f;this.is2D=h;this.offsetX=e;this.offsetY=j;return this},"~N,~N,JSV.common.Spectrum,~S,~B,~B,~N,~N");c(c$,"setSpec",function(a){this.spec=
a;return this},"JSV.common.Spectrum");c(c$,"addSpecShift",function(a){this.setXVal(this.getXVal()+a)},"~N");c(c$,"isPixels",function(){return this.$isPixels});e(c$,"toString",function(){return"["+this.getXVal()+", "+this.getYVal()+","+this.text+"]"});c$.getColoredAnnotation=c(c$,"getColoredAnnotation",function(a,b,d,c){var f,h=0,e=1,j=2,l=3,u=d.size();try{switch(u){default:return null;case 1:f=d.get(0);h=e=-1;'"'==f.charAt(0)?(l=0,j=-1):(j=0,l=-1);break;case 2:h=e=-1;f=d.get(0);'"'==f.charAt(0)?(l=
0,j=1):(j=0,l=1);break;case 3:case 4:f=d.get(2),'"'==f.charAt(0)?(l=2,j=4==u?3:-1):(j=2,l=4==u?3:-1),f=d.get(2),'"'==f.charAt(0)?(l=2,j=-1):(j=2,l=-1)}if(null==c&&(0>h||0>e||0>l||0>j))return null;var p=0>h?c.getXVal():Double.$valueOf(d.get(h)).doubleValue(),n=0>e?c.getYVal():Double.$valueOf(d.get(e)).doubleValue(),k=0>j?c.getColor():a.getColor1(JU.CU.getArgbFromString(d.get(j))),q;0>l?q=c.text:(q=d.get(l),'"'==q.charAt(0)&&(q=q.substring(1,q.length-1)));return(new JSV.common.ColoredAnnotation).setCA(p,
n,b,q,k,!1,!1,0,0)}catch(r){if(y(r,Exception))return null;throw r;}},"J.api.GenericGraphics,JSV.common.Spectrum,JU.Lst,JSV.common.Annotation");A(self.c$);c$=t(JSV.common.Annotation,"AType",Enum);s(c$,"Integration",0,[]);s(c$,"PeakList",1,[]);s(c$,"Measurements",2,[]);s(c$,"OverlayLegend",3,[]);s(c$,"Views",4,[]);s(c$,"NONE",5,[]);c$=z()}),q("JSV.common"),r(["JSV.common.Annotation"],"JSV.common.ColoredAnnotation",null,function(){c$=k(function(){this.color=null;n(this,arguments)},JSV.common,"ColoredAnnotation",
JSV.common.Annotation);c(c$,"getColor",function(){return this.color});p(c$,function(){x(this,JSV.common.ColoredAnnotation,[])});c(c$,"setCA",function(a,b,d,c,f,e,m,j,l){this.setA(a,b,d,c,e,m,j,l);this.color=f;return this},"~N,~N,JSV.common.Spectrum,~S,javajs.api.GenericColor,~B,~B,~N,~N")}),q("JSV.common"),r(["JSV.common.Parameters"],"JSV.common.ColorParameters",["java.util.Hashtable","$.StringTokenizer","JU.CU","$.Lst","JSV.common.ScriptToken"],function(){c$=k(function(){this.plotColors=this.elementColors=
this.displayFontName=this.titleFontName=null;this.isDefault=!1;n(this,arguments)},JSV.common,"ColorParameters",JSV.common.Parameters);p(c$,function(){x(this,JSV.common.ColorParameters,[]);JSV.common.ColorParameters.BLACK=this.getColor3(0,0,0);JSV.common.ColorParameters.RED=this.getColor3(255,0,0);JSV.common.ColorParameters.LIGHT_GRAY=this.getColor3(200,200,200);JSV.common.ColorParameters.DARK_GRAY=this.getColor3(80,80,80);JSV.common.ColorParameters.BLUE=this.getColor3(0,0,255);JSV.common.ColorParameters.WHITE=
this.getColor3(255,255,255);this.elementColors=new java.util.Hashtable;this.setColor(JSV.common.ScriptToken.TITLECOLOR,JSV.common.ColorParameters.BLACK);this.setColor(JSV.common.ScriptToken.UNITSCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.SCALECOLOR,JSV.common.ColorParameters.BLACK);this.setColor(JSV.common.ScriptToken.COORDINATESCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.GRIDCOLOR,JSV.common.ColorParameters.LIGHT_GRAY);this.setColor(JSV.common.ScriptToken.PLOTCOLOR,
JSV.common.ColorParameters.BLUE);this.setColor(JSV.common.ScriptToken.PLOTAREACOLOR,JSV.common.ColorParameters.WHITE);this.setColor(JSV.common.ScriptToken.BACKGROUNDCOLOR,this.getColor3(192,192,192));this.setColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.PEAKTABCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,JSV.common.ColorParameters.DARK_GRAY);for(var a=0;8>a;a++)JSV.common.ColorParameters.defaultPlotColors[a]=
this.getColorFromString(JSV.common.ColorParameters.defaultPlotColorNames[a]);this.plotColors=Array(8);System.arraycopy(JSV.common.ColorParameters.defaultPlotColors,0,this.plotColors,0,8)});c(c$,"setFor",function(a,b,d){null==b&&(b=this);d&&a.getPanelData().setBooleans(b,null);a=a.getPanelData();null!=a.getCurrentPlotColor(1)&&a.setPlotColors(this.plotColors);a.setColorOrFont(b,null)},"JSV.api.JSVPanel,JSV.common.ColorParameters,~B");c(c$,"set",function(a,b,d){var c=null;switch(b){default:this.setP(a,
b,d);return;case JSV.common.ScriptToken.PLOTCOLORS:null==a?this.getPlotColors(d):a.setPlotColors(this.getPlotColors(d));return;case JSV.common.ScriptToken.BACKGROUNDCOLOR:case JSV.common.ScriptToken.COORDINATESCOLOR:case JSV.common.ScriptToken.GRIDCOLOR:case JSV.common.ScriptToken.HIGHLIGHTCOLOR:case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:case JSV.common.ScriptToken.PEAKTABCOLOR:case JSV.common.ScriptToken.PLOTAREACOLOR:case JSV.common.ScriptToken.PLOTCOLOR:case JSV.common.ScriptToken.SCALECOLOR:case JSV.common.ScriptToken.TITLECOLOR:case JSV.common.ScriptToken.UNITSCOLOR:c=
this.setColorFromString(b,d);break;case JSV.common.ScriptToken.TITLEFONTNAME:case JSV.common.ScriptToken.DISPLAYFONTNAME:c=this.getFontName(b,d)}null!=a&&null!=c&&a.setColorOrFont(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");c(c$,"getElementColor",function(a){return this.elementColors.get(a)},"JSV.common.ScriptToken");c(c$,"setColor",function(a,b){null!=b&&this.elementColors.put(a,b);return b},"JSV.common.ScriptToken,javajs.api.GenericColor");c(c$,"copy",function(){return this.copy(this.name)});
c(c$,"setElementColors",function(a){this.displayFontName=a.displayFontName;var b;for(a=a.elementColors.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.setColor(b.getKey(),b.getValue());return this},"JSV.common.ColorParameters");c(c$,"getColorFromString",function(a){return this.getColor1(JU.CU.getArgbFromString(a))},"~S");c(c$,"getPlotColors",function(a){if(null==a)return this.plotColors[0]=this.getElementColor(JSV.common.ScriptToken.PLOTCOLOR),this.plotColors;a=new java.util.StringTokenizer(a,
",;.- ");var b=new JU.Lst;try{for(;a.hasMoreTokens();)b.addLast(this.getColorFromString(a.nextToken()))}catch(d){if(y(d,Exception))return null;throw d;}return b.toArray(Array(b.size()))},"~S");c(c$,"setColorFromString",function(a,b){return this.setColor(a,this.getColorFromString(b))},"JSV.common.ScriptToken,~S");c(c$,"getFontName",function(a,b){var d=this.isValidFontName(b);switch(a){case JSV.common.ScriptToken.TITLEFONTNAME:return d?this.titleFontName=b:this.titleFontName;case JSV.common.ScriptToken.DISPLAYFONTNAME:return d?
this.displayFontName=b:this.displayFontName}return null},"JSV.common.ScriptToken,~S");C(c$,"BLACK",null,"RED",null,"LIGHT_GRAY",null,"DARK_GRAY",null,"BLUE",null,"WHITE",null);c$.defaultPlotColors=c$.prototype.defaultPlotColors=Array(8);c$.defaultPlotColorNames=c$.prototype.defaultPlotColorNames="black darkGreen darkred orange magenta cyan maroon darkGray".split(" ")}),q("JSV.common"),c$=t(JSV.common,"CoordComparator",null,java.util.Comparator),e(c$,"compare",function(a,b){return a.getXVal()>b.getXVal()?
1:a.getXVal()<b.getXVal()?-1:0},"JSV.common.Coordinate,JSV.common.Coordinate"),q("JSV.common"),r(["JSV.common.CoordComparator"],"JSV.common.Coordinate",["java.lang.Double","java.util.Arrays","$.StringTokenizer","JU.DF","$.Lst"],function(){c$=k(function(){this.yVal=this.xVal=0;n(this,arguments)},JSV.common,"Coordinate");p(c$,function(){});c(c$,"set",function(a,b){this.xVal=a;this.yVal=b;return this},"~N,~N");c(c$,"getXVal",function(){return this.xVal});c(c$,"getYVal",function(){return this.yVal});
c(c$,"getXString",function(){return JU.DF.formatDecimalTrimmed(this.xVal,8)});c(c$,"getYString",function(){return JU.DF.formatDecimalTrimmed(this.yVal,8)});c(c$,"setXVal",function(a){this.xVal=a},"~N");c(c$,"setYVal",function(a){this.yVal=a},"~N");c(c$,"copy",function(){return(new JSV.common.Coordinate).set(this.xVal,this.yVal)});c(c$,"equals",function(a){return a.xVal==this.xVal&&a.yVal==this.yVal},"JSV.common.Coordinate");e(c$,"toString",function(){return"["+this.xVal+", "+this.yVal+"]"});c$.isYInRange=
c(c$,"isYInRange",function(a,b,d){return JSV.common.Coordinate.getMinY(a,0,a.length)>=b&&JSV.common.Coordinate.getMaxY(a,0,a.length)>=d},"~A,~N,~N");c$.normalise=c(c$,"normalise",function(a,b,d){var c=Array(a.length),f=JSV.common.Coordinate.getMinY(a,0,a.length);d=(JSV.common.Coordinate.getMaxY(a,0,a.length)-f)/(d-b);for(var e=0;e<a.length;e++)c[e]=(new JSV.common.Coordinate).set(a[e].getXVal(),(a[e].getYVal()-f)/d-b);return c},"~A,~N,~N");c$.reverse=c(c$,"reverse",function(a){for(var b=a.length,
d=0;d<b;d++){var c=a[d];a[d]=a[--b];a[b]=c}return a},"~A");c$.parseDSV=c(c$,"parseDSV",function(a,b,d){var c,f=c=0,e=new JU.Lst;for(a=new java.util.StringTokenizer(a," \t\n\r\f,;");a.hasMoreTokens();)c=a.nextToken().trim(),f=a.nextToken().trim(),c=Double.parseDouble(c),f=Double.parseDouble(f),c=(new JSV.common.Coordinate).set(c*b,f*d),e.addLast(c);b=Array(e.size());return e.toArray(b)},"~S,~N,~N");c$.deltaX=c(c$,"deltaX",function(a,b,d){return(a-b)/(d-1)},"~N,~N,~N");c$.removeScale=c(c$,"removeScale",
function(a,b,d){JSV.common.Coordinate.applyScale(a,1/b,1/d)},"~A,~N,~N");c$.applyScale=c(c$,"applyScale",function(a,b,d){if(1!=b||1!=d)for(var c=0;c<a.length;c++)a[c].setXVal(a[c].getXVal()*b),a[c].setYVal(a[c].getYVal()*d)},"~A,~N,~N");c$.applyShiftReference=c(c$,"applyShiftReference",function(a,b,d,c,f,e,m){if(!(b>a.length||0>b)){switch(m){case 0:f=a[a.length-b].getXVal()-f*e;break;case 1:f=d-f*e;break;case 2:f=c+f}for(d=0;d<a.length;d++)b=a[d],b.setXVal(b.getXVal()-f),a[d]=b}},"~A,~N,~N,~N,~N,~N,~N");
c$.getMinX=c(c$,"getMinX",function(a,b,d){for(var c=1.7976931348623157E308;b<d;b++){var f=a[b].getXVal();f<c&&(c=f)}return c},"~A,~N,~N");c$.getMinX=c(c$,"getMinX",function(a,b){for(var d=1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getXYCoords(),f=JSV.common.Coordinate.getMinX(f,b.getStartingPointIndex(c),b.getEndingPointIndex(c));f<d&&(d=f)}return d},"JU.Lst,JSV.common.ViewData");c$.getMaxX=c(c$,"getMaxX",function(a,b,d){for(var c=-1.7976931348623157E308;b<d;b++){var f=a[b].getXVal();
f>c&&(c=f)}return c},"~A,~N,~N");c$.getMaxX=c(c$,"getMaxX",function(a,b){for(var d=-1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getXYCoords(),f=JSV.common.Coordinate.getMaxX(f,b.getStartingPointIndex(c),b.getEndingPointIndex(c));f>d&&(d=f)}return d},"JU.Lst,JSV.common.ViewData");c$.getMinY=c(c$,"getMinY",function(a,b,d){for(var c=1.7976931348623157E308;b<d;b++){var f=a[b].getYVal();f<c&&(c=f)}return c},"~A,~N,~N");c$.getMinYUser=c(c$,"getMinYUser",function(a,b){for(var d=1.7976931348623157E308,
c=0;c<a.size();c++){var f=a.get(c).getUserYFactor(),e=a.get(c).getYRef(),m=a.get(c).getXYCoords(),f=(JSV.common.Coordinate.getMinY(m,b.getStartingPointIndex(c),b.getEndingPointIndex(c))-e)*f+e;f<d&&(d=f)}return d},"JU.Lst,JSV.common.ViewData");c$.getMaxY=c(c$,"getMaxY",function(a,b,d){for(var c=-1.7976931348623157E308;b<d;b++){var f=a[b].getYVal();f>c&&(c=f)}return c},"~A,~N,~N");c$.getMaxYUser=c(c$,"getMaxYUser",function(a,b){for(var d=-1.7976931348623157E308,c=0;c<a.size();c++){var f=a.get(c).getUserYFactor(),
e=a.get(c).getYRef(),m=a.get(c).getXYCoords(),f=(JSV.common.Coordinate.getMaxY(m,b.getStartingPointIndex(c),b.getEndingPointIndex(c))-e)*f+e;f>d&&(d=f)}return d},"JU.Lst,JSV.common.ViewData");c$.getYValueAt=c(c$,"getYValueAt",function(a,b){var d=JSV.common.Coordinate.getNearestIndexForX(a,b);if(0==d||d==a.length)return NaN;var c=a[d].getXVal(),f=a[d-1].getXVal(),e=a[d].getYVal(),d=a[d-1].getYVal();return c==f?e:d+(e-d)/(c-f)*(b-f)},"~A,~N");c$.intoRange=c(c$,"intoRange",function(a,b,d){return Math.max(Math.min(a,
d),b)},"~N,~N,~N");c$.getNearestIndexForX=c(c$,"getNearestIndexForX",function(a,b){var d=(new JSV.common.Coordinate).set(b,0),d=java.util.Arrays.binarySearch(a,d,JSV.common.Coordinate.c);0>d&&(d=-1-d);return 0>d?0:d>a.length-1?a.length-1:d},"~A,~N");c$.findXForPeakNearest=c(c$,"findXForPeakNearest",function(a,b,d){b=JSV.common.Coordinate.getNearestIndexForX(a,b);for(d=d?-1:1;b<a.length-1&&0<d*(a[b+1].yVal-a[b].yVal);)b++;for(;1<=b&&0<d*(a[b-1].yVal-a[b].yVal);)b--;return 0==b||b==a.length-1?a[b].xVal:
JSV.common.Coordinate.parabolicInterpolation(a,b)},"~A,~N,~B");c$.parabolicInterpolation=c(c$,"parabolicInterpolation",function(a,b){var d=a[b-1].yVal,c=a[b+1].yVal;return a[b].xVal+(d-c)/2/(d-2*a[b].yVal+c)*(a[b+1].xVal-a[b].xVal)},"~A,~N");c$.getPickedCoordinates=c(c$,"getPickedCoordinates",function(a,b,d,c){if(null==b)return!1;var f=b.getXVal();d.setXVal(f);d.setYVal(b.getYVal());if(null==c)return!0;b=JSV.common.Coordinate.getNearestIndexForX(a,f);c.setXVal(a[b].getXVal());c.setYVal(a[b].getYVal());
return!0},"~A,JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.Coordinate");c$.shiftX=c(c$,"shiftX",function(a,b){for(var d=a.length;0<=--d;)a[d].xVal+=b},"~A,~N");c$.getNearestXWithYAbove=c(c$,"getNearestXWithYAbove",function(a,b,d,c,f){b=JSV.common.Coordinate.getNearestIndexForX(a,b);var e=c?-1:1;if(f)for(;b<a.length&&0>e*(a[b].yVal-d);)b++;else for(;0<=b&&0>e*(a[b].yVal-d);)b--;return-1==b||b==a.length?NaN:JSV.common.Coordinate.findXForPeakNearest(a,a[b].getXVal(),c)},"~A,~N,~N,~B,~B");c$.c=
c$.prototype.c=new JSV.common.CoordComparator}),q("JSV.common"),r(["java.lang.Enum"],"JSV.common.ExportType",null,function(){c$=t(JSV.common,"ExportType",Enum);c$.getType=c(c$,"getType",function(a){a=a.toUpperCase();if(a.equalsIgnoreCase("Original..."))return JSV.common.ExportType.SOURCE;if(a.startsWith("XML"))return JSV.common.ExportType.AML;for(var b,d=0,c=JSV.common.ExportType.values();d<c.length&&((b=c[d])||1);d++)if(b.name().equals(a))return b;return JSV.common.ExportType.UNK},"~S");c$.isExportMode=
c(c$,"isExportMode",function(a){return JSV.common.ExportType.getType(a)!==JSV.common.ExportType.UNK},"~S");s(c$,"UNK",0,[]);s(c$,"SOURCE",1,[]);s(c$,"DIF",2,[]);s(c$,"FIX",3,[]);s(c$,"SQZ",4,[]);s(c$,"PAC",5,[]);s(c$,"XY",6,[]);s(c$,"DIFDUP",7,[]);s(c$,"PNG",8,[]);s(c$,"JPG",9,[]);s(c$,"SVG",10,[]);s(c$,"SVGI",11,[]);s(c$,"CML",12,[]);s(c$,"AML",13,[]);s(c$,"PDF",14,[])}),q("JSV.common"),r("JSV.common.XYScaleConverter java.util.Hashtable JU.BS $.Lst JSV.common.Coordinate JSV.dialog.JSVDialog".split(" "),
"JSV.common.GraphSet","java.lang.Boolean $.Double $.Float JU.DF $.PT JSV.common.Annotation $.ColorParameters $.ColoredAnnotation $.ImageView $.Integral $.IntegralData $.Measurement $.MeasurementData $.PanelData $.Parameters $.PeakData $.PeakPickEvent $.PlotWidget $.ScaleData $.ScriptToken $.Spectrum $.ViewData JU.Logger".split(" "),function(){c$=k(function(){this.gs2dLinkedY=this.gs2dLinkedX=null;this.cur1D2Locked=!1;this.spectra=this.highlights=null;this.allowStacking=this.isSplittable=!0;this.widgets=
this.graphsTemp=this.pendingIntegral=this.pendingMeasurement=this.lastAnnotation=this.selectedSpectrumIntegrals=this.selectedSpectrumMeasurements=this.annotations=null;this.haveSingleYScale=this.isLinked=!1;this.iSpectrumClicked=this.iSpectrumMovedTo=0;this.iSpectrumSelected=-1;this.stackSelected=!1;this.viewData=this.bsSelected=null;this.reversePlot=!1;this.nSplit=1;this.yStackOffsetPercent=0;this.showAllStacked=!0;this.pd=this.imageView=this.viewList=null;this.sticky2Dcursor=!1;this.nSpectra=0;
this.fracY=this.fracX=1;this.fY0=this.fX0=0;this.cur2Dy=this.cur1D2x2=this.cur1D2x1=this.cur2Dx1=this.cur2Dx0=this.pin2Dy01=this.pin2Dx01=this.pin2Dy1=this.pin2Dy0=this.pin2Dx1=this.pin2Dx0=this.pin1Dy01=this.pin1Dx01=this.pin1Dy1=this.pin1Dy0=this.pin1Dx1=this.pin1Dx0=this.zoomBox2D=this.zoomBox1D=null;this.xPixels0=this.xPixel10=this.yPixels=this.xPixels=this.yPixel000=this.yPixel11=this.xPixel11=this.yPixel00=this.xPixel00=this.yHArrows=this.xHArrows=this.xVArrows=this.yPixel1=this.xPixel1=this.yPixel0=
this.xPixel0=0;this.allowStackedYScale=!0;this.drawXAxisLeftToRight=!1;this.xAxisLeftToRight=!0;this.iPreviousSpectrumClicked=-1;this.zoomEnabled=this.$haveSelectedSpectrum=!1;this.currentZoomIndex=0;this.lastClickX=NaN;this.lastPixelX=2147483647;this.bottom=this.left=this.top=this.right=this.width=this.height=0;this.coordTemp=this.piMouseOver=null;this.FONT_PLAIN=0;this.FONT_BOLD=1;this.FONT_ITALIC=2;this.is2DSpectrum=!1;this.selectedIntegral=this.selectedMeasurement=null;this.lastXMax=NaN;this.lastSpecClicked=
-1;this.inPlotMove=!1;this.xPixelMovedTo2=this.xPixelMovedTo=-1;this.xValueMovedTo=this.yValueMovedTo=0;this.haveLeftRightArrows=!1;this.yPixelPlot1=this.yPixelPlot0=this.xPixelPlot0=this.xPixelPlot1=0;this.nextClickForSetPeak=!1;this.mapX=null;K("JSV.common.GraphSet.Highlight")||JSV.common.GraphSet.$GraphSet$Highlight$();this.triggered=!0;this.gMain=this.g2d=this.plotColors=this.image2D=this.jsvp=this.aIntegrationRatios=this.dialogs=null;n(this,arguments)},JSV.common,"GraphSet",null,JSV.common.XYScaleConverter);
F(c$,function(){this.highlights=new JU.Lst;this.spectra=new JU.Lst;this.graphsTemp=new JU.Lst;this.bsSelected=new JU.BS;this.coordTemp=new JSV.common.Coordinate;this.mapX=new java.util.Hashtable});p(c$,function(a){this.pd=a;this.jsvp=a.jsvp;this.g2d=a.g2d},"JSV.common.PanelData");c(c$,"setSpectrumMovedTo",function(a){return this.iSpectrumMovedTo=a},"~N");c(c$,"setSpectrumClicked",function(a){this.stackSelected=this.showAllStacked;if(0>a||this.iSpectrumClicked!=a)this.lastClickX=NaN,this.lastPixelX=
2147483647;this.iSpectrumClicked=this.setSpectrumSelected(this.setSpectrumMovedTo(a))},"~N");c(c$,"setSpectrumSelected",function(a){var b=a!=this.iSpectrumSelected;this.iSpectrumSelected=a;b&&this.getCurrentView();return this.iSpectrumSelected},"~N");c(c$,"closeDialogsExcept",function(a){if(null!=this.dialogs)for(var b,d=this.dialogs.entrySet().iterator();d.hasNext()&&((b=d.next())||1);){var c=b.getValue();w(c,JSV.dialog.JSVDialog)&&(a===JSV.common.Annotation.AType.NONE||c.getAType()!==a)&&c.setVisible(!1)}},
"JSV.common.Annotation.AType");c(c$,"dispose",function(){this.widgets=this.graphsTemp=this.imageView=this.pendingMeasurement=this.lastAnnotation=this.annotations=this.viewList=this.viewData=this.spectra=null;this.disposeImage();if(null!=this.dialogs)for(var a,b=this.dialogs.entrySet().iterator();b.hasNext()&&((a=b.next())||1);){var d=a.getValue();w(d,JSV.dialog.JSVDialog)&&d.dispose()}this.dialogs=null});c(c$,"isDrawNoSpectra",function(){return-2147483648==this.iSpectrumSelected});c(c$,"getFixedSelectedSpectrumIndex",
function(){return Math.max(this.iSpectrumSelected,0)});c(c$,"getSpectrum",function(){return this.getSpectrumAt(this.getFixedSelectedSpectrumIndex()).getCurrentSubSpectrum()});c(c$,"getSpectrumAt",function(a){return this.spectra.get(a)},"~N");c(c$,"getSpectrumIndex",function(a){for(var b=this.spectra.size();0<=--b;)if(this.spectra.get(b)===a)return b;return-1},"JSV.common.Spectrum");c(c$,"addSpec",function(a){this.spectra.addLast(a);this.nSpectra++},"JSV.common.Spectrum");c(c$,"splitStack",function(a,
b){b&&this.isSplittable?(this.nSplit=this.nSpectra,this.showAllStacked=!1,this.setSpectrumClicked(this.iSpectrumSelected),this.pd.currentSplitPoint=this.iSpectrumSelected):(this.nSplit=1,this.showAllStacked=this.allowStacking&&!b,this.setSpectrumClicked(this.iSpectrumSelected));this.stackSelected=!1;JSV.common.GraphSet.setFractionalPositions(this.pd,a,JSV.common.PanelData.LinkMode.NONE)},"JU.Lst,~B");c(c$,"setPositionForFrame",function(a){0>a&&(a=0);var b=this.height-50;this.xPixel00=v(this.width*
this.fX0);this.xPixel11=v(this.xPixel00+this.width*this.fracX-1);this.xHArrows=this.xPixel00+25;this.xVArrows=this.xPixel11-v(this.right/2);this.xPixel0=this.xPixel00+v(this.left*(1-this.fX0));this.xPixel10=this.xPixel1=this.xPixel11-this.right;this.xPixels0=this.xPixels=this.xPixel1-this.xPixel0+1;this.yPixel000=(0==this.fY0?25:0)+v(this.height*this.fY0);this.yPixel00=this.yPixel000+v(b*this.fracY*a);this.yPixel11=this.yPixel00+v(b*this.fracY)-1;this.yHArrows=this.yPixel11-12;this.yPixel0=this.yPixel00+
v(this.top/2);this.yPixel1=this.yPixel11-v(this.bottom/2);this.yPixels=this.yPixel1-this.yPixel0+1;null!=this.imageView&&this.is2DSpectrum&&(this.setImageWindow(),this.pd.display1D?(this.xPixels=v(Math.floor(0.8*(this.pd.display1D?1*(this.xPixels0-this.imageView.xPixels)/this.xPixels0:1)*this.xPixels0)),this.xPixel1=this.xPixel0+this.xPixels-1):(this.xPixels=0,this.xPixel1=this.imageView.xPixel0-30))},"~N");c(c$,"hasPoint",function(a,b){return a>=this.xPixel00&&a<=this.xPixel11&&b>=this.yPixel000&&
b<=this.yPixel11*this.nSplit},"~N,~N");c(c$,"isInPlotRegion",function(a,b){return a>=this.xPixel0&&a<=this.xPixel1&&b>=this.yPixel0&&b<=this.yPixel1},"~N,~N");c(c$,"getSplitPoint",function(a){return Math.max(0,Math.min(v((a-this.yPixel000)/(this.yPixel11-this.yPixel00)),this.nSplit-1))},"~N");c(c$,"isSplitWidget",function(a,b){return this.isSplittable&&a>=this.xPixel11-20&&b>=this.yPixel00+1&&a<=this.xPixel11-10&&b<=this.yPixel00+11},"~N,~N");c(c$,"initGraphSet",function(a,b){null==JSV.common.GraphSet.veryLightGrey&&
(JSV.common.GraphSet.veryLightGrey=this.g2d.getColor3(200,200,200));this.setPlotColors(JSV.common.ColorParameters.defaultPlotColors);this.xAxisLeftToRight=this.getSpectrumAt(0).shouldDisplayXAxisIncreasing();this.setDrawXAxis();var d=E(this.nSpectra,0),c=E(this.nSpectra,0);this.bsSelected.setBits(0,this.nSpectra);this.allowStackedYScale=!0;0>=b&&(b=2147483647);this.isSplittable=1<this.nSpectra;this.showAllStacked=(this.allowStacking=this.spectra.get(0).isStackable())&&1<this.nSpectra;for(var f=0;f<
this.nSpectra;f++){var e=this.spectra.get(f).getXYCoords().length-1;d[f]=JSV.common.Coordinate.intoRange(a,0,e);c[f]=JSV.common.Coordinate.intoRange(b,0,e);this.allowStackedYScale=(new Boolean(this.allowStackedYScale&(this.spectra.get(f).getYUnits().equals(this.spectra.get(0).getYUnits())&&this.spectra.get(f).getUserYFactor()==this.spectra.get(0).getUserYFactor()))).valueOf()}this.getView(0,0,0,0,d,c,null,null);this.viewList=new JU.Lst;this.viewList.addLast(this.viewData)},"~N,~N");c(c$,"getView",
function(a,b,d,c,f,e,m,j){var l=0==this.graphsTemp.size()?this.spectra:this.graphsTemp,u=this.getSpectrumAt(0).getSubSpectra(),p=null==u||2==u.size()&&u.get(1).isImaginary(),n=!this.getSpectrumAt(0).is1D();p&&d==c?l=this.spectra:d==c&&(this.viewData=new JSV.common.ViewData(u,d,c,this.getSpectrum().isContinuous()),l=null);null!=l&&(this.viewData=new JSV.common.ViewData(l,d,c,f,e,this.getSpectrumAt(0).isContinuous(),n),a!=b&&this.getScale().setXRange(a,b));null!=m&&(JSV.common.ScaleData.copyScaleFactors(m,
this.viewData.getScaleData()),null!=j&&JSV.common.ScaleData.copyYScales(j,this.viewData.getScaleData()),this.getCurrentView())},"~N,~N,~N,~N,~A,~A,~A,~A");c(c$,"isNearby",function(a,b,d,c){var f=a.getXVal(),e=d.toPixelX(f);a=this.toPixelY(a.getYVal());f=b.getXVal();d=d.toPixelX(f);b=this.toPixelY(b.getYVal());return Math.abs(e-d)+Math.abs(a-b)<c},"JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.XYScaleConverter,~N");c(c$,"setReversePlot",function(a){(this.reversePlot=a)&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);
this.setDrawXAxis()},"~B");c(c$,"setDrawXAxis",function(){this.drawXAxisLeftToRight=(new Boolean(this.xAxisLeftToRight^this.reversePlot)).valueOf();for(var a=0;a<this.spectra.size();a++)this.spectra.get(a).setExportXAxisDirection(this.drawXAxisLeftToRight)});c(c$,"isInTopBar",function(a,b){return a==this.fixX(a)&&b>this.pin1Dx0.yPixel0-2&&b<this.pin1Dx0.yPixel1},"~N,~N");c(c$,"isInTopBar2D",function(a,b){return null!=this.imageView&&a==this.imageView.fixX(a)&&b>this.pin2Dx0.yPixel0-2&&b<this.pin2Dx0.yPixel1},
"~N,~N");c(c$,"isInRightBar",function(a,b){return b==this.fixY(b)&&a>this.pin1Dy0.xPixel1&&a<this.pin1Dy0.xPixel0+2},"~N,~N");c(c$,"isInRightBar2D",function(a,b){return null!=this.imageView&&b==this.fixY(b)&&a>this.pin2Dy0.xPixel1&&a<this.pin2Dy0.xPixel0+2},"~N,~N");c(c$,"toX0",function(a){return this.viewList.get(0).getScale().toX0(this.fixX(a),this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(c$,"toY0",function(a){return this.viewList.get(0).getScale().toY0(this.fixY(a),this.yPixel0,
this.yPixel1)},"~N");e(c$,"toX",function(a){return null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toX(a):this.getScale().toX(this.fixX(a),this.xPixel1,this.drawXAxisLeftToRight)},"~N");e(c$,"toY",function(a){return this.getScale().toY(a,this.yPixel0)},"~N");c(c$,"toPixelX",function(a){return this.getScale().toPixelX(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(c$,"toPixelY",function(a){return this.getScale().toPixelY(a,this.yPixel1)},"~N");c(c$,"toPixelX0",
function(a){return this.viewList.get(0).getScale().toPixelX0(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(c$,"toPixelY0",function(a){return this.fixY(this.viewList.get(0).getScale().toPixelY0(a,this.yPixel0,this.yPixel1))},"~N");c(c$,"fixX",function(a){return JSV.common.Coordinate.intoRange(a,this.xPixel0,this.xPixel1)},"~N");c(c$,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,this.yPixel1)},"~N");c(c$,"getXPixel0",function(){return this.xPixel0});c(c$,
"getXPixels",function(){return this.xPixels});e(c$,"getYPixels",function(){return this.yPixels});c(c$,"getScale",function(){return this.viewData.getScale()});c(c$,"toPixelYint",function(a){return this.yPixel1-v(Double.isNaN(a)?-2147483648:this.yPixels*a)},"~N");c(c$,"findAnnotation2D",function(a){for(var b=this.annotations.size();0<=--b;){var d=this.annotations.get(b);if(this.isNearby(d,a,this.imageView,10))return d}return null},"JSV.common.Coordinate");c(c$,"addAnnotation",function(a,b){null==this.annotations&&
(this.annotations=new JU.Lst);for(var d=!1,c=this.annotations.size();0<=--c;)if(a.is2D?this.isNearby(this.annotations.get(c),a,this.imageView,10):a.equals(this.annotations.get(c)))d=!0,this.annotations.remove(c);0<a.text.length&&(!d||!b)&&this.annotations.addLast(a)},"JSV.common.Annotation,~B");c(c$,"setImageWindow",function(){this.imageView.setPixelWidthHeight(v((this.pd.display1D?0.6:1)*this.xPixels0),this.yPixels);this.imageView.setXY0(this.getSpectrumAt(0),v(Math.floor(this.xPixel10-this.imageView.xPixels)),
this.yPixel0)});c(c$,"findNearestMaxMin",function(){if(1<this.nSpectra&&0>this.iSpectrumClicked)return!1;this.xValueMovedTo=this.getSpectrum().findXForPeakNearest(this.xValueMovedTo);this.setXPixelMovedTo(this.xValueMovedTo,1.7976931348623157E308,0,0);return!Double.isNaN(this.xValueMovedTo)});c(c$,"setXPixelMovedTo",function(a,b,d,c){1.7976931348623157E308==a&&1.7976931348623157E308==b?(this.xPixelMovedTo=d,this.xPixelMovedTo2=c,this.isLinked&&this.sticky2Dcursor&&this.pd.setlinkedXMove(this,this.toX(this.xPixelMovedTo),
!1)):(1.7976931348623157E308!=a&&(this.xPixelMovedTo=this.toPixelX(a),this.fixX(this.xPixelMovedTo)!=this.xPixelMovedTo&&(this.xPixelMovedTo=-1),this.xPixelMovedTo2=-1,1E10!=a&&this.setSpectrumClicked(this.getFixedSelectedSpectrumIndex())),1.7976931348623157E308!=b&&(this.xPixelMovedTo2=this.toPixelX(b)))},"~N,~N,~N,~N");c(c$,"processPendingMeasurement",function(a,b,d){if(this.isInPlotRegion(a,b)){var c=this.toX(a),f=this.toY(b),e=c;switch(d){case 0:this.pendingMeasurement.setPt2(this.toX(a),this.toY(b));
break;case 3:case 2:if(0>this.iSpectrumClicked)break;var m=this.spectra.get(this.iSpectrumClicked);this.setScale(this.iSpectrumClicked);3!=d&&(d=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,1),null!=d?(c=d.getXVal(),f=d.getYVal()):null!=(d=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,2))?(c=d.getXVal2(),f=d.getYVal2()):c=this.getNearestPeak(m,c,f));this.pendingMeasurement=(new JSV.common.Measurement).setM1(c,f,m);this.pendingMeasurement.setPt2(e,f);this.pd.repaint();break;
case 1:case -2:case -3:for(e=null!=this.pendingMeasurement&&this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,-1));e;){this.setScale(this.getSpectrumIndex(this.pendingMeasurement.spec));if(3!=d){if(!this.findNearestMaxMin()){e=!1;break}a=this.xPixelMovedTo}c=this.toX(a);f=this.toY(b);this.pendingMeasurement.setPt2(c,f);if(0==this.pendingMeasurement.text.length){e=!1;break}this.setMeasurement(this.pendingMeasurement);if(1!=d){e=!1;break}this.setSpectrumClicked(this.getSpectrumIndex(this.pendingMeasurement.spec));
this.pendingMeasurement=(new JSV.common.Measurement).setM1(c,f,this.pendingMeasurement.spec);break}e||(this.pendingMeasurement=null);this.pd.repaint();break;case 5:this.findNearestMaxMin()?(a=this.getFixedSelectedSpectrumIndex(),Double.isNaN(this.lastXMax)||this.lastSpecClicked!=a||null==this.pendingMeasurement?(this.lastXMax=this.xValueMovedTo,this.lastSpecClicked=a,this.pendingMeasurement=(new JSV.common.Measurement).setM1(this.xValueMovedTo,this.yValueMovedTo,this.spectra.get(a))):(this.pendingMeasurement.setPt2(this.xValueMovedTo,
this.yValueMovedTo),0<this.pendingMeasurement.text.length&&this.setMeasurement(this.pendingMeasurement),this.pendingMeasurement=null,this.lastXMax=NaN)):this.lastXMax=NaN}}else this.pendingMeasurement=null},"~N,~N,~N");c(c$,"checkIntegralNormalizationClick",function(a,b){if(null==this.selectedSpectrumIntegrals)return!1;var d=this.findMeasurement(this.selectedSpectrumIntegrals,a,b,-5);if(null==d)return!1;this.selectedIntegral=d;this.pd.normalizeIntegral();this.updateDialog(JSV.common.Annotation.AType.Integration,
-1);this.setSpectrumClicked(this.getSpectrumIndex(d.spec));return!0},"~N,~N");c(c$,"getNearestPeak",function(a,b,d){var c=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),b,d,a.isInverted(),!1);a=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),b,d,a.isInverted(),!0);return Double.isNaN(c)?a:Double.isNaN(a)?c:Math.abs(c-b)<Math.abs(a-b)?c:a},"JSV.common.Spectrum,~N,~N");c(c$,"findMeasurement",function(a,b,d,c){if(null==a||0==a.size())return null;if(0==c){var f=this.findMeasurement(a,
b,d,-1);return null!=f||w(a.get(0),JSV.common.Integral)?f:this.findMeasurement(a,b,d,-2)}for(var e=a.size();0<=--e;){var f=a.get(e),m,j,l,u;w(f,JSV.common.Integral)?(m=j=this.toPixelX(f.getXVal2()),l=this.toPixelYint(f.getYVal()),u=this.toPixelYint(f.getYVal2())):(m=this.toPixelX(f.getXVal()),j=this.toPixelX(f.getXVal2()),l=u=-2==c?this.yPixel1-2:this.toPixelY(f.getYVal()));switch(c){case 1:if(4>Math.abs(b-m)+Math.abs(d-l))return f;break;case 2:if(4>Math.abs(b-j)+Math.abs(d-u))return f;break;case -5:l=
u=v((l+u)/2),j=m+20;default:if(JSV.common.GraphSet.isOnLine(b,d,m,l,j,u))return f}}return null},"JSV.common.MeasurementData,~N,~N,~N");c(c$,"setMeasurement",function(a){var b=this.getSpectrumIndex(a.spec),d=this.getDialog(JSV.common.Annotation.AType.Measurements,b);null==d&&this.addDialog(b,JSV.common.Annotation.AType.Measurements,d=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,a.spec));d.getData().addLast(a.copyM());this.updateDialog(JSV.common.Annotation.AType.Measurements,
-1)},"JSV.common.Measurement");c(c$,"checkArrowUpDownClick",function(a,b){var d=!1,c=this.isArrowClick(a,b,3)?JSV.common.GraphSet.RT2:this.isArrowClick(a,b,4)?1/JSV.common.GraphSet.RT2:0;if(0!=c){1<this.nSplit&&this.setSpectrumSelected(this.iSpectrumMovedTo);if((1==this.nSpectra||0<=this.iSpectrumSelected)&&this.spectra.get(this.getFixedSelectedSpectrumIndex()).isTransmittance())c=1/c;this.viewData.scaleSpectrum(null==this.imageView?this.iSpectrumSelected:-2,c);d=!0}else this.isArrowClick(a,b,-1)&&
(this.resetViewCompletely(),d=!0);d&&(null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),this.pd.taintedAll=!0);return d},"~N,~N");c(c$,"resetViewCompletely",function(){this.clearViews();this.showAllStacked&&!this.stackSelected&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);this.viewData.resetScaleFactors();this.updateDialogs()});c(c$,"checkArrowLeftRightClick",function(a,b){if(this.haveLeftRightArrows){var d=this.isArrowClick(a,b,1)?-1:this.isArrowClick(a,b,2)?1:
0;if(0!=d)return this.setSpectrumClicked((this.iSpectrumSelected+d)%this.nSpectra),!0;if(this.isArrowClick(a,b,0)){if(this.showAllStacked)return this.showAllStacked=!1,this.setSpectrumClicked(this.getFixedSelectedSpectrumIndex()),!0;this.showAllStacked=this.allowStacking;this.setSpectrumSelected(-1);this.stackSelected=!1}}return!1},"~N,~N");c(c$,"isArrowClick",function(a,b,d){switch(d){case 3:case 4:case -1:return d=v((this.yPixel00+this.yPixel11)/2)+15*(3==d?-1:4==d?1:0),10>Math.abs(this.xVArrows-
a)&&10>Math.abs(d-b);case 1:case 2:case 0:return d=this.xHArrows+15*(1==d?-1:2==d?1:0),10>Math.abs(d-a)&&10>Math.abs(this.yHArrows-b)}return!1},"~N,~N,~N");c(c$,"setWidgetValueByUser",function(a){var b;b=a===this.cur2Dy?""+this.imageView.toSubspectrumIndex(a.yPixel0):a===this.pin1Dx01?""+Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal())+" - "+Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()):a===this.pin1Dy01?""+Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal())+" - "+Math.max(this.pin1Dy0.getYVal(),
this.pin1Dy1.getYVal()):a===this.pin2Dx01?""+Math.min(this.pin2Dx0.getXVal(),this.pin2Dx1.getXVal())+" - "+Math.max(this.pin2Dx0.getXVal(),this.pin2Dx1.getXVal()):a===this.pin2Dy01?""+v(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+v(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):""+a.getValue();b=this.pd.getInput("New value?","Set Slider",b);if(null!=b){b=b.trim();try{if(a===this.pin1Dx01||a===this.pin1Dy01||a===this.pin2Dx01||a===this.pin2Dy01){var d=b.indexOf("-",1);
if(!(0>d)){var c=Double.$valueOf(b.substring(0,d)).doubleValue(),f=Double.$valueOf(b.substring(d+1)).doubleValue();a===this.pin1Dx01?this.doZoom(c,this.pin1Dy0.getYVal(),f,this.pin1Dy1.getYVal(),!0,!1,!1,!0,!0):a===this.pin1Dy01?this.doZoom(this.pin1Dx0.getXVal(),c,this.pin1Dx1.getXVal(),f,null==this.imageView,null==this.imageView,!1,!1,!0):a===this.pin2Dx01?(this.imageView.setView0(this.imageView.toPixelX0(c),this.pin2Dy0.yPixel0,this.imageView.toPixelX0(f),this.pin2Dy1.yPixel0),this.doZoom(c,this.pin1Dy0.getYVal(),
f,this.pin1Dy1.getYVal(),!1,!1,!1,!0,!0)):a===this.pin2Dy01&&(this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.toPixelY0(c),this.pin2Dx1.xPixel0,this.imageView.toPixelY0(f)),this.doZoom(this.imageView.toX(this.imageView.xPixel0),this.getScale().minY,this.imageView.toX(this.imageView.xPixel0+this.imageView.xPixels-1),this.getScale().maxY,!1,!1,!1,!1,!0))}}else{var e=Double.$valueOf(b).doubleValue();a.isXtype?(f=a===this.pin1Dx0||a===this.cur2Dx0||a===this.pin2Dx0?this.pin1Dx1.getXVal():
this.pin1Dx0.getXVal(),this.doZoom(e,0,f,0,!a.is2D,!1,!1,!0,!0)):a===this.cur2Dy?this.setCurrentSubSpectrum(v(e)):a===this.pin2Dy0||a===this.pin2Dy1?(f=a===this.pin2Dy0?this.pin2Dy1.yPixel0:this.pin2Dy0.yPixel0,this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.subIndexToPixelY(v(e)),this.pin2Dx1.xPixel0,f)):(f=a===this.pin1Dy0?this.pin1Dy1.getYVal():this.pin1Dy0.getYVal(),this.doZoom(this.pin1Dx0.getXVal(),e,this.pin1Dx1.getXVal(),f,null==this.imageView,null==this.imageView,!1,!1,!0))}}catch(m){if(!y(m,
Exception))throw m;}}},"JSV.common.PlotWidget");c(c$,"removeAllHighlights",function(a){if(null==a)this.highlights.clear();else for(var b=this.highlights.size();0<=--b;)this.highlights.get(b).spectrum===a&&this.highlights.remove(b)},"JSV.common.Spectrum");c(c$,"setCoordClicked",function(a,b,d){0==d&&(this.nextClickForSetPeak=!1);if(Double.isNaN(b))return this.pd.coordClicked=null,this.pd.coordsClicked=null;this.pd.coordClicked=(new JSV.common.Coordinate).set(this.lastClickX=b,d);this.pd.coordsClicked=
this.getSpectrum().getXYCoords();this.pd.xPixelClicked=this.lastPixelX=a;return this.pd.coordClicked},"~N,~N,~N");c(c$,"setWidgets",function(a,b,d){if(a||null==this.pin1Dx0)null==this.zoomBox1D?this.newPins():this.resetPinPositions();this.setDerivedPins(b);this.setPinSliderPositions(d)},"~B,~N,~B");c(c$,"newPins",function(){this.zoomBox1D=new JSV.common.PlotWidget("zoomBox1D");this.pin1Dx0=new JSV.common.PlotWidget("pin1Dx0");this.pin1Dx1=new JSV.common.PlotWidget("pin1Dx1");this.pin1Dy0=new JSV.common.PlotWidget("pin1Dy0");
this.pin1Dy1=new JSV.common.PlotWidget("pin1Dy1");this.pin1Dx01=new JSV.common.PlotWidget("pin1Dx01");this.pin1Dy01=new JSV.common.PlotWidget("pin1Dy01");this.cur1D2x1=new JSV.common.PlotWidget("cur1D2x1");this.cur1D2x1.color=JSV.common.ScriptToken.PEAKTABCOLOR;this.cur1D2x2=new JSV.common.PlotWidget("cur1D2x2");this.cur1D2x2.color=JSV.common.ScriptToken.PEAKTABCOLOR;if(null!=this.imageView){this.zoomBox2D=new JSV.common.PlotWidget("zoomBox2D");this.pin2Dx0=new JSV.common.PlotWidget("pin2Dx0");this.pin2Dx1=
new JSV.common.PlotWidget("pin2Dx1");this.pin2Dy0=new JSV.common.PlotWidget("pin2Dy0");this.pin2Dy1=new JSV.common.PlotWidget("pin2Dy1");this.pin2Dx01=new JSV.common.PlotWidget("pin2Dx01");this.pin2Dy01=new JSV.common.PlotWidget("pin2Dy01");this.cur2Dx0=new JSV.common.PlotWidget("cur2Dx0");this.cur2Dx1=new JSV.common.PlotWidget("cur2Dx1");this.cur2Dy=new JSV.common.PlotWidget("cur2Dy");this.pin2Dy0.setY(0,this.imageView.toPixelY0(0));var a=this.getSpectrumAt(0).getSubSpectra().size();this.pin2Dy1.setY(a,
this.imageView.toPixelY0(a))}this.setWidgetX(this.pin1Dx0,this.getScale().minX);this.setWidgetX(this.pin1Dx1,this.getScale().maxX);this.setWidgetY(this.pin1Dy0,this.getScale().minY);this.setWidgetY(this.pin1Dy1,this.getScale().maxY);this.widgets=[this.zoomBox1D,this.zoomBox2D,this.pin1Dx0,this.pin1Dx01,this.pin1Dx1,this.pin1Dy0,this.pin1Dy01,this.pin1Dy1,this.pin2Dx0,this.pin2Dx01,this.pin2Dx1,this.pin2Dy0,this.pin2Dy01,this.pin2Dy1,this.cur2Dx0,this.cur2Dx1,this.cur2Dy,this.cur1D2x1,this.cur1D2x2]});
c(c$,"setWidgetX",function(a,b){a.setX(b,this.toPixelX0(b))},"JSV.common.PlotWidget,~N");c(c$,"setWidgetY",function(a,b){a.setY(b,this.toPixelY0(b))},"JSV.common.PlotWidget,~N");c(c$,"resetPinsFromView",function(){null!=this.pin1Dx0&&(this.setWidgetX(this.pin1Dx0,this.getScale().minXOnScale),this.setWidgetX(this.pin1Dx1,this.getScale().maxXOnScale),this.setWidgetY(this.pin1Dy0,this.getScale().minYOnScale),this.setWidgetY(this.pin1Dy1,this.getScale().maxYOnScale))});c(c$,"resetPinPositions",function(){this.resetX(this.pin1Dx0);
this.resetY(this.pin1Dy0);this.resetY(this.pin1Dy1);null==this.imageView?(null!=this.gs2dLinkedX&&this.resetX(this.cur1D2x1),null!=this.gs2dLinkedY&&this.resetX(this.cur1D2x2)):(this.pin2Dy0.setY(this.pin2Dy0.getYVal(),this.imageView.toPixelY0(this.pin2Dy0.getYVal())),this.pin2Dy1.setY(this.pin2Dy1.getYVal(),this.imageView.toPixelY0(this.pin2Dy1.getYVal())))});c(c$,"resetX",function(a){this.setWidgetX(a,a.getXVal())},"JSV.common.PlotWidget");c(c$,"resetY",function(a){this.setWidgetY(a,a.getYVal())},
"JSV.common.PlotWidget");c(c$,"setPinSliderPositions",function(a){this.pin1Dx0.yPixel0=this.pin1Dx1.yPixel0=this.pin1Dx01.yPixel0=this.yPixel0-5;this.pin1Dx0.yPixel1=this.pin1Dx1.yPixel1=this.pin1Dx01.yPixel1=this.yPixel0;this.cur1D2x1.yPixel1=this.cur1D2x2.yPixel1=this.yPixel0-5;this.cur1D2x1.yPixel0=this.cur1D2x2.yPixel0=this.yPixel1+6;null==this.imageView?(this.pin1Dy0.xPixel0=this.pin1Dy1.xPixel0=this.pin1Dy01.xPixel0=this.xPixel1+5,this.pin1Dy0.xPixel1=this.pin1Dy1.xPixel1=this.pin1Dy01.xPixel1=
this.xPixel1):(this.pin1Dy0.xPixel0=this.pin1Dy1.xPixel0=this.pin1Dy01.xPixel0=this.imageView.xPixel1+15,this.pin1Dy0.xPixel1=this.pin1Dy1.xPixel1=this.pin1Dy01.xPixel1=this.imageView.xPixel1+10,this.pin2Dx0.yPixel0=this.pin2Dx1.yPixel0=this.pin2Dx01.yPixel0=this.yPixel0-5,this.pin2Dx0.yPixel1=this.pin2Dx1.yPixel1=this.pin2Dx01.yPixel1=this.yPixel0,this.pin2Dy0.xPixel0=this.pin2Dy1.xPixel0=this.pin2Dy01.xPixel0=this.imageView.xPixel1+5,this.pin2Dy0.xPixel1=this.pin2Dy1.xPixel1=this.pin2Dy01.xPixel1=
this.imageView.xPixel1,this.cur2Dx0.yPixel0=this.cur2Dx1.yPixel0=this.yPixel1+6,this.cur2Dx0.yPixel1=this.cur2Dx1.yPixel1=this.yPixel0-5,this.cur2Dx0.yPixel0=this.cur2Dx1.yPixel0=this.yPixel1+6,this.cur2Dx1.yPixel1=this.cur2Dx1.yPixel1=this.yPixel0-5,this.cur2Dy.xPixel0=a?v((this.xPixel1+this.imageView.xPixel0)/2):this.imageView.xPixel0-6,this.cur2Dy.xPixel1=this.imageView.xPixel1+5)},"~B");c(c$,"setDerivedPins",function(a){this.triggered=!0;null!=this.gs2dLinkedX&&this.cur1D2x1.setX(this.cur1D2x1.getXVal(),
this.toPixelX(this.cur1D2x1.getXVal()));null!=this.gs2dLinkedY&&this.cur1D2x2.setX(this.cur1D2x2.getXVal(),this.toPixelX(this.cur1D2x2.getXVal()));this.pin1Dx01.setX(0,v((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2));this.pin1Dy01.setY(0,v((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2));this.pin1Dx01.setEnabled(Math.min(this.pin1Dx0.xPixel0,this.pin1Dx1.xPixel0)>this.xPixel0||Math.max(this.pin1Dx0.xPixel0,this.pin1Dx1.xPixel0)<this.xPixel1);this.pin1Dy01.setEnabled(Math.min(this.pin1Dy0.yPixel0,
this.pin1Dy1.yPixel0)>Math.min(this.toPixelY(this.getScale().minY),this.toPixelY(this.getScale().maxY))||Math.max(this.pin1Dy0.yPixel0,this.pin1Dy1.yPixel0)<Math.max(this.toPixelY(this.getScale().minY),this.toPixelY(this.getScale().maxY)));if(null!=this.imageView){var b=this.pin1Dx0.getXVal();this.cur2Dx0.setX(b,this.imageView.toPixelX(b));b=this.pin1Dx1.getXVal();this.cur2Dx1.setX(b,this.imageView.toPixelX(b));b=this.imageView.toX(this.imageView.xPixel0);this.pin2Dx0.setX(b,this.imageView.toPixelX0(b));
b=this.imageView.toX(this.imageView.xPixel1);this.pin2Dx1.setX(b,this.imageView.toPixelX0(b));this.pin2Dx01.setX(0,v((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2));b=this.imageView.imageHeight-1-this.imageView.yView1;this.pin2Dy0.setY(b,this.imageView.toPixelY0(b));b=this.imageView.imageHeight-1-this.imageView.yView2;this.pin2Dy1.setY(b,this.imageView.toPixelY0(b));this.pin2Dy01.setY(0,v((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/2));this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=this.imageView.subIndexToPixelY(a);
this.pin2Dx01.setEnabled(Math.min(this.pin2Dx0.xPixel0,this.pin2Dx1.xPixel0)!=this.imageView.xPixel0||Math.max(this.pin2Dx0.xPixel0,this.pin2Dx1.xPixel1)!=this.imageView.xPixel1);this.pin2Dy01.setEnabled(Math.min(this.pin2Dy0.yPixel0,this.pin2Dy1.yPixel0)!=this.yPixel0||Math.max(this.pin2Dy0.yPixel0,this.pin2Dy1.yPixel1)!=this.yPixel1)}},"~N");c(c$,"doZoom",function(a,b,d,c,f,e,m,j,l){a==d?(a=this.getScale().minXOnScale,d=this.getScale().maxXOnScale):this.isLinked&&j&&this.pd.doZoomLinked(this,a,
d,l,m,f);a>d&&(j=a,a=d,d=j);b>c&&(j=b,b=c,c=j);j=!f&&null!=this.imageView&&(this.imageView.minZ!=b||this.imageView.maxZ!=c);if(this.zoomEnabled||j){if(m){if(!this.getScale().isInRangeX(a)&&!this.getScale().isInRangeX(d))return;this.getScale().isInRangeX(a)?this.getScale().isInRangeX(d)||(d=this.getScale().maxX):a=this.getScale().minX}this.pd.taintedAll=!0;m=this.viewData.getScaleData();var u=E(this.nSpectra,0),p=E(this.nSpectra,0);this.graphsTemp.clear();var n=this.getSpectrumAt(0).getSubSpectra(),
n=null==n||2==n.size();if(this.getSpectrumAt(0).is1D()&&!n){if(this.graphsTemp.addLast(this.getSpectrum()),!JSV.common.ScaleData.setDataPointIndices(this.graphsTemp,a,d,3,u,p))return}else if(!JSV.common.ScaleData.setDataPointIndices(this.spectra,a,d,3,u,p))return;if(n=b==c)f=!j&&f?f=this.getScale().spectrumScaleFactor:1,1E-4>Math.abs(f-1)&&(b=this.getScale().minYOnScale,c=this.getScale().maxYOnScale);f=null;if(n||e)this.getCurrentView(),f=this.viewData.getNewScales(this.iSpectrumSelected,n,b,c);this.getView(a,
d,b,c,u,p,m,f);this.setXPixelMovedTo(1E10,1.7976931348623157E308,0,0);this.setWidgetX(this.pin1Dx0,a);this.setWidgetX(this.pin1Dx1,d);this.setWidgetY(this.pin1Dy0,b);this.setWidgetY(this.pin1Dy1,c);null==this.imageView?this.updateDialogs():(a=this.getSpectrumAt(0).getSubIndex(),d=this.imageView.fixSubIndex(a),d!=a&&this.setCurrentSubSpectrum(d),j&&this.update2dImage(!1));l&&this.addCurrentZoom()}},"~N,~N,~N,~N,~B,~B,~B,~B,~B");c(c$,"updateDialogs",function(){this.updateDialog(JSV.common.Annotation.AType.PeakList,
-1);this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)});c(c$,"setCurrentSubSpectrum",function(a){var b=this.getSpectrumAt(0);a=b.setCurrentSubSpectrum(a);b.isForcedSubset()&&this.viewData.setXRangeForSubSpectrum(this.getSpectrum().getXYCoords());this.pd.notifySubSpectrumChange(a,this.getSpectrum())},"~N");c(c$,"addCurrentZoom",function(){if(this.viewList.size()>this.currentZoomIndex+1)for(var a=this.viewList.size()-1;a>this.currentZoomIndex;a--)this.viewList.remove(a);this.viewList.addLast(this.viewData);
this.currentZoomIndex++});c(c$,"setZoomTo",function(a){this.currentZoomIndex=a;this.viewData=this.viewList.get(a);this.resetPinsFromView()},"~N");c(c$,"clearViews",function(){this.isLinked&&this.pd.clearLinkViews(this);this.setZoom(0,0,0,0);for(var a=this.viewList.size();1<=--a;)this.viewList.remove(a)});c(c$,"drawAll",function(a,b,d,c,f,e){this.g2d=this.pd.g2d;this.gMain=a;var m=this.getSpectrumAt(0).getSubIndex();this.is2DSpectrum=!this.getSpectrumAt(0).is1D()&&(this.isLinked||this.pd.getBoolean(JSV.common.ScriptToken.DISPLAY2D))&&
(null!=this.imageView||this.get2DImage());null!=this.imageView&&e&&(this.pd.isPrinting&&this.g2d!==this.pd.g2d0&&this.g2d.newGrayScaleImage(a,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,this.imageView.getBuffer()),this.is2DSpectrum&&this.setPositionForFrame(c),this.draw2DImage());var j=this.stackSelected||!this.showAllStacked?this.iSpectrumSelected:-1,l=!this.showAllStacked||1==this.nSpectra||0<=j,u=null==this.imageView||this.pd.display1D,p=0<=j?1:0,n=this.getFixedSelectedSpectrumIndex();
if(u&&e&&(this.fillBox(a,this.xPixel0,this.yPixel0,this.xPixel1,this.yPixel1,JSV.common.ScriptToken.PLOTAREACOLOR),0>j)){l=!0;for(j=0;j<this.nSpectra;j++)this.doPlot(j,c)&&0!=p++&&(l=(new Boolean(l&this.viewData.areYScalesSame(j-1,j))).valueOf())}var k=1==this.nSpectra?0:!this.showAllStacked?this.iSpectrumMovedTo:this.iSpectrumSelected;d=d===a?b:d;if(e){var j=!this.isLinked&&this.isSplittable&&(1==this.nSplit||this.pd.currentSplitPoint==c),q=this.zoomEnabled&&!this.isDrawNoSpectra()&&this.pd.isCurrentGraphSet(this)&&
this.spectra.get(0).isScalable()&&(j||1==this.nSpectra)&&(1==this.nSplit||this.pd.currentSplitPoint==this.iSpectrumMovedTo);this.drawFrame(a,k,j,this.isSplittable,q)}if(this.pd.isCurrentGraphSet(this)&&c==this.pd.currentSplitPoint&&(2>p||0<=this.iSpectrumSelected))this.$haveSelectedSpectrum=!0;this.haveSingleYScale=this.showAllStacked&&1<this.nSpectra?this.allowStackedYScale&&l:!0;if(u){l=G(this.yPixels*(this.yStackOffsetPercent/100));this.haveLeftRightArrows=!1;for(q=j=0;j<this.nSpectra;j++)if(this.doPlot(j,
c)){var k=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=j,r=!this.reversePlot&&this.getShowAnnotation(JSV.common.Annotation.AType.Integration,j)&&(!this.showAllStacked||this.iSpectrumSelected==j)?this.getDialog(JSV.common.Annotation.AType.Integration,j).getData():null;this.setScale(j);var s=this.spectra.get(j);1<this.nSplit&&(n=j);var t=!k&&(1==this.nSplit||this.showAllStacked||this.iSpectrumSelected==c),w=t&&this.$haveSelectedSpectrum&&j==n;t&&(this.resetPinsFromView(),this.drawWidgets(b,
d,m,f,u,w,!1));this.haveSingleYScale&&(j==n&&e)&&(this.drawGrid(a),this.pd.isPrinting&&1<this.nSplit&&this.drawSpectrumSource(a,j));t&&this.drawWidgets(b,d,m,!1,u,w,!0);!this.isDrawNoSpectra()&&((1==this.nSpectra||0<=this.iSpectrumSelected)&&(this.haveSingleYScale&&j==n||this.showAllStacked&&this.stackSelected&&j==this.iSpectrumSelected))&&this.drawHighlightsAndPeakTabs(b,d,j);if(e){if((1==p&&0>this.iSpectrumSelected||this.iSpectrumSelected==j&&this.pd.isCurrentGraphSet(this))&&this.pd.titleOn&&!this.pd.titleDrawn)this.pd.drawTitle(a,
this.height,this.width,this.pd.getDrawTitle(this.pd.isPrinting)),this.pd.titleDrawn=!0;this.haveSingleYScale&&j==n&&(this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.YUNITSON)&&this.drawYUnits(a))}t=s.isContinuous();w=(1<this.nSplit?j==this.iSpectrumMovedTo:this.isLinked||j==n)&&!this.pd.isPrinting&&s.isContinuous();e&&this.drawSpectrum(a,j,q,k,r,t,w);this.drawMeasurements(b,j);null!=this.pendingMeasurement&&this.pendingMeasurement.spec===
s&&this.drawMeasurement(b,this.pendingMeasurement);w&&0<=this.xPixelMovedTo&&this.drawSpectrumPointer(b,s,q,r);1<this.nSpectra&&(1==this.nSplit&&this.pd.isCurrentGraphSet(this)&&e)&&(this.haveLeftRightArrows=!0,this.pd.isPrinting||(this.setScale(0),k=this.iSpectrumSelected,2!=this.nSpectra&&(this.setPlotColor(a,(k+this.nSpectra-1)%this.nSpectra),this.fillArrow(a,1,this.yHArrows,this.xHArrows-9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,1,this.yHArrows,this.xHArrows-9,!1)),0<=k&&(this.setPlotColor(a,
k),this.fillCircle(a,this.xHArrows,this.yHArrows,!0)),this.setCurrentBoxColor(a),this.fillCircle(a,this.xHArrows,this.yHArrows,!1),this.setPlotColor(a,(k+1)%this.nSpectra),this.fillArrow(a,2,this.yHArrows,this.xHArrows+9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,2,this.yHArrows,this.xHArrows+9,!1)));q-=l}e&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&this.drawXScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.XUNITSON)&&this.drawXUnits(a))}else e&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&
this.drawXScale(a,this.imageView),this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this.imageView),0<=m&&this.draw2DUnits(a)),this.drawWidgets(b,d,m,f,u,!0,!1),this.drawWidgets(b,d,m,f,u,!0,!0);null!=this.annotations&&this.drawAnnotations(b,this.annotations,null)},"~O,~O,~O,~N,~B,~B");c(c$,"drawSpectrumSource",function(a,b){this.pd.printFilePath(a,this.pd.thisWidth-this.pd.right,this.yPixel0,this.spectra.get(b).getFilePath())},"~O,~N");c(c$,"doPlot",function(a,b){var d=this.stackSelected&&
0<=this.iSpectrumSelected&&this.iSpectrumSelected!=a,c=this.showAllStacked||-1==this.iSpectrumSelected||this.iSpectrumSelected==a;return 1<this.nSplit?a==b:c&&(!this.pd.isPrinting||!d)},"~N,~N");c(c$,"drawSpectrumPointer",function(a,b,d,c){this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);var f=this.pd.integralShiftMode;null!=c&&((!this.pd.ctrlPressed||this.pd.isIntegralDrag)&&!this.isOnSpectrum(this.pd.mouseX,this.pd.mouseY,-1)?c=null:0==f&&(f=this.getShiftMode(this.pd.mouseX,this.pd.mouseY)));
var e=this.yValueMovedTo;this.yValueMovedTo=null==c?b.getYValueAt(this.xValueMovedTo):c.getPercentYValueAt(this.xValueMovedTo);this.setCoordStr(this.xValueMovedTo,this.yValueMovedTo);0!=f?(this.setPlotColor(a,0),b=0>f?this.yPixelPlot0:this.yPixelPlot1,this.drawHandle(a,0>f?this.xPixelPlot1:this.xPixelPlot0,b,!1)):(null!=c&&this.g2d.setStrokeBold(a,!0),Double.isNaN(e)||null!=this.pendingMeasurement?(this.g2d.drawLine(a,this.xPixelMovedTo,this.yPixel0,this.xPixelMovedTo,this.yPixel1),0<=this.xPixelMovedTo2&&
this.g2d.drawLine(a,this.xPixelMovedTo2,this.yPixel0,this.xPixelMovedTo2,this.yPixel1),this.yValueMovedTo=NaN):(b=null==c?d+this.toPixelY(this.yValueMovedTo):this.toPixelYint(this.yValueMovedTo/100),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixelMovedTo,b-10,this.xPixelMovedTo,b+10)),null!=c&&this.g2d.setStrokeBold(a,!1))},"~O,JSV.common.Spectrum,~N,JSV.common.IntegralData");c(c$,"setScale",function(a){this.viewData.setScale(a,this.xPixels,this.yPixels,this.spectra.get(a).isInverted())},"~N");c(c$,
"draw2DUnits",function(a){var b=this.getSpectrumAt(0).nucleusX,d=this.getSpectrumAt(0).nucleusY;this.setColorFromToken(a,JSV.common.ScriptToken.PLOTCOLOR);this.drawUnits(a,b,this.imageView.xPixel1+5*this.pd.scalingFactor,this.yPixel1,1,1);this.drawUnits(a,d,this.imageView.xPixel0-5*this.pd.scalingFactor,this.yPixel0,1,0)},"~O");c(c$,"drawPeakTabs",function(a,b,d){var c=1==this.nSpectra||0<=this.iSpectrumSelected?d.getPeakList():null;if(null!=c&&0<c.size()){null!=this.piMouseOver&&this.piMouseOver.spectrum===
d&&this.pd.isMouseUp()?(this.g2d.setGraphicsColor(b,this.g2d.getColor4(240,240,240,140)),this.drawPeak(b,this.piMouseOver,0),d.setHighlightedPeak(this.piMouseOver)):d.setHighlightedPeak(null);this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(b=c.size();0<=--b;){var f=c.get(b);this.drawPeak(a,f,f===d.getSelectedPeak()?14:7)}}},"~O,~O,JSV.common.Spectrum");c(c$,"drawPeak",function(a,b,d){if(!this.pd.isPrinting){var c=b.getXMin(),f=b.getXMax();c!=f&&this.drawBar(a,b,c,f,null,d)}},"~O,JSV.common.PeakInfo,~N");
c(c$,"drawWidgets",function(a,b,d,c,f,e,m){this.setWidgets(c,d,f);if(!this.pd.isPrinting||!(null==this.imageView?!this.cur1D2Locked:this.sticky2Dcursor)){!this.pd.isPrinting&&!m&&(f?(this.fillBox(a,this.xPixel0,this.pin1Dx0.yPixel1,this.xPixel1,this.pin1Dx1.yPixel1+2,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin1Dx0.xPixel0,this.pin1Dx0.yPixel1,this.pin1Dx1.xPixel0,this.pin1Dx1.yPixel1+2,JSV.common.ScriptToken.PLOTCOLOR)):(this.fillBox(a,this.imageView.xPixel0,this.pin2Dx0.yPixel1,this.imageView.xPixel1,
this.pin2Dx0.yPixel1+2,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin2Dx0.xPixel0,this.pin2Dx0.yPixel1,this.pin2Dx1.xPixel0,this.pin2Dx1.yPixel1+2,JSV.common.ScriptToken.PLOTCOLOR),this.fillBox(a,this.pin2Dy0.xPixel1,this.yPixel1,this.pin2Dy1.xPixel1+2,this.yPixel0,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin2Dy0.xPixel1,this.pin2Dy0.yPixel1,this.pin2Dy1.xPixel1+2,this.pin2Dy1.yPixel0,JSV.common.ScriptToken.PLOTCOLOR)),this.fillBox(a,this.pin1Dy0.xPixel1,this.yPixel1,this.pin1Dy1.xPixel1+
2,this.yPixel0,JSV.common.ScriptToken.GRIDCOLOR),e&&this.fillBox(a,this.pin1Dy0.xPixel1,this.pin1Dy0.yPixel1,this.pin1Dy1.xPixel1+2,this.pin1Dy1.yPixel0,JSV.common.ScriptToken.PLOTCOLOR));for(d=0;d<this.widgets.length;d++)if(c=this.widgets[d],!(null==c||!c.isPinOrCursor&&!this.zoomEnabled)){var j=c===this.cur1D2x1||c===this.cur1D2x2||c===this.cur2Dx0||c===this.cur2Dx1||c===this.cur2Dy;if((c.isPin||!c.isPinOrCursor)!=m){if(c.is2D){if(c===this.cur2Dx0&&!f)continue}else{var l=c===this.pin1Dy0||c===this.pin1Dy1||
c===this.pin1Dy01;if(null!=this.imageView&&f==l||l&&!e||c===this.cur1D2x1&&null==this.gs2dLinkedX||c===this.cur1D2x2&&null==this.gs2dLinkedY||c===this.zoomBox1D&&(this.pd.isIntegralDrag||0!=this.pd.integralShiftMode))if(!this.isLinked||null!=this.imageView)continue}if(!this.pd.isPrinting||j)c.isPinOrCursor?(this.setColorFromToken(a,c.color),this.g2d.drawLine(a,c.xPixel0,c.yPixel0,c.xPixel1,c.yPixel1),c.isVisible=!0,c.isPin&&this.drawHandle(a,c.xPixel0,c.yPixel0,!c.isEnabled)):c.xPixel1!=c.xPixel0&&
this.fillBox(b,c.xPixel0,c.yPixel0,c.xPixel1,c.yPixel1,c===this.zoomBox1D&&this.pd.shiftPressed?JSV.common.ScriptToken.ZOOMBOXCOLOR2:JSV.common.ScriptToken.ZOOMBOXCOLOR)}}}},"~O,~O,~N,~B,~B,~B,~B");c(c$,"drawBar",function(a,b,d,c,f,e){var m=c+d,j=Math.abs(c-d),l=Math.abs(this.toX(this.xPixel1)-this.toX(this.xPixel0));0<e&&j>l/20&&(j=l/20,d=m/2-j,c=m/2+j);d=this.toPixelX(d);c=this.toPixelX(c);d>c&&(m=d,d=c,c=m);d=this.fixX(d);c=this.fixX(c);3>c-d&&(d-=2,c+=2);null!=b&&b.setPixelRange(d,c);0==e?this.fillBox(a,
d,this.yPixel0,c,this.yPixel0+this.yPixels,f):(this.fillBox(a,d,this.yPixel0,c,this.yPixel0+3,f),null!=b&&(d=v((d+c)/2),this.fillBox(a,d-1,this.yPixel0,d+1,this.yPixel0+e,f)))},"~O,JSV.common.PeakInfo,~N,~N,JSV.common.ScriptToken,~N");c(c$,"drawSpectrum",function(a,b,d,c,f,e,m){var j=this.spectra.get(b);this.drawPlot(a,b,j,e,d,c,null,m);null!=f&&(this.haveIntegralDisplayed(b)&&this.drawPlot(a,b,j,!0,d,!1,f,!0),this.drawIntegralValues(a,b,d));null!=this.getIntegrationRatios(b)&&this.drawAnnotations(a,
this.getIntegrationRatios(b),JSV.common.ScriptToken.INTEGRALPLOTCOLOR)},"~O,~N,~N,~B,JSV.common.IntegralData,~B,~B");c(c$,"getMeasurements",function(a,b){var d=this.getDialog(a,b);return null==d||0==d.getData().size()||!d.getState()?null:d.getData()},"JSV.common.Annotation.AType,~N");c(c$,"drawPlot",function(a,b,d,c,f,e,m,j){var l=null==m?d.getXYCoords():this.getIntegrationGraph(b).getXYCoords(),u=null!=m;m=u?m.getBitSet():null;var p=!u&&!e&&null!=this.pendingIntegral&&this.pendingIntegral.spec===
this.spectra.get(b);j=p||null!=d.fillColor&&j;e=e?-2:u?-1:!this.allowStacking?0:b;this.setPlotColor(a,e);var n=!0,k=this.toPixelY(0);u?j=(new Boolean(j&k==this.fixY(k))).valueOf():k=this.fixY(k);var q=u||j?this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR):null;d=null==q||null==d.fillColor?q:d.fillColor;q=this.viewData.getStartingPointIndex(b);b=this.viewData.getEndingPointIndex(b);if(c){b--;var r=(u||null!=this.pendingIntegral)&&this.g2d.canDoLineTo();r&&this.g2d.doStroke(a,!0);var s=!1;
for(c=q;c<=b;c++){var t=l[c],w=l[c+1],v=u?this.toPixelYint(t.getYVal()):this.toPixelY(t.getYVal());if(-2147483648!=v){var x=u?this.toPixelYint(w.getYVal()):this.toPixelY(w.getYVal());if(-2147483648!=x){var t=t.getXVal(),w=w.getXVal(),y=this.toPixelX(t),z=this.toPixelX(w),v=this.fixY(f+v),x=this.fixY(f+x);u&&(c==q&&(this.xPixelPlot1=y,this.yPixelPlot0=v),this.xPixelPlot0=z,this.yPixelPlot1=x);if(!(z==y&&v==x))if(j&&p&&this.pendingIntegral.overlaps(t,w))null!=d&&(this.g2d.doStroke(a,!1),this.g2d.setGraphicsColor(a,
d)),this.g2d.fillRect(a,Math.min(y,z),Math.min(k,v),Math.max(1,Math.abs(z-y)),Math.abs(k-v)),null!=d&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),s=!1,this.setPlotColor(a,e));else if(!(v==x&&v==this.yPixel0)&&(null!=m&&m.get(c)!=n&&(n=m.get(c),r&&s&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),s=!1),!this.pd.isPrinting&&0!=this.pd.integralShiftMode?this.setPlotColor(a,0):n?this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR):this.setPlotColor(a,-3)),!this.pd.isPrinting||n))s?
this.g2d.lineTo(a,z,x):(this.g2d.drawLine(a,y,v,z,x),s=r)}}}r&&this.g2d.doStroke(a,!1)}else{for(c=q;c<=b;c++)u=l[c],x=this.toPixelY(u.getYVal()),-2147483648!=x&&(y=this.toPixelX(u.getXVal()),v=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),v=this.fixY(f+v),x=this.fixY(f+x),v==x&&(v==this.yPixel0||v==this.yPixel1)||this.g2d.drawLine(a,y,v,y,x));this.getScale().isYZeroOnScale()&&(f+=this.toPixelY(this.getScale().spectrumYRef),f==this.fixY(f)&&this.g2d.drawLine(a,this.xPixel1,f,this.xPixel0,
f))}},"~O,~N,JSV.common.Spectrum,~B,~N,~B,JSV.common.IntegralData,~B");c(c$,"drawFrame",function(a,b,d,c,f){if(!this.pd.gridOn||this.pd.isPrinting)if(this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR),this.g2d.drawRect(a,this.xPixel0,this.yPixel0,this.xPixels,this.yPixels),this.pd.isPrinting)return;this.setCurrentBoxColor(a);f&&(0<=b&&(this.setPlotColor(a,b),this.fillArrow(a,3,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)-9,!0),this.fillArrow(a,4,this.xVArrows,v((this.yPixel00+this.yPixel11)/
2)+9,!0),this.setCurrentBoxColor(a)),this.fillArrow(a,3,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)-9,!1),this.fillCircle(a,this.xVArrows,v((this.yPixel00+this.yPixel11)/2),!1),this.fillArrow(a,4,this.xVArrows,v((this.yPixel00+this.yPixel11)/2)+9,!1));if(null==this.imageView&&d){b=this.xPixel00+10;d=this.xPixel11-10;f=this.yPixel00+1;var e=this.yPixel11-2;this.g2d.drawLine(a,b,f,d,f);this.g2d.drawLine(a,d,f,d,e);this.g2d.drawLine(a,b,e,d,e);c&&this.fillBox(a,d-10,f,d,f+10,null)}},"~O,~N,~B,~B,~B");
c(c$,"drawGrid",function(a){if(this.pd.gridOn&&null==this.imageView){this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR);var b;if(Double.isNaN(this.getScale().firstX)){b=this.getScale().maxXOnScale+this.getScale().steps[0]/2;for(var d=this.getScale().minXOnScale;d<b;d+=this.getScale().steps[0]){var c=this.toPixelX(d);this.g2d.drawLine(a,c,this.yPixel0,c,this.yPixel1)}}else{b=1.0001*this.getScale().maxXOnScale;for(d=this.getScale().firstX;d<=b;d+=this.getScale().steps[0])c=this.toPixelX(d),
this.g2d.drawLine(a,c,this.yPixel0,c,this.yPixel1)}for(d=this.getScale().firstY;d<this.getScale().maxYOnScale+this.getScale().steps[1]/2;d+=this.getScale().steps[1])b=this.toPixelY(d),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixel0,b,this.xPixel1,b)}},"~O");c(c$,"drawXScale",function(a,b){this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);this.pd.isPrinting&&this.g2d.drawLine(a,b.getXPixel0(),this.yPixel1,b.getXPixel0()+b.getXPixels()-1,this.yPixel1);for(var d=this.getScale().precision[0],
c=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1),f=this.yPixel1,e=this.yPixel1+4*this.pd.scalingFactor,m=this.yPixel1+2*this.pd.scalingFactor,c=c.getHeight(),j=b.toPixelX(this.getScale().steps[0])-b.toPixelX(0),l=Math.abs(0.95*j),u=this.getScale().firstX-this.getScale().steps[0],p=1.0001*(this.getScale().maxXOnScale+this.getScale().steps[0]),n=0;2>n;n++){1==n&&JSV.common.ScaleData.fixScale(this.mapX);for(var k=1E10,q=u;q<=p;q+=this.getScale().steps[0]){var j=b.toPixelX(q),r=Double.$valueOf(q),
s;switch(n){case 0:s=JU.DF.formatDecimalDbl(q,d);this.mapX.put(r,s);this.drawTick(a,j,f,e,b);j=Math.abs(k-q);k=this.getScale().minorTickCounts[0];if(0!=k){j/=k;for(s=1;s<k;s++)this.drawTick(a,b.toPixelX(q-s*j),f,m,b)}k=q;continue;case 1:s=this.mapX.get(r);if(null==s||j!=b.fixX(j))continue;var r=this.pd.getStringWidth(s),t=j+v(r/2)==b.fixX(j+v(r/2))?2:0;0<t&&this.g2d.drawString(a,s,j-v(r/t),e+c);q+=Math.floor(r/l)*this.getScale().steps[0]}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(c$,
"drawTick",function(a,b,d,c,f){b==f.fixX(b)&&this.g2d.drawLine(a,b,d,b,c)},"~O,~N,~N,~N,JSV.common.XYScaleConverter");c(c$,"drawYScale",function(a,b){var d=b.getScale(),c=d.precision[1],f=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1).getHeight(),e=d.maxYOnScale+d.steps[1]/2,m=-2147483648;this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);for(var j=0;2>j;j++){1==j&&JSV.common.ScaleData.fixScale(this.mapX);for(var l=d.firstY;l<e;l+=d.steps[1]){var u=Double.$valueOf(l),p=b.getXPixel0(),
n=b.toPixelY(l);if(n==b.fixY(n)){var k;0==j&&this.g2d.drawLine(a,p,n,p-3*this.pd.scalingFactor,n);if(!(Math.abs(n-m)<=f))switch(m=n,j){case 0:k=JU.DF.formatDecimalDbl(l,c);this.mapX.put(u,k);break;case 1:k=this.mapX.get(u);if(null==k)continue;k.startsWith("0")&&k.contains("E")&&(k="0");this.g2d.drawString(a,k,p-4*this.pd.scalingFactor-this.pd.getStringWidth(k),n+v(f/3))}}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(c$,"drawXUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!0);
null!=b&&this.drawUnits(a,b,this.xPixel1+25*this.pd.scalingFactor,this.yPixel1+5*this.pd.scalingFactor,1,1)},"~O");c(c$,"drawUnits",function(a,b,d,c,f,e){this.setColorFromToken(a,JSV.common.ScriptToken.UNITSCOLOR);this.pd.setFont(a,(null==this.imageView?this:this.imageView).getXPixels(),2,10,!1);this.g2d.drawString(a,b,v(d-this.pd.getStringWidth(b)*f),v(c+this.pd.getFontHeight()*e))},"~O,~S,~N,~N,~N,~N");c(c$,"drawYUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!1);null!=b&&this.drawUnits(a,
b,(this.pd.isPrinting?30:5)*this.pd.scalingFactor,this.yPixel0+(this.pd.isPrinting?0:5)*this.pd.scalingFactor,0,-1)},"~O");c(c$,"drawHighlightsAndPeakTabs",function(a,b,d){var c=this.getMeasurements(JSV.common.Annotation.AType.PeakList,d),f=this.spectra.get(d);if(this.pd.isPrinting)null!=c&&(this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR),this.printPeakList(a,f,c));else{if(null==c){for(var e=0;e<this.highlights.size();e++){var m=this.highlights.get(e);m.spectrum===f&&(this.pd.setHighlightColor(m.color),
this.drawBar(b,null,m.x1,m.x2,JSV.common.ScriptToken.HIGHLIGHTCOLOR,0))}this.drawPeakTabs(a,b,f)}if(null!=c){b=f.isInverted()?this.yPixel1-10*this.pd.scalingFactor:this.yPixel0;this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(e=c.size();0<=--e;)f=c.get(e),f=this.toPixelX(f.getXVal()),this.g2d.drawLine(a,f,b,f,b+10*this.pd.scalingFactor);this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,d))&&(b=this.toPixelY(c.getThresh()),b==this.fixY(b)&&!this.pd.isPrinting&&this.g2d.drawLine(a,
this.xPixel0,b,this.xPixel1,b))}}},"~O,~O,~N");c(c$,"printPeakList",function(a,b,d){var c=d.getMeasurementListArray(null);if(0!=c.length){this.pd.setFont(a,this.xPixels,0,8,!1);for(var f=this.pd.getFontHeight(),e=E(d.size(),0),m=E(d.size(),0),j=0,l=5*this.pd.scalingFactor,u=10*this.pd.scalingFactor,p=15*this.pd.scalingFactor,n=25*this.pd.scalingFactor,k=0;k<c.length;k++)m[k]=this.toPixelX(Double.parseDouble(c[k][1])),0==k?e[k]=m[k]:(e[k]=Math.max(e[k-1]+f,m[k]+f),j+=e[k]-m[k]);j/=2*c.length;e[0]-
j<this.xPixel0+n&&(j=e[0]-(this.xPixel0+n));for(k=0;k<c.length;k++)e[k]-=j;k=b.isInverted();b=this.pd.getStringWidth("99.9999");for(var j=6<=c[0].length?this.pd.getStringWidth("99.99"):0,n=k?-1:1,q=(k?this.yPixel1:this.yPixel0)+n*(j+b+p),k=0;k<c.length;k++)this.g2d.drawLine(a,e[k],q,e[k],q+l*n),this.g2d.drawLine(a,e[k],q+l*n,m[k],q+u*n),this.g2d.drawLine(a,m[k],q+u*n,m[k],q+p*n),0<j&&0<c[k][4].length&&this.g2d.drawLine(a,v((e[k]+e[k-1])/2),q-b+l,v((e[k]+e[k-1])/2),q-b-l);q-=2*n*this.pd.scalingFactor;
0<j&&(this.drawStringRotated(a,-90,e[0]-p,q,"  ppm"),this.drawStringRotated(a,-90,e[0]-p,q-b-l," Hz"));for(k=d.size();0<=--k;)this.drawStringRotated(a,-90*n,e[k]+v(n*f/3),q,c[k][1]),0<j&&0<c[k][4].length&&(d=v((e[k]+e[k-1])/2)+v(f/3),this.drawStringRotated(a,-90,d,q-b-l,c[k][4]))}},"~O,JSV.common.Spectrum,JSV.common.PeakData");c(c$,"drawStringRotated",function(a,b,d,c,f){this.g2d.drawStringRotated(a,f,d,c,b)},"~O,~N,~N,~N,~S");c(c$,"drawAnnotations",function(a,b,d){this.pd.setFont(a,this.xPixels,
1,12,!1);for(var c=b.size();0<=--c;){var f=b.get(c);this.setAnnotationColor(a,f,d);var e=(f.is2D?this.imageView:this).toPixelX(f.getXVal()),m=f.isPixels()?v(this.yPixel0+10*this.pd.scalingFactor-f.getYVal()):f.is2D?this.imageView.subIndexToPixelY(v(f.getYVal())):this.toPixelY(f.getYVal());this.g2d.drawString(a,f.text,e+f.offsetX*this.pd.scalingFactor,m-f.offsetY*this.pd.scalingFactor)}},"~O,JU.Lst,JSV.common.ScriptToken");c(c$,"drawIntegralValues",function(a,b,d){var c=this.getMeasurements(JSV.common.Annotation.AType.Integration,
b);if(null!=c){this.pd.isPrinting?this.pd.setFont(a,this.xPixels,0,8,!1):this.pd.setFont(a,this.xPixels,1,12,!1);this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR);var f=this.pd.getFontHeight();this.g2d.setStrokeBold(a,!0);for(var e=c.size();0<=--e;){var m=c.get(e);if(0!=m.getValue()){var j=this.toPixelX(m.getXVal2()),l=d*this.pd.scalingFactor+this.toPixelYint(m.getYVal()),k=d*this.pd.scalingFactor+this.toPixelYint(m.getYVal2());j!=this.fixX(j)||(l!=this.fixY(l)||k!=this.fixY(k))||
(this.pd.isPrinting||this.g2d.drawLine(a,j,l,j,k),this.g2d.drawString(a,"  "+m.text,j,v((l+k)/2)+v(f/3)))}}this.g2d.setStrokeBold(a,!1)}b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumIntegrals=c)},"~O,~N,~N");c(c$,"drawMeasurements",function(a,b){var d=this.getMeasurements(JSV.common.Annotation.AType.Measurements,b);if(null!=d)for(var c=d.size();0<=--c;)this.drawMeasurement(a,d.get(c));b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumMeasurements=d)},"~O,~N");c(c$,"drawMeasurement",
function(a,b){if(!(0==b.text.length&&b!==this.pendingMeasurement)){this.pd.setFont(a,this.xPixels,1,12,!1);this.g2d.setGraphicsColor(a,b===this.pendingMeasurement?this.pd.getColor(JSV.common.ScriptToken.PEAKTABCOLOR):this.pd.BLACK);var d=this.toPixelX(b.getXVal()),c=this.toPixelY(b.getYVal()),f=this.toPixelX(b.getXVal2());if(!Double.isNaN(b.getXVal())&&!(d!=this.fixX(d)||f!=this.fixX(f))){var e=2<=Math.abs(d-f),m=this.getScale().isYZeroOnScale()&&b.spec.isHNMR(),j=v((d+f)/2);this.g2d.setStrokeBold(a,
!0);e&&this.g2d.drawLine(a,d,c,f,c);m&&this.g2d.drawLine(a,d+1,this.yPixel1-1,f,this.yPixel1-1);this.g2d.setStrokeBold(a,!1);e&&this.g2d.drawString(a,b.text,j+b.offsetX,c-b.offsetY);m&&(this.g2d.drawLine(a,d,this.yPixel1,d,this.yPixel1-6*this.pd.scalingFactor),this.g2d.drawLine(a,f,this.yPixel1,f,this.yPixel1-6*this.pd.scalingFactor))}}},"~O,JSV.common.Measurement");c(c$,"getPinSelected",function(a,b){if(null!=this.widgets)for(var d=0;d<this.widgets.length;d++)if(null!=this.widgets[d]&&this.widgets[d].isPinOrCursor&&
this.widgets[d].selected(a,b))return this.widgets[d];return null},"~N,~N");c(c$,"set2DCrossHairs",function(a,b){var d;if(a==this.imageView.fixX(a)&&b==this.fixY(b)&&(this.pin1Dx1.setX(d=this.imageView.toX(a),this.toPixelX(d)),this.cur2Dx1.setX(d,a),this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b)),this.isLinked)){var c=this.imageView.toY(b);this.pd.set2DCrossHairsLinked(this,d,c,!this.sticky2Dcursor)}},"~N,~N");c(c$,"reset2D",function(a){a?(this.imageView.setView0(this.imageView.xPixel0,
this.pin2Dy0.yPixel0,this.imageView.xPixel1,this.pin2Dy1.yPixel0),this.doZoom(0,this.getScale().minY,0,this.getScale().maxY,!0,!1,!1,!1,!0)):this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.yPixel0,this.pin2Dx1.xPixel0,this.imageView.yPixel1)},"~B");c(c$,"setAnnotationText",function(a){var b=this.pd.getInput("New text?","Set Label",a.text);if(null==b)return!1;0==b.length?this.annotations.removeObj(a):a.text=b;return!0},"JSV.common.Annotation");c(c$,"checkIntegral",function(a,b,d){var c=
this.getDialog(JSV.common.Annotation.AType.Integration,-1);null!=c&&(a=c.getData().addIntegralRegion(a,b),d&&w(c,JSV.dialog.JSVDialog)&&c.update(null,0,0),this.selectedSpectrumIntegrals=null,this.pendingIntegral=d?null:a)},"~N,~N,~B");c(c$,"setToolTipForPixels",function(a,b){var d=this.getPinSelected(a,b),c=this.getScale().precision[0],f=this.getScale().precision[1];if(null!=d)this.setStartupPinTip()||(d===this.pin1Dx01||d===this.pin2Dx01?c=JU.DF.formatDecimalDbl(Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),
c)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),c):d===this.pin1Dy01?c=JU.DF.formatDecimalDbl(Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),f)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),f):d===this.cur2Dy?(d=this.imageView.toSubspectrumIndex(d.yPixel0),c=this.get2DYLabel(d,c)):c=d===this.pin2Dy01?""+v(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+v(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):
d.isXtype?JU.DF.formatDecimalDbl(d.getXVal(),c):d.is2D?""+v(d.getYVal()):JU.DF.formatDecimalDbl(d.getYVal(),f),this.pd.setToolTipText(c));else{if(null!=this.imageView){if(this.imageView.fixX(a)==a&&this.fixY(b)==b){d=this.imageView.toSubspectrumIndex(b);c=JU.DF.formatDecimalDbl(this.imageView.toX(a),c)+" "+this.getSpectrum().getAxisLabel(!0)+",  "+this.get2DYLabel(d,c);this.pd.setToolTipText(this.pd.display1D?c:"");this.pd.coordStr=c;return}if(!this.pd.display1D){this.pd.setToolTipText("");this.pd.coordStr=
"";return}}var d=this.toX(this.fixX(a)),c=null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toSubspectrumIndex(this.fixY(b)):this.toY(this.fixY(b)),f=this.setCoordStr(d,c),e=this.getFixedSelectedSpectrumIndex();this.isInPlotRegion(a,b)?1!=this.nSpectra&&this.haveIntegralDisplayed(e)&&(c=this.getIntegrationGraph(e).getPercentYValueAt(d),f+=", "+JU.DF.formatDecimalDbl(c,1)):c=NaN;this.pd.setToolTipText(null!=this.pendingMeasurement||null!=this.selectedMeasurement||null!=this.selectedIntegral?
this.pd.hasFocus()?"Press ESC to delete "+(null!=this.selectedIntegral?"integral, DEL to delete all visible, or N to normalize":null==this.pendingMeasurement?'"'+this.selectedMeasurement.text+'" or DEL to delete all visible':"measurement"):"":Double.isNaN(c)?null:f)}},"~N,~N");c(c$,"setCoordStr",function(a,b){var d=JU.DF.formatDecimalDbl(a,this.getScale().precision[0]);this.pd.coordStr="("+d+(this.haveSingleYScale||0<=this.iSpectrumSelected?", "+JU.DF.formatDecimalDbl(b,this.getScale().precision[1]):
"")+")";return d},"~N,~N");c(c$,"setStartupPinTip",function(){if(null==this.pd.startupPinTip)return!1;this.pd.setToolTipText(this.pd.startupPinTip);this.pd.startupPinTip=null;return!0});c(c$,"get2DYLabel",function(a,b){var d=this.getSpectrumAt(0).getSubSpectra().get(a);return JU.DF.formatDecimalDbl(d.getY2D(),b)+(d.y2DUnits.equals("HZ")?" HZ ("+JU.DF.formatDecimalDbl(d.getY2DPPM(),b)+" PPM)":"")},"~N,~N");c(c$,"isOnSpectrum",function(a,b,d){var c=null,f=!0,e=0>d;if(e){c=this.getDialog(JSV.common.Annotation.AType.Integration,
-1);if(null==c)return!1;c=c.getData().getXYCoords();d=this.getFixedSelectedSpectrumIndex()}else{this.setScale(d);var m=this.spectra.get(d),c=m.xyCoords,f=m.isContinuous()}var m=d*G(this.yPixels*(this.yStackOffsetPercent/100)),j=this.viewData.getStartingPointIndex(d);d=this.viewData.getEndingPointIndex(d);if(f)for(f=j;f<d;f++){var l=c[f],k=c[f+1],j=this.toPixelX(l.getXVal()),n=this.toPixelX(k.getXVal()),l=e?this.toPixelYint(l.getYVal()):this.toPixelY(l.getYVal()),k=e?this.toPixelYint(k.getYVal()):
this.toPixelY(k.getYVal());if(!(-2147483648==l||-2147483648==k))if(l=this.fixY(l)-m,k=this.fixY(k)-m,JSV.common.GraphSet.isOnLine(a,b,j,l,n,k))return!0}else for(f=j;f<=d;f++)if(e=c[f],k=this.toPixelY(e.getYVal()),-2147483648!=k&&(j=this.toPixelX(e.getXVal()),l=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),l=this.fixY(l),k=this.fixY(k),!(l==k&&(l==this.yPixel0||l==this.yPixel1))&&JSV.common.GraphSet.isOnLine(a,b,j,l,j,k)))return!0;return!1},"~N,~N,~N");c$.distance=c(c$,"distance",function(a,
b){return Math.sqrt(a*a+b*b)},"~N,~N");c$.findCompatibleGraphSet=c(c$,"findCompatibleGraphSet",function(a,b){for(var d=0;d<a.size();d++)if(JSV.common.Spectrum.areXScalesCompatible(b,a.get(d).getSpectrum(),!1,!1))return a.get(d);return null},"JU.Lst,JSV.common.Spectrum");c$.isGoodEvent=c(c$,"isGoodEvent",function(a,b,d){return null==b?5<Math.abs(a.xPixel1-a.xPixel0)&&5<Math.abs(a.yPixel1-a.yPixel0):d?5<Math.abs(a.xPixel0-b.xPixel0):5<Math.abs(a.yPixel0-b.yPixel0)},"JSV.common.PlotWidget,JSV.common.PlotWidget,~B");
c$.isOnLine=c(c$,"isOnLine",function(a,b,d,c,f,e){var m=Math.abs(d-a);if(2>m&&2>Math.abs(c-b))return!0;var j=f-a;if(2>Math.abs(j)&&2>Math.abs(e-b))return!0;var l=c-e;if(2<Math.abs(l)&&c<b==e<b)return!1;var k=d-f;return 2<Math.abs(k)&&d<a==f<a?!1:JSV.common.GraphSet.distance(m,c-b)+JSV.common.GraphSet.distance(j,b-e)<JSV.common.GraphSet.distance(k,l)+2},"~N,~N,~N,~N,~N,~N");c$.setFractionalPositions=c(c$,"setFractionalPositions",function(a,b,d){var c=b.size(),f=0,e=0;a.isLinked=d!==JSV.common.PanelData.LinkMode.NONE;
if(d===JSV.common.PanelData.LinkMode.NONE){for(var m=0;m<c;m++)d=b.get(m),f+=(d.getSpectrumAt(0).is1D(),1)*d.nSplit;f=1/f;for(m=0;m<c;m++)d=b.get(m),d.isLinked=!1,a=d.getSpectrumAt(0).is1D()?f:1*f,d.fX0=0,d.fY0=e,d.fracX=1,d.fracY=a,e+=a*d.nSplit}else{var f=null,j=-1;if(2==c||3==c)for(m=0;m<c;m++)if(d=b.get(m),!d.getSpectrum().is1D()){f=d;0<=j&&(m=-2);j=m;break}if(-2==j||-1==j&&2!=c)JSV.common.GraphSet.setFractionalPositions(a,b,JSV.common.PanelData.LinkMode.NONE);else for(m=0;m<c;m++)d=b.get(m),
d.isLinked=!0,a=d.getSpectrumAt(0),a.is1D()?(null!=f&&(j=f.getSpectrumAt(0),JSV.common.Spectrum.areLinkableX(a,j)&&(d.gs2dLinkedX=f),JSV.common.Spectrum.areLinkableY(a,j)&&(d.gs2dLinkedY=f)),d.fX0=0,d.fY0=e,d.fracX=null==f?1:0.5,d.fracY=3==c||null==f?0.5:1,e+=0.5):(d.fX0=0.5,d.fY0=0,d.fracX=0.5,d.fracY=1)}},"JSV.common.PanelData,JU.Lst,JSV.common.PanelData.LinkMode");c(c$,"addAnnotation",function(a,b){if(0==a.size()||1==a.size()&&a.get(0).equalsIgnoreCase("none"))return this.lastAnnotation=this.annotations=
null;4>a.size()&&null==this.lastAnnotation&&(this.lastAnnotation=this.getAnnotation((this.getScale().maxXOnScale+this.getScale().minXOnScale)/2,(this.getScale().maxYOnScale+this.getScale().minYOnScale)/2,b,!1,!1,0,0));var d=this.getAnnotation(a,this.lastAnnotation);if(null==d)return null;if(null==this.annotations&&1==a.size()&&'"'==a.get(0).charAt(0))return d=d.text,this.getSpectrum().setTitle(d),d;this.lastAnnotation=d;this.addAnnotation(d,!1);return null},"JU.Lst,~S");c(c$,"addHighlight",function(a,
b,d,c){null==d&&(d=this.getSpectrumAt(0));a=I(JSV.common.GraphSet.Highlight,this,null,a,b,d,null==c?this.pd.getColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR):c);this.highlights.contains(a)||this.highlights.addLast(a)},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");c(c$,"addPeakHighlight",function(a){for(var b=this.spectra.size();0<=--b;){var d=this.spectra.get(b);this.removeAllHighlights(d);if(!(null==a||a.isClearAll()||d!==a.spectrum)){var c=a.toString();if(null!=c){var f=JU.PT.getQuotedAttribute(c,
"xMin"),c=JU.PT.getQuotedAttribute(c,"xMax");if(null==f||null==c)break;f=JU.PT.parseFloat(f);c=JU.PT.parseFloat(c);if(Float.isNaN(f)||Float.isNaN(c))break;this.pd.addHighlight(this,f,c,d,200,140,140,100);d.setSelectedPeak(a);!this.getScale().isInRangeX(f)&&!(this.getScale().isInRangeX(c)||f<this.getScale().minX&&this.getScale().maxX<c)&&this.setZoomTo(0)}}}},"JSV.common.PeakInfo");c(c$,"advanceSubSpectrum",function(a){var b=this.getSpectrumAt(0);a=b.advanceSubSpectrum(a);b.isForcedSubset()&&this.viewData.setXRangeForSubSpectrum(this.getSpectrum().getXYCoords());
this.pd.notifySubSpectrumChange(a,this.getSpectrum())},"~N");c(c$,"checkSpectrumClickedEvent",function(a,b,d){if(this.nextClickForSetPeak)return!1;if(0<d&&this.checkArrowLeftRightClick(a,b))return!0;if(1<d||(null!=this.pendingMeasurement||!this.isInPlotRegion(a,b))||0==d&&(d=this.isOnSpectrum(a,b,-1),this.pd.integralShiftMode=d?this.getShiftMode(a,b):0,this.pd.isIntegralDrag=0==this.pd.integralShiftMode&&(d||this.haveIntegralDisplayed(-1)&&null!=this.findMeasurement(this.getIntegrationGraph(-1),a,
b,0)),0!=this.pd.integralShiftMode)||!this.showAllStacked)return!1;this.stackSelected=!1;for(d=0;d<this.nSpectra;d++)if(this.isOnSpectrum(a,b,d))return this.setSpectrumClicked(this.iPreviousSpectrumClicked=d),!1;if(this.isDialogOpen())return!1;this.setSpectrumClicked(-1);return this.stackSelected=!1},"~N,~N,~N");c(c$,"getShiftMode",function(a,b){return this.isStartEndIntegral(a,!1)?b:this.isStartEndIntegral(a,!0)?-b:0},"~N,~N");c(c$,"isDialogOpen",function(){return this.isVisible(this.getDialog(JSV.common.Annotation.AType.Integration,
-1))||this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,-1))||this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,-1))});c(c$,"isStartEndIntegral",function(a,b){return b?20>this.xPixelPlot1-a:20>a-this.xPixelPlot0},"~N,~B");c(c$,"checkWidgetEvent",function(a,b,d){if(this.zoomEnabled&&this.triggered)if(this.triggered=!1,d)2==this.pd.clickCount&&null==this.pendingMeasurement?(-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),
this.processPendingMeasurement(a,b,2)):null==this.pendingMeasurement&&(d=this.getPinSelected(a,b),null==d&&(b=this.fixY(b),a<this.xPixel1?(this.pd.shiftPressed&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),a=this.fixX(a),this.zoomBox1D.setX(this.toX(a),a),this.zoomBox1D.yPixel0=b,d=this.zoomBox1D):null!=this.imageView&&a<this.imageView.xPixel1&&(this.zoomBox2D.setX(this.imageView.toX(a),this.imageView.fixX(a)),this.zoomBox2D.yPixel0=b,d=this.zoomBox2D)),this.pd.thisWidget=d);else if(this.nextClickForSetPeak=
!1,d=this.pd.thisWidget,null!=d)if(d===this.zoomBox1D)this.zoomBox1D.xPixel1=this.fixX(a),this.zoomBox1D.yPixel1=this.fixY(b),this.pd.isIntegralDrag&&this.zoomBox1D.xPixel0!=this.zoomBox1D.xPixel1&&this.checkIntegral(this.zoomBox1D.getXVal(),this.toX(this.zoomBox1D.xPixel1),!1);else if(d===this.zoomBox2D)this.zoomBox2D.xPixel1=this.imageView.fixX(a),this.zoomBox2D.yPixel1=this.fixY(b);else if(d===this.cur2Dy)b=this.fixY(b),this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=b,this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b));
else if(!(d===this.cur2Dx0||d===this.cur2Dx1))if(d===this.pin1Dx0||d===this.pin1Dx1||d===this.pin1Dx01){a=this.fixX(a);d.setX(this.toX0(a),a);if(d===this.pin1Dx01){d=a-v((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2);a=this.pin1Dx0.xPixel0+d;b=this.pin1Dx1.xPixel0+d;if(0==d||this.fixX(a)!=a||this.fixX(b)!=b)return;this.pin1Dx0.setX(this.toX0(a),a);this.pin1Dx1.setX(this.toX0(b),b)}this.doZoom(this.pin1Dx0.getXVal(),0,this.pin1Dx1.getXVal(),0,!0,!1,!1,!0,!1)}else if(d===this.pin1Dy0||d===this.pin1Dy1||
d===this.pin1Dy01){b=this.fixY(b);d.setY(this.toY0(b),b);if(d===this.pin1Dy01){d=b-v((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2)+1;b=this.pin1Dy0.yPixel0+d;a=this.pin1Dy1.yPixel0+d;d=this.toY0(b);var c=this.toY0(a);if(Math.min(d,c)==this.getScale().minY||Math.max(d,c)==this.getScale().maxY)return;this.pin1Dy0.setY(d,b);this.pin1Dy1.setY(c,a)}this.doZoom(0,this.pin1Dy0.getYVal(),0,this.pin1Dy1.getYVal(),null==this.imageView,null==this.imageView,!1,!1,!1)}else if(d===this.pin2Dx0||d===this.pin2Dx1||
d===this.pin2Dx01){a=this.imageView.fixX(a);d.setX(this.imageView.toX0(a),a);if(d===this.pin2Dx01){d=a-v((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2)+1;a=this.pin2Dx0.xPixel0+d;b=this.pin2Dx1.xPixel0+d;if(this.imageView.fixX(a)!=a||this.imageView.fixX(b)!=b)return;this.pin2Dx0.setX(this.imageView.toX0(a),a);this.pin2Dx1.setX(this.imageView.toX0(b),b)}JSV.common.GraphSet.isGoodEvent(this.pin2Dx0,this.pin2Dx1,!0)?(this.imageView.setView0(this.pin2Dx0.xPixel0,this.pin2Dy0.yPixel0,this.pin2Dx1.xPixel0,
this.pin2Dy1.yPixel0),this.doZoom(this.pin2Dx0.getXVal(),this.getScale().minY,this.pin2Dx1.getXVal(),this.getScale().maxY,!1,!1,!1,!0,!1)):this.reset2D(!0)}else if(d===this.pin2Dy0||d===this.pin2Dy1||d===this.pin2Dy01){b=this.fixY(b);d.setY(this.imageView.toSubspectrumIndex(b),b);if(d===this.pin2Dy01){d=b-v((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/2)+1;b=this.pin2Dy0.yPixel0+d;a=this.pin2Dy1.yPixel0+d;if(b!=this.fixY(b)||a!=this.fixY(a))return;this.pin2Dy0.setY(this.imageView.toSubspectrumIndex(b),
b);this.pin2Dy1.setY(this.imageView.toSubspectrumIndex(a),a)}JSV.common.GraphSet.isGoodEvent(this.pin2Dy0,this.pin2Dy1,!1)?this.imageView.setView0(this.pin2Dx0.xPixel0,this.pin2Dy0.yPixel0,this.pin2Dx1.xPixel1,this.pin2Dy1.yPixel1):this.reset2D(!1)}},"~N,~N,~B");c(c$,"clearIntegrals",function(){this.checkIntegral(NaN,0,!1)});c(c$,"clearMeasurements",function(){this.removeDialog(this.getFixedSelectedSpectrumIndex(),JSV.common.Annotation.AType.Measurements)});c$.createGraphSetsAndSetLinkMode=c(c$,"createGraphSetsAndSetLinkMode",
function(a,b,d,c,f,e){for(var m=new JU.Lst,j=0;j<d.size();j++){var l=d.get(j),k=e===JSV.common.PanelData.LinkMode.NONE?JSV.common.GraphSet.findCompatibleGraphSet(m,l):null;null==k&&m.addLast(k=new JSV.common.GraphSet(b.getPanelData()));k.addSpec(l)}JSV.common.GraphSet.setFractionalPositions(a,m,e);for(j=m.size();0<=--j;)m.get(j).initGraphSet(c,f),JU.Logger.info("JSVGraphSet "+(j+1)+" nSpectra = "+m.get(j).nSpectra);return m},"JSV.common.PanelData,JSV.api.JSVPanel,JU.Lst,~N,~N,JSV.common.PanelData.LinkMode");
c(c$,"drawGraphSet",function(a,b,d,c,f,e,m,j,l,k,n){this.zoomEnabled=this.pd.getBoolean(JSV.common.ScriptToken.ENABLEZOOM);this.height=f*this.pd.scalingFactor;this.width=c*this.pd.scalingFactor;this.left=e*this.pd.scalingFactor;this.right=m*this.pd.scalingFactor;this.top=j*this.pd.scalingFactor;this.bottom=l*this.pd.scalingFactor;this.$haveSelectedSpectrum=!1;this.selectedSpectrumMeasurements=this.selectedSpectrumIntegrals=null;if(!this.pd.isPrinting&&null!=this.widgets)for(c=0;c<this.widgets.length;c++)null!=
this.widgets[c]&&(this.widgets[c].isVisible=!1);for(c=0;c<this.nSplit;c++)this.setPositionForFrame(c),this.drawAll(a,b,d,c,k||1<this.nSplit,n);this.setPositionForFrame(1<this.nSplit?this.pd.currentSplitPoint:0)},"~O,~O,~O,~N,~N,~N,~N,~N,~N,~B,~B");c(c$,"escapeKeyPressed",function(a){null!=this.zoomBox1D&&(this.zoomBox1D.xPixel0=this.zoomBox1D.xPixel1=0);null!=this.zoomBox2D&&(this.zoomBox2D.xPixel0=this.zoomBox2D.xPixel1=0);this.inPlotMove&&(null!=this.pendingMeasurement?this.pendingMeasurement=null:
(this.pendingMeasurement=this.pd.thisWidget=null,null!=this.selectedSpectrumMeasurements&&null!=this.selectedMeasurement&&(a?this.selectedSpectrumMeasurements.clear(this.getScale().minXOnScale,this.getScale().maxXOnScale):this.selectedSpectrumMeasurements.removeObj(this.selectedMeasurement),this.selectedMeasurement=null,this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)),null!=this.selectedSpectrumIntegrals&&null!=this.selectedIntegral&&(a?this.selectedSpectrumIntegrals.clear(this.getScale().minXOnScale,
this.getScale().maxXOnScale):this.selectedSpectrumIntegrals.removeObj(this.selectedIntegral),this.selectedIntegral=null,this.updateDialog(JSV.common.Annotation.AType.Integration,-1))))},"~B");c$.findGraphSet=c(c$,"findGraphSet",function(a,b,d){for(var c=a.size();0<=--c;)if(a.get(c).hasPoint(b,d))return a.get(c);return null},"JU.Lst,~N,~N");c(c$,"findMatchingPeakInfo",function(a){for(var b=null,d=0;d<this.spectra.size()&&null==(b=this.spectra.get(d).findMatchingPeakInfo(a));d++);return b},"JSV.common.PeakInfo");
c(c$,"getCurrentSpectrumIndex",function(){return 1==this.nSpectra?0:this.iSpectrumSelected});c(c$,"getSelectedIntegral",function(){return this.selectedIntegral});c(c$,"getShowAnnotation",function(a,b){var d=this.getDialog(a,b);return null!=d&&d.getState()},"JSV.common.Annotation.AType,~N");c(c$,"hasFileLoaded",function(a){for(var b=this.spectra.size();0<=--b;)if(this.spectra.get(b).getFilePathForwardSlash().equals(a))return!0;return!1},"~S");c(c$,"haveSelectedSpectrum",function(){return this.$haveSelectedSpectrum});
c(c$,"mouseClickedEvent",function(a,b,d,c){this.selectedIntegral=this.selectedMeasurement=null;var f=this.nextClickForSetPeak;this.nextClickForSetPeak=!1;if(!this.checkArrowUpDownClick(a,b))if(this.lastClickX=NaN,this.lastPixelX=2147483647,this.isSplitWidget(a,b))this.splitStack(this.pd.graphSets,1==this.nSplit);else{var e=this.getPinSelected(a,b);if(null!=e)this.setWidgetValueByUser(e);else if(e=null!=this.imageView&&a==this.imageView.fixX(a)&&b==this.fixY(b),2==d&&(-1==this.iSpectrumClicked&&0<=
this.iPreviousSpectrumClicked)&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),!e&&c)this.setSpectrumClicked(this.iPreviousSpectrumClicked),null!=this.pendingMeasurement?this.processPendingMeasurement(a,b,-3):0<=this.iSpectrumClicked&&this.processPendingMeasurement(a,b,3);else if(this.lastXMax=NaN,2==d)e?(this.sticky2Dcursor&&this.addAnnotation(this.getAnnotation(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b),this.pd.coordStr,!1,!0,5,5),!0),this.sticky2Dcursor=!this.sticky2Dcursor,
this.set2DCrossHairs(a,b)):this.isInTopBar(a,b)?this.doZoom(this.toX0(this.xPixel0),0,this.toX0(this.xPixel1),0,!0,!1,!1,!0,!0):this.isInRightBar(a,b)?this.doZoom(this.getScale().minXOnScale,this.viewList.get(0).getScale().minYOnScale,this.getScale().maxXOnScale,this.viewList.get(0).getScale().maxYOnScale,!0,!0,!1,!1,!1):this.isInTopBar2D(a,b)?this.reset2D(!0):this.isInRightBar2D(a,b)?this.reset2D(!1):null!=this.pendingMeasurement?this.processPendingMeasurement(a,b,-2):0<=this.iSpectrumClicked&&this.processPendingMeasurement(a,
b,2);else if(e){if(null!=this.annotations&&(d=(new JSV.common.Coordinate).set(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b)),d=this.findAnnotation2D(d),null!=d&&this.setAnnotationText(d)))return;this.sticky2Dcursor=!1;this.set2DCrossHairs(a,b)}else{if(this.isInPlotRegion(a,b)){if(null!=this.selectedSpectrumIntegrals&&this.checkIntegralNormalizationClick(a,b))return;if(null!=this.pendingMeasurement){this.processPendingMeasurement(a,b,1);return}this.setCoordClicked(a,this.toX(a),this.toY(b));
this.updateDialog(JSV.common.Annotation.AType.PeakList,-1);if(f){this.shiftSpectrum(NaN,NaN);return}}else this.setCoordClicked(0,NaN,0);this.pd.notifyPeakPickedListeners(null)}}},"~N,~N,~N,~B");c(c$,"updateDialog",function(a,b){var d=this.getDialog(a,b);if(null!=d&&this.isVisible(d)){var c=this.toX(this.xPixel1)-this.toX(this.xPixel0),f=this.getSpectrum().isInverted()?this.yPixel1-this.pd.mouseY:this.pd.mouseY-this.yPixel0;d.update(this.pd.coordClicked,c,f)}},"JSV.common.Annotation.AType,~N");c(c$,
"isVisible",function(a){return w(a,JSV.dialog.JSVDialog)&&a.isVisible()},"JSV.api.AnnotationData");c(c$,"mouseReleasedEvent",function(a,b){if(null!=this.pendingMeasurement)2>Math.abs(this.toPixelX(this.pendingMeasurement.getXVal())-a)&&(this.pendingMeasurement=null),this.processPendingMeasurement(a,b,-2),this.setToolTipForPixels(a,b);else if(0!=this.pd.integralShiftMode)this.pd.integralShiftMode=0,this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0;else{0<=this.iSpectrumMovedTo&&this.setScale(this.iSpectrumMovedTo);
var d=this.pd.thisWidget;if(this.pd.isIntegralDrag)JSV.common.GraphSet.isGoodEvent(this.zoomBox1D,null,!0)&&this.checkIntegral(this.toX(this.zoomBox1D.xPixel0),this.toX(this.zoomBox1D.xPixel1),!0),this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0=0,this.pendingIntegral=null,this.pd.isIntegralDrag=!1;else if(d===this.zoomBox2D)JSV.common.GraphSet.isGoodEvent(this.zoomBox2D,null,!0)&&(this.imageView.setZoom(this.zoomBox2D.xPixel0,this.zoomBox2D.yPixel0,this.zoomBox2D.xPixel1,this.zoomBox2D.yPixel1),this.zoomBox2D.xPixel1=
this.zoomBox2D.xPixel0,this.doZoom(this.imageView.toX(this.imageView.xPixel0),this.getScale().minY,this.imageView.toX(this.imageView.xPixel0+this.imageView.xPixels-1),this.getScale().maxY,!1,!1,!1,!0,!0));else if(d===this.zoomBox1D){if(JSV.common.GraphSet.isGoodEvent(this.zoomBox1D,null,!0)){var d=this.zoomBox1D.xPixel1,c=this.pd.shiftPressed;this.doZoom(this.toX(this.zoomBox1D.xPixel0),c?this.toY(this.zoomBox1D.yPixel0):0,this.toX(d),c?this.toY(this.zoomBox1D.yPixel1):0,!0,c,!0,!0,!0);this.zoomBox1D.xPixel1=
this.zoomBox1D.xPixel0}}else(d===this.pin1Dx0||d===this.pin1Dx1||d===this.cur2Dx0||d===this.cur2Dx1)&&this.addCurrentZoom()}},"~N,~N");c(c$,"mouseMovedEvent",function(a,b){if(1<this.nSpectra){var d=this.getSplitPoint(b);this.setPositionForFrame(d);this.setSpectrumMovedTo(1<this.nSplit?d:this.iSpectrumSelected);0<=this.iSpectrumMovedTo&&this.setScale(this.iSpectrumMovedTo)}this.inPlotMove=this.isInPlotRegion(a,b);this.setXPixelMovedTo(1.7976931348623157E308,1.7976931348623157E308,this.inPlotMove?a:
-1,-1);this.inPlotMove&&(this.xValueMovedTo=this.toX(this.xPixelMovedTo),this.yValueMovedTo=this.getSpectrum().getYValueAt(this.xValueMovedTo));if(0!=this.pd.integralShiftMode){var d=this.getDialog(JSV.common.Annotation.AType.Integration,-1),c=d.getData().getXYCoords(),c=c[0<this.pd.integralShiftMode?c.length-1:0].getYVal();d.getData().shiftY(this.pd.integralShiftMode,this.toPixelYint(c)+b-(0<this.pd.integralShiftMode?this.yPixelPlot1:this.yPixelPlot0),this.yPixel0,this.yPixels)}else this.pd.isIntegralDrag||
(null!=this.pendingMeasurement?(this.processPendingMeasurement(a,b,0),this.setToolTipForPixels(a,b)):(this.selectedMeasurement=this.inPlotMove&&null!=this.selectedSpectrumMeasurements?this.findMeasurement(this.selectedSpectrumMeasurements,a,b,0):null,this.selectedIntegral=null,this.inPlotMove&&(null!=this.selectedSpectrumIntegrals&&null==this.selectedMeasurement)&&(this.selectedIntegral=this.findMeasurement(this.selectedSpectrumIntegrals,a,b,0),null==this.selectedIntegral&&(this.selectedIntegral=
this.findMeasurement(this.selectedSpectrumIntegrals,a,b,-5))),this.setToolTipForPixels(a,b),null==this.imageView?(this.piMouseOver=null,d=1<this.nSplit?this.iSpectrumMovedTo:this.iSpectrumClicked,!this.isDrawNoSpectra()&&0<=d&&(d=this.spectra.get(d),null!=d.getPeakList()&&(this.coordTemp.setXVal(this.toX(a)),this.coordTemp.setYVal(this.toY(b)),this.piMouseOver=d.findPeakByCoord(a,this.coordTemp)))):!this.pd.display1D&&this.sticky2Dcursor&&this.set2DCrossHairs(a,b)))},"~N,~N");c(c$,"nextView",function(){this.currentZoomIndex+
1<this.viewList.size()&&this.setZoomTo(this.currentZoomIndex+1)});c(c$,"previousView",function(){0<this.currentZoomIndex&&this.setZoomTo(this.currentZoomIndex-1)});c(c$,"resetView",function(){this.setZoomTo(0)});c(c$,"removeAllHighlights",function(){this.removeAllHighlights(null)});c(c$,"removeHighlight",function(a){this.highlights.remove(a)},"~N");c(c$,"removeHighlight",function(a,b){for(var d=this.highlights.size();0<=--d;){var c=this.highlights.get(d);c.x1==a&&c.x2==b&&this.highlights.remove(d)}},
"~N,~N");c(c$,"scaleYBy",function(a){if(null!=this.imageView||this.zoomEnabled)this.viewData.scaleSpectrum(null==this.imageView?this.iSpectrumSelected:-2,a),null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),this.pd.refresh()},"~N");c(c$,"selectSpectrum",function(a,b,d){for(var c=!1,f=this.spectra.size();0<=--f;)if((null==a||this.getSpectrumAt(f).getFilePathForwardSlash().equals(a))&&this.getSpectrumAt(f).matchesPeakTypeModel(b,d))this.setSpectrumSelected(f),1<this.nSplit&&this.splitStack(this.pd.graphSets,
!0),c=!0;1<this.nSpectra&&(!c&&0<=this.iSpectrumSelected&&!this.pd.isCurrentGraphSet(this))&&this.setSpectrumSelected(-2147483648);return c},"~S,~S,~S");c(c$,"selectPeakByFileIndex",function(a,b,d){for(var c,f=this.spectra.size();0<=--f;)if(null!=(c=this.getSpectrumAt(f).selectPeakByFileIndex(a,b,d)))return c;return null},"~S,~S,~S");c(c$,"setSelected",function(a){0>a?(this.bsSelected.clearAll(),this.setSpectrumClicked(-1)):(this.bsSelected.set(a),this.setSpectrumClicked(1==this.bsSelected.cardinality()?
a:-1),1<this.nSplit&&0<=a&&(this.pd.currentSplitPoint=a))},"~N");c(c$,"setSelectedIntegral",function(a){var b=this.selectedIntegral.getSpectrum();this.getIntegrationGraph(this.getSpectrumIndex(b)).setSelectedIntegral(this.selectedIntegral,a)},"~N");c(c$,"setShowAnnotation",function(a,b){var d=this.getDialog(a,-1);if(null==d)null!=b&&b!==Boolean.TRUE||(a===JSV.common.Annotation.AType.PeakList||a===JSV.common.Annotation.AType.Integration||a===JSV.common.Annotation.AType.Measurements)&&this.pd.showDialog(a);
else if(null==b)w(d,JSV.dialog.JSVDialog)?d.setVisible(!1):d.setState(!d.getState());else{var c=b.booleanValue();d.setState(c);(c||w(d,JSV.dialog.JSVDialog))&&this.pd.showDialog(a)}},"JSV.common.Annotation.AType,Boolean");c(c$,"checkIntegral",function(a,b){if(!this.getSpectrum().canIntegrate()||this.reversePlot)return!1;var d=this.getFixedSelectedSpectrumIndex(),c=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==b)return!0;switch(JSV.common.IntegralData.IntMode.getMode(b.toUpperCase())){case JSV.common.IntegralData.IntMode.ON:this.integrate(d,
a);break;case JSV.common.IntegralData.IntMode.OFF:this.integrate(d,null);break;case JSV.common.IntegralData.IntMode.TOGGLE:this.integrate(d,null==c?a:null);break;case JSV.common.IntegralData.IntMode.AUTO:null==c&&(this.checkIntegral(a,"ON"),c=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=c&&c.getData().autoIntegrate();break;case JSV.common.IntegralData.IntMode.LIST:this.pd.showDialog(JSV.common.Annotation.AType.Integration);break;case JSV.common.IntegralData.IntMode.MARK:null==
c&&(this.checkIntegral(a,"ON"),c=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=c&&c.getData().addMarks(b.substring(4).trim());break;case JSV.common.IntegralData.IntMode.MIN:if(null!=c)try{var f=Double.parseDouble(JSV.common.ScriptToken.getTokens(b).get(1));c.getData().setMinimumIntegral(f)}catch(e){if(!y(e,Exception))throw e;}break;case JSV.common.IntegralData.IntMode.UPDATE:null!=c&&c.getData().update(a)}this.updateDialog(JSV.common.Annotation.AType.Integration,-1);return!0},
"JSV.common.Parameters,~S");c(c$,"setSpectrum",function(a,b){b&&1<this.nSplit?1<this.nSplit&&this.setSpectrumClicked(a):(this.setSpectrumClicked(a),this.showAllStacked=this.stackSelected=!1);0<=a&&this.dialogsToFront(this.getSpectrum())},"~N,~B");c(c$,"setSpectrumJDX",function(a){var b=this.getFixedSelectedSpectrumIndex();this.spectra.remove(b);this.spectra.add(b,a);this.pendingMeasurement=null;this.clearViews();this.viewData.newSpectrum(this.spectra)},"JSV.common.Spectrum");c(c$,"setZoom",function(a,
b,d,c){this.setZoomTo(0);0==a&&0==d&&0==b&&0==c?(this.newPins(),this.imageView=null,this.getScale(),this.getScale()):this.doZoom(a,b,d,c,!0,b!=c,!1,!0,!0)},"~N,~N,~N,~N");c(c$,"shiftSpectrum",function(a,b){var d=this.getSpectrum();if(!d.isNMR()||!d.is1D())return!1;if(1.7976931348623157E308==b||1.7976931348623157E308==a)a=-d.addSpecShift(0);else{if(4.9E-324==b)return this.nextClickForSetPeak=!0,this.jsvp.showMessage("Click on or beside a peak to set its chemical shift.","Set Reference"),!1;if(Double.isNaN(a)||
4.9E-324==a){var c=4.9E-324==a?this.lastClickX:this.getNearestPeak(d,this.lastClickX,this.toY(this.pd.mouseY));if(Double.isNaN(c))return!1;if(Double.isNaN(b))try{var f=this.pd.getInput("New chemical shift (set blank to reset)","Set Reference",""+c).trim();b=0==f.length?c-d.addSpecShift(0):Double.parseDouble(f)}catch(e){if(y(e,Exception))return!1;throw e;}a=b-c}}if(0==a)return!1;d.addSpecShift(a);if(null!=this.annotations)for(c=this.annotations.size();0<=--c;)this.annotations.get(c).spec===d&&this.annotations.get(c).addSpecShift(a);
if(null!=this.dialogs)for(var m,c=this.dialogs.entrySet().iterator();c.hasNext()&&((m=c.next())||1);)m.getValue().getSpectrum()===d&&m.getValue().setSpecShift(a);this.getScale().addSpecShift(a);Double.isNaN(this.lastClickX)||(this.lastClickX+=a);this.updateDialogs();this.doZoom(0,this.getScale().minYOnScale,0,this.getScale().maxYOnScale,!0,!0,!1,!0,!1);this.pd.repaint();return!0},"~N,~N");c(c$,"toPeak",function(a){a*=this.drawXAxisLeftToRight?1:-1;Double.isNaN(this.lastClickX)&&(this.lastClickX=this.lastPixelX=
0);var b=this.getSpectrum(),d=this.setCoordClicked(this.lastPixelX,this.lastClickX,0);a=b.setNextPeak(d,a);0>a||(a=b.getPeakList().get(a),b.setSelectedPeak(a),this.setCoordClicked(a.getXPixel(),a.getX(),0),this.pd.notifyPeakPickedListeners(new JSV.common.PeakPickEvent(this.jsvp,this.pd.coordClicked,a)))},"~N");c(c$,"scaleSelectedBy",function(a){for(var b=this.bsSelected.nextSetBit(0);0<=b;b=this.bsSelected.nextSetBit(b+1))this.viewData.scaleSpectrum(b,a)},"~N");e(c$,"toString",function(){return"gs: "+
this.nSpectra+" "+this.spectra+" "+this.spectra.get(0).getFilePath()});c(c$,"setXPointer",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));this.xValueMovedTo=this.lastClickX=b;this.lastPixelX=this.toPixelX(b);this.setXPixelMovedTo(b,1.7976931348623157E308,0,0);this.yValueMovedTo=NaN},"JSV.common.Spectrum,~N");c(c$,"setXPointer2",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));this.setXPixelMovedTo(1.7976931348623157E308,b,0,0)},"JSV.common.Spectrum,~N");
c(c$,"hasCurrentMeasurement",function(a){return null!=(a===JSV.common.Annotation.AType.Integration?this.selectedSpectrumIntegrals:this.selectedSpectrumMeasurements)},"JSV.common.Annotation.AType");c(c$,"getDialog",function(a,b){-1==b&&(b=this.getCurrentSpectrumIndex());return null==this.dialogs||0>b?null:this.dialogs.get(a+"_"+b)},"JSV.common.Annotation.AType,~N");c(c$,"removeDialog",function(a,b){null!=this.dialogs&&0<=a&&this.dialogs.remove(b+"_"+a)},"~N,JSV.common.Annotation.AType");c(c$,"addDialog",
function(a,b,d){null==this.dialogs&&(this.dialogs=new java.util.Hashtable);a=b+"_"+a;d.setGraphSetKey(a);this.dialogs.put(a,d);return d},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");c(c$,"removeDialog",function(a){var b=a.getGraphSetKey();this.dialogs.remove(b);a=a.getData();null!=a&&this.dialogs.put(b,a)},"JSV.dialog.JSVDialog");c(c$,"getPeakListing",function(a,b,d){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var c=this.getDialog(JSV.common.Annotation.AType.PeakList,-1);
if(null==c){if(!d)return null;this.addDialog(a,JSV.common.Annotation.AType.PeakList,c=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.getSpectrum()))}c.getData().setPeakList(b,-2147483648,this.viewData.getScale());w(c,JSV.dialog.JSVDialog)&&c.setFields();return c.getData()},"~N,JSV.common.Parameters,~B");c(c$,"setPeakListing",function(a){var b=this.getDialog(JSV.common.Annotation.AType.PeakList,-1),d=w(b,JSV.dialog.JSVDialog)?b:null;(null==a?null==d||!d.isVisible():a.booleanValue())?
this.pd.showDialog(JSV.common.Annotation.AType.PeakList):w(b,JSV.dialog.JSVDialog)&&b.setVisible(!1)},"Boolean");c(c$,"haveIntegralDisplayed",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null!=a&&a.getState()},"~N");c(c$,"getIntegrationGraph",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null==a?null:a.getData()},"~N");c(c$,"setIntegrationRatios",function(a){var b=this.getFixedSelectedSpectrumIndex();null==this.aIntegrationRatios&&
(this.aIntegrationRatios=Array(this.nSpectra));this.aIntegrationRatios[b]=JSV.common.IntegralData.getIntegrationRatiosFromString(this.getSpectrum(),a)},"~S");c(c$,"getIntegrationRatios",function(a){return null==this.aIntegrationRatios?null:this.aIntegrationRatios[a]},"~N");c(c$,"integrate",function(a,b){var d=this.getSpectrumAt(a);if(null==b||!d.canIntegrate())return this.removeDialog(a,JSV.common.Annotation.AType.Integration),!1;this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(d,
b));return!0},"~N,JSV.common.Parameters");c(c$,"getIntegration",function(a,b,d){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var c=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==c){if(!d)return null;c=this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(this.getSpectrum(),b))}return c.getData()},"~N,JSV.common.Parameters,~B");c(c$,"getMeasurementInfo",function(a,b){var d;switch(a){case JSV.common.Annotation.AType.PeakList:d=this.getPeakListing(b,
null,!1);break;case JSV.common.Annotation.AType.Integration:d=this.getIntegration(b,null,!1);break;default:return null}if(null==d)return null;var c=new java.util.Hashtable;d.getInfo(c);return c},"JSV.common.Annotation.AType,~N");c(c$,"getInfo",function(a,b){var d=new java.util.Hashtable;if("viewInfo".equalsIgnoreCase(a))return this.getScale().getInfo(d);var c=new JU.Lst;d.put("spectra",c);for(var f=0;f<this.nSpectra;f++)if(!(0<=b&&f!=b)){var e=this.spectra.get(f),m=e.getInfo(a);if(0<=b&&null!=a&&
(2==m.size()||a.equalsIgnoreCase("id")))return 2==m.size()&&m.remove("id"),m;JSV.common.Parameters.putInfo(a,m,"type",e.getDataType());JSV.common.Parameters.putInfo(a,m,"titleLabel",e.getTitleLabel());JSV.common.Parameters.putInfo(a,m,"filePath",e.getFilePath().$replace("\\","/"));JSV.common.Parameters.putInfo(a,m,"PeakList",JSV.common.Parameters.isMatch(a,"PeakList")?this.getMeasurementInfo(JSV.common.Annotation.AType.PeakList,f):null);JSV.common.Parameters.putInfo(a,m,"Integration",JSV.common.Parameters.isMatch(a,
"Integration")?this.getMeasurementInfo(JSV.common.Annotation.AType.Integration,f):null);if(0<=b)return m;c.addLast(m)}return d},"~S,~N");c(c$,"getTitle",function(a){return 1==this.nSpectra||0<=this.iSpectrumSelected&&(!a||1==this.nSplit)?this.getSpectrum().getTitle():null},"~B");c(c$,"getCurrentView",function(){this.setScale(this.getFixedSelectedSpectrumIndex());return this.viewData.getScale()});c(c$,"set2DXY",function(a,b,d){var c;null!=this.gs2dLinkedX&&(c=this.toPixelX(a),c!=this.fixX(c)&&(c=-2147483648,
a=1.7976931348623157E308),this.cur1D2x1.setX(a,c));null!=this.gs2dLinkedY&&(c=this.toPixelX(b),c!=this.fixX(c)&&(c=-2147483648,b=1.7976931348623157E308),this.cur1D2x2.setX(b,c));this.cur1D2Locked=d},"~N,~N,~B");c(c$,"dialogsToFront",function(a){if(null!=this.dialogs){null==a&&(a=this.getSpectrum());for(var b,c=this.dialogs.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var g=b.getValue();this.isVisible(g)&&(null==a?g.setVisible(!0):g.setFocus(g.getSpectrum()===a))}}},"JSV.common.Spectrum");
c(c$,"setPlotColors",function(a){var b=a;if(b.length>this.nSpectra)a=Array(this.nSpectra),System.arraycopy(b,0,a,0,this.nSpectra),b=a;else if(this.nSpectra>b.length){a=Array(this.nSpectra);var c=this.nSpectra-b.length;System.arraycopy(b,0,a,0,b.length);for(var g=0,b=b.length;g<c;g++,b++)a[b]=this.generateRandomColor();b=a}this.plotColors=b},"~O");c(c$,"disposeImage",function(){null!=this.image2D&&this.image2D.parentNode.removeChild(this.image2D);this.plotColors=this.highlights=this.pd=this.jsvp=this.image2D=
null});c(c$,"generateRandomColor",function(){for(;;){var a=v(255*Math.random()),b=v(255*Math.random()),c=v(255*Math.random()),a=this.g2d.getColor3(a,b,c);if(0!=a.getRGB())return a}});c(c$,"setPlotColor0",function(a){this.plotColors[0]=a},"~O");c(c$,"getPlotColor",function(a){return a>=this.plotColors.length?null:this.plotColors[a]},"~N");c(c$,"setColorFromToken",function(a,b){null!=b&&this.g2d.setGraphicsColor(a,b===JSV.common.ScriptToken.PLOTCOLOR?this.plotColors[0]:this.pd.getColor(b))},"~O,JSV.common.ScriptToken");
c(c$,"setPlotColor",function(a,b){var c;switch(b){case -3:c=JSV.common.GraphSet.veryLightGrey;break;case -2:c=this.pd.BLACK;break;case -1:c=this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR);break;default:c=this.plotColors[b]}this.g2d.setGraphicsColor(a,c)},"~O,~N");c(c$,"draw2DImage",function(){null!=this.imageView&&this.g2d.drawGrayScaleImage(this.gMain,this.image2D,this.imageView.xPixel0,this.imageView.yPixel0,this.imageView.xPixel0+this.imageView.xPixels-1,this.imageView.yPixel0+this.imageView.yPixels-
1,this.imageView.xView1,this.imageView.yView1,this.imageView.xView2,this.imageView.yView2)});c(c$,"get2DImage",function(){this.imageView=new JSV.common.ImageView;this.imageView.set(this.viewList.get(0).getScale());if(!this.update2dImage(!0))return!1;this.imageView.resetZoom();return this.sticky2Dcursor=!0});c(c$,"update2dImage",function(a){this.imageView.set(this.viewData.getScale());var b=this.getSpectrumAt(0),c=this.imageView.get2dBuffer(b,!a);if(null==c)return this.imageView=this.image2D=null,
!1;a&&(c=this.imageView.adjustView(b,this.viewData),this.imageView.resetView());this.image2D=this.g2d.newGrayScaleImage(this.gMain,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,c);this.setImageWindow();return!0},"~B");c(c$,"getAnnotation",function(a,b,c,g,f,e,m){return(new JSV.common.ColoredAnnotation).setCA(a,b,this.getSpectrum(),c,this.pd.BLACK,g,f,e,m)},"~N,~N,~S,~B,~B,~N,~N");c(c$,"getAnnotation",function(a,b){return JSV.common.Annotation.getColoredAnnotation(this.g2d,this.getSpectrum(),
a,b)},"JU.Lst,JSV.common.Annotation");c(c$,"fillBox",function(a,b,c,g,f,e){this.setColorFromToken(a,e);this.g2d.fillRect(a,Math.min(b,g),Math.min(c,f),Math.abs(b-g),Math.abs(c-f))},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");c(c$,"drawHandle",function(a,b,c,g){g?this.g2d.drawRect(a,b-2,c-2,4,4):this.g2d.fillRect(a,b-2,c-2,5,5)},"~O,~N,~N,~B");c(c$,"setCurrentBoxColor",function(a){this.g2d.setGraphicsColor(a,this.pd.BLACK)},"~O");c(c$,"fillArrow",function(a,b,c,g,f){var e=1;switch(b){case 1:case 3:e=
-1}c=[c-5,c-5,c+5,c+5,c+8,c,c-8];g=[g+5*e,g-e,g-e,g+5*e,g+5*e,g+10*e,g+5*e];switch(b){case 1:case 2:f?this.g2d.fillPolygon(a,g,c,7):this.g2d.drawPolygon(a,g,c,7);break;case 3:case 4:f?this.g2d.fillPolygon(a,c,g,7):this.g2d.drawPolygon(a,c,g,7)}},"~O,~N,~N,~N,~B");c(c$,"fillCircle",function(a,b,c,g){g?this.g2d.fillCircle(a,b-4,c-4,8):this.g2d.drawCircle(a,b-4,c-4,8)},"~O,~N,~N,~B");c(c$,"setAnnotationColor",function(a,b,c){null!=c?this.setColorFromToken(a,c):(c=null,w(b,JSV.common.ColoredAnnotation)&&
(c=b.getColor()),null==c&&(c=this.pd.BLACK),this.g2d.setGraphicsColor(a,c))},"~O,JSV.common.Annotation,JSV.common.ScriptToken");c(c$,"setSolutionColor",function(a,b,c){for(var g=0;g<this.nSpectra;g++){var f=this.spectra.get(g),e=b||!f.canShowSolutionColor()?-1:a.getColour(f,c);f.setFillColor(-1==e?null:this.pd.vwr.parameters.getColor1(e))}},"JSV.api.VisibleInterface,~B,~B");c(c$,"setIRMode",function(a,b){for(var c=0;c<this.nSpectra;c++){var g=this.spectra.get(c);if(g.dataType.equals(b)){var f=JSV.common.Spectrum.taConvert(g,
a);f!==g&&this.pd.setSpecForIRMode(f)}}},"JSV.common.Spectrum.IRMode,~S");c$.$GraphSet$Highlight$=function(){A(self.c$);c$=k(function(){M(this,arguments);this.x2=this.x1=0;this.spectrum=this.color=null;n(this,arguments)},JSV.common.GraphSet,"Highlight");e(c$,"toString",function(){return"highlight "+this.x1+" "+this.x2+" "+this.spectrum});p(c$,function(a,b,c,g){this.x1=a;this.x2=b;this.color=g;this.spectrum=c},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");e(c$,"equals",function(a){return!w(a,
JSV.common.GraphSet.Highlight)?!1:a.x1==this.x1&&a.x2==this.x2},"~O");c$=z()};C(c$,"ARROW_RESET",-1,"ARROW_HOME",0,"ARROW_LEFT",1,"ARROW_RIGHT",2,"ARROW_UP",3,"ARROW_DOWN",4);c$.RT2=c$.prototype.RT2=Math.sqrt(2);C(c$,"veryLightGrey",null,"minNumOfPointsForZoom",3,"MIN_DRAG_PIXELS",5,"ONLINE_CUTOFF",2)}),q("JSV.common"),r(["JSV.common.XYScaleConverter"],"JSV.common.ImageView",["java.lang.Double","JSV.common.Coordinate","$.ScaleData"],function(){c$=k(function(){this.buf2d=null;this.yView2=this.xView2=
this.yView1=this.xView1=this.yPixelZoom2=this.xPixelZoom2=this.yPixelZoom1=this.xPixelZoom1=this.yPixels=this.xPixels=this.imageHeight=this.imageWidth=this.yPixel1=this.xPixel1=this.yPixel0=this.xPixel0=this.averageGray=this.grayFactorLast=0;this.minX=NaN;this.maxZ=this.minZ=this.maxY=this.minY=this.maxX=0;this.scaleData=null;n(this,arguments)},JSV.common,"ImageView",null,JSV.common.XYScaleConverter);c(c$,"set",function(a){Double.isNaN(this.minX)&&(this.minX=a.minX,this.maxX=a.maxX);this.minZ=a.minY;
this.maxZ=a.maxY;this.scaleData=new JSV.common.ScaleData},"JSV.common.ScaleData");c(c$,"setZoom",function(a,b,c,g){this.xPixelZoom1=Math.min(a,c);this.yPixelZoom1=Math.min(b,g);this.xPixelZoom2=Math.max(a,c);this.yPixelZoom2=Math.max(b,g);this.setView()},"~N,~N,~N,~N");c(c$,"setXY0",function(a,b,c){this.xPixel0=b;this.yPixel0=c;this.xPixel1=this.xPixel0+this.xPixels-1;this.yPixel1=this.yPixel0+this.yPixels-1;this.setMinMaxY(a)},"JSV.common.Spectrum,~N,~N");c(c$,"setPixelWidthHeight",function(a,b){this.xPixels=
a;this.yPixels=b},"~N,~N");c(c$,"resetView",function(){this.yView1=this.xView1=0;this.xView2=this.imageWidth-1;this.yView2=this.imageHeight-1});c(c$,"setView",function(){0==this.xPixelZoom1&&this.resetZoom();var a=this.toImageX(this.xPixelZoom1),b=this.toImageY(this.yPixelZoom1),c=this.toImageX(this.xPixelZoom2),g=this.toImageY(this.yPixelZoom2);this.xView1=Math.min(a,c);this.yView1=Math.min(b,g);this.xView2=Math.max(a,c);this.yView2=Math.max(b,g);this.setScaleData();this.resetZoom()});c(c$,"resetZoom",
function(){this.xPixelZoom1=this.xPixel0;this.yPixelZoom1=this.yPixel0;this.xPixelZoom2=this.xPixel1;this.yPixelZoom2=this.yPixel1});c(c$,"toImageX",function(a){return this.xView1+v(Math.floor((a-this.xPixel0)/(this.xPixels-1)*(this.xView2-this.xView1)))},"~N");c(c$,"toImageY",function(a){return this.yView1+v(Math.floor((a-this.yPixel0)/(this.yPixels-1)*(this.yView2-this.yView1)))},"~N");c(c$,"toImageX0",function(a){return JSV.common.Coordinate.intoRange(v((1*a-this.xPixel0)/(this.xPixels-1)*(this.imageWidth-
1)),0,this.imageWidth-1)},"~N");c(c$,"toImageY0",function(a){return JSV.common.Coordinate.intoRange(v((1*a-this.yPixel0)/(this.yPixels-1)*(this.imageHeight-1)),0,this.imageHeight-1)},"~N");c(c$,"isXWithinRange",function(a){return a>=this.xPixel0-5&&a<this.xPixel0+this.xPixels+5},"~N");c(c$,"toSubspectrumIndex",function(a){return JSV.common.Coordinate.intoRange(this.imageHeight-1-this.toImageY(a),0,this.imageHeight-1)},"~N");c(c$,"toX0",function(a){return this.maxX+(this.minX-this.maxX)*(this.fixX(a)-
this.xPixel0)/(this.xPixels-1)},"~N");c(c$,"toPixelX0",function(a){return this.xPixel1-v((a-this.minX)/(this.maxX-this.minX)*(this.xPixels-1))},"~N");c(c$,"toPixelY0",function(a){return this.yPixel1-v(a/(this.imageHeight-1)*(this.yPixels-1))},"~N");c(c$,"subIndexToPixelY",function(a){return this.yPixel0+v(1*(this.imageHeight-1-a-this.yView1)/(this.yView2-this.yView1)*(this.yPixels-1))},"~N");c(c$,"fixSubIndex",function(a){return JSV.common.Coordinate.intoRange(a,this.imageHeight-1-this.yView2,this.imageHeight-
1-this.yView1)},"~N");c(c$,"setView0",function(a,b,c,g){a=this.toImageX0(a);b=this.toImageY0(b);c=this.toImageX0(c);g=this.toImageY0(g);this.xView1=Math.min(a,c);this.yView1=Math.min(b,g);this.xView2=Math.max(a,c);this.yView2=Math.max(b,g);this.resetZoom()},"~N,~N,~N,~N");c(c$,"get2dBuffer",function(a,b){var c=a.getSubSpectra();if(null==c||!c.get(0).isContinuous())return null;var g=a.getXYCoords(),f=c.size();this.imageWidth=g.length;this.imageHeight=f;var e=255/(this.maxZ-this.minZ);if(!b&&null!=
this.buf2d&&e==this.grayFactorLast)return this.buf2d;this.grayFactorLast=e;for(var m=this.imageWidth*this.imageHeight,j=E(m,0),l=0,k=0;k<f;k++){var n=c.get(k).xyCoords;if(n.length!=g.length)return null;for(var p=c.get(k).getUserYFactor(),q=0;q<g.length;q++){var r=n[q].getYVal(),r=255-JSV.common.Coordinate.intoRange(v((r*p-this.minZ)*e),0,255);j[--m]=r;l+=r}}this.averageGray=1-l/(this.imageWidth*this.imageHeight)/255;System.out.println("Average gray = "+this.averageGray);return this.buf2d=j},"JSV.common.Spectrum,~B");
c(c$,"adjustView",function(a,b){for(var c=0,g=!1;((g=0.05>this.averageGray)||0.3<this.averageGray)&&10>c++;)b.scaleSpectrum(-2,g?2:0.5),this.set(b.getScale()),this.get2dBuffer(a,!1);return this.buf2d},"JSV.common.Spectrum,JSV.common.ViewData");c(c$,"getBuffer",function(){return this.buf2d});c(c$,"setMinMaxY",function(a){a=a.getSubSpectra();var b=a.get(0);this.maxY=b.getY2D();this.minY=a.get(a.size()-1).getY2D();b.y2DUnits.equalsIgnoreCase("Hz")&&(this.maxY/=b.freq2dY,this.minY/=b.freq2dY);this.setScaleData()},
"JSV.common.Spectrum");c(c$,"setScaleData",function(){this.scaleData.minY=this.minY;this.scaleData.maxY=this.maxY;this.scaleData.setYScale(this.toY(this.yPixel0),this.toY(this.yPixel1),!1,!1)});e(c$,"fixX",function(a){return a<this.xPixel0?this.xPixel0:a>this.xPixel1?this.xPixel1:a},"~N");e(c$,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,this.yPixel1)},"~N");e(c$,"getScale",function(){return this.scaleData});e(c$,"toX",function(a){return this.maxX+(this.minX-this.maxX)*
this.toImageX(this.fixX(a))/(this.imageWidth-1)},"~N");e(c$,"toY",function(a){a=this.toSubspectrumIndex(a);return this.maxY+(this.minY-this.maxY)*a/(this.imageWidth-1)},"~N");e(c$,"toPixelX",function(a){var b=this.toX(this.xPixel0),c=this.toX(this.xPixel1);return this.xPixel0+v((a-b)/(c-b)*(this.xPixels-1))},"~N");e(c$,"toPixelY",function(a){return v(this.yPixel0+(a-this.scaleData.minYOnScale)/(this.scaleData.maxYOnScale-this.scaleData.minYOnScale)*this.yPixels)},"~N");e(c$,"getXPixels",function(){return this.xPixels});
e(c$,"getYPixels",function(){return this.yPixels});e(c$,"getXPixel0",function(){return this.xPixel0});C(c$,"DEFAULT_MIN_GRAY",0.05,"DEFAULT_MAX_GRAY",0.3)}),q("JSV.common"),r(["JSV.common.Measurement"],"JSV.common.Integral",null,function(){c$=t(JSV.common,"Integral",JSV.common.Measurement);c(c$,"setInt",function(a,b,c,g,f,e){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(f,e);this.setValue(g);return this},"~N,~N,JSV.common.Spectrum,~N,~N,~N")}),q("JSV.common"),c$=t(JSV.common,"IntegralComparator",null,
java.util.Comparator),e(c$,"compare",function(a,b){return a.getXVal()<b.getXVal()?-1:a.getXVal()>b.getXVal()?1:0},"JSV.common.Measurement,JSV.common.Measurement"),q("JSV.common"),r(["java.lang.Enum","JSV.common.MeasurementData","$.IntegralComparator"],"JSV.common.IntegralData","java.lang.Double java.util.Collections $.StringTokenizer JU.AU $.BS $.DF $.Lst $.PT JSV.common.Annotation $.Coordinate $.Integral $.ScriptToken".split(" "),function(){c$=k(function(){this.intRange=this.percentOffset=this.percentMinY=
0;this.normalizationFactor=1;this.integralTotal=this.offset=this.percentRange=0;this.haveRegions=!1;this.xyCoords=null;n(this,arguments)},JSV.common,"IntegralData",JSV.common.MeasurementData);c(c$,"getPercentMinimumY",function(){return this.percentMinY});c(c$,"getPercentOffset",function(){return this.percentOffset});c(c$,"getIntegralFactor",function(){return this.intRange});p(c$,function(a,b,c,g){x(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,g]);this.percentMinY=a;this.percentOffset=
b;this.percentRange=c;this.calculateIntegral()},"~N,~N,~N,JSV.common.Spectrum");p(c$,function(a,b){x(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,a]);null==b?this.autoIntegrate():(this.percentOffset=b.integralOffset,this.percentRange=b.integralRange,this.calculateIntegral())},"JSV.common.Spectrum,JSV.common.Parameters");c(c$,"update",function(a){this.update(a.integralMinY,a.integralOffset,a.integralRange)},"JSV.common.Parameters");c(c$,"update",function(a,b,c){var g=this.percentRange;
if(!(0>=c||c==this.percentRange&&b==this.percentOffset)){this.percentOffset=b;this.percentRange=c;this.checkRange();a=c/100/this.integralTotal;b/=100;for(var f=0;f<this.xyCoords.length;f++){var e=this.xyCoords[f].getYVal(),e=(e-this.offset)/this.intRange;this.xyCoords[f].setYVal(e*a+b)}1!=this.normalizationFactor&&(this.normalizationFactor*=g/c);if(this.haveRegions)for(f=this.size();0<=--f;)c=this.get(f),g=this.getYValueAt(c.getXVal()),e=this.getYValueAt(c.getXVal2()),c.setYVal(g),c.setYVal2(e),c.setValue(100*
Math.abs(e-g)*this.normalizationFactor);this.intRange=a;this.offset=b}},"~N,~N,~N");c(c$,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(c$,"addIntegralRegion",function(a,b){if(Double.isNaN(a))return this.haveRegions=!1,this.clear(),null;if(a==b)return null;var c=this.getYValueAt(a),g=this.getYValueAt(b);this.haveRegions=!0;c=(new JSV.common.Integral).setInt(a,c,this.spec,100*Math.abs(g-c)*this.normalizationFactor,b,g);this.clear(a,b);this.addLast(c);java.util.Collections.sort(this,
JSV.common.IntegralData.c);return c},"~N,~N");e(c$,"setSpecShift",function(a){JSV.common.Coordinate.shiftX(this.xyCoords,a);for(var b=this.size();1<=--b;)this.get(b).addSpecShift(a)},"~N");c(c$,"addMarks",function(a){a=JU.PT.rep(" "+a,","," ");a=JU.PT.rep(a," -"," #");a=JU.PT.rep(a,"--","-#");a=a.$replace("-","^");a=a.$replace("#","-");a=JSV.common.ScriptToken.getTokens(a);for(var b=0;b<a.size();b++)try{var c=a.get(b),g=0,f=c.indexOf("^");if(!(0>f)){var e=c.indexOf(":");e>f&&(g=Double.$valueOf(c.substring(e+
1).trim()).doubleValue(),c=c.substring(0,e).trim());var m=Double.$valueOf(c.substring(0,f).trim()).doubleValue(),j=Double.$valueOf(c.substring(f+1).trim()).doubleValue();0==j&&0==m&&this.clear();if(j!=m){var l=this.addIntegralRegion(Math.max(j,m),Math.min(j,m));null!=l&&0<g&&this.setSelectedIntegral(l,g)}}}catch(k){if(!y(k,Exception))throw k;}},"~S");c(c$,"calculateIntegral",function(){var a=this.spec.getXYCoords();this.xyCoords=Array(a.length);this.integralTotal=0;this.checkRange();for(var b=1E100,
c=0;c<a.length;c++){var g=a[c].getYVal();g<b&&0<=g&&(b=g)}for(c=0;c<a.length;c++)g=a[c].getYVal(),-1.7976931348623157E308<g&&(this.integralTotal+=g-b);this.intRange=this.percentRange/100/this.integralTotal;this.offset=this.percentOffset/100;for(var f=0,c=a.length;0<=--c;)g=a[c].getYVal(),-1.7976931348623157E308<g&&(f+=g-b),this.xyCoords[c]=(new JSV.common.Coordinate).set(a[c].getXVal(),f*this.intRange+this.offset);return this.xyCoords});c(c$,"checkRange",function(){this.percentOffset=Math.max(5,this.percentOffset);
this.percentRange=Math.max(10,this.percentRange)});c$.getIntegrationRatiosFromString=c(c$,"getIntegrationRatiosFromString",function(a,b){for(var c=new JU.Lst,g=new java.util.StringTokenizer(b,",");g.hasMoreTokens();){var f=g.nextToken(),f=new java.util.StringTokenizer(f,":"),f=(new JSV.common.Annotation).setA(Double.parseDouble(f.nextToken()),0,a,f.nextToken(),!0,!1,0,0);c.addLast(f)}return c},"JSV.common.Spectrum,~S");c(c$,"getXYCoords",function(){return this.xyCoords});c(c$,"getPercentYValueAt",
function(a){return 100*this.getYValueAt(a)},"~N");c(c$,"dispose",function(){this.xyCoords=this.spec=null});c(c$,"setSelectedIntegral",function(a,b){var c=a.getValue();this.factorAllIntegrals(0>=b?1/this.normalizationFactor:b/c,0>=b)},"JSV.common.Measurement,~N");c(c$,"factorAllIntegrals",function(a,b){for(var c=0;c<this.size();c++){var g=this.get(c);g.setValue(a*g.getValue())}this.normalizationFactor=b?1:this.normalizationFactor*a},"~N,~B");c(c$,"getBitSet",function(){var a=JU.BS.newN(this.xyCoords.length);
if(0==this.size())return a.setBits(0,this.xyCoords.length),a;for(var b=this.size();0<=--b;){var c=this.get(b),g=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal()),c=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal2());a.setBits(Math.min(g,c),Math.max(g,c))}return a});e(c$,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=0,c=this.size();0<=--c;)a[b++]=[""+b,JU.DF.formatDecimalDbl(this.get(c).getXVal(),2),JU.DF.formatDecimalDbl(this.get(c).getXVal2(),
2),this.get(c).text];return a},"~S");e(c$,"getMeasurementListArrayReal",function(){for(var a=JU.AU.newDouble2(this.size()),b=0,c=this.size();0<=--c;b++)a[b]=[this.get(c).getXVal(),this.get(c).getXVal2(),this.get(c).getValue()];return a},"~S");e(c$,"getDataHeader",function(){return JSV.common.IntegralData.$HEADER});c(c$,"shiftY",function(a,b,c,g){b=v(100*(c+g-b)/g);0>a&&(b-=this.percentOffset);0>a?this.update(0,this.percentOffset,b):this.update(0,b,this.percentRange)},"~N,~N,~N,~N");c(c$,"autoIntegrate",
function(){null==this.xyCoords&&this.calculateIntegral();if(0!=this.xyCoords.length){this.clear();for(var a=-1,b=0,c=this.xyCoords[this.xyCoords.length-1].getYVal(),g=this.xyCoords.length-1;0<=--g;){var f=this.xyCoords[g].getYVal();b++;1E-4>f-c&&0>a?f<c&&(c=f,b=0):0>a?(a=g+Math.min(b,20),c=f,b=0):1E-4>f-c?(1==b&&(c=f),20<=b&&(this.addIntegralRegion(this.xyCoords[a].getXVal(),this.xyCoords[g].getXVal()),a=-1,c=f,b=0)):(b=0,c=f)}0<this.spec.nH&&this.factorAllIntegrals(this.spec.nH/this.percentRange,
!1)}});c(c$,"getInfo",function(a){a.put("offset",Double.$valueOf(this.myParams.integralOffset));a.put("range",Double.$valueOf(this.myParams.integralRange));a.put("normalizationFactor",Double.$valueOf(this.normalizationFactor));a.put("integralTotal",Double.$valueOf(this.integralTotal));L(this,JSV.common.IntegralData,"getInfo",[a])},"java.util.Map");c(c$,"setMinimumIntegral",function(a){for(var b=this.size();0<=--b;)this.get(b).getValue()<a&&this.remove(b)},"~N");A(self.c$);c$=t(JSV.common.IntegralData,
"IntMode",Enum);c$.getMode=c(c$,"getMode",function(a){for(var b,c=0,g=JSV.common.IntegralData.IntMode.values();c<g.length&&((b=g[c])||1);c++)if(a.startsWith(b.name()))return b;return JSV.common.IntegralData.IntMode.ON},"~S");s(c$,"OFF",0,[]);s(c$,"ON",1,[]);s(c$,"TOGGLE",2,[]);s(c$,"AUTO",3,[]);s(c$,"LIST",4,[]);s(c$,"MARK",5,[]);s(c$,"MIN",6,[]);s(c$,"UPDATE",7,[]);c$=z();C(c$,"DEFAULT_OFFSET",30,"DEFAULT_RANGE",50,"DEFAULT_MINY",0.1);c$.c=c$.prototype.c=new JSV.common.IntegralComparator;c$.$HEADER=
c$.prototype.$HEADER=["peak","start/ppm","end/ppm","value"]}),q("JSV.common"),r(["java.lang.Enum","JSV.source.JDXDataObject","JU.Lst"],"JSV.common.Spectrum","java.lang.Boolean $.Double java.util.Hashtable JU.PT JSV.common.Coordinate $.Parameters $.PeakInfo JSV.source.JDXSourceStreamTokenizer JU.Logger".split(" "),function(){c$=k(function(){this.highlightedPeak=this.selectedPeak=this.piUnitsY=this.piUnitsX=this.peakList=this.subSpectra=null;this.currentSubSpectrumIndex=this.specShift=0;this.$isForcedSubset=
!1;this.id="";this.convertedSpectrum=null;this.userYFactor=1;this.exportXAxisLeftToRight=!1;this.fillColor=null;n(this,arguments)},JSV.common,"Spectrum",JSV.source.JDXDataObject);F(c$,function(){this.peakList=new JU.Lst});e(c$,"finalize",function(){System.out.println("JDXSpectrum "+this+" finalized "+this.title)});c(c$,"dispose",function(){});c(c$,"isForcedSubset",function(){return this.$isForcedSubset});c(c$,"setId",function(a){this.id=a},"~S");p(c$,function(){x(this,JSV.common.Spectrum,[]);this.headerTable=
new JU.Lst;this.xyCoords=[];this.parent=this});c(c$,"copy",function(){var a=new JSV.common.Spectrum;this.copyTo(a);a.setPeakList(this.peakList,this.piUnitsX,null);a.fillColor=this.fillColor;return a});c(c$,"getXYCoords",function(){return this.getCurrentSubSpectrum().xyCoords});c(c$,"getPeakList",function(){return this.peakList});c(c$,"setPeakList",function(a,b,c){this.peakList=a;this.piUnitsX=b;this.piUnitsY=c;for(b=a.size();0<=--b;)this.peakList.get(b).spectrum=this;JU.Logger.debugging&&JU.Logger.info("Spectrum "+
this.getTitle()+" peaks: "+a.size());return a.size()},"JU.Lst,~S,~S");c(c$,"selectPeakByFileIndex",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size()&&(null==c||this.sourceID.equals(b)))for(var g=0;g<this.peakList.size();g++)if(this.peakList.get(g).checkFileIndex(a,b,c))return System.out.println("selecting peak by FileIndex "+this+" "+this.peakList.get(g)),this.selectedPeak=this.peakList.get(g);return null},"~S,~S,~S");c(c$,"selectPeakByFilePathTypeModel",function(a,b,c){if(null!=this.peakList&&
0<this.peakList.size())for(var g=0;g<this.peakList.size();g++)if(this.peakList.get(g).checkFileTypeModel(a,b,c))return System.out.println("selecting peak byFilePathTypeModel "+this+" "+this.peakList.get(g)),this.selectedPeak=this.peakList.get(g);return null},"~S,~S,~S");c(c$,"matchesPeakTypeModel",function(a,b){if(a.equals("ID"))return this.sourceID.equalsIgnoreCase(b);if(null!=this.peakList&&0<this.peakList.size())for(var c=0;c<this.peakList.size();c++)if(this.peakList.get(c).checkTypeModel(a,b))return!0;
return!1},"~S,~S");c(c$,"setSelectedPeak",function(a){this.selectedPeak=a},"JSV.common.PeakInfo");c(c$,"setHighlightedPeak",function(a){this.highlightedPeak=a},"JSV.common.PeakInfo");c(c$,"getSelectedPeak",function(){return this.selectedPeak});c(c$,"getModelPeakInfoForAutoSelectOnLoad",function(){if(null!=this.peakList)for(var a=0;a<this.peakList.size();a++)if(this.peakList.get(a).autoSelectOnLoad())return this.peakList.get(a);return null});c(c$,"getAssociatedPeakInfo",function(a,b){this.selectedPeak=
this.findPeakByCoord(a,b);return null==this.selectedPeak?this.getBasePeakInfo():this.selectedPeak},"~N,JSV.common.Coordinate");c(c$,"findPeakByCoord",function(a,b){if(null!=b&&null!=this.peakList&&0<this.peakList.size()){for(var c=b.getXVal(),g=-1,f=1E100,e=0;e<this.peakList.size();e++){var m=this.peakList.get(e).checkRange(a,c);m<f&&(f=m,g=e)}if(0<=g)return this.peakList.get(g)}return null},"~N,JSV.common.Coordinate");c(c$,"getPeakTitle",function(){return null!=this.selectedPeak?this.selectedPeak.getTitle():
null!=this.highlightedPeak?this.highlightedPeak.getTitle():this.getTitleLabel()});c(c$,"getTitleLabel",function(){var a=null==this.peakList||0==this.peakList.size()?this.getQualifiedDataType():this.peakList.get(0).getType();return(null!=a&&0<a.length?a+" ":"")+this.getTitle()});c(c$,"setNextPeak",function(a,b){if(null==this.peakList||0==this.peakList.size())return-1;for(var c=a.getXVal()+1E-6*b,g=-1,f=-1,e=1.7976931348623157E308*b,m=0,j=this.peakList.size();0<=--j;){var l=this.peakList.get(j).getX();
0<b?l>c&&l<e?(g=j,e=l):l<c&&l-c<m&&(f=j,m=l-c):l<c&&l>e?(g=j,e=l):l>c&&l-c>m&&(f=j,m=l-c)}if(0>g){if(0>f)return-1;g=f}return g},"JSV.common.Coordinate,~N");c(c$,"getPercentYValueAt",function(a){return!this.isContinuous()?NaN:this.getYValueAt(a)},"~N");c(c$,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(c$,"setUserYFactor",function(a){this.userYFactor=a},"~N");c(c$,"getUserYFactor",function(){return this.userYFactor});c(c$,"getConvertedSpectrum",function(){return this.convertedSpectrum});
c(c$,"setConvertedSpectrum",function(a){this.convertedSpectrum=a},"JSV.common.Spectrum");c$.taConvert=c(c$,"taConvert",function(a,b){if(!a.isContinuous())return a;switch(b){case JSV.common.Spectrum.IRMode.NO_CONVERT:return a;case JSV.common.Spectrum.IRMode.TO_ABS:if(!a.isTransmittance())return a;break;case JSV.common.Spectrum.IRMode.TO_TRANS:if(!a.isAbsorbance())return a}var c=a.getConvertedSpectrum();return null!=c?c:a.isAbsorbance()?JSV.common.Spectrum.toT(a):JSV.common.Spectrum.toA(a)},"JSV.common.Spectrum,JSV.common.Spectrum.IRMode");
c$.toT=c(c$,"toT",function(a){if(!a.isAbsorbance())return null;var b=a.getXYCoords(),c=Array(b.length);JSV.common.Coordinate.isYInRange(b,0,4)||(b=JSV.common.Coordinate.normalise(b,0,4));for(var g=0;g<b.length;g++)c[g]=(new JSV.common.Coordinate).set(b[g].getXVal(),JSV.common.Spectrum.toTransmittance(b[g].getYVal()));return JSV.common.Spectrum.newSpectrum(a,c,"TRANSMITTANCE")},"JSV.common.Spectrum");c$.toA=c(c$,"toA",function(a){if(!a.isTransmittance())return null;for(var b=a.getXYCoords(),c=Array(b.length),
g=JSV.common.Coordinate.isYInRange(b,-2,2),f=0;f<b.length;f++)c[f]=(new JSV.common.Coordinate).set(b[f].getXVal(),JSV.common.Spectrum.toAbsorbance(b[f].getYVal(),g));return JSV.common.Spectrum.newSpectrum(a,c,"ABSORBANCE")},"JSV.common.Spectrum");c$.newSpectrum=c(c$,"newSpectrum",function(a,b,c){var g=a.copy();g.setOrigin("JSpecView Converted");g.setOwner("JSpecView Generated");g.setXYCoords(b);g.setYUnits(c);a.setConvertedSpectrum(g);g.setConvertedSpectrum(a);return g},"JSV.common.Spectrum,~A,~S");
c$.toAbsorbance=c(c$,"toAbsorbance",function(a,b){return Math.min(4,b?2-JSV.common.Spectrum.log10(a):-JSV.common.Spectrum.log10(a))},"~N,~B");c$.toTransmittance=c(c$,"toTransmittance",function(a){return 0>=a?1:Math.pow(10,-a)},"~N");c$.log10=c(c$,"log10",function(a){return Math.log(a)/Math.log(10)},"~N");c$.process=c(c$,"process",function(a,b){if(b===JSV.common.Spectrum.IRMode.TO_ABS||b===JSV.common.Spectrum.IRMode.TO_TRANS)for(var c=0;c<a.size();c++)a.set(c,JSV.common.Spectrum.taConvert(a.get(c),
b));return!0},"JU.Lst,JSV.common.Spectrum.IRMode");c(c$,"getSubSpectra",function(){return this.subSpectra});c(c$,"getCurrentSubSpectrum",function(){return null==this.subSpectra?this:this.subSpectra.get(this.currentSubSpectrumIndex)});c(c$,"advanceSubSpectrum",function(a){return this.setCurrentSubSpectrum(this.currentSubSpectrumIndex+a)},"~N");c(c$,"setCurrentSubSpectrum",function(a){return this.currentSubSpectrumIndex=JSV.common.Coordinate.intoRange(a,0,this.subSpectra.size()-1)},"~N");c(c$,"addSubSpectrum",
function(a,b){if(!b&&(2>this.numDim||this.blockID!=a.blockID)||!JSV.common.Spectrum.allowSubSpec(this,a))return!1;this.$isForcedSubset=b;null==this.subSpectra&&(this.subSpectra=new JU.Lst,this.addSubSpectrum(this,!0));this.subSpectra.addLast(a);a.parent=this;return!0},"JSV.common.Spectrum,~B");c(c$,"getSubIndex",function(){return null==this.subSpectra?-1:this.currentSubSpectrumIndex});c(c$,"setExportXAxisDirection",function(a){this.exportXAxisLeftToRight=a},"~B");c(c$,"isExportXAxisLeftToRight",function(){return this.exportXAxisLeftToRight});
c(c$,"getInfo",function(a){var b=new java.util.Hashtable;if("id".equalsIgnoreCase(a))return b.put(a,this.id),b;b.put("id",this.id);JSV.common.Parameters.putInfo(a,b,"specShift",Double.$valueOf(this.specShift));var c="header".equals(a);if(!c&&null!=a)for(var g=this.headerTable.size();0<=--g;){var f=this.headerTable.get(g);if(f[0].equalsIgnoreCase(a)||f[2].equalsIgnoreCase(a))return b.put(a,f[1]),b}for(var f=new java.util.Hashtable,e=this.getHeaderRowDataAsArray(),g=0;g<e.length;g++){var m=JSV.source.JDXSourceStreamTokenizer.cleanLabel(e[g][0]);
if(!(null!=a&&!c&&!m.equals(a))){var j=JSV.common.Spectrum.fixInfoValue(e[g][1]);if(null==a){var l=new java.util.Hashtable;l.put("value",j);l.put("index",Integer.$valueOf(g+1));b.put(m,l)}else b.put(m,j)}}0<f.size()&&b.put("header",f);c||(JSV.common.Parameters.putInfo(a,b,"titleLabel",this.getTitleLabel()),JSV.common.Parameters.putInfo(a,b,"type",this.getDataType()),JSV.common.Parameters.putInfo(a,b,"isHZToPPM",Boolean.$valueOf(this.$isHZtoPPM)),JSV.common.Parameters.putInfo(a,b,"subSpectrumCount",
Integer.$valueOf(null==this.subSpectra?0:this.subSpectra.size())));return b},"~S");c$.fixInfoValue=c(c$,"fixInfoValue",function(a){try{return Integer.$valueOf(a)}catch(b){if(!y(b,Exception))throw b;}try{return Double.$valueOf(a)}catch(c){if(!y(c,Exception))throw c;}return a},"~S");e(c$,"toString",function(){return this.getTitleLabel()});c(c$,"findMatchingPeakInfo",function(a){for(var b=0;b<this.peakList.size();b++)if(this.peakList.get(b).checkTypeMatch(a))return this.peakList.get(b);return null},
"JSV.common.PeakInfo");c(c$,"getBasePeakInfo",function(){return 0==this.peakList.size()?new JSV.common.PeakInfo:new JSV.common.PeakInfo(' baseModel="" '+this.peakList.get(0))});c(c$,"getAxisLabel",function(a){var b=a?this.piUnitsX:this.piUnitsY;null==b&&(b=a?this.xLabel:this.yLabel);null==b&&(b=a?this.xUnits:this.yUnits);return null==b?"":b.equalsIgnoreCase("WAVENUMBERS")?"1/cm":b.equalsIgnoreCase("nanometers")?"nm":b},"~B");c(c$,"findXForPeakNearest",function(a){return JSV.common.Coordinate.findXForPeakNearest(this.xyCoords,
a,this.isInverted())},"~N");c(c$,"addSpecShift",function(a){if(0!=a&&(this.specShift+=a,JSV.common.Coordinate.shiftX(this.xyCoords,a),null!=this.subSpectra))for(var b=this.subSpectra.size();0<=--b;){var c=this.subSpectra.get(b);c!==this&&c!==this.parent&&c.addSpecShift(a)}return this.specShift},"~N");c$.allowSubSpec=c(c$,"allowSubSpec",function(a,b){return a.is1D()==b.is1D()&&a.xUnits.equalsIgnoreCase(b.xUnits)&&a.isHNMR()==b.isHNMR()},"JSV.common.Spectrum,JSV.common.Spectrum");c$.areXScalesCompatible=
c(c$,"areXScalesCompatible",function(a,b,c,g){var f=a.isNMR();if(f!=b.isNMR()||a.isContinuous()!=b.isContinuous()||!g&&!JSV.common.Spectrum.areUnitsCompatible(a.xUnits,b.xUnits))return!1;if(c){if(a.is1D()!=b.is1D())return!1}else if(g){if(!f)return!0}else if(!a.is1D()||!b.is1D())return!1;return!f||b.is1D()&&a.parent.nucleusX.equals(b.parent.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum,~B,~B");c$.areUnitsCompatible=c(c$,"areUnitsCompatible",function(a,b){if(a.equalsIgnoreCase(b))return!0;a=a.toUpperCase();
b=b.toUpperCase();return a.equals("HZ")&&b.equals("PPM")||a.equals("PPM")&&b.equals("HZ")},"~S,~S");c$.areLinkableX=c(c$,"areLinkableX",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum");c$.areLinkableY=c(c$,"areLinkableY",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusY)},"JSV.common.Spectrum,JSV.common.Spectrum");c(c$,"setNHydrogens",function(a){this.nH=a},"~N");c(c$,"getPeakWidth",function(){return(this.getLastX()-
this.getFirstX())/100});c(c$,"setSimulated",function(a){this.isSimulation=!0;var b=this.sourceID;0==b.length&&(b=JU.PT.rep(a,"http://SIMULATION/",""));0<=b.indexOf("MOL=")&&(b="");this.title="SIMULATED "+JU.PT.rep(b,"$","")},"~S");c(c$,"setFillColor",function(a){this.fillColor=a;null!=this.convertedSpectrum&&(this.convertedSpectrum.fillColor=a)},"javajs.api.GenericColor");A(self.c$);c$=t(JSV.common.Spectrum,"IRMode",Enum);c$.getMode=c(c$,"getMode",function(a){switch(null==a?"I":a.toUpperCase().charAt(0)){case "A":return JSV.common.Spectrum.IRMode.TO_ABS;
case "T":return a.equalsIgnoreCase("TOGGLE")?JSV.common.Spectrum.IRMode.TOGGLE:JSV.common.Spectrum.IRMode.TO_TRANS;case "N":return JSV.common.Spectrum.IRMode.NO_CONVERT;default:return JSV.common.Spectrum.IRMode.TOGGLE}},"~S");s(c$,"NO_CONVERT",0,[]);s(c$,"TO_TRANS",1,[]);s(c$,"TO_ABS",2,[]);s(c$,"TOGGLE",3,[]);c$=z();C(c$,"MAXABS",4)}),Jmol.___JSVDate="$Date: 2015-01-05 17:28:27 -0600 (Mon, 05 Jan 2015) $",Jmol.___JSVSvnRev="$LastChangedRevision: 1681 $",Jmol.___JSVVersion="14.2.7",q("JSV.common"),
c$=t(JSV.common,"JSVersion"),C(c$,"VERSION",null,"VERSION_SHORT",null),P=O=V=null,V=Jmol.___JSVVersion,O=Jmol.___JSVDate,P=Jmol.___JSVSvnRev,null!=O&&(O=O.substring(7,23)),P=null==P?"":"/SVN"+P.substring(22,27),JSV.common.JSVersion.VERSION_SHORT=null!=V?V:"(Unknown version)",JSV.common.JSVersion.VERSION=JSV.common.JSVersion.VERSION_SHORT+P+"/"+(null!=O?O:"(Unknown date)"),q("JSV.common"),r(["java.util.Hashtable"],"JSV.common.JSVFileManager","java.io.BufferedInputStream $.BufferedReader $.InputStreamReader $.StringReader java.net.URL JU.AU $.Encoding $.PT $.SB JSV.common.JSVersion $.JSViewer JSV.exception.JSVException JU.Logger".split(" "),
function(){c$=t(JSV.common,"JSVFileManager");c(c$,"isApplet",function(){return null!=JSV.common.JSVFileManager.appletDocumentBase});c$.getFileAsString=c(c$,"getFileAsString",function(a){if(null==a)return null;var b,c=new JU.SB;try{b=JSV.common.JSVFileManager.getBufferedReaderFromName(a,null);for(var g;null!=(g=b.readLine());)c.append(g),c.appendC("\n");b.close()}catch(f){if(y(f,Exception))return null;throw f;}return c.toString()},"~S");c$.getBufferedReaderForInputStream=c(c$,"getBufferedReaderForInputStream",
function(a){try{return new java.io.BufferedReader(new java.io.InputStreamReader(a,"UTF-8"))}catch(b){if(y(b,Exception))return null;throw b;}},"java.io.InputStream");c$.getBufferedReaderForData=c(c$,"getBufferedReaderForData",function(a){return null==a?null:new java.io.BufferedReader(new java.io.StringReader(w(a,String)?a:String.instantialize(a)))},"~O");c$.getBufferedReaderFromName=c(c$,"getBufferedReaderFromName",function(a,b){if(null==a)throw new JSV.exception.JSVException("Cannot find "+a);JU.Logger.info("JSVFileManager getBufferedReaderFromName "+
a);var c=JSV.common.JSVFileManager.getFullPathName(a);c.equals(a)||JU.Logger.info("JSVFileManager getBufferedReaderFromName "+c);return JSV.common.JSVFileManager.getUnzippedBufferedReaderFromName(c,b)},"~S,~S");c$.getFullPathName=c(c$,"getFullPathName",function(a){try{if(null==JSV.common.JSVFileManager.appletDocumentBase){if(JSV.common.JSVFileManager.isURL(a)){var b=new java.net.URL(R("java.net.URL"),a,null);return b.toString()}return JSV.common.JSVFileManager.viewer.apiPlatform.newFile(a).getFullPath()}if(1==
a.indexOf(":\\")||1==a.indexOf(":/"))a="file:///"+a;else if(a.startsWith("cache://"))return a;b=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null);return b.toString()}catch(c){if(y(c,Exception))throw new JSV.exception.JSVException("Cannot create path for "+a);throw c;}},"~S");c$.isURL=c(c$,"isURL",function(a){for(var b=JSV.common.JSVFileManager.urlPrefixes.length;0<=--b;)if(a.startsWith(JSV.common.JSVFileManager.urlPrefixes[b]))return!0;return!1},"~S");c$.urlTypeIndex=c(c$,"urlTypeIndex",
function(a){for(var b=0;b<JSV.common.JSVFileManager.urlPrefixes.length;++b)if(a.startsWith(JSV.common.JSVFileManager.urlPrefixes[b]))return b;return-1},"~S");c$.isLocal=c(c$,"isLocal",function(a){if(null==a)return!1;a=JSV.common.JSVFileManager.urlTypeIndex(a);return 0>a||4==a},"~S");c$.getUnzippedBufferedReaderFromName=c(c$,"getUnzippedBufferedReaderFromName",function(a,b){var c=null;0<=a.indexOf("|")&&(c=JU.PT.split(a,"|"),null!=c&&0<c.length&&(a=c[0]));if(a.startsWith("http://SIMULATION/"))return JSV.common.JSVFileManager.getSimulationReader(a);
try{var g=JSV.common.JSVFileManager.getInputStream(a,!0,null);if(w(g,JU.SB)||w(g,String))return new java.io.BufferedReader(new java.io.StringReader(g.toString()));if(JSV.common.JSVFileManager.isAB(g))return new java.io.BufferedReader(new java.io.StringReader(String.instantialize(g)));var f=new java.io.BufferedInputStream(g),g=f;if(JSV.common.JSVFileManager.isZipFile(f))return JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newJSVZipFileSequentialReader(g,c,b);JSV.common.JSVFileManager.isGzip(f)&&
(g=JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newGZIPInputStream(g));return new java.io.BufferedReader(new java.io.InputStreamReader(g,"UTF-8"))}catch(e){if(y(e,Exception))throw new JSV.exception.JSVException("Cannot read file "+a+" "+e);throw e;}},"~S,~S");c$.getAbbrSimulationFileName=c(c$,"getAbbrSimulationFileName",function(a){var b=JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,!0);0<=a.indexOf("MOL=")&&(a=JSV.common.JSVFileManager.htCorrelationCache.get(a),null!=a&&JSV.common.JSVFileManager.htCorrelationCache.put(b,
a));return b},"~S");c$.getAbbreviatedSimulationName=c(c$,"getAbbreviatedSimulationName",function(a,b){return 0<=a.indexOf("MOL=")?(b?"http://SIMULATION/":"")+"MOL="+JSV.common.JSVFileManager.getSimulationHash(a):a},"~S,~B");c$.getSimulationHash=c(c$,"getSimulationHash",function(a){return""+Math.abs(a.substring(a.indexOf("V2000")+1).hashCode())},"~S");c$.getSimulationFileData=c(c$,"getSimulationFileData",function(a){return JSV.common.JSVFileManager.htCorrelationCache.get(a.startsWith("MOL=")?a.substring(4):
JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,!1))},"~S");c$.getSimulationReader=c(c$,"getSimulationReader",function(a){var b=JSV.common.JSVFileManager.htCorrelationCache.get(a);null==b&&(b=JSV.common.JSVFileManager.getNMRSimulationJCampDX(a.substring(18)),null!=b&&JSV.common.JSVFileManager.htCorrelationCache.put(a,b));return JSV.common.JSVFileManager.getBufferedReaderForData(b)},"~S");c$.isAB=c(c$,"isAB",function(a){return Z(a)},"~O");c$.isZipFile=c(c$,"isZipFile",function(a){try{var b=
H(4,0);a.mark(5);var c=a.read(b,0,4);a.reset();return 4==c&&80==b[0]&&75==b[1]&&3==b[2]&&4==b[3]}catch(g){if(y(g,Exception))throw new JSV.exception.JSVException(g.toString());throw g;}},"java.io.InputStream");c$.isGzip=c(c$,"isGzip",function(a){try{var b=H(4,0);a.mark(5);var c=a.read(b,0,4);a.reset();return 4==c&&31==b[0]&&139==b[1]}catch(g){if(y(g,Exception))throw new JSV.exception.JSVException(g.toString());throw g;}},"java.io.InputStream");c$.getStreamAsBytes=c(c$,"getStreamAsBytes",function(a,
b){try{for(var c=H(1024,0),g=null==b?H(4096,0):null,f=0,e=0;0<(f=a.read(c,0,1024));)e+=f,null==b?(e>=g.length&&(g=JU.AU.ensureLengthByte(g,2*e)),System.arraycopy(c,0,g,e-f,f)):b.write(c,0,f);a.close();return null==b?JU.AU.arrayCopyByte(g,e):e+" bytes"}catch(m){if(y(m,Exception))throw new JSV.exception.JSVException(m.toString());throw m;}},"java.io.BufferedInputStream,JU.OC");c$.postByteArray=c(c$,"postByteArray",function(a,b){var c=null;try{c=JSV.common.JSVFileManager.getInputStream(a,!1,b)}catch(g){if(y(g,
Exception))c=g.toString();else throw g;}if(w(c,String))return c;try{c=JSV.common.JSVFileManager.getStreamAsBytes(c,null)}catch(f){if(y(f,JSV.exception.JSVException))try{c.close()}catch(e){if(!y(e,Exception))throw e;}else throw f;}return null==c?"":JSV.common.JSVFileManager.fixUTF(c)},"~S,~A");c$.getUTFEncoding=c(c$,"getUTFEncoding",function(a){return 3<=a.length&&239==a[0]&&187==a[1]&&191==a[2]?JU.Encoding.UTF8:4<=a.length&&0==a[0]&&0==a[1]&&254==a[2]&&255==a[3]?JU.Encoding.UTF_32BE:4<=a.length&&
255==a[0]&&254==a[1]&&0==a[2]&&0==a[3]?JU.Encoding.UTF_32LE:2<=a.length&&255==a[0]&&254==a[1]?JU.Encoding.UTF_16LE:2<=a.length&&254==a[0]&&255==a[1]?JU.Encoding.UTF_16BE:JU.Encoding.NONE},"~A");c$.fixUTF=c(c$,"fixUTF",function(a){var b=JSV.common.JSVFileManager.getUTFEncoding(a);if(b!==JU.Encoding.NONE)try{var c=String.instantialize(a,b.name().$replace("_","-"));switch(b){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:c=c.substring(1)}return c}catch(g){if(y(g,java.io.IOException))JU.Logger.error("fixUTF error "+
g);else throw g;}return String.instantialize(a)},"~A");c$.getInputStream=c(c$,"getInputStream",function(a,b,c){var g=JSV.common.JSVFileManager.isURL(a),f=null!=JSV.common.JSVFileManager.appletDocumentBase,e=null,e=null,m;if(g&&0<=(m=a.indexOf("?POST?")))e=a.substring(m+6),a=a.substring(0,m);if(f||g){var j;try{j=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null)}catch(l){if(y(l,Exception))throw new JSV.exception.JSVException("Cannot read "+a);throw l;}JU.Logger.info("JSVFileManager opening URL "+
j+(null==e?"":" with POST of "+e.length+" bytes"));e=JSV.common.JSVFileManager.viewer.apiPlatform.getURLContents(j,c,e,!1)}else b&&JU.Logger.info("JSVFileManager opening file "+a),e=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedFileInputStream(a);if(w(e,String))throw new JSV.exception.JSVException(e);return e},"~S,~B,~A");c$.getNMRSimulationJCampDX=c(c$,"getNMRSimulationJCampDX",function(a){var b=""+JSV.common.JSVFileManager.getSimulationHash(a),c=JSV.common.JSVFileManager.htCorrelationCache.get(b);
if(null!=c)return c;var g=a.startsWith("MOL="),f,e=g?null:JU.PT.rep(JSV.common.JSVFileManager.nciResolver,"%FILE",JU.PT.escapeUrl(a));null==(f=g?JU.PT.rep(a.substring(4),"\\n","\n"):JSV.common.JSVFileManager.getFileAsString(e))&&JU.Logger.info("no data returned");c=JSV.common.JSVFileManager.getFileAsString(JSV.common.JSVFileManager.nmrdbServer+f);JSV.common.JSVFileManager.htCorrelationCache.put("json",c);JU.Logger.debug(c);if(0<=c.indexOf('"error":'))return null;var c=JU.PT.rep(c,"\\r\\n","\n"),c=
JU.PT.rep(c,"\\t","\t"),c=JU.PT.rep(c,"\\n","\n"),m=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"molfile",null);JSV.common.JSVFileManager.htCorrelationCache.put("mol",m);g||Jmol.Cache.put("http://SIMULATION/"+a+"#molfile",m.getBytes());m=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"xml",null);m=JU.PT.rep(m,"<Signals>","<Signals src="+JU.PT.esc(JU.PT.rep(JSV.common.JSVFileManager.nmrdbServer,"?POST?molfile=",""))+">");m=JU.PT.rep(m,"</","\n</");m=JU.PT.rep(m,"><",">\n<");m=JU.PT.rep(m,
'\\"','"');JSV.common.JSVFileManager.htCorrelationCache.put("xml",m);var c=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"jcamp",null),c="##TITLE="+(g?"JMOL SIMULATION":a)+"\n"+c.substring(c.indexOf("\n##")+1),j=f.indexOf("\n"),j=f.indexOf("\n",j+1);0<j&&j==f.indexOf("\n \n")&&(f=f.substring(0,j+1)+"Created "+JSV.common.JSVFileManager.viewer.apiPlatform.getDateFormat("8824")+" by JSpecView "+JSV.common.JSVersion.VERSION+f.substring(j+1));j=c.indexOf("##.");a=JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,
!1);var l=a.indexOf("id='");g&&0<l&&(a=a.substring(l+4,(a+"'").indexOf("'",l+4)));c=c.substring(0,j)+"##$MODELS=\n<Models>\n<ModelData id="+JU.PT.esc(a)+' type="MOL" src='+JU.PT.esc(e)+">\n"+f+"</ModelData>\n</Models>\n##$SIGNALS=\n"+m+"\n"+c.substring(j);JSV.common.JSVFileManager.htCorrelationCache.put("jcamp",c);JSV.common.JSVFileManager.htCorrelationCache.put(b,c);return c},"~S");c$.getResource=c(c$,"getResource",function(a,b,c){var g=null;try{if(null==(g=a.getClass().getResource(b)))c[0]="Couldn't find file: "+
b}catch(f){if(y(f,Exception))c[0]="Exception "+f+" in getResource "+b;else throw f;}return g},"~O,~S,~A");c$.getResourceString=c(c$,"getResourceString",function(a,b,c){a=JSV.common.JSVFileManager.getResource(a,b,c);if(null==a)return c[0]="Error loading resource "+b,null;if(w(a,String))return JSV.common.JSVFileManager.getFileAsString(a);b=new JU.SB;try{for(var g=new java.io.BufferedReader(new java.io.InputStreamReader(a.getContent(),"UTF-8")),f;null!=(f=g.readLine());)b.append(f).append("\n");g.close()}catch(e){if(y(e,
Exception))c[0]=e.toString();else throw e;}return b.toString()},"~O,~S,~A");c$.getJmolFilePath=c(c$,"getJmolFilePath",function(a){try{a=JSV.common.JSVFileManager.getFullPathName(a)}catch(b){if(y(b,JSV.exception.JSVException))return null;throw b;}return null==JSV.common.JSVFileManager.appletDocumentBase?a.$replace("\\","/"):a},"~S");c$.getTagName=c(c$,"getTagName",function(a){if(null==a)return"String"+ ++JSV.common.JSVFileManager.stringCount;if(JSV.common.JSVFileManager.isURL(a))try{if(a.startsWith("http://SIMULATION/"))return JSV.common.JSVFileManager.getAbbrSimulationFileName(a);
var b=(new java.net.URL(R("java.net.URL"),a,null)).getFile();return b.substring(b.lastIndexOf("/")+1)}catch(c){if(y(c,java.io.IOException))return null;throw c;}return JSV.common.JSVFileManager.viewer.apiPlatform.newFile(a).getName()},"~S");c$.getQuotedJSONAttribute=c(c$,"getQuotedJSONAttribute",function(a,b,c){null==c&&(c=b);c='"'+c+'":';b=a.indexOf('"'+b+'":');var g=a.indexOf(c,b);return 0>b||0>g?null:JU.PT.getQuotedStringAt(a,g+c.length)},"~S,~S,~S");c$.setDocumentBase=c(c$,"setDocumentBase",function(a,
b){JSV.common.JSVFileManager.viewer=a;JSV.common.JSVFileManager.appletDocumentBase=b},"JSV.common.JSViewer,java.net.URL");C(c$,"SIMULATION_PROTOCOL","http://SIMULATION/","appletDocumentBase",null,"viewer",null,"jsDocumentBase","");c$.htCorrelationCache=c$.prototype.htCorrelationCache=new java.util.Hashtable;c$.urlPrefixes=c$.prototype.urlPrefixes=["http:","https:","ftp:","http://SIMULATION/","file:"];C(c$,"URL_LOCAL",4,"nciResolver","http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True",
"nmrdbServer","http://www.nmrdb.org/tools/jmol/predict.php?POST?molfile=","stringCount",0)}),q("JSV.common"),r(["javajs.api.BytePoster","$.PlatformViewer","javajs.awt.Dimension","JSV.common.Spectrum"],"JSV.common.JSViewer","java.io.File java.lang.Boolean $.Double $.Float $.Thread java.net.URL java.util.Hashtable JU.CU $.Lst $.OC $.PT $.SB JSV.common.Annotation $.ExportType $.JSVFileManager $.PanelData $.PanelNode $.Parameters $.PeakInfo $.PrintLayout $.RepaintManager $.ScriptToken $.ScriptTokenizer JSV.source.JDXReader $.JDXSource JSV.tree.SimpleTree JU.Logger".split(" "),
function(){c$=k(function(){this.irMode=this.overlayLegendDialog=this.viewDialog=this.dialogManager=this.jsvpPopupMenu=this.fileHelper=this.scriptQueue=this.properties=this.mainPanel=this.selectedPanel=this.repaintManager=this.parameters=this.panelNodes=this.currentSource=this.spectraTree=this.g2d=this.si=null;this.autoShowLegend=this.autoIntegrate=this.interfaceOverlaid=this.loadImaginary=!1;this.obscureTitleFromUser=null;this.allowMenu=this.allowCompoundMenu=!0;this.initialEndIndex=this.initialStartIndex=
-1;this.isSigned=this.isJS=this.isApplet=this.isSingleThreaded=!1;this.recentScript="";this.display=this.html5Applet=this.syncID=this.fullName=this.appletName=null;this.maximumSize=2147483647;this.dimScreen=null;this.scriptLevelCount=this.nViews=this.fileCount=0;this.apiPlatform=this.integrationRatios=this.returnFromJmolModel=null;this.popupZoomEnabled=this.popupAllowMenu=!0;this.defaultLoadScript=null;this.nmrMaxY=NaN;this.overlayLegendVisible=!1;this.recentStackPercent=5;this.offWindowFrame=this.lastPrintLayout=
null;this.recentOpenURL="http://";this.recentURL=null;this.recentSimulation="tylenol";n(this,arguments)},JSV.common,"JSViewer",null,[javajs.api.PlatformViewer,javajs.api.BytePoster]);F(c$,function(){this.irMode=JSV.common.Spectrum.IRMode.NO_CONVERT;this.dimScreen=new javajs.awt.Dimension(0,0)});c(c$,"setProperty",function(a,b){null!=this.properties&&this.properties.setProperty(a,b)},"~S,~S");c(c$,"setNode",function(a){a.jsvp!==this.selectedPanel&&this.si.siSetSelectedPanel(a.jsvp);this.si.siSendPanelChange();
this.si.siNodeSet(a)},"JSV.common.PanelNode");p(c$,function(a,b,c){this.si=a;this.isJS=(this.isApplet=b)&&c;this.isSigned=a.isSigned();this.apiPlatform=this.getPlatformInterface("Platform");this.apiPlatform.setViewer(this,this.display);this.g2d=this.getPlatformInterface("G2D");this.spectraTree=new JSV.tree.SimpleTree(this);this.parameters=this.getPlatformInterface("Parameters");this.parameters.setName("applet");this.fileHelper=this.getPlatformInterface("FileHelper").set(this);this.isSingleThreaded=
this.apiPlatform.isSingleThreaded();this.panelNodes=new JU.Lst;this.repaintManager=new JSV.common.RepaintManager(this);b||this.setPopupMenu(!0,!0)},"JSV.api.ScriptInterface,~B,~B");c(c$,"setPopupMenu",function(a,b){this.popupAllowMenu=a;this.popupZoomEnabled=b},"~B,~B");c(c$,"showMenu",function(a,b){if(this.popupAllowMenu){if(null==this.jsvpPopupMenu)try{this.jsvpPopupMenu=this.getPlatformInterface("Popup"),this.jsvpPopupMenu.jpiInitialize(this,this.isApplet?"appletMenu":"appMenu"),this.jsvpPopupMenu.setEnabled(this.popupAllowMenu,
this.popupZoomEnabled)}catch(c){if(y(c,Exception)){JU.Logger.error(c+" initializing popup menu");return}throw c;}this.jsvpPopupMenu.jpiShow(a,b)}},"~N,~N");c(c$,"runScriptNow",function(a){this.scriptLevelCount++;null==a&&(a="");a=a.trim();if(a.startsWith("!"))a=a.substring(1).trim();else if(a.startsWith(">"))return JU.Logger.error(a),!0;if(0<=a.indexOf("<PeakData"))return this.syncScript(a),!0;JU.Logger.info("RUNSCRIPT "+a);var b=!0,c=10;a=new JSV.common.ScriptTokenizer(a,!0);for(var g=null;null!=
a&&a.hasMoreTokens()&&0<c&&b;){var f=a.nextToken(),e=new JSV.common.ScriptTokenizer(f,!1),m=JSV.common.ScriptToken.getKey(e);if(null!=m){var j=JSV.common.ScriptToken.getScriptToken(m),e=JSV.common.ScriptToken.getValue(j,e,f);try{switch(j){case JSV.common.ScriptToken.UNKNOWN:JU.Logger.info("Unrecognized parameter: "+m);--c;break;default:if(null==this.selectedPanel)break;this.parameters.set(this.pd(),j,e);this.si.siUpdateBoolean(j,JSV.common.Parameters.isTrue(e));break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.si.siExecSetCallback(j,
e);break;case JSV.common.ScriptToken.DEFAULTLOADSCRIPT:e=JU.PT.rep(e,"''",'"');this.defaultLoadScript=0<e.length?e:null;break;case JSV.common.ScriptToken.DEFAULTNMRNORMALIZATION:this.nmrMaxY=JU.PT.parseFloat(e);break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(e);break;case JSV.common.ScriptToken.CLOSE:this.execClose(e);break;case JSV.common.ScriptToken.DEBUG:JU.Logger.setLogLevel(e.toLowerCase().equals("high")?6:JSV.common.Parameters.isTrue(e)?5:4);break;
case JSV.common.ScriptToken.GETPROPERTY:var l=null==this.selectedPanel?null:this.getPropertyAsJavaObject(e);null!=l&&this.selectedPanel.showMessage(JU.PT.toJSON(null,l),e);break;case JSV.common.ScriptToken.HIDDEN:this.si.siExecHidden(JSV.common.Parameters.isTrue(e));break;case JSV.common.ScriptToken.INTEGRATIONRATIOS:this.integrationRatios=e;this.execIntegrate(null);break;case JSV.common.ScriptToken.INTERFACE:this.interfaceOverlaid=this.checkOvelayInterface(e);break;case JSV.common.ScriptToken.INTEGRALOFFSET:case JSV.common.ScriptToken.INTEGRALRANGE:this.execSetIntegralParameter(j,
Double.parseDouble(e));break;case JSV.common.ScriptToken.JMOL:this.si.syncToJmol(e);break;case JSV.common.ScriptToken.JSV:this.syncScript(JU.PT.trimQuotes(e));break;case JSV.common.ScriptToken.LOAD:if(0==e.length){null!=this.defaultLoadScript&&this.runScriptNow(this.defaultLoadScript);break}this.load(e,(null==this.defaultLoadScript?"":this.defaultLoadScript+";")+a.getRemainingScript());g=null==this.selectedPanel?null:this.si.siLoaded(e);a=null;break;case JSV.common.ScriptToken.LOADIMAGINARY:this.loadImaginary=
JSV.common.Parameters.isTrue(e);break;case JSV.common.ScriptToken.PEAK:this.execPeak(e);break;case JSV.common.ScriptToken.PEAKLIST:this.execPeakList(e);break;case JSV.common.ScriptToken.SCALEBY:this.scaleSelectedBy(this.panelNodes,e);break;case JSV.common.ScriptToken.SCRIPT:if(e.equals("")||e.toLowerCase().startsWith("inline"))this.execScriptInline(e);else{var k=JSV.common.JSVFileManager.getFileAsString(e);null!=k&&100>this.scriptLevelCount&&this.runScriptNow(k)}break;case JSV.common.ScriptToken.SELECT:this.execSelect(e);
break;case JSV.common.ScriptToken.SPECTRUM:case JSV.common.ScriptToken.SPECTRUMNUMBER:this.setSpectrum(e)||(b=!1);break;case JSV.common.ScriptToken.STACKOFFSETY:this.execOverlayOffsetY(JU.PT.parseInt(""+JU.PT.parseFloat(e)));break;case JSV.common.ScriptToken.TEST:this.si.siExecTest(e);break;case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:this.execView(e,!0);break;case JSV.common.ScriptToken.HIGHLIGHT:b=this.highlight(f);break;case JSV.common.ScriptToken.FINDX:case JSV.common.ScriptToken.GETSOLUTIONCOLOR:case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:case JSV.common.ScriptToken.IRMODE:case JSV.common.ScriptToken.LABEL:case JSV.common.ScriptToken.LINK:case JSV.common.ScriptToken.OVERLAYSTACKED:case JSV.common.ScriptToken.PRINT:case JSV.common.ScriptToken.SETPEAK:case JSV.common.ScriptToken.SETX:case JSV.common.ScriptToken.SHIFTX:case JSV.common.ScriptToken.SHOWERRORS:case JSV.common.ScriptToken.SHOWMEASUREMENTS:case JSV.common.ScriptToken.SHOWMENU:case JSV.common.ScriptToken.SHOWKEY:case JSV.common.ScriptToken.SHOWPEAKLIST:case JSV.common.ScriptToken.SHOWINTEGRATION:case JSV.common.ScriptToken.SHOWPROPERTIES:case JSV.common.ScriptToken.SHOWSOURCE:case JSV.common.ScriptToken.YSCALE:case JSV.common.ScriptToken.WRITE:case JSV.common.ScriptToken.ZOOM:if(this.isClosed()){b=
!1;break}switch(j){case JSV.common.ScriptToken.FINDX:this.pd().findX(null,Double.parseDouble(e));break;case JSV.common.ScriptToken.GETSOLUTIONCOLOR:this.show("solutioncolor"+e.toLowerCase());break;case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:this.execIntegrate(e);break;case JSV.common.ScriptToken.IRMODE:this.execIRMode(e);break;case JSV.common.ScriptToken.LABEL:this.pd().addAnnotation(JSV.common.ScriptToken.getTokens(e));break;case JSV.common.ScriptToken.LINK:this.pd().linkSpectra(JSV.common.PanelData.LinkMode.getMode(e));
break;case JSV.common.ScriptToken.OVERLAYSTACKED:this.pd().splitStack(!JSV.common.Parameters.isTrue(e));break;case JSV.common.ScriptToken.PRINT:g=this.execWrite(null);break;case JSV.common.ScriptToken.SETPEAK:this.pd().shiftSpectrum(NaN,e.equalsIgnoreCase("NONE")?1.7976931348623157E308:e.equalsIgnoreCase("?")?4.9E-324:Double.parseDouble(e));break;case JSV.common.ScriptToken.SETX:this.pd().shiftSpectrum(4.9E-324,Double.parseDouble(e));break;case JSV.common.ScriptToken.SHIFTX:this.pd().shiftSpectrum(e.equalsIgnoreCase("NONE")?
1.7976931348623157E308:Double.parseDouble(e),NaN);break;case JSV.common.ScriptToken.SHOWERRORS:this.show("errors");break;case JSV.common.ScriptToken.SHOWINTEGRATION:this.pd().showAnnotation(JSV.common.Annotation.AType.Integration,JSV.common.Parameters.getTFToggle(e));break;case JSV.common.ScriptToken.SHOWKEY:this.setOverlayLegendVisibility(JSV.common.Parameters.getTFToggle(e),!0);break;case JSV.common.ScriptToken.SHOWMEASUREMENTS:this.pd().showAnnotation(JSV.common.Annotation.AType.Measurements,JSV.common.Parameters.getTFToggle(e));
break;case JSV.common.ScriptToken.SHOWMENU:this.showMenu(-2147483648,0);break;case JSV.common.ScriptToken.SHOWPEAKLIST:this.pd().showAnnotation(JSV.common.Annotation.AType.PeakList,JSV.common.Parameters.getTFToggle(e));break;case JSV.common.ScriptToken.SHOWPROPERTIES:this.show("properties");break;case JSV.common.ScriptToken.SHOWSOURCE:this.show("source");break;case JSV.common.ScriptToken.YSCALE:this.setYScale(e);break;case JSV.common.ScriptToken.WINDOW:this.si.siNewWindow(JSV.common.Parameters.isTrue(e),
!1);break;case JSV.common.ScriptToken.WRITE:g=this.execWrite(e);break;case JSV.common.ScriptToken.ZOOM:b=this.execZoom(e)}}}catch(n){if(y(n,Exception))g=n.toString(),JU.Logger.error(n.toString()),b=!1,--c;else throw n;}}}this.scriptLevelCount--;this.si.siExecScriptComplete(g,!0);return b},"~S");c(c$,"execClose",function(a){var b=!a.startsWith("!");b||(a=a.substring(1));this.close(JU.PT.trimQuotes(a));(!b||0==this.panelNodes.size())&&this.si.siValidateAndRepaint(!0)},"~S");c(c$,"checkOvelayInterface",
function(a){return a.equalsIgnoreCase("single")||a.equalsIgnoreCase("overlay")},"~S");c(c$,"execPeak",function(a){try{var b=JSV.common.ScriptToken.getTokens(a);a=' type="'+b.get(0).toUpperCase()+'" _match="'+JU.PT.trimQuotes(b.get(1).toUpperCase())+'"';2<b.size()&&b.get(2).equalsIgnoreCase("all")&&(a+=' title="ALL"');this.processPeakPickEvent(new JSV.common.PeakInfo(a),!1)}catch(c){if(!y(c,Exception))throw c;}},"~S");c(c$,"execPeakList",function(a){var b=this.parameters,c=JSV.common.Parameters.getTFToggle(a);
if(0>a.indexOf("="))this.isClosed()||this.pd().getPeakListing(null,c);else for(var c=JSV.common.ScriptToken.getTokens(a),g=c.size();0<=--g;){a=c.get(g);var e=a.indexOf("=");if(!(0>=e)){var h=a.substring(0,e);a=a.substring(e+1);try{h.startsWith("thr")?b.peakListThreshold=Double.$valueOf(a).doubleValue():h.startsWith("int")&&(b.peakListInterpolation=a.equalsIgnoreCase("none")?"NONE":"parabolic"),this.isClosed()||this.pd().getPeakListing(b,Boolean.TRUE)}catch(m){if(!y(m,Exception))throw m;}}}},"~S");
c(c$,"highlight",function(a){var b=JSV.common.ScriptToken.getTokens(a),c=b.size();switch(c){case 3:case 5:case 6:case 7:break;case 2:case 4:if(b.get(c-1).equalsIgnoreCase("OFF"))break;default:return!1}if(!this.isClosed()){a=JU.PT.parseFloat(1<c?b.get(1):"");var g=JU.PT.parseFloat(2<c?b.get(2):""),e=this.getRGB(3<c?b.get(3):"100"),h=this.getRGB(4<c?b.get(4):"100"),m=this.getRGB(5<c?b.get(5):"100"),b=this.getRGB(6<c?b.get(6):"100");Float.isNaN(a)||Float.isNaN(g)?this.pd().removeAllHighlights():(this.pd().removeHighlight(a,
g),0>b&&(b=150),0<=e&&(0<=h&&0<=m)&&this.pd().addHighlight(null,a,g,null,e,h,m,b));this.repaint(!0)}return!0},"~S");c(c$,"getRGB",function(a){a=JU.PT.parseFloat(a);return G(Float.isNaN(a)?-1:1<a?a:255*a)},"~S");c(c$,"execZoom",function(a){var b=0,c=0,g=0,e=0;a=JU.PT.rep(a," - "," ").$replace(","," ");a=JSV.common.ScriptToken.getTokens(a);switch(a.size()){default:return!1;case 0:return b=this.pd().getCurrentGraphSet().getCurrentView(),a=Math.round(100*b.minXOnScale)/100+","+Math.round(100*b.maxXOnScale)/
100,a=this.selectedPanel.getInput("Enter zoom range x1 x2","Zoom",a),null==a||this.execZoom(a);case 1:return a=a.get(0),a.equalsIgnoreCase("next")?this.pd().nextView():a.toLowerCase().startsWith("prev")?this.pd().previousView():a.equalsIgnoreCase("out")?this.pd().resetView():a.equalsIgnoreCase("clear")&&this.pd().clearAllView(),!0;case 2:b=Double.parseDouble(a.get(0));c=Double.parseDouble(a.get(1));break;case 4:b=Double.parseDouble(a.get(0)),g=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2)),
e=Double.parseDouble(a.get(3))}this.pd().setZoom(b,g,c,e);return!0},"~S");c(c$,"scaleSelectedBy",function(a,b){try{for(var c=Double.parseDouble(b),g=a.size();0<=--g;)a.get(g).pd().scaleSelectedBy(c)}catch(e){if(!y(e,Exception))throw e;}},"JU.Lst,~S");c(c$,"pd",function(){return null==this.selectedPanel?null:this.selectedPanel.getPanelData()});c(c$,"isClosed",function(){return null==this.pd()});c(c$,"execSelect",function(a){if(a.startsWith("ID ")){if(!this.isClosed())try{this.pd().selectSpectrum(null,
"ID",JU.PT.trimQuotes(a.substring(3)),!0)}catch(b){if(!y(b,Exception))throw b;}}else{for(var c=this.panelNodes,g=c.size();0<=--g;)c.get(g).pd().selectFromEntireSet(-2147483648);c=new JU.Lst;this.fillSpecList(a,c,!1)}},"~S");c(c$,"execView",function(a,b){if(a.equals(""))this.checkOverlay();else{var c=new JU.Lst,g=this.fillSpecList(a,c,!0);0<c.size()&&this.si.siOpenDataOrFile(null,g,c,g,-1,-1,!1,null,null);b||this.si.siValidateAndRepaint(!1)}},"~S,~B");c(c$,"execIRMode",function(a){for(var b=JSV.common.Spectrum.IRMode.getMode(a),
c=this.pd().getSpectrum().dataType,g=this.panelNodes.size();0<=--g;)this.panelNodes.get(g).pd().setIRMode(b,c);this.setIRmode(a)},"~S");c(c$,"execIntegrate",function(a){this.isClosed()||(this.pd().checkIntegral(this.parameters,a),null!=this.integrationRatios&&this.pd().setIntegrationRatios(this.integrationRatios),this.integrationRatios=null,this.repaint(!0))},"~S");c(c$,"repaint",function(a){this.selectedPanel.doRepaint(a)},"~B");c(c$,"execSetIntegralParameter",function(a,b){var c=this.parameters;
switch(a){case JSV.common.ScriptToken.INTEGRALRANGE:c.integralRange=b;break;case JSV.common.ScriptToken.INTEGRALOFFSET:c.integralOffset=b}this.isClosed()||this.pd().checkIntegral(this.parameters,"update")},"JSV.common.ScriptToken,~N");c(c$,"setYScale",function(a){var b=JSV.common.ScriptToken.getTokens(a),c=0,g=!1;1<b.size()&&b.get(0).equalsIgnoreCase("ALL")&&(g=!0,c++);a=Double.parseDouble(b.get(c++));b=Double.parseDouble(b.get(c));if(g){g=this.pd().getSpectrum();for(c=this.panelNodes.size();0<=--c;){var e=
this.panelNodes.get(c);e.source===this.currentSource&&JSV.common.Spectrum.areXScalesCompatible(g,e.getSpectrum(),!1,!1)&&e.pd().setZoom(0,a,0,b)}}else this.pd().setZoom(0,a,0,b)},"~S");c(c$,"setOverlayLegendVisibility",function(a,b){b&&(this.overlayLegendVisible=null==a?!this.overlayLegendVisible:a===Boolean.TRUE);for(var c=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes),g=this.panelNodes.size();0<=--g;)this.showOverlayLegend(this.panelNodes.get(g),this.panelNodes.get(g)===c&&this.overlayLegendVisible)},
"Boolean,~B");c(c$,"showOverlayLegend",function(a,b){var c=a.legend;null==c&&b&&(c=a.setLegend(1<a.pd().getNumberOfSpectraInCurrentSet()&&1==a.pd().getNumberOfGraphSets()?this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null):null));null!=c&&c.setVisible(b)},"JSV.common.PanelNode,~B");c(c$,"syncScript",function(a){a.equals("TEST")&&(a=JSV.common.JSViewer.testScript);JU.Logger.info("JSViewer.syncScript Jmol>JSV "+a);if(0>a.indexOf("<PeakData"))a.startsWith("JSVSTR:")?this.si.syncToJmol(a):
(this.runScriptNow(a),0<=a.indexOf("#SYNC_PEAKS")&&this.syncPeaksAfterSyncScript());else{JU.Logger.info(">>toJSV>> "+a);var b=JU.PT.getQuotedAttribute(a,"sourceID"),c,g,e,h;if(null==b){g=JU.PT.getQuotedAttribute(a,"file");e=JU.PT.getQuotedAttribute(a,"index");if(null==g||null==e)return;g=JU.PT.rep(g,"#molfile","");c=JU.PT.getQuotedAttribute(a,"model");b=JU.PT.getQuotedAttribute(a,"src");h=null!=b&&b.startsWith("Jmol")?null:this.returnFromJmolModel;if(null!=c&&null!=h&&!c.equals(h)){JU.Logger.info("JSV ignoring model "+
c+"; should be "+h);return}this.returnFromJmolModel=null;if(0==this.panelNodes.size()||!this.checkFileAlreadyLoaded(g))JU.Logger.info("file "+g+" not found -- JSViewer closing all and reopening"),this.si.siSyncLoad(g);a=JU.PT.getQuotedAttribute(a,"type");h=null}else g=null,e=c=b,h=","+JU.PT.getQuotedAttribute(a,"atom")+",",a="ID";e=this.selectPanelByPeak(g,e,h);h=this.pd();h.selectSpectrum(g,a,c,!0);this.si.siSendPanelChange();h.addPeakHighlight(e);this.repaint(!0);(null==b||null!=e&&null!=e.getAtoms())&&
this.si.syncToJmol(this.jmolSelect(e))}},"~S");c(c$,"syncPeaksAfterSyncScript",function(){var a=this.currentSource;if(null!=a)try{var b="file="+JU.PT.esc(a.getFilePath()),c=a.getSpectra().get(0).getPeakList(),g=new JU.SB;g.append("[");for(var e=c.size(),a=0;a<e;a++){var h=c.get(a).toString(),h=h+" "+b;g.append(JU.PT.esc(h));0<a&&g.append(",")}g.append("]");this.si.syncToJmol("Peaks: "+g)}catch(m){if(!y(m,Exception))throw m;}});c(c$,"checkFileAlreadyLoaded",function(a){if(this.isClosed())return!1;
if(this.pd().hasFileLoaded(a))return!0;for(var b=this.panelNodes.size();0<=--b;)if(this.panelNodes.get(b).pd().hasFileLoaded(a))return this.si.siSetSelectedPanel(this.panelNodes.get(b).jsvp),!0;return!1},"~S");c(c$,"selectPanelByPeak",function(a,b,c){if(null==this.panelNodes)return null;for(var g=null,e=this.panelNodes.size();0<=--e;)this.panelNodes.get(e).pd().addPeakHighlight(null);g=this.pd().selectPeakByFileIndex(a,b,c);if(null!=g)this.setNode(JSV.common.PanelNode.findNode(this.selectedPanel,
this.panelNodes));else for(e=this.panelNodes.size();0<=--e;){var h=this.panelNodes.get(e);if(null!=(g=h.pd().selectPeakByFileIndex(a,b,c))){this.setNode(h);break}}return g},"~S,~S,~S");c(c$,"processPeakPickEvent",function(a){if(w(a,JSV.common.PeakInfo)){var b=this.pd().findMatchingPeakInfo(a);if(null==b){if(!"ALL".equals(a.getTitle()))return;for(var c=null,g=0;g<this.panelNodes.size();g++)if(null!=(b=this.panelNodes.get(g).pd().findMatchingPeakInfo(a))){c=this.panelNodes.get(g);break}if(null==c)return;
this.setNode(c)}a=b}else this.si.siSetSelectedPanel(a.getSource()),a=a.getPeakInfo();this.pd().addPeakHighlight(a);this.syncToJmol(a);a.isClearAll()?this.repaint(!1):this.pd().selectSpectrum(a.getFilePath(),a.getType(),a.getModel(),!0);this.si.siCheckCallbacks(a.getTitle())},"~O,~B");c(c$,"newStructToJmol",function(a){JU.Logger.info("sending new structure to Jmol:\n"+a);this.si.syncToJmol("struct:"+a)},"~S");c(c$,"syncToJmol",function(a){this.repaint(!0);this.returnFromJmolModel=a.getModel();this.si.syncToJmol(this.jmolSelect(a))},
"JSV.common.PeakInfo");c(c$,"sendPanelChange",function(){var a=this.pd(),b=a.getSpectrum(),c=b.getSelectedPeak();null==c&&(c=b.getModelPeakInfoForAutoSelectOnLoad());null==c&&(c=b.getBasePeakInfo());a.addPeakHighlight(c);JU.Logger.info(Thread.currentThread()+"JSViewer sendFrameChange "+this.selectedPanel);this.syncToJmol(c)});c(c$,"jmolSelect",function(a){var b="IR".equals(a.getType())||"RAMAN".equals(a.getType())?"vibration ON; selectionHalos OFF;":"vibration OFF; selectionhalos "+(null==a.getAtoms()?
"OFF":"ON");return"Select: "+a+' script="'+b+' " sourceID="'+this.pd().getSpectrum().sourceID+'"'},"JSV.common.PeakInfo");c(c$,"getPropertyAsJavaObject",function(a){var b=new java.util.Hashtable;if("SOURCEID".equalsIgnoreCase(a))return b.put(a,null==this.pd()?"":this.pd().getSpectrum().sourceID),b;if(null!=a&&a.startsWith("DATA_"))return b.put(a,""+JSV.common.JSVFileManager.htCorrelationCache.get(a.substring(5))),b;var c=!1;if(null!=a&&a.toUpperCase().startsWith("ALL ")||"all".equalsIgnoreCase(a))a=
a.substring(3).trim(),c=!0;"".equals(a)&&(a=null);var g=this.pd().getInfo(!0,a);if(!c&&null!=g)return g;null!=g&&b.put("current",g);c=new JU.Lst;for(g=0;g<this.panelNodes.size();g++)null!=this.panelNodes.get(g).jsvp&&c.addLast(this.panelNodes.get(g).getInfo(a));b.put("items",c);return b},"~S");c(c$,"getCoordinate",function(){if(!this.isClosed()){var a=this.pd().getClickedCoordinate();if(null!=a)return a.getXVal()+" "+a.getYVal()}return""});c(c$,"fillSpecList",function(a,b,c){var g,e=null,h=a.equalsIgnoreCase("NONE");
if(h||a.equalsIgnoreCase("all"))a="*";if(0>a.indexOf("*")){g=a.$plit(" ");a=new JU.SB;for(var m=0;m<g.length;m++){var j=g[m].indexOf(".");j!=g[m].lastIndexOf(".")&&(g[m]=g[m].substring(0,j+1)+g[m].substring(j+1).$replace(".","_"));a.append(g[m]).append(" ")}a=a.toString().trim()}if(a.equals("*"))g=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes));else if(a.startsWith('"')||a.startsWith("'"))g=JSV.common.ScriptToken.getTokens(a);else if(a=JU.PT.rep(a,"_",
" _ "),a=JU.PT.rep(a,"-"," - "),g=JSV.common.ScriptToken.getTokens(a),e=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes)),0==e.size())return null;var l=this.isClosed()?"1.":JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes).id,l=l.substring(0,l.indexOf(".")+1);a=new JU.SB;for(var k=g.size(),n=null,m=0;m<k;m++){var p=g.get(m),j=NaN,q=-1;m+1<k&&g.get(m+1).equals("*")?(m+=2,j=Double.parseDouble(g.get(m))):m+1<k&&g.get(m+1).equals("_")&&(m+=
2,q=Integer.parseInt(g.get(m)));if(p.equals("-")){null==n&&(n=e.get(0));p=m+1==k?e.get(e.size()-1):g.get(++m);p.contains(".")||(p=l+p);for(j=0;j<e.size()&&!e.get(j).equals(n);)j++;for(j++;j<e.size()&&!n.equals(p);){var r=JSV.common.PanelNode.findNodeById(n=e.get(j++),this.panelNodes);b.addLast(r.pd().getSpectrumAt(0));a.append(",").append(n)}}else if(p.startsWith("'")&&p.endsWith("'")&&(p='"'+JU.PT.trim(p,"'")+'"'),p.startsWith('"'))for(var p=JU.PT.trim(p,'"'),q=this.panelNodes.size(),s=0;s<q;s++){if(r=
this.panelNodes.get(s),null!=r.fileName&&r.fileName.startsWith(p)||null!=r.frameTitle&&r.frameTitle.startsWith(p))this.addSpecToList(r.pd(),j,-1,b,c),a.append(",").append(r.id)}else p.contains(".")||(p=l+p),r=JSV.common.PanelNode.findNodeById(p,this.panelNodes),null!=r&&(n=p,this.addSpecToList(r.pd(),j,q,b,c),a.append(",").append(p),0<q&&a.append(".").appendI(q))}c&&0<b.size()&&(r=JSV.common.PanelNode.findNodeById(a.substring(1),this.panelNodes),null!=r&&(this.setNode(r),b.clear()));return h?"NONE":
0<a.length()?a.toString().substring(1):null},"~S,JU.Lst,~B");c(c$,"addSpecToList",function(a,b,c,g,e){e?(a.getSpectrumAt(0).setUserYFactor(Double.isNaN(b)?1:b),a.addToList(c-1,g)):a.selectFromEntireSet(c-1)},"JSV.common.PanelData,~N,~N,JU.Lst,~B");c(c$,"getSolutionColor",function(a){var b=this.pd().getSpectrum(),c=b.canShowSolutionColor()?JSV.common.JSViewer.getInterface("JSV.common.Visible"):null;return null==c?-1:c.getColour(b,a)},"~B");c(c$,"openDataOrFile",function(a,b,c,g,e,h,m,j){if("NONE".equals(b))return this.close("View*"),
0;this.si.writeStatus("");var l=null,k=null,p=null,n=!1;null!=g&&g.startsWith("cache://")&&(a=Jmol.Cache.get(b=g));if(null!=a)try{p=b,k=l=JSV.common.JSVFileManager.getFullPathName(b)}catch(q){if(!y(q,JSV.exception.JSVException))throw q;}else if(null!=c)n=!0,k=p=l="View"+ ++this.nViews;else if(null!=g)try{this.recentURL=l=(new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,g,null)).toString(),p=JSV.common.JSVFileManager.getTagName(l)}catch(r){if(y(r,java.net.MalformedURLException))l=this.apiPlatform.newFile(g),
p=l.getName(),k=l=l.getFullPath(),this.recentURL=null;else throw r;}b=-1;if(0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,l))||0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,g)))return n?(--this.nViews,this.setNode(this.panelNodes.get(b))):this.si.writeStatus(l+" is already open"),-1;!m&&!n&&this.close("all");this.si.setCursor(3);try{this.si.siSetCurrentSource(n?JSV.source.JDXSource.createView(c):JSV.source.JDXReader.createJDXSource(JSV.common.JSVFileManager.getBufferedReaderForData(a),l,this.obscureTitleFromUser===
Boolean.TRUE,this.loadImaginary,e,h,this.nmrMaxY))}catch(s){if(y(s,Exception))return alert(s.toString()),this.si.setCursor(0),this.isApplet&&this.selectedPanel.showMessage(s.toString(),"Error Opening File"),-3;throw s;}this.si.setCursor(0);System.gc();null==k?(k=this.currentSource.getFilePath(),null!=k&&(p=k.substring(k.lastIndexOf("/")+1))):this.currentSource.setFilePath(k);null==j&&!n&&(j=k);null!=j&&this.currentSource.setID(j);this.si.siSetLoaded(p,k);a=this.currentSource.getJDXSpectrum(0);if(null==
a)return-4;c=this.currentSource.getSpectra();JSV.common.Spectrum.process(c,this.irMode);c=this.interfaceOverlaid||a.isAutoOverlayFromJmolClick();n||c&&this.currentSource.isCompoundSource?this.combineSpectra(n?g:null):this.splitSpectra();this.pd().taintedAll=!0;n||this.si.siUpdateRecentMenus(l);return 0},"~O,~S,JU.Lst,~S,~N,~N,~B,~S");c(c$,"close",function(a){var b=0,c=null==a?-2:a.indexOf(">");0<c&&(b=JU.PT.parseInt(a.substring(c+1).trim()),a=a.substring(0,c).trim());"*".equals(a)&&(a="all");var g=
"all"===a;if(null==a||0==b&&a.equalsIgnoreCase("all"))this.closeSource(null);else{var e=a.equalsIgnoreCase("views"),c=new JU.Lst;a=a.$replace("\\","/");var h=this.panelNodes.size(),b=h-b;if(a.endsWith("*"))for(a=a.substring(0,a.length-1);0<=--h;)this.panelNodes.get(h).fileName.startsWith(a)&&c.addLast(this.panelNodes.get(h).source);else if(a.equalsIgnoreCase("selected"))for(a=null;0<=--h;)g=this.panelNodes.get(h).source,this.panelNodes.get(h).isSelected&&(null==a||a!==g)&&c.addLast(g),a=g;else if(g||
e||a.equalsIgnoreCase("simulations"))for(a=0;0<=--h&&a<b;){if(g||(e?this.panelNodes.get(h).isView:this.panelNodes.get(h).isSimulation))c.addLast(this.panelNodes.get(h).source),a++}else g=0==a.length?this.currentSource:JSV.common.PanelNode.findSourceByNameOrId(a,this.panelNodes),null!=g&&c.addLast(g);for(h=c.size();0<=--h;)this.closeSource(c.get(h));null==this.selectedPanel&&0<this.panelNodes.size()&&this.si.siSetSelectedPanel(JSV.common.PanelNode.getLastFileFirstNode(this.panelNodes))}},"~S");c(c$,
"load",function(a,b){var c=JSV.common.ScriptToken.getTokens(a),g=c.get(0),e=null,h=0;g.equalsIgnoreCase("ID")&&(e=JU.PT.trimQuotes(c.get(1)),g=c.get(2),h=2);var m=g.equalsIgnoreCase("APPEND"),j=g.equalsIgnoreCase("CHECK");(m||j)&&h++;0<h&&(g=c.get(h));null==b&&(b=this.defaultLoadScript);g.equals("?")?this.openFileFromDialog(m,!1,!1,b):g.equals("http://?")?this.openFileFromDialog(m,!0,!1,null):g.equals("$?")?this.openFileFromDialog(m,!0,!0,null):(g.equalsIgnoreCase("MOL")&&(g="http://SIMULATION/MOL="+
JU.PT.trimQuotes(c.get(++h))),!j&&!m&&(g.equals('""')&&null!=this.currentSource&&(g=this.currentSource.getFilePath()),this.close("all")),g=JU.PT.trimQuotes(g),g.startsWith("$")&&(g="http://SIMULATION/"+g.substring(1)),j=h+1<c.size()?Integer.$valueOf(c.get(++h)).intValue():-1,c=h+1<c.size()?Integer.$valueOf(c.get(++h)).intValue():j,this.si.siOpenDataOrFile(null,null,null,g,j,c,m,b,e))},"~S,~S");c(c$,"combineSpectra",function(a){var b=this.currentSource,c=b.getSpectra(),c=this.si.siGetNewJSVPanel2(c);
c.setTitle(b.getTitle());c.getTitle().equals("")&&(c.getPanelData().setViewTitle(b.getFilePath()),c.setTitle(a));this.si.siSetPropertiesFromPreferences(c,!0);this.spectraTree.createTree(++this.fileCount,b,[c]).getPanelNode().isView=!0;b=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes);b.setFrameTitle(a);b.isView=!0;this.autoShowLegend&&1==this.pd().getNumberOfGraphSets()&&b.setLegend(this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null));this.si.siSetMenuEnables(b,!1)},"~S");
c(c$,"closeSource",function(a){for(var b=this.spectraTree.getRootNode(),c=null==a?null:a.getFilePath(),g=new JU.Lst,b=b.children();b.hasMoreElements();){var e=b.nextElement();if(null==c||e.getPanelNode().source.getFilePath().equals(c)){for(var h=e.children();h.hasMoreElements();){var m=h.nextElement();g.addLast(m);this.panelNodes.removeObj(m.getPanelNode())}g.addLast(e);if(null!=c)break}}this.spectraTree.deleteNodes(g);null==a&&(null!=this.currentSource&&this.currentSource.dispose(),this.currentSource=
null,null!=this.selectedPanel&&this.selectedPanel.dispose());this.currentSource===a&&(this.si.siSetSelectedPanel(null),this.si.siSetCurrentSource(null));for(g=c=0;g<this.panelNodes.size();g++)b=JU.PT.parseFloat(this.panelNodes.get(g).id),b>=c+1&&(c=v(Math.floor(b)));this.fileCount=c;System.gc();JU.Logger.checkMemory();this.si.siSourceClosed(a)},"JSV.source.JDXSource");c(c$,"setFrameAndTreeNode",function(a){null==this.panelNodes||(0>a||a>=this.panelNodes.size())||this.setNode(this.panelNodes.get(a))},
"~N");c(c$,"selectFrameNode",function(a){a=JSV.common.PanelNode.findNode(a,this.panelNodes);if(null==a)return null;this.spectraTree.setPath(this.spectraTree.newTreePath(a.treeNode.getPath()));this.setOverlayLegendVisibility(null,!1);return a},"JSV.api.JSVPanel");c(c$,"setSpectrum",function(a){if(0<=a.indexOf(".")){a=JSV.common.PanelNode.findNodeById(a,this.panelNodes);if(null==a)return!1;this.setNode(a)}else{a=JU.PT.parseInt(a);if(0>=a)return this.checkOverlay(),!1;this.setFrameAndTreeNode(a-1)}return!0},
"~S");c(c$,"splitSpectra",function(){for(var a=this.currentSource,b=a.getSpectra(),c=Array(b.size()),g=null,e=0;e<b.size();e++)g=b.get(e),g=this.si.siGetNewJSVPanel(g),this.si.siSetPropertiesFromPreferences(g,!0),c[e]=g;this.spectraTree.createTree(++this.fileCount,a,c);this.si.siGetNewJSVPanel(null);a=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes);this.si.siSetMenuEnables(a,!0)});c(c$,"selectedTreeNode",function(a){null!=a&&(a.isLeaf()?this.setNode(a.getPanelNode()):System.out.println("not a leaf"),
this.si.siSetCurrentSource(a.getPanelNode().source))},"JSV.api.JSVTreeNode");c(c$,"dispose",function(){this.fileHelper=null;null!=this.viewDialog&&this.viewDialog.dispose();this.viewDialog=null;null!=this.overlayLegendDialog&&this.overlayLegendDialog.dispose();this.overlayLegendDialog=null;null!=this.jsvpPopupMenu&&(this.jsvpPopupMenu.jpiDispose(),this.jsvpPopupMenu=null);if(null!=this.panelNodes)for(var a=this.panelNodes.size();0<=--a;)this.panelNodes.get(a).dispose(),this.panelNodes.remove(a)});
c(c$,"runScript",function(a){null==this.scriptQueue?this.si.siProcessCommand(a):this.scriptQueue.addLast(a)},"~S");c(c$,"requestRepaint",function(){null!=this.selectedPanel&&this.repaintManager.refresh()});c(c$,"repaintDone",function(){this.repaintManager.repaintDone()});c(c$,"checkOverlay",function(){null!=this.mainPanel&&this.markSelectedPanels(this.panelNodes,this.mainPanel.getCurrentPanelIndex());this.viewDialog=this.getDialog(JSV.common.Annotation.AType.Views,null)});c(c$,"markSelectedPanels",
function(a,b){for(var c=a.size();0<=--c;)a.get(c).isSelected=b==c},"JU.Lst,~N");c(c$,"execOverlayOffsetY",function(a){if(-2147483648==a){if(null==this.selectedPanel)return;a=this.selectedPanel.getInput("Enter a vertical offset in percent for stacked plots","Overlay",""+this.recentStackPercent);a=JU.PT.parseFloat(a);if(Float.isNaN(a))return;a=G(a)}this.recentStackPercent=a;this.parameters.viewOffset=a;this.isClosed()&&this.pd().setYStackOffsetPercent(a)},"~N");c(c$,"execScriptInline",function(a){0<
a.length&&(a=a.substring(6).trim());0==a.length&&(a=this.selectedPanel.getInput("Enter a JSpecView script","Script",this.recentScript));null!=a&&(this.recentScript=a,this.runScriptNow(a))},"~S");c(c$,"setDisplay",function(a){this.apiPlatform.setViewer(this,this.display=a);var b=E(2,0);this.apiPlatform.getFullScreenDimensions(a,b);this.setScreenDimension(b[0],b[1])},"~O");c(c$,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);this.dimScreen.width==a&&
this.dimScreen.height==b||this.resizeImage(a,b)},"~N,~N");c(c$,"resizeImage",function(a,b){0<a?(this.dimScreen.width=a,this.dimScreen.height=b):(a=0==this.dimScreen.width?this.dimScreen.width=500:this.dimScreen.width,b=0==this.dimScreen.height?this.dimScreen.height=500:this.dimScreen.height);this.g2d.setWindowParameters(a,b)},"~N,~N");c(c$,"updateJS",function(){null!=this.selectedPanel&&this.selectedPanel.paintComponent(this.apiPlatform.getGraphics(null))});c(c$,"processMouseEvent",function(a,b,c,
g,e){return null!=this.selectedPanel&&this.selectedPanel.processMouseEvent(a,b,c,g,e)},"~N,~N,~N,~N,~N");c(c$,"processTwoPointGesture",function(a){this.isClosed()||this.selectedPanel.processTwoPointGesture(a)},"~A");c(c$,"getApplet",function(){return this.html5Applet});c(c$,"openFileAsyncSpecial",function(a){var b=null==this.currentSource?"NO":this.getDialogManager().getDialogInput(this,"Do you want to append this file? (Answer NO to replace.)","Drag/Drop Action",3,null,null,"YES");null!=b&&(b=b.toLowerCase().startsWith("y")?
"append":"",this.runScript("load "+b+' "'+a+'"'))},"~S,~N");c(c$,"getHeight",function(){return this.dimScreen.height});c(c$,"getWidth",function(){return this.dimScreen.width});c(c$,"getPlatformInterface",function(a){return JSV.common.JSViewer.getInterface("JSV."+(this.isJS?"js2d.Js":"java.Awt")+a)},"~S");c(c$,"getDialogManager",function(){if(null!=this.dialogManager)return this.dialogManager;this.dialogManager=this.getPlatformInterface("DialogManager");return this.dialogManager.set(this)});c(c$,"getDialog",
function(a,b){switch(a){case JSV.common.Annotation.AType.Integration:return JSV.common.JSViewer.getInterface("JSV.dialog.IntegrationDialog").setParams("Integration for "+b,this,b);case JSV.common.Annotation.AType.Measurements:return JSV.common.JSViewer.getInterface("JSV.dialog.MeasurementsDialog").setParams("Measurements for "+b,this,b);case JSV.common.Annotation.AType.PeakList:return JSV.common.JSViewer.getInterface("JSV.dialog.PeakListDialog").setParams("Peak List for "+b,this,b);case JSV.common.Annotation.AType.OverlayLegend:return this.overlayLegendDialog=
JSV.common.JSViewer.getInterface("JSV.dialog.OverlayLegendDialog").setParams(this.pd().getViewTitle(),this,null);case JSV.common.Annotation.AType.Views:return this.viewDialog=JSV.common.JSViewer.getInterface("JSV.dialog.ViewsDialog").setParams("View/Combine/Close Spectra",this,null);default:return null}},"JSV.common.Annotation.AType,JSV.common.Spectrum");c(c$,"show",function(a){this.getDialogManager();if(a.equals("properties"))this.dialogManager.showProperties(null,this.pd().getSpectrum());else if(a.equals("errors"))this.dialogManager.showSourceErrors(null,
this.currentSource);else if(a.equals("source"))null==this.currentSource?0<this.panelNodes.size()&&this.dialogManager.showMessageDialog(null,"Please Select a Spectrum","Select Spectrum",0):this.dialogManager.showSource(this,this.pd().getSpectrum().getFilePath());else if(a.startsWith("solutioncolorfill"))if(0<=a.indexOf("all"))for(var b=this.panelNodes.size();0<=--b;)this.panelNodes.get(b).pd().setSolutionColor(a);else this.pd().setSolutionColor(a);else a.startsWith("solutioncolor")&&(a=this.getSolutionColorStr(0>
a.indexOf("false")),a="background-color:rgb("+a+")'><br />Predicted Solution Colour- RGB("+a+")<br /><br />",this.isJS?this.dialogManager.showMessage(this,"<div style='width:100%;height:100%;"+a+"</div>","Predicted Colour"):this.selectedPanel.showMessage("<html><body style='"+a+"</body></html>","Predicted Colour"))},"~S");c(c$,"getDialogPrint",function(a){if(!this.isJS)try{var b=this.getPlatformInterface("PrintDialog").set(this.offWindowFrame,this.lastPrintLayout,a).getPrintLayout();null!=b&&(this.lastPrintLayout=
b);return b}catch(c){if(!y(c,Exception))throw c;}return new JSV.common.PrintLayout},"~B");c(c$,"setIRmode",function(a){this.irMode=a.equals("AtoT")?JSV.common.Spectrum.IRMode.TO_TRANS:a.equals("TtoA")?JSV.common.Spectrum.IRMode.TO_ABS:JSV.common.Spectrum.IRMode.getMode(a)},"~S");c(c$,"getOptionFromDialog",function(a,b,c){return this.getDialogManager().getOptionFromDialog(null,a,this.selectedPanel,b,c)},"~A,~S,~S");c(c$,"print",function(a){return this.execWrite('PDF "'+a+'"')},"~S");c(c$,"execWrite",
function(a){this.isJS&&null==a&&(a="PDF");a=JSV.common.JSViewer.getInterface("JSV.export.Exporter").write(this,null==a?null:JSV.common.ScriptToken.getTokens(a),!1);this.si.writeStatus(a);return a},"~S");c(c$,"$export",function(a,b){null==a&&(a="XY");var c=this.pd(),g=c.getNumberOfSpectraInCurrentSet();if(-1>b||b>=g)return"Maximum spectrum index (0-based) is "+(g-1)+".";c=0>b?c.getSpectrum():c.getSpectrumAt(b);try{return JSV.common.JSViewer.getInterface("JSV.export.Exporter").exportTheSpectrum(this,
JSV.common.ExportType.getType(a),null,c,0,c.getXYCoords().length-1,null,!1)}catch(e){if(y(e,Exception))return JU.Logger.error(e.toString()),null;throw e;}},"~S,~N");e(c$,"postByteArray",function(a,b){return JSV.common.JSVFileManager.postByteArray(a,b)},"~S,~A");c(c$,"getOutputChannel",function(a,b){for(;a.startsWith("/");)a=a.substring(1);return(new JU.OC).setParams(this,a,!b,null)},"~S,~B");c$.getInterface=c(c$,"getInterface",function(a){try{var b=U._4Name(a);return null==b?null:b.newInstance()}catch(c){if(y(c,
Exception))return JU.Logger.error("Interface.java Error creating instance for "+a+": \n"+c),null;throw c;}},"~S");c(c$,"showMessage",function(a){null!=this.selectedPanel&&null!=a&&this.selectedPanel.showMessage(a,null)},"~S");c(c$,"openFileFromDialog",function(a,b,c,g){var e=null;c?(e=this.fileHelper.getUrlFromDialog("Enter the name or identifier of a compound",this.recentSimulation),null!=e&&(this.recentSimulation=e,this.load((a?"APPEND ":"")+'"$'+e+'"',g))):b?(e=this.fileHelper.getUrlFromDialog("Enter the URL of a JCAMP-DX File",
null==this.recentURL?this.recentOpenURL:this.recentURL),null!=e&&(this.recentOpenURL=e,this.load((a?"APPEND ":"")+'"'+e+'"',g))):(b=[Boolean.$valueOf(a),g],b=this.fileHelper.showFileOpenDialog(this.mainPanel,b),null!=b&&this.openFile(b.getFullPath(),!a))},"~B,~B,~B,~S");c(c$,"openFile",function(a,b){if(b&&null!=this.panelNodes){var c=JSV.common.PanelNode.findSourceByNameOrId((new java.io.File(a)).getAbsolutePath(),this.panelNodes);null!=c&&this.closeSource(c)}this.si.siOpenDataOrFile(null,null,null,
a,-1,-1,!0,this.defaultLoadScript,null)},"~S,~B");c(c$,"selectPanel",function(a,b){var c=-1;if(null!=b){for(var g=b.size();0<=--g;){var e=b.get(g).jsvp;e===a?c=g:(e.setEnabled(!1),e.setFocusable(!1),e.getPanelData().closeAllDialogsExcept(JSV.common.Annotation.AType.NONE))}this.markSelectedPanels(b,c)}return c},"JSV.api.JSVPanel,JU.Lst");c(c$,"checkAutoIntegrate",function(){this.autoIntegrate&&this.pd().integrateAll(this.parameters)});c(c$,"parseInitScript",function(a){null==a&&(a="");a=new JSV.common.ScriptTokenizer(a,
!0);for(JU.Logger.debugging&&JU.Logger.info("Running in DEBUG mode");a.hasMoreTokens();){var b=a.nextToken(),c=new JSV.common.ScriptTokenizer(b,!1),g=c.nextToken();g.equalsIgnoreCase("SET")&&(g=c.nextToken());var g=g.toUpperCase(),e=JSV.common.ScriptToken.getScriptToken(g),b=JSV.common.ScriptToken.getValue(e,c,b);JU.Logger.info("KEY-> "+g+" VALUE-> "+b+" : "+e);try{switch(e){default:this.parameters.set(null,e,b);break;case JSV.common.ScriptToken.UNKNOWN:break;case JSV.common.ScriptToken.APPLETID:this.fullName=
this.appletName+"__"+(this.appletName=b)+"__";g=null;"undefined"!=typeof Jmol&&(g=Jmol._applets[b]);this.html5Applet=g;break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(b);break;case JSV.common.ScriptToken.COMPOUNDMENUON:this.allowCompoundMenu=Boolean.parseBoolean(b);break;case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.si.siExecSetCallback(e,
b);break;case JSV.common.ScriptToken.ENDINDEX:this.initialEndIndex=Integer.parseInt(b);break;case JSV.common.ScriptToken.INTERFACE:this.checkOvelayInterface(b);break;case JSV.common.ScriptToken.IRMODE:this.setIRmode(b);break;case JSV.common.ScriptToken.MENUON:this.allowMenu=Boolean.parseBoolean(b);break;case JSV.common.ScriptToken.OBSCURE:null==this.obscureTitleFromUser&&(this.obscureTitleFromUser=Boolean.$valueOf(b));break;case JSV.common.ScriptToken.STARTINDEX:this.initialStartIndex=Integer.parseInt(b);
break;case JSV.common.ScriptToken.SYNCID:this.fullName=this.appletName+"__"+(this.syncID=b)+"__"}}catch(h){if(!y(h,Exception))throw h;}}},"~S");c(c$,"getSolutionColorStr",function(a){a=JU.CU.colorPtFromInt(this.getSolutionColor(a),null);return G(a.x)+","+G(a.y)+","+G(a.z)},"~B");C(c$,"sourceLabel","Original...","FILE_OPEN_OK",0,"FILE_OPEN_ALREADY",-1,"FILE_OPEN_ERROR",-3,"FILE_OPEN_NO_DATA",-4,"OVERLAY_DIALOG",-1,"OVERLAY_OFFSET",99,"PORTRAIT",1,"PAGE_EXISTS",0,"NO_SUCH_PAGE",1,"testScript",'<PeakData  index="1" title="" model="~1.1" type="1HNMR" xMin="3.2915" xMax="3.2965" atoms="15,16,17,18,19,20" multiplicity="" integral="1"> src="JPECVIEW" file="http://SIMULATION/$caffeine"',
"NLEVEL_MAX",100)}),q("JSV.common"),r(["JSV.common.Annotation","$.Coordinate"],"JSV.common.Measurement",null,function(){c$=k(function(){this.pt2=null;this.value=0;n(this,arguments)},JSV.common,"Measurement",JSV.common.Annotation);F(c$,function(){this.pt2=new JSV.common.Coordinate});c(c$,"setM1",function(a,b,c){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(this.getXVal(),this.getYVal());return this},"~N,~N,JSV.common.Spectrum");c(c$,"copyM",function(){var a=new JSV.common.Measurement;a.setA(this.getXVal(),
this.getYVal(),this.spec,this.text,!1,!1,this.offsetX,this.offsetY);a.setPt2(this.pt2.getXVal(),this.pt2.getYVal());return a});c(c$,"setPt2",function(a,b){this.spec=a;b&&this.setPt2(this.getXVal(),this.getYVal());return this},"JSV.common.Spectrum,~B");c(c$,"setPt2",function(a,b){this.pt2.setXVal(a);this.pt2.setYVal(b);this.value=Math.abs(a-this.getXVal());this.text=this.spec.setMeasurementText(this)},"~N,~N");c(c$,"getSpectrum",function(){return this.spec});c(c$,"setValue",function(a){this.value=
a;this.text=this.spec.setMeasurementText(this)},"~N");c(c$,"getValue",function(){return this.value});c(c$,"getXVal2",function(){return this.pt2.getXVal()});c(c$,"getYVal2",function(){return this.pt2.getYVal()});e(c$,"addSpecShift",function(a){this.setXVal(this.getXVal()+a);this.pt2.setXVal(this.pt2.getXVal()+a)},"~N");c(c$,"setYVal2",function(a){this.pt2.setYVal(a)},"~N");c(c$,"overlaps",function(a,b){return Math.min(this.getXVal(),this.getXVal2())<Math.max(a,b)&&Math.max(this.getXVal(),this.getXVal2())>
Math.min(a,b)},"~N,~N");e(c$,"toString",function(){return"["+this.getXVal()+","+this.pt2.getXVal()+"]"})}),q("JSV.common"),r(["JU.Lst","JSV.api.AnnotationData"],"JSV.common.MeasurementData",["JU.AU","$.DF","JSV.common.Annotation","$.Parameters"],function(){c$=k(function(){this.units=this.spec=this.type=null;this.precision=0;this.myParams=null;this.isON=!0;this.key=null;n(this,arguments)},JSV.common,"MeasurementData",JU.Lst,JSV.api.AnnotationData);p(c$,function(a,b){x(this,JSV.common.MeasurementData,
[]);this.type=a;this.spec=b;this.myParams=(new JSV.common.Parameters).setName("MeasurementData")},"JSV.common.Annotation.AType,JSV.common.Spectrum");c(c$,"getMeasurements",function(){return this});e(c$,"getAType",function(){return this.type});e(c$,"getState",function(){return this.isON});e(c$,"setState",function(a){this.isON=a},"~B");c(c$,"setMeasurements",function(){},"JU.Lst");e(c$,"getParameters",function(){return this.myParams});c(c$,"getDataHeader",function(){return JSV.common.MeasurementData.HEADER});
c(c$,"getMeasurementListArray",function(a){this.units=a;var b=this.getMeasurementListArrayReal(a),c=this.spec.isNMR()?4:2;a=this.spec.isHNMR()&&a.equals("ppm")?4:2;for(var g=Array(this.size()),e=this.size();0<=--e;)g[e]=[""+(e+1),JU.DF.formatDecimalDbl(b[e][0],c),JU.DF.formatDecimalDbl(b[e][1],c),JU.DF.formatDecimalDbl(b[e][2],a)];return g},"~S");c(c$,"getMeasurementListArrayReal",function(a){a=this.spec.isNMR()&&a.equalsIgnoreCase("HZ");for(var b=JU.AU.newDouble2(this.size()),c=0,g=this.size();0<=
--g;){var e=this.get(g).getValue();a&&(e*=this.spec.observedFreq);b[c++]=[this.get(g).getXVal(),this.get(g).getXVal2(),e]}return b},"~S");c$.checkParameters=c(c$,"checkParameters",function(a,b){if(0==a.size())return!1;var c=a.getParameters();switch(a.getAType()){case JSV.common.Annotation.AType.PeakList:return b.peakListInterpolation.equals(c.peakListInterpolation)&&b.peakListThreshold==c.peakListThreshold}return!1},"JSV.common.MeasurementData,JSV.common.ColorParameters");e(c$,"getSpectrum",function(){return this.spec});
e(c$,"getData",function(){return this});c(c$,"clear",function(a,b){for(var c=this.size();0<=--c;){var g=this.get(c);(0==g.text.length||g.overlaps(a,b))&&this.remove(c)}},"~N,~N");e(c$,"setSpecShift",function(a){for(var b=this.size();0<=--b;){var c=this.get(b),g=c.getXVal()+a;c.setXVal(g);c.setValue(g);c.text=JU.DF.formatDecimalDbl(g,this.precision)}},"~N");e(c$,"getGraphSetKey",function(){return this.key});e(c$,"setGraphSetKey",function(a){this.key=a},"~S");e(c$,"isVisible",function(){return!0});
c(c$,"getInfo",function(a){a.put("header",this.getDataHeader());a.put("table",this.getMeasurementListArrayReal("ppm"));null!=this.units&&a.put("units",this.units)},"java.util.Map");c$.HEADER=c$.prototype.HEADER=["","start","end","value"]}),q("JSV.common"),r(["java.lang.Enum","javajs.api.EventManager","java.util.Hashtable","JU.Lst"],"JSV.common.PanelData","java.lang.Boolean $.Double javajs.awt.Font JU.CU JSV.common.Annotation $.Coordinate $.GraphSet $.JSVFileManager $.JSVersion $.JSViewer $.MeasurementData $.Parameters $.PeakPickEvent $.ScriptToken $.Spectrum $.SubSpecChangeEvent $.ZoomEvent JSV.dialog.JSVDialog J.api.GenericGraphics JU.Logger".split(" "),
function(){c$=k(function(){this.graphSets=this.jsvp=this.options=this.currentGraphSet=this.listeners=this.vwr=this.g2d0=this.g2d=null;this.currentSplitPoint=0;this.coordsClicked=this.coordClicked=this.thisWidget=null;this.isIntegralDrag=this.drawXAxisLeftToRight=this.shiftPressed=this.ctrlPressed=!1;this.xAxisLeftToRight=!0;this.scalingFactor=1;this.integralShiftMode=0;this.left=60;this.right=50;this.coordStr="";this.startupPinTip="Click to set.";this.title=null;this.endIndex=this.startIndex=this.thisHeight=
this.thisWidth=this.nSpectra=this.clickCount=0;this.titleFontName=this.displayFontName=this.viewTitle=this.commonFilePath=null;this.isPrinting=!1;this.doReset=!0;this.printingFontName=null;this.printGraphPosition="default";this.isLinked=this.display1D=this.titleDrawn=!1;this.spectra=this.printJobTitle=null;this.taintedAll=!0;this.mouseState=this.currentFont=null;this.titleOn=this.gridOn=!1;this.mouseY=this.mouseX=0;this.linking=!1;this.xPixelClicked=0;this.gMain=this.optionsSaved=this.bgcolor=this.BLACK=
this.zoomBoxColor2=this.zoomBoxColor=this.highlightColor=this.unitsColor=this.titleColor=this.scaleColor=this.plotAreaColor=this.peakTabColor=this.integralPlotColor=this.gridColor=this.coordinatesColor=null;n(this,arguments)},JSV.common,"PanelData",null,javajs.api.EventManager);F(c$,function(){this.listeners=new JU.Lst;this.options=new java.util.Hashtable});p(c$,function(a,b){this.vwr=b;this.jsvp=a;this.g2d=this.g2d0=b.g2d;this.BLACK=this.g2d.getColor1(0);this.highlightColor=this.g2d.getColor4(255,
0,0,200);this.zoomBoxColor=this.g2d.getColor4(150,150,100,130);this.zoomBoxColor2=this.g2d.getColor4(150,100,100,130)},"JSV.api.JSVPanel,JSV.common.JSViewer");c(c$,"addListener",function(a){this.listeners.contains(a)||this.listeners.addLast(a)},"JSV.api.PanelListener");c(c$,"getCurrentGraphSet",function(){return this.currentGraphSet});c(c$,"dispose",function(){this.jsvp=null;for(var a=0;a<this.graphSets.size();a++)this.graphSets.get(a).dispose();this.listeners=this.options=this.thisWidget=this.coordsClicked=
this.coordClicked=this.currentGraphSet=this.currentFont=this.graphSets=null});c(c$,"setViewTitle",function(a){this.viewTitle=a},"~S");c(c$,"getViewTitle",function(){return null==this.viewTitle?this.getTitle():this.viewTitle});c(c$,"getInfo",function(a,b){var c=new java.util.Hashtable,g=null;if(a)return this.currentGraphSet.getInfo(b,this.getCurrentSpectrumIndex());for(var e,g=this.options.entrySet().iterator();g.hasNext()&&((e=g.next())||1);)JSV.common.Parameters.putInfo(b,c,e.getKey().name(),e.getValue());
JSV.common.Parameters.putInfo(b,c,"type",this.getSpectrumAt(0).getDataType());JSV.common.Parameters.putInfo(b,c,"title",this.title);JSV.common.Parameters.putInfo(b,c,"nSets",Integer.$valueOf(this.graphSets.size()));g=new JU.Lst;for(e=this.graphSets.size();0<=--e;)g.addLast(this.graphSets.get(e).getInfo(b,-1));c.put("sets",g);return c},"~B,~S");c(c$,"setBooleans",function(a,b){if(null==b)for(var c,e=a.getBooleans().entrySet().iterator();e.hasNext()&&((c=e.next())||1);)this.setBooleans(a,c.getKey());
else this.setBoolean(b,a.getBoolean(b))},"JSV.common.Parameters,JSV.common.ScriptToken");c(c$,"setBoolean",function(a,b){this.taintedAll=!0;if(a===JSV.common.ScriptToken.REVERSEPLOT)this.currentGraphSet.setReversePlot(b);else switch(this.options.put(a,Boolean.$valueOf(b)),a){case JSV.common.ScriptToken.DISPLAY1D:case JSV.common.ScriptToken.DISPLAY2D:this.doReset=!0}},"JSV.common.ScriptToken,~B");c(c$,"getBoolean",function(a){if(a===JSV.common.ScriptToken.REVERSEPLOT)return this.currentGraphSet.reversePlot;
if(null==this.options)return!1;a=this.options.get(a);return null!=a&&w(a,Boolean)&&a===Boolean.TRUE},"JSV.common.ScriptToken");c(c$,"setFontName",function(a,b){switch(a){case JSV.common.ScriptToken.DISPLAYFONTNAME:this.displayFontName=b;break;case JSV.common.ScriptToken.TITLEFONTNAME:this.titleFontName=b}null!=b&&this.options.put(a,b)},"JSV.common.ScriptToken,~S");c(c$,"getDisplay1D",function(){return this.display1D});c(c$,"initOne",function(a){this.spectra=new JU.Lst;this.spectra.addLast(a);this.initMany(this.spectra,
0,0)},"JSV.common.Spectrum");c(c$,"initMany",function(a,b,c){this.startIndex=b;this.endIndex=c;this.nSpectra=a.size();this.spectra=a;this.commonFilePath=a.get(0).getFilePath();for(b=0;b<this.nSpectra;b++)if(!this.commonFilePath.equalsIgnoreCase(a.get(b).getFilePath())){this.commonFilePath=null;break}this.setGraphSets(JSV.common.PanelData.LinkMode.NONE)},"JU.Lst,~N,~N");c(c$,"setGraphSets",function(a){this.graphSets=JSV.common.GraphSet.createGraphSetsAndSetLinkMode(this,this.jsvp,this.spectra,this.startIndex,
this.endIndex,a);this.currentGraphSet=this.graphSets.get(0);this.title=this.getSpectrum().getTitleLabel()},"JSV.common.PanelData.LinkMode");c(c$,"findMatchingPeakInfo",function(a){for(var b=null,c=0;c<this.graphSets.size()&&null==(b=this.graphSets.get(c).findMatchingPeakInfo(a));c++);return b},"JSV.common.PeakInfo");c(c$,"integrateAll",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).integrate(-1,a)},"JSV.common.ColorParameters");c(c$,"getNumberOfGraphSets",function(){return this.graphSets.size()});
c(c$,"getTitle",function(){return this.title});c(c$,"refresh",function(){this.doReset=!0});c(c$,"addAnnotation",function(a){a=this.currentGraphSet.addAnnotation(a,this.getTitle());null!=a&&(this.title=a)},"JU.Lst");c(c$,"addPeakHighlight",function(a){for(var b=0;b<this.graphSets.size();b++)this.graphSets.get(b).addPeakHighlight(a)},"JSV.common.PeakInfo");c(c$,"selectPeakByFileIndex",function(a,b,c){var e=this.currentGraphSet.selectPeakByFileIndex(a,b,c);if(null==e)for(var f=this.graphSets.size();0<=
--f&&!(this.graphSets.get(f)!==this.currentGraphSet&&null!=(e=this.graphSets.get(f).selectPeakByFileIndex(a,b,c))););return e},"~S,~S,~S");c(c$,"setPlotColors",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).setPlotColors(a)},"~A");c(c$,"selectSpectrum",function(a,b,c,e){e&&this.currentGraphSet.selectSpectrum(a,b,c);if("ID".equals(b))this.jumpToSpectrumIndex(this.getCurrentSpectrumIndex(),!0);else for(e=0;e<this.graphSets.size();e++)this.graphSets.get(e)!==this.currentGraphSet&&
this.graphSets.get(e).selectSpectrum(a,b,c)},"~S,~S,~S,~B");c(c$,"hasFileLoaded",function(a){for(var b=this.graphSets.size();0<=--b;)if(this.graphSets.get(b).hasFileLoaded(a))return!0;return!1},"~S");c(c$,"clearAllView",function(){for(var a=this.graphSets.size();0<=--a;)this.graphSets.get(a).resetViewCompletely()});c(c$,"drawGraph",function(a,b,c,e,f,h){var m;this.gMain=a;this.display1D=!this.isLinked&&this.getBoolean(JSV.common.ScriptToken.DISPLAY1D);var j=40,l=50,k=this.isPrinting||this.doReset||
this.thisWidth!=e||this.thisHeight!=f;k&&(this.taintedAll=!0);this.taintedAll&&this.g2d.fillBackground(c,this.bgcolor);b!==a&&(this.g2d.fillBackground(b,null),a!==c&&this.g2d.fillBackground(a,null),this.g2d.setStrokeBold(a,!1));this.isPrinting?(j*=3,l*=3,this.scalingFactor=10,m=!1):(this.scalingFactor=1,m=this.getBoolean(JSV.common.ScriptToken.COORDINATESON),this.titleOn=this.getBoolean(JSV.common.ScriptToken.TITLEON),this.gridOn=this.getBoolean(JSV.common.ScriptToken.GRIDON));this.titleDrawn=this.doReset=
!1;this.thisWidth=e;this.thisHeight=f;for(var n=this.graphSets.size();0<=--n;)this.graphSets.get(n).drawGraphSet(a,b,c,e,f,this.left,this.right,j,l,k,this.taintedAll);this.titleOn&&(!this.titleDrawn&&this.taintedAll)&&this.drawTitle(a,f*this.scalingFactor,e*this.scalingFactor,this.getDrawTitle(this.isPrinting));m&&null!=this.coordStr&&this.drawCoordinates(b,j,this.thisWidth-this.right,j-20);h&&this.taintedAll&&(c=null!=this.commonFilePath?this.commonFilePath:1==this.graphSets.size()&&null!=this.currentGraphSet.getTitle(!0)?
this.getSpectrum().getFilePath():null,null!=c&&this.printFilePath(a,this.left,f,c));this.isPrinting&&this.printVersion(a,f);this.taintedAll=this.isPrinting||a===b},"~O,~O,~O,~N,~N,~B");c(c$,"drawCoordinates",function(a,b,c,e){this.g2d.setGraphicsColor(a,this.coordinatesColor);b=this.setFont(a,this.jsvp.getWidth(),0,12,!0);this.g2d.drawString(a,this.coordStr,c-b.stringWidth(this.coordStr),e)},"~O,~N,~N,~N");c(c$,"setFont",function(a,b,c,e,f){return this.g2d.setFont(a,this.getFont(a,b,c,e,f))},"~O,~N,~N,~N,~B");
c(c$,"printFilePath",function(a,b,c,e){b*=this.scalingFactor;c*=this.scalingFactor;0<e.indexOf("?")&&(e=e.substring(e.indexOf("?")+1));e=e.substring(e.lastIndexOf("/")+1);e=e.substring(e.lastIndexOf("\\")+1);this.g2d.setGraphicsColor(a,this.BLACK);var f=this.setFont(a,1E3,0,9,!0);b!=this.left*this.scalingFactor&&(b-=f.stringWidth(e));this.g2d.drawString(a,e,b,c-f.getHeight())},"~O,~N,~N,~S");c(c$,"printVersion",function(a,b){this.g2d.setGraphicsColor(a,this.BLACK);var c=this.setFont(a,100,0,12,!0),
e=this.jsvp.getApiPlatform().getDateFormat(null)+" JSpecView "+JSV.common.JSVersion.VERSION_SHORT,f=c.stringWidth(e);this.g2d.drawString(a,e,(this.thisWidth-this.right)*this.scalingFactor-f,b*this.scalingFactor-3*c.getHeight())},"~O,~N");c(c$,"drawTitle",function(a,b,c,e){e=e.$replace("\n"," ");var f=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,14,!0),h=f.stringWidth(e);h>c&&(f=v(14*c/h),10>f&&(f=10),f=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?
1:0,f,!0));this.g2d.setGraphicsColor(a,this.titleColor);this.setCurrentFont(this.g2d.setFont(a,f));this.g2d.drawString(a,e,this.isPrinting?this.left*this.scalingFactor:5,b-v(f.getHeight()*(this.isPrinting?2:0.5)))},"~O,~N,~N,~S");c(c$,"setCurrentFont",function(a){this.currentFont=a},"javajs.awt.Font");c(c$,"getFontHeight",function(){return this.currentFont.getAscent()});c(c$,"getStringWidth",function(a){return this.currentFont.stringWidth(a)},"~S");c(c$,"selectFromEntireSet",function(a){for(var b=
0,c=0;b<this.graphSets.size();b++)if(-2147483648==a)this.graphSets.get(b).setSelected(-1);else for(var e=this.graphSets.get(b).spectra,f=0;f<e.size();f++,c++)(0>a||a==c)&&this.graphSets.get(b).setSelected(f)},"~N");c(c$,"addToList",function(a,b){for(var c=0;c<this.spectra.size();c++)(0>a||c==a)&&b.addLast(this.spectra.get(c))},"~N,JU.Lst");c(c$,"scaleSelectedBy",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).scaleSelectedBy(a)},"~N");c(c$,"setCurrentGraphSet",function(a,
b,c){b=1<a.nSplit?a.getSplitPoint(b):a.getCurrentSpectrumIndex();var e=this.currentGraphSet!==a,f=e||this.currentSplitPoint!=b;this.currentGraphSet=a;this.currentSplitPoint=b;(e||1<a.nSplit&&f)&&this.setSpectrum(b,!0);if(!e){e=a.checkSpectrumClickedEvent(this.mouseX,this.mouseY,c);if(!e)return;this.currentSplitPoint=b=a.getCurrentSpectrumIndex();this.setSpectrum(b,!0)}this.jumpToSpectrumIndex(b,e||1<a.nSplit&&f)},"JSV.common.GraphSet,~N,~N");c(c$,"jumpToSpectrum",function(a){a=this.currentGraphSet.getSpectrumIndex(a);
this.jumpToSpectrumIndex(a,!0)},"JSV.common.Spectrum");c(c$,"jumpToSpectrumIndex",function(a,b){if(!(0>a||a>=this.currentGraphSet.nSpectra)){this.currentSplitPoint=a;b&&this.setSpectrum(this.currentSplitPoint,1<this.currentGraphSet.nSplit);var c=this.getSpectrum();this.notifySubSpectrumChange(c.getSubIndex(),c)}},"~N,~B");c(c$,"splitStack",function(a){this.currentGraphSet.splitStack(this.graphSets,a)},"~B");c(c$,"getNumberOfSpectraInCurrentSet",function(){return this.currentGraphSet.nSpectra});c(c$,
"getSourceID",function(){return this.getSpectrumAt(0).sourceID});c(c$,"getStartingPointIndex",function(a){return this.currentGraphSet.viewData.getStartingPointIndex(a)},"~N");c(c$,"getEndingPointIndex",function(a){return this.currentGraphSet.viewData.getEndingPointIndex(a)},"~N");c(c$,"haveSelectedSpectrum",function(){return this.currentGraphSet.haveSelectedSpectrum()});c(c$,"getShowAnnotation",function(a){return this.currentGraphSet.getShowAnnotation(a,-1)},"JSV.common.Annotation.AType");c(c$,"showAnnotation",
function(a,b){this.currentGraphSet.setShowAnnotation(a,b)},"JSV.common.Annotation.AType,Boolean");c(c$,"setYStackOffsetPercent",function(a){this.currentGraphSet.yStackOffsetPercent=a},"~N");c(c$,"setSpectrum",function(a,b){this.currentGraphSet.setSpectrum(a,b)},"~N,~B");c(c$,"getSpectrum",function(){return this.currentGraphSet.getSpectrum()});c(c$,"setSpecForIRMode",function(a){this.taintedAll=!0;var b=this.currentGraphSet.getSpectrum();this.currentGraphSet.setSpectrumJDX(a);for(var c=0;c<this.spectra.size();c++)this.spectra.get(c)===
b&&this.spectra.set(c,a)},"JSV.common.Spectrum");c(c$,"isShowAllStacked",function(){return this.currentGraphSet.showAllStacked});c(c$,"getCurrentSpectrumIndex",function(){return this.currentGraphSet.getCurrentSpectrumIndex()});c(c$,"getSpectrumAt",function(a){return null==this.currentGraphSet?null:this.currentGraphSet.getSpectrumAt(a)},"~N");c(c$,"addHighlight",function(a,b,c,e,f,h,m,j){(null==a?this.currentGraphSet:a).addHighlight(b,c,e,this.g2d.getColor4(f,h,m,j))},"JSV.common.GraphSet,~N,~N,JSV.common.Spectrum,~N,~N,~N,~N");
c(c$,"removeHighlight",function(a,b){this.currentGraphSet.removeHighlight(a,b)},"~N,~N");c(c$,"removeAllHighlights",function(){this.currentGraphSet.removeAllHighlights()});c(c$,"setZoom",function(a,b,c,e){this.currentGraphSet.setZoom(a,b,c,e);this.taintedAll=this.doReset=!0;this.notifyListeners(new JSV.common.ZoomEvent)},"~N,~N,~N,~N");c(c$,"resetView",function(){this.currentGraphSet.resetView()});c(c$,"previousView",function(){this.currentGraphSet.previousView()});c(c$,"nextView",function(){this.currentGraphSet.nextView()});
c(c$,"getSelectedIntegral",function(){return this.currentGraphSet.getSelectedIntegral()});c(c$,"advanceSubSpectrum",function(a){this.currentGraphSet.advanceSubSpectrum(a)},"~N");c(c$,"setSelectedIntegral",function(a){this.currentGraphSet.setSelectedIntegral(a)},"~N");c(c$,"scaleYBy",function(a){this.currentGraphSet.scaleYBy(a)},"~N");c(c$,"toPeak",function(a){this.currentGraphSet.toPeak(a)},"~N");c(c$,"getClickedCoordinate",function(){return this.coordClicked});c(c$,"getPickedCoordinates",function(a,
b){return JSV.common.Coordinate.getPickedCoordinates(this.coordsClicked,this.coordClicked,a,b)},"JSV.common.Coordinate,JSV.common.Coordinate");c(c$,"shiftSpectrum",function(a,b){return this.currentGraphSet.shiftSpectrum(a,b)},"~N,~N");c(c$,"findX",function(a,b){this.currentGraphSet.setXPointer(a,b)},"JSV.common.Spectrum,~N");c(c$,"setXPointers",function(a,b,c,e){this.currentGraphSet.setXPointer(a,b);this.currentGraphSet.setXPointer2(c,e)},"JSV.common.Spectrum,~N,JSV.common.Spectrum,~N");c(c$,"isCurrentGraphSet",
function(a){return a===this.currentGraphSet},"JSV.common.GraphSet");c(c$,"repaint",function(){this.jsvp.doRepaint(!1)});c(c$,"setToolTipText",function(a){this.jsvp.setToolTipText(a)},"~S");c(c$,"setHighlightColor",function(a){this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,a)},"javajs.api.GenericColor");c(c$,"getInput",function(a,b,c){return this.jsvp.getInput(a,b,c)},"~S,~S,~S");c(c$,"getFont",function(a,b,c,e,f){e*=this.scalingFactor;f?400>b&&(e=b*e/400):250>b&&(e=b*e/250);b=this.jsvp.getFontFaceID(this.isPrinting?
this.printingFontName:this.displayFontName);return this.currentFont=javajs.awt.Font.createFont3D(b,c,e,e,this.jsvp.getApiPlatform(),a)},"~O,~N,~N,~N,~B");c(c$,"notifySubSpectrumChange",function(a,b){this.notifyListeners(new JSV.common.SubSpecChangeEvent(a,null==b?null:b.getTitleLabel()))},"~N,JSV.common.Spectrum");c(c$,"notifyPeakPickedListeners",function(a){null==a&&(a=new JSV.common.PeakPickEvent(this.jsvp,this.coordClicked,this.getSpectrum().getAssociatedPeakInfo(this.xPixelClicked,this.coordClicked)));
this.notifyListeners(a)},"JSV.common.PeakPickEvent");c(c$,"notifyListeners",function(a){for(var b=0;b<this.listeners.size();b++)null!=this.listeners.get(b)&&this.listeners.get(b).panelEvent(a)},"~O");c(c$,"escapeKeyPressed",function(a){this.currentGraphSet.escapeKeyPressed(a)},"~B");c(c$,"hasFocus",function(){return this.jsvp.hasFocus()});c(c$,"isMouseUp",function(){return this.mouseState===JSV.common.PanelData.Mouse.UP});c(c$,"doMouseMoved",function(a,b){this.mouseX=a;this.mouseY=b;this.mouseState=
JSV.common.PanelData.Mouse.UP;this.clickCount=0;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&c.mouseMovedEvent(a,b)},"~N,~N");c(c$,"doMousePressed",function(a,b){this.mouseState=JSV.common.PanelData.Mouse.DOWN;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&(this.setCurrentGraphSet(c,b,0),this.clickCount=++this.clickCount%3,c.checkWidgetEvent(a,b,!0))},"~N,~N");c(c$,"doMouseDragged",function(a,b){this.isIntegralDrag=(new Boolean(this.isIntegralDrag|this.ctrlPressed)).valueOf();
this.mouseState=JSV.common.PanelData.Mouse.DOWN;JSV.common.GraphSet.findGraphSet(this.graphSets,a,b)===this.currentGraphSet&&(this.currentGraphSet.checkWidgetEvent(a,b,!1),this.currentGraphSet.mouseMovedEvent(a,b))},"~N,~N");c(c$,"doMouseReleased",function(a,b,c){this.mouseState=JSV.common.PanelData.Mouse.UP;!(null==this.thisWidget&&null==this.currentGraphSet.pendingMeasurement)&&c&&(this.currentGraphSet.mouseReleasedEvent(a,b),this.thisWidget=null,this.isIntegralDrag=!1,this.integralShiftMode=0)},
"~N,~N,~B");c(c$,"doMouseClicked",function(a,b,c){var e=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=e&&(this.setCurrentGraphSet(e,b,this.clickCount),e.mouseClickedEvent(a,b,this.clickCount,c),this.repaint())},"~N,~N,~B");c(c$,"hasCurrentMeasurements",function(a){return this.currentGraphSet.hasCurrentMeasurement(a)},"JSV.common.Annotation.AType");c(c$,"getDialog",function(a){return this.currentGraphSet.getDialog(a,-1)},"JSV.common.Annotation.AType");c(c$,"addDialog",function(a,b,c){this.currentGraphSet.addDialog(a,
b,c)},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");c(c$,"getPeakListing",function(a,b){null!=a&&this.currentGraphSet.getPeakListing(-1,a,!0);this.currentGraphSet.setPeakListing(b)},"JSV.common.Parameters,Boolean");c(c$,"checkIntegral",function(a,b){this.currentGraphSet.checkIntegral(a,b)},"JSV.common.Parameters,~S");c(c$,"setIntegrationRatios",function(a){this.currentGraphSet.setIntegrationRatios(a)},"~S");c(c$,"getView",function(){return this.currentGraphSet.getCurrentView()});c(c$,"closeAllDialogsExcept",
function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).closeDialogsExcept(a)},"JSV.common.Annotation.AType");c(c$,"removeDialog",function(a){this.currentGraphSet.removeDialog(a)},"JSV.dialog.JSVDialog");c(c$,"normalizeIntegral",function(){var a=this.getSelectedIntegral();if(null!=a){var b=a.text;0==b.length&&(b=""+a.getValue());a=this.getInput("Enter a new value for this integral","Normalize Integral",b);try{this.setSelectedIntegral(Double.parseDouble(a))}catch(c){if(!y(c,Exception))throw c;
}}});c(c$,"getDrawTitle",function(a){var b=null;a?b=this.printJobTitle:1==this.nSpectra?b=this.getSpectrum().getPeakTitle():null!=this.viewTitle?(null!=this.currentGraphSet.getTitle(!1)&&(b=this.getSpectrum().getPeakTitle()),null==b&&(b=this.viewTitle)):b=this.jsvp.getTitle().trim();0<=b.indexOf("\n")&&(b=b.substring(0,b.indexOf("\n")).trim());return b},"~B");c(c$,"getPrintJobTitle",function(a){var b=null;1==this.nSpectra?b=this.getSpectrum().getTitle():null!=this.viewTitle?(1==this.graphSets.size()&&
(b=this.currentGraphSet.getTitle(a)),null==b&&(b=this.viewTitle)):b=this.jsvp.getTitle().trim();0<=b.indexOf("\n")?b=b.substring(0,b.indexOf("\n")).trim():b.startsWith("$")&&(b=b.substring(1));return b},"~B");c(c$,"linkSpectra",function(a){a===JSV.common.PanelData.LinkMode.ALL&&(a=2==this.nSpectra?JSV.common.PanelData.LinkMode.AB:3==this.nSpectra?JSV.common.PanelData.LinkMode.ABC:JSV.common.PanelData.LinkMode.NONE);a!==JSV.common.PanelData.LinkMode.NONE&&a.toString().length!=this.nSpectra||this.setGraphSets(a)},
"JSV.common.PanelData.LinkMode");c(c$,"doZoomLinked",function(a,b,c,e,f,h){if(!this.linking){this.linking=!0;for(var m=a.getSpectrumAt(0),j=this.graphSets.size();0<=--j;){var l=this.graphSets.get(j);l!==a&&JSV.common.Spectrum.areXScalesCompatible(m,this.graphSets.get(j).getSpectrumAt(0),!1,!0)&&l.doZoom(b,0,c,0,h,!1,f,!1,e)}this.linking=!1}},"JSV.common.GraphSet,~N,~N,~B,~B,~B");c(c$,"clearLinkViews",function(a){if(!this.linking){this.linking=!0;for(var b=a.getSpectrum(),c=this.graphSets.size();0<=
--c;){var e=this.graphSets.get(c);e!==a&&JSV.common.Spectrum.areXScalesCompatible(b,this.graphSets.get(c).getSpectrum(),!1,!0)&&e.clearViews()}this.linking=!1}},"JSV.common.GraphSet");c(c$,"setlinkedXMove",function(a,b,c){if(!this.linking){this.linking=!0;for(var e=a.getSpectrum(),f=this.graphSets.size();0<=--f;){var h=this.graphSets.get(f);h!==a&&JSV.common.Spectrum.areXScalesCompatible(e,this.graphSets.get(f).getSpectrum(),!1,!0)&&null==h.imageView&&(c?h.setXPixelMovedTo(1.7976931348623157E308,
b,0,0):h.setXPixelMovedTo(b,1.7976931348623157E308,0,0))}this.linking=!1}},"JSV.common.GraphSet,~N,~B");c(c$,"set2DCrossHairsLinked",function(a,b,c,e){for(var f=this.graphSets.size();0<=--f;){var h=this.graphSets.get(f);h!==a&&h.set2DXY(b,c,e)}},"JSV.common.GraphSet,~N,~N,~B");c(c$,"dialogsToFront",function(a){this.currentGraphSet.dialogsToFront(a)},"JSV.common.Spectrum");c(c$,"setColor",function(a,b){null!=b&&this.options.put(a,JU.CU.toRGBHexString(b));switch(a){case JSV.common.ScriptToken.BACKGROUNDCOLOR:this.jsvp.setBackgroundColor(this.bgcolor=
b);this.taintedAll=!0;break;case JSV.common.ScriptToken.COORDINATESCOLOR:this.coordinatesColor=b;break;case JSV.common.ScriptToken.GRIDCOLOR:this.gridColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:this.highlightColor=b;255==this.highlightColor.getOpacity255()&&this.highlightColor.setOpacity255(150);break;case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:this.integralPlotColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.PEAKTABCOLOR:this.peakTabColor=b;this.taintedAll=
!0;break;case JSV.common.ScriptToken.PLOTCOLOR:for(var c=this.graphSets.size();0<=--c;)this.graphSets.get(c).setPlotColor0(b);this.taintedAll=!0;break;case JSV.common.ScriptToken.PLOTAREACOLOR:this.plotAreaColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.SCALECOLOR:this.scaleColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.TITLECOLOR:this.titleColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.UNITSCOLOR:this.unitsColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.ZOOMBOXCOLOR:this.zoomBoxColor=
b;break;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:this.zoomBoxColor2=b;break;default:JU.Logger.warn("AwtPanel --- unrecognized color: "+a)}},"JSV.common.ScriptToken,javajs.api.GenericColor");c(c$,"getColor",function(a){switch(a){default:return JU.Logger.error("awtgraphset missing color "+a),this.BLACK;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:return this.zoomBoxColor2;case JSV.common.ScriptToken.ZOOMBOXCOLOR:return this.zoomBoxColor;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:return this.highlightColor;
case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:return this.integralPlotColor;case JSV.common.ScriptToken.GRIDCOLOR:return this.gridColor;case JSV.common.ScriptToken.PEAKTABCOLOR:return this.peakTabColor;case JSV.common.ScriptToken.PLOTAREACOLOR:return this.plotAreaColor;case JSV.common.ScriptToken.SCALECOLOR:return this.scaleColor;case JSV.common.ScriptToken.TITLECOLOR:return this.titleColor;case JSV.common.ScriptToken.UNITSCOLOR:return this.unitsColor}},"JSV.common.ScriptToken");c(c$,"getOverlayLegendData",
function(){for(var a=this.currentGraphSet.nSpectra,b=Array(a),c=this.getSpectrumAt(0).getFilePath(),e=this.getSpectrumAt(a-1).getFilePath(),c=!c.equals(e),e=0;e<a;e++){var f=Array(3),h=this.getSpectrumAt(e);this.title=h.getTitle();c&&(this.title=JSV.common.JSVFileManager.getTagName(h.getFilePath())+" - "+this.title);h=this.getCurrentPlotColor(e);f[0]=new Integer(e+1);f[1]=h;f[2]=" "+this.title;b[e]=f}return b});c(c$,"setColorOrFont",function(a,b){if(null==b){for(var c,e=a.elementColors.entrySet().iterator();e.hasNext()&&
((c=e.next())||1);)this.setColorOrFont(a,c.getKey());this.setColorOrFont(a,JSV.common.ScriptToken.DISPLAYFONTNAME);this.setColorOrFont(a,JSV.common.ScriptToken.TITLEFONTNAME)}else{switch(b){case JSV.common.ScriptToken.DISPLAYFONTNAME:this.setFontName(b,a.displayFontName);return;case JSV.common.ScriptToken.TITLEFONTNAME:this.setFontName(b,a.titleFontName);return}this.setColor(b,a.getElementColor(b))}},"JSV.common.ColorParameters,JSV.common.ScriptToken");c(c$,"getCurrentPlotColor",function(a){return this.currentGraphSet.getPlotColor(a)},
"~N");c(c$,"setPrint",function(a,b){null==a?(this.options.putAll(this.optionsSaved),this.optionsSaved=null):(this.printJobTitle=a.title,this.printingFontName=b,this.printGraphPosition=a.position,this.optionsSaved=new java.util.Hashtable,this.optionsSaved.putAll(this.options),this.gridOn=a.showGrid,this.titleOn=a.showTitle,this.setBoolean(JSV.common.ScriptToken.XSCALEON,a.showXScale),this.setBoolean(JSV.common.ScriptToken.XUNITSON,a.showXScale),this.setBoolean(JSV.common.ScriptToken.YSCALEON,a.showYScale),
this.setBoolean(JSV.common.ScriptToken.YUNITSON,a.showYScale))},"JSV.common.PrintLayout,~S");c(c$,"showDialog",function(a){var b=this.getDialog(a);this.closeAllDialogsExcept(a);if(null!=b&&w(b,JSV.dialog.JSVDialog))return b.reEnable();var c=this.getCurrentSpectrumIndex();if(0>c)return this.jsvp.showMessage("To enable "+a+" first select a spectrum by clicking on it.",""+a),null;var e=this.getSpectrum(),f=this.vwr.getDialog(a,e);null==b&&a===JSV.common.Annotation.AType.Measurements&&(b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,
e));null!=b&&f.setData(b);this.addDialog(c,a,f);f.reEnable();return f},"JSV.common.Annotation.AType");c(c$,"printPdf",function(a,b){var c=!b.layout.equals("landscape");this.print(a,c?b.imageableHeight:b.imageableWidth,c?b.imageableWidth:b.imageableHeight,b.imageableX,b.imageableY,b.paperHeight,b.paperWidth,c,0)},"J.api.GenericGraphics,JSV.common.PrintLayout");c(c$,"print",function(a,b,c,e,f,h,m,j,l){this.g2d=this.g2d0;if(0==l)return this.isPrinting=!0,l=!1,w(a,J.api.GenericGraphics)&&(this.g2d=a,
a=this.gMain),this.printGraphPosition.equals("default")?j?(b=450,c=280):(b=280,c=450):this.printGraphPosition.equals("fit to page")?l=!0:j?(b=450,c=280,e=v(v(m-c)/2),f=v(v(h-b)/2)):(b=280,c=450,f=v(v(m-280)/2),e=v(v(h-450)/2)),this.g2d.translateScale(a,e,f,0.1),this.taintedAll=!0,this.drawGraph(a,a,a,v(c),v(b),l),this.isPrinting=!1,0;this.isPrinting=!1;return 1},"~O,~N,~N,~N,~N,~N,~N,~B,~N");e(c$,"keyPressed",function(a,b){if(this.isPrinting)return!1;this.checkKeyControl(a,!0);switch(a){case 27:case 127:case 8:return this.escapeKeyPressed(27!=
a),this.isIntegralDrag=!1,this.repaint(),!0}var c=0,e=!1;if(0==b)switch(a){case 37:case 39:this.doMouseMoved(39==a?++this.mouseX:--this.mouseX,this.mouseY);this.repaint();e=!0;break;case 33:case 34:c=33==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;e=!0;break;case 40:case 38:e=40==a?-1:1,null==this.getSpectrumAt(0).getSubSpectra()?this.notifySubSpectrumChange(e,null):(this.advanceSubSpectrum(e),this.repaint()),e=!0}else if(this.checkMod(a,2))switch(a){case 40:case 38:case 45:case 61:c=61==
a||38==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;e=!0;break;case 37:case 39:this.toPeak(39==a?1:-1),e=!0}0!=c&&(this.scaleYBy(c),this.repaint());return e},"~N,~N");e(c$,"keyReleased",function(a){this.isPrinting||this.checkKeyControl(a,!1)},"~N");e(c$,"keyTyped",function(a,b){if(this.isPrinting)return!1;switch(a){case "n":if(0!=b)break;this.normalizeIntegral();return!0;case 26:if(2!=b)break;this.previousView();this.repaint();return!0;case 25:if(2!=b)break;this.nextView();this.repaint();return!0}return!1},
"~N,~N");e(c$,"mouseAction",function(a,b,c,e,f,h){if(!this.isPrinting)switch(a){case 4:if(!this.checkMod(h,16))break;this.doMousePressed(c,e);break;case 5:this.doMouseReleased(c,e,this.checkMod(h,16));this.repaint();break;case 1:this.doMouseDragged(c,e);this.repaint();break;case 0:this.jsvp.getFocusNow(!1);if(0!=(h&28)){this.doMouseDragged(c,e);this.repaint();break}this.doMouseMoved(c,e);null!=this.coordStr&&this.repaint();break;case 2:if(this.checkMod(h,4)){this.jsvp.showMenu(c,e);break}this.ctrlPressed=
!1;this.doMouseClicked(c,e,this.updateControlPressed(h))}},"~N,~N,~N,~N,~N,~N");c(c$,"checkMod",function(a,b){return(a&b)==b},"~N,~N");c(c$,"checkKeyControl",function(a,b){switch(a){case 17:case 157:this.ctrlPressed=b;break;case 16:this.shiftPressed=b}},"~N,~B");c(c$,"updateControlPressed",function(a){return this.ctrlPressed=(new Boolean(this.ctrlPressed|(this.checkMod(a,2)||this.checkMod(a,20)))).valueOf()},"~N");e(c$,"mouseEnterExit",function(a,b,c,e){if(e)this.thisWidget=null,this.isIntegralDrag=
!1,this.integralShiftMode=0;else try{this.jsvp.getFocusNow(!1)}catch(f){if(y(f,Exception))System.out.println("pd "+this+" cannot focus");else throw f;}},"~N,~N,~N,~B");c(c$,"setSolutionColor",function(a){var b=0<=a.indexOf("none"),c=0>a.indexOf("false");if(0>a.indexOf("all"))b=b?-1:this.vwr.getSolutionColor(c),this.getSpectrum().setFillColor(-1==b?null:this.vwr.parameters.getColor1(b));else{a=JSV.common.JSViewer.getInterface("JSV.common.Visible");for(var e=this.graphSets.size();0<=--e;)this.graphSets.get(e).setSolutionColor(a,
b,c)}},"~S");c(c$,"setIRMode",function(a,b){for(var c=this.graphSets.size();0<=--c;)this.graphSets.get(c).setIRMode(a,b)},"JSV.common.Spectrum.IRMode,~S");A(self.c$);c$=t(JSV.common.PanelData,"LinkMode",Enum);c$.getMode=c(c$,"getMode",function(a){if(a.equals("*"))return JSV.common.PanelData.LinkMode.ALL;for(var b,c=0,e=JSV.common.PanelData.LinkMode.values();c<e.length&&((b=e[c])||1);c++)if(b.name().equalsIgnoreCase(a))return b;return JSV.common.PanelData.LinkMode.NONE},"~S");s(c$,"ALL",0,[]);s(c$,
"NONE",1,[]);s(c$,"AB",2,[]);s(c$,"ABC",3,[]);c$=z();A(self.c$);c$=t(JSV.common.PanelData,"Mouse",Enum);s(c$,"UP",0,[]);s(c$,"DOWN",1,[]);c$=z();C(c$,"defaultPrintHeight",450,"defaultPrintWidth",280,"topMargin",40,"bottomMargin",50,"leftMargin",60,"rightMargin",50)}),q("JSV.common"),r(null,"JSV.common.PanelNode",["JU.SB","JSV.common.Parameters"],function(){c$=k(function(){this.legend=this.id=this.jsvp=this.fileName=this.source=this.treeNode=null;this.isSimulation=this.isView=this.isSelected=!1;this.frameTitle=
null;n(this,arguments)},JSV.common,"PanelNode");p(c$,function(a,b,c,e){this.id=a;this.source=c;this.fileName=b;this.isSimulation=0<=c.getFilePath().indexOf("http://SIMULATION/");this.jsvp=e;null!=e&&(this.pd().getSpectrumAt(0).setId(a),this.frameTitle=e.getTitle())},"~S,~S,JSV.source.JDXSource,JSV.api.JSVPanel");c(c$,"setTreeNode",function(a){this.treeNode=a},"JSV.api.JSVTreeNode");c(c$,"getTreeNode",function(){return this.treeNode});c(c$,"dispose",function(){this.source.dispose();null!=this.jsvp&&
this.jsvp.dispose();this.legend=this.jsvp=this.source=null});c(c$,"pd",function(){return this.jsvp.getPanelData()});c(c$,"getSpectrum",function(){return this.pd().getSpectrum()});c(c$,"setLegend",function(a){null!=this.legend&&this.legend.dispose();return this.legend=a},"JSV.dialog.JSVDialog");e(c$,"toString",function(){return(null==this.id?"":this.id+": ")+(null==this.frameTitle?this.fileName:this.frameTitle)});c$.findSourceByNameOrId=c(c$,"findSourceByNameOrId",function(a,b){for(var c=b.size();0<=
--c;){var e=b.get(c);if(a.equals(e.id)||a.equalsIgnoreCase(e.source.getFilePath()))return e.source}for(c=b.size();0<=--c;)if(e=b.get(c),a.equals(e.fileName))return e.source;return null},"~S,JU.Lst");c$.findNodeById=c(c$,"findNodeById",function(a,b){if(null!=a)for(var c=b.size();0<=--c;)if(a.equals(b.get(c).id)||a.equals(b.get(c).frameTitle))return b.get(c);return null},"~S,JU.Lst");c$.findNode=c(c$,"findNode",function(a,b){for(var c=b.size();0<=--c;)if(b.get(c).jsvp===a)return b.get(c);return null},
"JSV.api.JSVPanel,JU.Lst");c$.getSpectrumListAsString=c(c$,"getSpectrumListAsString",function(a){for(var b=new JU.SB,c=0;c<a.size();c++){var e=a.get(c);e.isView||b.append(" ").append(e.id)}return b.toString().trim()},"JU.Lst");c$.isOpen=c(c$,"isOpen",function(a,b){if(null!=b)for(var c=a.size();0<=--c&&!b.equals(a.get(c).source.getFilePath())&&!b.equals(a.get(c).frameTitle););return-1},"JU.Lst,~S");c(c$,"setFrameTitle",function(a){this.frameTitle=a},"~S");c$.getLastFileFirstNode=c(c$,"getLastFileFirstNode",
function(a){for(var b=a.size(),c=0==b?null:a.get(b-1),b=b-1;0<=--b&&a.get(b).source===c.source;)c=a.get(b);return null==c?null:c.jsvp},"JU.Lst");c(c$,"getInfo",function(a){var b=this.pd().getInfo(!1,a);JSV.common.Parameters.putInfo(a,b,"panelId",this.id);JSV.common.Parameters.putInfo(a,b,"panelFileName",this.fileName);JSV.common.Parameters.putInfo(a,b,"panelSource",this.source.getFilePath());return b},"~S")}),q("JSV.common"),r(null,"JSV.common.Parameters",["java.lang.Boolean","java.util.Hashtable",
"JSV.common.ScriptToken"],function(){c$=k(function(){this.name=null;this.integralMinY=0.1;this.integralRange=50;this.integralOffset=30;this.integralDrawAll=!1;this.viewOffset=0;this.peakListThreshold=NaN;this.peakListInterpolation="parabolic";this.precision=2;this.htBooleans=null;n(this,arguments)},JSV.common,"Parameters");p(c$,function(){this.htBooleans=new java.util.Hashtable;this.setBoolean(JSV.common.ScriptToken.TITLEON,!0);this.setBoolean(JSV.common.ScriptToken.ENABLEZOOM,!0);this.setBoolean(JSV.common.ScriptToken.DISPLAY2D,
!0);this.setBoolean(JSV.common.ScriptToken.COORDINATESON,!0);this.setBoolean(JSV.common.ScriptToken.GRIDON,!0);this.setBoolean(JSV.common.ScriptToken.XSCALEON,!0);this.setBoolean(JSV.common.ScriptToken.YSCALEON,!0);this.setBoolean(JSV.common.ScriptToken.XUNITSON,!0);this.setBoolean(JSV.common.ScriptToken.YUNITSON,!0)});c(c$,"setName",function(a){this.name=a;return this},"~S");c(c$,"getBooleans",function(){return this.htBooleans});c(c$,"setBoolean",function(a,b){this.htBooleans.put(a,Boolean.$valueOf(b));
return b},"JSV.common.ScriptToken,~B");c(c$,"getBoolean",function(a){return Boolean.TRUE===this.htBooleans.get(a)},"JSV.common.ScriptToken");c$.isTrue=c(c$,"isTrue",function(a){return 0==a.length||Boolean.parseBoolean(a)},"~S");c$.getTFToggle=c(c$,"getTFToggle",function(a){return a.equalsIgnoreCase("TOGGLE")?null:JSV.common.Parameters.isTrue(a)?Boolean.TRUE:Boolean.FALSE},"~S");c(c$,"setP",function(a,b,c){switch(b){default:return;case JSV.common.ScriptToken.COORDINATESON:case JSV.common.ScriptToken.DISPLAY1D:case JSV.common.ScriptToken.DISPLAY2D:case JSV.common.ScriptToken.ENABLEZOOM:case JSV.common.ScriptToken.GRIDON:case JSV.common.ScriptToken.REVERSEPLOT:case JSV.common.ScriptToken.TITLEON:case JSV.common.ScriptToken.TITLEBOLDON:case JSV.common.ScriptToken.XSCALEON:case JSV.common.ScriptToken.XUNITSON:case JSV.common.ScriptToken.YSCALEON:case JSV.common.ScriptToken.YUNITSON:c=
JSV.common.Parameters.getTFToggle(c);if(null!=c){this.setBoolean(b,c.booleanValue());break}if(null==a)return;c=!a.getBoolean(b);switch(b){case JSV.common.ScriptToken.XSCALEON:this.setBoolean(JSV.common.ScriptToken.XUNITSON,c);a.setBoolean(JSV.common.ScriptToken.XUNITSON,c);break;case JSV.common.ScriptToken.YSCALEON:this.setBoolean(JSV.common.ScriptToken.YUNITSON,c),a.setBoolean(JSV.common.ScriptToken.YUNITSON,c)}this.setBoolean(b,c)}null!=a&&a.setBooleans(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");
c$.isMatch=c(c$,"isMatch",function(a,b){return null==a||b.equalsIgnoreCase(a)},"~S,~S");c$.putInfo=c(c$,"putInfo",function(a,b,c,e){null!=e&&JSV.common.Parameters.isMatch(a,c)&&b.put(null==a?c:a,e)},"~S,java.util.Map,~S,~O")}),q("JSV.common"),r(["JSV.common.MeasurementData"],"JSV.common.PeakData",["java.lang.Double","JU.DF","JSV.common.Coordinate","$.PeakPick"],function(){c$=k(function(){this.maxY=this.minY=this.thresh=0;n(this,arguments)},JSV.common,"PeakData",JSV.common.MeasurementData);c(c$,"getThresh",
function(){return this.thresh});e(c$,"getDataHeader",function(){return this.spec.isHNMR()?JSV.common.PeakData.HNMR_HEADER:["peak",this.spec.getXUnits(),this.spec.getYUnits()]});e(c$,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=[-1E100,1E100,1E100],c,e=0,f=this.size();0<=--f;e++)c=this.spec.getPeakListArray(this.get(f),b,this.maxY),a[e]=2==c.length?[""+(e+1),JU.DF.formatDecimalDbl(c[0],2),JU.DF.formatDecimalDbl(c[1],4)]:[""+(e+1),JU.DF.formatDecimalDbl(c[0],4),JU.DF.formatDecimalDbl(c[1],
4),JU.DF.formatDecimalDbl(c[2],2),0==c[3]?"":JU.DF.formatDecimalDbl(c[3],2),0==c[4]?"":JU.DF.formatDecimalDbl(c[4],2),0==c[5]?"":JU.DF.formatDecimalDbl(c[5],2)];return a},"~S");e(c$,"getMeasurementListArrayReal",function(){for(var a=Y(this.size(),0),b=[-1E100,1E100,1E100],c=0,e=this.size();0<=--e;c++)a[c]=this.spec.getPeakListArray(this.get(e),b,this.maxY);return a},"~S");c(c$,"getInfo",function(a){a.put("interpolation",this.myParams.peakListInterpolation);a.put("threshold",Double.$valueOf(this.myParams.peakListThreshold));
L(this,JSV.common.PeakData,"getInfo",[a])},"java.util.Map");c(c$,"setPeakList",function(a,b,c){this.precision=-2147483648==b?this.spec.getDefaultUnitPrecision():b;var e=this.spec.getXYCoords();if(!(3>e.length)){this.clear();null!=a&&(this.myParams.peakListInterpolation=a.peakListInterpolation,this.myParams.peakListThreshold=a.peakListThreshold);a=this.myParams.peakListInterpolation.equals("parabolic");var f=this.spec.isInverted();this.minY=c.minYOnScale;this.maxY=c.maxYOnScale;var h=c.minXOnScale;
c=c.maxXOnScale;this.thresh=this.myParams.peakListThreshold;Double.isNaN(this.thresh)&&(this.thresh=this.myParams.peakListThreshold=(this.minY+this.maxY)/2);var m=0,j=[e[0].getYVal(),m=e[1].getYVal(),0],l=0;if(f)for(f=2;f<e.length;f++){var k=j[f%3]=e[f].getYVal();if(m<this.thresh&&(j[(f-2)%3]>m&&m<k)&&(m=a?JSV.common.Coordinate.parabolicInterpolation(e,f-1):e[f-1].getXVal(),m>=h||m<=c))if(m=(new JSV.common.PeakPick).setValue(m,k,this.spec,null,0),this.addLast(m),100==++l)break;m=k}else for(f=2;f<
e.length;f++){k=j[f%3]=e[f].getYVal();if(m>this.thresh&&(j[(f-2)%3]<m&&m>k)&&(m=a?JSV.common.Coordinate.parabolicInterpolation(e,f-1):e[f-1].getXVal(),m>=h&&m<=c&&(m=(new JSV.common.PeakPick).setValue(m,k,this.spec,JU.DF.formatDecimalDbl(m,b),m),this.addLast(m),100==++l)))break;m=k}}},"JSV.common.Parameters,~N,JSV.common.ScaleData");c$.HNMR_HEADER=c$.prototype.HNMR_HEADER="peak shift/ppm intens shift/hz diff/hz 2-diff 3-diff".split(" ")}),q("JSV.common"),r(null,"JSV.common.PeakInfo",["JU.PT"],function(){c$=
k(function(){this.px1=this.px0=this.yMax=this.yMin=this.xMax=this.xMin=0;this.atomKey=this._match=this.spectrum=this.id=this.atoms=this.model=this.title=this.filePathForwardSlash=this.file=this.index=this.type2=this.type=this.stringInfo=null;n(this,arguments)},JSV.common,"PeakInfo");p(c$,function(){});p(c$,function(a){this.stringInfo=a;this.type=JU.PT.getQuotedAttribute(a,"type");null==this.type&&(this.type="");this.type=this.type.toUpperCase();var b=this.type.indexOf("/");this.type2=0>b?"":JSV.common.PeakInfo.fixType(this.type.substring(this.type.indexOf("/")+
1));this.type=0<=b?JSV.common.PeakInfo.fixType(this.type.substring(0,b))+"/"+this.type2:JSV.common.PeakInfo.fixType(this.type);this.id=JU.PT.getQuotedAttribute(a,"id");this.index=JU.PT.getQuotedAttribute(a,"index");this.file=JU.PT.getQuotedAttribute(a,"file");System.out.println("pi file="+this.file);this.filePathForwardSlash=null==this.file?null:this.file.$replace("\\","/");this.model=JU.PT.getQuotedAttribute(a,"model");a.contains('baseModel=""')||(this.atoms=JU.PT.getQuotedAttribute(a,"atoms"));
this.atomKey=","+this.atoms+",";this.title=JU.PT.getQuotedAttribute(a,"title");this._match=JU.PT.getQuotedAttribute(a,"_match");this.xMax=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"xMax"));this.xMin=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"xMin"));this.yMax=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"yMax"));this.yMin=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"yMin"))},"~S");c(c$,"isClearAll",function(){return null==this.spectrum});c(c$,"getType",function(){return this.type});c(c$,"getAtoms",
function(){return this.atoms});c(c$,"getXMax",function(){return this.xMax});c(c$,"getXMin",function(){return this.xMin});c(c$,"getYMin",function(){return this.yMin});c(c$,"getYMax",function(){return this.yMax});c(c$,"getX",function(){return(this.xMax+this.xMin)/2});c(c$,"getMatch",function(){return this._match});c$.fixType=c(c$,"fixType",function(a){return a.equals("HNMR")?"1HNMR":a.equals("CNMR")?"13CNMR":a},"~S");e(c$,"toString",function(){return this.stringInfo});c(c$,"getIndex",function(){return this.index});
c(c$,"getTitle",function(){return this.title});c(c$,"checkFileIndex",function(a,b,c){return null!=c?0<=this.atomKey.indexOf(c):b.equals(this.index)&&(a.equals(this.file)||a.equals(this.filePathForwardSlash))},"~S,~S,~S");c(c$,"checkFileTypeModel",function(a,b,c){return a.equals(this.file)&&this.checkModel(c)&&this.type.endsWith(b)},"~S,~S,~S");c(c$,"checkTypeModel",function(a,b){return this.checkType(a)&&this.checkModel(b)},"~S,~S");c(c$,"checkModel",function(a){return null!=a&&a.equals(this.model)},
"~S");c(c$,"checkType",function(a){return a.endsWith(this.type)},"~S");c(c$,"checkTypeMatch",function(a){return this.checkType(a.type)&&(this.checkId(a._match)||this.checkModel(a._match)||0<=this.title.toUpperCase().indexOf(a._match))},"JSV.common.PeakInfo");c(c$,"checkId",function(a){return null!=this.id&&null!=a&&a.toUpperCase().startsWith("ID=")&&((a=a.substring(3)).equals(this.id)||a.startsWith("#")&&a.equals("#"+this.index))},"~S");c(c$,"getModel",function(){return this.model});c(c$,"getFilePath",
function(){return this.file});c(c$,"autoSelectOnLoad",function(){return this.type.startsWith("GC")});c(c$,"setPixelRange",function(a,b){this.px0=a;this.px1=b},"~N,~N");c(c$,"checkRange",function(a,b){return(2147483647!=a?this.px0<=a&&this.px1>=a:b>=this.xMin&&b<=this.xMax)?Math.abs(b-this.getX()):1E100},"~N,~N");c(c$,"getXPixel",function(){return v((this.px0+this.px1)/2)});c$.nullPeakInfo=c$.prototype.nullPeakInfo=new JSV.common.PeakInfo}),q("JSV.common"),r(["JSV.common.Measurement"],"JSV.common.PeakPick",
null,function(){c$=t(JSV.common,"PeakPick",JSV.common.Measurement);c(c$,"setValue",function(a,b,c,e,f){null==e?(this.set(a,b),this.setPt2(c,!1)):(this.setA(a,b,c,e,!1,!1,0,6),this.value=f,this.setPt2(this.getXVal(),this.getYVal()));return this},"~N,~N,JSV.common.Spectrum,~S,~N")}),q("JSV.common"),r(["java.util.EventObject"],"JSV.common.PeakPickEvent",null,function(){c$=k(function(){this.peakInfo=this.coord=null;n(this,arguments)},JSV.common,"PeakPickEvent",java.util.EventObject);p(c$,function(a,b,
c){x(this,JSV.common.PeakPickEvent,[a]);this.coord=b;this.peakInfo=null==c?null:c},"~O,JSV.common.Coordinate,JSV.common.PeakInfo");c(c$,"getCoord",function(){return this.coord});c(c$,"getPeakInfo",function(){return this.peakInfo});e(c$,"toString",function(){return null==this.peakInfo?null:this.peakInfo.toString()})}),q("JSV.common"),r(["JSV.common.Coordinate","$.ScriptToken"],"JSV.common.PlotWidget",null,function(){c$=k(function(){this.yPixel1=this.xPixel1=this.yPixel0=this.xPixel0=0;this.is2Donly=
this.is2D=this.isXtype=this.isPinOrCursor=this.isPin=!1;this.isEnabled=!0;this.isVisible=!1;this.color=this.name=null;n(this,arguments)},JSV.common,"PlotWidget",JSV.common.Coordinate);F(c$,function(){this.color=JSV.common.ScriptToken.PLOTCOLOR});e(c$,"toString",function(){return this.name+(!this.isPinOrCursor?""+this.xPixel0+" "+this.yPixel0+" / "+this.xPixel1+" "+this.yPixel1:" x="+this.getXVal()+"/"+this.xPixel0+" y="+this.getYVal()+"/"+this.yPixel0)});p(c$,function(a){x(this,JSV.common.PlotWidget,
[]);this.name=a;this.isPin="p"==a.charAt(0);this.isPinOrCursor="z"!=a.charAt(0);this.isXtype=0<=a.indexOf("x");this.is2Donly=(this.is2D=0<=a.indexOf("2D"))&&"p"==a.charAt(0)},"~S");c(c$,"selected",function(a,b){return this.isVisible&&5>Math.abs(a-this.xPixel0)&&5>Math.abs(b-this.yPixel0)},"~N,~N");c(c$,"setX",function(a,b){this.setXVal(a);this.xPixel0=this.xPixel1=b},"~N,~N");c(c$,"setY",function(a,b){this.setYVal(a);this.yPixel0=this.yPixel1=b},"~N,~N");c(c$,"getValue",function(){return this.isXtype?
this.getXVal():this.getYVal()});c(c$,"setEnabled",function(a){this.isEnabled=a},"~B")}),q("JSV.common"),c$=k(function(){this.imageableWidth=this.imageableHeight=this.paperWidth=this.paperHeight=this.imageableY=this.imageableX=0;this.layout="landscape";this.position="fit to page";this.showTitle=this.showYScale=this.showXScale=this.showGrid=!0;this.font="Helvetica";this.paper=null;this.asPDF=!0;this.date=this.title=null;n(this,arguments)},JSV.common,"PrintLayout"),F(c$,function(){this.paperHeight=G(72*
Math.min(11,11.69));this.paperWidth=G(72*Math.min(8.5,8.27));this.imageableHeight=this.paperHeight;this.imageableWidth=this.paperWidth}),q("JSV.common"),c$=k(function(){this.repaintPending=!1;this.vwr=null;n(this,arguments)},JSV.common,"RepaintManager"),p(c$,function(a){this.vwr=a},"JSV.common.JSViewer"),c(c$,"refresh",function(){if(this.repaintPending)return!1;this.repaintPending=!0;this.vwr.pd().taintedAll=!0;var a=this.vwr.html5Applet;"undefined"!=typeof Jmol&&(Jmol._repaint&&a)&&Jmol._repaint(a,
!1);this.repaintDone();return!0}),c(c$,"repaintDone",function(){this.repaintPending=!1;this.notify()}),q("JSV.common"),r(null,"JSV.common.ScaleData",["java.lang.Double","JSV.common.Coordinate"],function(){c$=k(function(){this.maxX=this.minX=this.pointCount=this.endDataPointIndex=this.startDataPointIndex=this.initMaxY=this.initMinY=this.initMaxYOnScale=this.initMinYOnScale=0;this.firstX=NaN;this.specShift=this.maxXOnScale=this.minXOnScale=0;this.minorTickCounts=this.steps=this.exportPrecision=this.precision=
null;this.maxY=this.minY=this.maxYOnScale=this.minYOnScale=0;this.isShiftZoomedY=!1;this.spectrumScaleFactor=1;this.spectrumYRef=0;this.userYFactor=1;this.yFactorForScale=this.xFactorForScale=this.maxY2D=this.minY2D=this.firstY=0;n(this,arguments)},JSV.common,"ScaleData");F(c$,function(){this.precision=E(2,0);this.exportPrecision=E(2,0);this.steps=Y(2,0);this.minorTickCounts=E(2,0)});p(c$,function(){});p(c$,function(a,b){this.startDataPointIndex=a;this.endDataPointIndex=b;this.pointCount=this.endDataPointIndex-
this.startDataPointIndex+1},"~N,~N");p(c$,function(a,b,c,e,f){this.minX=JSV.common.Coordinate.getMinX(a,b,c);this.maxX=JSV.common.Coordinate.getMaxX(a,b,c);this.minY=JSV.common.Coordinate.getMinY(a,b,c);0<this.minY&&!e&&(this.minY=0);this.maxY=JSV.common.Coordinate.getMaxY(a,b,c);this.setScale(e,f)},"~A,~N,~N,~B,~B");c(c$,"setScale",function(a,b){this.setXScale();a||(this.maxXOnScale+=this.steps[0]/2);this.setYScale(this.minY,this.maxY,!0,b)},"~B,~B");c(c$,"setXScale",function(){var a=this.setScaleParams(this.minX,
this.maxX,0);this.firstX=Math.floor(this.minX/a)*a;1E-4<Math.abs((this.minX-this.firstX)/a)&&(this.firstX+=a);this.minXOnScale=this.minX;this.maxXOnScale=this.maxX});c(c$,"isYZeroOnScale",function(){return this.minYOnScale<this.spectrumYRef&&this.maxYOnScale>this.spectrumYRef});c(c$,"setYScale",function(a,b,c,e){0==a&&0==b&&(b=1);this.isShiftZoomedY&&(a=this.minYOnScale,b=this.maxYOnScale);var f=this.setScaleParams(a,b,1),h=e?f/2:f/4;e=e?f/4:f/2;this.isShiftZoomedY||(this.minYOnScale=0==a?0:c?h*Math.floor(a/
h):a,this.maxYOnScale=c?e*Math.ceil(1.05*b/e):b);this.firstY=0==a?0:Math.floor(a/h)*h;if(0>this.minYOnScale&&0<this.maxYOnScale)for(this.firstY=0;this.firstY-f>this.minYOnScale;)this.firstY-=f;else 0!=this.minYOnScale&&1E-4<Math.abs((a-this.firstY)/h)&&(this.firstY+=h);c&&(this.initMinYOnScale=this.minYOnScale,this.initMaxYOnScale=this.maxYOnScale,this.initMinY=a,this.initMaxY=b)},"~N,~N,~B,~B");c(c$,"scale2D",function(a){var b=this.maxY-this.minY;1==a?(this.maxY=this.initMaxY,this.minY=this.initMinY):
this.maxY=this.minY+b/a},"~N");c(c$,"setXRange",function(a,b){this.minX=a;this.maxX=b;this.setXScale()},"~N,~N");c$.getXRange=c(c$,"getXRange",function(a,b,c,e,f,h,m,j){for(var l=0,k=0,l=f;l<=h;l++)if(f=b[l].getXVal(),f>=c){m[a]=l;break}for(;l<=h&&!(f=b[l].getXVal(),k++,f>=e);l++);j[a]=l-1;return k},"~N,~A,~N,~N,~N,~N,~A,~A");c(c$,"setScaleParams",function(a,b,c){a=b==a?1:Math.abs(b-a)/14;var e=Math.log10(Math.abs(a));b=v(Math.floor(e));this.exportPrecision[c]=b;this.precision[c]=0>=b?Math.min(8,
1-b):3<b?-2:0;a=0;for(e=Math.pow(10,e-b);e>JSV.common.ScaleData.NTICKS[a];)a++;this.steps[c]=Math.pow(10,b)*JSV.common.ScaleData.NTICKS[a];e=Math.log10(Math.abs(100010*this.steps[c]));b=e-Math.floor(e);for(a=e=0;a<JSV.common.ScaleData.NTICKS.length;a++)if(0.001>Math.abs(b-JSV.common.ScaleData.LOGTICKS[a])){e=JSV.common.ScaleData.NTICKS[a];break}this.minorTickCounts[c]=e;return this.steps[c]},"~N,~N,~N");c(c$,"isInRangeX",function(a){return a>=this.minX&&a<=this.maxX},"~N");c(c$,"addSpecShift",function(a){this.specShift+=
a;this.minX+=a;this.maxX+=a;this.minXOnScale+=a;this.maxXOnScale+=a;this.firstX+=a},"~N");c(c$,"getInfo",function(a){a.put("specShift",Double.$valueOf(this.specShift));a.put("minX",Double.$valueOf(this.minX));a.put("maxX",Double.$valueOf(this.maxX));a.put("minXOnScale",Double.$valueOf(this.minXOnScale));a.put("maxXOnScale",Double.$valueOf(this.maxXOnScale));a.put("minY",Double.$valueOf(this.minY));a.put("maxY",Double.$valueOf(this.maxY));a.put("minYOnScale",Double.$valueOf(this.minYOnScale));a.put("maxYOnScale",
Double.$valueOf(this.maxYOnScale));a.put("minorTickCountX",Integer.$valueOf(this.minorTickCounts[0]));a.put("xStep",Double.$valueOf(this.steps[0]));return a},"java.util.Map");c(c$,"setMinMax",function(a,b,c,e){this.minX=a;this.maxX=b;this.minY=c;this.maxY=e},"~N,~N,~N,~N");c(c$,"toX",function(a,b,c){return this.toXScaled(a,b,c,this.xFactorForScale)},"~N,~N,~B");c(c$,"toX0",function(a,b,c,e){return this.toXScaled(a,c,e,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(c$,"toXScaled",function(a,
b,c,e){return c?this.maxXOnScale-(b-a)*e:this.minXOnScale+(b-a)*e},"~N,~N,~B,~N");c(c$,"toPixelX",function(a,b,c,e){return this.toPixelXScaled(a,b,c,e,this.xFactorForScale)},"~N,~N,~N,~B");c(c$,"toPixelX0",function(a,b,c,e){return this.toPixelXScaled(a,b,c,e,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(c$,"toPixelXScaled",function(a,b,c,e,f){a=v((a-this.minXOnScale)/f);return e?b+a:c-a},"~N,~N,~N,~B,~N");c(c$,"toY",function(a,b){return this.maxYOnScale+(b-a)*this.yFactorForScale},
"~N,~N");c(c$,"toY0",function(a,b,c){return Math.max(this.minYOnScale,Math.min(this.maxYOnScale+(b-a)*((this.maxYOnScale-this.minYOnScale)/(c-b)),this.maxYOnScale))},"~N,~N,~N");c(c$,"toPixelY",function(a,b){return Double.isNaN(a)?-2147483648:b-v(((a-this.spectrumYRef)*this.userYFactor+this.spectrumYRef-this.minYOnScale)/this.yFactorForScale)},"~N,~N");c(c$,"toPixelY0",function(a,b,c){return v(b+(this.maxYOnScale-a)/((this.maxYOnScale-this.minYOnScale)/(c-b)))},"~N,~N,~N");c(c$,"setXYScale",function(a,
b,c){var e=this.spectrumYRef,f=this.spectrumScaleFactor,h=1!=f||this.isShiftZoomedY,m=h?this.initMinYOnScale:this.minY,j=h?this.initMaxYOnScale:this.maxY;h&&e<m&&(e=m);h&&e>j&&(e=j);this.setYScale((m-e)/f+e,(j-e)/f+e,1==f,c);this.xFactorForScale=(this.maxXOnScale-this.minXOnScale)/(a-1);this.yFactorForScale=(this.maxYOnScale-this.minYOnScale)/(b-1)},"~N,~N,~B");c$.copyScaleFactors=c(c$,"copyScaleFactors",function(a,b){for(var c=0;c<a.length;c++)b[c].spectrumScaleFactor=a[c].spectrumScaleFactor,b[c].spectrumYRef=
a[c].spectrumYRef,b[c].userYFactor=a[c].userYFactor,b[c].specShift=a[c].specShift,b[c].isShiftZoomedY=a[c].isShiftZoomedY},"~A,~A");c$.copyYScales=c(c$,"copyYScales",function(a,b){for(var c=0;c<a.length;c++)b[c].initMinYOnScale=a[c].initMinYOnScale,b[c].initMaxYOnScale=a[c].initMaxYOnScale,b[c].minY=a[c].minY,b[c].maxY=a[c].maxY,a[c].isShiftZoomedY&&(b[c].isShiftZoomedY=!0,b[c].minYOnScale=a[c].minYOnScale,b[c].maxYOnScale=a[c].maxYOnScale)},"~A,~A");c$.setDataPointIndices=c(c$,"setDataPointIndices",
function(a,b,c,e,f,h){for(var m=0,j=a.size(),l=0;l<j;l++){var k=a.get(l).getXYCoords();JSV.common.ScaleData.getXRange(l,k,b,c,0,k.length-1,f,h)>=e&&m++}return m==j},"JU.Lst,~N,~N,~N,~A,~A");c$.fixScale=c(c$,"fixScale",function(a){if(!a.isEmpty())for(;;){for(var b,c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var e=b.getValue(),f=e.indexOf("E");0<=f&&(e=e.substring(0,f));if(0>e.indexOf(".")||!e.endsWith("0")&&!e.endsWith("."))return}for(c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||
1);)e=b.getValue(),f=e.indexOf("E"),0<=f?b.setValue(e.substring(0,f-1)+e.substring(f)):b.setValue(e.substring(0,e.length-1))}},"java.util.Map");c(c$,"scaleBy",function(a){if(this.isShiftZoomedY){var b=this.isYZeroOnScale()?this.spectrumYRef:(this.minYOnScale+this.maxYOnScale)/2;this.minYOnScale=b-(b-this.minYOnScale)/a;this.maxYOnScale=b-(b-this.maxYOnScale)/a}else this.spectrumScaleFactor*=a},"~N");C(c$,"NTICKS",[2,5,10,10]);c$.LOGTICKS=c$.prototype.LOGTICKS=[Math.log10(2),Math.log10(5),0,1]}),q("JSV.common"),
r(["java.lang.Enum"],"JSV.common.ScriptToken",["java.util.Hashtable","JU.Lst","$.PT","$.SB","JSV.common.ScriptTokenizer"],function(){c$=k(function(){this.tip=null;n(this,arguments)},JSV.common,"ScriptToken",Enum);c(c$,"getTip",function(){return"  "+("T"===this.tip?"TRUE/FALSE/TOGGLE":"TF"===this.tip?"TRUE or FALSE":"C"===this.tip?"<color>":this.tip)});p(c$,function(){});p(c$,function(a){this.tip=a},"~S");c$.getScriptToken=c(c$,"getScriptToken",function(a){if(null==JSV.common.ScriptToken.htParams){JSV.common.ScriptToken.htParams=
new java.util.Hashtable;for(var b,c=0,e=JSV.common.ScriptToken.values();c<e.length&&((b=e[c])||1);c++)JSV.common.ScriptToken.htParams.put(b.name(),b)}a=JSV.common.ScriptToken.htParams.get(a.toUpperCase());return null==a?JSV.common.ScriptToken.UNKNOWN:a},"~S");c$.getScriptTokenList=c(c$,"getScriptTokenList",function(a,b){a=a.toUpperCase();var c=new JU.Lst,e=JSV.common.ScriptToken.getScriptToken(a);if(b)null!=e&&c.addLast(e);else for(var f,e=JSV.common.ScriptToken.htParams.entrySet().iterator();e.hasNext()&&
((f=e.next())||1);)f.getKey().startsWith(a)&&null!=f.getValue().tip&&c.addLast(f.getValue());return c},"~S,~B");c$.getValue=c(c$,"getValue",function(a,b,c){if(!b.hasMoreTokens())return"";switch(a){default:return JSV.common.ScriptTokenizer.nextStringToken(b,!0);case JSV.common.ScriptToken.CLOSE:case JSV.common.ScriptToken.GETPROPERTY:case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:case JSV.common.ScriptToken.JMOL:case JSV.common.ScriptToken.LABEL:case JSV.common.ScriptToken.LOAD:case JSV.common.ScriptToken.PEAK:case JSV.common.ScriptToken.PLOTCOLORS:case JSV.common.ScriptToken.YSCALE:case JSV.common.ScriptToken.WRITE:return JSV.common.ScriptToken.removeCommandName(c);
case JSV.common.ScriptToken.SELECT:case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:case JSV.common.ScriptToken.ZOOM:return JSV.common.ScriptToken.removeCommandName(c).$replace(","," ").trim()}},"JSV.common.ScriptToken,JSV.common.ScriptTokenizer,~S");c$.removeCommandName=c(c$,"removeCommandName",function(a){var b=a.indexOf(" ");return 0>b?"":a.substring(b).trim()},"~S");c$.getKey=c(c$,"getKey",function(a){var b=a.nextToken();if(b.startsWith("#")||b.startsWith("//"))return null;
b.equalsIgnoreCase("SET")&&(b=a.nextToken());return b.toUpperCase()},"JSV.common.ScriptTokenizer");c$.getTokens=c(c$,"getTokens",function(a){a.startsWith("'")&&a.endsWith("'")&&(a='"'+JU.PT.trim(a,"'")+'"');var b=new JU.Lst;for(a=new JSV.common.ScriptTokenizer(a,!1);a.hasMoreTokens();){var c=JSV.common.ScriptTokenizer.nextStringToken(a,!1);if(c.startsWith("//")||c.startsWith("#"))break;b.addLast(c)}return b},"~S");c$.getNameList=c(c$,"getNameList",function(a){if(0==a.size())return"";for(var b=new JU.SB,
c=0;c<a.size();c++)b.append(",").append(a.get(c).toString());return b.toString().substring(1)},"JU.Lst");c$.htParams=null;s(c$,"UNKNOWN",0,[]);s(c$,"APPLETID",1,[]);s(c$,"APPLETREADYCALLBACKFUNCTIONNAME",2,[]);s(c$,"AUTOINTEGRATE",3,["TF"]);s(c$,"BACKGROUNDCOLOR",4,["C"]);s(c$,"CLOSE",5,["spectrumId or fileName or ALL or VIEWS or SIMULATIONS"]);s(c$,"COMPOUNDMENUON",6,["TF"]);s(c$,"COORDCALLBACKFUNCTIONNAME",7,[]);s(c$,"COORDINATESCOLOR",8,["C"]);s(c$,"COORDINATESON",9,["T"]);s(c$,"DEBUG",10,["TF"]);
s(c$,"DEFAULTLOADSCRIPT",11,['"script..."']);s(c$,"DEFAULTNMRNORMALIZATION",12,["maxYvalue"]);s(c$,"DISPLAYFONTNAME",13,["fontName"]);s(c$,"DISPLAY1D",14,["T"]);s(c$,"DISPLAY2D",15,["T"]);s(c$,"ENABLEZOOM",16,["T"]);s(c$,"ENDINDEX",17,[]);s(c$,"FINDX",18,["x-value"]);s(c$,"GETPROPERTY",19,["[ALL] [propertyName]"]);s(c$,"GETSOLUTIONCOLOR",20,[" FILL or FILLNONE or FILLALL or FILLALLNONE"]);s(c$,"GRIDCOLOR",21,["C"]);s(c$,"GRIDON",22,["T"]);s(c$,"HIDDEN",23,["TF"]);s(c$,"HIGHLIGHTCOLOR",24,["C"]);s(c$,
"HIGHLIGHT",25,["OFF or X1 X2 [OFF] or X1 X2 r g b [a]"]);s(c$,"INTEGRALOFFSET",26,["percent"]);s(c$,"INTEGRALRANGE",27,["percent"]);s(c$,"INTEGRATE",28,[]);s(c$,"INTEGRATION",29,["ON/OFF/AUTO/TOGGLE/MIN value/MARK ppm1-ppm2:norm,ppm3-ppm4,... (start with 0-0 to clear)"]);s(c$,"INTEGRALPLOTCOLOR",30,[]);s(c$,"INTEGRATIONRATIOS",31,[]);s(c$,"INTERFACE",32,[]);s(c$,"IRMODE",33,["A or T or TOGGLE"]);s(c$,"JMOL",34,["...Jmol command..."]);s(c$,"JSV",35,[]);s(c$,"LABEL",36,['x y [color and/or "text"]']);
s(c$,"LINK",37,["AB or ABC or NONE or ALL"]);s(c$,"LOAD",38,['[APPEND] "fileName" [first] [last]; use "" to reload current file']);s(c$,"LOADFILECALLBACKFUNCTIONNAME",39,[]);s(c$,"LOADIMAGINARY",40,["T/F - default is to NOT load imaginary spectra"]);s(c$,"MENUON",41,[]);s(c$,"OBSCURE",42,[]);s(c$,"OVERLAY",43,[]);s(c$,"OVERLAYSTACKED",44,["TF"]);s(c$,"PEAK",45,['<type(IR,CNMR,HNMR,MS, etc)> id=xxx or "match" [ALL], for example: PEAK HNMR id=3']);s(c$,"PEAKCALLBACKFUNCTIONNAME",46,[]);s(c$,"PEAKLIST",
47,[" Example: PEAKLIST threshold=20 [%, or include=10] skip=0 interpolate=parabolic [or NONE]"]);s(c$,"PEAKTABCOLOR",48,["C"]);s(c$,"PLOTAREACOLOR",49,["C"]);s(c$,"PLOTCOLOR",50,["C"]);s(c$,"PLOTCOLORS",51,["color,color,color,..."]);s(c$,"PRINT",52,[]);s(c$,"REVERSEPLOT",53,["T"]);s(c$,"SCALEBY",54,["factor"]);s(c$,"SCALECOLOR",55,["C"]);s(c$,"SCRIPT",56,["filename.jsv"]);s(c$,"SELECT",57,["spectrumID, spectrumID,..."]);s(c$,"SETPEAK",58,["x (ppm) or NONE does peak search, unlike SETX -- NMR only"]);
s(c$,"SETX",59,["x (ppm) does no peak search, unlike SETPEAK -- NMR only"]);s(c$,"SHIFTX",60,["dx (ppm) or NONE -- NMR only"]);s(c$,"SHOWERRORS",61,[]);s(c$,"SHOWINTEGRATION",62,["T"]);s(c$,"SHOWKEY",63,["T"]);s(c$,"SHOWMEASUREMENTS",64,["T"]);s(c$,"SHOWMENU",65,[]);s(c$,"SHOWPEAKLIST",66,["T"]);s(c$,"SHOWPROPERTIES",67,[]);s(c$,"SHOWSOURCE",68,[]);s(c$,"SPECTRUM",69,["spectrumID"]);s(c$,"SPECTRUMNUMBER",70,[]);s(c$,"STACKOFFSETY",71,["percent"]);s(c$,"STARTINDEX",72,[]);s(c$,"SYNCCALLBACKFUNCTIONNAME",
73,[]);s(c$,"SYNCID",74,[]);s(c$,"TEST",75,[]);s(c$,"TITLEON",76,["T"]);s(c$,"TITLEBOLDON",77,["T"]);s(c$,"TITLECOLOR",78,["C"]);s(c$,"TITLEFONTNAME",79,["fontName"]);s(c$,"UNITSCOLOR",80,["C"]);s(c$,"VERSION",81,[]);s(c$,"VIEW",82,['spectrumID, spectrumID, ... Example: VIEW 3.1, 3.2  or  VIEW "acetophenone"']);s(c$,"XSCALEON",83,["T"]);s(c$,"XUNITSON",84,["T"]);s(c$,"YSCALE",85,["[ALL] lowValue highValue"]);s(c$,"YSCALEON",86,["T"]);s(c$,"YUNITSON",87,["T"]);s(c$,"WINDOW",88,[]);s(c$,"WRITE",89,
['[XY,DIF,DIFDUP,PAC,FIX,SQZ,AML,CML,JPG,PDF,PNG,SVG] "filename"']);s(c$,"ZOOM",90,["OUT or x1,x2 or x1,y1 x2,y2"]);s(c$,"ZOOMBOXCOLOR",91,[]);s(c$,"ZOOMBOXCOLOR2",92,[])}),q("JSV.common"),r(null,"JSV.common.ScriptTokenizer",["JU.PT"],function(){c$=k(function(){this.str=null;this.pt=-1;this.len=0;this.isCmd=!1;this.doCheck=!0;n(this,arguments)},JSV.common,"ScriptTokenizer");p(c$,function(a,b){this.str=a;this.len=a.length;this.isCmd=b},"~S,~B");c$.nextStringToken=c(c$,"nextStringToken",function(a,
b){var c=a.nextToken();return b&&'"'==c.charAt(0)&&c.endsWith('"')&&1<c.length?JU.PT.trimQuotes(c):c},"JSV.common.ScriptTokenizer,~B");c(c$,"nextToken",function(){this.doCheck&&this.hasMoreTokens();for(var a=this.pt,b='"'==this.str.charAt(this.pt);++this.pt<this.len;){switch(this.str.charAt(this.pt)){case '"':if(b){if(this.isCmd){b=!1;continue}this.pt++;break}this.isCmd&&(b=!0);continue;case " ":if(!this.isCmd&&!b)break;continue;case ";":case "\n":if(this.isCmd&&!b)break;continue;default:continue}break}this.doCheck=
!0;return this.str.substring(a,this.pt)});c(c$,"hasMoreTokens",function(){for(;++this.pt<this.len;){switch(this.str.charAt(this.pt)){case " ":case ";":case "\n":continue}break}this.doCheck=!1;return this.pt<this.len});c(c$,"getRemainingScript",function(){return this.str.substring(this.pt)})}),q("JSV.common"),c$=k(function(){this.isub=0;this.title=null;n(this,arguments)},JSV.common,"SubSpecChangeEvent"),p(c$,function(a,b){this.isub=a;this.title=b},"~N,~S"),c(c$,"isValid",function(){return null!=this.title}),
c(c$,"getSubIndex",function(){return this.isub}),e(c$,"toString",function(){return this.title}),q("JSV.common"),r(null,"JSV.common.ViewData",["JSV.common.Coordinate","$.ScaleData"],function(){c$=k(function(){this.thisScale=this.scaleData=null;this.iThisScale=this.nSpectra=0;n(this,arguments)},JSV.common,"ViewData");c(c$,"getScaleData",function(){return this.scaleData});c(c$,"getScale",function(){return this.thisScale});p(c$,function(a,b,c,e,f,h,m){this.nSpectra=m?1:a.size();this.scaleData=Array(this.nSpectra);
for(m=0;m<this.nSpectra;m++)this.scaleData[m]=new JSV.common.ScaleData(e[m],f[m]);this.init(a,b,c,h)},"JU.Lst,~N,~N,~A,~A,~B,~B");p(c$,function(a,b,c,e){this.nSpectra=a.size();var f=a.get(0).getXYCoords().length;this.scaleData=Array(1);this.scaleData[0]=new JSV.common.ScaleData(0,f-1);this.init(a,b,c,e)},"JU.Lst,~N,~N,~B");c(c$,"init",function(a,b,c,e){this.thisScale=this.scaleData[this.iThisScale=0];for(var f=0;f<this.scaleData.length;f++)this.scaleData[f].userYFactor=a.get(f).getUserYFactor(),this.scaleData[f].spectrumYRef=
a.get(f).getYRef();this.resetScaleFactors();var h=JSV.common.Coordinate.getMinX(a,this),m=JSV.common.Coordinate.getMaxX(a,this),j=JSV.common.Coordinate.getMinYUser(a,this),l=JSV.common.Coordinate.getMaxYUser(a,this);b!=c&&(j=b,l=c,j>l&&(f=j,j=l,l=f));a=a.get(0).isInverted();for(f=0;f<this.scaleData.length;f++)this.scaleData[f].setMinMax(h,m,j,l),this.scaleData[f].setScale(e,a)},"JU.Lst,~N,~N,~B");c(c$,"newSpectrum",function(a){this.init(a,0,0,!1)},"JU.Lst");c(c$,"setXRangeForSubSpectrum",function(a){this.setXRange(0,
a,this.scaleData[0].minX,this.scaleData[0].maxX,0,a.length-1)},"~A");c(c$,"setXRange",function(a,b,c,e,f,h){for(var m=0,j=0,m=f;m<=h;m++)if(f=b[m].getXVal(),f>=c){this.scaleData[a%this.scaleData.length].startDataPointIndex=m;break}for(;m<=h&&!(f=b[m].getXVal(),j++,f>=e);m++);this.scaleData[a%this.scaleData.length].endDataPointIndex=m-1;return j},"~N,~A,~N,~N,~N,~N");c(c$,"getStartingPointIndex",function(a){return this.scaleData[a%this.scaleData.length].startDataPointIndex},"~N");c(c$,"getEndingPointIndex",
function(a){return this.scaleData[a%this.scaleData.length].endDataPointIndex},"~N");c(c$,"areYScalesSame",function(a,b){a%=this.scaleData.length;b%=this.scaleData.length;return this.scaleData[a].minYOnScale==this.scaleData[b].minYOnScale&&this.scaleData[a].maxYOnScale==this.scaleData[b].maxYOnScale},"~N,~N");c(c$,"setScale",function(a,b,c,e){this.iThisScale=a%this.scaleData.length;this.thisScale=this.scaleData[this.iThisScale];this.thisScale.setXYScale(b,c,e)},"~N,~N,~N,~B");c(c$,"resetScaleFactors",
function(){for(var a=0;a<this.scaleData.length;a++)this.scaleData[a].spectrumScaleFactor=1});c(c$,"scaleSpectrum",function(a,b){if(!(0>=b||a>=this.nSpectra))if(-2==a)this.thisScale.scale2D(b);else if(0>a)for(a=0;a<this.scaleData.length;a++)this.scaleData[a].scaleBy(b);else this.scaleData[a%this.scaleData.length].scaleBy(b)},"~N,~N");c(c$,"getNewScales",function(a,b,c,e){if(b)return this.scaleData;a%=this.scaleData.length;b=(c-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);
e=(e-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);c=Array(this.scaleData.length);for(var f=0;f<this.scaleData.length;f++)c[f]=0<=a&&f!=a?this.scaleData[f]:new JSV.common.ScaleData;JSV.common.ScaleData.copyScaleFactors(this.scaleData,c);JSV.common.ScaleData.copyYScales(this.scaleData,c);for(f=0;f<this.scaleData.length;f++)0<=a&&f!=a||(c[f].isShiftZoomedY=!0,c[f].minYOnScale=this.scaleData[f].minYOnScale*(1-b)+b*this.scaleData[f].maxYOnScale,c[f].maxYOnScale=this.scaleData[f].minYOnScale*
(1-e)+e*this.scaleData[f].maxYOnScale);return c},"~N,~B,~N,~N")}),q("JSV.common"),B(JSV.common,"XYScaleConverter"),q("JSV.common"),c$=t(JSV.common,"ZoomEvent"),p(c$,function(){}),q("JSV.dialog"),r(["JSV.api.AnnotationData","JSV.common.Annotation"],"JSV.dialog.JSVDialog",["java.lang.Double","JU.DF","$.PT","JSV.common.IntegralData","$.PeakData"],function(){c$=k(function(){this.myParams=this.xyData=this.combo1=this.txt3=this.txt2=this.txt1=this.jsvp=this.dialog=this.manager=this.$spec=this.vwr=this.title=
this.type=this.options=this.optionKey=null;this.precision=1;this.showHideButton=this.loc=null;this.defaultVisible=this.isNumeric=this.addApplyBtn=this.addCombo1=this.addClearBtn=!1;this.tableData=this.graphSetKey=this.subType=null;this.addUnits=!1;this.unitPtr=this.formatOptions=this.unitOptions=null;this.isON=!0;this.lastNorm=1;this.iSelected=this.iRowColSelected=-1;this.skipCreate=!1;this.iColSelected=this.iRowSelected=-1;n(this,arguments)},JSV.dialog,"JSVDialog",JSV.common.Annotation,JSV.api.AnnotationData);
c(c$,"setParams",function(a,b,c){this.title=a;this.vwr=b;this.$spec=c;this.manager=b.getDialogManager();this.jsvp=b.selectedPanel;this.myParams=b.getPlatformInterface("Parameters").setName("dialogParams");this.subType=null==c?"!":c.getTypeLabel();this.optionKey=this.type+"_"+this.subType;this.options=this.manager.getDialogOptions();null!=c&&(a=c.getDefaultAnnotationInfo(this.type),this.options.put(this.optionKey,a),this.unitOptions=a[0],this.formatOptions=a[1],this.unitPtr=this.options.get(this.optionKey+
"_unitPtr"),null==this.unitPtr&&(this.unitPtr=a[2]));switch(this.type){case JSV.common.Annotation.AType.Integration:this.addApplyBtn=this.defaultVisible=this.addClearBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.Measurements:this.defaultVisible=this.addCombo1=this.addClearBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.PeakList:this.defaultVisible=this.addApplyBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.Views:this.defaultVisible=!0}this.initDialog();return this},
"~S,JSV.common.JSViewer,JSV.common.Spectrum");c(c$,"initDialog",function(){this.dialog=this.manager.getDialog(this);this.restoreDialogPosition(this.jsvp,this.getPosXY());this.dialog.setTitle(this.title);this.layoutDialog()});c(c$,"layoutDialog",function(){this.dialog.startLayout();this.addUniqueControls();this.isNumeric&&(this.getUnitOptions(),this.addCombo1&&(this.combo1=this.dialog.addSelectOption("cmbUnits","Units",this.unitOptions,this.unitPtr.intValue(),this.addUnits)),this.addApplyBtn&&this.dialog.addButton("btnApply",
"Apply"),this.showHideButton=this.dialog.addButton("btnShow","Show"),this.addClearBtn&&this.dialog.addButton("btnClear","Clear"));this.dialog.endLayout();this.checkEnables();this.dialog.setVisible(this.defaultVisible)});c(c$,"callbackAD",function(a,b){if(a.equals("FOCUS"))this.eventFocus();else if(a.equals("tableSelect"))this.tableSelect(b);else if(a.equals("btnClear"))this.clear();else if(a.equals("btnApply"))this.eventApply();else if(a.equals("btnShow")){var c=this.dialog.getText(this.showHideButton);
this.eventShowHide(c.equals("Show"))}else if(a.equals("cmbUnits"))this.setPrecision(this.dialog.getSelectedIndex(this.combo1));else if(a.startsWith("txt"))this.eventApply();else if(a.equals("windowClosing"))return this.done(),!0;null!=this.jsvp&&this.jsvp.doRepaint(!0);return!0},"~S,~S");c(c$,"addUniqueControls",function(){},"JSV.dialog.DialogManager");e(c$,"getAType",function(){return this.type});e(c$,"getGraphSetKey",function(){return this.graphSetKey});e(c$,"setGraphSetKey",function(a){this.graphSetKey=
a},"~S");e(c$,"getSpectrum",function(){return this.$spec});e(c$,"getState",function(){return this.isON});e(c$,"setState",function(a){this.isON=a},"~B");c(c$,"checkEnables",function(){var a=this.checkVisible();this.dialog.setText(this.showHideButton,a?"Hide":"Show")});c(c$,"createTable",function(a,b,c){this.tableData=a;this.dialog.createTable(a,b,c)},"~A,~A,~A");c(c$,"setTableSelectionEnabled",function(a){this.dialog.setCellSelectionEnabled(a)},"~B");c(c$,"getParameters",function(){return this.myParams});
c(c$,"showMessage",function(a,b,c){this.manager.showMessageDialog(this.dialog,a,b,c)},"~S,~S,~N");c(c$,"setThreshold",function(a){this.dialog.setText(this.txt1,this.getThreasholdText(a))},"~N");c(c$,"setComboSelected",function(a){this.dialog.setSelectedIndex(this.combo1,a)},"~N");c(c$,"applyFromFields",function(){this.apply(null)});c(c$,"reEnable",function(){this.paramsReEnable();return this});c(c$,"dispose",function(){this.dialog.dispose()});c(c$,"setVisible",function(a){this.dialog.setVisible(a)},
"~B");e(c$,"isVisible",function(){return this.dialog.isVisible()});c(c$,"selectTableRow",function(a){this.dialog.selectTableRow(a)},"~N");c(c$,"repaint",function(){this.dialog.repaint()});c(c$,"setFields",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.myParams=this.xyData.getParameters(),this.setThreshold(this.myParams.peakListThreshold),this.setComboSelected(this.myParams.peakListInterpolation.equals("none")?1:0),this.createData()}});c(c$,"setFocus",function(a){this.dialog.setFocus(a)},
"~B");c(c$,"update",function(a,b,c){this.selectTableRow(-1);switch(this.type){case JSV.common.Annotation.AType.Integration:this.loadData();this.checkEnables();break;case JSV.common.Annotation.AType.Measurements:this.loadData();this.checkEnables();break;case JSV.common.Annotation.AType.PeakList:20<c&&this.applyFromFields();if(null==this.xyData||null==a||20<c)break;c=0;var e=1E100;a=a.getXVal();var f=this.xyData;b=Math.abs(b/20);for(var h=f.size();0<=--h;){var m=Math.abs(a-f.get(h).getXVal());m<e&&
(e=m,c=h)}e<b&&(this.selectTableRow(f.size()-2-c),this.repaint())}},"JSV.common.Coordinate,~N,~N");c(c$,"getPeakData",function(){var a=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.$spec);a.setPeakList(this.myParams,this.precision,this.jsvp.getPanelData().getView());this.xyData=a;return null});e(c$,"getData",function(){null==this.xyData&&this.createData();return this.xyData});c(c$,"setData",function(a){this.myParams=a.getParameters();this.xyData=a},"JSV.api.AnnotationData");e(c$,
"setSpecShift",function(a){null!=this.xyData&&this.xyData.setSpecShift(a)},"~N");c(c$,"setType",function(a){this.type=a;switch(a){case JSV.common.Annotation.AType.Measurements:this.addUnits=!0}},"JSV.common.Annotation.AType");c(c$,"apply",function(a){try{switch(this.type){case JSV.common.Annotation.AType.Integration:var b=Double.parseDouble(a[0]),c=Double.parseDouble(a[1]);this.myParams.integralOffset=b;this.myParams.integralRange=c;this.myParams.integralDrawAll=!1;this.getData().update(this.myParams);
break;case JSV.common.Annotation.AType.NONE:return;case JSV.common.Annotation.AType.PeakList:this.skipCreate||(this.setThreshold(NaN),this.createData());this.skipCreate=!1;break;case JSV.common.Annotation.AType.Views:this.vwr.parameters.viewOffset=Double.parseDouble(a[0])}this.loadData();this.checkEnables();this.jsvp.doRepaint(!0)}catch(e){if(!y(e,Exception))throw e;}},"~A");c(c$,"done",function(){null!=this.jsvp&&null!=this.$spec&&this.jsvp.getPanelData().removeDialog(this);null!=this.xyData&&this.xyData.setState(this.isON);
this.saveDialogPosition(this.getPosXY());this.dispose();this.jsvp.doRepaint(!0)});c(c$,"restoreDialogPosition",function(a,b){if(null!=a){-2147483648==b[0]&&(b[0]=0,b[1]=-20);var c=this.manager.getLocationOnScreen(a),e=a.getHeight();this.loc=[Math.max(0,c[0]+b[0]),Math.max(0,c[1]+e+b[1])];this.dialog.setIntLocation(this.loc)}},"JSV.api.JSVPanel,~A");c(c$,"saveDialogPosition",function(a){try{var b=this.manager.getLocationOnScreen(this.dialog);a[0]+=b[0]-this.loc[0];a[1]+=b[1]-this.loc[1]}catch(c){if(!y(c,
Exception))throw c;}},"~A");c(c$,"getThreasholdText",function(a){if(Double.isNaN(a)){a=this.jsvp.getPanelData();var b=a.getSpectrum().isInverted()?0.1:0.9,c=a.getClickedCoordinate();a=null==c?(a.getView().minYOnScale*b+a.getView().maxYOnScale)*(1-b):c.getYVal()}return" "+JU.DF.formatDecimalDbl(a,1E3>a?2:-2)},"~N");c(c$,"checkVisible",function(){return this.vwr.pd().getShowAnnotation(this.type)});c(c$,"getUnitOptions",function(){var a=this.optionKey+"_format";null==this.options.get(a)&&this.options.put(a,
Integer.$valueOf(this.formatOptions[null==this.unitPtr?0:this.unitPtr.intValue()]))});c(c$,"eventFocus",function(){null!=this.$spec&&this.jsvp.getPanelData().jumpToSpectrum(this.$spec);switch(this.type){case JSV.common.Annotation.AType.Integration:0<=this.iRowSelected&&(this.iRowSelected++,this.tableCellSelect(-1,-1));break;case JSV.common.Annotation.AType.PeakList:this.createData(),this.skipCreate=!0}});c(c$,"eventApply",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.createData(),
this.skipCreate=!0}this.applyFromFields()});c(c$,"eventShowHide",function(a){(this.isON=a)&&this.eventApply();this.jsvp.doRepaint(!0);this.checkEnables()},"~B");c(c$,"clear",function(){this.setState(!0);null!=this.xyData&&(this.xyData.clear(),this.applyFromFields())});c(c$,"paramsReEnable",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.skipCreate=!0}this.setVisible(!0);this.isON=!0;this.applyFromFields()});c(c$,"tableCellSelect",function(a,b){System.out.println(a+" jSVDial "+
b);0>a&&(a=v(this.iRowColSelected/1E3),b=this.iRowColSelected%1E3,this.iRowColSelected=-1);var c=this.tableData[a][1],e=1E3*a+b;if(e!=this.iRowColSelected){this.iRowColSelected=e;System.out.println("Setting rc = "+this.iRowColSelected+" "+this.$spec);this.selectTableRow(this.iRowSelected);try{switch(this.type){case JSV.common.Annotation.AType.Integration:this.callback("SHOWSELECTION",c.toString());this.checkEnables();break;case JSV.common.Annotation.AType.PeakList:try{switch(b){case 6:case 5:case 4:var f=
Double.parseDouble(c),h=Double.parseDouble(this.tableData[a+3-b][1]);this.jsvp.getPanelData().setXPointers(this.$spec,f,this.$spec,h);break;default:this.jsvp.getPanelData().findX(this.$spec,Double.parseDouble(c))}}catch(m){if(y(m,Exception))this.jsvp.getPanelData().findX(this.$spec,1E100);else throw m;}this.jsvp.doRepaint(!1);break;case JSV.common.Annotation.AType.OverlayLegend:this.jsvp.getPanelData().setSpectrum(a,!1)}}catch(j){if(!y(j,Exception))throw j;}}},"~N,~N");c(c$,"loadData",function(){var a,
b,c;switch(this.type){case JSV.common.Annotation.AType.Integration:null==this.xyData&&this.createData();this.iSelected=-1;a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();c=[40,65,65,50];this.createTable(a,b,c);break;case JSV.common.Annotation.AType.Measurements:if(null==this.xyData)break;a=this.xyData.getMeasurementListArray(this.dialog.getSelectedItem(this.combo1).toString());b=this.xyData.getDataHeader();c=[40,65,65,50];this.createTable(a,b,c);break;case JSV.common.Annotation.AType.PeakList:null==
this.xyData&&this.createData();a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();c=[40,65,50,50,50,50,50];this.createTable(a,b,c);this.setTableSelectionEnabled(!0);break;case JSV.common.Annotation.AType.OverlayLegend:b=["No.","Plot Color","Title"],a=this.vwr.selectedPanel.getPanelData().getOverlayLegendData(),c=[30,60,250],this.createTable(a,b,c),this.setTableSelectionEnabled(!0)}});c(c$,"createData",function(){switch(this.type){case JSV.common.Annotation.AType.Integration:this.xyData=
new JSV.common.IntegralData(this.$spec,this.myParams);this.iSelected=-1;break;case JSV.common.Annotation.AType.PeakList:try{var a=Double.parseDouble(this.dialog.getText(this.txt1));this.myParams.peakListThreshold=a;this.myParams.peakListInterpolation=this.dialog.getSelectedItem(this.combo1).toString();this.myParams.precision=this.precision;var b=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.$spec);b.setPeakList(this.myParams,this.precision,this.jsvp.getPanelData().getView());this.xyData=
b;this.loadData()}catch(c){if(!y(c,Exception))throw c;}}});c(c$,"setPrecision",function(a){this.precision=this.formatOptions[a]},"~N");c(c$,"tableSelect",function(a){if("true".equals(this.getField(a,"adjusting")))this.iColSelected=this.iRowSelected=-1,System.out.println("adjusting"+a);else{var b=JU.PT.parseInt(this.getField(a,"index"));switch("ROW COL ROWCOL".indexOf(this.getField(a,"selector"))){case 8:this.iColSelected=JU.PT.parseInt(this.getField(a,"index2"));case 0:this.iRowSelected=b;System.out.println("r set to "+
b);break;case 4:this.iColSelected=b,System.out.println("c set to "+b)}0<=this.iColSelected&&0<=this.iRowSelected&&this.tableCellSelect(this.iRowSelected,this.iColSelected)}},"~S");c(c$,"getField",function(a,b){a+="&";var c="&"+b+"=",e=a.indexOf(c);return 0>e?null:a.substring(e+c.length,a.indexOf("&",e+1))},"~S,~S")}),q("JSV.exception"),r(["java.lang.Exception"],"JSV.exception.JSVException",null,function(){c$=t(JSV.exception,"JSVException",Exception)}),q("JSV.js2d"),c$=t(JSV.js2d,"Display"),c$.getFullScreenDimensions=
c(c$,"getFullScreenDimensions",function(a,b){b[0]=a.width;b[1]=a.height},"~O,~A"),c$.hasFocus=c(c$,"hasFocus",function(){return!0},"~O"),c$.requestFocusInWindow=c(c$,"requestFocusInWindow",function(){},"~O"),c$.repaint=c(c$,"repaint",function(){},"~O"),c$.renderScreenImage=c(c$,"renderScreenImage",function(){},"javajs.api.PlatformViewer,~O,~O"),c$.setTransparentCursor=c(c$,"setTransparentCursor",function(){},"~O"),c$.setCursor=c(c$,"setCursor",function(){},"~N,~O"),c$.prompt=c(c$,"prompt",function(a,
b){var c=prompt(a,b);return null!=c?c:"null"},"~S,~S,~A,~B"),c$.convertPointFromScreen=c(c$,"convertPointFromScreen",function(){},"~O,JU.P3"),q("JSV.js2d"),c$=t(JSV.js2d,"Image"),c$.getWidth=c(c$,"getWidth",function(a){return a.imageWidth?a.imageWidth:a.width},"~O"),c$.getHeight=c(c$,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O"),c$.grabPixels=c(c$,"grabPixels",function(a,b,c){var e=null;if(a._buf32)return a._buf32;e=a.getImageData(0,0,b,c).data;return JSV.js2d.Image.toIntARGB(e)},
"~O,~N,~N"),c$.toIntARGB=c(c$,"toIntARGB",function(a){for(var b=v(a.length/4),c=E(b,0),e=0,f=0;e<b;f++)c[e++]=a[f++]<<16|a[f++]<<8|a[f++]|4278190080;return c},"~A"),c$.fromIntARGB=c(c$,"fromIntARGB",function(a,b){for(var c=b.length>>2,e=0,f=0;e<c;e++)b[f++]=a[e]>>16&255,b[f++]=a[e]>>8&255,b[f++]=a[e]&255,b[f++]=255},"~A,~A"),c$.getTextPixels=c(c$,"getTextPixels",function(a,b,c,e,f,h){c.fillStyle="#000000";c.fillRect(0,0,e,f);c.fillStyle="#FFFFFF";c.font=b.font;c.fillText(a,0,h);return JSV.js2d.Image.grabPixels(c,
e,f)},"~S,javajs.awt.Font,~O,~N,~N,~N"),c$.allocateRgbImage=c(c$,"allocateRgbImage",function(a,b,c,e,f,h){null==h&&(h={width:a,height:b});h.buf32=c},"~N,~N,~A,~N,~B,~O"),c$.getStaticGraphics=c(c$,"getStaticGraphics",function(a){return JSV.js2d.Image.getGraphics(a)},"~O,~B"),c$.getGraphics=c(c$,"getGraphics",function(a){return a.getContext("2d")},"~O"),c$.drawImage=c(c$,"drawImage",function(a,b,c,e){this.fromIntARGB(b.buf32,b.buf8);a.putImageData(b.imgdata,c,e)},"~O,~O,~N,~N,~N,~N"),q("JSV.js2d"),
r(["javajs.api.GenericFileInterface"],"JSV.js2d.JsFile",["JU.PT","JSV.common.JSVFileManager"],function(){c$=k(function(){this.fullName=this.name=null;n(this,arguments)},JSV.js2d,"JsFile",null,javajs.api.GenericFileInterface);c$.newFile=c(c$,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");p(c$,function(a){this.name=a.$replace("\\","/");this.fullName=a;!this.fullName.startsWith("/")&&0>JSV.common.JSVFileManager.urlTypeIndex(a)&&(this.fullName=JSV.common.JSVFileManager.jsDocumentBase+"/"+
this.fullName);this.fullName=JU.PT.rep(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");e(c$,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new JSV.js2d.JsFile(this.fullName.substring(0,a))});e(c$,"getFullPath",function(){return this.fullName});e(c$,"getName",function(){return this.name});e(c$,"isDirectory",function(){return this.fullName.endsWith("/")});e(c$,"length",function(){return 0});c$.getURLContents=c(c$,"getURLContents",function(a,b,c){try{var e=
a.openConnection();null!=b?e.outputBytes(b):null!=c&&e.outputString(c);return e.getContents()}catch(f){if(y(f,Exception))return f.toString();throw f;}},"java.net.URL,~A,~S")}),q("JSV.js2d"),r(["JSV.api.JSVFileHelper"],"JSV.js2d.JsFileHelper",["JU.PT","JSV.js2d.JsFile"],function(){c$=k(function(){this.vwr=null;n(this,arguments)},JSV.js2d,"JsFileHelper",null,JSV.api.JSVFileHelper);p(c$,function(){});e(c$,"set",function(a){this.vwr=a;return this},"JSV.common.JSViewer");e(c$,"getFile",function(a){var b=
null;a=JU.PT.rep(a,"=","_");b=prompt("Enter a file name:",a);return null==b?null:new JSV.js2d.JsFile(b)},"~S,~O,~B");e(c$,"setDirLastExported",function(a){return a},"~S");e(c$,"setFileChooser",function(){},"JSV.common.ExportType");e(c$,"showFileOpenDialog",function(a,b){Jmol._loadFileAsynchronously(this,this.vwr.html5Applet,"?",b);return null},"~O,~A");c(c$,"setData",function(a,b,c){if(null!=a)if(null==b)this.vwr.selectedPanel.showMessage(a,"File Open Error");else{var e=null==c?null:"",f=!1,f=c[0],
e=c[1];this.vwr.si.siOpenDataOrFile(String.instantialize(b),"cache://"+a,null,null,-1,-1,f,null,null);null!=e&&this.vwr.runScript(e)}},"~S,~O,~A");e(c$,"getUrlFromDialog",function(a,b){return prompt(a,b)},"~S,~S")}),q("JSV.js2d"),c$=t(JSV.js2d,"JsFont"),c$.newFont=c(c$,"newFont",function(a,b,c,e,f){a=a.equals("Monospaced")?"Courier":a.startsWith("Sans")?"Sans-Serif":"Serif";return(b?"bold ":"")+(c?"italic ":"")+e+f+" "+a},"~S,~B,~B,~N,~S"),c$.getFontMetrics=c(c$,"getFontMetrics",function(a,b){b.font!=
a.font&&(b.font=a.font,a.font=b.font,b._fontAscent=Math.ceil(a.fontSize),b._fontDescent=Math.ceil(0.25*a.fontSize));return b},"javajs.awt.Font,~O"),c$.getAscent=c(c$,"getAscent",function(a){return Math.ceil(a._fontAscent)},"~O"),c$.getDescent=c(c$,"getDescent",function(a){return Math.ceil(a._fontDescent)},"~O"),c$.stringWidth=c(c$,"stringWidth",function(a,b){a.fontMetrics.font=a.font;return Math.ceil(a.fontMetrics.measureText(b).width)},"javajs.awt.Font,~S"),q("JSV.js2d"),r(["J.api.GenericGraphics"],
"JSV.js2d.JsG2D",["javajs.awt.Color","JU.CU"],function(){c$=k(function(){this.windowHeight=this.windowWidth=0;this.inPath=this.isShifted=!1;n(this,arguments)},JSV.js2d,"JsG2D",null,J.api.GenericGraphics);p(c$,function(){});e(c$,"getColor4",function(a,b,c,e){return javajs.awt.Color.get4(a,b,c,e)},"~N,~N,~N,~N");e(c$,"getColor3",function(a,b,c){return javajs.awt.Color.get3(a,b,c)},"~N,~N,~N");e(c$,"getColor1",function(a){return javajs.awt.Color.get1(a)},"~N");e(c$,"newGrayScaleImage",function(a,b,c,
e,f){return b=Jmol._newGrayScaleImage(a,b,c,e,f)},"~O,~O,~N,~N,~A");e(c$,"drawGrayScaleImage",function(a,b,c,e,f,h,m,j,l,k){a=f-c+1;h=h-e+1;l=l-m+1;k=k-j+1;f=b.w*a/l;var n=b.h*h/k;b.width=f;b.height=n;var p=b.div;b=b.layer;b.style.left=c+"px";b.style.top=e+"px";b.style.width=a+"px";b.style.height=h+"px";p.style.left=-m*a/l+"px";p.style.top=-j*h/k+"px";p.style.width=f+"px";p.style.height=n+"px"},"~O,~O,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"drawLine",function(a,b,c,e,f){var h=this.inPath;h||a.beginPath();
a.moveTo(b,c);a.lineTo(e,f);h||a.stroke()},"~O,~N,~N,~N,~N");e(c$,"drawCircle",function(a,b,c,e){e/=2;a.beginPath();a.arc(b+e,c+e,e,0,2*Math.PI,!1);a.stroke()},"~O,~N,~N,~N");e(c$,"drawPolygon",function(a,b,c,e){this.doPoly(a,b,c,e,!1)},"~O,~A,~A,~N");c(c$,"doPoly",function(a,b,c,e,f){a.beginPath();a.moveTo(b[0],c[0]);for(var h=1;h<e;h++)a.lineTo(b[h],c[h]);f?a.fill():a.stroke()},"~O,~A,~A,~N,~B");e(c$,"drawRect",function(a,b,c,e,f){a.beginPath();a.rect(b,c,e,f);a.stroke()},"~O,~N,~N,~N,~N");e(c$,
"drawString",function(a,b,c,e){a.fillText(b,c,e)},"~O,~S,~N,~N");e(c$,"drawStringRotated",function(){},"~O,~S,~N,~N,~N");e(c$,"fillBackground",function(a,b){null==b?(this.isShifted||(a.translate(-0.5,-0.5),this.isShifted=!0),a.clearRect(0,0,this.windowWidth,this.windowHeight)):(this.setGraphicsColor(a,b),this.fillRect(a,0,0,this.windowWidth,this.windowHeight))},"~O,javajs.api.GenericColor");e(c$,"fillCircle",function(a,b,c,e){e/=2;a.beginPath();a.arc(b+e,c+e,e,0,2*Math.PI,!1);a.fill()},"~O,~N,~N,~N");
e(c$,"fillPolygon",function(a,b,c,e){this.doPoly(a,b,c,e,!0)},"~O,~A,~A,~N");e(c$,"fillRect",function(a,b,c,e,f){a.fillRect(b,c,e,f)},"~O,~N,~N,~N,~N");e(c$,"setGraphicsColor",function(a,b){var c=JU.CU.toCSSString(b);a.fillStyle=a.strokeStyle=c},"~O,javajs.api.GenericColor");e(c$,"setFont",function(a,b){var c=b.getInfo(),e=c.indexOf(" "),c=c.substring(0,e)+"px"+c.substring(e);a.font=c;return b},"~O,javajs.awt.Font");e(c$,"setStrokeBold",function(a,b){a.lineWidth=b?2:1},"~O,~B");e(c$,"setWindowParameters",
function(a,b){this.windowWidth=a;this.windowHeight=b},"~N,~N");e(c$,"translateScale",function(){},"~O,~N,~N,~N");e(c$,"canDoLineTo",function(){return!0});e(c$,"doStroke",function(a,b){(this.inPath=b)?a.beginPath():a.stroke()},"~O,~B");e(c$,"lineTo",function(a,b,c){a.lineTo(b,c)},"~O,~N,~N")}),q("JSV.js2d"),r(["JSV.api.JSVPanel"],"JSV.js2d.JsPanel",["javajs.awt.Font","JSV.common.JSViewer","$.PanelData","JU.Logger"],function(){c$=k(function(){this.bgcolor=this.name=this.vwr=this.mouse=this.pd=this.apiPlatform=
null;n(this,arguments)},JSV.js2d,"JsPanel",null,JSV.api.JSVPanel);e(c$,"finalize",function(){JU.Logger.info("JSVPanel "+this+" finalized")});e(c$,"getApiPlatform",function(){return this.apiPlatform});e(c$,"getPanelData",function(){return this.pd});c$.getEmptyPanel=c(c$,"getEmptyPanel",function(a){a=new JSV.js2d.JsPanel(a,!1);a.pd=null;return a},"JSV.common.JSViewer");c$.getPanelMany=c(c$,"getPanelMany",function(a,b){var c=new JSV.js2d.JsPanel(a,!0);c.pd.initMany(b,a.initialStartIndex,a.initialEndIndex);
return c},"JSV.common.JSViewer,JU.Lst");p(c$,function(a,b){this.vwr=a;this.pd=b?new JSV.common.PanelData(this,a):null;this.apiPlatform=a.apiPlatform;this.mouse=this.apiPlatform.getMouseManager(0,this)},"JSV.common.JSViewer,~B");e(c$,"getTitle",function(){return this.pd.getTitle()});e(c$,"dispose",function(){null!=this.pd&&this.pd.dispose();this.pd=null;this.mouse.dispose();this.mouse=null});e(c$,"setTitle",function(a){this.name=this.pd.title=a},"~S");c(c$,"setColorOrFont",function(a,b){this.pd.setColorOrFont(a,
b)},"JSV.common.ColorParameters,JSV.common.ScriptToken");e(c$,"setBackgroundColor",function(a){this.bgcolor=a},"javajs.api.GenericColor");e(c$,"getInput",function(a,b,c){b=null;b=prompt(a,c);this.getFocusNow(!0);return b},"~S,~S,~S");e(c$,"showMessage",function(a,b){JU.Logger.info(a);this.vwr.html5Applet._showStatus(a,b);this.getFocusNow(!0)},"~S,~S");e(c$,"getFocusNow",function(){null!=this.pd&&this.pd.dialogsToFront(null)},"~B");e(c$,"getFontFaceID",function(){return javajs.awt.Font.getFontFaceID("SansSerif")},
"~S");e(c$,"doRepaint",function(a){null!=this.pd&&(this.pd.taintedAll=(new Boolean(this.pd.taintedAll|a)).valueOf(),this.pd.isPrinting||this.vwr.requestRepaint())},"~B");e(c$,"paintComponent",function(a){var b=null,c=null,b=a.canvas.frontLayer.getContext("2d"),c=a;null!=this.vwr&&(null==this.pd?(null==this.bgcolor&&(this.bgcolor=this.vwr.g2d.getColor1(-1)),this.vwr.g2d.fillBackground(a,this.bgcolor),this.vwr.g2d.fillBackground(c,this.bgcolor),this.vwr.g2d.fillBackground(b,this.bgcolor)):null==this.pd.graphSets||
this.pd.isPrinting||(this.pd.g2d=this.pd.g2d0,this.pd.drawGraph(a,b,c,this.getWidth(),this.getHeight(),!1),this.vwr.repaintDone()))},"~O");e(c$,"printPanel",function(a,b,c){a.title=c;a.date=this.apiPlatform.getDateFormat("8824");this.pd.setPrint(a,"Helvetica");try{JSV.common.JSViewer.getInterface("JSV.common.PDFWriter").createPdfDocument(this,a,b)}catch(e){if(y(e,Exception))this.showMessage(e.toString(),"creating PDF");else throw e;}finally{this.pd.setPrint(null,null)}},"JSV.common.PrintLayout,java.io.OutputStream,~S");
e(c$,"saveImage",function(){return null},"~S,javajs.api.GenericFileInterface");e(c$,"hasFocus",function(){return!1});e(c$,"repaint",function(){});e(c$,"setToolTipText",function(){},"~S");e(c$,"getHeight",function(){return this.vwr.getHeight()});e(c$,"getWidth",function(){return this.vwr.getWidth()});e(c$,"isEnabled",function(){return!1});e(c$,"isFocusable",function(){return!1});e(c$,"isVisible",function(){return!1});e(c$,"setEnabled",function(){},"~B");e(c$,"setFocusable",function(){},"~B");e(c$,
"toString",function(){return null==this.pd?"<closed>":""+this.pd.getSpectrumAt(0)});e(c$,"processMouseEvent",function(a,b,c,e,f){return null!=this.mouse&&this.mouse.processEvent(a,b,c,e,f)},"~N,~N,~N,~N,~N");e(c$,"processTwoPointGesture",function(a){null!=this.mouse&&this.mouse.processTwoPointGesture(a)},"~A");e(c$,"showMenu",function(a,b){this.vwr.showMenu(a,b)},"~N,~N")}),q("JSV.js2d"),r(["JSV.common.ColorParameters"],"JSV.js2d.JsParameters",["javajs.awt.Color"],function(){c$=t(JSV.js2d,"JsParameters",
JSV.common.ColorParameters);p(c$,function(){x(this,JSV.js2d.JsParameters,[])});e(c$,"isValidFontName",function(){return!0},"~S");e(c$,"getColor1",function(a){return javajs.awt.Color.get1(a)},"~N");e(c$,"getColor3",function(a,b,c){return javajs.awt.Color.get3(a,b,c)},"~N,~N,~N");c(c$,"copy",function(a){return(new JSV.js2d.JsParameters).setName(a).setElementColors(this)},"~S")}),q("JSV.js2d"),r(["javajs.api.GenericPlatform"],"JSV.js2d.JsPlatform","java.net.URL JU.AjaxURLStreamHandlerFactory $.Rdr $.SB JSV.app.GenericMouse JSV.js2d.Display $.Image $.JsFile $.JsFont".split(" "),
function(){c$=k(function(){this.context=this.viewer=this.canvas=null;n(this,arguments)},JSV.js2d,"JsPlatform",null,javajs.api.GenericPlatform);e(c$,"setViewer",function(a,b){var c="";this.viewer=a;this.canvas=b;null!=b&&(c=b.getContext("2d"),b.imgdata=c.getImageData(0,0,b.width,b.height),b.buf8=b.imgdata.data);""!==c&&(this.context=c);try{java.net.URL.setURLStreamHandlerFactory(new JU.AjaxURLStreamHandlerFactory)}catch(e){}},"javajs.api.PlatformViewer,~O");e(c$,"isSingleThreaded",function(){return!0});
e(c$,"getJsObjectInfo",function(a,b,c){return"localName"==b?a[0].nodeName:null==c?a[0][b]:a[0][b](c[0])},"~A,~S,~A");e(c$,"isHeadless",function(){return!1});e(c$,"getMouseManager",function(a,b){return new JSV.app.GenericMouse(b)},"~N,~O");e(c$,"convertPointFromScreen",function(a,b){JSV.js2d.Display.convertPointFromScreen(a,b)},"~O,JU.P3");e(c$,"getFullScreenDimensions",function(a,b){JSV.js2d.Display.getFullScreenDimensions(a,b)},"~O,~A");e(c$,"getMenuPopup",function(){return null},"~S,~S");e(c$,"hasFocus",
function(a){return JSV.js2d.Display.hasFocus(a)},"~O");e(c$,"prompt",function(a,b,c,e){return JSV.js2d.Display.prompt(a,b,c,e)},"~S,~S,~A,~B");e(c$,"renderScreenImage",function(a,b){JSV.js2d.Display.renderScreenImage(this.viewer,a,b)},"~O,~O");e(c$,"drawImage",function(a,b,c,e,f,h){JSV.js2d.Image.drawImage(a,b,c,e,f,h)},"~O,~O,~N,~N,~N,~N");e(c$,"requestFocusInWindow",function(a){JSV.js2d.Display.requestFocusInWindow(a)},"~O");e(c$,"repaint",function(a){JSV.js2d.Display.repaint(a)},"~O");e(c$,"setTransparentCursor",
function(a){JSV.js2d.Display.setTransparentCursor(a)},"~O");e(c$,"setCursor",function(a,b){JSV.js2d.Display.setCursor(a,b)},"~N,~O");e(c$,"allocateRgbImage",function(a,b,c,e,f,h){return JSV.js2d.Image.allocateRgbImage(a,b,c,e,f,h?null:this.canvas)},"~N,~N,~A,~N,~B,~B");e(c$,"notifyEndOfRendering",function(){});e(c$,"createImage",function(){return null},"~O");e(c$,"disposeGraphics",function(){},"~O");e(c$,"grabPixels",function(a,b,c){a.image&&(b!=a.width||c!=a.height)&&Jmol._setCanvasImage(a,b,c);
if(a.buf32)return a.buf32;b=JSV.js2d.Image.grabPixels(JSV.js2d.Image.getGraphics(a),b,c);return a.buf32=b},"~O,~N,~N,~A,~N,~N");e(c$,"drawImageToBuffer",function(a,b,c,e,f){return this.grabPixels(c,e,f,null,0,0)},"~O,~O,~O,~N,~N,~N");e(c$,"getTextPixels",function(a,b,c,e,f,h,m){return JSV.js2d.Image.getTextPixels(a,b,c,f,h,m)},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");e(c$,"flushImage",function(){},"~O");e(c$,"getGraphics",function(a){return null==a?this.context:this.context=JSV.js2d.Image.getGraphics(this.canvas=
a)},"~O");e(c$,"getImageHeight",function(a){return null==a?-1:JSV.js2d.Image.getHeight(a)},"~O");e(c$,"getImageWidth",function(a){return null==a?-1:JSV.js2d.Image.getWidth(a)},"~O");e(c$,"getStaticGraphics",function(a,b){return JSV.js2d.Image.getStaticGraphics(a,b)},"~O,~B");e(c$,"newBufferedImage",function(a,b,c){return self.Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"stereoImage",b,c):null},"~O,~N,~N");e(c$,"newOffScreenImage",function(a,b){return self.Jmol&&Jmol._getHiddenCanvas?
Jmol._getHiddenCanvas(this.vwr.html5Applet,"textImage",a,b):null},"~N,~N");e(c$,"waitForDisplay",function(){return!1},"~O,~O");e(c$,"fontStringWidth",function(a,b){return JSV.js2d.JsFont.stringWidth(a,b)},"javajs.awt.Font,~S");e(c$,"getFontAscent",function(a){return JSV.js2d.JsFont.getAscent(a)},"~O");e(c$,"getFontDescent",function(a){return JSV.js2d.JsFont.getDescent(a)},"~O");e(c$,"getFontMetrics",function(a,b){return JSV.js2d.JsFont.getFontMetrics(a,b)},"javajs.awt.Font,~O");e(c$,"newFont",function(a,
b,c,e){return JSV.js2d.JsFont.newFont(a,b,c,e,"px")},"~S,~B,~B,~N");e(c$,"getDateFormat",function(a){if(null!=a){if(0<=a.indexOf("8824")){var b=new Date;a=b.toString().split(" ");var c="0"+b.getMonth(),c=c.substring(c.length-2),b="0"+b.getDate(),b=b.substring(b.length-2);return a[3]+c+b+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}if(0<=a.indexOf("8601"))return b=new Date,a=b.toString().split(" "),c="0"+b.getMonth(),c=c.substring(c.length-2),b="0"+b.getDate(),b=b.substring(b.length-
2),a[3]+c+b+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}return(""+new Date).split(" (")[0]},"~S");e(c$,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");e(c$,"getBufferedFileInputStream",function(){return null},"~S");e(c$,"getURLContents",function(a,b,c,e){a=JSV.js2d.JsFile.getURLContents(a,b,c);try{return!e?a:w(a,String)?a:w(a,JU.SB)?a.toString():w(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(f){if(y(f,Exception))return""+
f;throw f;}},"java.net.URL,~A,~S,~B");e(c$,"getLocalUrl",function(){return null},"~S")}),q("JSV.js2d"),r(["JSV.api.JSVMainPanel"],"JSV.js2d.JsMainPanel",null,function(){c$=k(function(){this.selectedPanel=null;this.currentPanelIndex=0;this.title=null;this.enabled=this.focusable=this.visible=!1;n(this,arguments)},JSV.js2d,"JsMainPanel",null,JSV.api.JSVMainPanel);e(c$,"getCurrentPanelIndex",function(){return this.currentPanelIndex});e(c$,"dispose",function(){});e(c$,"getTitle",function(){return this.title});
e(c$,"setTitle",function(a){this.title=a},"~S");e(c$,"setSelectedPanel",function(a,b,c){b!==this.selectedPanel&&(this.selectedPanel=b);a=a.selectPanel(b,c);0<=a&&(this.currentPanelIndex=a);this.visible=!0},"JSV.common.JSViewer,JSV.api.JSVPanel,JU.Lst");c(c$,"getHeight",function(){return null==this.selectedPanel?0:this.selectedPanel.getHeight()});c(c$,"getWidth",function(){return null==this.selectedPanel?0:this.selectedPanel.getWidth()});e(c$,"isEnabled",function(){return this.enabled});e(c$,"isFocusable",
function(){return this.focusable});e(c$,"isVisible",function(){return this.visible});e(c$,"setEnabled",function(a){this.enabled=a},"~B");e(c$,"setFocusable",function(a){this.focusable=a},"~B")}),q("JSV.source"),r(["JSV.source.JDXHeader"],"JSV.source.JDXDataObject","java.lang.Character $.Double JU.DF $.PT JSV.common.Annotation $.Coordinate $.Integral JSV.exception.JSVException JU.Logger".split(" "),function(){c$=k(function(){this.filePathForwardSlash=this.filePath=null;this.isSimulation=!1;this.sourceID=
"";this.blockID=0;this.fileLastX=this.fileFirstX=1.7976931348623157E308;this.nPointsFile=-1;this.yFactor=this.xFactor=1.7976931348623157E308;this.yUnits=this.xUnits=this.varName="";this.yLabel=this.xLabel=null;this.nH=0;this.observedNucl="";this.observedFreq=1.7976931348623157E308;this.parent=null;this.offset=1.7976931348623157E308;this.dataPointNum=this.shiftRefType=-1;this.numDim=1;this.nucleusX=null;this.nucleusY="?";this.y2D=this.freq2dY=this.freq2dX=NaN;this.y2DUnits="";this.$isHZtoPPM=!1;this.xIncreases=
!0;this.continuous=!1;this.xyCoords=null;this.deltaX=this.maxY=this.maxX=this.minY=this.minX=NaN;this.normalizationFactor=1;n(this,arguments)},JSV.source,"JDXDataObject",JSV.source.JDXHeader);c(c$,"setFilePath",function(a){null!=a&&(this.filePath=a.trim(),this.filePathForwardSlash=this.filePath.$replace("\\","/"))},"~S");c(c$,"getFilePath",function(){return this.filePath});c(c$,"getFilePathForwardSlash",function(){return this.filePathForwardSlash});c(c$,"setBlockID",function(a){this.blockID=a},"~N");
c(c$,"isImaginary",function(){return this.varName.contains("IMAG")});c(c$,"setXFactor",function(a){this.xFactor=a},"~N");c(c$,"getXFactor",function(){return this.xFactor});c(c$,"setYFactor",function(a){this.yFactor=a},"~N");c(c$,"getYFactor",function(){return this.yFactor});c(c$,"checkRequiredTokens",function(){var a=1.7976931348623157E308==this.fileFirstX?"##FIRSTX":1.7976931348623157E308==this.fileLastX?"##LASTX":-1==this.nPointsFile?"##NPOINTS":1.7976931348623157E308==this.xFactor?"##XFACTOR":
1.7976931348623157E308==this.yFactor?"##YFACTOR":null;if(null!=a)throw new JSV.exception.JSVException("Error Reading Data Set: "+a+" not found");});c(c$,"setXUnits",function(a){this.xUnits=a},"~S");c(c$,"getXUnits",function(){return this.xUnits});c(c$,"setYUnits",function(a){a.equals("PPM")&&(a="ARBITRARY UNITS");this.yUnits=a},"~S");c(c$,"getYUnits",function(){return this.yUnits});c(c$,"setXLabel",function(a){this.xLabel=a},"~S");c(c$,"setYLabel",function(a){this.yLabel=a},"~S");c(c$,"setObservedNucleus",
function(a){this.observedNucl=a;1==this.numDim&&(this.parent.nucleusX=this.nucleusX=this.fixNucleus(a))},"~S");c(c$,"setObservedFreq",function(a){this.observedFreq=a},"~N");c(c$,"getObservedFreq",function(){return this.observedFreq});c(c$,"is1D",function(){return 1==this.numDim});c(c$,"setY2D",function(a){this.y2D=a},"~N");c(c$,"getY2D",function(){return this.y2D});c(c$,"setY2DUnits",function(a){this.y2DUnits=a},"~S");c(c$,"getY2DPPM",function(){var a=this.y2D;this.y2DUnits.equals("HZ")&&(a/=this.freq2dY);
return a});c(c$,"setNucleusAndFreq",function(a,b){a=this.fixNucleus(a);b?this.nucleusX=a:this.nucleusY=a;var c;if(0<=this.observedNucl.indexOf(a))c=this.observedFreq;else{c=JSV.source.JDXDataObject.getGyroMagneticRatio(this.observedNucl);var e=JSV.source.JDXDataObject.getGyroMagneticRatio(a);c=this.observedFreq*e/c}b?this.freq2dX=c:this.freq2dY=c;JU.Logger.info("Freq for "+a+" = "+c)},"~S,~B");c(c$,"fixNucleus",function(a){return JU.PT.rep(JU.PT.trim(a,"[]^<>"),"NUC_","")},"~S");c$.getGyroMagneticRatio=
c(c$,"getGyroMagneticRatio",function(a){for(var b=0;b<a.length&&!Character.isDigit(a.charAt(b));)b++;b=JU.PT.parseInt(a.substring(b));for(a=0;a<JSV.source.JDXDataObject.gyroData.length&&!(JSV.source.JDXDataObject.gyroData[a]>=b);a+=2);return JSV.source.JDXDataObject.gyroData[a]==b?JSV.source.JDXDataObject.gyroData[a+1]:NaN},"~S");c(c$,"isTransmittance",function(){var a=this.yUnits.toLowerCase();return a.equals("transmittance")||a.contains("trans")||a.equals("t")});c(c$,"isAbsorbance",function(){var a=
this.yUnits.toLowerCase();return a.equals("absorbance")||a.contains("abs")||a.equals("a")});c(c$,"canSaveAsJDX",function(){return this.getDataClass().equals("XYDATA")});c(c$,"canIntegrate",function(){return this.continuous&&(this.isHNMR()||this.isGC())&&this.is1D()});c(c$,"isAutoOverlayFromJmolClick",function(){return this.isGC()});c(c$,"isGC",function(){return this.dataType.startsWith("GC")||this.dataType.startsWith("GAS")});c(c$,"isMS",function(){return this.dataType.startsWith("MASS")||this.dataType.startsWith("MS")});
c(c$,"isStackable",function(){return!this.isMS()});c(c$,"isScalable",function(){return!0});c(c$,"getYRef",function(){return!this.isTransmittance()?0:2>JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length)?1:100});c(c$,"isInverted",function(){return this.isTransmittance()});c(c$,"canConvertTransAbs",function(){return this.continuous&&this.yUnits.toLowerCase().contains("abs")||this.yUnits.toLowerCase().contains("trans")});c(c$,"canShowSolutionColor",function(){return this.isContinuous()&&
this.canConvertTransAbs()&&(this.xUnits.toLowerCase().contains("nanometer")||this.xUnits.equalsIgnoreCase("nm"))&&401>this.getFirstX()&&699<this.getLastX()&&30<=this.xyCoords.length});c(c$,"isHZtoPPM",function(){return this.$isHZtoPPM});c(c$,"setHZtoPPM",function(a){this.$isHZtoPPM=a},"~B");c(c$,"setIncreasing",function(a){this.xIncreases=a},"~B");c(c$,"isXIncreasing",function(){return this.xIncreases});c(c$,"shouldDisplayXAxisIncreasing",function(){var a=this.dataType.toUpperCase(),b=this.xUnits.toUpperCase();
return a.contains("NMR")&&!a.contains("FID")||a.contains("LINK")&&b.contains("CM")||a.startsWith("IR")||a.contains("INFRA")&&b.contains("CM")||a.contains("RAMAN")&&b.contains("CM")?!1:a.contains("VIS")&&b.contains("NANOMETERS")?!0:this.xIncreases});c(c$,"setContinuous",function(a){this.continuous=a},"~B");c(c$,"isContinuous",function(){return this.continuous});c(c$,"getHeaderRowDataAsArray",function(){var a=8;1.7976931348623157E308!=this.observedFreq&&a++;""!==this.observedNucl&&a++;var b=this.getHeaderRowDataAsArray(!0,
a),a=b.length-a;1.7976931348623157E308!=this.observedFreq&&(b[a++]=["##.OBSERVE FREQUENCY",""+this.observedFreq]);""!==this.observedNucl&&(b[a++]=["##.OBSERVE NUCLEUS",this.observedNucl]);b[a++]=["##XUNITS",this.$isHZtoPPM?"HZ":this.xUnits];b[a++]=["##YUNITS",this.yUnits];var c=this.xIncreases?this.getFirstX():this.getLastX();b[a++]=["##FIRSTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)];c=this.xIncreases?this.getLastX():this.getFirstX();b[a++]=["##FIRSTY",String.valueOf(this.xIncreases?
this.getFirstY():this.getLastY())];b[a++]=["##LASTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)];b[a++]=["##XFACTOR",String.valueOf(this.getXFactor())];b[a++]=["##YFACTOR",String.valueOf(this.getYFactor())];b[a++]=["##NPOINTS",String.valueOf(this.xyCoords.length)];return b});c(c$,"getDefaultUnitPrecision",function(){return 2});c(c$,"setMeasurementText",function(a){var b=a.getValue();if(Double.isNaN(b))return"";var c=1,e="";if(this.isNMR())if(1==this.numDim)a=w(a,JSV.common.Integral),this.isHNMR()||
a?a||(b*=this.observedFreq,e=" Hz"):(e=" ppm",c=2);else return"";return 0.1>b?"":JU.DF.formatDecimalDbl(b,c)+e},"JSV.common.Measurement");c(c$,"isNMR",function(){return 0<=this.dataType.toUpperCase().indexOf("NMR")});c(c$,"isHNMR",function(){return this.isNMR()&&0<=this.observedNucl.toUpperCase().indexOf("H")});c(c$,"setXYCoords",function(a){this.xyCoords=a},"~A");c(c$,"getFirstX",function(){return this.xyCoords[0].getXVal()});c(c$,"getFirstY",function(){return this.xyCoords[0].getYVal()});c(c$,"getLastX",
function(){return this.xyCoords[this.xyCoords.length-1].getXVal()});c(c$,"getLastY",function(){return this.xyCoords[this.xyCoords.length-1].getYVal()});c(c$,"getMinX",function(){return Double.isNaN(this.minX)?this.minX=JSV.common.Coordinate.getMinX(this.xyCoords,0,this.xyCoords.length):this.minX});c(c$,"getMinY",function(){return Double.isNaN(this.minY)?this.minY=JSV.common.Coordinate.getMinY(this.xyCoords,0,this.xyCoords.length):this.minY});c(c$,"getMaxX",function(){return Double.isNaN(this.maxX)?
this.maxX=JSV.common.Coordinate.getMaxX(this.xyCoords,0,this.xyCoords.length):this.maxX});c(c$,"getMaxY",function(){return Double.isNaN(this.maxY)?this.maxY=JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length):this.maxY});c(c$,"doNormalize",function(a){this.isNMR()&&this.is1D()&&(this.normalizationFactor=a/this.getMaxY(),this.maxY=NaN,JSV.common.Coordinate.applyScale(this.xyCoords,1,this.normalizationFactor),JU.Logger.info("Y values have been scaled by a factor of "+this.normalizationFactor))},
"~N");c(c$,"getDeltaX",function(){return Double.isNaN(this.deltaX)?this.deltaX=JSV.common.Coordinate.deltaX(this.getLastX(),this.getFirstX(),this.xyCoords.length):this.deltaX});c(c$,"copyTo",function(a){a.setTitle(this.title);a.setJcampdx(this.jcampdx);a.setOrigin(this.origin);a.setOwner(this.owner);a.setDataClass(this.dataClass);a.setDataType(this.dataType);a.setHeaderTable(this.headerTable);a.setXFactor(this.xFactor);a.setYFactor(this.yFactor);a.setXUnits(this.xUnits);a.setYUnits(this.yUnits);a.setXLabel(this.xLabel);
a.setYLabel(this.yLabel);a.setXYCoords(this.xyCoords);a.setContinuous(this.continuous);a.setIncreasing(this.xIncreases);a.observedFreq=this.observedFreq;a.observedNucl=this.observedNucl;a.offset=this.offset;a.dataPointNum=this.dataPointNum;a.shiftRefType=this.shiftRefType;a.$isHZtoPPM=this.$isHZtoPPM;a.numDim=this.numDim;a.nucleusX=this.nucleusX;a.nucleusY=this.nucleusY;a.freq2dX=this.freq2dX;a.freq2dY=this.freq2dY;a.setFilePath(this.filePath);a.nH=this.nH},"JSV.source.JDXDataObject");c(c$,"getTypeLabel",
function(){return this.isNMR()?this.nucleusX+"NMR":this.dataType});c(c$,"getDefaultAnnotationInfo",function(a){var b,c=this.isNMR();switch(a){case JSV.common.Annotation.AType.Integration:return[null,[1],null];case JSV.common.Annotation.AType.Measurements:return a=c?["Hz","ppm"]:[""],b=this.isHNMR()?[1,4]:[1,3],[a,b,Integer.$valueOf(0)];case JSV.common.Annotation.AType.PeakList:return a=c?["Hz","ppm"]:[""],b=this.isHNMR()?[1,2]:[1,1],[a,b,Integer.$valueOf(c?1:0)]}return null},"JSV.common.Annotation.AType");
c(c$,"getPeakListArray",function(a,b,c){var e=a.getXVal();a=a.getYVal();this.isNMR()&&(a/=c);c=Math.abs(e-b[0]);b[0]=e;var f=c+b[1];b[1]=c;var h=f+b[2];b[2]=f;return this.isNMR()?[e,a,e*this.observedFreq,20<c*this.observedFreq?0:c*this.observedFreq,20<f*this.observedFreq?0:f*this.observedFreq,20<h*this.observedFreq?0:h*this.observedFreq]:[e,a]},"JSV.common.Measurement,~A,~N");C(c$,"ERROR",1.7976931348623157E308,"SCALE_NONE",0,"SCALE_TOP",1,"SCALE_BOTTOM",2,"SCALE_TOP_BOTTOM",3,"gyroData",[1,42.5774806,
2,6.53590131,3,45.4148,3,32.436,6,6.2661,7,16.5483,9,5.9842,10,4.5752,11,13.663,13,10.70839657,14,3.07770646,15,4.3172657,17,5.7742,19,40.07757016,21,3.3631,23,11.26952167,25,2.6083,27,11.1031,29,8.4655,31,17.2514409,33,3.2717,35,4.1765,37,3.4765,37,5.819,39,3.46,39,1.9893,40,2.4737,41,1.0919,43,2.8688,45,10.3591,47,2.4041,49,2.4048,50,4.2505,51,11.2133,53,2.4115,55,10.5763,57,1.3816,59,10.077,61,3.8114,63,11.2982,65,12.103,67,2.6694,69,10.2478,71,13.0208,73,1.4897,75,7.315,77,8.1571,79,10.7042,81,
11.5384,83,1.6442,85,4.1254,87,13.9811,87,1.8525,89,2.0949,91,3.9748,93,10.4523,95,2.7874,97,2.8463,99,9.6294,99,1.9553,101,2.1916,103,1.3477,105,1.957,107,1.7331,109,1.9924,111,9.0692,113,9.4871,113,9.3655,115,9.3856,115,14.0077,117,15.261,119,15.966,121,10.2551,123,5.5532,123,11.2349,125,13.5454,127,8.5778,129,11.8604,131,3.5159,133,5.6234,135,4.2582,137,4.7634,138,5.6615,139,6.0612,137,4.88,139,5.39,141,2.37,141,13.0359,143,2.319,145,1.429,143,11.59,147,5.62,147,1.7748,149,14631,151,10.5856,153,
4.6745,155,1.312,157,1.72,159,10.23,161,1.4654,163,2.0508,165,9.0883,167,1.2281,169,3.531,171,7.5261,173,2.073,175,4.8626,176,3.451,177,1.7282,179,1.0856,180,4.087,181,5.1627,183,1.7957,185,9.7176,187,9.817,187,0.9856,189,3.3536,191,0.7658,191,0.8319,195,9.2922,197,0.7406,199,7.7123,201,2.8469,203,24.7316,205,24.9749,207,9.034,209,6.963,209,11.7,211,9.16,223,5.95,223,1.3746,225,11.187,227,5.6,229,1.4,231,10.2,235,0.83,237,9.57,239,3.09,243,4.6,1E100])}),q("JSV.source"),r(null,"JSV.source.JDXDecompressor",
["java.lang.Double","JSV.common.Coordinate","JU.Logger"],function(){c$=k(function(){this.lineNumber=this.ich=this.nPoints=this.deltaX=this.yFactor=this.xFactor=0;this.t=null;this.dx=this.firstX=0;this.maxY=4.9E-324;this.minY=1.7976931348623157E308;this.debugging=!1;this.xyCoords=null;this.ipt=0;this.lastLine=this.line=null;this.lineLen=0;this.errorLog=null;this.lastDif=this.difVal=-2147483648;this.yval=this.xval=this.dupCount=0;this.firstLastX=null;n(this,arguments)},JSV.source,"JDXDecompressor");
c(c$,"getMinY",function(){return this.minY});c(c$,"getMaxY",function(){return this.maxY});p(c$,function(a,b,c,e,f,h){this.t=a;this.firstX=b;this.xFactor=c;this.yFactor=e;this.deltaX=f;this.nPoints=h;this.lineNumber=a.labelLineNo;this.debugging=JU.Logger.isActiveLevel(6)},"JSV.source.JDXSourceStreamTokenizer,~N,~N,~N,~N,~N");c(c$,"addPoint",function(a){if(this.ipt==this.xyCoords.length){var b=Array(2*this.ipt);System.arraycopy(this.xyCoords,0,b,0,this.ipt);this.xyCoords=b}b=a.getYVal();b>this.maxY?
this.maxY=b:b<this.minY&&(this.minY=b);this.debugging&&this.logError("Coord: "+this.ipt+a);this.xyCoords[this.ipt++]=a;this.firstLastX[1]=a.getXVal()},"JSV.common.Coordinate");c(c$,"decompressData",function(a,b){this.errorLog=a;this.firstLastX=b;this.debugging&&this.logError("firstX="+this.firstX+" xFactor="+this.xFactor+" yFactor="+this.yFactor+" deltaX="+this.deltaX+" nPoints="+this.nPoints);this.testAlgorithm();this.xyCoords=Array(this.nPoints);var c=Math.abs(0.35*this.deltaX),e=Math.abs(1.4*this.deltaX),
f=Math.abs(0.6*this.deltaX);try{for(;null!=(this.line=this.t.readLineTrimmed())&&0>this.line.indexOf("##");)if(this.lineNumber++,this.debugging&&this.logError(this.lineNumber+"\t"+this.line),0!=(this.lineLen=this.line.length)){this.ich=0;var h=-2147483648!=this.lastDif;this.xval=this.getValueDelim()*this.xFactor;0==this.ipt&&(b[0]=this.xval,this.dx=this.firstX-this.xval);this.xval+=this.dx;var m=(new JSV.common.Coordinate).set(this.xval,(this.yval=this.getYValue())*this.yFactor);if(0==this.ipt)this.addPoint(m);
else{var j=this.xyCoords[this.ipt-1],l=Math.abs(j.getXVal()-m.getXVal());if(h&&l<c){this.xyCoords[this.ipt-1]=m;var k=j.getYVal(),n=m.getYVal();n!=k&&this.logError(this.lastLine+"\n"+this.line+"\nY-value Checkpoint Error! Line "+this.lineNumber+" for y1="+n+" y0="+k)}else this.addPoint(m),(l<f||l>e)&&this.logError(this.lastLine+"\n"+this.line+"\nX-sequence Checkpoint Error! Line "+this.lineNumber+" |x1-x0|="+l+" instead of "+Math.abs(this.deltaX)+" for x1="+m.getXVal()+" x0="+j.getXVal())}for(;this.ich<
this.lineLen||-2147483648!=this.difVal||0<this.dupCount;)this.xval+=this.deltaX,Double.isNaN(this.yval=this.getYValue())||this.addPoint((new JSV.common.Coordinate).set(this.xval,this.yval*this.yFactor));this.lastLine=this.line}}catch(p){if(!y(p,java.io.IOException))throw p;}this.nPoints!=this.ipt&&(this.logError("Decompressor did not find "+this.nPoints+" points -- instead "+this.ipt),c=Array(this.ipt),System.arraycopy(this.xyCoords,0,c,0,this.ipt),this.xyCoords=c);return 0<this.deltaX?this.xyCoords:
JSV.common.Coordinate.reverse(this.xyCoords)},"JU.SB,~A");c(c$,"logError",function(a){this.debugging&&JU.Logger.debug(a);this.errorLog.append(a).appendC("\n")},"~S");c(c$,"getYValue",function(){if(0<this.dupCount)return--this.dupCount,this.yval=-2147483648==this.lastDif?this.yval:this.yval+this.lastDif;if(-2147483648!=this.difVal)return this.yval+=this.difVal,this.lastDif=this.difVal,this.difVal=-2147483648,this.yval;if(this.ich==this.lineLen)return NaN;var a=this.line.charAt(this.ich);this.debugging&&
JU.Logger.info(""+a);switch(a){case "%":this.difVal=0;break;case "J":case "K":case "L":case "M":case "N":case "O":case "P":case "Q":case "R":this.difVal=a.charCodeAt(0)-73;break;case "j":case "k":case "l":case "m":case "n":case "o":case "p":case "q":case "r":this.difVal=105-a.charCodeAt(0);break;case "S":case "T":case "U":case "V":case "W":case "X":case "Y":case "Z":this.dupCount=a.charCodeAt(0)-82;break;case "s":this.dupCount=9;break;case "+":case "-":case ".":case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":case "@":case "A":case "B":case "C":case "D":case "E":case "F":case "G":case "H":case "I":case "a":case "b":case "c":case "d":case "e":case "f":case "g":case "h":case "i":return this.lastDif=
-2147483648,this.getValue();case "?":return this.lastDif=-2147483648,NaN;default:return this.ich++,this.lastDif=-2147483648,this.getYValue()}this.ich++;-2147483648!=this.difVal?this.difVal=this.getDifDup(this.difVal):this.dupCount=this.getDifDup(this.dupCount)-1;return this.getYValue()});c(c$,"getDifDup",function(a){var b=this.ich;this.next();var c=a+this.line.substring(b,this.ich);return b==this.ich?a:Integer.$valueOf(c).intValue()},"~N");c(c$,"getValue",function(){var a=this.ich;if(this.ich==this.lineLen)return NaN;
var a=this.line.charAt(this.ich),b=0;switch(a){case "+":case "-":case ".":case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":return this.getValueDelim();case "@":case "A":case "B":case "C":case "D":case "E":case "F":case "G":case "H":case "I":b=a.charCodeAt(0)-64;a=++this.ich;break;case "a":case "b":case "c":case "d":case "e":case "f":case "g":case "h":case "i":b=96-a.charCodeAt(0);a=++this.ich;break;default:return this.ich++,this.getValue()}this.next();return Double.$valueOf(b+
this.line.substring(a,this.ich)).doubleValue()});c(c$,"getValueDelim",function(){for(var a=this.ich,b="\x00";this.ich<this.lineLen&&0<=" ,\t\n".indexOf(b=this.line.charAt(this.ich));)this.ich++;var c=1;switch(b){case "-":c=-1;case "+":a=++this.ich}b=this.next();if("E"==b&&this.ich+3<this.lineLen)switch(this.line.charAt(this.ich+1)){case "-":case "+":this.ich+=4,this.ich<this.lineLen&&("0"<=(b=this.line.charAt(this.ich))&&"9">=b)&&this.ich++}return c*Double.$valueOf(this.line.substring(a,this.ich)).doubleValue()});
c(c$,"next",function(){for(;this.ich<this.lineLen&&0>"+-%@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs? ,\t\n".indexOf(this.line.charAt(this.ich));)this.ich++;return this.ich==this.lineLen?"\x00":this.line.charAt(this.ich)});c(c$,"testAlgorithm",function(){});C(c$,"allDelim","+-%@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs? ,\t\n","WHITE_SPACE"," ,\t\n")}),q("JSV.source"),r(["JU.Lst"],"JSV.source.JDXHeader",null,function(){c$=k(function(){this.title="";this.jcampdx="5.01";this.origin=this.dataClass=
this.dataType="";this.owner="PUBLIC DOMAIN";this.time=this.date=this.longDate="";this.headerTable=this.qualifiedType=null;n(this,arguments)},JSV.source,"JDXHeader");F(c$,function(){this.headerTable=new JU.Lst});c(c$,"setTitle",function(a){this.title=a},"~S");c(c$,"setJcampdx",function(a){this.jcampdx=a},"~S");c(c$,"setDataType",function(a){this.dataType=a},"~S");c(c$,"setDataClass",function(a){this.dataClass=a},"~S");c(c$,"setOrigin",function(a){this.origin=a},"~S");c(c$,"setOwner",function(a){this.owner=
a},"~S");c(c$,"setLongDate",function(a){this.longDate=a},"~S");c(c$,"setDate",function(a){this.date=a},"~S");c(c$,"setTime",function(a){this.time=a},"~S");c(c$,"getTitle",function(){return this.title});c$.getTypeName=c(c$,"getTypeName",function(a){a=a.toUpperCase();for(var b=0;b<JSV.source.JDXHeader.typeNames.length;b++)if(JSV.source.JDXHeader.typeNames[b].startsWith(a))return JSV.source.JDXHeader.typeNames[b].substring(18);return a},"~S");c(c$,"getQualifiedDataType",function(){return null==this.qualifiedType?
this.qualifiedType=JSV.source.JDXHeader.getTypeName(this.dataType):this.qualifiedType});c(c$,"getJcampdx",function(){return this.jcampdx});c(c$,"getDataType",function(){return this.dataType});c(c$,"getOrigin",function(){return this.origin});c(c$,"getOwner",function(){return this.owner});c(c$,"getLongDate",function(){return this.longDate});c(c$,"getDate",function(){return this.date});c(c$,"getTime",function(){return this.time});c(c$,"getDataClass",function(){return this.dataClass});c(c$,"setHeaderTable",
function(a){this.headerTable=a},"JU.Lst");c(c$,"getHeaderTable",function(){return this.headerTable});c(c$,"getHeaderRowDataAsArray",function(a,b){var c=Array((a?6:5)+this.headerTable.size()+b),e=0;c[e++]=["##TITLE",this.title];c[e++]=["##JCAMP-DX",this.jcampdx];c[e++]=["##DATA TYPE",this.dataType];a&&(c[e++]=["##DATA CLASS",this.dataClass]);c[e++]=["##ORIGIN",this.origin];c[e++]=["##OWNER",this.owner];for(var f=0;f<this.headerTable.size();f++)c[e++]=this.getRow(f);return c},"~B,~N");c(c$,"getRow",
function(a){a=this.headerTable.get(a);return[a[0],JU.PT.rep(a[1],"<","&lt;")]},"~N");C(c$,"typeNames","ND NMR SPECTRUM   NMR;NMR SPECTRUM      NMR;INFRARED SPECTRUM IR;MASS SPECTRUM     MS;RAMAN SPECTRUM    RAMAN;GAS CHROMATOGRAM  GC;UV/VIS SPECTRUM   UV/VIS".split(";"))}),q("JSV.source"),r(["J.api.JmolJDXMOLReader"],"JSV.source.JDXReader","java.io.BufferedReader $.StringReader java.lang.Double $.Float java.util.Hashtable $.StringTokenizer JU.Lst $.PT $.SB JSV.api.JSVZipReader JSV.common.Coordinate $.JSVFileManager $.JSViewer $.PeakInfo $.Spectrum JSV.exception.JSVException JSV.source.JDXDecompressor $.JDXSource $.JDXSourceStreamTokenizer JU.Logger".split(" "),
function(){c$=k(function(){this.nmrMaxY=NaN;this.errorLog=this.t=this.source=null;this.isZipFile=this.done=this.obscure=!1;this.filePath=null;this.loadImaginary=!0;this.isTabularData=this.isSimulation=!1;this.blockID=this.nSpec=this.lastSpec=this.firstSpec=0;this.peakData=this.acdMolFile=this.acdAssignments=this.modelSpectrum=this.reader=this.mpr=null;n(this,arguments)},JSV.source,"JDXReader",null,J.api.JmolJDXMOLReader);c$.getVarList=c(c$,"getVarList",function(a){a=JSV.source.JDXReader.VAR_LIST_TABLE[0].indexOf(a);
return JSV.source.JDXReader.VAR_LIST_TABLE[1].substring(a+1,a+12).trim()},"~S");p(c$,function(a,b,c,e,f,h){a=JU.PT.trimQuotes(a);if(this.isSimulation=null!=a&&a.startsWith("http://SIMULATION/"))this.nmrMaxY=Float.isNaN(h)?1E4:h;this.filePath=a;this.obscure=b;this.firstSpec=e;this.lastSpec=f;this.loadImaginary=c},"~S,~B,~B,~N,~N,~N");c$.createJDXSourceFromStream=c(c$,"createJDXSourceFromStream",function(a,b,c,e){return JSV.source.JDXReader.createJDXSource(JSV.common.JSVFileManager.getBufferedReaderForInputStream(a),
"stream",b,c,-1,-1,e)},"java.io.InputStream,~B,~B,~N");c$.createJDXSource=c(c$,"createJDXSource",function(a,b,c,e,f,h,m){var j=null;try{null==a&&(a=JSV.common.JSVFileManager.getBufferedReaderFromName(b,"##TITLE"));a.mark(400);var l=S(400,"\x00");a.read(l,0,400);a.reset();var j=String.instantialize(l),k=j.indexOf("#"),n=j.indexOf("<");if(0>k||0<=n&&n<k){var p=j.toLowerCase(),p=p.contains("<animl")||p.contains("<!doctype technique")?"AnIML":p.contains("xml-cml")?"CML":null;c=null;null!=p&&(c=JSV.common.JSViewer.getInterface("JSV.source."+
p+"Reader").getSource(b,a));a.close();if(null==c)throw JU.Logger.error(j+"..."),new JSV.exception.JSVException("File type not recognized");return c}return(new JSV.source.JDXReader(b,c,e,f,h,m)).getJDXSource(a)}catch(q){if(y(q,Exception))throw null!=a&&a.close(),null!=j&&JU.Logger.error(j+"..."),a=q.getMessage(),new JSV.exception.JSVException("Error reading data: "+a);throw q;}},"java.io.BufferedReader,~S,~B,~B,~N,~N,~N");c(c$,"getJDXSource",function(a){this.source=new JSV.source.JDXSource(0,this.filePath);
this.isZipFile=w(a,JSV.api.JSVZipReader);this.t=new JSV.source.JDXSourceStreamTokenizer(a);this.errorLog=new JU.SB;for(var b=a=null,c=!1;!this.done&&"##TITLE".equals(this.t.peakLabel());){c=!0;null!=a&&!this.isZipFile&&this.errorLog.append("Warning - file is a concatenation without LINK record -- does not conform to IUPAC standards!\n");for(var e=new JSV.common.Spectrum,f=new JU.Lst;!this.done&&null!=(a=this.t.getLabel())&&null!=(b=this.getValue(a));)if(this.isTabularData){this.setTabularDataType(e,
a);if(!this.processTabularData(e,f))throw new JSV.exception.JSVException("Unable to read JDX file");this.addSpectrum(e,!1);e=null}else a.equals("##DATATYPE")&&b.toUpperCase().equals("LINK")?(this.getBlockSpectra(f),e=null):a.equals("##NTUPLES")||a.equals("##VARNAME")?(this.getNTupleSpectra(f,e,a),e=null):(null==e&&(e=new JSV.common.Spectrum),this.readDataLabel(e,a,b,this.errorLog,this.obscure)||(JSV.source.JDXReader.addHeader(f,this.t.rawLabel,b),this.checkCustomTags(e,a,b)))}if(!c)throw new JSV.exception.JSVException("##TITLE record not found");
this.source.setErrorLog(this.errorLog.toString());return this.source},"~O");c(c$,"getValue",function(a){var b=this.isTabularDataLabel(a)?"":this.t.getValue();return"##END".equals(a)?null:b},"~S");c(c$,"isTabularDataLabel",function(a){return this.isTabularData=0<="##DATATABLE##PEAKTABLE##XYDATA##XYPOINTS#".indexOf(a+"#")},"~S");c(c$,"addSpectrum",function(a,b){if(!this.loadImaginary&&a.isImaginary())return JU.Logger.info("FileReader skipping imaginary spectrum -- use LOADIMAGINARY TRUE to load this spectrum."),
!0;if(null!=this.acdAssignments){if(!a.dataType.equals("MASS SPECTRUM")&&!a.isContinuous())return JU.Logger.info("Skipping ACD Labs line spectrum for "+a),!0;if(0<this.acdAssignments.size())try{this.mpr.setACDAssignments(a.title,a.getTypeLabel(),this.source.peakCount,this.acdAssignments,this.acdMolFile)}catch(c){if(y(c,Exception))JU.Logger.info("Failed to create peak data: "+c);else throw c;}null!=this.acdMolFile&&JSV.common.JSVFileManager.htCorrelationCache.put("mol",this.acdMolFile)}Float.isNaN(this.nmrMaxY)?
1E4<=a.getMaxY()&&a.doNormalize(1E3):a.doNormalize(this.nmrMaxY);this.isSimulation&&a.setSimulated(this.filePath);this.nSpec++;if(0<this.firstSpec&&this.nSpec<this.firstSpec)return!0;if(0<this.lastSpec&&this.nSpec>this.lastSpec)return!(this.done=!0);a.setBlockID(this.blockID);this.source.addJDXSpectrum(null,a,b);return!0},"JSV.common.Spectrum,~B");c(c$,"getBlockSpectra",function(a){JU.Logger.debug("--JDX block start--");for(var b="",c=null,e=0==this.source.type,f=!1;null!=(b=this.t.getLabel())&&!b.equals("##TITLE");)c=
this.getValue(b),e&&!JSV.source.JDXReader.readHeaderLabel(this.source,b,c,this.errorLog,this.obscure)&&JSV.source.JDXReader.addHeader(a,this.t.rawLabel,c),b.equals("##BLOCKS")&&100<JU.PT.parseInt(c)&&0>=this.firstSpec&&(f=!0);c=this.getValue(b);if(!"##TITLE".equals(b))throw new JSV.exception.JSVException("Unable to read block source");e&&this.source.setHeaderTable(a);this.source.type=1;this.source.isCompoundSource=!0;e=new JSV.common.Spectrum;a=new JU.Lst;this.readDataLabel(e,b,c,this.errorLog,this.obscure);
try{for(var h;null!=(h=this.t.getLabel());){if(null==(c=this.getValue(h))&&"##END".equals(b)){JU.Logger.debug("##END= "+this.t.getValue());break}b=h;if(this.isTabularData){if(this.setTabularDataType(e,b),!this.processTabularData(e,a))throw new JSV.exception.JSVException("Unable to read Block Source");}else{if(b.equals("##DATATYPE")&&c.toUpperCase().equals("LINK"))this.getBlockSpectra(a),b=e=null;else if(b.equals("##NTUPLES")||b.equals("##VARNAME"))this.getNTupleSpectra(a,e,b),e=null,b="";if(this.done)break;
if(null==e){e=new JSV.common.Spectrum;a=new JU.Lst;if(""===b)continue;if(null==b){b="##END";continue}}if(null==c){if(0<e.getXYCoords().length&&!this.addSpectrum(e,f))return this.source;e=new JSV.common.Spectrum;a=new JU.Lst}else this.readDataLabel(e,b,c,this.errorLog,this.obscure)||(JSV.source.JDXReader.addHeader(a,this.t.rawLabel,c),this.checkCustomTags(e,b,c))}}}catch(k){if(y(k,Exception))throw new JSV.exception.JSVException(k.getMessage());throw k;}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());
JU.Logger.debug("--JDX block end--");return this.source},"JU.Lst");c(c$,"addErrorLogSeparator",function(){0<this.errorLog.length()&&this.errorLog.lastIndexOf("=====================\n")!=this.errorLog.length()-22&&this.errorLog.append("=====================\n")});c(c$,"getNTupleSpectra",function(a,b,c){var e=[1.7976931348623157E308,4.9E-324];this.blockID=Math.random();0<this.firstSpec&&(b.numDim=1);var f=c.equals("##VARNAME");f||(c="");var h=new java.util.Hashtable,k=Array(2);0==this.source.type&&
(this.source.type=2,this.source.isCompoundSource=!0,this.source.setHeaderTable(a));for(;!(c=f?c:this.t.getLabel()).equals("##PAGE");){for(var f=!1,j=new java.util.StringTokenizer(this.t.getValue(),","),l=new JU.Lst;j.hasMoreTokens();)l.addLast(j.nextToken().trim());h.put(c,l)}f=h.get("##SYMBOL");if(!c.equals("##PAGE"))throw new JSV.exception.JSVException("Error Reading NTuple Source");for(var j=this.t.getValue(),l=null,p=!0;!this.done;){if((c=this.t.getLabel()).equals("##ENDNTUPLES")){this.t.getValue();
break}if(c.equals("##PAGE"))j=this.t.getValue();else{if(null==l&&(l=new JSV.common.Spectrum,b.copyTo(l),l.setTitle(b.getTitle()),!l.is1D())){var n=j.indexOf("=");if(0<=n)try{l.setY2D(Double.parseDouble(j.substring(n+1).trim()));var q=j.substring(0,n).trim(),r=f.indexOf(q);0<=r&&l.setY2DUnits(h.get("##UNITS").get(r))}catch(s){if(!y(s,Exception))throw s;}}n=new JU.Lst;for(l.setHeaderTable(n);!c.equals("##DATATABLE");)JSV.source.JDXReader.addHeader(n,this.t.rawLabel,this.t.getValue()),c=this.t.getLabel();
c=!0;r=this.t.flushLine();0<r.trim().indexOf("PEAKS")&&(c=!1);var t=r.indexOf("("),v=r.lastIndexOf(")");if(-1==t||-1==v)throw new JSV.exception.JSVException("Variable List not Found");t=r.substring(t,v+1);for(r=v=0;r<f.size();r++){var w=f.get(r).trim();-1!=t.indexOf(w)&&(k[v++]=w);if(2==v)break}this.setTabularDataType(l,"##"+(c?"XYDATA":"PEAKTABLE"));if(!this.readNTUPLECoords(l,h,k,e))throw new JSV.exception.JSVException("Unable to read Ntuple Source");l.nucleusX.equals("?")||(b.nucleusX=l.nucleusX);
b.nucleusY=l.nucleusY;b.freq2dX=l.freq2dX;b.freq2dY=l.freq2dY;b.y2DUnits=l.y2DUnits;for(r=0;r<a.size();r++)c=a.get(r),t=JSV.source.JDXSourceStreamTokenizer.cleanLabel(c[0]),!t.equals("##TITLE")&&(!t.equals("##DATACLASS")&&!t.equals("##NTUPLES"))&&n.addLast(c);this.addSpectrum(l,!p);p=!1;l=null}}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());JU.Logger.info("NTUPLE MIN/MAX Y = "+e[0]+" "+e[1]);return this.source},"JU.Lst,JSV.source.JDXDataObject,~S");c(c$,"readDataLabel",
function(a,b,c,e,f){if(JSV.source.JDXReader.readHeaderLabel(a,b,c,e,f))return!0;b+=" ";if(0<="##MINX ##MINY ##MAXX ##MAXY ##FIRSTY ##DELTAX ##DATACLASS ".indexOf(b))return!0;switch("##FIRSTX  ##LASTX   ##NPOINTS ##XFACTOR ##YFACTOR ##XUNITS  ##YUNITS  ##XLABEL  ##YLABEL  ##NUMDIM  ##OFFSET  ".indexOf(b)){case 0:return a.fileFirstX=Double.parseDouble(c),!0;case 10:return a.fileLastX=Double.parseDouble(c),!0;case 20:return a.nPointsFile=Integer.parseInt(c),!0;case 30:return a.xFactor=Double.parseDouble(c),
!0;case 40:return a.yFactor=Double.parseDouble(c),!0;case 50:return a.setXUnits(c),!0;case 60:return a.setYUnits(c),!0;case 70:a.setXLabel(c);break;case 80:a.setYLabel(c);break;case 90:return a.numDim=Integer.parseInt(c),!0;case 100:0!=a.shiftRefType&&(1.7976931348623157E308==a.offset&&(a.offset=Double.parseDouble(c)),a.dataPointNum=1,a.shiftRefType=1);break;default:if(17>b.length)break;if(b.equals("##.OBSERVEFREQUENCY "))return a.observedFreq=Double.parseDouble(c),!0;if(b.equals("##.OBSERVENUCLEUS "))return a.setObservedNucleus(c),
!0;if(b.equals("##$REFERENCEPOINT ")&&0!=a.shiftRefType){a.offset=Double.parseDouble(c);a.dataPointNum=1;a.shiftRefType=2;break}if(b.equals("##.SHIFTREFERENCE ")){if(!a.dataType.toUpperCase().contains("SPECTRUM"))return!0;b=new java.util.StringTokenizer(c,",");if(4!=b.countTokens())return!0;try{b.nextToken(),b.nextToken(),a.dataPointNum=Integer.parseInt(b.nextToken().trim()),a.offset=Double.parseDouble(b.nextToken().trim())}catch(h){if(y(h,Exception))return!0;throw h;}0>=a.dataPointNum&&(a.dataPointNum=
1);a.shiftRefType=0;return!0}}return!1},"JSV.source.JDXDataObject,~S,~S,JU.SB,~B");c$.readHeaderLabel=c(c$,"readHeaderLabel",function(a,b,c,e,f){switch("##TITLE#####JCAMPDX###ORIGIN####OWNER#####DATATYPE##LONGDATE##DATE######TIME####".indexOf(b+"#")){case 0:return a.setTitle(f||null==c||c.equals("")?"Unknown":c),!0;case 10:return a.jcampdx=c,a=JU.PT.parseFloat(c),(6<=a||Float.isNaN(a))&&null!=e&&e.append("Warning: JCAMP-DX version may not be fully supported: "+c+"\n"),!0;case 20:return a.origin=null!=
c&&!c.equals("")?c:"Unknown",!0;case 30:return a.owner=null!=c&&!c.equals("")?c:"Unknown",!0;case 40:return a.dataType=c,!0;case 50:return a.longDate=c,!0;case 60:return a.date=c,!0;case 70:return a.time=c,!0}return!1},"JSV.source.JDXHeader,~S,~S,JU.SB,~B");c(c$,"setTabularDataType",function(a,b){b.equals("##PEAKASSIGNMENTS")?a.setDataClass("PEAKASSIGNMENTS"):b.equals("##PEAKTABLE")?a.setDataClass("PEAKTABLE"):b.equals("##XYDATA")?a.setDataClass("XYDATA"):b.equals("##XYPOINTS")&&a.setDataClass("XYPOINTS")},
"JSV.source.JDXDataObject,~S");c(c$,"processTabularData",function(a,b){a.setHeaderTable(b);if(a.dataClass.equals("XYDATA"))return a.checkRequiredTokens(),this.decompressData(a,null),!0;if(a.dataClass.equals("PEAKTABLE")||a.dataClass.equals("XYPOINTS")){a.setContinuous(a.dataClass.equals("XYPOINTS"));try{this.t.readLineTrimmed()}catch(c){if(!y(c,java.io.IOException))throw c;}var e;e=1.7976931348623157E308!=a.xFactor&&1.7976931348623157E308!=a.yFactor?JSV.common.Coordinate.parseDSV(this.t.getValue(),
a.xFactor,a.yFactor):JSV.common.Coordinate.parseDSV(this.t.getValue(),1,1);a.setXYCoords(e);e=JSV.common.Coordinate.deltaX(e[e.length-1].getXVal(),e[0].getXVal(),e.length);a.setIncreasing(0<e);return!0}return!1},"JSV.source.JDXDataObject,JU.Lst");c(c$,"readNTUPLECoords",function(a,b,c,e){var f;if(a.dataClass.equals("XYDATA")){f=b.get("##SYMBOL");var h=f.indexOf(c[0]);c=f.indexOf(c[1]);f=b.get("##VARNAME");a.varName=f.get(c).toUpperCase();f=b.get("##FACTOR");a.xFactor=Double.parseDouble(f.get(h));
a.yFactor=Double.parseDouble(f.get(c));f=b.get("##LAST");a.fileLastX=Double.parseDouble(f.get(h));f=b.get("##FIRST");a.fileFirstX=Double.parseDouble(f.get(h));f=b.get("##VARDIM");a.nPointsFile=Integer.parseInt(f.get(h));f=b.get("##UNITS");a.setXUnits(f.get(h));a.setYUnits(f.get(c));null==a.nucleusX&&null!=(f=b.get("##.NUCLEUS"))?(a.setNucleusAndFreq(f.get(0),!1),a.setNucleusAndFreq(f.get(h),!0)):null==a.nucleusX&&(a.nucleusX="?");this.decompressData(a,e);return!0}return a.dataClass.equals("PEAKTABLE")||
a.dataClass.equals("XYPOINTS")?(a.setContinuous(a.dataClass.equals("XYPOINTS")),f=b.get("##SYMBOL"),h=f.indexOf(c[0]),c=f.indexOf(c[1]),f=b.get("##UNITS"),a.setXUnits(f.get(h)),a.setYUnits(f.get(c)),a.setXYCoords(JSV.common.Coordinate.parseDSV(this.t.getValue(),a.xFactor,a.yFactor)),!0):!1},"JSV.source.JDXDataObject,java.util.Map,~A,~A");c(c$,"decompressData",function(a,b){var c=this.errorLog.length(),e=JSV.common.Coordinate.deltaX(a.fileLastX,a.fileFirstX,a.nPointsFile);a.setIncreasing(0<e);a.setContinuous(!0);
var f=new JSV.source.JDXDecompressor(this.t,a.fileFirstX,a.xFactor,a.yFactor,e,a.nPointsFile),h=Y(2,0),k=System.currentTimeMillis(),j=f.decompressData(this.errorLog,h);JU.Logger.debugging&&JU.Logger.debug("decompression time = "+(System.currentTimeMillis()-k)+" ms");a.setXYCoords(j);k=f.getMinY();null!=b&&(k<b[0]&&(b[0]=k),k=f.getMaxY(),k>b[1]&&(b[1]=k));f=Double.isNaN(a.freq2dX)?a.observedFreq:a.freq2dX;1.7976931348623157E308!=a.offset&&(1.7976931348623157E308!=f&&a.dataType.toUpperCase().contains("SPECTRUM"))&&
JSV.common.Coordinate.applyShiftReference(j,a.dataPointNum,a.fileFirstX,a.fileLastX,a.offset,f,a.shiftRefType);1.7976931348623157E308!=f&&a.getXUnits().toUpperCase().equals("HZ")&&(JSV.common.Coordinate.applyScale(j,1/f,1),a.setXUnits("PPM"),a.setHZtoPPM(!0));this.errorLog.length()!=c&&(this.errorLog.append(a.getTitle()).append("\n"),this.errorLog.append("firstX: "+a.fileFirstX+" Found "+h[0]+"\n"),this.errorLog.append("lastX from Header "+a.fileLastX+" Found "+h[1]+"\n"),this.errorLog.append("deltaX from Header "+
e+"\n"),this.errorLog.append("Number of points in Header "+a.nPointsFile+" Found "+j.length+"\n"));JU.Logger.debugging&&System.err.println(this.errorLog.toString())},"JSV.source.JDXDataObject,~A");c$.addHeader=c(c$,"addHeader",function(a,b,c){for(var e,f=0;f<a.size();f++)if((e=a.get(f))[0].equals(b)){e[1]=c;return}a.addLast([b,c,JSV.source.JDXSourceStreamTokenizer.cleanLabel(b)])},"JU.Lst,~S,~S");c(c$,"checkCustomTags",function(a,b,c){10<b.length&&(b=b.substring(0,10));null==a?System.out.println(b):
this.modelSpectrum=a;b="##$MODELS ##$PEAKS  ##$SIGNALS##$MOLFILE##PEAKASSI##$UVIRASS##$MSFRAGM".indexOf(b);if(0>b)return!1;this.getMpr().set(this,this.filePath,null);try{switch(this.reader=new java.io.BufferedReader(new java.io.StringReader(c)),b){case 0:this.mpr.readModels();break;case 10:case 20:this.peakData=new JU.Lst;this.source.peakCount+=this.mpr.readPeaks(20==b,this.source.peakCount);break;case 30:this.acdAssignments=new JU.Lst;this.acdMolFile=JU.PT.rep(c,"$$ Empty String","");break;case 40:case 50:case 60:this.acdAssignments=
this.mpr.readACDAssignments(a.nPointsFile,40==b);break}}catch(e){if(y(e,Exception))throw new JSV.exception.JSVException(e.getMessage());throw e;}finally{this.reader=null}return!0},"JSV.common.Spectrum,~S,~S");c(c$,"getMpr",function(){return null==this.mpr?this.mpr=JSV.common.JSViewer.getInterface("J.jsv.JDXMOLParser"):this.mpr});e(c$,"rd",function(){return this.reader.readLine()});e(c$,"setSpectrumPeaks",function(a,b,c){this.modelSpectrum.setPeakList(this.peakData,b,c);this.modelSpectrum.isNMR()&&
this.modelSpectrum.setNHydrogens(a)},"~N,~S,~S");e(c$,"addPeakData",function(a){null==this.peakData&&(this.peakData=new JU.Lst);this.peakData.addLast(new JSV.common.PeakInfo(a))},"~S");e(c$,"processModelData",function(){},"~S,~S,~S,~S,~S,~N,~N,~B");e(c$,"discardLinesUntilContains",function(a){for(var b;null!=(b=this.rd())&&0>b.indexOf(a););return b},"~S");e(c$,"discardLinesUntilContains2",function(a,b){for(var c;null!=(c=this.rd())&&0>c.indexOf(a)&&0>c.indexOf(b););return c},"~S,~S");e(c$,"discardLinesUntilNonBlank",
function(){for(var a;null!=(a=this.rd())&&0==a.trim().length;);return a});C(c$,"VAR_LIST_TABLE",["PEAKTABLE   XYDATA      XYPOINTS"," (XY..XY)    (X++(Y..Y)) (XY..XY)    "],"ERROR_SEPARATOR","=====================\n")}),q("JSV.source"),r(["JSV.source.JDXHeader"],"JSV.source.JDXSource",["JU.Lst"],function(){c$=k(function(){this.type=0;this.isCompoundSource=!1;this.jdxSpectra=null;this.errors="";this.filePath=null;this.peakCount=0;this.isView=!1;n(this,arguments)},JSV.source,"JDXSource",JSV.source.JDXHeader);
c(c$,"dispose",function(){this.jdxSpectra=this.headerTable=null});p(c$,function(a,b){x(this,JSV.source.JDXSource,[]);this.type=a;this.setFilePath(b);this.headerTable=new JU.Lst;this.jdxSpectra=new JU.Lst;this.isCompoundSource=0!=a},"~N,~S");c(c$,"getJDXSpectrum",function(a){return this.jdxSpectra.size()<=a?null:this.jdxSpectra.get(a)},"~N");c(c$,"addJDXSpectrum",function(a,b,c){null==a&&(a=this.filePath);b.setFilePath(a);a=this.jdxSpectra.size();(0==a||!this.jdxSpectra.get(a-1).addSubSpectrum(b,c))&&
this.jdxSpectra.addLast(b)},"~S,JSV.common.Spectrum,~B");c(c$,"getNumberOfSpectra",function(){return this.jdxSpectra.size()});c(c$,"getSpectra",function(){return this.jdxSpectra});c(c$,"getSpectraAsArray",function(){return null==this.jdxSpectra?null:this.jdxSpectra.toArray()});c(c$,"getErrorLog",function(){return this.errors});c(c$,"setErrorLog",function(a){this.errors=a},"~S");c(c$,"setFilePath",function(a){this.filePath=a},"~S");c(c$,"getFilePath",function(){return this.filePath});c$.createView=
c(c$,"createView",function(a){var b=new JSV.source.JDXSource(-2,"view");b.isView=!0;for(var c=0;c<a.size();c++)b.addJDXSpectrum(a.get(c).getFilePath(),a.get(c),!1);return b},"JU.Lst");c(c$,"getHeaderRowDataAsArray",function(a,b){null==b&&(b=D(0,0,null));for(var c=this.getHeaderRowDataAsArray(a,b.length),e=b.length;0<=--e;)c[c.length-b.length+e]=b[e];return c},"~B,~A");c(c$,"setID",function(a){this.jdxSpectra.get(0).sourceID=a},"~S");C(c$,"TYPE_VIEW",-2,"TYPE_UNKNOWN",-1,"TYPE_SIMPLE",0,"TYPE_BLOCK",
1,"TYPE_NTUPLE",2)}),q("JSV.source"),r(null,"JSV.source.JDXSourceStreamTokenizer",["java.lang.Character","JU.SB","JU.Logger"],function(){c$=k(function(){this.value=this.rawLabel=this.br=null;this.labelLineNo=0;this.line=null;this.lineNo=0;n(this,arguments)},JSV.source,"JDXSourceStreamTokenizer");p(c$,function(a){this.br=a},"java.io.BufferedReader");c(c$,"peakLabel",function(){return this.nextLabel(!1)});c(c$,"getLabel",function(){return this.nextLabel(!0)});c(c$,"nextLabel",function(a){for(this.value=
this.rawLabel=null;null==this.line||0==this.line.length;){try{this.readLine();if(null==this.line)return this.line="",null;this.line=this.line.trim()}catch(b){if(y(b,java.io.IOException))return this.line="",null;throw b;}if(this.line.startsWith("##"))break;this.line=null}var c=this.line.indexOf("=");0>c?(a&&JU.Logger.info("BAD JDX LINE -- no '=' (line "+this.lineNo+"): "+this.line),this.rawLabel=this.line,a||(this.line="")):(this.rawLabel=this.line.substring(0,c).trim(),a&&(this.line=this.line.substring(c+
1)));this.labelLineNo=this.lineNo;JU.Logger.debugging&&JU.Logger.info(this.rawLabel);return JSV.source.JDXSourceStreamTokenizer.cleanLabel(this.rawLabel)},"~B");c$.cleanLabel=c(c$,"cleanLabel",function(a){if(null==a)return null;var b,c=new JU.SB;for(b=0;b<a.length;b++)switch(a.charAt(b)){case "/":case "\\":case " ":case "-":case "_":break;default:c.appendC(a.charAt(b))}return c.toString().toUpperCase()},"~S");c(c$,"getValue",function(){if(null!=this.value)return this.value;var a=(new JU.SB).append(this.line);
0<a.length()&&a.appendC("\n");try{for(;null!=this.readLine()&&!(0<=this.line.indexOf("##")&&this.line.trim().startsWith("##"));)a.append(this.line).appendC("\n")}catch(b){if(y(b,java.io.IOException))JU.Logger.info(b.toString());else throw b;}this.value=this.rawLabel.startsWith("##$")?a.toString().trim():JSV.source.JDXSourceStreamTokenizer.trimLines(a);JU.Logger.debugging&&JU.Logger.info(this.value);return this.value});c(c$,"readLineTrimmed",function(){this.readLine();if(null==this.line)return null;
if(0>this.line.indexOf("$$"))return this.line.trim();var a=(new JU.SB).append(this.line);return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});c(c$,"flushLine",function(){var a=(new JU.SB).append(this.line);this.line=null;return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});c(c$,"readLine",function(){this.line=this.br.readLine();this.lineNo++;return this.line});c$.trimLines=c(c$,"trimLines",function(a){var b=a.length(),c=b-1,e=JSV.source.JDXSourceStreamTokenizer.ptNonWhite(a,0,b);if(e>=b)return"";
for(var f=S(b-e,"\x00"),h=0;e<b;e++){var k;switch(k=a.charAt(e)){case "\r":if(e<c&&"\n"==a.charAt(e+1))continue;k="\n";break;case "\n":0<h&&"\n"!=f[h-1]&&(h-=e-JSV.source.JDXSourceStreamTokenizer.ptNonSpaceRev(a,e)-1);e=JSV.source.JDXSourceStreamTokenizer.ptNonSpace(a,++e,b)-1;break;case "$":if(e<c&&"$"==a.charAt(e+1)){for(e++;++e<b&&0>"\n\r".indexOf(a.charAt(e)););continue}}"\n"==k&&0<h&&"\n"==f[h-1]||(f[h++]=k)}0<h&&"\n"==f[h-1]&&--h;return String.instantialize(f).substring(0,h).trim()},"JU.SB");
c$.ptNonWhite=c(c$,"ptNonWhite",function(a,b,c){for(;b<c&&Character.isWhitespace(a.charAt(b));)b++;return b},"JU.SB,~N,~N");c$.ptNonSpace=c(c$,"ptNonSpace",function(a,b,c){for(;b<c&&(" "==a.charAt(b)||"\t"==a.charAt(b));)b++;return b},"JU.SB,~N,~N");c$.ptNonSpaceRev=c(c$,"ptNonSpaceRev",function(a,b){for(;0<=--b&&(" "==a.charAt(b)||"\t"==a.charAt(b)););return b},"JU.SB,~N")}),q("JSV.tree"),r(["JSV.api.JSVTree"],"JSV.tree.SimpleTree",["JSV.common.JSVFileManager","$.PanelNode","JSV.tree.SimpleTreeModel",
"$.SimpleTreeNode","$.SimpleTreePath"],function(){c$=k(function(){this.selectedPath=this.vwr=this.spectraTreeModel=this.rootNode=this.si=null;n(this,arguments)},JSV.tree,"SimpleTree",null,JSV.api.JSVTree);e(c$,"getRootNode",function(){return this.rootNode});p(c$,function(a){this.vwr=a;this.rootNode=new JSV.tree.SimpleTreeNode("Spectra",null);this.spectraTreeModel=new JSV.tree.SimpleTreeModel(this.rootNode)},"JSV.common.JSViewer");c(c$,"valueChanged",function(){this.vwr.selectedTreeNode(this.getLastSelectedPathComponent())});
c(c$,"getLastSelectedPathComponent",function(){return null==this.selectedPath?null:this.selectedPath.getLastPathComponent()});e(c$,"setSelectedPanel",function(a,b){if(null!=b){var c=JSV.common.PanelNode.findNode(b,this.vwr.panelNodes).treeNode;this.setSelectionPath(this.vwr.spectraTree.newTreePath(c.getPath()))}},"JSV.api.ScriptInterface,JSV.api.JSVPanel");c(c$,"setSelectionPath",function(a){this.selectedPath=a;this.valueChanged()},"JSV.api.JSVTreePath");e(c$,"createTree",function(a,b,c){var e=this.vwr.spectraTree,
f=e.getRootNode(),h=this.vwr.panelNodes,k=JSV.common.JSVFileManager.getTagName(b.getFilePath()),j=new JSV.common.PanelNode(null,k,b,null),l=new JSV.tree.SimpleTreeNode(k,j);j.setTreeNode(l);e.spectraTreeModel.insertNodeInto(l,f,f.getChildCount());for(f=0;f<c.length;f++){var j=new JSV.common.PanelNode(a+"."+(f+1),k,b,c[f]),n=new JSV.tree.SimpleTreeNode(j.toString(),j);j.setTreeNode(n);h.addLast(j);e.spectraTreeModel.insertNodeInto(n,l,l.getChildCount())}this.vwr.selectFrameNode(c[0]);return l},"~N,JSV.source.JDXSource,~A");
e(c$,"setPath",function(a){this.setSelectionPath(a)},"JSV.api.JSVTreePath");c(c$,"newTreePath",function(a){return new JSV.tree.SimpleTreePath(a)},"~A");e(c$,"deleteNodes",function(a){for(var b=0;b<a.size();b++)this.spectraTreeModel.removeNodeFromParent(a.get(b))},"JU.Lst")}),q("JSV.tree"),r(["java.util.Enumeration"],"JSV.tree.SimpleTreeEnumeration",null,function(){c$=k(function(){this.node=null;this.pt=0;n(this,arguments)},JSV.tree,"SimpleTreeEnumeration",null,java.util.Enumeration);p(c$,function(a){this.node=
a},"JSV.tree.SimpleTreeNode");e(c$,"hasMoreElements",function(){return this.pt<this.node.$children.size()});e(c$,"nextElement",function(){return this.node.$children.get(this.pt++)})}),q("JSV.tree"),c$=k(function(){this.rootNode=null;n(this,arguments)},JSV.tree,"SimpleTreeModel"),p(c$,function(a){this.rootNode=a},"JSV.api.JSVTreeNode"),c(c$,"insertNodeInto",function(a,b,c){b.$children.add(c,a);a.prevNode=b},"JSV.api.JSVTreeNode,JSV.api.JSVTreeNode,~N"),c(c$,"removeNodeFromParent",function(a){a.prevNode.$children.removeObj(a)},
"JSV.api.JSVTreeNode"),q("JSV.tree"),r(["JSV.api.JSVTreeNode"],"JSV.tree.SimpleTreeNode",["JU.Lst","JSV.tree.SimpleTreeEnumeration"],function(){c$=k(function(){this.panelNode=null;this.index=0;this.text=this.$children=this.prevNode=null;n(this,arguments)},JSV.tree,"SimpleTreeNode",null,JSV.api.JSVTreeNode);p(c$,function(a,b){this.text=a;this.panelNode=b;this.$children=new JU.Lst},"~S,JSV.common.PanelNode");e(c$,"getPanelNode",function(){return this.panelNode});e(c$,"getIndex",function(){return this.index});
e(c$,"setIndex",function(a){this.index=a},"~N");e(c$,"children",function(){return new JSV.tree.SimpleTreeEnumeration(this)});e(c$,"getChildCount",function(){return this.$children.size()});e(c$,"getPath",function(){var a=new JU.Lst,b=this;for(a.addLast(b);null!=(b=b.prevNode);)a.add(0,b);return a.toArray()});e(c$,"isLeaf",function(){return null!=this.prevNode&&null!=this.prevNode.prevNode});e(c$,"toString",function(){return this.text})}),q("JSV.tree"),r(["JSV.api.JSVTreePath"],"JSV.tree.SimpleTreePath",
null,function(){c$=k(function(){this.path=null;n(this,arguments)},JSV.tree,"SimpleTreePath",null,JSV.api.JSVTreePath);p(c$,function(a){this.path=a},"~A");e(c$,"getLastPathComponent",function(){return null==this.path||0==this.path.length?null:this.path[this.path.length-1]})}));U._coreLoaded=!0})(Clazz,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.defineStatics,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.p0p,Clazz.pu$h,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,
Clazz.overrideConstructor,Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.cloneFinals);
