biojs-vis-pdbviewer
Version:
A BioJS 2.0 component to view protein structures
1,205 lines • 623 kB
JavaScript
(function(U,V,P,w,Q,k,u,t,n,q,I,p,r,A,G,C,W,s,H,x,K,B,y,z,ea,D,F,L,E,R,ra,N,S,$,T,X,Y,O,fa,sa,ga,ha,aa,Z,ia,ja,ka,la,ma,ba,na,oa,ca,da,pa,c,e,M,qa){___JmolDate="$Date: 2014-08-03 08:56:51 -0500 (Sun, 03 Aug 2014) $";___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";___JmolVersion="14.2.4_2014.08.03";(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 f=a._extendedObjectMethods[d];Array.prototype[f]=a._O.prototype[f];Number.prototype[f]=a._O.prototype[f]}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)};S(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()};O(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 f=a.charCodeAt(d);if(!(48<=f&&57>=f)&&(0<d||43!=f&&45!=f))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||!u(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)};S(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()};O(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||!u(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)};S(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()};
O(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||!u(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)};S(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||!u(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)};S(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())};
O(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||!u(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){n(this,arguments)};S(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())};O(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||!u(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++)f=a._extendedObjectMethods[d],Boolean.prototype[f]=a._O.prototype[f];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;O(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 u(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(!u(d,IllegalArgumentException)&&!u(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),f=0;d==b.UTF8?f=3:d==b.UTF16&&
(f=2);for(d=[];f<a.length;f++){var c=a.charCodeAt(f);if(128>c)d[d.length]=a.charAt(f);else if(192<c&&224>c){c&=31;f++;var h=a.charCodeAt(f)&63,c=(c<<6)+h;d[d.length]=String.fromCharCode(c)}else if(224<=c){c&=15;f++;h=a.charCodeAt(f)&63;f++;var e=a.charCodeAt(f)&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),f=0;if(d==b.UTF8)return a;d==b.UTF16&&(f=2);for(var d=Array(0+a.length-f),c=f;c<a.length;c++){var h=a.charCodeAt(c);
if(128>h)d[0+c-f]=a.charAt(c);else if(2047>=h){var e=192+((h&1984)>>6),l=128+(h&63);d[0+c-f]=String.fromCharCode(e)+String.fromCharCode(l)}else e=224+((h&61440)>>12),l=128+((h&4032)>>6),h=128+(h&63),d[0+c-f]=String.fromCharCode(e)+String.fromCharCode(l)+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,f=a.length,c=0,h=[],e,l;c<f;)e=
a.charCodeAt(c++),h[h.length]=d[e>>2],c<f?(l=a.charCodeAt(c++),h[h.length]=d[e<<4&48|l>>4],c<f?(e=a.charCodeAt(c++),h[h.length]=d[l<<2&60|e>>6],h[h.length]=d[e&63]):(h[h.length]=d[l<<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,f=b.xBase64Chars;if(null==b.xBase64Chars){for(var f={},c=0;c<d.length;c++)f[d[c]]=c;b.xBase64Chars=f}for(var d=a.length,c=0,h=[],e,l,p,n,q=
0;c<d&&6E4>q++;)e=f[a.charAt(c++)],l=f[a.charAt(c++)],p=f[a.charAt(c++)],n=f[a.charAt(c++)],h[h.length]=String.fromCharCode(e<<2&255|l>>4),null!=p&&(h[h.length]=String.fromCharCode(l<<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 f=a._extendedObjectMethods[d];"to$tring"==f||("toString"==f||"equals"==f||"hashCode"==f)||
(String.prototype[f]=a._O.prototype[f])}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=[],f=0;b[0]="";for(var c=0;c<a.length;c++){var g=a.charAt(c);c!=a.length-1&&"\\"==g?(c++,g=a.charAt(c),"\\"==g&&(b[f]+="\\"),b[f]+=g):c!=a.length-1&&"$"==g?(c++,d[f]=parseInt(a.charAt(c)),f++,b[f]=""):b[f]="\r"==g?b[f]+"\\r":"\n"==g?b[f]+"\\n":"\t"==g?b[f]+"\\t":'"'==g?b[f]+'\\"':b[f]+g}a="f = function (";f=Math.max.apply({},d);for(c=0;c<=f;c++)a+="$"+c,c!=f&&(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,f,c){if("number"==typeof a||!0!=a&&!1!=a)c=f,f=d,d=b,b=a,a=!1;if(0>f||0>b||b>this.length-c||f>d.length-c)return!1;b=this.substring(b,b+c);d=d.substring(f,f+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"),f=1,c=this.replace(d,function(a){f++;return f==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 f=d,c=0,g=b.length;
if(0>d||d>a.length-g)return!1;for(;0<=--g;)if(a.charAt(f++)!=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,f=0;f<d;f++)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(),f="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),c=!1,h=0;h<f.length;h++)if(f[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=f=0;h<a.length;h++)f=a.charCodeAt(h),255<f?(d[c]=26,d[c+1]=f&255,d[c+2]=(f&65280)>>8,c+=2):d[c]=f,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],f=Array(d),c=0;c<d;c++)f[c]=a[b+c];return f.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,f=this.length;0!=f--;)if(this.charCodeAt(b++)!=a[d++])return!1;
return!0};a.getChars=function(a,b,d,f){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[f+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),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]&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),f=0;f<c;f++)a[f]=d[f];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(f=0;f<c;f++)d[f]=a[h+f];else for(f=0;f<c;f++)d[f]=String.fromCharCode(a[h+f]);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(f=0;f<c;f++)d[f]=a[h+f],"number"==
typeof d[f]&&(d[f]=String.fromCharCode(d[f]&255));f=e.toLowerCase();return"utf-8"==f||"utf8"==f?b.readUTF8(d.join("")):d.join("")}f=arguments[3];h=arguments[2];c=arguments[1];d=Array(f);if(0==c)for(;0<f--;)d[f]=String.fromCharCode(a[f+h]&255);else for(c<<=8;0<f--;)d[f]=String.fromCharCode(c|a[f+h]&255);return d.join("");default:d="";for(f=0;f<arguments.length;f++)d+=arguments[f];return d}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this})}})(a._Encoding);
c$=q(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 u(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){if(48<=a.charCodeAt(0)&&57>=a.charCodeAt(0))return!0;a.charCodeAt(0);return!1},"~N");c$.isUpperCase=c(c$,"isUpperCase",function(a){return 65<=a.charCodeAt(0)&&90>=a.charCodeAt(0)?!0:!1},"~N");c$.isLowerCase=c(c$,"isLowerCase",function(a){return 97<=a.charCodeAt(0)&&122>=a.charCodeAt(0)?!0:!1},"~N");c$.isWhitespace=c(c$,"isWhitespace",function(a){a=
a.charCodeAt(0);if(28<=a&&32>=a||9<=a&&13>=a||5760==a)return!0;if(8192>a||8199==a)return!1;8203>=returni||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){return Character.isLetter(a)||Character.isDigit(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 f=-1;48<=d&&57>=d?f=d-48:97<=d&&122>=d?f=d-87:65<=d&&90>=d&&(f=d-55);return f<b?f:-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$=s(java.lang.reflect,"Array");c$.newInstance=c(c$,"newInstance",function(){return E(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 u(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$=q(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$=q(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$=q(function(){this.stackTrace=this.cause=this.detailMessage=null;n(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);H(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],f=d.methodName.indexOf("(");if("construct"!=d.methodName.substring(0,f).replace(/\s+/g,"")||null==d.nativeClazz||0>
ga(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,f=[],c=a._callingStackTraces.length-1,e=!0;-1<c||null!=b;){var v=null;if(!e||b==oa||b==N||null==b){if(0>c)break;e=!0;d=a._callingStackTraces[c].caller;v=a._callingStackTraces[c].owner;c--}else d=
b,null!=d.claxxOwner?v=d.claxxOwner:null!=d.exClazz&&(v=d.exClazz);b=new StackTraceElement(null!=v&&0!=v.__CLASS_NAME__.length?v.__CLASS_NAME__:"anonymous",(null==d.exName?"anonymous":d.exName)+" ("+ha(d.arguments)+")",null,-1);b.nativeClazz=v;this.stackTrace[this.stackTrace.length]=b;for(v=0;v<f.length;v++)f[v]==d&&(b=new StackTraceElement("lost","missing",null,-3),b.nativeClazz=null,this.stackTrace[this.stackTrace.length]=b,e=!1);null!=d&&(f[f.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$=q(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,f){if(null==a||null==b)throw new NullPointerException;this.declaringClass=a;this.methodName=b;this.fileName=d;this.lineNumber=f},"~S,~S,~S,~N");
e(c$,"equals",function(a){if(!u(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$=s(java.lang,"Error",Throwable);c$=s(java.lang,"LinkageError",Error);c$=s(java.lang,"IncompatibleClassChangeError",LinkageError);c$=s(java.lang,
"AbstractMethodError",IncompatibleClassChangeError);c$=s(java.lang,"AssertionError",Error);p(c$,function(a){x(this,AssertionError,[String.valueOf(a),u(a,Throwable)?a:null])},"~O");p(c$,function(a){this.construct(""+a)},"~B");p(c$,function(a){this.construct(""+a)},"~N");c$=s(java.lang,"ClassCircularityError",LinkageError);c$=s(java.lang,"ClassFormatError",LinkageError);c$=q(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$=s(java.lang,"IllegalAccessError",IncompatibleClassChangeError);c$=s(java.lang,"InstantiationError",IncompatibleClassChangeError);c$=s(java.lang,"VirtualMachineError",
Error);c$=s(java.lang,"InternalError",VirtualMachineError);c$=s(java.lang,"NoClassDefFoundError",LinkageError);c$=s(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);c$=s(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);c$=s(java.lang,"OutOfMemoryError",VirtualMachineError);c$=s(java.lang,"StackOverflowError",VirtualMachineError);c$=s(java.lang,"UnknownError",VirtualMachineError);c$=s(java.lang,"UnsatisfiedLinkError",LinkageError);c$=s(java.lang,"UnsupportedClassVersionError",
ClassFormatError);c$=s(java.lang,"VerifyError",LinkageError);c$=s(java.lang,"ThreadDeath",Error);p(c$,function(){x(this,ThreadDeath,[])});c$=s(java.lang,"Exception",Throwable);c$=s(java.lang,"RuntimeException",Exception);c$=s(java.lang,"ArithmeticException",RuntimeException);c$=s(java.lang,"IndexOutOfBoundsException",RuntimeException);c$=s(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);p(c$,function(a){x(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},
"~N");c$=s(java.lang,"ArrayStoreException",RuntimeException);c$=s(java.lang,"ClassCastException",RuntimeException);c$=q(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$=s(java.lang,"CloneNotSupportedException",Exception);c$=s(java.lang,"IllegalAccessException",Exception);c$=s(java.lang,"IllegalArgumentException",RuntimeException);p(c$,function(a){x(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");c$=s(java.lang,"IllegalMonitorStateException",RuntimeException);c$=s(java.lang,"IllegalStateException",RuntimeException);p(c$,function(a){x(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");c$=s(java.lang,"IllegalThreadStateException",
IllegalArgumentException);c$=s(java.lang,"InstantiationException",Exception);c$=s(java.lang,"InterruptedException",Exception);c$=s(java.lang,"NegativeArraySizeException",RuntimeException);c$=s(java.lang,"NoSuchFieldException",Exception);c$=s(java.lang,"NoSuchMethodException",Exception);c$=s(java.lang,"NullPointerException",RuntimeException);c$=s(java.lang,"NumberFormatException",IllegalArgumentException);c$=s(java.lang,"SecurityException",RuntimeException);p(c$,function(a){x(this,SecurityException,
[null==a?null:a.toString(),a])},"Throwable");c$=s(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);p(c$,function(a){x(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");c$=s(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$=q(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$=q(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$=s(java.io,"IOException",
Exception);c$=s(java.io,"CharConversionException",java.io.IOException);c$=s(java.io,"EOFException",java.io.IOException);c$=s(java.io,"FileNotFoundException",java.io.IOException);c$=q(function(){this.bytesTransferred=0;n(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);c$=s(java.io,"ObjectStreamException",java.io.IOException);c$=q(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=N(this,java.io.InvalidClassException,"getMessage",[]);null!=this.classname&&(a=this.classname+"; "+a);return a});c$=s(java.io,"InvalidObjectException",java.io.ObjectStreamException);c$=s(java.io,"NotActiveException",java.io.ObjectStreamException);c$=s(java.io,"NotSerializableException",java.io.ObjectStreamException);c$=q(function(){this.eof=!1;this.length=0;n(this,arguments)},java.io,"OptionalDataException",java.io.ObjectStreamException);
c$=s(java.io,"StreamCorruptedException",java.io.ObjectStreamException);c$=s(java.io,"SyncFailedException",java.io.IOException);c$=s(java.io,"UnsupportedEncodingException",java.io.IOException);c$=s(java.io,"UTFDataFormatException",java.io.IOException);c$=q(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=
N(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?a+"; "+this.detail.toString():a});e(c$,"getCause",function(){return this.detail});c$=s(b,"ConcurrentModificationException",RuntimeException);p(c$,function(){x(this,b.ConcurrentModificationException,[])});c$=s(b,"EmptyStackException",RuntimeException);c$=q(function(){this.key=this.className=null;n(this,arguments)},b,"MissingResourceException",RuntimeException);p(c$,function(a,d,f){x(this,b.MissingResourceException,[a]);this.className=
d;this.key=f},"~S,~S,~S");c(c$,"getClassName",function(){return this.className});c(c$,"getKey",function(){return this.key});c$=s(b,"NoSuchElementException",RuntimeException);c$=s(b,"TooManyListenersException",Exception);c$=s(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$=s(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$=s(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$=q(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,f){x(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=b;this.exceptionTypes=d;this.modifiers=f},"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&&u(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(da);n(b,a);return b},"~A");e(c$,"toString",function(){return null});c$=s(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$=q(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,f,c,e){x(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=b;this.parameterTypes=d;this.returnType=f;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&&u(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||(t(null,"java.lang.AbstractStringBuilder","java.io.InvalidObjectException java.lang.ArrayIndexOutOfBoundsException $.IndexOutOfBoundsException $.NegativeArraySizeException $.NullPointerException $.StringIndexOutOfBoundsException".split(" "),function(){c$=q(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=E(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=E(16,"\x00")});p(c$,function(a){if(0>a)throw new NegativeArraySizeException;this.value=E(a,"\x00")},"~N");p(c$,function(a){this.count=a.length;this.shared=!1;this.value=E(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=E(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 f=this.count+d;f>this.value.length?this.enlargeBuffer(f):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,b,this.value,this.count,d);this.count=f}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 f=E(this.value.length,"\x00");System.arraycopy(this.value,
0,f,0,a);System.arraycopy(this.value,b,f,a,d);this.value=f;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=E(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,f){if(a>this.count||b>this.count||a>b)throw new StringIndexOutOfBoundsException;System.arraycopy(this.value,a,d,f,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,f){if(0<=a&&a<=this.count){if(0<=d&&0<=f&&f<=b.length-d){0!=f&&(this.move(f,a),System.arraycopy(b,d,this.value,a,f),this.count+=f);return}throw new StringIndexOutOfBoundsException("offset "+d+", len "+f+", 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,f){null==b&&(b="null");if(0>a||a>this.count||0>d||0>f||d>f||f>b.length())throw new IndexOutOfBoundsException;this.insert0(a,b.subSequence(d,f).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 f=(this.value.length<<1)+2;d=d>f?d:f}d=E(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 f=d.length,c=b-a-f;if(0<c)if(this.shared){var h=E(this.value.length,"\x00");System.arraycopy(this.value,
0,h,0,a);System.arraycopy(this.value,b,h,a+f,this.count-b);this.value=h;this.shared=!1}else System.arraycopy(this.value,b,this.value,a+f,this.count-b);else 0>c?this.move(-c,b):this.shared&&(this.value=this.value.clone(),this.shared=!1);d.getChars(0,f,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=E(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 f=this.value[--d];this.value[d]=this.value[b];this.value[b]=f}});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=E(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 f=a.charAt(0);;){for(var c=b,h=!1;c<this.count;c++)if(this.value[c].charCodeAt(0)==f.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 f=a.charAt(0);;){for(var c=b,h=!1;0<=c;--c)if(this.value[c].charCodeAt(0)==f.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=E(this.count,"\x00");System.arraycopy(this.value,0,a,0,this.count);
this.value=a;this.shared=!1}});C(c$,"INITIAL_CAPACITY",16)}),t(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException","java.security.AccessController","$.PrivilegedExceptionAction"],function(){c$=q(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 f,c=0;c<d.length&&((f=d[c])||1);c++)if(f.$name.equals(b))return f;throw new IllegalArgumentException("KA006");},"Class,~S");c$.getValues=c(c$,"getValues",function(a){try{return java.security.AccessController.doPrivileged((F("Enum$1")?0:java.lang.Enum.$Enum$1$(),D(Enum$1,this,qa("enumType",a)))).invoke(a,R("Array"))}catch(b){if(u(b,Exception))return null;throw b;}},"Class");c$.$Enum$1$=function(){z(self.c$);c$=M(null,
"Enum$1",null,java.security.PrivilegedExceptionAction);e(c$,"run",function(){var a=this.f$.enumType.getMethod("values",null);a.setAccessible(!0);return a});c$=y()}}),t(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){c$=s(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,f){this.insert0(a,b,d,f);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,f){this.insert0(a,b,d,f);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 N(this,StringBuffer,"substring",[a,b])},"~N,~N")}),t(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){c$=s(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,f){this.insert0(a,b,d,f);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,f){this.insert0(a,b,d,f);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})}),t(null,"java.lang.Thread",["java.lang.IllegalArgumentException","$.ThreadGroup","java.util.Date"],function(){c$=q(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,f){this.init(a,b,d,f)},"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)}),t(null,"java.lang.ThreadGroup",["java.lang.NullPointerException","$.Thread"],function(){c$=q(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})}),t(["java.io.FilterInputStream"],"java.io.BufferedInputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException"],function(){c$=q(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=K(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=K(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 f=this.count-this.pos;if(0>=f){if(d>=this.getBufIfOpen().length&&0>this.markpos)return this.getInIfOpen().read(a,b,d);this.fill();f=this.count-this.pos;if(0>=f)return-1}d=f<d?f: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 f=0;;){var c=this.read1(a,
b+f,d-f);if(0>=c)return 0==f?c:f;f+=c;if(f>=d)return f;c=this.$in;if(null!=c&&0>=c.available())return f}},"~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)}),t(["java.io.Reader"],"java.io.BufferedReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","JU.SB"],function(){c$=q(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=T(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=T(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 f=this.read1(a,b,d);if(0>=f)return f;for(;f<d&&this.$in.ready();){var c=this.read1(a,b+f,d-f);if(0>=c)break;f+=c}return f},"~A,~N,~N");c(c$,"readLine1",function(a){var b=null,d;this.ensureOpen();for(var f=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;f&&"\n"==this.cb[this.nextChar]&&
this.nextChar++;f=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)}),t(["java.io.Writer"],"java.io.BufferedWriter",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringIndexOutOfBoundsException"],function(){c$=q(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=E(8192,"\x00")},"java.io.Writer");p(c$,function(a,b){x(this,java.io.BufferedWriter,[a]);if(0<b)this.out=a,this.buf=E(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 f=this.buf.length-this.pos;d<f&&(f=d);0<f&&(System.arraycopy(a,b,this.buf,this.pos,f),this.pos+=f);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),
this.pos=0,d>f&&(b+=f,f=d-f,f>=this.buf.length?this.out.write(a,b,f):(System.arraycopy(a,b,this.buf,this.pos,f),this.pos+=f)))}},"~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 f=E(d,"\x00");a.getChars(b,b+d,f,0);this.out.write(f,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?(f=E(d,"\x00"),a.getChars(b,b+c,f,0),this.out.write(f,0,c)):(a.getChars(b,b+c,this.buf,this.pos),this.pos+=c)))}}},"~S,~N,~N")}),t(["java.io.InputStream"],"java.io.ByteArrayInputStream",
["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=q(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 f=this.count-this.pos;d>f&&(d=f);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(){})}),
t(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.OutOfMemoryError"],function(){c$=q(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=K(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=K(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(){})}),t(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){c$=q(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()})}),t(null,"java.io.InputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=s(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 f=this.readByteAsInt();if(-1==f)return-1;a[b]=f;var c=1;try{for(;c<d;c++){f=this.readByteAsInt();if(-1==f)break;a[b+c]=f}}catch(h){if(!A(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=K(2048,0));var f=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<b;){d=this.read(f,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)}),t(["java.io.Reader"],"java.io.InputStreamReader",["java.lang.NullPointerException"],function(){c$=q(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=K(d,0);var f,c,h=0,e=b,j=this.$in.read(this.bytearr,this.pos,d-this.pos),m=this.$in.available();if(0>
j)return-1;for(var v=j;h<v;){d=this.bytearr[h]&255;if(this.isUTF8)switch(d>>4){case 12:case 13:if(h+1>=j){if(1<=m){v=h;continue}}else if(128==((f=this.bytearr[h+1])&192)){a[e++]=String.fromCharCode((d&31)<<6|f&63);h+=2;continue}this.isUTF8=!1;break;case 14:if(h+2>=j){if(2<=m){v=h;continue}}else if(128==((f=this.bytearr[h+1])&192)&&128==((c=this.bytearr[h+2])&192)){a[e++]=String.fromCharCode((d&15)<<12|(f&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})}),t(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=s(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 f=0;f<d;f++)this.writeByteAsInt(a[b+f])},"~A,~N,~N");e(c$,"flush",function(){});e(c$,"close",function(){})}),t(["java.io.Closeable"],"java.io.Reader",["java.io.IOException","java.lang.IllegalArgumentException","$.NullPointerException"],function(){c$=q(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=T(b,"\x00");for(var d=a;0<d;){var f=this.read(this.skipBuffer,0,Math.min(d,b));if(-1==f)break;d-=f}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)}),t(["java.io.Reader"],"java.io.StringReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException"],function(){c$=q(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})}),t(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){c$=q(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=E(1,"\x00");b[0]=String.fromCharCode(a);this.write(b)},"~N");c(c$,"write",function(a){var b=E(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 f=E(d,"\x00");a.getChars(b,b+d,
f,0);this.write(f)}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")}),k("java.net"),t(["java.io.IOException"],"java.net.MalformedURLException",
null,function(){c$=s(java.net,"MalformedURLException",java.io.IOException);p(c$,function(){x(this,java.net.MalformedURLException,[])})}),k("java.net"),t(["java.util.Hashtable"],"java.net.URL",["java.io.IOException","java.lang.Character","$.Error","java.net.MalformedURLException"],function(){c$=q(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 f,c,h,e=0,j=null,m=!1,v=!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)&&(m=!0);for(f=e;!m&&f<c&&47!=(h=b.charCodeAt(f));f++)if(58==h){var n=b.substring(e,f).toLowerCase();this.isValidProtocol(n)&&(j=n,e=f+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,v=!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;f=b.indexOf("#",e);0<=f&&(this.ref=
b.substring(f+1,c),c=f);v&&e==c&&(this.query=a.query,null==this.ref&&(this.ref=a.ref));d.parseURL(this,b,e,c)}catch(q){if(A(q,java.net.MalformedURLException))throw q;if(A(q,Exception))throw a=q,b=new java.net.MalformedURLException(a.getMessage()),b.initCause(a),b;throw q;}},"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 f=1;f<b;f++)if(d=a.charAt(f),!Character.isLetterOrDigit(d)&&
"."!=d&&"+"!=d&&"-"!=d)return!1;return!0},"~S");c(c$,"checkSpecifyHandler",function(){},"SecurityManager");c(c$,"set5",function(a,b,d,f,c){this.protocol=a;this.host=b;this.authority=-1==d?b:b+":"+d;this.port=d;this.file=f;this.ref=c;this.$hashCode=-1;a=f.lastIndexOf("?");-1!=a?(this.query=f.substring(a+1),this.path=f.substring(0,a)):this.path=f},"~S,~S,~N,~S,~S");c(c$,"set",function(a,b,d,f,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=f},"~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!u(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}),k("java.net"),t(null,"java.net.URLConnection",["java.lang.IllegalStateException","$.NullPointerException","java.net.UnknownServiceException","JU.Lst"],function(){c$=
q(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")}),k("java.net"),c$=s(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"),k("java.net"),t(null,"java.net.URLStreamHandler",["java.lang.IllegalArgumentException","$.SecurityException","$.UnsupportedOperationException"],
function(){c$=s(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,f){var c=a.getProtocol(),h=a.getAuthority(),e=a.getUserInfo(),j=a.getHost(),m=a.getPort(),v=a.getPath(),p=a.getQuery(),n=a.getRef(),q=!1,r=!1;if(d<f){var k=b.indexOf("?"),r=k==d;-1!=k&&k<f&&(p=b.substring(k+1,f),f>k&&(f=k),b=b.substring(0,k))}var s=0;if(!(d<=f-4&&"/"==b.charAt(d)&&"/"==
b.charAt(d+1)&&"/"==b.charAt(d+2)&&"/"==b.charAt(d+3))&&d<=f-2&&"/"==b.charAt(d)&&"/"==b.charAt(d+1)){d+=2;s=b.indexOf("/",d);0>s&&(s=b.indexOf("?",d),0>s&&(s=f));j=h=b.substring(d,s);k=h.indexOf("@");-1!=k?(e=h.substring(0,k),j=h.substring(k+1)):e=null;if(null!=j){if(0<j.length&&"["==j.charAt(0))throw new IllegalArgumentException("Invalid host: "+j);k=j.indexOf(":");m=-1;0<=k&&(j.length>k+1&&(m=Integer.parseInt(j.substring(k+1))),j=j.substring(0,k))}else j="";if(-1>m)throw new IllegalArgumentException("Invalid port number :"+
m);d=s;0<h.length&&(v="")}null==j&&(j="");d<f?"/"==b.charAt(d)?v=b.substring(d,f):null!=v&&0<v.length?(q=!0,k=v.lastIndexOf("/"),r="",-1==k&&null!=h&&(r="/"),v=v.substring(0,k+1)+r+b.substring(d,f)):v=(null!=h?"/":"")+b.substring(d,f):r&&null!=v&&(k=v.lastIndexOf("/"),0>k&&(k=0),v=v.substring(0,k)+"/");null==v&&(v="");if(q){for(;0<=(s=v.indexOf("/./"));)v=v.substring(0,s)+v.substring(s+2);for(s=0;0<=(s=v.indexOf("/../",s));)0<s&&0<=(f=v.lastIndexOf("/",s-1))&&0!=v.indexOf("/../",f)?(v=v.substring(0,
f)+v.substring(s+3),s=0):s+=3;for(;v.endsWith("/..");)if(s=v.indexOf("/.."),0<=(f=v.lastIndexOf("/",s-1)))v=v.substring(0,f+1);else break;v.startsWith("./")&&2<v.length&&(v=v.substring(2));v.endsWith("/.")&&(v=v.substring(0,v.length-1))}this.setURL(a,c,j,m,h,e,v,p,n)},"java.net.URL,~S,~N,~N");c(c$,"getDefaultPort",function(){return-1});c(c$,"equals2",function(a,b){var d=a.getRef(),f=b.getRef();return(d===f||null!=d&&d.equals(f))&&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,f;d=-1!=a.getPort()?a.getPort():
a.handler.getDefaultPort();f=-1!=b.getPort()?b.getPort():b.handler.getDefaultPort();return d!=f||!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,f,c,h,e,j,m){if(this!==a.handler)throw new SecurityException("handler for url different from this handler");
a.set(a.getProtocol(),d,f,c,h,e,j,m)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");c(c$,"setURLDeprecated",function(a,b,d,f,c,h){var e=null,j=null;if(null!=d&&0!=d.length){var e=-1==f?d:d+":"+f,m=d.lastIndexOf("@");-1!=m&&(j=d.substring(0,m),d=d.substring(m+1))}var v=null,m=null;null!=c&&(v=c.lastIndexOf("?"),-1!=v?(m=c.substring(v+1),v=c.substring(0,v)):v=c);this.setURL(a,b,d,f,e,j,v,m,h)},"java.net.URL,~S,~S,~N,~S,~S")}),k("java.net"),B(java.net,"URLStreamHandlerFactory"),k("java.text"),c$=q(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,f){var c=parseInt(f);return null==b?null:b[c]})},"~S,~A"),c(c$,"format",function(a){return java.text.MessageFormat.format(this.pattern,[a])},"~O"),t(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],
function(){c$=s(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(),f=Array(a);b<a;)f[b++]=d.next();return f});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 f,b=this.iterator();b.hasNext()&&((f=b.next())||
1);)a[d++]=f;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()})}),t("java.util.AbstractCollection $.Iterator $.List $.ListIterator $.RandomAccess $.NoSuchElementException".split(" "),"java.util.AbstractList",["java.lang.IllegalArgumentException",
"$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){c$=q(function(){this.modCount=0;F("java.util.AbstractList.SimpleListIterator")||java.util.AbstractList.$AbstractList$SimpleListIterator$();F("java.util.AbstractList.FullListIterator")||java.util.AbstractList.$AbstractList$FullListIterator$();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(u(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(),f=a.next();if(!(null==d?null==f:d.equals(f)))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 D(java.util.AbstractList.SimpleListIterator,this,null)});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(){return this.listIterator(0)});c(c$,"listIterator",function(a){return D(java.util.AbstractList.FullListIterator,this,null,a)},"~N");c(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");c(c$,"removeRange",function(a,b){for(var d=this.listIterator(a),f=a;f<b;f++)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 u(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");c$.$AbstractList$SimpleListIterator$=function(){z(self.c$);c$=q(function(){L(this,arguments);this.pos=-1;this.expectedModCount=
0;this.lastPosition=-1;n(this,arguments)},java.util.AbstractList,"SimpleListIterator",null,java.util.Iterator);p(c$,function(){this.expectedModCount=this.b$["java.util.AbstractList"].modCount});e(c$,"hasNext",function(){return this.pos+1<this.b$["java.util.AbstractList"].size()});e(c$,"next",function(){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount)try{var a=this.b$["java.util.AbstractList"].get(this.pos+1);this.lastPosition=++this.pos;return a}catch(b){if(u(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;
throw b;}throw new java.util.ConcurrentModificationException;});e(c$,"remove",function(){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount){try{this.b$["java.util.AbstractList"].remove(this.lastPosition)}catch(a){if(u(a,IndexOutOfBoundsException))throw new IllegalStateException;throw a;}this.b$["java.util.AbstractList"].modCount!=this.expectedModCount&&this.expectedModCount++;this.pos==this.lastPosition&&this.pos--;this.lastPosition=-1}else throw new java.util.ConcurrentModificationException;
});c$=y()};c$.$AbstractList$FullListIterator$=function(){z(self.c$);c$=q(function(){L(this,arguments);n(this,arguments)},java.util.AbstractList,"FullListIterator",java.util.AbstractList.SimpleListIterator,java.util.ListIterator,D(java.util.AbstractList.SimpleListIterator,this,null,da));p(c$,function(a){x(this,java.util.AbstractList.FullListIterator);if(0<=a&&a<=this.b$["java.util.AbstractList"].size())this.pos=a-1;else throw new IndexOutOfBoundsException;},"~N");e(c$,"add",function(a){if(this.expectedModCount==
this.b$["java.util.AbstractList"].modCount){try{this.b$["java.util.AbstractList"].add(this.pos+1,a)}catch(b){if(u(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}this.pos++;this.lastPosition=-1;this.b$["java.util.AbstractList"].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.b$["java.util.AbstractList"].modCount)try{var a=this.b$["java.util.AbstractList"].get(this.pos);this.lastPosition=this.pos;this.pos--;return a}catch(b){if(u(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.b$["java.util.AbstractList"].modCount)try{this.b$["java.util.AbstractList"].set(this.lastPosition,a)}catch(b){if(u(b,
IndexOutOfBoundsException))throw new IllegalStateException;throw b;}else throw new java.util.ConcurrentModificationException;},"~O");c$=y()};z(self.c$);c$=s(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);c$=y();z(self.c$);c$=q(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");z(self.c$);c$=q(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,f){this.iterator=a;this.subList=b;this.start=d;this.end=this.start+f},"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$=y();c$=y()}),t(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){c$=q(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(u(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=(F("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$(),D(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(),f=d.getKey();f!==this?a.append(f):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=(F("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$(),D(java.util.AbstractMap$2,this,null)));return this.valuesCollection});c(c$,"clone",function(){var a=N(this,java.util.AbstractMap,"clone",[]);a.$keySet=null;a.valuesCollection=null;return a});c$.$AbstractMap$1$=function(){z(self.c$);c$=M(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 F("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$(),D(java.util.AbstractMap$1$1,this,null)});c$=y()};c$.$AbstractMap$1$1$=function(){z(self.c$);c$=q(function(){L(this,arguments);this.setIterator=null;n(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);H(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$=y()};c$.$AbstractMap$2$=function(){z(self.c$);c$=M(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 F("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),D(java.util.AbstractMap$2$1,this,null)});c$=y()};c$.$AbstractMap$2$1$=function(){z(self.c$);c$=q(function(){L(this,arguments);this.setIterator=null;n(this,arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);H(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$=y()}}),t(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){c$=s(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);e(c$,"equals",function(a){return this===a?!0:u(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")}),t(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){c$=q(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]);O(c$,function(){this.setup(0)});c(c$,"setup",function(a){x(this,java.util.ArrayList,[]);this.firstIndex=this.lastIndex=0;try{this.array=this.newElementArray(a)}catch(b){if(u(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 f=a+this.firstIndex;System.arraycopy(this.array,f,this.array,f+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=N(this,java.util.ArrayList,"clone",[]);a.array=this.array.clone();return a}catch(b){if(u(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(),f=Math.floor(d/2);b>f&&(f=b);12>f&&(f=12);var c=this.newElementArray(d+
f);if(a<Math.floor(d/2)){var h=c.length-(d+b);System.arraycopy(this.array,a,c,a+f,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 f=this.firstIndex+a;b=this.array[f];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,f+1,this.array,f,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})}),t(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=s(java.util,"Arrays");c$.sort=e(c$,"sort",function(a,b,d,f){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=f;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,f=a.length-1;d<=f;){var c=d+f>>1,h=a[c];if(h<b)d=c+1;else if(h>b)f=c-1;else return c}return-(d+
1)},"~A,~N");c$.binarySearch=c(c$,"binarySearch",function(a,b){for(var d=0,f=a.length-1;d<=f;){var c=d+f>>1,h=a[c].compareTo(b);if(0>h)d=c+1;else if(0<h)f=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 f=0,c=a.length-1;f<=c;){var h=f+c>>1,e=d.compare(a[h],b);if(0>e)f=h+1;else if(0<e)c=h-1;else return h}return-(f+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 f=0;f<d;f++){var c=a[f],h=b[f];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,f){2==arguments.length&&(f=b,b=0,d=a.length);java.util.Arrays.rangeCheck(a.length,b,d);for(var c=b;c<d;c++)a[c]=f});c$.asList=c(c$,"asList",function(a){return new java.util.Arrays.ArrayList(a)},"~A");z(self.c$);c$=q(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$=y();C(c$,"INSERTIONSORT_THRESHOLD",7)}),t("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$=s(java.util,"Collections");c$.binarySearch=c(c$,"binarySearch",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return-1;if(!u(a,java.util.RandomAccess)){for(var d=a.listIterator();d.hasNext();){var f;if(0>=(f=b.compareTo(d.next())))return 0==f?d.previousIndex():-d.previousIndex()-1}return-a.size()-1}var d=0,c=a.size(),h=c-1;for(f=-1;d<=h;)if(c=d+h>>1,0<(f=b.compareTo(a.get(c))))d=c+1;else{if(0==f)return c;h=c-1}return-c-(0>f?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(!u(a,java.util.RandomAccess)){for(var f=a.listIterator();f.hasNext();){var c;if(0>=(c=d.compare(b,f.next())))return 0==c?f.previousIndex():-f.previousIndex()-1}return-a.size()-1}var f=0,h=a.size(),e=h-1;for(c=-1;f<=e;)if(h=f+e>>1,0<(c=d.compare(b,a.get(h))))f=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(),f=a.listIterator();d.hasNext();){try{f.next()}catch(c){if(u(c,java.util.NoSuchElementException))throw new ArrayIndexOutOfBoundsException;throw c;}f.set(d.next())}},"java.util.List,java.util.List");c$.enumeration=c(c$,"enumeration",function(a){F("java.util.Collections$1")||java.util.Collections.$Collections$1$(a);return D(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(),f=d.next();d.hasNext();){var c=d.next();0>b.compare(f,c)&&(f=c)}return f},"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(),f=d.next();d.hasNext();){var c=d.next();0<b.compare(f,c)&&(f=c)}return f},"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 f=0;f<Math.floor(b/2);f++){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(u(a,java.util.RandomAccess))for(f=a.size()-1;0<f;f--)c=b.nextInt()%(f+1),0>c&&(c=-c),a.set(c,a.set(f,a.get(c)));else{for(var d=a.toArray(),f=d.length-1;0<f;f--){var c=
b.nextInt()%(f+1);0>c&&(c=-c);var h=d[f];d[f]=d[c];d[c]=h}f=0;for(c=a.listIterator();c.hasNext();)c.next(),c.set(d[f++])}},"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 f=0,c=a.listIterator();c.hasNext();)c.next(),c.set(d[f++])},"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 f,c=!1;-1<(f=a.indexOf(b));)c=!0,a.set(f,d);return c},"java.util.List,~O,~O");c$.rotate=c(c$,"rotate",function(a,b){var d=a.size();if(0!=d){var f;f=0<b?b%d:d- -1*(b%d);if(!(0==f||f==d))if(u(a,java.util.RandomAccess))for(var c=a.get(0),h=0,e=0,j=0;j<d;j++)h=(h+f)%d,c=a.set(h,c),h==e&&(h=++e,c=a.get(e));else c=(d-f)%d,f=a.subList(0,c),d=a.subList(c,d),java.util.Collections.reverse(f),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(),f=b.size();if(f>d)return-1;if(0==f)return 0;var c=b.get(0),h=a.indexOf(c);if(-1==h)return-1;for(;h<d&&d-h>=f;){var e=a.listIterator(h);if(null==c?null==e.next():c.equals(e.next())){for(var j=b.listIterator(1),m=!1;j.hasNext();){var v=j.next();if(!e.hasNext())return-1;if(null==v?null!=e.next():!v.equals(e.next())){m=!0;break}}if(!m)return h}h++}return-1},"java.util.List,java.util.List");c$.lastIndexOfSubList=c(c$,"lastIndexOfSubList",function(a,b){var d=
b.size(),f=a.size();if(d>f)return-1;if(0==d)return f;for(var f=b.get(d-1),c=a.lastIndexOf(f);-1<c&&c+1>=d;){var h=a.listIterator(c+1);if(null==f?null==h.previous():f.equals(h.previous())){for(var e=b.listIterator(d-1),j=!1;e.hasPrevious();){var m=e.previous();if(!h.hasPrevious())return-1;if(null==m?null!=h.previous():!m.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 u(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 u(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,f=a.iterator();f.hasNext();){var c=f.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 u(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,f=0;f<b.length;f++)d=(new Boolean(d|a.add(b[f]))).valueOf();return d},"java.util.Collection,~A");c$.disjoint=c(c$,"disjoint",function(a,b){if(u(a,java.util.Set)&&!u(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){z(self.c$);c$=q(function(){L(this,arguments);this.it=null;n(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);H(c$,function(){this.it=a.iterator()});c(c$,"hasMoreElements",function(){return this.it.hasNext()});c(c$,"nextElement",function(){return this.it.next()});
c$=y()};z(self.c$);c$=q(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$=y();z(self.c$);c$=s(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$=y();z(self.c$);c$=s(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 F("java.util.Collections$EmptySet$1")?
0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),D(java.util.Collections$EmptySet$1,this,null)});c$.$Collections$EmptySet$1$=function(){z(self.c$);c$=M(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$=y()};c$=y();z(self.c$);c$=s(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$=y();z(self.c$);c$=s(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);e(c$,"compare",function(a,b){return b.compareTo(a)},
"~O,~O");c$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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 F("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),D(java.util.Collections$SingletonSet$1,this,null)});c$.$Collections$SingletonSet$1$=function(){z(self.c$);c$=q(function(){L(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$=y()};c$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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 F("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),D(java.util.Collections$SingletonMap$1,this,null)});c$.$Collections$SingletonMap$1$=function(){z(self.c$);
c$=M(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);e(c$,"contains",function(a){return u(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 F("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),D(java.util.Collections$SingletonMap$1$1,this,null)});
c$=y()};c$.$Collections$SingletonMap$1$1$=function(){z(self.c$);c$=q(function(){L(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,F("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),D(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;
});e(c$,"remove",function(){throw new UnsupportedOperationException;});c$=y()};c$.$Collections$SingletonMap$1$1$1$=function(){z(self.c$);c$=M(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$=y()};c$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=s(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$=y();z(self.c$);c$=q(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(){return this.list.listIterator()});c(c$,"listIterator",function(a){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$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=s(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$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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 F("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),D(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(){z(self.c$);c$=q(function(){L(this,arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",
null,java.util.Iterator);H(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$=y()};c$=y();z(self.c$);c$=s(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$=y();z(self.c$);c$=q(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 this.listIterator(0)});c(c$,"listIterator",function(){return F("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),D(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(){z(self.c$);c$=q(function(){L(this,arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);H(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$=y()};c$=y();z(self.c$);c$=q(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()});z(self.c$);c$=s(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);e(c$,"iterator",function(){return F("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?
0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),D(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,f=this.iterator();b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(;d<b;)a[d++]=f.next();d<a.length&&
(a[d]=null);return a},"~A");c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){z(self.c$);c$=q(function(){L(this,arguments);this.iterator=null;n(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);H(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$=y()};z(self.c$);c$=q(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$=y();c$=y();c$=y();z(self.c$);c$=s(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$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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();u(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 f=0;f<b;f++)d[f]=java.util.Collections.checkType(a.next(),this.type);a=!1;for(f=0;f<b;f++)a=(new Boolean(a|this.c.add(d[f]))).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$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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 f=Array(d),c=b.iterator(),h=0;h<d;h++)f[h]=java.util.Collections.checkType(c.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(f))},"~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(){return new java.util.Collections.CheckedListIterator(this.l.listIterator(),
this.type)});c(c$,"listIterator",function(a){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$=y();z(self.c$);c$=s(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);c$=y();z(self.c$);
c$=s(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$=y();z(self.c$);c$=q(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 f=0;f<b;f++){var c=a.next();java.util.Collections.checkType(c.getKey(),this.keyType);java.util.Collections.checkType(c.getValue(),this.valueType);d[f]=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()});z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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(),f=0;f<a;f++)b[f]=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(),
f=0;f<b;f++)a[f]=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");z(self.c$);c$=q(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$=y();c$=y();c$=y();z(self.c$);c$=q(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$=y();z(self.c$);c$=q(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$=y();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$=s(java.util,"Dictionary"),p(c$,function(){}),t("java.util.Dictionary $.Enumeration $.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".split(" "),function(){c$=q(function(){this.elementCount=
0;this.elementData=null;this.firstSlot=this.threshold=this.loadFactor=0;this.lastSlot=-1;this.modCount=0;F("java.util.Hashtable.HashIterator")||java.util.Hashtable.$Hashtable$HashIterator$();F("java.util.Hashtable.HashEnumerator")||java.util.Hashtable.$Hashtable$HashEnumerator$();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.Hashtable.Entry(a,b)},$fz.isPrivate=!0,$fz),
"~O,~O,~N");O(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=N(this,java.util.Hashtable,"clone",[]);a.elementData=this.elementData.clone();for(var b,
d=this.elementData.length;0<=--d;)if(null!=(b=this.elementData[d]))a.elementData[d]=b.clone();return a}catch(f){if(u(f,CloneNotSupportedException))return null;throw f;}});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];null!=d;){if(a.equals(d.value))return!0;d=d.next}return!1},
"~O");e(c$,"containsKey",function(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:D(java.util.Hashtable.HashEnumerator,this,null,!1)});e(c$,"entrySet",function(){var a,b=new java.util.Collections.SynchronizedSet((F("java.util.Hashtable$2")?0:java.util.Hashtable.$Hashtable$2$(),a=D(java.util.Hashtable$2,this,null)),this);a&&(a.b$H=a.b$["java.util.Hashtable"]);
return b});e(c$,"equals",function(a){if(this===a)return!0;if(u(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){for(var b=a.hashCode(),d=this.elementData[(b&2147483647)%this.elementData.length];null!=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];null!=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(),f=d.getKey(),d=d.getValue(),f=(f!==this?f.hashCode():0)^(d!==this?null!=d?d.hashCode():0:0),a=a+f;return a});e(c$,"isEmpty",function(){return 0==this.elementCount});e(c$,"keys",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:D(java.util.Hashtable.HashEnumerator,this,null,
!0)});e(c$,"keySet",function(){var a,b=new java.util.Collections.SynchronizedSet((F("java.util.Hashtable$3")?0:java.util.Hashtable.$Hashtable$3$(),a=D(java.util.Hashtable$3,this,null)),this);a&&(a.b$H=a.b$["java.util.Hashtable"]);return b});e(c$,"put",function(a,b){if(null!=a&&null!=b){if(!a.hashCode){var d=Math.floor(1E7*Math.random());a.hashCode=function(){return d};a.equals=function(a){return this.hashCode()==a.hashCode()}}for(var f=a.hashCode(),c=(f&2147483647)%this.elementData.length,h=this.elementData[c];null!=
h&&!h.equalsKey(a,f);)h=h.next;if(null==h)return this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),c=(f&2147483647)%this.elementData.length),c<this.firstSlot&&(this.firstSlot=c),c>this.lastSlot&&(this.lastSlot=c),h=java.util.Hashtable.newEntry(a,b,f),h.next=this.elementData[c],this.elementData[c]=h,null;f=h.value;h.value=b;return f}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,c=this.newElementArray(a),g=this.lastSlot+1;--g>=this.firstSlot;)for(var h=this.elementData[g];null!=h;){var e=(h.getKeyHash()&2147483647)%a;e<b&&(b=e);e>d&&(d=e);var j=h.next;h.next=c[e];c[e]=h;h=j}this.firstSlot=b;this.lastSlot=d;this.elementData=c;this.computeMaxSize()});e(c$,"remove",function(a){for(var b=a.hashCode(),d=(b&2147483647)%this.elementData.length,c=null,g=this.elementData[d];null!=
g&&!g.equalsKey(a,b);)c=g,g=g.next;return null!=g?(this.modCount++,null==c?this.elementData[d]=g.next:c.next=g.next,this.elementCount--,a=g.value,g.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(){var a,b=new java.util.Collections.SynchronizedCollection((F("java.util.Hashtable$4")?0:java.util.Hashtable.$Hashtable$4$(),a=D(java.util.Hashtable$4,this,null)),this);a&&(a.b$H=a.b$["java.util.Hashtable"]);return b});c$.$Hashtable$HashIterator$=function(){z(self.c$);c$=q(function(){L(this,arguments);this.expectedModCount=this.position=0;this.lastEntry=
this.type=null;this.lastPosition=0;this.canRemove=!1;n(this,arguments)},java.util.Hashtable,"HashIterator",null,java.util.Iterator);p(c$,function(a){this.type=a;this.b$H=this.b$["java.util.Hashtable"];this.position=this.b$H.lastSlot;this.expectedModCount=this.b$H.modCount},"java.util.MapEntry.Type");e(c$,"hasNext",function(){if(null!=this.lastEntry&&null!=this.lastEntry.next)return!0;for(;this.position>=this.b$H.firstSlot;)if(null==this.b$H.elementData[this.position])this.position--;else return!0;
return!1});e(c$,"next",function(){if(this.expectedModCount==this.b$H.modCount){null!=this.lastEntry&&(this.lastEntry=this.lastEntry.next);if(null==this.lastEntry){for(;this.position>=this.b$H.firstSlot&&null==(this.lastEntry=this.b$H.elementData[this.position]);)this.position--;null!=this.lastEntry&&(this.lastPosition=this.position,this.position--)}if(null!=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.b$H.modCount)if(this.canRemove){var a=this.canRemove=!1,b=this.b$H.elementData[this.lastPosition];if(b===this.lastEntry)this.b$H.elementData[this.lastPosition]=b.next,a=!0;else{for(;null!=b&&b.next!==this.lastEntry;)b=b.next;null!=b&&(b.next=this.lastEntry.next,a=!0)}if(a){this.b$H.modCount++;this.b$H.elementCount--;this.expectedModCount++;return}}else throw new IllegalStateException;throw new java.util.ConcurrentModificationException;});
c$=y()};c$.$Hashtable$HashEnumerator$=function(){z(self.c$);c$=q(function(){L(this,arguments);this.key=!1;this.start=0;this.entry=null;n(this,arguments)},java.util.Hashtable,"HashEnumerator",null,java.util.Enumeration);p(c$,function(a){this.key=a;this.b$H=this.b$["java.util.Hashtable"];this.start=this.b$H.lastSlot+1},"~B");e(c$,"hasMoreElements",function(){if(null!=this.entry)return!0;for(;--this.start>=this.b$H.firstSlot;)if(null!=this.b$H.elementData[this.start])return this.entry=this.b$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;});c$=y()};c$.$Hashtable$2$=function(){z(self.c$);c$=M(java.util,"Hashtable$2",java.util.AbstractSet);e(c$,"size",function(){return this.b$H.elementCount});e(c$,"clear",function(){this.b$H.clear()});e(c$,"remove",function(a){return this.contains(a)?(this.b$H.remove(a.getKey()),!0):!1},"~O");c(c$,"contains",
function(a){var b=this.b$H.getEntry(a.getKey());return a.equals(b)},"~O");c(c$,"iterator",function(){return D(java.util.Hashtable.HashIterator,this,null,(F("java.util.Hashtable$2$1")?0:java.util.Hashtable.$Hashtable$2$1$(),D(java.util.Hashtable$2$1,this,null)))});c$=y()};c$.$Hashtable$2$1$=function(){z(self.c$);c$=M(java.util,"Hashtable$2$1",null,java.util.MapEntry.Type);e(c$,"get",function(a){return a},"java.util.MapEntry");c$=y()};c$.$Hashtable$3$=function(){z(self.c$);c$=M(java.util,"Hashtable$3",
java.util.AbstractSet);e(c$,"contains",function(a){return this.b$H.containsKey(a)},"~O");e(c$,"size",function(){return this.b$H.elementCount});e(c$,"clear",function(){this.b$H.clear()});e(c$,"remove",function(a){return this.b$H.containsKey(a)?(this.b$H.remove(a),!0):!1},"~O");e(c$,"iterator",function(){return D(java.util.Hashtable.HashIterator,this,null,(F("java.util.Hashtable$3$1")?0:java.util.Hashtable.$Hashtable$3$1$(),D(java.util.Hashtable$3$1,this,null)))});c$=y()};c$.$Hashtable$3$1$=function(){z(self.c$);
c$=M(java.util,"Hashtable$3$1",null,java.util.MapEntry.Type);e(c$,"get",function(a){return a.key},"java.util.MapEntry");c$=y()};c$.$Hashtable$4$=function(){z(self.c$);c$=M(java.util,"Hashtable$4",java.util.AbstractCollection);e(c$,"contains",function(a){return this.b$H.contains(a)},"~O");e(c$,"size",function(){return this.b$H.elementCount});e(c$,"clear",function(){this.b$H.clear()});e(c$,"iterator",function(){return D(java.util.Hashtable.HashIterator,this,null,(F("java.util.Hashtable$4$1")?0:java.util.Hashtable.$Hashtable$4$1$(),
D(java.util.Hashtable$4$1,this,null)))});c$=y()};c$.$Hashtable$4$1$=function(){z(self.c$);c$=M(java.util,"Hashtable$4$1",null,java.util.MapEntry.Type);e(c$,"get",function(a){return a.value},"java.util.MapEntry");c$=y()};c$.$Hashtable$1$=function(){z(self.c$);c$=M(java.util,"Hashtable$1",null,java.util.Enumeration);e(c$,"hasMoreElements",function(){return!1});e(c$,"nextElement",function(){throw new java.util.NoSuchElementException;});c$=y()};z(self.c$);c$=q(function(){this.next=null;this.hashcode=
0;n(this,arguments)},java.util.Hashtable,"Entry",java.util.MapEntry);O(c$,function(a,b){this.key=a;this.value=b;this.hashcode=a.hashCode()});c(c$,"clone",function(){var a=N(this,java.util.Hashtable.Entry,"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()&&
this.key.equals(a)},"~O,~N");e(c$,"toString",function(){return this.key+"="+this.value});c$=y();c$.EMPTY_ENUMERATION=c$.prototype.EMPTY_ENUMERATION=(F("java.util.Hashtable$1")?0:java.util.Hashtable.$Hashtable$1$(),D(java.util.Hashtable$1,this,null))}),t(["java.util.Map"],"java.util.MapEntry",null,function(){c$=q(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 N(this,java.util.MapEntry,"clone",[])}catch(a){if(u(a,CloneNotSupportedException))return null;throw a;}});e(c$,"equals",function(a){return this===a?!0:u(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")}),t(["java.util.Hashtable"],"java.util.Properties",["java.lang.NullPointerException","$.StringBuffer"],function(){c$=q(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 g=b.charAt(c);switch(g){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(g)||d&&32==g.charCodeAt(0))&&a.append("\\");if(!(32<=g.charCodeAt(0)&&126>=g.charCodeAt(0))){g=Integer.toHexString(g.charCodeAt(0));
a.append("\\u");for(var h=0;h<4-g.length;h++)a.append("0")}a.append(g)}}},$fz.isPrivate=!0,$fz),"StringBuilder,~S,~B");c(c$,"getProperty",function(a){var b=this.get(a),b=u(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=u(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 g=this.get(c),h=this.defaults;null==g;)g=h.get(c),h=h.defaults;40<g.length?(b.append(g.substring(0,37)),b.append("...")):b.append(g);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 g=this.get(c),h=this.defaults;null==g;)g=h.get(c),h=h.defaults;40<g.length?(b.append(g.substring(0,37)),b.append("...")):b.append(g);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(!u(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("&",
"&").replaceAll("<","<").replaceAll(">",">").replaceAll("'","'").replaceAll('"',""")},$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)}),t(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){c$=q(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)}),t(["java.util.Map"],
"java.util.SortedMap",null,function(){B(java.util,"SortedMap",java.util.Map)}),t(["java.util.Set"],"java.util.SortedSet",null,function(){B(java.util,"SortedSet",java.util.Set)}),t(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){c$=q(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")}),k("javajs.api"),B(javajs.api,"BytePoster"),k("javajs.api"),B(javajs.api,"EventManager"),k("javajs.api"),B(javajs.api,"FontManager"),k("javajs.api"),B(javajs.api,"GenericColor"),k("javajs.api"),B(javajs.api,"GenericFileInterface"),k("javajs.api"),B(javajs.api,"GenericMenuInterface"),k("javajs.api"),B(javajs.api,"GenericMouseInterface"),k("javajs.api"),t(["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)}),k("javajs.api"),B(javajs.api,"JSInterface"),k("javajs.api"),B(javajs.api,"JSONEncodable"),k("javajs.api"),B(javajs.api,"PlatformViewer"),k("javajs.api"),B(javajs.api,"ZInputStream"),k("javajs.awt"),t(["javajs.api.GenericColor"],"javajs.awt.Color",null,function(){c$=q(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)+"]"})}),k("javajs.awt"),c$=q(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"),k("javajs.awt.event"),c$=q(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),k("javajs.awt"),t(null,"javajs.awt.Font",["JU.AU"],function(){c$=q(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,g,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=g;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,g);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,g,h){255<d&&(d=255);for(var e=I(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(g,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",G(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"])}),k("JU"),t(["javajs.api.JSONEncodable"],"JU.A4",["JU.T3"],function(){c$=q(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 g=new JU.A4;g.set4(a,
b,d,c);return g},"~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,g,h,e,j,m){a=0.5*(a+g+m-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!u(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+"]"})}),k("JU"),t(["java.net.URLConnection"],"JU.AjaxURLConnection",null,function(){c$=q(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()})}),k("JU"),t(["java.net.URLStreamHandler"],"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){c$=q(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")}),k("JU"),t(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],
"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],function(){c$=q(function(){this.htFactories=null;n(this,arguments)},JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);H(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")}),k("JU"),t(null,"JU.AU",["java.util.Arrays","JU.Lst"],function(){c$=
s(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 g=JU.AU.newInstanceO(a,b+c);0<b&&System.arraycopy(a,0,g,0,b);0<c&&System.arraycopy(a,b+d,g,b,c);return g},"~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=G(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=w(c/2));d-=b;c=G(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=w(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=ea(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=K(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,g,h){a="dumpArray: "+a+"\n";for(var e=d;e<=c;e++)a+="\t*"+e+"*";for(;h>=g;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 E(a,null)},"~N");c$.newInt2=c(c$,"newInt2",function(a){return E(a,null)},"~N");c$.newInt3=c(c$,"newInt3",function(a){return E(a,null)},"~N,~N");c$.newFloat3=c(c$,"newFloat3",function(a){return E(a,null)},"~N,~N");c$.newInt4=c(c$,"newInt4",function(a){return E(a,null)},"~N");c$.newShort2=c(c$,"newShort2",function(a){return E(a,null)},"~N");c$.newByte2=c(c$,"newByte2",
function(a){return E(a,null)},"~N");c$.newDouble2=c(c$,"newDouble2",function(a){return E(a,null)},"~N");c$.removeMapKeys=c(c$,"removeMapKeys",function(a,b){for(var d=new JU.Lst,c,g=a.keySet().iterator();g.hasNext()&&((c=g.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")}),k("JU"),t(null,"JU.Base64",["JU.SB"],function(){c$=s(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,g=0;c<b&&0==g;){0==c%75&&0!=c&&d.append("\r\n");var g=c+2==b?1:c+1==b?2:0,h=a[c++]<<16&16711680|(2==g?0:a[c++]<<8)&65280|(1<=g?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==g?"=":JU.Base64.base64.charAt(h>>6&63));d.appendC(1<=g?"=":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 g=a.length;if(0==g)return K(0,0);for(var h=g;--h>=c;)b+=65==(d=a[h].charCodeAt(0)&127)||0<JU.Base64.decode64[d]?3:0;for(var b=b>>2,e=K(b,0),j=18,h=c,m=c=0;h<g;h++)if(0<JU.Base64.decode64[d=a[h].charCodeAt(0)&127]||65==d||61==d)m|=JU.Base64.decode64[d]<<j,j-=6,0>j&&(e[c++]=(m&16711680)>>16,c<b&&(e[c++]=(m&65280)>>8),c<b&&(e[c++]=m&255),j=18,m=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])}),k("JU"),t(["javajs.api.JSONEncodable"],"JU.BS",["java.lang.Character","$.IndexOutOfBoundsException","$.NegativeArraySizeException","JU.SB"],function(){c$=q(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=G(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 g=-1<<a,h=-1>>>-b;if(d==c)this.words[d]|=g&h;else{this.words[d]|=g;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 g=-1<<a,h=-1>>>-b;if(d==c)this.words[d]&=~(g&h);else{this.words[d]&=~g;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(!u(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=G(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=fa(a);var d=a.wordsInUse;0==d?b.words=JU.BS.emptyBitmap:(b.words=G(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 g=-1,h=-2,e=-1;++e<=b;){var j=a.get(e);if(e==b||0<=g&&!j){0<=g&&h!=g&&c.append((h==g-1?" ":":")+g);if(e==b)break;g=-1}a.get(e)&&(0>g&&(c.append((-2==h?"":" ")+e),h=e),g=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(!Character.isDigit(b=
a.charAt(c))&&" "!=b&&"\t"!=b&&":"!=b)return null;for(var g=d;Character.isDigit(a.charAt(--g)););if(++g==d)g=0;else try{g=Integer.parseInt(a.substring(g,d))}catch(h){if(A(h,NumberFormatException))return null;throw h;}for(var e=JU.BS.newN(g),j=g=-1,m=-2,c=2;c<=d;c++)switch(b=a.charAt(c)){case "\t":case " ":case "}":if(0>m)break;if(m<g)return null;g=m;0>j&&(j=m);e.setBits(j,m+1);j=-1;m=-2;break;case ":":j=g=m;m=-2;break;default:Character.isDigit(b)&&(0>m&&(m=0),m=10*m+(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",G(0,0))}),k("JU"),t(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){c$=s(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(g){if(A(g,Exception))return 0;throw g;}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(I(a),I(d),I(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,d){return JU.CU.toRGBpt(JU.CU.getArgbFromString(a),d)},"~S,JU.P3");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$.toRGBpt=c(c$,"toRGBpt",function(a,d){d.x=a>>16&255;d.y=a>>8&255;d.z=a&255;return d},"~N,JU.P3");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=w((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,g=a.y/255,h=a.z/255,e=Math.min(c,Math.min(g,h)),j=Math.max(c,Math.max(g,
h)),m=j+e,e=j-e,c=60*(0==e?0:j==c?(g-h)/e+6:j==g?(h-c)/e+2:(c-g)/e+4)%360,g=e/(0==e?1:1>=m?m:2-m);return d?JU.P3.new3(Math.round(10*c)/10,Math.round(1E3*g)/10,Math.round(500*m)/10):JU.P3.new3(c,100*g,50*m)},"JU.P3,~B");c$.hslToRGB=c(c$,"hslToRGB",function(a){var d=a.x/60,c=a.z/100;a=c-(0.5>c?c:1-c)*(a.y/100);var g=2*(c-a),c=JU.CU.toRGB(a,g,d+2),h=JU.CU.toRGB(a,g,d),d=JU.CU.toRGB(a,g,d-2);return JU.P3.new3(Math.round(255*c),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]))}),k("JU"),t(["java.lang.Boolean"],
"JU.DF",["java.lang.Double","$.Float","JU.PT","$.SB"],function(){c$=s(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 g=c.indexOf("E");d=JU.PT.parseInt(c.substring(g+1))+d;return 0>g?""+a:JU.DF.formatDecimal(JU.PT.parseFloat(c.substring(0,g)),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);g=c.indexOf("E-");0<g&&(d=JU.PT.parseInt(c.substring(g+1)),c="0."+"0000000000000000000000000000000000000000".substring(0,-d-1)+c.substring(0,1)+c.substring(2,g),d=1);g=c.indexOf("E");0<g&&(d=JU.PT.parseInt(c.substring(g+1)),c=c.substring(0,1)+c.substring(2,g)+"0000000000000000000000000000000000000000",c=c.substring(0,d+1)+"."+c.substring(d+1),d=c.indexOf("."));var e=c.length,g=b+d+1;if(g<e&&"5"<=c.charAt(g))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)),g=0;g<b;g++,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]}),k("JU"),t(["java.lang.Enum"],"JU.Encoding",null,function(){c$=s(JU,"Encoding",Enum);r(c$,"NONE",0,[]);r(c$,"UTF8",1,[]);r(c$,"UTF_16BE",2,[]);r(c$,"UTF_16LE",3,[]);r(c$,"UTF_32BE",4,[]);r(c$,"UTF_32LE",5,[])}),k("JU"),t(["java.util.ArrayList"],"JU.Lst",null,function(){c$=s(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")}),k("JU"),t(null,"JU.M34",["java.lang.ArrayIndexOutOfBoundsException"],function(){c$=q(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 g=Math.sqrt(b*b+d*d+c*c),g=1/g,b=b*g,d=d*g,c=c*g,h=Math.cos(a);a=Math.sin(a);g=1-h;this.m00=h+b*b*g;this.m11=h+d*d*
g;this.m22=h+c*c*g;var h=b*d*g,e=c*a;this.m01=h-e;this.m10=h+e;h=b*c*g;e=d*a;this.m02=h+e;this.m20=h-e;h=d*c*g;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");})}),k("JU"),t(["JU.M34"],"JU.M3",["JU.T3"],function(){c$=s(JU,"M3",JU.M34,java.io.Serializable);p(c$,function(){x(this,JU.M3,[])});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!u(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,g,h,e,j,m){this.m00=a;this.m01=b;this.m02=d;this.m10=c;this.m11=g;this.m12=h;this.m20=e;this.m21=j;this.m22=m},"~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),g=c*a;if(0==g)return this.setScale(1),!1;a=Math.cos(g);g=Math.sin(g);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=g*d);this.m11=1+c*b*b;this.m21=-(this.m12=g*b);this.m22=a;return!0},"~N,~N,~N");c(c$,"isRotation",
function(){return 0.001>Math.abs(this.determinant3()-1)})}),k("JU"),t(["JU.M34"],"JU.M4",["JU.T3"],function(){c$=q(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m13=this.m03=0;n(this,arguments)},JU,"M4",JU.M34);p(c$,function(){x(this,JU.M4,[])});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},"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,g){0==a?(this.m00=b,this.m10=d,this.m20=c,this.m30=g):1==a?(this.m01=b,this.m11=d,this.m21=c,this.m31=g):2==a?(this.m02=b,this.m12=d,this.m22=c,this.m32=g):3==a?(this.m03=b,this.m13=d,this.m23=c,this.m33=
g):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$,"invertM",function(a){this.setM4(a);this.invert()},"JU.M4");c(c$,"invert",function(){var a=this.determinant4();0!=a&&(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))});c(c$,"set",function(a,b,d,c,g,h,e,j,m,v,p,n,q,k,r,s){this.m00=a;this.m01=b;this.m02=d;this.m03=c;this.m10=g;this.m11=h;this.m12=e;this.m13=j;this.m20=m;this.m21=v;this.m22=p;this.m23=n;this.m30=q;this.m31=k;this.m32=r;this.m33=s},"~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)},"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!u(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+"] ]"})}),k("JU"),t(["java.io.OutputStream"],"JU.OC","java.io.BufferedWriter $.ByteArrayOutputStream $.FileOutputStream $.OutputStreamWriter JU.Base64 $.SB".split(" "),function(){c$=q(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&&!(b.startsWith("http://")||b.startsWith("https://"));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(!A(d,java.io.IOException))throw d;}this.byteCount+=a.length;return this},"~S");c(c$,"reset",function(){this.sb=null;try{u(this.os,java.io.FileOutputStream)?(this.os.close(),this.os=new java.io.FileOutputStream(this.fileName)):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(a){if(A(a,Exception))System.out.println(a.toString());else throw a;}this.byteCount=0});
e(c$,"write",function(a,b,d){null==this.os&&(this.os=new java.io.ByteArrayOutputStream);this.os.write(a,b,d);this.byteCount+=d},"~A,~N,~N");e(c$,"writeByteAsInt",function(a){null==this.os&&(this.os=new java.io.ByteArrayOutputStream);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(!A(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:u(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(!A(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)})}),k("JU"),t(["JU.T3"],"JU.P3",null,function(){c$=s(JU,"P3",JU.T3);p(c$,function(){x(this,JU.P3,[])});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$.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")}),k("JU"),t(["JU.T3i"],
"JU.P3i",null,function(){c$=s(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")}),k("JU"),t(["JU.T4"],"JU.P4",null,function(){c$=s(JU,"P4",JU.T4);c$.new4=c(c$,"new4",function(a,b,d,c){var g=new JU.P4;g.set4(a,b,d,c);return g},"~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")}),k("JU"),t(null,"JU.PT","java.lang.Boolean $.Character $.Float $.Number java.util.Map javajs.api.JSONEncodable JU.AU $.DF $.Lst $.M34 $.M4 $.SB".split(" "),function(){c$=s(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,g=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;)g=10*g+(e-48),c=!0,++h;c?j&&(g=-g):g=-2147483648;d[0]=h;return g},"~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 g=!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,m=0,v=0;h<b&&48<=(j=a.charCodeAt(h))&&57>=j;)m=10*m+1*(j-48),++h,g=!0;var p=!1,n=0,q=0==m?-1:0;if(46==j)for(p=!0;++h<b&&48<=(j=a.charCodeAt(h))&&57>=j;){g=!0;if(0>q){if(48==j){q--;continue}q=-q}n<JU.PT.decimalScale.length&&(v=10*v+1*(j-48),n++)}g?0<v?(g=v*JU.PT.decimalScale[n-1],g=1<q?q-2<JU.PT.decimalScale.length?g*JU.PT.decimalScale[q-2]:g*Math.pow(10,1-q):g+m):g=m:g=NaN;m=!1;if(h<b&&(69==j||101==j||68==j)){m=!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?g*=JU.PT.tensScale[h-1]:0>h&&-h<=JU.PT.decimalScale.length?g*=JU.PT.decimalScale[-h-1]:0!=h&&(g*=Math.pow(10,h))}else d[0]=h;e&&(g=-g);Infinity==g&&(g=3.4028235E38);return!c||(!m||p)&&JU.PT.checkTrailingText(a,d[0],b)?g:NaN},"~S,~N,~A,~B");c$.checkTrailingText=c(c$,"checkTrailingText",function(a,b,d){for(var c;b<d&&(Character.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,G(1,0),null,null,null)},"~S");c$.parseFloatArrayInfested=c(c$,"parseFloatArrayInfested",function(a,b){for(var d=b.length,c=a.length,g=0,h=0,e=0;0<=e&&e<d&&g<c;e++){for(var j;Float.isNaN(j=JU.PT.parseFloat(a[g++]))&&g<c;);Float.isNaN(j)||(b[h=e]=j);if(g==c)break}return h+1},"~A,~A");c$.parseFloatArrayNext=c(c$,"parseFloatArrayNext",function(a,b,d,c,g){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==g?-1:a.indexOf(g),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),g=Array(c),h=G(1,0);h[0]=b;for(var e=0;e<c;++e)g[e]=JU.PT.parseTokenChecked(a,d,h);return g},"~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 g=c;c<b&&!JU.PT.isWhiteSpace(a,c);)++c;d[0]=c;return g==c?null:a.substring(g,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),g,h=b.length;if(0>c||0==h)return g=Array(1),g[0]=a,g;for(var e=a.length-h;0<=c&&c<e;d++)c=a.indexOf(b,c+h);g=Array(d);for(var j=c=0,m=0;0<=(j=a.indexOf(b,c))&&m+1<d;)g[m++]=a.substring(c,j),c=j+
h;a.indexOf(b,e)!=e&&(e+=h);g[m]=a.substring(c,e);return g},"~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=a,c=b[0];if(0>c||0>(c=d.indexOf('"',c)))return"";b[0]=++c;d=d.substring(c);for(c=-1;++c<d.length&&'"'!=d.charAt(c);)"\\"==d.charAt(c)&&c++;b[0]+=c+1;return d.substring(0,c)},"~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,g){return JU.PT.formatS(JU.DF.formatDecimal(a,d),b,0,c,g)},"~N,~N,~N,~B,~B");c$.formatD=c(c$,"formatD",function(a,b,d,c,g){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-d),b,0,c,g)},"~N,~N,~N,~B,~B,~B");c$.formatS=c(c$,"formatS",function(a,b,d,c,g){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=g&&!c&&"-"==a.charAt(0);g=g?"0":" ";var e=b?"-":g,h=new JU.SB;c&&h.append(a);for(h.appendC(e);0<--d;)h.appendC(g);
c||h.append(b?g+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 g=b.substring(c,c+1);a=JU.PT.rep(a,g,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 u(a,Number)||u(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(u(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(u(b,javajs.api.JSONEncodable)){if(null==(d=b.toJSON()))d="null";break}c=new JU.SB;if(u(b,java.util.Map)){c.append("{ ");for(var g="",h,e=b.keySet().iterator();e.hasNext()&&((h=e.next())||1);)c.append(g).append(JU.PT.packageJSON(h,JU.PT.toJSON(null,b.get(h)))),g=",";c.append(" }");break}if(u(b,JU.Lst)){c.append("[ ");
h=b.size();for(g=0;g<h;g++)0<g&&c.appendC(","),c.append(JU.PT.toJSON(null,b.get(g)));c.append(" ]");break}if(u(b,JU.M34)){h=u(b,JU.M4)?4:3;var e=W(h,0),j=b;c.appendC("[");for(g=0;g<h;g++)0<g&&c.appendC(","),j.getRow(g,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(g=0;g<h;g++)0<g&&c.appendC(","),c.append(JU.PT.toJSON(null,JU.PT.arrayGet(b,g)));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 ia(a)},"~O");c$.isASS=
c(c$,"isASS",function(a){return ja(a)},"~O");c$.isAP=c(c$,"isAP",function(a){return ka(a)},"~O");c$.isAF=c(c$,"isAF",function(a){return aa(a)},"~O");c$.isAFloat=c(c$,"isAFloat",function(a){return la(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 ma(a)},"~O");c$.isAFF=c(c$,"isAFF",function(a){return ba(a)},
"~O");c$.isAFFF=c(c$,"isAFFF",function(a){return na(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++),g='\\\\\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(g),e=b+1;h.append(a.substring(e,a.length));a=h.toString()}for(d=a.length;0<=--d;)127<a.charCodeAt(d)&&(b="0000"+Integer.toHexString(a.charCodeAt(d)),a=a.substring(0,d)+"\\u"+b.substring(b.length-4)+a.substring(d+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("*"),g=b.endsWith("*");return!c&&!g?d:c&&g?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,g=a.entrySet().iterator();g.hasNext()&&
((c=g.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 g;for(a=a.entrySet().iterator();a.hasNext()&&((g=a.next())||1);)c=g.getKey(),JU.PT.isLike(c,b)&&d.put(c,g.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(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""')}),k("JU"),c$=q(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=K(b,0),c=a+b,g=c-a;--c>=a;)d[--g]=this.charAt(c).charCodeAt(0);return d},"~N,~N"),k("JU"),t(["javajs.api.JSONEncodable"],"JU.T3",["java.lang.Float"],function(){c$=q(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!u(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+"]"})}),k("JU"),c$=q(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!u(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+")"}),k("JU"),t(["JU.T3"],"JU.T4",null,function(){c$=q(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!u(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+"]"})}),k("JU"),t(["JU.T3"],"JU.V3",null,function(){c$=s(JU,"V3",JU.T3);p(c$,function(){x(this,JU.V3,[])});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")}),k("JU"),t(["JU.LoggerInterface"],"JU.DefaultLogger",["JU.Logger"],function(){c$=s(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")}),k("JU"),t(["java.util.Hashtable","JU.DefaultLogger"],"JU.Logger",["java.lang.Long"],function(){c$=s(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(!A(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}),k("JU"),B(JU,"LoggerInterface"),k("J.api"),B(J.api,"JmolJDXMOLParser"),k("J.api"),B(J.api,"JmolJDXMOLReader"),k("J.jsv"),t(["J.api.JmolJDXMOLParser"],"J.jsv.JDXMOLParser","java.util.Hashtable JU.BS $.Lst $.PT $.SB JU.Logger".split(" "),
function(){c$=q(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=G(1,0);null!=d&&(d.remove("modelNumber"),d.containsKey("zipSet")&&(this.peakIndex=d.get("peakIndex"),null==this.peakIndex&&
(this.peakIndex=G(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 g=this.readLine();if(null==g||0==g.indexOf("#"))break;if(b){for(;0>g.indexOf(">");)g+=" "+this.readLine();g=g.trim()}g=JU.PT.replaceAllCharacters(g,"()<>"," ").trim();if(0==g.length)break;var h=g.indexOf("'");if(0<=h)var e=g.indexOf("'",h+1),g=g.substring(0,h)+JU.PT.rep(g.substring(h+1,e),",",";")+g.substring(e+1);JU.Logger.info("Peak Assignment: "+g);var j=JU.PT.split(g,",");d.addLast(j)}}catch(m){if(A(m,Exception))JU.Logger.error("Error reading peak assignments at "+
this.line+": "+m);else throw m;}return d},"~N,~B");e(c$,"setACDAssignments",function(a,b,d,c,g){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,m=new java.util.Hashtable,v=new JU.Lst;d=null;var p,n,q=0;if(h){d=new java.util.Hashtable;for(var k=JU.PT.split(g,"M ZZC"),r=k.length;1<=--r;){var s=JU.PT.getTokens(k[r]),q=Math.max(q,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 u=c.get(r),w=JU.PT.parseFloat(u[p]),x=u[n],x=h?this.fixACDAtomList(x,d,q):x.$replace(";",",");if(0<=x.indexOf("select")){var y=x.indexOf("select atomno=");if(0>y)continue;x=JU.PT.split(x.substring(y+14)," ")[0]}var z=h?"m/z="+Math.round(w)+": "+u[2]+" ("+u[1]+")":2==n?""+Math.round(10*w)/10:null;this.getStringInfo(e,z,b,a,x,m,""+w,v,' atoms="%ATOMS%" xMin="'+(w-j)+'" xMax="'+(w+j)+'">')}return this.setPeakData(v,
0)}catch(B){if(A(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,g=!1,h=0;h<a.length;h++){var e=a[h];(g=0<=e.indexOf("M"))&&(e="1-"+d);var j=e.indexOf("-");if(0<=j)for(var m=JU.PT.parseInt(e.substring(0,j)),e=JU.PT.parseInt(e.substring(j+1))+1;m<e;m++)c.set(g?m:JU.PT.parseInt(b.get(""+m)));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",g=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 m=new java.util.Hashtable,v=new JU.Lst;null!=this.readLine()&&!(this.line=this.line.trim()).startsWith("</"+c);)if(this.line.startsWith(g)){this.getRecord(g);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"),q=I(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMin")))+"_"+I(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,
"xMax")));this.getStringInfo(h,p,j,null==JU.PT.getQuotedAttribute(this.line,"model")?e:"",n,m,q,v,this.line.substring(g.length).trim())}return this.setPeakData(v,d)}catch(k){if(A(k,Exception))return 0;throw k;}},"~B,~N");c(c$,"setPeakData",function(a,b){for(var d=0,c=a.size(),g=0;g<c;g++){var h=a.get(g),e=JU.PT.rep(h[0],"%INDEX%",""+ ++this.peakIndex[0]),j=h[1];if(null!=j){for(var h="",m=j.nextSetBit(0);0<=m;m=j.nextSetBit(m+1))h+=","+(m+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,g,h,e,j,m){"HNMR".equals(d)?d="1HNMR":"CNMR".equals(d)&&(d="13CNMR");var v=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+v+c+" "+
m;null!=g&&(a=JU.PT.rep(a,'atoms="'+g+'"','atoms="%ATOMS%"'));b=h.get(e);null==b&&(b=[a,null==g?null:new JU.BS],h.put(e,b),j.addLast(b));null!=g&&(h=b[1],g=g.$replace(","," "),g.equals("*")&&(g="0:1000"),h.or(JU.BS.unescape("({"+g+"})")))},"~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")}),k("JSV.api"),B(JSV.api,"AnnotationData"),k("JSV.api"),B(JSV.api,"AppletFrame"),k("JSV.api"),t(["JSV.api.JSVAppletInterface","$.ScriptInterface"],
"JSV.api.JSVAppInterface",null,function(){B(JSV.api,"JSVAppInterface",[JSV.api.JSVAppletInterface,JSV.api.ScriptInterface])}),k("JSV.api"),B(JSV.api,"JSVAppletInterface"),k("JSV.api"),B(JSV.api,"JSVFileHelper"),k("JSV.api"),B(JSV.api,"JSVGraphics"),k("JSV.api"),t(["JSV.api.JSVViewPanel"],"JSV.api.JSVMainPanel",null,function(){B(JSV.api,"JSVMainPanel",JSV.api.JSVViewPanel)}),k("JSV.api"),t(["JSV.api.JSVViewPanel"],"JSV.api.JSVPanel",null,function(){B(JSV.api,"JSVPanel",JSV.api.JSVViewPanel)}),k("JSV.api"),
B(JSV.api,"JSVTree"),k("JSV.api"),B(JSV.api,"JSVTreeNode"),k("JSV.api"),B(JSV.api,"JSVTreePath"),k("JSV.api"),B(JSV.api,"JSVViewPanel"),k("JSV.api"),B(JSV.api,"JSVZipReader"),k("JSV.api"),B(JSV.api,"PanelListener"),k("JSV.api"),B(JSV.api,"ScriptInterface"),k("JSV.app"),t(["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$=
q(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(A(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,g,h){this.runScript("HIGHLIGHT "+
a+" "+b+" "+d+" "+c+" "+g+" "+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){u(a,JSV.common.PeakPickEvent)?this.vwr.processPeakPickEvent(a,!1):u(a,JSV.common.ZoomEvent)||u(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,g,h,e,j,m){switch(this.vwr.openDataOrFile(a,b,d,c,g,h,e,m)){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")}),k("JSV.app"),t(["javajs.api.GenericMouseInterface","javajs.awt.event.Event"],"JSV.app.GenericMouse",["JU.Logger"],function(){c$=q(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,g){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(g,b,c|32);break;case 501:this.xWhenPressed=b;this.yWhenPressed=d;this.modifiersWhenPressed10=c;this.pressed(g,
b,d,c,!1);break;case 506:this.dragged(g,b,d,c);break;case 504:this.entered(g,b,d);break;case 505:this.exited(g,b,d);break;case 503:this.moved(g,b,d,c);break;case 502:this.released(g,b,d,c);b==this.xWhenPressed&&(d==this.yWhenPressed&&c==this.modifiersWhenPressed10)&&this.clicked(g,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})}),k("JSV.appletjs"),t(["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$=q(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,g,h){this.app.addHighlight(a,b,d,c,g,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]],g=1;g<d.length;g++)c=c[d[g]];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(A(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,g){return this.app.vwr.processMouseEvent(a,b,d,c,g)},"~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")}),k("JSV.common"),t(["java.lang.Enum","JSV.common.Coordinate"],"JSV.common.Annotation",["java.lang.Double","JU.CU"],function(){c$=q(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,g,h,e,j){this.set(a,b);this.spec=d;this.text=c;this.$isPixels=g;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 g,h=0,e=1,j=2,m=3,v=d.size();try{switch(v){default:return null;case 1:g=d.get(0);h=e=-1;'"'==g.charAt(0)?(m=0,j=-1):(j=0,m=-1);break;case 2:h=e=-1;g=d.get(0);'"'==g.charAt(0)?(m=0,j=1):(j=0,m=1);break;case 3:case 4:g=d.get(2),'"'==g.charAt(0)?(m=2,j=4==v?3:-1):(j=2,m=4==v?3:-1),g=d.get(2),'"'==g.charAt(0)?(m=2,j=-1):(j=2,m=-1)}if(null==c&&(0>h||0>e||0>m||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(),q=0>j?c.getColor():a.getColor1(JU.CU.getArgbFromString(d.get(j))),k;0>m?k=c.text:(k=d.get(m),'"'==k.charAt(0)&&(k=k.substring(1,k.length-1)));return(new JSV.common.ColoredAnnotation).setCA(p,n,b,k,q,!1,!1,0,0)}catch(r){if(A(r,Exception))return null;throw r;}},"JSV.api.JSVGraphics,JSV.common.Spectrum,JU.Lst,JSV.common.Annotation");z(self.c$);c$=s(JSV.common.Annotation,"AType",Enum);r(c$,"Integration",0,[]);r(c$,"PeakList",1,[]);r(c$,"Measurements",
2,[]);r(c$,"OverlayLegend",3,[]);r(c$,"Views",4,[]);r(c$,"NONE",5,[]);c$=y()}),k("JSV.common"),t(["JSV.common.Annotation"],"JSV.common.ColoredAnnotation",null,function(){c$=q(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,g,e,l,j,m){this.setA(a,b,d,c,e,l,j,m);this.color=g;return this},"~N,~N,JSV.common.Spectrum,~S,javajs.api.GenericColor,~B,~B,~N,~N")}),
k("JSV.common"),t(["JSV.common.Parameters"],"JSV.common.ColorParameters",["java.util.Hashtable","$.StringTokenizer","JU.CU","$.Lst","JSV.common.ScriptToken"],function(){c$=q(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(A(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(" ")}),k("JSV.common"),c$=s(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"),k("JSV.common"),t(["JSV.common.CoordComparator"],"JSV.common.Coordinate",["java.lang.Double","java.util.Arrays","$.StringTokenizer","JU.DF","$.Lst"],function(){c$=q(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),g=JSV.common.Coordinate.getMinY(a,0,a.length);d=(JSV.common.Coordinate.getMaxY(a,0,a.length)-g)/(d-b);for(var e=0;e<a.length;e++)c[e]=(new JSV.common.Coordinate).set(a[e].getXVal(),(a[e].getYVal()-g)/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,g=c=0,e=new JU.Lst;for(a=new java.util.StringTokenizer(a," \t\n\r\f,;");a.hasMoreTokens();)c=a.nextToken().trim(),g=a.nextToken().trim(),c=Double.parseDouble(c),g=Double.parseDouble(g),c=(new JSV.common.Coordinate).set(c*b,g*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,g,e,l){if(!(b>a.length||0>b)){switch(l){case 0:g=a[a.length-b].getXVal()-g*e;break;case 1:g=d-g*e;break;case 2:g=c+g}for(d=0;d<a.length;d++)b=a[d],b.setXVal(b.getXVal()-g),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 g=a[b].getXVal();g<c&&(c=g)}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 g=a.get(c).getXYCoords(),g=JSV.common.Coordinate.getMinX(g,b.getStartingPointIndex(c),b.getEndingPointIndex(c));g<d&&(d=g)}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 g=a[b].getXVal();
g>c&&(c=g)}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 g=a.get(c).getXYCoords(),g=JSV.common.Coordinate.getMaxX(g,b.getStartingPointIndex(c),b.getEndingPointIndex(c));g>d&&(d=g)}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 g=a[b].getYVal();g<c&&(c=g)}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 g=a.get(c).getUserYFactor(),e=a.get(c).getYRef(),l=a.get(c).getXYCoords(),g=(JSV.common.Coordinate.getMinY(l,b.getStartingPointIndex(c),b.getEndingPointIndex(c))-e)*g+e;g<d&&(d=g)}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 g=a[b].getYVal();g>c&&(c=g)}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 g=a.get(c).getUserYFactor(),
e=a.get(c).getYRef(),l=a.get(c).getXYCoords(),g=(JSV.common.Coordinate.getMaxY(l,b.getStartingPointIndex(c),b.getEndingPointIndex(c))-e)*g+e;g>d&&(d=g)}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(),g=a[d-1].getXVal(),e=a[d].getYVal(),d=a[d-1].getYVal();return c==g?e:d+(e-d)/(c-g)*(b-g)},"~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 g=b.getXVal();d.setXVal(g);d.setYVal(b.getYVal());if(null==c)return!0;b=JSV.common.Coordinate.getNearestIndexForX(a,g);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,g){b=JSV.common.Coordinate.getNearestIndexForX(a,b);var e=c?-1:1;if(g)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}),k("JSV.common"),t(["java.lang.Enum"],"JSV.common.ExportType",null,function(){c$=s(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");r(c$,"UNK",0,[]);r(c$,"SOURCE",1,[]);r(c$,"DIF",2,[]);r(c$,"FIX",3,[]);r(c$,"SQZ",4,[]);r(c$,"PAC",5,[]);r(c$,"XY",6,[]);r(c$,"DIFDUP",7,[]);r(c$,"PNG",8,[]);r(c$,"JPG",9,[]);r(c$,"SVG",10,[]);r(c$,"SVGI",11,[]);r(c$,"CML",12,[]);r(c$,"AML",13,[]);r(c$,"PDF",14,[])}),k("JSV.common"),t("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$=q(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;F("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);
H(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();u(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();u(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=w(this.width*
this.fX0);this.xPixel11=w(this.xPixel00+this.width*this.fracX-1);this.xHArrows=this.xPixel00+25;this.xVArrows=this.xPixel11-w(this.right/2);this.xPixel0=this.xPixel00+w(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)+w(this.height*this.fY0);this.yPixel00=this.yPixel000+w(b*this.fracY*a);this.yPixel11=this.yPixel00+w(b*this.fracY)-1;this.yHArrows=this.yPixel11-12;this.yPixel0=this.yPixel00+
w(this.top/2);this.yPixel1=this.yPixel11-w(this.bottom/2);this.yPixels=this.yPixel1-this.yPixel0+1;null!=this.imageView&&this.is2DSpectrum&&(this.setImageWindow(),this.pd.display1D?(this.xPixels=w(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(w((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=G(this.nSpectra,0),c=G(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 g=0;g<
this.nSpectra;g++){var e=this.spectra.get(g).getXYCoords().length-1;d[g]=JSV.common.Coordinate.intoRange(a,0,e);c[g]=JSV.common.Coordinate.intoRange(b,0,e);this.allowStackedYScale=(new Boolean(this.allowStackedYScale&(this.spectra.get(g).getYUnits().equals(this.spectra.get(0).getYUnits())&&this.spectra.get(g).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,g,e,l,j){var m=0==this.graphsTemp.size()?this.spectra:this.graphsTemp,v=this.getSpectrumAt(0).getSubSpectra(),p=null==v||2==v.size()&&v.get(1).isImaginary(),n=!this.getSpectrumAt(0).is1D();p&&d==c?m=this.spectra:d==c&&(this.viewData=new JSV.common.ViewData(v,d,c,this.getSpectrum().isContinuous()),m=null);null!=m&&(this.viewData=new JSV.common.ViewData(m,d,c,g,e,this.getSpectrumAt(0).isContinuous(),n),a!=b&&this.getScale().setXRange(a,b));null!=l&&(JSV.common.ScaleData.copyScaleFactors(l,
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 g=a.getXVal(),e=d.toPixelX(g);a=this.toPixelY(a.getYVal());g=b.getXVal();d=d.toPixelX(g);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-w(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(w((this.pd.display1D?0.6:1)*this.xPixels0),this.yPixels);this.imageView.setXY0(this.getSpectrumAt(0),w(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),g=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 l=this.spectra.get(this.iSpectrumClicked);this.setScale(this.iSpectrumClicked);3!=d&&(d=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,1),null!=d?(c=d.getXVal(),g=d.getYVal()):null!=(d=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,2))?(c=d.getXVal2(),g=d.getYVal2()):c=this.getNearestPeak(l,c,g));this.pendingMeasurement=(new JSV.common.Measurement).setM1(c,g,l);this.pendingMeasurement.setPt2(e,g);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);g=this.toY(b);this.pendingMeasurement.setPt2(c,g);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,g,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 g=this.findMeasurement(a,
b,d,-1);return null!=g||u(a.get(0),JSV.common.Integral)?g:this.findMeasurement(a,b,d,-2)}for(var e=a.size();0<=--e;){var g=a.get(e),l,j,m,v;u(g,JSV.common.Integral)?(l=j=this.toPixelX(g.getXVal2()),m=this.toPixelYint(g.getYVal()),v=this.toPixelYint(g.getYVal2())):(l=this.toPixelX(g.getXVal()),j=this.toPixelX(g.getXVal2()),m=v=-2==c?this.yPixel1-2:this.toPixelY(g.getYVal()));switch(c){case 1:if(4>Math.abs(b-l)+Math.abs(d-m))return g;break;case 2:if(4>Math.abs(b-j)+Math.abs(d-v))return g;break;case -5:m=
v=w((m+v)/2),j=l+20;default:if(JSV.common.GraphSet.isOnLine(b,d,l,m,j,v))return g}}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=w((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?""+w(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+w(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(),g=Double.$valueOf(b.substring(d+1)).doubleValue();a===this.pin1Dx01?this.doZoom(c,this.pin1Dy0.getYVal(),g,this.pin1Dy1.getYVal(),!0,!1,!1,!0,!0):a===this.pin1Dy01?this.doZoom(this.pin1Dx0.getXVal(),c,this.pin1Dx1.getXVal(),g,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(g),this.pin2Dy1.yPixel0),this.doZoom(c,this.pin1Dy0.getYVal(),
g,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(g)),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?(g=a===this.pin1Dx0||a===this.cur2Dx0||a===this.pin2Dx0?this.pin1Dx1.getXVal():
this.pin1Dx0.getXVal(),this.doZoom(e,0,g,0,!a.is2D,!1,!1,!0,!0)):a===this.cur2Dy?this.setCurrentSubSpectrum(w(e)):a===this.pin2Dy0||a===this.pin2Dy1?(g=a===this.pin2Dy0?this.pin2Dy1.yPixel0:this.pin2Dy0.yPixel0,this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.subIndexToPixelY(w(e)),this.pin2Dx1.xPixel0,g)):(g=a===this.pin1Dy0?this.pin1Dy1.getYVal():this.pin1Dy0.getYVal(),this.doZoom(this.pin1Dx0.getXVal(),e,this.pin1Dx1.getXVal(),g,null==this.imageView,null==this.imageView,!1,!1,!0))}}catch(l){if(!A(l,
Exception))throw l;}}},"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?w((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,w((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2));this.pin1Dy01.setY(0,w((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,w((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,w((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,g,e,l,j,m){a==d?(a=this.getScale().minXOnScale,d=this.getScale().maxXOnScale):this.isLinked&&j&&this.pd.doZoomLinked(this,a,
d,m,l,g);a>d&&(j=a,a=d,d=j);b>c&&(j=b,b=c,c=j);j=!g&&null!=this.imageView&&(this.imageView.minZ!=b||this.imageView.maxZ!=c);if(this.zoomEnabled||j){if(l){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;l=this.viewData.getScaleData();var v=G(this.nSpectra,0),p=G(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,v,p))return}else if(!JSV.common.ScaleData.setDataPointIndices(this.spectra,a,d,3,v,p))return;if(n=b==c)g=!j&&g?g=this.getScale().spectrumScaleFactor:1,1E-4>Math.abs(g-1)&&(b=this.getScale().minYOnScale,c=this.getScale().maxYOnScale);g=null;if(n||e)this.getCurrentView(),g=this.viewData.getNewScales(this.iSpectrumSelected,n,b,c);this.getView(a,
d,b,c,v,p,l,g);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));m&&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,g,e){this.g2d=this.pd.g2d;this.gMain=a;var l=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,m=!this.showAllStacked||1==this.nSpectra||0<=j,v=null==this.imageView||this.pd.display1D,p=0<=j?1:0,n=this.getFixedSelectedSpectrumIndex();
if(v&&e&&(this.fillBox(a,this.xPixel0,this.yPixel0,this.xPixel1,this.yPixel1,JSV.common.ScriptToken.PLOTAREACOLOR),0>j)){m=!0;for(j=0;j<this.nSpectra;j++)this.doPlot(j,c)&&0!=p++&&(m=(new Boolean(m&this.viewData.areYScalesSame(j-1,j))).valueOf())}var q=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),k=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,q,j,this.isSplittable,k)}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&&m:!0;if(v){m=I(this.yPixels*(this.yStackOffsetPercent/100));this.haveLeftRightArrows=!1;for(k=j=0;j<this.nSpectra;j++)if(this.doPlot(j,
c)){var q=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=!q&&(1==this.nSplit||this.showAllStacked||this.iSpectrumSelected==c),u=t&&this.$haveSelectedSpectrum&&j==n;t&&(this.resetPinsFromView(),this.drawWidgets(b,
d,l,g,v,u,!1));this.haveSingleYScale&&(j==n&&e)&&(this.drawGrid(a),this.pd.isPrinting&&1<this.nSplit&&this.drawSpectrumSource(a,j));t&&this.drawWidgets(b,d,l,!1,v,u,!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();u=(1<this.nSplit?j==this.iSpectrumMovedTo:this.isLinked||j==n)&&!this.pd.isPrinting&&s.isContinuous();e&&this.drawSpectrum(a,j,k,q,r,t,u);this.drawMeasurements(b,j);null!=this.pendingMeasurement&&this.pendingMeasurement.spec===
s&&this.drawMeasurement(b,this.pendingMeasurement);u&&0<=this.xPixelMovedTo&&this.drawSpectrumPointer(b,s,k,r);1<this.nSpectra&&(1==this.nSplit&&this.pd.isCurrentGraphSet(this)&&e)&&(this.haveLeftRightArrows=!0,this.pd.isPrinting||(this.setScale(0),q=this.iSpectrumSelected,2!=this.nSpectra&&(this.setPlotColor(a,(q+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<=q&&(this.setPlotColor(a,
q),this.fillCircle(a,this.xHArrows,this.yHArrows,!0)),this.setCurrentBoxColor(a),this.fillCircle(a,this.xHArrows,this.yHArrows,!1),this.setPlotColor(a,(q+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)));k-=m}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<=l&&this.draw2DUnits(a)),this.drawWidgets(b,d,l,g,v,!0,!1),this.drawWidgets(b,d,l,g,v,!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 g=this.pd.integralShiftMode;null!=c&&((!this.pd.ctrlPressed||this.pd.isIntegralDrag)&&!this.isOnSpectrum(this.pd.mouseX,this.pd.mouseY,-1)?c=null:0==g&&(g=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!=g?(this.setPlotColor(a,0),b=0>g?this.yPixelPlot0:this.yPixelPlot1,this.drawHandle(a,0>g?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 g=c.get(b);this.drawPeak(a,g,g===d.getSelectedPeak()?14:7)}}},"~O,~O,JSV.common.Spectrum");c(c$,"drawPeak",function(a,b,d){if(!this.pd.isPrinting){var c=b.getXMin(),g=b.getXMax();c!=g&&this.drawBar(a,b,c,g,null,d)}},"~O,JSV.common.PeakInfo,~N");
c(c$,"drawWidgets",function(a,b,d,c,g,e,l){this.setWidgets(c,d,g);if(!this.pd.isPrinting||!(null==this.imageView?!this.cur1D2Locked:this.sticky2Dcursor)){!this.pd.isPrinting&&!l&&(g?(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)!=l){if(c.is2D){if(c===this.cur2Dx0&&!g)continue}else{var m=c===this.pin1Dy0||c===this.pin1Dy1||
c===this.pin1Dy01;if(null!=this.imageView&&g==m||m&&!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,g,e){var l=c+d,j=Math.abs(c-d),m=Math.abs(this.toX(this.xPixel1)-this.toX(this.xPixel0));0<e&&j>m/20&&(j=m/20,d=l/2-j,c=l/2+j);d=this.toPixelX(d);c=this.toPixelX(c);d>c&&(l=d,d=c,c=l);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,g):(this.fillBox(a,d,this.yPixel0,c,this.yPixel0+3,g),null!=b&&(d=w((d+c)/2),this.fillBox(a,d-1,this.yPixel0,d+1,this.yPixel0+e,g)))},"~O,JSV.common.PeakInfo,~N,~N,JSV.common.ScriptToken,~N");c(c$,"drawSpectrum",function(a,b,d,c,g,e,l){var j=this.spectra.get(b);this.drawPlot(a,b,j,e,d,c,null,l);null!=g&&(this.haveIntegralDisplayed(b)&&this.drawPlot(a,b,j,!0,d,!1,g,!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,g,e,l,j){var m=null==l?d.getXYCoords():this.getIntegrationGraph(b).getXYCoords(),v=null!=l;l=null==l?null:l.getBitSet();j=!v&&!e&&null!=this.pendingIntegral&&this.pendingIntegral.spec===
this.spectra.get(b)||null!=d.fillColor&&j;e=e?-2:v?-1:!this.allowStacking?0:b;this.setPlotColor(a,e);var p=!0,n=this.toPixelY(0);v?j=(new Boolean(j&n==this.fixY(n))).valueOf():n=this.fixY(n);var q=this.viewData.getStartingPointIndex(b);b=this.viewData.getEndingPointIndex(b);if(c){b--;var k=!j&&this.g2d.canDoLineTo();k&&this.g2d.doStroke(a,!0);var r=!1;for(c=q;c<=b;c++){var s=m[c],t=m[c+1],u=v?this.toPixelYint(s.getYVal()):this.toPixelY(s.getYVal());if(-2147483648!=u){var w=v?this.toPixelYint(t.getYVal()):
this.toPixelY(t.getYVal());if(-2147483648!=w){var x=this.toPixelX(s.getXVal()),y=this.toPixelX(t.getXVal()),u=this.fixY(g+u),w=this.fixY(g+w);v&&(c==q&&(this.xPixelPlot1=x,this.yPixelPlot0=u),this.xPixelPlot0=y,this.yPixelPlot1=w);if(!(y==x&&u==w))if(j&&(!v||this.pendingIntegral.overlaps(s.getXVal(),t.getXVal())))v?(this.g2d.setGraphicsColor(a,this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR)),this.g2d.drawLine(a,x,n,x,u)):(this.g2d.setGraphicsColor(a,d.fillColor),this.g2d.fillRect(a,x,Math.min(n,
u),y-x,Math.abs(n-u))),this.setPlotColor(a,e);else if(!(u==w&&u==this.yPixel0)&&(null!=l&&l.get(c)!=p&&(p=l.get(c),!this.pd.isPrinting&&0!=this.pd.integralShiftMode?this.setPlotColor(a,0):p?this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR):this.setPlotColor(a,-3)),!this.pd.isPrinting||p))r?this.g2d.lineTo(a,y,w):(this.g2d.drawLine(a,x,u,y,w),r=k)}}}k&&this.g2d.doStroke(a,!1)}else{for(c=q;c<=b;c++)d=m[c],w=this.toPixelY(d.getYVal()),-2147483648!=w&&(x=this.toPixelX(d.getXVal()),u=
this.toPixelY(Math.max(this.getScale().minYOnScale,0)),u=this.fixY(g+u),w=this.fixY(g+w),u==w&&(u==this.yPixel0||u==this.yPixel1)||this.g2d.drawLine(a,x,u,x,w));this.getScale().isYZeroOnScale()&&(g+=this.toPixelY(this.getScale().spectrumYRef),g==this.fixY(g)&&this.g2d.drawLine(a,this.xPixel1,g,this.xPixel0,g))}},"~O,~N,JSV.common.Spectrum,~B,~N,~B,JSV.common.IntegralData,~B");c(c$,"drawFrame",function(a,b,d,c,g){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);g&&(0<=b&&(this.setPlotColor(a,b),this.fillArrow(a,3,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)-9,!0),this.fillArrow(a,4,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)+9,!0),this.setCurrentBoxColor(a)),this.fillArrow(a,3,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)-9,!1),this.fillCircle(a,this.xVArrows,w((this.yPixel00+this.yPixel11)/2),!1),this.fillArrow(a,4,this.xVArrows,
w((this.yPixel00+this.yPixel11)/2)+9,!1));if(null==this.imageView&&d){b=this.xPixel00+10;d=this.xPixel11-10;g=this.yPixel00+1;var e=this.yPixel11-2;this.g2d.drawLine(a,b,g,d,g);this.g2d.drawLine(a,d,g,d,e);this.g2d.drawLine(a,b,e,d,e);c&&this.fillBox(a,d-10,g,d,g+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),g=this.yPixel1,e=this.yPixel1+4*this.pd.scalingFactor,l=this.yPixel1+2*this.pd.scalingFactor,c=c.getHeight(),j=b.toPixelX(this.getScale().steps[0])-b.toPixelX(0),m=
Math.abs(0.95*j),p=this.getScale().firstX-this.getScale().steps[0],n=1.0001*(this.getScale().maxXOnScale+this.getScale().steps[0]),q=0;2>q;q++){1==q&&JSV.common.ScaleData.fixScale(this.mapX);for(var k=1E10,r=p;r<=n;r+=this.getScale().steps[0]){var j=b.toPixelX(r),s=Double.$valueOf(r),t;switch(q){case 0:t=JU.DF.formatDecimalDbl(r,d);this.mapX.put(s,t);this.drawTick(a,j,g,e,b);j=Math.abs(k-r);k=this.getScale().minorTickCounts[0];if(0!=k){j/=k;for(t=1;t<k;t++)this.drawTick(a,b.toPixelX(r-t*j),g,l,b)}k=
r;continue;case 1:t=this.mapX.get(s);if(null==t||j!=b.fixX(j))continue;var s=this.pd.getStringWidth(t),u=j+w(s/2)==b.fixX(j+w(s/2))?2:0;0<u&&this.g2d.drawString(a,t,j-w(s/u),e+c);r+=Math.floor(s/m)*this.getScale().steps[0]}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(c$,"drawTick",function(a,b,d,c,g){b==g.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],g=this.pd.setFont(a,b.getXPixels(),
0,this.pd.isPrinting?10:12,!1).getHeight(),e=d.maxYOnScale+d.steps[1]/2,l=-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 m=d.firstY;m<e;m+=d.steps[1]){var p=Double.$valueOf(m),n=b.getXPixel0(),q=b.toPixelY(m);if(q==b.fixY(q)){var k;0==j&&this.g2d.drawLine(a,n,q,n-3*this.pd.scalingFactor,q);if(!(Math.abs(q-l)<=g))switch(l=q,j){case 0:k=JU.DF.formatDecimalDbl(m,c);this.mapX.put(p,k);break;case 1:k=this.mapX.get(p);
if(null==k)continue;k.startsWith("0")&&k.contains("E")&&(k="0");this.g2d.drawString(a,k,n-4*this.pd.scalingFactor-this.pd.getStringWidth(k),q+w(g/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,g,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,w(d-this.pd.getStringWidth(b)*g),w(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),g=this.spectra.get(d);if(this.pd.isPrinting)null!=c&&(this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR),this.printPeakList(a,g,c));else{if(null==c){for(var e=0;e<this.highlights.size();e++){var l=this.highlights.get(e);l.spectrum===g&&(this.pd.setHighlightColor(l.color),this.drawBar(b,null,l.x1,l.x2,JSV.common.ScriptToken.HIGHLIGHTCOLOR,0))}this.drawPeakTabs(a,b,g)}if(null!=c){b=g.isInverted()?this.yPixel1-10*this.pd.scalingFactor:this.yPixel0;this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);
for(e=c.size();0<=--e;)g=c.get(e),g=this.toPixelX(g.getXVal()),this.g2d.drawLine(a,g,b,g,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 g=this.pd.getFontHeight(),e=G(d.size(),
0),l=G(d.size(),0),j=0,m=5*this.pd.scalingFactor,p=10*this.pd.scalingFactor,n=15*this.pd.scalingFactor,q=25*this.pd.scalingFactor,k=0;k<c.length;k++)l[k]=this.toPixelX(Double.parseDouble(c[k][1])),0==k?e[k]=l[k]:(e[k]=Math.max(e[k-1]+g,l[k]+g),j+=e[k]-l[k]);j/=2*c.length;e[0]-j<this.xPixel0+q&&(j=e[0]-(this.xPixel0+q));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,q=k?-1:1,r=(k?this.yPixel1:this.yPixel0)+
q*(j+b+n),k=0;k<c.length;k++)this.g2d.drawLine(a,e[k],r,e[k],r+m*q),this.g2d.drawLine(a,e[k],r+m*q,l[k],r+p*q),this.g2d.drawLine(a,l[k],r+p*q,l[k],r+n*q),0<j&&0<c[k][4].length&&this.g2d.drawLine(a,w((e[k]+e[k-1])/2),r-b+m,w((e[k]+e[k-1])/2),r-b-m);r-=2*q*this.pd.scalingFactor;0<j&&(this.drawStringRotated(a,-90,e[0]-n,r," ppm"),this.drawStringRotated(a,-90,e[0]-n,r-b-m," Hz"));for(k=d.size();0<=--k;)this.drawStringRotated(a,-90*q,e[k]+w(q*g/3),r,c[k][1]),0<j&&0<c[k][4].length&&(d=w((e[k]+e[k-1])/
2)+w(g/3),this.drawStringRotated(a,-90,d,r-b-m,c[k][4]))}},"~O,JSV.common.Spectrum,JSV.common.PeakData");c(c$,"drawStringRotated",function(a,b,d,c,g){this.g2d.drawStringRotated(a,g,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 g=b.get(c);this.setAnnotationColor(a,g,d);var e=(g.is2D?this.imageView:this).toPixelX(g.getXVal()),l=g.isPixels()?w(this.yPixel0+10*this.pd.scalingFactor-g.getYVal()):g.is2D?this.imageView.subIndexToPixelY(w(g.getYVal())):
this.toPixelY(g.getYVal());this.g2d.drawString(a,g.text,e+g.offsetX*this.pd.scalingFactor,l-g.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 g=this.pd.getFontHeight();this.g2d.setStrokeBold(a,
!0);for(var e=c.size();0<=--e;){var l=c.get(e);if(0!=l.getValue()){var j=this.toPixelX(l.getXVal2()),m=d*this.pd.scalingFactor+this.toPixelYint(l.getYVal()),k=d*this.pd.scalingFactor+this.toPixelYint(l.getYVal2());j!=this.fixX(j)||(m!=this.fixY(m)||k!=this.fixY(k))||(this.pd.isPrinting||this.g2d.drawLine(a,j,m,j,k),this.g2d.drawString(a," "+l.text,j,w((m+k)/2)+w(g/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()),g=this.toPixelX(b.getXVal2());if(!Double.isNaN(b.getXVal())&&!(d!=this.fixX(d)||g!=this.fixX(g))){var e=2<=Math.abs(d-g),l=this.getScale().isYZeroOnScale()&&b.spec.isHNMR(),j=w((d+g)/2);this.g2d.setStrokeBold(a,!0);e&&this.g2d.drawLine(a,d,c,g,c);l&&this.g2d.drawLine(a,d+1,this.yPixel1-1,g,this.yPixel1-1);this.g2d.setStrokeBold(a,!1);e&&this.g2d.drawString(a,b.text,j+b.offsetX,c-b.offsetY);l&&(this.g2d.drawLine(a,d,this.yPixel1,d,this.yPixel1-
6*this.pd.scalingFactor),this.g2d.drawLine(a,g,this.yPixel1,g,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&&u(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],g=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()),g)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dy0.getYVal(),
this.pin1Dy1.getYVal()),g):d===this.cur2Dy?(d=this.imageView.toSubspectrumIndex(d.yPixel0),c=this.get2DYLabel(d,c)):c=d===this.pin2Dy01?""+w(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+w(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):d.isXtype?JU.DF.formatDecimalDbl(d.getXVal(),c):d.is2D?""+w(d.getYVal()):JU.DF.formatDecimalDbl(d.getYVal(),g),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)),g=this.setCoordStr(d,c),e=this.getFixedSelectedSpectrumIndex();this.isInPlotRegion(a,
b)?1!=this.nSpectra&&this.haveIntegralDisplayed(e)&&(c=this.getIntegrationGraph(e).getPercentYValueAt(d),g+=", "+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:g)}},"~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,g=!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 l=this.spectra.get(d),c=l.xyCoords,g=l.isContinuous()}var l=d*I(this.yPixels*(this.yStackOffsetPercent/100)),j=this.viewData.getStartingPointIndex(d);
d=this.viewData.getEndingPointIndex(d);if(g)for(g=j;g<d;g++){var m=c[g],k=c[g+1],j=this.toPixelX(m.getXVal()),p=this.toPixelX(k.getXVal()),m=e?this.toPixelYint(m.getYVal()):this.toPixelY(m.getYVal()),k=e?this.toPixelYint(k.getYVal()):this.toPixelY(k.getYVal());if(!(-2147483648==m||-2147483648==k))if(m=this.fixY(m)-l,k=this.fixY(k)-l,JSV.common.GraphSet.isOnLine(a,b,j,m,p,k))return!0}else for(g=j;g<=d;g++)if(e=c[g],k=this.toPixelY(e.getYVal()),-2147483648!=k&&(j=this.toPixelX(e.getXVal()),m=this.toPixelY(Math.max(this.getScale().minYOnScale,
0)),m=this.fixY(m),k=this.fixY(k),!(m==k&&(m==this.yPixel0||m==this.yPixel1))&&JSV.common.GraphSet.isOnLine(a,b,j,m,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,g,e){var l=Math.abs(d-a);if(2>l&&2>Math.abs(c-b))return!0;var j=g-a;if(2>Math.abs(j)&&2>Math.abs(e-b))return!0;var m=c-e;if(2<Math.abs(m)&&c<b==e<b)return!1;var k=d-g;return 2<Math.abs(k)&&d<a==g<a?!1:JSV.common.GraphSet.distance(l,c-b)+JSV.common.GraphSet.distance(j,
b-e)<JSV.common.GraphSet.distance(k,m)+2},"~N,~N,~N,~N,~N,~N");c$.setFractionalPositions=c(c$,"setFractionalPositions",function(a,b,d){var c=b.size(),g=0,e=0;a.isLinked=d!==JSV.common.PanelData.LinkMode.NONE;if(d===JSV.common.PanelData.LinkMode.NONE){for(var l=0;l<c;l++)d=b.get(l),g+=(d.getSpectrumAt(0).is1D(),1)*d.nSplit;g=1/g;for(l=0;l<c;l++)d=b.get(l),d.isLinked=!1,a=d.getSpectrumAt(0).is1D()?g:1*g,d.fX0=0,d.fY0=e,d.fracX=1,d.fracY=a,e+=a*d.nSplit}else{var g=null,j=-1;if(2==c||3==c)for(l=0;l<c;l++)if(d=
b.get(l),!d.getSpectrum().is1D()){g=d;0<=j&&(l=-2);j=l;break}if(-2==j||-1==j&&2!=c)JSV.common.GraphSet.setFractionalPositions(a,b,JSV.common.PanelData.LinkMode.NONE);else for(l=0;l<c;l++)d=b.get(l),d.isLinked=!0,a=d.getSpectrumAt(0),a.is1D()?(null!=g&&(j=g.getSpectrumAt(0),JSV.common.Spectrum.areLinkableX(a,j)&&(d.gs2dLinkedX=g),JSV.common.Spectrum.areLinkableY(a,j)&&(d.gs2dLinkedY=g)),d.fX0=0,d.fY0=e,d.fracX=null==g?1:0.5,d.fracY=3==c||null==g?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=D(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 g=JU.PT.getQuotedAttribute(c,"xMin"),c=JU.PT.getQuotedAttribute(c,"xMax");if(null==g||null==c)break;g=JU.PT.parseFloat(g);c=JU.PT.parseFloat(c);if(Float.isNaN(g)||Float.isNaN(c))break;this.pd.addHighlight(this,g,c,d,200,140,140,100);d.setSelectedPeak(a);!this.getScale().isInRangeX(g)&&!(this.getScale().isInRangeX(c)||
g<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-w((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-w((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-w((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-w((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,g,e){for(var l=new JU.Lst,j=0;j<d.size();j++){var m=d.get(j),k=e===JSV.common.PanelData.LinkMode.NONE?JSV.common.GraphSet.findCompatibleGraphSet(l,
m):null;null==k&&l.addLast(k=new JSV.common.GraphSet(b.getPanelData()));k.addSpec(m)}JSV.common.GraphSet.setFractionalPositions(a,l,e);for(j=l.size();0<=--j;)l.get(j).initGraphSet(c,g),JU.Logger.info("JSVGraphSet "+(j+1)+" nSpectra = "+l.get(j).nSpectra);return l},"JSV.common.PanelData,JSV.api.JSVPanel,JU.Lst,~N,~N,JSV.common.PanelData.LinkMode");c(c$,"drawGraphSet",function(a,b,d,c,g,e,l,j,m,k,p){this.zoomEnabled=this.pd.getBoolean(JSV.common.ScriptToken.ENABLEZOOM);this.height=g*this.pd.scalingFactor;
this.width=c*this.pd.scalingFactor;this.left=e*this.pd.scalingFactor;this.right=l*this.pd.scalingFactor;this.top=j*this.pd.scalingFactor;this.bottom=m*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,p);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 g=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(g){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),g=this.getSpectrum().isInverted()?this.yPixel1-this.pd.mouseY:this.pd.mouseY-this.yPixel0;d.update(this.pd.coordClicked,c,g)}},"JSV.common.Annotation.AType,~N");c(c$,"isVisible",function(a){return u(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,g=this.spectra.size();0<=--g;)if((null==a||this.getSpectrumAt(g).getFilePathForwardSlash().equals(a))&&this.getSpectrumAt(g).matchesPeakTypeModel(b,d))this.setSpectrumSelected(g),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,g=this.spectra.size();0<=--g;)if(null!=(c=this.getSpectrumAt(g).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)u(d,JSV.dialog.JSVDialog)?d.setVisible(!1):d.setState(!d.getState());else{var c=b.booleanValue();d.setState(c);(c||u(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 g=Double.parseDouble(JSV.common.ScriptToken.getTokens(b).get(1));c.getData().setMinimumIntegral(g)}catch(e){if(!A(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 g=this.pd.getInput("New chemical shift (set blank to reset)","Set Reference",""+c).trim();b=0==g.length?c-d.addSpecShift(0):Double.parseDouble(g)}catch(e){if(A(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 l,c=this.dialogs.entrySet().iterator();c.hasNext()&&((l=c.next())||1);)l.getValue().getSpectrum()===
d&&l.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());u(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=u(b,JSV.dialog.JSVDialog)?b:null;(null==a?null==d||!d.isVisible():a.booleanValue())?this.pd.showDialog(JSV.common.Annotation.AType.PeakList):u(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 c;switch(a){case JSV.common.Annotation.AType.PeakList:c=this.getPeakListing(b,null,!1);break;case JSV.common.Annotation.AType.Integration:c=this.getIntegration(b,null,!1);break;default:return null}if(null==
c)return null;var f=new java.util.Hashtable;c.getInfo(f);return f},"JSV.common.Annotation.AType,~N");c(c$,"getInfo",function(a,b){var c=new java.util.Hashtable;if("viewInfo".equalsIgnoreCase(a))return this.getScale().getInfo(c);var f=new JU.Lst;c.put("spectra",f);for(var g=0;g<this.nSpectra;g++)if(!(0<=b&&g!=b)){var e=this.spectra.get(g),l=e.getInfo(a);if(0<=b&&null!=a&&(2==l.size()||a.equalsIgnoreCase("id")))return 2==l.size()&&l.remove("id"),l;JSV.common.Parameters.putInfo(a,l,"type",e.getDataType());
JSV.common.Parameters.putInfo(a,l,"titleLabel",e.getTitleLabel());JSV.common.Parameters.putInfo(a,l,"filePath",e.getFilePath().$replace("\\","/"));JSV.common.Parameters.putInfo(a,l,"PeakList",JSV.common.Parameters.isMatch(a,"PeakList")?this.getMeasurementInfo(JSV.common.Annotation.AType.PeakList,g):null);JSV.common.Parameters.putInfo(a,l,"Integration",JSV.common.Parameters.isMatch(a,"Integration")?this.getMeasurementInfo(JSV.common.Annotation.AType.Integration,g):null);if(0<=b)return l;f.addLast(l)}return c},
"~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,c){var f;null!=this.gs2dLinkedX&&(f=this.toPixelX(a),f!=this.fixX(f)&&(f=-2147483648,a=1.7976931348623157E308),this.cur1D2x1.setX(a,f));null!=this.gs2dLinkedY&&(f=this.toPixelX(b),f!=this.fixX(f)&&(f=-2147483648,
b=1.7976931348623157E308),this.cur1D2x2.setX(b,f));this.cur1D2Locked=c},"~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 f=b.getValue();this.isVisible(f)&&(null==a?f.setVisible(!0):f.setFocus(f.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 f=0,b=b.length;f<c;f++,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=w(255*Math.random()),b=w(255*Math.random()),c=w(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,f,g,e,l){return(new JSV.common.ColoredAnnotation).setCA(a,b,this.getSpectrum(),c,this.pd.BLACK,f,g,e,l)},"~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,f,g,e){this.setColorFromToken(a,
e);this.g2d.fillRect(a,Math.min(b,f),Math.min(c,g),Math.abs(b-f),Math.abs(c-g))},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");c(c$,"drawHandle",function(a,b,c,f){f?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,f,g){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];f=[f+5*e,f-e,f-e,f+5*e,f+5*e,f+10*e,f+5*e];switch(b){case 1:case 2:g?
this.g2d.fillPolygon(a,f,c,7):this.g2d.drawPolygon(a,f,c,7);break;case 3:case 4:g?this.g2d.fillPolygon(a,c,f,7):this.g2d.drawPolygon(a,c,f,7)}},"~O,~N,~N,~N,~B");c(c$,"fillCircle",function(a,b,c,f){f?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,u(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 f=0;f<this.nSpectra;f++){var g=this.spectra.get(f),e=b||!g.canShowSolutionColor()?-1:a.getColour(g,c);g.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 f=this.spectra.get(c);if(f.dataType.equals(b)){var g=JSV.common.Spectrum.taConvert(f,a);g!==f&&this.pd.setSpecForIRMode(g)}}},"JSV.common.Spectrum.IRMode,~S");c$.$GraphSet$Highlight$=function(){z(self.c$);
c$=q(function(){L(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,f){this.x1=a;this.x2=b;this.color=f;this.spectrum=c},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");e(c$,"equals",function(a){return!u(a,JSV.common.GraphSet.Highlight)?!1:a.x1==this.x1&&a.x2==this.x2},"~O");c$=y()};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)}),k("JSV.common"),t(["JSV.common.XYScaleConverter"],"JSV.common.ImageView",["java.lang.Double","JSV.common.Coordinate","$.ScaleData"],function(){c$=q(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,f){this.xPixelZoom1=
Math.min(a,c);this.yPixelZoom1=Math.min(b,f);this.xPixelZoom2=Math.max(a,c);this.yPixelZoom2=Math.max(b,f);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),f=this.toImageY(this.yPixelZoom2);this.xView1=Math.min(a,c);this.yView1=Math.min(b,f);this.xView2=Math.max(a,c);this.yView2=Math.max(b,f);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+w(Math.floor((a-this.xPixel0)/(this.xPixels-1)*(this.xView2-this.xView1)))},"~N");c(c$,"toImageY",function(a){return this.yView1+w(Math.floor((a-this.yPixel0)/(this.yPixels-1)*(this.yView2-this.yView1)))},"~N");c(c$,"toImageX0",function(a){return JSV.common.Coordinate.intoRange(w((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(w((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-w((a-this.minX)/
(this.maxX-this.minX)*(this.xPixels-1))},"~N");c(c$,"toPixelY0",function(a){return this.yPixel1-w(a/(this.imageHeight-1)*(this.yPixels-1))},"~N");c(c$,"subIndexToPixelY",function(a){return this.yPixel0+w(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,f){a=this.toImageX0(a);b=this.toImageY0(b);
c=this.toImageX0(c);f=this.toImageY0(f);this.xView1=Math.min(a,c);this.yView1=Math.min(b,f);this.xView2=Math.max(a,c);this.yView2=Math.max(b,f);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 f=a.getXYCoords(),g=c.size();this.imageWidth=f.length;this.imageHeight=g;var e=255/(this.maxZ-this.minZ);if(!b&&null!=this.buf2d&&e==this.grayFactorLast)return this.buf2d;this.grayFactorLast=e;for(var l=this.imageWidth*
this.imageHeight,j=G(l,0),m=0,k=0;k<g;k++){var p=c.get(k).xyCoords;if(p.length!=f.length)return null;for(var q=c.get(k).getUserYFactor(),n=0;n<f.length;n++){var r=p[n].getYVal(),r=255-JSV.common.Coordinate.intoRange(w((r*q-this.minZ)*e),0,255);j[--l]=r;m+=r}}this.averageGray=1-m/(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,f=!1;((f=0.05>this.averageGray)||0.3<
this.averageGray)&&10>c++;)b.scaleSpectrum(-2,f?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+w((a-b)/(c-b)*(this.xPixels-1))},"~N");e(c$,"toPixelY",function(a){return w(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)}),k("JSV.common"),t(["JSV.common.Measurement"],"JSV.common.Integral",null,function(){c$=s(JSV.common,"Integral",JSV.common.Measurement);c(c$,"setInt",function(a,b,c,f,g,e){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(g,e);this.setValue(f);return this},"~N,~N,JSV.common.Spectrum,~N,~N,~N")}),k("JSV.common"),c$=s(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"),k("JSV.common"),t(["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$=q(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,f){x(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,f]);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 f=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 g=0;g<this.xyCoords.length;g++){var e=this.xyCoords[g].getYVal(),e=(e-this.offset)/this.intRange;this.xyCoords[g].setYVal(e*a+b)}1!=this.normalizationFactor&&(this.normalizationFactor*=f/c);if(this.haveRegions)for(g=this.size();0<=--g;)c=this.get(g),f=this.getYValueAt(c.getXVal()),e=this.getYValueAt(c.getXVal2()),c.setYVal(f),c.setYVal2(e),c.setValue(100*Math.abs(e-f)*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),f=this.getYValueAt(b);this.haveRegions=!0;c=(new JSV.common.Integral).setInt(a,c,this.spec,100*Math.abs(f-c)*this.normalizationFactor,b,f);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),f=0,g=c.indexOf("^");if(!(0>g)){var e=c.indexOf(":");e>g&&(f=Double.$valueOf(c.substring(e+1).trim()).doubleValue(),
c=c.substring(0,e).trim());var l=Double.$valueOf(c.substring(0,g).trim()).doubleValue(),j=Double.$valueOf(c.substring(g+1).trim()).doubleValue();0==j&&0==l&&this.clear();if(j!=l){var m=this.addIntegralRegion(Math.max(j,l),Math.min(j,l));null!=m&&0<f&&this.setSelectedIntegral(m,f)}}}catch(k){if(!A(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 f=
a[c].getYVal();f<b&&0<=f&&(b=f)}for(c=0;c<a.length;c++)f=a[c].getYVal(),-1.7976931348623157E308<f&&(this.integralTotal+=f-b);this.intRange=this.percentRange/100/this.integralTotal;this.offset=this.percentOffset/100;for(var g=0,c=a.length;0<=--c;)f=a[c].getYVal(),-1.7976931348623157E308<f&&(g+=f-b),this.xyCoords[c]=(new JSV.common.Coordinate).set(a[c].getXVal(),g*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,f=new java.util.StringTokenizer(b,",");f.hasMoreTokens();){var g=f.nextToken(),g=new java.util.StringTokenizer(g,":"),g=(new JSV.common.Annotation).setA(Double.parseDouble(g.nextToken()),0,a,g.nextToken(),!0,!1,0,0);c.addLast(g)}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 f=this.get(c);f.setValue(a*f.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),f=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal()),c=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal2());a.setBits(Math.min(f,c),Math.max(f,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,f){b=w(100*(c+f-b)/f);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(),f=this.xyCoords.length-1;0<=--f;){var g=this.xyCoords[f].getYVal();b++;1E-4>g-c&&0>a?g<c&&(c=g,b=0):0>a?(a=f+Math.min(b,20),c=g,b=0):1E-4>g-c?(1==b&&(c=g),20<=b&&(this.addIntegralRegion(this.xyCoords[a].getXVal(),this.xyCoords[f].getXVal()),a=-1,c=g,b=0)):(b=0,c=g)}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));N(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");z(self.c$);c$=s(JSV.common.IntegralData,"IntMode",Enum);c$.getMode=c(c$,"getMode",function(a){for(var b,
c=0,f=JSV.common.IntegralData.IntMode.values();c<f.length&&((b=f[c])||1);c++)if(a.startsWith(b.name()))return b;return JSV.common.IntegralData.IntMode.ON},"~S");r(c$,"OFF",0,[]);r(c$,"ON",1,[]);r(c$,"TOGGLE",2,[]);r(c$,"AUTO",3,[]);r(c$,"LIST",4,[]);r(c$,"MARK",5,[]);r(c$,"MIN",6,[]);r(c$,"UPDATE",7,[]);c$=y();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"]}),
k("JSV.common"),t(["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$=q(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);H(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 f=0;f<this.peakList.size();f++)if(this.peakList.get(f).checkFileIndex(a,b,c))return System.out.println("selecting peak by FileIndex "+this+" "+this.peakList.get(f)),this.selectedPeak=this.peakList.get(f);return null},"~S,~S,~S");c(c$,"selectPeakByFilePathTypeModel",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size())for(var f=
0;f<this.peakList.size();f++)if(this.peakList.get(f).checkFileTypeModel(a,b,c))return System.out.println("selecting peak byFilePathTypeModel "+this+" "+this.peakList.get(f)),this.selectedPeak=this.peakList.get(f);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(),f=-1,g=1E100,e=0;e<this.peakList.size();e++){var l=this.peakList.get(e).checkRange(a,c);l<g&&(g=l,f=e)}if(0<=f)return this.peakList.get(f)}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,f=-1,g=-1,e=1.7976931348623157E308*b,l=0,j=this.peakList.size();0<=--j;){var m=this.peakList.get(j).getX();0<b?m>c&&m<e?(f=j,e=m):
m<c&&m-c<l&&(g=j,l=m-c):m<c&&m>e?(f=j,e=m):m>c&&m-c>l&&(g=j,l=m-c)}if(0>f){if(0>g)return-1;f=g}return f},"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 f=0;f<b.length;f++)c[f]=(new JSV.common.Coordinate).set(b[f].getXVal(),JSV.common.Spectrum.toTransmittance(b[f].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),
f=JSV.common.Coordinate.isYInRange(b,-2,2),g=0;g<b.length;g++)c[g]=(new JSV.common.Coordinate).set(b[g].getXVal(),JSV.common.Spectrum.toAbsorbance(b[g].getYVal(),f));return JSV.common.Spectrum.newSpectrum(a,c,"ABSORBANCE")},"JSV.common.Spectrum");c$.newSpectrum=c(c$,"newSpectrum",function(a,b,c){var f=a.copy();f.setOrigin("JSpecView Converted");f.setOwner("JSpecView Generated");f.setXYCoords(b);f.setYUnits(c);a.setConvertedSpectrum(f);f.setConvertedSpectrum(a);return f},"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 f=this.headerTable.size();0<=--f;){var g=this.headerTable.get(f);if(g[0].equalsIgnoreCase(a)||g[2].equalsIgnoreCase(a))return b.put(a,g[1]),b}for(var g=new java.util.Hashtable,e=this.getHeaderRowDataAsArray(),f=0;f<e.length;f++){var l=JSV.source.JDXSourceStreamTokenizer.cleanLabel(e[f][0]);
if(!(null!=a&&!c&&!l.equals(a))){var j=JSV.common.Spectrum.fixInfoValue(e[f][1]);if(null==a){var m=new java.util.Hashtable;m.put("value",j);m.put("index",Integer.$valueOf(f+1));b.put(l,m)}else b.put(l,j)}}0<g.size()&&b.put("header",g);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(!A(b,Exception))throw b;}try{return Double.$valueOf(a)}catch(c){if(!A(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,f){var g=a.isNMR();if(g!=b.isNMR()||a.isContinuous()!=b.isContinuous()||!f&&!JSV.common.Spectrum.areUnitsCompatible(a.xUnits,b.xUnits))return!1;if(c){if(a.is1D()!=b.is1D())return!1}else if(f){if(!g)return!0}else if(!a.is1D()||!b.is1D())return!1;return!g||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");z(self.c$);c$=s(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");r(c$,"NO_CONVERT",0,[]);r(c$,"TO_TRANS",1,[]);r(c$,"TO_ABS",2,[]);r(c$,"TOGGLE",3,[]);c$=y();C(c$,"MAXABS",4)}),___date="$Date: 2014-06-28 02:24:08 -0500 (Sat, 28 Jun 2014) $",___svnRev="$LastChangedRevision: 1655 $",___version="14.2.1",k("JSV.common"),c$=s(JSV.common,"JSVersion"),
C(c$,"VERSION",null,"VERSION_SHORT",null),Q=P=V=null,V=self.___version,P=self.___date,Q=self.___svnRev,null!=P&&(P=P.substring(7,23)),null!=Q&&(Q=Q.substring(22,27)),JSV.common.JSVersion.VERSION_SHORT=null!=V?V:"(Unknown version)",JSV.common.JSVersion.VERSION=JSV.common.JSVersion.VERSION_SHORT+"/SVN"+Q+"/"+(null!=P?P:"(Unknown date)"),k("JSV.common"),t(["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$=s(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 f;null!=(f=b.readLine());)c.append(f),c.appendC("\n");b.close()}catch(g){if(A(g,Exception))return null;throw g;}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(A(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(u(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(A(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 f=JSV.common.JSVFileManager.getInputStream(a,!0,null);if(u(f,JU.SB)||u(f,String))return new java.io.BufferedReader(new java.io.StringReader(f.toString()));if(JSV.common.JSVFileManager.isAB(f))return new java.io.BufferedReader(new java.io.StringReader(String.instantialize(f)));var g=new java.io.BufferedInputStream(f),f=g;if(JSV.common.JSVFileManager.isZipFile(g))return JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newJSVZipFileSequentialReader(f,c,b);JSV.common.JSVFileManager.isGzip(g)&&
(f=JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newGZIPInputStream(f));return new java.io.BufferedReader(new java.io.InputStreamReader(f,"UTF-8"))}catch(e){if(A(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=
K(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(f){if(A(f,Exception))throw new JSV.exception.JSVException(f.toString());throw f;}},"java.io.InputStream");c$.isGzip=c(c$,"isGzip",function(a){try{var b=K(4,0);a.mark(5);var c=a.read(b,0,4);a.reset();return 4==c&&31==b[0]&&139==b[1]}catch(f){if(A(f,Exception))throw new JSV.exception.JSVException(f.toString());throw f;}},"java.io.InputStream");c$.getStreamAsBytes=c(c$,"getStreamAsBytes",function(a,
b){try{for(var c=K(1024,0),f=null==b?K(4096,0):null,e=0,h=0;0<(e=a.read(c,0,1024));)h+=e,null==b?(h>=f.length&&(f=JU.AU.ensureLengthByte(f,2*h)),System.arraycopy(c,0,f,h-e,e)):b.write(c,0,e);a.close();return null==b?JU.AU.arrayCopyByte(f,h):h+" bytes"}catch(l){if(A(l,Exception))throw new JSV.exception.JSVException(l.toString());throw l;}},"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(f){if(A(f,
Exception))c=f.toString();else throw f;}if(u(c,String))return c;try{c=JSV.common.JSVFileManager.getStreamAsBytes(c,null)}catch(e){if(A(e,JSV.exception.JSVException))try{c.close()}catch(h){if(!A(h,Exception))throw h;}else throw e;}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(f){if(A(f,java.io.IOException))JU.Logger.error("fixUTF error "+
f);else throw f;}return String.instantialize(a)},"~A");c$.getInputStream=c(c$,"getInputStream",function(a,b,c){var f=JSV.common.JSVFileManager.isURL(a),e=null!=JSV.common.JSVFileManager.appletDocumentBase,h=null,h=null,l;if(f&&0<=(l=a.indexOf("?POST?")))h=a.substring(l+6),a=a.substring(0,l);if(e||f){var j;try{j=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null)}catch(m){if(A(m,Exception))throw new JSV.exception.JSVException("Cannot read "+a);throw m;}JU.Logger.info("JSVFileManager opening URL "+
j+(null==h?"":" with POST of "+h.length+" bytes"));h=JSV.common.JSVFileManager.viewer.apiPlatform.getURLContents(j,c,h,!1)}else b&&JU.Logger.info("JSVFileManager opening file "+a),h=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedFileInputStream(a);if(u(h,String))throw new JSV.exception.JSVException(h);return h},"~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 f=a.startsWith("MOL="),e,h=f?null:JU.PT.rep(JSV.common.JSVFileManager.nciResolver,"%FILE",JU.PT.escapeUrl(a));null==(e=f?JU.PT.rep(a.substring(4),"\\n","\n"):JSV.common.JSVFileManager.getFileAsString(h))&&JU.Logger.info("no data returned");c=JSV.common.JSVFileManager.getFileAsString(JSV.common.JSVFileManager.nmrdbServer+e);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"),l=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"molfile",null);JSV.common.JSVFileManager.htCorrelationCache.put("mol",l);f||Jmol.Cache.put("http://SIMULATION/"+a+"#molfile",l.getBytes());l=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"xml",null);l=JU.PT.rep(l,"<Signals>","<Signals src="+JU.PT.esc(JU.PT.rep(JSV.common.JSVFileManager.nmrdbServer,"?POST?molfile=",""))+">");l=JU.PT.rep(l,"</","\n</");l=JU.PT.rep(l,"><",">\n<");l=JU.PT.rep(l,
'\\"','"');JSV.common.JSVFileManager.htCorrelationCache.put("xml",l);var c=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"jcamp",null),c="##TITLE="+(f?"JMOL SIMULATION":a)+"\n"+c.substring(c.indexOf("\n##")+1),j=e.indexOf("\n"),j=e.indexOf("\n",j+1);0<j&&j==e.indexOf("\n \n")&&(e=e.substring(0,j+1)+"Created "+JSV.common.JSVFileManager.viewer.apiPlatform.getDateFormat("8824")+" by JSpecView "+JSV.common.JSVersion.VERSION+e.substring(j+1));j=c.indexOf("##.");a=JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,
!1);var m=a.indexOf("id='");f&&0<m&&(a=a.substring(m+4,(a+"'").indexOf("'",m+4)));c=c.substring(0,j)+"##$MODELS=\n<Models>\n<ModelData id="+JU.PT.esc(a)+' type="MOL" src='+JU.PT.esc(h)+">\n"+e+"</ModelData>\n</Models>\n##$SIGNALS=\n"+l+"\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 f=null;try{if(null==(f=a.getClass().getResource(b)))c[0]="Couldn't find file: "+
b}catch(e){if(A(e,Exception))c[0]="Exception "+e+" in getResource "+b;else throw e;}return f},"~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(u(a,String))return JSV.common.JSVFileManager.getFileAsString(a);b=new JU.SB;try{for(var f=new java.io.BufferedReader(new java.io.InputStreamReader(a.getContent(),"UTF-8")),e;null!=(e=f.readLine());)b.append(e).append("\n");f.close()}catch(h){if(A(h,
Exception))c[0]=h.toString();else throw h;}return b.toString()},"~O,~S,~A");c$.getJmolFilePath=c(c$,"getJmolFilePath",function(a){try{a=JSV.common.JSVFileManager.getFullPathName(a)}catch(b){if(A(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(A(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 f=a.indexOf(c,b);return 0>b||0>f?null:JU.PT.getQuotedStringAt(a,f+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)}),k("JSV.common"),t(["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$=q(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]);H(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(A(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 f=null;null!=
a&&a.hasMoreTokens()&&0<c&&b;){var e=a.nextToken(),h=new JSV.common.ScriptTokenizer(e,!1),l=JSV.common.ScriptToken.getKey(h);if(null!=l){var j=JSV.common.ScriptToken.getScriptToken(l),h=JSV.common.ScriptToken.getValue(j,h,e);try{switch(j){case JSV.common.ScriptToken.UNKNOWN:JU.Logger.info("Unrecognized parameter: "+l);--c;break;default:if(null==this.selectedPanel)break;this.parameters.set(this.pd(),j,h);this.si.siUpdateBoolean(j,JSV.common.Parameters.isTrue(h));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,
h);break;case JSV.common.ScriptToken.DEFAULTLOADSCRIPT:h=JU.PT.rep(h,"''",'"');this.defaultLoadScript=0<h.length?h:null;break;case JSV.common.ScriptToken.DEFAULTNMRNORMALIZATION:this.nmrMaxY=JU.PT.parseFloat(h);break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(h);break;case JSV.common.ScriptToken.CLOSE:this.execClose(h);break;case JSV.common.ScriptToken.DEBUG:JU.Logger.setLogLevel(h.toLowerCase().equals("high")?6:JSV.common.Parameters.isTrue(h)?5:4);break;
case JSV.common.ScriptToken.GETPROPERTY:var m=null==this.selectedPanel?null:this.getPropertyAsJavaObject(h);null!=m&&this.selectedPanel.showMessage(JU.PT.toJSON(null,m),h);break;case JSV.common.ScriptToken.HIDDEN:this.si.siExecHidden(JSV.common.Parameters.isTrue(h));break;case JSV.common.ScriptToken.INTEGRATIONRATIOS:this.integrationRatios=h;this.execIntegrate(null);break;case JSV.common.ScriptToken.INTERFACE:this.interfaceOverlaid=this.checkOvelayInterface(h);break;case JSV.common.ScriptToken.INTEGRALOFFSET:case JSV.common.ScriptToken.INTEGRALRANGE:this.execSetIntegralParameter(j,
Double.parseDouble(h));break;case JSV.common.ScriptToken.JMOL:this.si.syncToJmol(h);break;case JSV.common.ScriptToken.JSV:this.syncScript(JU.PT.trimQuotes(h));break;case JSV.common.ScriptToken.LOAD:if(0==h.length){null!=this.defaultLoadScript&&this.runScriptNow(this.defaultLoadScript);break}this.load(h,(null==this.defaultLoadScript?"":this.defaultLoadScript+";")+a.getRemainingScript());f=null==this.selectedPanel?null:this.si.siLoaded(h);a=null;break;case JSV.common.ScriptToken.LOADIMAGINARY:this.loadImaginary=
JSV.common.Parameters.isTrue(h);break;case JSV.common.ScriptToken.PEAK:this.execPeak(h);break;case JSV.common.ScriptToken.PEAKLIST:this.execPeakList(h);break;case JSV.common.ScriptToken.SCALEBY:this.scaleSelectedBy(this.panelNodes,h);break;case JSV.common.ScriptToken.SCRIPT:if(h.equals("")||h.toLowerCase().startsWith("inline"))this.execScriptInline(h);else{var k=JSV.common.JSVFileManager.getFileAsString(h);null!=k&&100>this.scriptLevelCount&&this.runScriptNow(k)}break;case JSV.common.ScriptToken.SELECT:this.execSelect(h);
break;case JSV.common.ScriptToken.SPECTRUM:case JSV.common.ScriptToken.SPECTRUMNUMBER:this.setSpectrum(h)||(b=!1);break;case JSV.common.ScriptToken.STACKOFFSETY:this.execOverlayOffsetY(JU.PT.parseInt(""+JU.PT.parseFloat(h)));break;case JSV.common.ScriptToken.TEST:this.si.siExecTest(h);break;case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:this.execView(h,!0);break;case JSV.common.ScriptToken.HIGHLIGHT:b=this.highlight(e);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(h));break;case JSV.common.ScriptToken.GETSOLUTIONCOLOR:this.show("solutioncolor"+h.toLowerCase());break;case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:this.execIntegrate(h);break;case JSV.common.ScriptToken.IRMODE:this.execIRMode(h);break;case JSV.common.ScriptToken.LABEL:this.pd().addAnnotation(JSV.common.ScriptToken.getTokens(h));break;case JSV.common.ScriptToken.LINK:this.pd().linkSpectra(JSV.common.PanelData.LinkMode.getMode(h));
break;case JSV.common.ScriptToken.OVERLAYSTACKED:this.pd().splitStack(!JSV.common.Parameters.isTrue(h));break;case JSV.common.ScriptToken.PRINT:f=this.execWrite(null);break;case JSV.common.ScriptToken.SETPEAK:this.pd().shiftSpectrum(NaN,h.equalsIgnoreCase("NONE")?1.7976931348623157E308:h.equalsIgnoreCase("?")?4.9E-324:Double.parseDouble(h));break;case JSV.common.ScriptToken.SETX:this.pd().shiftSpectrum(4.9E-324,Double.parseDouble(h));break;case JSV.common.ScriptToken.SHIFTX:this.pd().shiftSpectrum(h.equalsIgnoreCase("NONE")?
1.7976931348623157E308:Double.parseDouble(h),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(h));break;case JSV.common.ScriptToken.SHOWKEY:this.setOverlayLegendVisibility(JSV.common.Parameters.getTFToggle(h),!0);break;case JSV.common.ScriptToken.SHOWMEASUREMENTS:this.pd().showAnnotation(JSV.common.Annotation.AType.Measurements,JSV.common.Parameters.getTFToggle(h));
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(h));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(h);break;case JSV.common.ScriptToken.WINDOW:this.si.siNewWindow(JSV.common.Parameters.isTrue(h),
!1);break;case JSV.common.ScriptToken.WRITE:f=this.execWrite(h);break;case JSV.common.ScriptToken.ZOOM:b=this.execZoom(h)}}}catch(p){if(A(p,Exception))f=p.toString(),JU.Logger.error(p.toString()),b=!1,--c;else throw p;}}}this.scriptLevelCount--;this.si.siExecScriptComplete(f,!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(!A(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),f=c.size();0<=--f;){a=c.get(f);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(l){if(!A(l,Exception))throw l;}}}},"~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 f=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"),l=this.getRGB(5<c?b.get(5):"100"),b=this.getRGB(6<c?b.get(6):"100");Float.isNaN(a)||Float.isNaN(f)?this.pd().removeAllHighlights():(this.pd().removeHighlight(a,
f),0>b&&(b=150),0<=e&&(0<=h&&0<=l)&&this.pd().addHighlight(null,a,f,null,e,h,l,b));this.repaint(!0)}return!0},"~S");c(c$,"getRGB",function(a){a=JU.PT.parseFloat(a);return I(Float.isNaN(a)?-1:1<a?a:255*a)},"~S");c(c$,"execZoom",function(a){var b=0,c=0,f=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)),f=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2)),
e=Double.parseDouble(a.get(3))}this.pd().setZoom(b,f,c,e);return!0},"~S");c(c$,"scaleSelectedBy",function(a,b){try{for(var c=Double.parseDouble(b),f=a.size();0<=--f;)a.get(f).pd().scaleSelectedBy(c)}catch(e){if(!A(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(!A(b,Exception))throw b;}}else{for(var c=this.panelNodes,f=c.size();0<=--f;)c.get(f).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,f=this.fillSpecList(a,c,!0);0<c.size()&&this.si.siOpenDataOrFile(null,f,c,f,-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,f=this.panelNodes.size();0<=--f;)this.panelNodes.get(f).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,f=!1;1<b.size()&&b.get(0).equalsIgnoreCase("ALL")&&(f=!0,c++);a=Double.parseDouble(b.get(c++));b=Double.parseDouble(b.get(c));if(f){f=this.pd().getSpectrum();for(c=this.panelNodes.size();0<=--c;){var e=
this.panelNodes.get(c);e.source===this.currentSource&&JSV.common.Spectrum.areXScalesCompatible(f,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),f=this.panelNodes.size();0<=--f;)this.showOverlayLegend(this.panelNodes.get(f),this.panelNodes.get(f)===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,f,e,h;if(null==b){f=JU.PT.getQuotedAttribute(a,"file");e=JU.PT.getQuotedAttribute(a,"index");if(null==f||null==e)return;f=JU.PT.rep(f,"#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(f))JU.Logger.info("file "+f+" not found -- JSViewer closing all and reopening"),this.si.siSyncLoad(f);a=JU.PT.getQuotedAttribute(a,"type");h=null}else f=null,e=c=b,h=","+JU.PT.getQuotedAttribute(a,"atom")+",",a="ID";e=this.selectPanelByPeak(f,e,h);h=this.pd();h.selectSpectrum(f,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(),f=new JU.SB;f.append("[");for(var e=c.size(),a=0;a<e;a++){var h=c.get(a).toString(),h=h+" "+b;f.append(JU.PT.esc(h));0<a&&f.append(",")}f.append("]");this.si.syncToJmol("Peaks: "+f)}catch(l){if(!A(l,Exception))throw l;}});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 f=null,e=this.panelNodes.size();0<=--e;)this.panelNodes.get(e).pd().addPeakHighlight(null);f=this.pd().selectPeakByFileIndex(a,b,c);if(null!=f)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!=(f=h.pd().selectPeakByFileIndex(a,b,c))){this.setNode(h);break}}return f},"~S,~S,~S");c(c$,"processPeakPickEvent",function(a){if(u(a,JSV.common.PeakInfo)){var b=this.pd().findMatchingPeakInfo(a);if(null==b){if(!"ALL".equals(a.getTitle()))return;for(var c=null,f=0;f<this.panelNodes.size();f++)if(null!=(b=this.panelNodes.get(f).pd().findMatchingPeakInfo(a))){c=this.panelNodes.get(f);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 f=this.pd().getInfo(!0,a);if(!c&&null!=f)return f;null!=f&&b.put("current",f);c=new JU.Lst;for(f=0;f<this.panelNodes.size();f++)null!=this.panelNodes.get(f).jsvp&&c.addLast(this.panelNodes.get(f).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 f,e=null,h=a.equalsIgnoreCase("NONE");
if(h||a.equalsIgnoreCase("all"))a="*";if(0>a.indexOf("*")){f=a.$plit(" ");a=new JU.SB;for(var l=0;l<f.length;l++){var j=f[l].indexOf(".");j!=f[l].lastIndexOf(".")&&(f[l]=f[l].substring(0,j+1)+f[l].substring(j+1).$replace(".","_"));a.append(f[l]).append(" ")}a=a.toString().trim()}if(a.equals("*"))f=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes));else if(a.startsWith('"')||a.startsWith("'"))f=JSV.common.ScriptToken.getTokens(a);else if(a=JU.PT.rep(a,"_",
" _ "),a=JU.PT.rep(a,"-"," - "),f=JSV.common.ScriptToken.getTokens(a),e=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes)),0==e.size())return null;var m=this.isClosed()?"1.":JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes).id,m=m.substring(0,m.indexOf(".")+1);a=new JU.SB;for(var k=f.size(),p=null,l=0;l<k;l++){var n=f.get(l),j=NaN,q=-1;l+1<k&&f.get(l+1).equals("*")?(l+=2,j=Double.parseDouble(f.get(l))):l+1<k&&f.get(l+1).equals("_")&&(l+=
2,q=Integer.parseInt(f.get(l)));if(n.equals("-")){null==p&&(p=e.get(0));n=l+1==k?e.get(e.size()-1):f.get(++l);n.contains(".")||(n=m+n);for(j=0;j<e.size()&&!e.get(j).equals(p);)j++;for(j++;j<e.size()&&!p.equals(n);){var r=JSV.common.PanelNode.findNodeById(p=e.get(j++),this.panelNodes);b.addLast(r.pd().getSpectrumAt(0));a.append(",").append(p)}}else if(n.startsWith("'")&&n.endsWith("'")&&(n='"'+JU.PT.trim(n,"'")+'"'),n.startsWith('"'))for(var n=JU.PT.trim(n,'"'),q=this.panelNodes.size(),s=0;s<q;s++){if(r=
this.panelNodes.get(s),null!=r.fileName&&r.fileName.startsWith(n)||null!=r.frameTitle&&r.frameTitle.startsWith(n))this.addSpecToList(r.pd(),j,-1,b,c),a.append(",").append(r.id)}else n.contains(".")||(n=m+n),r=JSV.common.PanelNode.findNodeById(n,this.panelNodes),null!=r&&(p=n,this.addSpecToList(r.pd(),j,q,b,c),a.append(",").append(n),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,f,e){e?(a.getSpectrumAt(0).setUserYFactor(Double.isNaN(b)?1:b),a.addToList(c-1,f)):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,f,e,h,l,j){if("NONE".equals(b))return this.close("View*"),
0;this.si.writeStatus("");var m=null,k=null,p=null,n=!1;null!=f&&f.startsWith("cache://")&&(a=Jmol.Cache.get(b=f));if(null!=a)try{p=b,k=m=JSV.common.JSVFileManager.getFullPathName(b)}catch(q){if(!A(q,JSV.exception.JSVException))throw q;}else if(null!=c)n=!0,k=p=m="View"+ ++this.nViews;else if(null!=f)try{this.recentURL=m=(new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,f,null)).toString(),p=JSV.common.JSVFileManager.getTagName(m)}catch(r){if(A(r,java.net.MalformedURLException))m=this.apiPlatform.newFile(f),
p=m.getName(),k=m=m.getFullPath(),this.recentURL=null;else throw r;}b=-1;if(0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,m))||0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,f)))return n?(--this.nViews,this.setNode(this.panelNodes.get(b))):this.si.writeStatus(m+" is already open"),-1;!l&&!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),m,this.obscureTitleFromUser===
Boolean.TRUE,this.loadImaginary,e,h,this.nmrMaxY))}catch(s){if(A(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?f:null):this.splitSpectra();this.pd().taintedAll=!0;n||this.si.siUpdateRecentMenus(m);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 f=
"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;)f=this.panelNodes.get(h).source,this.panelNodes.get(h).isSelected&&(null==a||a!==f)&&c.addLast(f),a=f;else if(f||
e||a.equalsIgnoreCase("simulations"))for(a=0;0<=--h&&a<b;){if(f||(e?this.panelNodes.get(h).isView:this.panelNodes.get(h).isSimulation))c.addLast(this.panelNodes.get(h).source),a++}else f=0==a.length?this.currentSource:JSV.common.PanelNode.findSourceByNameOrId(a,this.panelNodes),null!=f&&c.addLast(f);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),f=c.get(0),e=null,h=0;f.equalsIgnoreCase("ID")&&(e=JU.PT.trimQuotes(c.get(1)),f=c.get(2),h=2);var l=f.equalsIgnoreCase("APPEND"),j=f.equalsIgnoreCase("CHECK");(l||j)&&h++;0<h&&(f=c.get(h));null==b&&(b=this.defaultLoadScript);f.equals("?")?this.openFileFromDialog(l,!1,!1,b):f.equals("http://?")?this.openFileFromDialog(l,!0,!1,null):f.equals("$?")?this.openFileFromDialog(l,!0,!0,null):(f.equalsIgnoreCase("MOL")&&(f="http://SIMULATION/MOL="+
JU.PT.trimQuotes(c.get(++h))),!j&&!l&&(f.equals('""')&&null!=this.currentSource&&(f=this.currentSource.getFilePath()),this.close("all")),f=JU.PT.trimQuotes(f),f.startsWith("$")&&(f="http://SIMULATION/"+f.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,f,j,c,l,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(),f=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 l=h.nextElement();f.addLast(l);this.panelNodes.removeObj(l.getPanelNode())}f.addLast(e);if(null!=c)break}}this.spectraTree.deleteNodes(f);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(f=c=0;f<this.panelNodes.size();f++)b=JU.PT.parseFloat(this.panelNodes.get(f).id),b>=c+1&&(c=w(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()),f=null,e=0;e<b.size();e++)f=b.get(e),f=this.si.siGetNewJSVPanel(f),this.si.siSetPropertiesFromPreferences(f,!0),c[e]=f;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=I(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=G(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,
f,e){return null!=this.selectedPanel&&this.selectedPanel.processMouseEvent(a,b,c,f,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(!A(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(),f=c.getNumberOfSpectraInCurrentSet();if(-1>b||b>=f)return"Maximum spectrum index (0-based) is "+(f-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(A(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(A(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,f){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+'"',f))):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+'"',f))):(b=[Boolean.$valueOf(a),f],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 f=b.size();0<=--f;){var e=b.get(f).jsvp;e===a?c=f:(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),f=c.nextToken();f.equalsIgnoreCase("SET")&&(f=c.nextToken());var f=f.toUpperCase(),e=JSV.common.ScriptToken.getScriptToken(f),b=JSV.common.ScriptToken.getValue(e,c,b);JU.Logger.info("KEY-> "+f+" 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)+"__";f=null;"undefined"!=typeof Jmol&&(f=Jmol._applets[b]);this.html5Applet=f;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(!A(h,Exception))throw h;}}},"~S");c(c$,"getSolutionColorStr",function(a){a=JU.CU.colorPtFromInt(this.getSolutionColor(a),null);return I(a.x)+","+I(a.y)+","+I(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)}),k("JSV.common"),t(["JSV.common.Annotation","$.Coordinate"],"JSV.common.Measurement",null,function(){c$=q(function(){this.pt2=null;this.value=0;n(this,arguments)},JSV.common,"Measurement",JSV.common.Annotation);H(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()+"]"})}),k("JSV.common"),t(["JU.Lst","JSV.api.AnnotationData"],"JSV.common.MeasurementData",["JU.AU","$.DF","JSV.common.Annotation","$.Parameters"],function(){c$=q(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 f=Array(this.size()),e=this.size();0<=--e;)f[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 f},"~S");c(c$,"getMeasurementListArrayReal",function(a){a=this.spec.isNMR()&&a.equalsIgnoreCase("HZ");for(var b=JU.AU.newDouble2(this.size()),c=0,f=this.size();0<=
--f;){var e=this.get(f).getValue();a&&(e*=this.spec.observedFreq);b[c++]=[this.get(f).getXVal(),this.get(f).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 f=this.get(c);(0==f.text.length||f.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),f=c.getXVal()+a;c.setXVal(f);c.setValue(f);c.text=JU.DF.formatDecimalDbl(f,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"]}),k("JSV.common"),t(["java.lang.Enum","javajs.api.EventManager","java.util.Hashtable","JU.Lst"],"JSV.common.PanelData","java.lang.Boolean $.Double javajs.awt.Font JU.CU JSV.api.JSVGraphics JSV.common.Annotation $.Coordinate $.GraphSet $.JSVFileManager $.JSVersion $.JSViewer $.MeasurementData $.Parameters $.PeakPickEvent $.ScriptToken $.Spectrum $.SubSpecChangeEvent $.ZoomEvent JSV.dialog.JSVDialog JU.Logger".split(" "),
function(){c$=q(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);H(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,f=null;if(a)return this.currentGraphSet.getInfo(b,this.getCurrentSpectrumIndex());for(var e,f=this.options.entrySet().iterator();f.hasNext()&&((e=f.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()));f=new JU.Lst;for(e=this.graphSets.size();0<=--e;)f.addLast(this.graphSets.get(e).getInfo(b,-1));c.put("sets",f);return c},"~B,~S");c(c$,"setBooleans",function(a,b){if(null==b)for(var c,f=a.getBooleans().entrySet().iterator();f.hasNext()&&((c=f.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&&u(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 f=this.currentGraphSet.selectPeakByFileIndex(a,b,c);if(null==f)for(var e=this.graphSets.size();0<=
--e&&!(this.graphSets.get(e)!==this.currentGraphSet&&null!=(f=this.graphSets.get(e).selectPeakByFileIndex(a,b,c))););return f},"~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,f){f&&this.currentGraphSet.selectSpectrum(a,b,c);if("ID".equals(b))this.jumpToSpectrumIndex(this.getCurrentSpectrumIndex(),!0);else for(f=0;f<this.graphSets.size();f++)this.graphSets.get(f)!==this.currentGraphSet&&
this.graphSets.get(f).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,f,e,h){var l;this.gMain=a;this.display1D=!this.isLinked&&this.getBoolean(JSV.common.ScriptToken.DISPLAY1D);var j=40,m=50,k=this.isPrinting||this.doReset||
this.thisWidth!=f||this.thisHeight!=e;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,m*=3,this.scalingFactor=10,l=!1):(this.scalingFactor=1,l=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=f;this.thisHeight=e;for(var p=this.graphSets.size();0<=--p;)this.graphSets.get(p).drawGraphSet(a,b,c,f,e,this.left,this.right,j,m,k,this.taintedAll);this.titleOn&&(!this.titleDrawn&&this.taintedAll)&&this.drawTitle(a,e*this.scalingFactor,f*this.scalingFactor,this.getDrawTitle(this.isPrinting));l&&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,e,c));this.isPrinting&&this.printVersion(a,e);this.taintedAll=this.isPrinting||a===b},"~O,~O,~O,~N,~N,~B");c(c$,"drawCoordinates",function(a,b,c,f){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),f)},"~O,~N,~N,~N");c(c$,"setFont",function(a,b,c,f,e){return this.g2d.setFont(a,this.getFont(a,b,c,f,e))},"~O,~N,~N,~N,~B");
c(c$,"printFilePath",function(a,b,c,f){b*=this.scalingFactor;c*=this.scalingFactor;0<f.indexOf("?")&&(f=f.substring(f.indexOf("?")+1));f=f.substring(f.lastIndexOf("/")+1);f=f.substring(f.lastIndexOf("\\")+1);this.g2d.setGraphicsColor(a,this.BLACK);var e=this.setFont(a,1E3,0,9,!0);b!=this.left*this.scalingFactor&&(b-=e.stringWidth(f));this.g2d.drawString(a,f,b,c-e.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),
f=this.jsvp.getApiPlatform().getDateFormat(null)+" JSpecView "+JSV.common.JSVersion.VERSION_SHORT,e=c.stringWidth(f);this.g2d.drawString(a,f,(this.thisWidth-this.right)*this.scalingFactor-e,b*this.scalingFactor-3*c.getHeight())},"~O,~N");c(c$,"drawTitle",function(a,b,c,f){f=f.$replace("\n"," ");var e=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,14,!0),h=e.stringWidth(f);h>c&&(e=w(14*c/h),10>e&&(e=10),e=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?
1:0,e,!0));this.g2d.setGraphicsColor(a,this.titleColor);this.setCurrentFont(this.g2d.setFont(a,e));this.g2d.drawString(a,f,this.isPrinting?this.left*this.scalingFactor:5,b-w(e.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 f=this.graphSets.get(b).spectra,e=0;e<f.size();e++,c++)(0>a||a==c)&&this.graphSets.get(b).setSelected(e)},"~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 f=this.currentGraphSet!==a,e=f||this.currentSplitPoint!=b;this.currentGraphSet=a;this.currentSplitPoint=b;(f||1<a.nSplit&&e)&&this.setSpectrum(b,!0);if(!f){f=a.checkSpectrumClickedEvent(this.mouseX,this.mouseY,c);if(!f)return;this.currentSplitPoint=b=a.getCurrentSpectrumIndex();this.setSpectrum(b,!0)}this.jumpToSpectrumIndex(b,f||1<a.nSplit&&e)},"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,f,e,h,l,j){(null==a?this.currentGraphSet:a).addHighlight(b,c,f,this.g2d.getColor4(e,h,l,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,f){this.currentGraphSet.setZoom(a,b,c,f);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,f){this.currentGraphSet.setXPointer(a,b);this.currentGraphSet.setXPointer2(c,f)},"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,f,e){f*=this.scalingFactor;e?400>b&&(f=b*f/400):250>b&&(f=b*f/250);b=this.jsvp.getFontFaceID(this.isPrinting?
this.printingFontName:this.displayFontName);return this.currentFont=javajs.awt.Font.createFont3D(b,c,f,f,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 f=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=f&&(this.setCurrentGraphSet(f,b,this.clickCount),f.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(!A(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,f,e,h){if(!this.linking){this.linking=!0;for(var l=a.getSpectrumAt(0),j=this.graphSets.size();0<=--j;){var m=this.graphSets.get(j);m!==a&&JSV.common.Spectrum.areXScalesCompatible(l,this.graphSets.get(j).getSpectrumAt(0),!1,!0)&&m.doZoom(b,0,c,0,h,!1,e,!1,f)}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 f=this.graphSets.get(c);f!==a&&JSV.common.Spectrum.areXScalesCompatible(b,this.graphSets.get(c).getSpectrum(),!1,!0)&&f.clearViews()}this.linking=!1}},"JSV.common.GraphSet");c(c$,"setlinkedXMove",function(a,b,c){if(!this.linking){this.linking=!0;for(var f=a.getSpectrum(),e=this.graphSets.size();0<=--e;){var h=this.graphSets.get(e);h!==a&&JSV.common.Spectrum.areXScalesCompatible(f,this.graphSets.get(e).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,f){for(var e=this.graphSets.size();0<=--e;){var h=this.graphSets.get(e);h!==a&&h.set2DXY(b,c,f)}},"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(),f=this.getSpectrumAt(a-1).getFilePath(),c=!c.equals(f),f=0;f<a;f++){var e=Array(3),h=this.getSpectrumAt(f);this.title=h.getTitle();c&&(this.title=JSV.common.JSVFileManager.getTagName(h.getFilePath())+" - "+this.title);h=this.getCurrentPlotColor(f);e[0]=new Integer(f+1);e[1]=h;e[2]=" "+this.title;b[f]=e}return b});c(c$,"setColorOrFont",function(a,b){if(null==b){for(var c,f=a.elementColors.entrySet().iterator();f.hasNext()&&
((c=f.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&&u(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 f=this.getSpectrum(),e=this.vwr.getDialog(a,f);null==b&&a===JSV.common.Annotation.AType.Measurements&&(b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,
f));null!=b&&e.setData(b);this.addDialog(c,a,e);e.reEnable();return e},"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)},"JSV.api.JSVGraphics,JSV.common.PrintLayout");c(c$,"print",function(a,b,c,f,e,h,l,j,m){this.g2d=this.g2d0;if(0==m)return this.isPrinting=!0,m=!1,u(a,JSV.api.JSVGraphics)&&(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")?m=!0:j?(b=450,c=280,f=w(w(l-c)/2),e=w(w(h-b)/2)):(b=280,c=450,e=w(w(l-280)/2),f=w(w(h-450)/2)),this.g2d.translateScale(a,f,e,0.1),this.taintedAll=!0,this.drawGraph(a,a,a,w(c),w(b),m),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,f=!1;if(0==b)switch(a){case 37:case 39:this.doMouseMoved(39==a?++this.mouseX:--this.mouseX,this.mouseY);this.repaint();f=!0;break;case 33:case 34:c=33==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;f=!0;break;case 40:case 38:f=40==a?-1:1,null==this.getSpectrumAt(0).getSubSpectra()?this.notifySubSpectrumChange(f,null):(this.advanceSubSpectrum(f),this.repaint()),f=!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;f=!0;break;case 37:case 39:this.toPeak(39==a?1:-1),f=!0}0!=c&&(this.scaleYBy(c),this.repaint());return f},"~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,f,e,h){if(!this.isPrinting)switch(a){case 4:if(!this.checkMod(h,16))break;this.doMousePressed(c,f);break;case 5:this.doMouseReleased(c,f,this.checkMod(h,16));this.repaint();break;case 1:this.doMouseDragged(c,f);this.repaint();break;case 0:this.jsvp.getFocusNow(!1);if(0!=(h&28)){this.doMouseDragged(c,f);this.repaint();break}this.doMouseMoved(c,f);null!=this.coordStr&&this.repaint();break;case 2:if(this.checkMod(h,4)){this.jsvp.showMenu(c,f);break}this.ctrlPressed=
!1;this.doMouseClicked(c,f,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,f){if(f)this.thisWidget=null,this.isIntegralDrag=
!1,this.integralShiftMode=0;else try{this.jsvp.getFocusNow(!1)}catch(e){if(A(e,Exception))System.out.println("pd "+this+" cannot focus");else throw e;}},"~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 f=this.graphSets.size();0<=--f;)this.graphSets.get(f).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");z(self.c$);c$=s(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,f=JSV.common.PanelData.LinkMode.values();c<f.length&&((b=f[c])||1);c++)if(b.name().equalsIgnoreCase(a))return b;return JSV.common.PanelData.LinkMode.NONE},"~S");r(c$,"ALL",0,[]);r(c$,
"NONE",1,[]);r(c$,"AB",2,[]);r(c$,"ABC",3,[]);c$=y();z(self.c$);c$=s(JSV.common.PanelData,"Mouse",Enum);r(c$,"UP",0,[]);r(c$,"DOWN",1,[]);c$=y();C(c$,"defaultPrintHeight",450,"defaultPrintWidth",280,"topMargin",40,"bottomMargin",50,"leftMargin",60,"rightMargin",50)}),k("JSV.common"),t(null,"JSV.common.PanelNode",["JU.SB","JSV.common.Parameters"],function(){c$=q(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,f){this.id=a;this.source=c;this.fileName=b;this.isSimulation=0<=c.getFilePath().indexOf("http://SIMULATION/");this.jsvp=f;null!=f&&(this.pd().getSpectrumAt(0).setId(a),this.frameTitle=f.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 f=b.get(c);if(a.equals(f.id)||a.equalsIgnoreCase(f.source.getFilePath()))return f.source}for(c=b.size();0<=--c;)if(f=b.get(c),a.equals(f.fileName))return f.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 f=a.get(c);f.isView||b.append(" ").append(f.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")}),k("JSV.common"),t(null,"JSV.common.Parameters",["java.lang.Boolean","java.util.Hashtable",
"JSV.common.ScriptToken"],function(){c$=q(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,f){null!=f&&JSV.common.Parameters.isMatch(a,c)&&b.put(null==a?c:a,f)},"~S,java.util.Map,~S,~O")}),k("JSV.common"),t(["JSV.common.MeasurementData"],"JSV.common.PeakData",["java.lang.Double","JU.DF","JSV.common.Coordinate","$.PeakPick"],function(){c$=q(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,f=0,e=this.size();0<=--e;f++)c=this.spec.getPeakListArray(this.get(e),b,this.maxY),a[f]=2==c.length?[""+(f+1),JU.DF.formatDecimalDbl(c[0],2),JU.DF.formatDecimalDbl(c[1],4)]:[""+(f+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,f=this.size();0<=--f;c++)a[c]=this.spec.getPeakListArray(this.get(f),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));
N(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 f=this.spec.getXYCoords();if(!(3>f.length)){this.clear();null!=a&&(this.myParams.peakListInterpolation=a.peakListInterpolation,this.myParams.peakListThreshold=a.peakListThreshold);a=this.myParams.peakListInterpolation.equals("parabolic");var e=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 l=0,j=[f[0].getYVal(),l=f[1].getYVal(),0],m=0;if(e)for(e=2;e<f.length;e++){var k=j[e%3]=f[e].getYVal();if(l<this.thresh&&(j[(e-2)%3]>l&&l<k)&&(l=a?JSV.common.Coordinate.parabolicInterpolation(f,e-1):f[e-1].getXVal(),l>=h||l<=c))if(l=(new JSV.common.PeakPick).setValue(l,k,this.spec,null,0),this.addLast(l),100==++m)break;l=k}else for(e=2;e<
f.length;e++){k=j[e%3]=f[e].getYVal();if(l>this.thresh&&(j[(e-2)%3]<l&&l>k)&&(l=a?JSV.common.Coordinate.parabolicInterpolation(f,e-1):f[e-1].getXVal(),l>=h&&l<=c&&(l=(new JSV.common.PeakPick).setValue(l,k,this.spec,JU.DF.formatDecimalDbl(l,b),l),this.addLast(l),100==++m)))break;l=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(" ")}),k("JSV.common"),t(null,"JSV.common.PeakInfo",["JU.PT"],function(){c$=
q(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 w((this.px0+this.px1)/2)});c$.nullPeakInfo=c$.prototype.nullPeakInfo=new JSV.common.PeakInfo}),k("JSV.common"),t(["JSV.common.Measurement"],"JSV.common.PeakPick",
null,function(){c$=s(JSV.common,"PeakPick",JSV.common.Measurement);c(c$,"setValue",function(a,b,c,e,g){null==e?(this.set(a,b),this.setPt2(c,!1)):(this.setA(a,b,c,e,!1,!1,0,6),this.value=g,this.setPt2(this.getXVal(),this.getYVal()));return this},"~N,~N,JSV.common.Spectrum,~S,~N")}),k("JSV.common"),t(["java.util.EventObject"],"JSV.common.PeakPickEvent",null,function(){c$=q(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()})}),k("JSV.common"),t(["JSV.common.Coordinate","$.ScriptToken"],"JSV.common.PlotWidget",null,function(){c$=q(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);H(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")}),k("JSV.common"),c$=q(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"),H(c$,function(){this.paperHeight=I(72*
Math.min(11,11.69));this.paperWidth=I(72*Math.min(8.5,8.27));this.imageableHeight=this.paperHeight;this.imageableWidth=this.paperWidth}),k("JSV.common"),c$=q(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()}),k("JSV.common"),t(null,"JSV.common.ScaleData",["java.lang.Double","JSV.common.Coordinate"],function(){c$=q(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");H(c$,function(){this.precision=G(2,0);this.exportPrecision=G(2,0);this.steps=Y(2,0);this.minorTickCounts=G(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,g){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,g)},"~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 g=this.setScaleParams(a,b,1),h=e?g/2:g/4;e=e?g/4:g/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-g>this.minYOnScale;)this.firstY-=g;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,g,h,l,j){for(var m=0,k=0,m=g;m<=h;m++)if(g=b[m].getXVal(),g>=c){l[a]=m;break}for(;m<=h&&!(g=b[m].getXVal(),k++,g>=e);m++);j[a]=m-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=w(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,g){a=w((a-this.minXOnScale)/g);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-w(((a-this.spectrumYRef)*this.userYFactor+this.spectrumYRef-this.minYOnScale)/this.yFactorForScale)},"~N,~N");c(c$,"toPixelY0",function(a,b,c){return w(b+(this.maxYOnScale-a)/((this.maxYOnScale-this.minYOnScale)/(c-b)))},"~N,~N,~N");c(c$,"setXYScale",function(a,
b,c){var e=this.spectrumYRef,g=this.spectrumScaleFactor,h=1!=g||this.isShiftZoomedY,l=h?this.initMinYOnScale:this.minY,j=h?this.initMaxYOnScale:this.maxY;h&&e<l&&(e=l);h&&e>j&&(e=j);this.setYScale((l-e)/g+e,(j-e)/g+e,1==g,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,g,h){for(var l=0,j=a.size(),m=0;m<j;m++){var k=a.get(m).getXYCoords();JSV.common.ScaleData.getXRange(m,k,b,c,0,k.length-1,g,h)>=e&&l++}return l==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(),g=e.indexOf("E");0<=g&&(e=e.substring(0,g));if(0>e.indexOf(".")||!e.endsWith("0")&&!e.endsWith("."))return}for(c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||
1);)e=b.getValue(),g=e.indexOf("E"),0<=g?b.setValue(e.substring(0,g-1)+e.substring(g)):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]}),k("JSV.common"),
t(["java.lang.Enum"],"JSV.common.ScriptToken",["java.util.Hashtable","JU.Lst","$.PT","$.SB","JSV.common.ScriptTokenizer"],function(){c$=q(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 g,e=JSV.common.ScriptToken.htParams.entrySet().iterator();e.hasNext()&&
((g=e.next())||1);)g.getKey().startsWith(a)&&null!=g.getValue().tip&&c.addLast(g.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;r(c$,"UNKNOWN",0,[]);r(c$,"APPLETID",1,[]);r(c$,"APPLETREADYCALLBACKFUNCTIONNAME",2,[]);r(c$,"AUTOINTEGRATE",3,["TF"]);r(c$,"BACKGROUNDCOLOR",4,["C"]);r(c$,"CLOSE",5,["spectrumId or fileName or ALL or VIEWS or SIMULATIONS"]);r(c$,"COMPOUNDMENUON",6,["TF"]);r(c$,"COORDCALLBACKFUNCTIONNAME",7,[]);r(c$,"COORDINATESCOLOR",8,["C"]);r(c$,"COORDINATESON",9,["T"]);r(c$,"DEBUG",10,["TF"]);
r(c$,"DEFAULTLOADSCRIPT",11,['"script..."']);r(c$,"DEFAULTNMRNORMALIZATION",12,["maxYvalue"]);r(c$,"DISPLAYFONTNAME",13,["fontName"]);r(c$,"DISPLAY1D",14,["T"]);r(c$,"DISPLAY2D",15,["T"]);r(c$,"ENABLEZOOM",16,["T"]);r(c$,"ENDINDEX",17,[]);r(c$,"FINDX",18,["x-value"]);r(c$,"GETPROPERTY",19,["[ALL] [propertyName]"]);r(c$,"GETSOLUTIONCOLOR",20,[" FILL or FILLNONE or FILLALL or FILLALLNONE"]);r(c$,"GRIDCOLOR",21,["C"]);r(c$,"GRIDON",22,["T"]);r(c$,"HIDDEN",23,["TF"]);r(c$,"HIGHLIGHTCOLOR",24,["C"]);r(c$,
"HIGHLIGHT",25,["OFF or X1 X2 [OFF] or X1 X2 r g b [a]"]);r(c$,"INTEGRALOFFSET",26,["percent"]);r(c$,"INTEGRALRANGE",27,["percent"]);r(c$,"INTEGRATE",28,[]);r(c$,"INTEGRATION",29,["ON/OFF/AUTO/TOGGLE/MIN value/MARK ppm1-ppm2:norm,ppm3-ppm4,... (start with 0-0 to clear)"]);r(c$,"INTEGRALPLOTCOLOR",30,[]);r(c$,"INTEGRATIONRATIOS",31,[]);r(c$,"INTERFACE",32,[]);r(c$,"IRMODE",33,["A or T or TOGGLE"]);r(c$,"JMOL",34,["...Jmol command..."]);r(c$,"JSV",35,[]);r(c$,"LABEL",36,['x y [color and/or "text"]']);
r(c$,"LINK",37,["AB or ABC or NONE or ALL"]);r(c$,"LOAD",38,['[APPEND] "fileName" [first] [last]; use "" to reload current file']);r(c$,"LOADFILECALLBACKFUNCTIONNAME",39,[]);r(c$,"LOADIMAGINARY",40,["T/F - default is to NOT load imaginary spectra"]);r(c$,"MENUON",41,[]);r(c$,"OBSCURE",42,[]);r(c$,"OVERLAY",43,[]);r(c$,"OVERLAYSTACKED",44,["TF"]);r(c$,"PEAK",45,['<type(IR,CNMR,HNMR,MS, etc)> id=xxx or "match" [ALL], for example: PEAK HNMR id=3']);r(c$,"PEAKCALLBACKFUNCTIONNAME",46,[]);r(c$,"PEAKLIST",
47,[" Example: PEAKLIST threshold=20 [%, or include=10] skip=0 interpolate=parabolic [or NONE]"]);r(c$,"PEAKTABCOLOR",48,["C"]);r(c$,"PLOTAREACOLOR",49,["C"]);r(c$,"PLOTCOLOR",50,["C"]);r(c$,"PLOTCOLORS",51,["color,color,color,..."]);r(c$,"PRINT",52,[]);r(c$,"REVERSEPLOT",53,["T"]);r(c$,"SCALEBY",54,["factor"]);r(c$,"SCALECOLOR",55,["C"]);r(c$,"SCRIPT",56,["filename.jsv"]);r(c$,"SELECT",57,["spectrumID, spectrumID,..."]);r(c$,"SETPEAK",58,["x (ppm) or NONE does peak search, unlike SETX -- NMR only"]);
r(c$,"SETX",59,["x (ppm) does no peak search, unlike SETPEAK -- NMR only"]);r(c$,"SHIFTX",60,["dx (ppm) or NONE -- NMR only"]);r(c$,"SHOWERRORS",61,[]);r(c$,"SHOWINTEGRATION",62,["T"]);r(c$,"SHOWKEY",63,["T"]);r(c$,"SHOWMEASUREMENTS",64,["T"]);r(c$,"SHOWMENU",65,[]);r(c$,"SHOWPEAKLIST",66,["T"]);r(c$,"SHOWPROPERTIES",67,[]);r(c$,"SHOWSOURCE",68,[]);r(c$,"SPECTRUM",69,["spectrumID"]);r(c$,"SPECTRUMNUMBER",70,[]);r(c$,"STACKOFFSETY",71,["percent"]);r(c$,"STARTINDEX",72,[]);r(c$,"SYNCCALLBACKFUNCTIONNAME",
73,[]);r(c$,"SYNCID",74,[]);r(c$,"TEST",75,[]);r(c$,"TITLEON",76,["T"]);r(c$,"TITLEBOLDON",77,["T"]);r(c$,"TITLECOLOR",78,["C"]);r(c$,"TITLEFONTNAME",79,["fontName"]);r(c$,"UNITSCOLOR",80,["C"]);r(c$,"VERSION",81,[]);r(c$,"VIEW",82,['spectrumID, spectrumID, ... Example: VIEW 3.1, 3.2 or VIEW "acetophenone"']);r(c$,"XSCALEON",83,["T"]);r(c$,"XUNITSON",84,["T"]);r(c$,"YSCALE",85,["[ALL] lowValue highValue"]);r(c$,"YSCALEON",86,["T"]);r(c$,"YUNITSON",87,["T"]);r(c$,"WINDOW",88,[]);r(c$,"WRITE",89,
['[XY,DIF,DIFDUP,PAC,FIX,SQZ,AML,CML,JPG,PDF,PNG,SVG] "filename"']);r(c$,"ZOOM",90,["OUT or x1,x2 or x1,y1 x2,y2"]);r(c$,"ZOOMBOXCOLOR",91,[]);r(c$,"ZOOMBOXCOLOR2",92,[])}),k("JSV.common"),t(null,"JSV.common.ScriptTokenizer",["JU.PT"],function(){c$=q(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)})}),k("JSV.common"),c$=q(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}),k("JSV.common"),t(null,"JSV.common.ViewData",["JSV.common.Coordinate","$.ScaleData"],function(){c$=q(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,g,h,l){this.nSpectra=l?1:a.size();this.scaleData=Array(this.nSpectra);
for(l=0;l<this.nSpectra;l++)this.scaleData[l]=new JSV.common.ScaleData(e[l],g[l]);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 g=a.get(0).getXYCoords().length;this.scaleData=Array(1);this.scaleData[0]=new JSV.common.ScaleData(0,g-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 g=0;g<this.scaleData.length;g++)this.scaleData[g].userYFactor=a.get(g).getUserYFactor(),this.scaleData[g].spectrumYRef=
a.get(g).getYRef();this.resetScaleFactors();var h=JSV.common.Coordinate.getMinX(a,this),l=JSV.common.Coordinate.getMaxX(a,this),j=JSV.common.Coordinate.getMinYUser(a,this),m=JSV.common.Coordinate.getMaxYUser(a,this);b!=c&&(j=b,m=c,j>m&&(g=j,j=m,m=g));a=a.get(0).isInverted();for(g=0;g<this.scaleData.length;g++)this.scaleData[g].setMinMax(h,l,j,m),this.scaleData[g].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,g,h){for(var l=0,j=0,l=g;l<=h;l++)if(g=b[l].getXVal(),g>=c){this.scaleData[a%this.scaleData.length].startDataPointIndex=l;break}for(;l<=h&&!(g=b[l].getXVal(),j++,g>=e);l++);this.scaleData[a%this.scaleData.length].endDataPointIndex=l-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 g=0;g<this.scaleData.length;g++)c[g]=0<=a&&g!=a?this.scaleData[g]:new JSV.common.ScaleData;JSV.common.ScaleData.copyScaleFactors(this.scaleData,c);JSV.common.ScaleData.copyYScales(this.scaleData,c);for(g=0;g<this.scaleData.length;g++)0<=a&&g!=a||(c[g].isShiftZoomedY=!0,c[g].minYOnScale=this.scaleData[g].minYOnScale*(1-b)+b*this.scaleData[g].maxYOnScale,c[g].maxYOnScale=this.scaleData[g].minYOnScale*
(1-e)+e*this.scaleData[g].maxYOnScale);return c},"~N,~B,~N,~N")}),k("JSV.common"),B(JSV.common,"XYScaleConverter"),k("JSV.common"),c$=s(JSV.common,"ZoomEvent"),p(c$,function(){}),k("JSV.dialog"),t(["JSV.api.AnnotationData","JSV.common.Annotation"],"JSV.dialog.JSVDialog",["java.lang.Double","JU.DF","$.PT","JSV.common.IntegralData","$.PeakData"],function(){c$=q(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 g=this.xyData;b=Math.abs(b/20);for(var h=g.size();0<=--h;){var l=Math.abs(a-g.get(h).getXVal());l<e&&
(e=l,c=h)}e<b&&(this.selectTableRow(g.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(!A(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(!A(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=w(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 g=
Double.parseDouble(c),h=Double.parseDouble(this.tableData[a+3-b][1]);this.jsvp.getPanelData().setXPointers(this.$spec,g,this.$spec,h);break;default:this.jsvp.getPanelData().findX(this.$spec,Double.parseDouble(c))}}catch(l){if(A(l,Exception))this.jsvp.getPanelData().findX(this.$spec,1E100);else throw l;}this.jsvp.doRepaint(!1);break;case JSV.common.Annotation.AType.OverlayLegend:this.jsvp.getPanelData().setSpectrum(a,!1)}}catch(j){if(!A(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(!A(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")}),k("JSV.exception"),t(["java.lang.Exception"],"JSV.exception.JSVException",null,function(){c$=s(JSV.exception,"JSVException",Exception)}),k("JSV.js2d"),c$=s(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"),k("JSV.js2d"),c$=s(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=w(a.length/4),c=G(b,0),e=0,g=0;e<b;g++)c[e++]=a[g++]<<16|a[g++]<<8|a[g++]|4278190080;return c},"~A"),c$.fromIntARGB=c(c$,"fromIntARGB",function(a,b){for(var c=b.length>>2,e=0,g=0;e<c;e++)b[g++]=a[e]>>16&255,b[g++]=a[e]>>8&255,b[g++]=a[e]&255,b[g++]=255},"~A,~A"),c$.getTextPixels=c(c$,"getTextPixels",function(a,b,c,e,g,h){c.fillStyle="#000000";c.fillRect(0,0,e,g);c.fillStyle="#FFFFFF";c.font=b.font;c.fillText(a,0,h);return JSV.js2d.Image.grabPixels(c,
e,g)},"~S,javajs.awt.Font,~O,~N,~N,~N"),c$.allocateRgbImage=c(c$,"allocateRgbImage",function(a,b,c,e,g,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"),k("JSV.js2d"),
t(["javajs.api.GenericFileInterface"],"JSV.js2d.JsFile",["JU.PT","JSV.common.JSVFileManager"],function(){c$=q(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(g){if(A(g,Exception))return g.toString();throw g;}},"java.net.URL,~A,~S")}),k("JSV.js2d"),t(["JSV.api.JSVFileHelper"],"JSV.js2d.JsFileHelper",["JU.PT","JSV.js2d.JsFile"],function(){c$=q(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:"",g=!1,g=c[0],
e=c[1];this.vwr.si.siOpenDataOrFile(String.instantialize(b),"cache://"+a,null,null,-1,-1,g,null,null);null!=e&&this.vwr.runScript(e)}},"~S,~O,~A");e(c$,"getUrlFromDialog",function(a,b){return prompt(a,b)},"~S,~S")}),k("JSV.js2d"),c$=s(JSV.js2d,"JsFont"),c$.newFont=c(c$,"newFont",function(a,b,c,e,g){a=a.equals("Monospaced")?"Courier":a.startsWith("Sans")?"Sans-Serif":"Serif";return(b?"bold ":"")+(c?"italic ":"")+e+g+" "+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"),k("JSV.js2d"),t(["JSV.api.JSVGraphics"],
"JSV.js2d.JsG2D",["javajs.awt.Color","JU.CU"],function(){c$=q(function(){this.windowHeight=this.windowWidth=0;this.inPath=this.isShifted=!1;n(this,arguments)},JSV.js2d,"JsG2D",null,JSV.api.JSVGraphics);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,
g){return b=Jmol._newGrayScaleImage(a,b,c,e,g)},"~O,~O,~N,~N,~A");e(c$,"drawGrayScaleImage",function(a,b,c,e,g,h,l,j,m,k){a=g-c+1;h=h-e+1;m=m-l+1;k=k-j+1;g=b.w*a/m;var p=b.h*h/k;b.width=g;b.height=p;var n=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";n.style.left=-l*a/m+"px";n.style.top=-j*h/k+"px";n.style.width=g+"px";n.style.height=p+"px"},"~O,~O,~N,~N,~N,~N,~N,~N,~N,~N");e(c$,"drawLine",function(a,b,c,e,g){var h=this.inPath;h||a.beginPath();a.moveTo(b,
c);a.lineTo(e,g);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,g){a.beginPath();a.moveTo(b[0],c[0]);for(var h=1;h<e;h++)a.lineTo(b[h],c[h]);g?a.fill():a.stroke()},"~O,~A,~A,~N,~B");e(c$,"drawRect",function(a,b,c,e,g){a.beginPath();a.rect(b,c,e,g);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,g){a.fillRect(b,c,e,g)},"~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")}),k("JSV.js2d"),t(["JSV.api.JSVPanel"],"JSV.js2d.JsPanel",["javajs.awt.Font","JSV.common.JSViewer","$.PanelData","JU.Logger"],function(){c$=q(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(A(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,g){return null!=this.mouse&&this.mouse.processEvent(a,b,c,e,g)},"~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")}),k("JSV.js2d"),t(["JSV.common.ColorParameters"],"JSV.js2d.JsParameters",["javajs.awt.Color"],function(){c$=s(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")}),k("JSV.js2d"),t(["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$=q(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,g,h){JSV.js2d.Image.drawImage(a,b,c,e,g,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,g,h){return JSV.js2d.Image.allocateRgbImage(a,b,c,e,g,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,g){return this.grabPixels(c,e,g,null,0,0)},"~O,~O,~O,~N,~N,~N");e(c$,"getTextPixels",function(a,b,c,e,g,h,l){return JSV.js2d.Image.getTextPixels(a,b,c,g,h,l)},"~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:u(a,String)?a:u(a,JU.SB)?a.toString():u(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(g){if(A(g,Exception))return""+
g;throw g;}},"java.net.URL,~A,~S,~B");e(c$,"getLocalUrl",function(){return null},"~S")}),k("JSV.js2d"),t(["JSV.api.JSVMainPanel"],"JSV.js2d.JsMainPanel",null,function(){c$=q(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")}),k("JSV.source"),t(["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$=q(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=u(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 g=c+b[1];b[1]=c;var h=g+b[2];b[2]=g;return this.isNMR()?[e,a,e*this.observedFreq,20<c*this.observedFreq?0:c*this.observedFreq,20<g*this.observedFreq?0:g*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])}),k("JSV.source"),t(null,"JSV.source.JDXDecompressor",
["java.lang.Double","JSV.common.Coordinate","JU.Logger"],function(){c$=q(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,g,h){this.t=a;this.firstX=b;this.xFactor=c;this.yFactor=e;this.deltaX=g;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),
g=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 l=(new JSV.common.Coordinate).set(this.xval,(this.yval=this.getYValue())*this.yFactor);if(0==this.ipt)this.addPoint(l);
else{var j=this.xyCoords[this.ipt-1],k=Math.abs(j.getXVal()-l.getXVal());if(h&&k<c){this.xyCoords[this.ipt-1]=l;var p=j.getYVal(),n=l.getYVal();n!=p&&this.logError(this.lastLine+"\n"+this.line+"\nY-value Checkpoint Error! Line "+this.lineNumber+" for y1="+n+" y0="+p)}else this.addPoint(l),(k<g||k>e)&&this.logError(this.lastLine+"\n"+this.line+"\nX-sequence Checkpoint Error! Line "+this.lineNumber+" |x1-x0|="+k+" instead of "+Math.abs(this.deltaX)+" for x1="+l.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(q){if(!A(q,java.io.IOException))throw q;}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")}),k("JSV.source"),t(["JU.Lst"],"JSV.source.JDXHeader",null,function(){c$=q(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");H(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 g=0;g<this.headerTable.size();g++)c[e++]=this.getRow(g);return c},"~B,~N");c(c$,"getRow",
function(a){a=this.headerTable.get(a);return[a[0],JU.PT.rep(a[1],"<","<")]},"~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(";"))}),k("JSV.source"),t(["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$=q(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,g,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=g;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,g,h,l){var j=null;try{null==a&&(a=JSV.common.JSVFileManager.getBufferedReaderFromName(b,"##TITLE"));a.mark(400);var k=T(400,"\x00");a.read(k,0,400);a.reset();var j=String.instantialize(k),p=j.indexOf("#"),n=j.indexOf("<");if(0>p||0<=n&&n<p){var q=j.toLowerCase(),q=q.contains("<animl")||q.contains("<!doctype technique")?"AnIML":q.contains("xml-cml")?"CML":null;c=null;null!=q&&(c=JSV.common.JSViewer.getInterface("JSV.source."+
q+"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,g,h,l)).getJDXSource(a)}catch(r){if(A(r,Exception))throw null!=a&&a.close(),null!=j&&JU.Logger.error(j+"..."),a=r.getMessage(),new JSV.exception.JSVException("Error reading data: "+a);throw r;}},"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=u(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,g=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,g))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(g),e=null):a.equals("##NTUPLES")||a.equals("##VARNAME")?(this.getNTupleSpectra(g,e,a),e=null):(null==e&&(e=new JSV.common.Spectrum),this.readDataLabel(e,a,b,this.errorLog,this.obscure)||(JSV.source.JDXReader.addHeader(g,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(A(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,g=!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&&(g=!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,g))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(l){if(A(l,Exception))throw new JSV.exception.JSVException(l.getMessage());throw l;}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 g=c.equals("##VARNAME");g||(c="");var h=new java.util.Hashtable,l=Array(2);0==this.source.type&&
(this.source.type=2,this.source.isCompoundSource=!0,this.source.setHeaderTable(a));for(;!(c=g?c:this.t.getLabel()).equals("##PAGE");){for(var g=!1,j=new java.util.StringTokenizer(this.t.getValue(),","),k=new JU.Lst;j.hasMoreTokens();)k.addLast(j.nextToken().trim());h.put(c,k)}g=h.get("##SYMBOL");if(!c.equals("##PAGE"))throw new JSV.exception.JSVException("Error Reading NTuple Source");for(var j=this.t.getValue(),k=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==k&&(k=new JSV.common.Spectrum,b.copyTo(k),k.setTitle(b.getTitle()),!k.is1D())){var n=j.indexOf("=");if(0<=n)try{k.setY2D(Double.parseDouble(j.substring(n+1).trim()));var q=j.substring(0,n).trim(),r=g.indexOf(q);0<=r&&k.setY2DUnits(h.get("##UNITS").get(r))}catch(s){if(!A(s,Exception))throw s;}}n=new JU.Lst;for(k.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("("),u=r.lastIndexOf(")");if(-1==t||-1==u)throw new JSV.exception.JSVException("Variable List not Found");t=r.substring(t,u+1);for(r=u=0;r<g.size();r++){var w=g.get(r).trim();-1!=t.indexOf(w)&&(l[u++]=w);if(2==u)break}this.setTabularDataType(k,"##"+(c?"XYDATA":"PEAKTABLE"));if(!this.readNTUPLECoords(k,h,l,e))throw new JSV.exception.JSVException("Unable to read Ntuple Source");k.nucleusX.equals("?")||(b.nucleusX=k.nucleusX);
b.nucleusY=k.nucleusY;b.freq2dX=k.freq2dX;b.freq2dY=k.freq2dY;b.y2DUnits=k.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(k,!p);p=!1;k=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,g){if(JSV.source.JDXReader.readHeaderLabel(a,b,c,e,g))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(A(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,g){switch("##TITLE#####JCAMPDX###ORIGIN####OWNER#####DATATYPE##LONGDATE##DATE######TIME####".indexOf(b+"#")){case 0:return a.setTitle(g||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(!A(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 g;if(a.dataClass.equals("XYDATA")){g=b.get("##SYMBOL");var h=g.indexOf(c[0]);c=g.indexOf(c[1]);g=b.get("##VARNAME");a.varName=g.get(c).toUpperCase();g=b.get("##FACTOR");a.xFactor=Double.parseDouble(g.get(h));
a.yFactor=Double.parseDouble(g.get(c));g=b.get("##LAST");a.fileLastX=Double.parseDouble(g.get(h));g=b.get("##FIRST");a.fileFirstX=Double.parseDouble(g.get(h));g=b.get("##VARDIM");a.nPointsFile=Integer.parseInt(g.get(h));g=b.get("##UNITS");a.setXUnits(g.get(h));a.setYUnits(g.get(c));null==a.nucleusX&&null!=(g=b.get("##.NUCLEUS"))?(a.setNucleusAndFreq(g.get(0),!1),a.setNucleusAndFreq(g.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")),g=b.get("##SYMBOL"),h=g.indexOf(c[0]),c=g.indexOf(c[1]),g=b.get("##UNITS"),a.setXUnits(g.get(h)),a.setYUnits(g.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 g=new JSV.source.JDXDecompressor(this.t,a.fileFirstX,a.xFactor,a.yFactor,e,a.nPointsFile),h=Y(2,0),l=System.currentTimeMillis(),j=g.decompressData(this.errorLog,h);JU.Logger.debugging&&JU.Logger.debug("decompression time = "+(System.currentTimeMillis()-l)+" ms");a.setXYCoords(j);l=g.getMinY();null!=b&&(l<b[0]&&(b[0]=l),l=g.getMaxY(),l>b[1]&&(b[1]=l));g=Double.isNaN(a.freq2dX)?a.observedFreq:a.freq2dX;1.7976931348623157E308!=a.offset&&(1.7976931348623157E308!=g&&a.dataType.toUpperCase().contains("SPECTRUM"))&&
JSV.common.Coordinate.applyShiftReference(j,a.dataPointNum,a.fileFirstX,a.fileLastX,a.offset,g,a.shiftRefType);1.7976931348623157E308!=g&&a.getXUnits().toUpperCase().equals("HZ")&&(JSV.common.Coordinate.applyScale(j,1/g,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,g=0;g<a.size();g++)if((e=a.get(g))[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(A(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")}),k("JSV.source"),t(["JSV.source.JDXHeader"],"JSV.source.JDXSource",["JU.Lst"],function(){c$=q(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=E(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)}),k("JSV.source"),t(null,"JSV.source.JDXSourceStreamTokenizer",["java.lang.Character","JU.SB","JU.Logger"],function(){c$=q(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(A(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(A(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 g=T(b-e,"\x00"),h=0;e<b;e++){var l;switch(l=a.charAt(e)){case "\r":if(e<c&&"\n"==a.charAt(e+1))continue;l="\n";break;case "\n":0<h&&"\n"!=g[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"==l&&0<h&&"\n"==g[h-1]||(g[h++]=l)}0<h&&"\n"==g[h-1]&&--h;return String.instantialize(g).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")}),k("JSV.tree"),t(["JSV.api.JSVTree"],"JSV.tree.SimpleTree",["JSV.common.JSVFileManager","$.PanelNode","JSV.tree.SimpleTreeModel",
"$.SimpleTreeNode","$.SimpleTreePath"],function(){c$=q(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,
g=e.getRootNode(),h=this.vwr.panelNodes,l=JSV.common.JSVFileManager.getTagName(b.getFilePath()),j=new JSV.common.PanelNode(null,l,b,null),k=new JSV.tree.SimpleTreeNode(l,j);j.setTreeNode(k);e.spectraTreeModel.insertNodeInto(k,g,g.getChildCount());for(g=0;g<c.length;g++){var j=new JSV.common.PanelNode(a+"."+(g+1),l,b,c[g]),n=new JSV.tree.SimpleTreeNode(j.toString(),j);j.setTreeNode(n);h.addLast(j);e.spectraTreeModel.insertNodeInto(n,k,k.getChildCount())}this.vwr.selectFrameNode(c[0]);return k},"~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")}),k("JSV.tree"),t(["java.util.Enumeration"],"JSV.tree.SimpleTreeEnumeration",null,function(){c$=q(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++)})}),k("JSV.tree"),c$=q(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"),k("JSV.tree"),t(["JSV.api.JSVTreeNode"],"JSV.tree.SimpleTreeNode",["JU.Lst","JSV.tree.SimpleTreeEnumeration"],function(){c$=q(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})}),k("JSV.tree"),t(["JSV.api.JSVTreePath"],"JSV.tree.SimpleTreePath",
null,function(){c$=q(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.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);