(function(sa,ta,ua,va,W,wa,X,x,U,Z,$,aa,xa,qa,ya,N,O,u,ba,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,y,Ha,Ia,Ja,Ka,La,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,m){X("JS");U(null,"JS.MathExt","java.util.Date $.Hashtable $.Random JU.A4 $.AU $.BArray $.BS $.CU $.Lst $.M3 $.M4 $.Measure $.OC $.P3 $.P4 $.PT $.Quat $.Rdr $.SB $.V3 J.api.Interface J.atomdata.RadiusData J.bspt.PointIterator J.c.VDW J.i18n.GT JM.BondSet $.Measurement JS.SV $.T JU.BSUtil $.BoxInfo $.Edge $.Escape $.JmolMolecule $.Logger $.Parser $.Point3fi $.SimpleUnitCell JV.FileManager $.JC $.Viewer".split(" "),
function(){var k=$(function(){this.pm=this.rand=this.e=this.vwr=null;Z(this,arguments)},JS,"MathExt",null);m(k,"init",function(c){this.e=c;this.vwr=this.e.vwr;return this},"~O");m(k,"evaluate",function(c,a,b,d){switch(d){case 134218760:return 1<=b.length&&4==b[0].tok?c.addXStr((1==b.length?(new java.util.Date).toString():this.vwr.apiPlatform.getDateFormat(JS.SV.sValue(b[1])))+"\t"+JS.SV.sValue(b[0]).trim()):c.addXInt(System.currentTimeMillis()-JS.MathExt.t0-(0==b.length?0:b[0].asInt()));case 134218250:return 1==
b.length&&2==b[0].tok?c.addXInt(Math.abs(b[0].intValue)):c.addXFloat(Math.abs(b[0].asFloat()));case 134218241:case 134218245:case 134218244:case 134218246:case 134218255:return 1==b.length&&this.evaluateMath(c,b,d);case 1275069441:case 1275068435:case 1275068928:case 1275068929:case 1275068930:case 1275068931:case 1275335685:case 1275334681:return this.evaluateList(c,a.intValue,b);case 268437504:0==b.length&&(c.wasX=!1);case 1275068418:return this.evaluateArray(c,b,1275068418==d&&268442113==a.tok);
case 134217766:return this.evaluateMatrix(c,b);case 134217765:return this.evaluateCallbackParam(c,b);case 134217731:case 134221850:return this.evaluateQuaternion(c,b,d);case 1275068420:return this.evaluateBin(c,b);case 134221829:return this.evaluateCache(c,b);case 1275068934:case 1275068935:return this.evaluateRowCol(c,b,d);case 1765808134:return this.evaluateColor(c,b);case 134221831:return this.evaluateCompare(c,b);case 1228931586:case 134217736:case 1275203608:return this.evaluateConnected(c,b,
d,a.intValue);case 1812599299:case 1814695966:return this.evaluateUnitCell(c,b,268442113==a.tok,268442113==a.tok?a.intValue:a.tok);case 134353926:return this.evaluateContact(c,b);case 134221834:return this.evaluateData(c,b);case 1275069444:case 1275069442:return this.evaluateDotDist(c,b,d,a.intValue);case 1275069443:if(268442113==a.tok)return this.evaluateDotDist(c,b,d,a.intValue);case 134217729:case 1745489939:return this.evaluateMeasure(c,b,a.tok);case 1228935687:case 134223363:return this.evaluateLoad(c,
b,1228935687==d);case 1275068427:return this.evaluateFind(c,b);case 1275068433:return this.evaluateInChI(c,b);case 1287653388:case 1825200146:return this.evaluateFormat(c,a.intValue,b,1825200146==d);case 134320141:return this.evaluateUserFunction(c,a.value,b,a.intValue,268442113==a.tok);case 1275068437:d=1275068725;case 1275068446:case 1275068725:case 1275082241:case 1275072526:return this.evaluateGetProperty(c,b,d,268442113==a.tok);case 136314895:return this.evaluateHelix(c,b);case 134219777:case 134217750:case 134217763:return this.evaluatePlane(c,
b,d,268442113==a.tok);case 134218759:case 134238732:case 134222850:case 134222350:return this.evaluateScript(c,b,d);case 1275069446:case 1275069447:case 1275068932:return this.evaluateString(c,a.intValue,b);case 134217751:return this.evaluatePoint(c,b);case 1275068447:return this.evaluatePointGroup(c,b,268442113==a.tok);case 134256129:return this.evaluatePrompt(c,b);case 134219266:return this.evaluateRandom(c,b);case 1275068432:return this.evaluateIn(c,b);case 1275072532:return this.evaluateModulation(c,
b);case 1275068443:return this.evaluateReplace(c,b);case 134218753:case 134218756:case 134218757:case 1237320707:return this.evaluateSubstructure(c,b,d,268442113==a.tok);case 1275068444:case 1275068425:return this.evaluateSort(c,b,d);case 134217764:return this.evaluateSpacegroup(c,b);case 1296041986:return this.evaluateSymop(c,b,268442113==a.tok);case 1275068445:return this.evaluateTensor(c,b);case 134217759:return this.evaluateWithin(c,b,268442113==a.tok);case 134221856:return this.evaluateWrite(c,
b)}return!1},"JS.ScriptMathProcessor,JS.T,~A,~N");m(k,"evaluateMatrix",function(c,a){var b=a.length,d=null,e=null,f=0<b&&4==a[0].tok?a[0].value:null,g=2>b||null==f?null:a[1].getMap(),f=2>b||null==f?null:a[1].getList(),h=1<b&&1073742335==a[b-1].tok;h&&b--;var j=1<b&&4==a[b-1].tok?a[b-1].value:null,l=null!=j&&j.equals(j.toUpperCase()),p="uvw".equalsIgnoreCase(j),z="abc".equalsIgnoreCase(j),q=p||!z&&"xyz".equalsIgnoreCase(j),t=!p&&!z&&!q&&"rxyz".equalsIgnoreCase(j),r=null;(null!=j||null!=f||null!=g)&&
b--;switch(b){case 0:d=new JU.M4;d.setIdentity();break;case 1:switch(a[0].tok){case 9:e=JU.Quat.newP4(a[0].value).getMatrix();break;case 11:e=a[0].value;break;case 12:d=a[0].value;break;case 4:b=a[0].value;if(b.equals("h")||b.equals("r")||0<=b.indexOf(",")&&0>b.indexOf(":")){if(0<=b.indexOf("*")){if(d=this.vwr.getCurrentUnitCell(),null==d)return!1}else d=this.vwr.getSymTemp();d=d.convertTransform(b,null);0<=b.indexOf("u")&&(e=new JU.M3,d.getRotationScale(e))}if(null!=d)break;var n=null;null!=j&&(!z&&
!q&&!p)&&("map".equals(j)?g=new java.util.Hashtable:("list".equals(j)||(n="[SELECT ("+j+")]"),f=new JU.Lst));var k=null==f&&null==g,D=null==g?null:new java.util.Hashtable,j=null==f?null:new JU.Lst;k&&(D=new java.util.Hashtable,D.put("ASM4",Boolean.TRUE));d=this.vwr.getSymStatic().staticGetMatrixTransform(b,null==D?j:D);if(k)break;if(null!=g){g.clear();for(var m,e=D.entrySet().iterator();e.hasNext()&&((m=e.next())||1);)g.put(m.getKey(),JS.SV.getVariable(m.getValue()));return c.addXMap(g)}if(null!=
f){if(null!=n)return c.addXObj(this.vwr.extractProperty(j,n,-1));f.clear();g=0;for(e=j.size();g<e;g++)f.addLast(JS.SV.getVariable(j.get(g)));return c.addXList(f)}break;case 7:switch(f=a[0].getList(),m=f.size(),m){case 3:case 4:r=u(m*m,0);for(b=g=0;g<m;g++)switch(n=f.get(g),n.tok){case 8:k=n.value;r[b++]=k.x;r[b++]=k.y;r[b++]=k.z;break;case 9:j=n.value;r[b++]=j.x;r[b++]=j.y;r[b++]=j.z;r[b++]=j.w;break;case 7:n=f.get(g).getList();if(null==n||n.size()!=m)return!1;for(j=0;j<m;j++)r[b++]=JS.SV.fValue(n.get(j))}break;
case 9:case 16:r=JS.SV.flistValue(a[0],0);break;default:return!1}}break;case 2:e=new JU.M3;if(8!=a[0].tok)return!1;f=JU.V3.newV(JS.SV.ptValue(a[0]));d=JS.SV.fValue(a[1]);e.setAA(JU.A4.newVA(f,3.141592653589793*(d/180)));return c.addXM3(e);case 3:case 4:if(7==a[0].tok){r=u(3==b?9:16,0);for(g=k=0;g<b;g++){n=JS.SV.flistValue(a[g],0);for(j=0;j<b;j++)r[k++]=n[j]}}}if(null!=r)switch(r.length){case 9:e=JU.M3.newA9(r);break;case 16:d=JU.M4.newA16(r);break;default:return!1}if(t||z||p||q)return null!=e&&(d=
JU.M4.newMV(e,new JU.P3)),h&&this.doNormalize(d),c.addXStr(this.matToString(t&&null!=e?e:d,(t?1:z?2748:p?3567:0)|(l?4096:0)));h&&this.doNormalize(d);return null!=e?c.addXM3(e):null!=d?c.addXM4(d):!1},"JS.ScriptMathProcessor,~A");m(k,"doNormalize",function(c){if(null!=c){var a=c.m13+(c.m10+c.m11+c.m12)/2,b=c.m23+(c.m20+c.m21+c.m22)/2;c.m03-=Math.floor(c.m03+(c.m00+c.m01+c.m02)/2);c.m13-=Math.floor(a);c.m23-=Math.floor(b)}},"JU.M4");m(k,"matToString",function(c,a){var b=this.vwr.getSymStatic(),d=0!=
(a&4096);switch(a){case 47:case 1:b="rxyz";break;case 39:case 2748:if(x(c,"JU.M3"))return d=JU.M4.newM4(null),d.setRotationScale(c),b.staticGetTransformABC(d,!1);b="abc";break;case 43:case 3567:b="uvw";break;default:case 35:b="xyz"}d&&(b=b.toUpperCase());return this.vwr.getSymStatic().staticConvertOperation("",c,b)},"JU.M34,~N");m(k,"evaluateCallbackParam",function(c,a){return c.addX(this.e.getCallbackParameter(0==a.length?-2147483648:a[0].asInt()))},"JS.ScriptMathProcessor,~A");m(k,"evaluateSpacegroup",
function(c,a){var b=null,d=a.length;if(0==d)return c.addXObj(this.vwr.getSymTemp().getSpaceGroupInfo(this.vwr.ms,null,this.vwr.am.cmi,!0,null));var e=4==a[a.length-1].tok?a[a.length-1].value:null,f="settings".equalsIgnoreCase(e),g="setting".equalsIgnoreCase(e),h=1<d&&(2!=d||!f&&!g&&!"list".equalsIgnoreCase(e)&&!"jmol".equalsIgnoreCase(e)),j=a[0].asString();if(h||"subgroups".equals(e))return h=this.getSubgroupInfo(a,"subgroups".equals(e)?d:d+1),null==h?!1:c.addXObj(h);var l=null,h=null;switch(d){default:return!1;
case 2:if("list".equals(e)){l=Integer.$valueOf(this.vwr.getSymTemp().getSpaceGroupInfoObj("itaNumber",j,!1,!1));j="list";break}if(4!=a[1].tok){b=JS.SV.flistValue(a[1],0);if(null==b||6!=b.length)return!1;l=b=JU.SimpleUnitCell.newParams(b,NaN)}case 1:if(10==a[0].tok)return j=JS.SV.getBitSet(a[0],!0),c.addXObj(this.vwr.findSpaceGroup(null,j,null,b,null,null,1));var p=2==a[0].tok?a[0].intValue:1==d?-2147483648:0;if(f||g)return f&&0==p?!1:c.addXObj((-2147483648==p?this.vwr.getCurrentUnitCell():this.vwr.getSymTemp()).getSpaceGroupJSON(e.toLowerCase(),
g&&1<d?j:null,p));if("setting".equalsIgnoreCase(j)||"settings".equalsIgnoreCase(j))return b=this.vwr.getOperativeSymmetry(),c.addXObj(null==b?null:b.getSpaceGroupJSON(j.toLowerCase(),null,-2147483648));if(j.toUpperCase().startsWith("AFLOWLIB/"))return c.addXObj(this.vwr.getSymTemp().getSpaceGroupJSON("AFLOWLIB",j.substring(9),0));if(j.startsWith("Hall:")||0<=j.indexOf("x")||null!=b){h=this.vwr.findSpaceGroup(null,null,j,b,null,null,1);break}if(0<p||3==a[0].tok||4==a[0].tok){if(0<p||1<j.length&&"/"==
j.charAt(1)||!j.endsWith(":")&&!Float.isNaN(JU.PT.parseFloat(j)))j="ITA/"+j;if(j.toUpperCase().startsWith("ITA/"))return c.addXObj(this.vwr.getSymTemp().getSpaceGroupJSON("ITA",j.substring(4),0))}}null==h&&(h=this.vwr.getSymStatic().getSpaceGroupInfoObj(j,l,!0,!1));null!=h&&(!"jmol".equals(e)&&!"list".equals(e))&&(b=h.get("itaIndex"),null!=b&&(h=this.vwr.getSymTemp().getSpaceGroupJSON("ITA",b.toString(),0)));return c.addXObj(h)},"JS.ScriptMathProcessor,~A");m(k,"getSubgroupInfo",function(c,a){var b,
d=-2147483648,e=-2147483648,f=null,g=null;switch(a){case 5:if(e=c[3].intValue,0>e)return null;case 4:if(d=c[2].intValue,0>d||2147483647==d)return null;case 3:g=0==c[1].intValue?"":c[1].asString();case 2:f=c[0].asString();default:if(null==f){b=this.vwr.getOperativeSymmetry();if(null==b)return null;f=b.getSpaceGroupClegId()}else b=this.vwr.getSymStatic()}return b.getSubgroupJSON(f,g,d,e,0,null,null)},"~A,~N");m(k,"evaluatePointGroup",function(c,a,b){var d=null,e=null,f=-1,g=-1,h=null,j=!1;switch(a.length){case 4:g=
a[3].asFloat();case 3:f=a[2].asFloat();case 2:switch(a[1].tok){case 8:e=JS.SV.ptValue(a[1]);break;case 10:h=JS.SV.getBitSet(a[1],!1),a[0].asString().equalsIgnoreCase("spaceGroup")&&(j=!0,2==a.length&&(f=0))}if(j)break;case 1:switch(a[0].tok){case 7:b=a[0].getList();d=Array(b.size());for(a=d.length;0<=--a;)d[a]=JS.SV.ptValue(b.get(a));break;case 10:h=JS.SV.getBitSet(a[0],!1);d=this.vwr.ms.at;break;case 4:if(b){h=JS.SV.getBitSet(c.getX(),!0);if(null==h||h.isEmpty())return!1;j=a[0].asString();if("spacegroup".equals(j)){j=
!0;break}}default:return!1}break;case 0:if(!b)return c.addXObj(this.vwr.ms.getPointGroupInfo(null,null));h=JS.SV.getBitSet(c.getX(),!1);break;default:return!1}if(null!=h){a=h.nextSetBit(0);if(0>a||a>=this.vwr.ms.ac||j&&1!=h.cardinality())return!1;if(j){e=this.vwr.ms.generateCrystalClass(a,JU.P3.new3(NaN,NaN,NaN));d=Array(e.size());for(a=d.length;0<=--a;)d[a]=e.get(a);e=new JU.P3}}d=this.vwr.getSymTemp().setPointGroup(this.vwr,null,e,null==d?this.vwr.ms.at:d,h,!1,0>f?this.vwr.getFloat(570425382):f,
0>g?this.vwr.getFloat(570425384):g,null==h?d.length:h.cardinality(),!0);return c.addXMap(d.getPointGroupInfo(-1,null,!0,null,0,1))},"JS.ScriptMathProcessor,~A,~B");m(k,"evaluateUnitCell",function(c,a,b,d){var e=b?JS.SV.getBitSet(c.getX(),!0):1812599299==d?this.vwr.getAllAtoms():null,f=(null==e?this.vwr.getAllAtoms():e).nextSetBit(0);b=a.length-1;if(1812599299==d){if(1<b||0==b&&4!=a[0].tok)return!1;f=this.vwr.ms.getBoxInfo(e,1);return c.addXObj(f.getInfo(0==b?null:a[0].asString()))}d=!1;e=0<=b&&1073742335==
a[b].tok;if(0<=b&&4==a[b].tok){var g=a[b].value;if(d="info".equals(g)){if(d&&0==b)return b=this.vwr.getCurrentUnitCell(),c.addXMap(b.getUnitCellInfoMap());b--}else if(g=this.vwr.getUnitCellInfoStr(g),!Float.isNaN(g))return c.addXFloat(g)}a=this.getUnitCell(a,f,0,b);if(JU.AU.isAP(a)){if(d)return a=this.vwr.getSymTemp().getUnitCell(a,!1,null),c.addXMap(a.getUnitCellInfoMap());if(e){b=this.vwr.getCurrentUnitCell();f=new JU.M4;for(d=0;4>d;d++)e=a[d],b.toFractional(a[d],!0),0==d?(f.m00=e.x,f.m01=e.y,f.m02=
e.z,f.m03=1):f.setColumn4(d-1,e.x,e.y,e.z,0);return c.addXM4(f)}}return null!=a&&c.addXObj(a)},"JS.ScriptMathProcessor,~A,~B,~N");m(k,"getUnitCell",function(c,a,b,d){var e=0<b,f=1;switch(d<b?0:c[d].tok){case 2:case 3:f=c[d].asFloat(),d--}var g=!1,h=b>=c.length||d<b?0:c[b].tok,j=null,l=null,p=null;switch(h){case 7:l=c[b].getList();break;case 12:if(e)return null;switch(1<d?1073741936:d<b+1?0:c[b+1].tok){default:case 1073741936:return null;case 0:case 1073742334:break;case 1073742335:g=!0}return this.vwr.getSymStatic().staticGetTransformABC(c[b].value,
g);case 4:if(p=c[b].asString().toLowerCase(),0==p.indexOf("a=")){j=Array(4);for(g=0;4>g;g++)j[g]=new JU.P3;JU.SimpleUnitCell.setAbc(p,null,j);p=null}else if(!(0<=p.indexOf(",")||p.equals("r")))if((g=p.startsWith("!"))&&(p=p.substring(1)),p.startsWith("unitcell_")){p=this.vwr.getCurrentModelAuxInfo().get(p);if(null==p)return null;g&&(p="!"+p)}else p=null}if(null!=p){if(d>b&&JS.SV.bValue(c[b+1]))return e?null:this.vwr.getSymTemp().convertTransform(p,null);j=this.vwr.getV0abc(-1,p);if(null==j)return null}if(null==
j){p=null;if((g=null!=l)&&4>l.size())return null;b+=g?1:0;!g&&8!=h&&(p=0>a?this.vwr.getCurrentUnitCell():this.vwr.ms.getUnitCell(this.vwr.ms.at[a].mi),j=null==p?y(-1,[JU.P3.new3(0,0,0),JU.P3.new3(1,0,0),JU.P3.new3(0,1,0),JU.P3.new3(0,0,1)]):p.getUnitCellVectors());if(null==j)if(j=Array(4),g)switch(l.size()){case 3:j[0]=new JU.P3;for(g=0;3>g;g++)j[g+1]=JU.P3.newP(JS.SV.ptValue(l.get(g)));break;case 4:for(g=0;4>g;g++)j[g]=JU.P3.newP(JS.SV.ptValue(l.get(g)));break;case 6:h=u(6,0);for(g=0;6>g;g++)h[g]=
l.get(g).asFloat();JU.SimpleUnitCell.setAbc(null,h,j);break;default:return null}else switch(j[0]=JU.P3.newP(JS.SV.ptValue(c[0])),d){case 3:for(g=1;4>g;g++)(j[g]=JU.P3.newP(JS.SV.ptValue(c[g]))).sub(j[0]);break;case 1:if(l=c[1].getList(),null!=l&&3==l.size()){for(g=0;3>g;g++)j[g+1]=JU.P3.newP(JS.SV.ptValue(l.get(g)));break}default:return null}h=b<=d?c[b].asString():null;if((l="primitive".equalsIgnoreCase(h))||"conventional".equalsIgnoreCase(h)){c=++b>d?"":c[b].asString().toUpperCase();c.equals("BCC")?
c="I":0==c.length&&(c=this.vwr.getSymmetryInfo(a,null,0,null,null,null,1073741994,null,0,-1,0,null));if(null==c||0==c.length)return null;null==p&&(p=this.vwr.getSymTemp());a=this.vwr.getModelForAtomIndex(a).auxiliaryInfo.get("primitiveToCrystal");if(!p.toFromPrimitive(l,c.charAt(0),j,a))return null}else if("reciprocal".equalsIgnoreCase(h))j=JU.SimpleUnitCell.getReciprocal(j,null,f),f=1;else if("vertices".equalsIgnoreCase(h))return e?null:JU.BoxInfo.getVerticesFromOABC(j)}if(1!=f)for(g=1;4>g;g++)j[g].scale(f);
return j},"~A,~N,~N,~N");m(k,"evaluateArray",function(c,a,b){if(b){b=c.getX();switch(b.tok){case 11:case 12:return c.addX(b.toArray())}if(0==a.length||2<a.length)return!1;var d=1==a.length||1073742334==a[1].tok,e;switch(b.tok){case 11:case 12:return c.addX(b.toArray());case 6:if(1!=a.length)break;var f=new JU.Lst,g=b.getMap(),h=b.getKeys(!1);b=0;for(var j=h.length;b<j;b++)if(null==g.get(h[b]).getMap())return!1;a=a[0].asString();b=0;for(j=h.length;b<j;b++)e=g.get(h[b]).getMap(),d&&(e=JS.SV.deepCopy(e,
!0,!1)),e.put(a,JS.SV.newS(h[b])),f.addLast(JS.SV.newV(6,e));return c.addXList(f);case 7:var l=!0,h=new JU.BS,g=new java.util.Hashtable,p=b.getList();a=a[0].asString();for(b=p.size();0<--b;)if(e=p.get(b).getMap(),null==e||null==e.get(a))return!1;b=0;for(j=p.size();b<j;b++){e=p.get(b).getMap();if(null==e)return!1;d&&(e=JS.SV.deepCopy(e,!0,!1));var z=e.remove(a);l&&(2==z.tok&&0<=z.intValue&&1E4>=z.intValue?h.set(z.intValue):l=!1);z=z.asString();if(g.containsKey(z))return!1;g.put(z,JS.SV.newV(6,e))}if(l&&
(b=h.nextSetBit(0),(new Boolean(0==b|1==b)).valueOf()&&(d=h.cardinality(),h.nextClearBit(b)==d+b))){j=Array(d);for(g=g.entrySet().iterator();g.hasNext()&&((f=g.next())||1);)j[Integer.parseInt(f.getKey())-b]=f.getValue();f=new JU.Lst;for(b=0;b<d;b++)f.addLast(j[b]);return c.addXList(f)}return c.addXObj(g)}return!1}j=Array(a.length);for(b=j.length;0<=--b;)j[b]=JS.SV.newT(a[b]);return c.addXAV(j)},"JS.ScriptMathProcessor,~A,~B");m(k,"evaluateBin",function(c,a){var b=a.length;if(3>b||5<b)return!1;var d=
c.getX(),e=13==d.tok;if(!e&&7!=d.tok)return c.addX(d);var f=JS.SV.fValue(a[0]),g=JS.SV.fValue(a[1]),h=JS.SV.fValue(a[2]),j=4<=b&&1073742335==a[b-1].tok,b=(5==b||4==b&&!j)&&1073742334!=a[3].tok?JS.SV.sValue(a[3]):null,l=null;if(e)d=d.value;else{e=d.getList();d=u(e.size(),0);null!=b&&(l=JU.AU.createArrayOfHashtable(e.size()));try{for(var p=e.size();0<=--p;)d[p]=JS.SV.fValue(null==b?e.get(p):(l[p]=e.get(p).getMap()).get(b))}catch(z){if(N(z,Exception))return!1;throw z;}}for(var g=Math.max(W(Math.floor((g-
f)/h+0.01)),1),e=O(g,0),q=d.length,p=0;p<q;p++){var t=W(Math.floor((d[p]-f)/h));if(!(0>t||t>=g))if(e[t]++,null!=b){var r=l[p];if(null!=r){r.put("_bin",JS.SV.newI(t));var n=f+h*t,k=n+h;r.put("_binMin",JS.SV.newF(0==t?-3.4028235E38:n));r.put("_binMax",JS.SV.newF(t==g-1?3.4028235E38:k))}}}if(j){j=new JU.Lst;for(p=0;p<g;p++)j.addLast(u(-1,[f+h*p,e[p]]));return c.addXList(j)}return c.addXAI(e)},"JS.ScriptMathProcessor,~A");m(k,"evaluateCache",function(c,a){return 0<a.length?!1:c.addXMap(this.vwr.fm.cacheList())},
"JS.ScriptMathProcessor,~A");m(k,"evaluateColor",function(c,a){var b=0<a.length?JS.SV.sValue(a[0]):"",d=b.startsWith("$");if(2==a.length&&b.equalsIgnoreCase("TOHSL"))return c.addXPt(JU.CU.rgbToHSL(JU.P3.newP(8==a[1].tok?JS.SV.ptValue(a[1]):JU.CU.colorPtFromString(a[1].asString())),!0));if(2==a.length&&b.equalsIgnoreCase("TORGB")){var e=JU.P3.newP(8==a[1].tok?JS.SV.ptValue(a[1]):JU.CU.colorPtFromString(a[1].asString()));return c.addXPt(8==a[1].tok?JU.CU.hslToRGB(e):e)}if(4==a.length&&(1073742335==
a[3].tok||1073742334==a[3].tok)){var e=JU.P3.newP(8==a[0].tok?JS.SV.ptValue(a[0]):JU.CU.colorPtFromString(a[0].asString())),f=JU.P3.newP(8==a[1].tok?JS.SV.ptValue(a[1]):JU.CU.colorPtFromString(a[1].asString())),g=1073742335==a[3].tok;g&&(e=JU.CU.rgbToHSL(e,!1),f=JU.CU.rgbToHSL(f,!1));var h=new JU.SB,f=JU.V3.newVsub(f,e),j=a[2].asInt();2>j&&(j=20);f.scale(1/(j-1));for(b=0;b<j;b++)h.append(JU.Escape.escapeColor(JU.CU.colorPtToFFRGB(g?JU.CU.hslToRGB(e):e))),e.add(f);return c.addXStr(h.toString())}j=
d?null:this.vwr.cm.getColorEncoder(b);if(!d&&null==j)return c.addXStr("");e=1<a.length?JS.SV.fValue(a[1]):3.4028235E38;f=2<a.length?JS.SV.fValue(a[2]):3.4028235E38;g=3<a.length?JS.SV.fValue(a[3]):3.4028235E38;h=3.4028235E38!=g||3.4028235E38!=e&&3.4028235E38==f;3.4028235E38==f&&0==b.length&&(g=e,f=this.vwr.getCurrentColorRange(),e=f[0],f=f[1]);if(d){j=b.substring(1);j=y(-1,[j,null]);if(!this.vwr.shm.getShapePropertyData(24,"colorEncoder",j))return c.addXStr("");j=j[1]}else j.setRange(e,f,e>f);b=j.getColorKey();
return h?c.addXPt(JU.CU.colorPtFromInt(j.getArgb(3.4028235E38==f?e:g),null)):c.addX(JS.SV.getVariableMap(b))},"JS.ScriptMathProcessor,~A");m(k,"evaluateCompare",function(c,a){var b=a.length;if(2>b||5<b)return!1;var d,e=1073742335==a[b-1].tok;(e||1073742334==a[b-1].tok)&&b--;var f=JS.SV.sValue(a[b-1]),g=f.equalsIgnoreCase("stddev"),h=f.equalsIgnoreCase("ISOMER"),j=h&&e,l=f.equalsIgnoreCase("BONDS"),e=7==a[0].tok&&7==a[1].tok,p=3<=b?a[2].getList():null,z=null==p&&!e&&!h&&b>(g?3:2),e=10==a[0].tok?a[0].value:
null,q=10==a[1].tok?a[1].value:null,t=null==e?JS.SV.sValue(a[0]):"",r=null==q?JS.SV.sValue(a[1]):"";d=NaN;try{if(l){if(4!=b)return!1;t=JS.SV.sValue(a[2]);z=t.equalsIgnoreCase("SMILES");try{z&&(t=this.vwr.getSmiles(e))}catch(n){if(N(n,Exception))this.e.evalError(n.getMessage(),null);else throw n;}var k=this.e.getSmilesExt().getFlexFitList(e,q,t,!z);return null==k?c.addXStr(""):c.addXAF(k)}if(h){if(3!=b)return!1;if(null==e&&null==q){var m=this.vwr.getSmilesMatcher().getRelationship(t,r).toUpperCase();
return c.addXStr(m)}var v=null==e?this.vwr.getSmilesMatcher().getMolecularFormula(t,!1,!1):JU.JmolMolecule.getMolecularFormulaAtoms(this.vwr.ms.at,e,null,!1),ra=null==q?this.vwr.getSmilesMatcher().getMolecularFormula(r,!1,!1):JU.JmolMolecule.getMolecularFormulaAtoms(this.vwr.ms.at,q,null,!1);if(!v.equals(ra))return c.addXStr("NONE");null!=e&&(t=this.e.getSmilesExt().getSmilesMatches("/strict///",null,e,null,1,!0,!1));var A;null==q?A=0<this.vwr.getSmilesMatcher().areEqual(r,t):(r=this.e.getSmilesExt().getSmilesMatches("/strict///",
null,q,null,1,!0,!1),A=0<=this.e.getSmilesExt().getSmilesMatches("/strict///"+t,null,q,null,1,!0,!1).nextSetBit(0));if(!A){var E=t+r;if(0<=E.indexOf("/")||0<=E.indexOf("\\")||0<=E.indexOf("@")){if(0<=t.indexOf("@")&&(null!=q||0<=r.indexOf("@"))&&0>t.indexOf("@SP")){var Y=t.toLowerCase().indexOf("invertstereo"),t=0<=Y?"/strict/"+t.substring(0,Y)+t.substring(Y+12):"/invertstereo strict/"+t;if(A=null==q?0<this.vwr.getSmilesMatcher().areEqual(t,r):0<=this.e.getSmilesExt().getSmilesMatches(t,null,q,null,
1,!0,!1).nextSetBit(0))return c.addXStr("ENANTIOMERS")}null==q?A=0<this.vwr.getSmilesMatcher().areEqual("/nostereo/"+r,t):(m=this.e.getSmilesExt().getSmilesMatches("/nostereo/"+t,null,q,null,1,!0,!1),A=0<=m.nextSetBit(0));if(A)return c.addXStr("DIASTEREOMERS")}m="CONSTITUTIONAL ISOMERS";if(j){var w=this.vwr.getInchi(e,null,null);null!=w&&w.equals(this.vwr.getInchi(q,null,null))&&(m="TAUTOMERS")}return c.addXStr(m)}if(null==e||null==q)return c.addXStr("IDENTICAL");d=this.e.getSmilesExt().getSmilesCorrelation(e,
q,t,null,null,null,null,!1,null,null,!1,1);return c.addXStr(0.2>d?"IDENTICAL":"IDENTICAL or CONFORMATIONAL ISOMERS (RMSD="+d+")")}var x=new JU.M4,w=A=null;if(z){if(null==e||null==q)return!1;var f=JS.SV.sValue(a[2]),u=f.equalsIgnoreCase("MAP"),z=f.equalsIgnoreCase("SMILES"),y=u||f.equalsIgnoreCase("SMARTS");if(z||y)f=b>(g?4:3)?JS.SV.sValue(a[3]):null;var H="H".equalsIgnoreCase(f)||"allH".equalsIgnoreCase(f)||"bestH".equalsIgnoreCase(f),M=!H&&("polyhedra".equalsIgnoreCase(f)||"polyhedron".equalsIgnoreCase(f));
if(M)d=this.e.getSmilesExt().mapPolyhedra(e.nextSetBit(0),q.nextSetBit(0),z,x);else{A=new JU.Lst;var w=new JU.Lst,E="all".equalsIgnoreCase(f)||"allH".equalsIgnoreCase(f),s="best".equalsIgnoreCase(f)||"bestH".equalsIgnoreCase(f);"stddev".equals(f)&&(f=null);var B=f;if(null==f||H||E||s){if(!u&&!z||H&&M)return!1;B="/noaromatic"+(E||s?"/":" nostereo/")+this.e.getSmilesExt().getSmilesMatches(H?"H":"",null,e,null,32769,!0,!1)}else E=!0;d=this.e.getSmilesExt().getSmilesCorrelation(e,q,B,A,w,x,null,u,null,
null,s,(z?1:2)|(!E&&!s?8:0));if(u){var V=A.size();if(0==V)return c.addXStr("");for(var ca=W(w.size()/V),m=new JU.Lst,Y=B=0;B<ca;B++){var R=JU.AU.newInt2(V);m.addLast(R);for(f=0;f<V;f++,Y++)R[f]=O(-1,[A.get(f).i,w.get(Y).i])}return E?c.addXList(m):0<m.size()?c.addXAII(m.get(0)):c.addXStr("")}}}else{A=this.e.getPointVector(a[0],0);w=this.e.getPointVector(a[1],0);if(null==A||null==w)return!1;if(null!=p){b--;var G=p.size();if(G>A.size()||G!=w.size())return!1;for(var da=new JU.Lst,B=0;B<G;B++)da.addLast(A.get(p.get(B).intValue-
1));A=da}switch(b){case 2:break;case 3:if(g)break;default:return!1}A.size()==w.size()&&(J.api.Interface.getInterface("JU.Eigen",this.vwr,"script"),d=JU.Measure.getTransformMatrix4(A,w,x,null))}return g||Float.isNaN(d)?c.addXFloat(d):c.addXM4(x.round(1E-7))}catch(I){if(N(I,Exception))return this.e.evalError(null==I.getMessage()?I.toString():I.getMessage(),null),!1;throw I;}},"JS.ScriptMathProcessor,~A");m(k,"evaluateConnected",function(c,a,b,d){if(5<a.length)return!1;var e=-2147483648,f=2147483647,
g=0,h=3.4028235E38,j=65535,l=null,p=null,z=!1,q=!1;switch(b){case 1275203608:p=-2147483648;g=null;if(0<a.length)switch(a[0].tok){case 2:p=a[0].intValue;break;case 4:g=JS.SV.sValue(a[0])}1275203608==d&&(l=JS.SV.getBitSet(c.getX(),!0));l=y(-1,[Integer.$valueOf(p),g,l]);this.vwr.shm.getShapePropertyData(21,"getCenters",l)||(l[1]=null);return c.addXBs(null==l[1]?new JU.BS:l[1]);case 1228931586:l=c.getX();if(10!=l.tok||1!=a.length||10!=a[0].tok)return!1;l=l.value;p=a[0].value;a=new JU.Lst;g=this.vwr.ms.at;
for(d=l.nextSetBit(0);0<=d;d=l.nextSetBit(d+1)){b=0;h=g[d].bonds;for(q=h.length;0<=--q;)p.get(h[q].getOtherAtom(g[d]).i)&&b++;a.addLast(Integer.$valueOf(b))}return c.addXList(a)}for(d=0;d<a.length;d++){var t=a[d];switch(t.tok){case 10:if((q=x(t.value,"JM.BondSet"))&&null!=l)return!1;if(null==l)l=t.value;else if(null==p)p=t.value;else return!1;break;case 4:b=JS.SV.sValue(t);j=b.equalsIgnoreCase("hbond")?30720:JU.Edge.getBondOrderFromString(b);if(131071==j)return!1;break;case 3:z=!0;default:b=t.asInt();
t=t.asFloat();if(2147483647!=f)return!1;-2147483648==e?(e=Math.max(b,0),g=t):(f=b,h=t)}}-2147483648==e?(e=1,f=100,g=0.1,h=1E8):2147483647==f&&(f=e,h=g,g=0.1);null==l&&(l=this.vwr.getAllAtoms());z&&null==p&&(p=l);return null!=p?(a=new JU.BS,this.vwr.makeConnections(g,h,j,1086324745,l,p,a,q,!1,0),c.addX(JS.SV.newV(10,JM.BondSet.newBS(a)))):c.addXBs(this.vwr.ms.getAtomsConnected(e,f,j,l))},"JS.ScriptMathProcessor,~A,~N,~N");m(k,"evaluateContact",function(c,a){if(1>a.length||3<a.length)return!1;var b=
0,d=100;switch(a[0].tok){case 3:case 2:d=JS.SV.fValue(a[b++]);break;case 10:break;default:return!1}if(b==a.length||!x(a[b].value,"JU.BS"))return!1;var e=JU.BSUtil.copy(a[b++].value),b=b<a.length?JU.BSUtil.copy(a[b].value):null,d=new J.atomdata.RadiusData(null,10<d?d/100:d,10<d?J.atomdata.RadiusData.EnumType.FACTOR:J.atomdata.RadiusData.EnumType.OFFSET,J.c.VDW.AUTO),b=this.setContactBitSets(e,b,!0,NaN,d,!1);b.or(e);return c.addXBs(b)},"JS.ScriptMathProcessor,~A");m(k,"evaluateData",function(c,a){var b=
0==a.length?"":JS.SV.sValue(a[0]);switch(a.length){case 0:case 1:break;case 2:case 3:if(10==a[0].tok)return c.addXStr(this.vwr.getModelFileData(b,JS.SV.sValue(a[1]),3==a.length&&JS.SV.bValue(a[2])));break;case 4:var b=a[1].asInt(),d=a[2].asInt(),e=a[3].asInt(),b=JU.Parser.parseFloatArrayFromMatchAndField(JS.SV.sValue(a[0]),null,0,0,null,b,d,null,e);return c.addXStr(JU.Escape.escapeFloatA(b,!1));default:return!1}if(0==b.indexOf("data2d_"))return b=this.vwr.getDataObj(b,null,2),null==b?c.addXStr(""):
2==a.length&&2==a[1].tok?(d=a[1].intValue,0>d&&(d+=b.length),0<=d&&d<b.length?c.addXStr(JU.Escape.escapeFloatA(b[d],!1)):c.addXStr("")):c.addXStr(JU.Escape.escapeFloatAA(b,!1));if(b.endsWith("*"))return c.addXList(this.vwr.getDataObj(b,null,0));if(0==b.indexOf("property_"))return b=this.vwr.getDataObj(b,null,1),null==b?c.addXStr(""):c.addXStr(JU.Escape.escapeFloatA(b,!1));b=this.vwr.getDataObj(b,null,-1);return c.addXStr(null==b||2>b.length?"":""+b[1])},"JS.ScriptMathProcessor,~A");m(k,"evaluateDotDist",
function(c,a,b,d){var e=1275069443==b,f,g,h=null;switch(a.length){case 2:if(2147483647==d){f=a[0];g=a[1];break}h=a[1];case 1:f=c.getX();g=a[0];break;case 0:if(e){f=c.getX();g=JS.SV.getVariable(new JU.P3);break}default:return!1}a=NaN;try{if(1275069442==b){var j=JU.P3.newP(c.ptValue(f,null));j.cross(j,c.ptValue(g,null));return c.addXPt(j)}var l=7==g.tok?null:c.ptValue(g,null),p=this.e.planeValue(g);if(e){b=-2147483648==d?0:d&480;var j=32==b||64==b,z=480==b;switch(f.tok){case 7:case 10:var q=10==f.tok,
t=10==g.tok,r=8==g.tok,n=q?f.value:null,m=t?g.value:null,k=q?null:f.getList(),v=t?null:g.getList(),x=j&&null!=h&&h.asBoolean();switch(g.tok){case 10:case 7:case 8:var A=this.vwr.ms.at;if(x){var E=NaN,y=2147483647;if(q){for(var w=n.nextSetBit(0);0<=w;w=n.nextSetBit(w+1)){var T=r?A[w].distanceSquared(l):this.e.getBitsetProperty(m,v,d,A[w],p,f.value,null,!1,f.index,!1).floatValue();if(!(32==b?T>=E:T<=E))E=T,y=w}return c.addXBs(2147483647==y?new JU.BS:JU.BSUtil.newAndSetBit(y))}for(w=k.size();0<=--w;){var O=
JS.SV.ptValue(k.get(w)),T=r?O.distanceSquared(l):this.e.getBitsetProperty(m,v,d,O,p,f.value,null,!1,2147483647,!1).floatValue();if(!(32==b?T>=E:T<=E))E=T,y=w}return c.addXInt(y)}if(z){if(null==m){for(var P=u(n.cardinality(),0),E=0,w=n.nextSetBit(0);0<=w;w=n.nextSetBit(w+1),E++)P[E]=A[w].distance(l);return c.addXAF(P)}y=u(n.cardinality(),m.cardinality(),0);E=0;for(w=n.nextSetBit(0);0<=w;w=n.nextSetBit(w+1),E++){d=0;for(var H=m.nextSetBit(0);0<=H;H=m.nextSetBit(H+1),d++)y[E][d]=A[w].distance(A[H])}return c.addXAFF(y)}if(j){P=
u(q?n.cardinality():k.size(),0);if(q){w=n.nextSetBit(0);for(E=0;0<=w;w=n.nextSetBit(w+1))P[E++]=this.e.getBitsetProperty(m,v,d,A[w],p,f.value,null,!1,f.index,!1).floatValue();return c.addXAF(P)}for(w=P.length;0<=--w;)P[w]=this.e.getBitsetProperty(m,v,d,JS.SV.ptValue(k.get(w)),p,null,null,!1,2147483647,!1).floatValue();return c.addXAF(P)}return c.addXObj(this.e.getBitsetProperty(n,k,d,l,p,f.value,null,!1,f.index,!1))}}}var M=c.ptValue(f,null),s=this.e.planeValue(f);e?a=null!=p&&null!=h?JU.Measure.directedDistanceToPlane(M,
p,JS.SV.ptValue(h)):null==s?null==p?l.distance(M):JU.Measure.distanceToPlane(p,M):JU.Measure.distanceToPlane(s,l):null!=s&&null!=p?a=s.x*p.x+s.y*p.y+s.z*p.z+s.w*p.w:(null!=s?M=JU.P3.new3(s.x,s.y,s.z):null!=p&&(l=JU.P3.new3(p.x,p.y,p.z)),a=M.dot(l))}catch(B){if(!N(B,Exception))throw B;}return c.addXFloat(a)},"JS.ScriptMathProcessor,~A,~N,~N");m(k,"evaluateHelix",function(c,a){if(1>a.length||5<a.length)return!1;var b=2<a.length?3:1,d=b>=a.length?"array":JS.SV.sValue(a[b]),b=JS.T.getTokFromName(d);if(2<
a.length){var e=c.ptValue(a[0],null),f=c.ptValue(a[1],null);if(0==b||9!=a[2].tok||null==e||null==f)return!1;var g=JU.Quat.newP4(a[2].value),g=JU.Measure.computeHelicalAxis(e,f,g);return null==g?!1:c.addXObj(JU.Escape.escapeHelical(d,b,e,f,g))}d=x(a[0].value,"JU.BS")?a[0].value:this.vwr.ms.getAtoms(1094715412,Integer.$valueOf(a[0].asInt()));switch(b){case 134217751:case 1073741854:case 1665140738:return c.addXObj(this.getHelixData(d,b));case 134217729:return c.addXFloat(this.getHelixData(d,134217729).floatValue());
case 135176:case 1745489939:return c.addXObj(this.getHelixData(d,b));case 1275068418:g=this.getHelixData(d,1073742001);if(null==g)break;return c.addXAS(g)}return!1},"JS.ScriptMathProcessor,~A");m(k,"getHelixData",function(c,a){var b=c.nextSetBit(0);return 0>b?"null":this.vwr.ms.at[b].group.getHelixData(a,this.vwr.getQuaternionFrame(),this.vwr.getInt(553648142))},"JU.BS,~N");m(k,"evaluateInChI",function(c,a){var b=c.getX(),d=0<a.length?JS.SV.sValue(a[0]):"fixedh?";d.toLowerCase().equals("standard")&&
(d="");var e=JS.SV.getBitSet(b,!0),b=null==e?JS.SV.sValue(b):null,e=this.vwr.getInchi(e,b,d);return 0<=d.indexOf("model")?c.addXMap(this.vwr.parseJSONMap(e)):c.addXStr(e)},"JS.ScriptMathProcessor,~A");m(k,"evaluateFind",function(c,a){var b=c.getX(),d=7==b.tok,e=10==b.tok,f=0==a.length,g=0==a.length?0:a[0].tok,h=f||4!=g?"":JS.SV.sValue(a[0]),j=1<a.length&&1073742334==a[1].tok,l=0==g?0:a[a.length-1].tok,p=0==l?JS.SV.vF:a[a.length-1],z=!d&&1073742335==l,l=d&&4==p.tok&&"index".equalsIgnoreCase(JS.SV.sValue(p)),
q=1<a.length&&1073742335!=a[1].tok&&1073742334!=a[1].tok&&10!=a[1].tok?JS.SV.sValue(a[1]):"",t=!d&&!j&&h.equalsIgnoreCase("SEQUENCE"),r=!d&&!j&&h.equalsIgnoreCase("SEQ");if(h.toUpperCase().startsWith("SMILES/")){h.endsWith("/")||(h+="/");var n=h.substring(6)+"//";JV.JC.isSmilesCanonical(n)?(q="SMILES",h="CHEMICAL"):(h="SMILES",q=n+q)}else h.toUpperCase().startsWith("SMARTS/")&&(h.endsWith("/")||(h+="/"),q=h.substring(6)+(0==q.length?"//":q),h="SMARTS");var m=null,k=!1,v=0<a.length&&134218753==a[0].tok;
if(!v&&4==b.tok)switch(a.length){case 1:if(b.value.startsWith("InChI=")&&h.equalsIgnoreCase("SMILES"))return c.addXStr(this.vwr.getInchi(null,b.value,"SMILES"+q));k=!h.equalsIgnoreCase("SMILES");break;case 2:case 3:j||z?k=!0:b.value.startsWith("InChI=")?h.equalsIgnoreCase("SMARTS")?m=this.vwr.getInchi(null,b.value,"SMILES"):k=!0:3>=q.length&&0==q.$replace("m"," ").$replace("i"," ").$replace("v"," ").trim().length&&(k=!0)}var x=!k&&h.equalsIgnoreCase("SMILES"),A=v||!k&&h.equalsIgnoreCase("SMARTS"),
E=!d&&!k&&h.equalsIgnoreCase("CHEMICAL"),u=!d&&!k&&h.equalsIgnoreCase("MF"),w=!d&&!k&&h.equalsIgnoreCase("CELLFORMULA"),T=e&&!d&&h.equalsIgnoreCase("INCHI"),W=e&&!d&&h.equalsIgnoreCase("INCHIKEY"),P=!x&&!A&&10==g&&0<=q.toLowerCase().indexOf("map"),k=!x&&!A&&(10==b.tok||8==b.tok||7==b.tok)&&h.toLowerCase().startsWith("equivalent");try{if(k)switch(b.tok){case 10:return c.addXBs(this.vwr.ms.getSymmetryEquivAtoms(b.value,null,null));case 8:return c.addXList(this.vwr.getSymmetryEquivPoints(JU.Point3fi.newPF(b.value,
0),h+q));case 7:for(var H=new JU.Lst,M=b.getList(),s=0,B=M.size();s<B;s++){var V=JS.SV.ptValue(M.get(s));if(null==V)return!1;H.addLast(JU.Point3fi.newPF(V,0))}return c.addXList(this.vwr.getSymmetryEquivPointList(H,h+q))}else if(T||W)return W&&(q+=" key"),c.addXStr(this.vwr.getInchi(JS.SV.getBitSet(b,!0),null,q));if(E){var ca=e?b.value:null,R=null==ca?JS.SV.sValue(b):this.vwr.getOpenSmiles(ca),R=(0==R.length?"":this.vwr.getChemicalInfo(R,q.toLowerCase(),ca)).trim();R.startsWith("InChI")&&(R=JU.PT.rep(JU.PT.rep(R,
"InChI=",""),"InChIKey=",""));return c.addXStr(R)}if(x||A||e){var e=P?0:x||A?2:1,G=e<a.length&&10==a[e].tok?a[e++].value:null,da=4==p.tok&&"bonds".equalsIgnoreCase(JS.SV.sValue(p)),M=da||z,H=!1,e=null;switch(b.tok){case 134218753:H=!0;case 7:case 4:null==m&&!d&&(m=b.value);if((x||A)&&1==a.length&&null==q||null!=G)return!1;if(q.equalsIgnoreCase("mf"))e=this.vwr.getSmilesMatcher().getMolecularFormula(m.toString(),A,z);else{var I=v?a[0].value:q,C=!0,B=!1;if(v)switch(a.length){case 3:C=JS.SV.bValue(a[2]);
case 2:B=JS.SV.bValue(a[1])}else switch(a.length){case 4:C=JS.SV.bValue(a[3]);case 3:B=JS.SV.bValue(a[2])}var X=!v&&I.equals("chirality"),G=!B&&(!C||!A&&!X);try{if(d){for(var Q=b.getList(),F=Array(Q.size()),s=F.length;0<=--s;)F[s]=Q.get(s).value;m=F}e=this.e.getSmilesExt().getSmilesMatches(I,m,null,null,A?2:1,!B,!C);if(d)return c.addXObj(e)}catch(U){if(N(U,Exception))return System.out.println(U.getMessage()),c.addXInt(-1);throw U;}var ja=X?1:(JU.AU.isAI(e),e.length);if(0==ja&&"MF_FAILED"!==this.vwr.getSmilesMatcher().getLastException()&&
(H||0>m.toLowerCase().indexOf("noaromatic")&&0>m.toLowerCase().indexOf("strict")))e=this.e.getSmilesExt().getSmilesMatches(I,m,null,null,16|(A?2:1),!B,!C);if(G)return c.addXInt(!C&&0<ja?1:ja)}break;case 10:C=b.value;if(h.equalsIgnoreCase("spacegroup"))return F=this.vwr.findSpaceGroup(null,C,null,null,null,null,"parent".equals(q.toLowerCase())?8:0),null!=F&&(n=F.toString(),F=JU.PT.rep(n.substring(n.indexOf(" ")+1)," #","\t")),c.addXStr(F.toString());if(h.equalsIgnoreCase("crystalClass"))return B=C.nextSetBit(0),
s=null,2!=a.length&&(s=new JU.BS,s.set(B)),c.addXList(this.vwr.ms.generateCrystalClass(B,null!=s?this.vwr.ms.getAtomSetCenter(s):10==p.tok?this.vwr.ms.getAtomSetCenter(p.value):JS.SV.ptValue(p)));if(u&&0!=q.length)return c.addXBs(JU.JmolMolecule.getBitSetForMF(this.vwr.ms.at,C,q));if(u||w)return c.addXStr(this.vwr.getFormulaForAtoms(C,u?"MF":"CELLFORMULA",z));if(t||r){var Z=p.asString().equalsIgnoreCase("H"),M=(new Boolean(M|Z)).valueOf();return c.addXStr(this.vwr.getSmilesOpt(C,-1,-1,(M?7340032|
(Z?9437184:0):0)|(r?34603008:1048576),null))}if(P){var K=null,B=Q=I=null,L=3==a.length?JS.SV.sValue(p):null,$=null==L||L.equals("%i")||L.equals("number")?"i":L.equals("%a")||L.equals("name")?"a":L.equals("%D")||L.equals("index")?"D":"?";null==L&&(L="number");F=null;q=q.$replace("map","").trim();h=this.vwr.getSmilesOpt(C,0,0,0,q);if(C.cardinality()!=G.cardinality())F="atom sets are not the same size";else try{0<q.length&&(h="/"+q+"/"+h);var I=this.vwr.getSmilesMatcher().getCorrelationMaps(h,this.vwr.ms.at,
this.vwr.ms.ac,C,137)[0],aa=this.vwr.getSmilesMatcher().getCorrelationMaps(h,this.vwr.ms.at,this.vwr.ms.ac,G,137);if(0<aa.length){K=O(C.length(),0);for(s=K.length;0<=--s;)K[s]=-1;Q=aa[0];for(s=I.length;0<=--s;)K[I[s]]=Q[s];var B=y(I.length,2,null),ka=JU.BS.copy(C);ka.or(G);var ea="?"==$?Array(ka.length()):null;null!=ea&&(ea=this.e.getCmdExt().getBitsetIdentFull(ka,L,!1,2147483647,!1,ea));for(var ha=this.vwr.ms.at,p=0,s=C.nextSetBit(0);0<=s;s=C.nextSetBit(s+1)){var fa=K[s];if(-1!=fa){var ga;switch($.charCodeAt(0)){case 97:ga=
y(-1,[ha[s].getAtomName(),ha[fa].getAtomName()]);break;case 105:ga=y(-1,[Integer.$valueOf(ha[s].getAtomNumber()),Integer.$valueOf(ha[fa].getAtomNumber())]);break;case 68:ga=y(-1,[Integer.$valueOf(s),Integer.$valueOf(fa)]);break;default:ga=y(-1,[ea[s],ea[fa]])}B[p++]=ga}}}}catch(la){if(N(la,Exception))F=la.getMessage();else throw la;}var S=new java.util.Hashtable;S.put("BS1",C);S.put("BS2",G);S.put("SMILES",h);null==F?(S.put("SMILEStoBS1",I),S.put("SMILEStoBS2",Q),S.put("BS1toBS2",K),S.put("MAP1to2",
B),S.put("key",L)):S.put("error",F);return c.addXMap(S)}if(x||A)h=1<a.length&&10==a[1].tok?this.vwr.getSmilesOpt(a[1].value,0,0,0,q):q;q=q.toUpperCase();if(0<=q.indexOf("INCHI"))return c.addXStr(this.vwr.getInchi(C,null,"SMILES/"+q));if(q.equals("MF"))m=this.e.getSmilesExt().getSmilesMatches("",null,C,G,1,!0,!1),e=this.vwr.getSmilesMatcher().getMolecularFormula(m.toString(),!1,z);else if(da)K=this.vwr.getSmilesMatcher().getCorrelationMaps(h,this.vwr.ms.at,this.vwr.ms.ac,C,(x?1:2)|8),e=0<K.length?
this.vwr.ms.getDihedralMap(K[0]):O(0,0);else if(q.equals("MAP"))e=K=this.vwr.getSmilesMatcher().getCorrelationMaps(h,this.vwr.ms.at,this.vwr.ms.ac,C,(x?1:2)|144);else{var ia=(x?0<=q.indexOf("OPEN")?5:1:2)|(z&&0==h.length?22020096:0);x&&0<=q.indexOf("/ALL/")&&(ia|=32768);if(0<=q.indexOf("/MOLECULE/")){for(var ma=this.vwr.ms.getMolecules(),ba=new JU.Lst,s=0;s<ma.length;s++)if(ma[s].atomList.intersects(C)){var pa=this.e.getSmilesExt().getSmilesMatches(h,null,ma[s].atomList,G,ia,!z,!1);pa.isEmpty()||
ba.addLast(pa)}e=ba}else e=this.e.getSmilesExt().getSmilesMatches(h,null,C,G,ia,!z,!1)}}null==e&&this.e.invArg();return c.addXObj(e)}}catch(na){if(N(na,Exception))this.e.evalError(na.getMessage(),null);else throw na;}C=new JU.BS;G=d?b.getList():null;if(d&&4!=g&&0!=g){b=a[0];s=0;for(B=G.size();s<B;s++)JS.SV.areEqual(G.get(s),b)&&C.set(s);e=O(C.cardinality(),0);p=0;for(s=C.nextSetBit(0);0<=s;s=C.nextSetBit(s+1))e[p++]=s+1;return c.addXAI(e)}g=0<=q.indexOf("v");s=0<=q.indexOf("i")||j;j=0<=q.indexOf("m");
q=0==h.length;k=!q&&!k&&a.length==(l?3:2);if(d||k){t=k?this.getPatternMatcher():null;I=null;if(k)try{I=t.compile(h,s)}catch(oa){if(N(oa,Exception))this.e.evalError(oa.toString(),null);else throw oa;}Q=q?null:JS.SV.strListValue(b);t=q?G.size():Q.length;JU.Logger.debugging&&JU.Logger.debug("finding "+h);B=0;K=null;b=j?new JU.Lst:null;L="";for(s=0;s<t;s++){if(q)switch(F=G.get(s),F.tok){case 6:F=F.getMap().isEmpty()!=f;break;case 7:F=0==F.getList().size()!=f;break;case 4:F=0==F.asString().length!=f;break;
default:F=!0}else k?(L=Q[s],K=I.matcher(L),F=K.find()):F=0<=JS.SV.sValue(G.get(s)).indexOf(h);if(j&&F||!j&&F==!g)B++,C.set(s),j&&b.addLast(g?L.substring(0,K.start())+L.substring(K.end()):K.group())}if(!d)return j?c.addXStr(1==b.size()?b.get(0):""):g?c.addXBool(1==B):j?c.addXStr(0==B?"":K.group()):c.addXInt(0==B?0:K.start()+1);if(l){H=new JU.Lst;for(s=C.nextSetBit(0);0<=s;s=C.nextSetBit(s+1))H.addLast(JS.SV.newI(s+1));return c.addXList(H)}if(j){d=Array(B);if(0<B)for(s=Q.length;0<=--s;)C.get(s)&&(--B,
d[B]=j?b.get(B):Q[s]);return c.addXAS(d)}d=new JU.Lst;for(s=C.nextSetBit(0);0<=s;s=C.nextSetBit(s+1))d.addLast(G.get(s));return c.addXList(d)}return t?c.addXStr(this.vwr.getJBR().toStdAmino3(JS.SV.sValue(b))):c.addXInt(JS.SV.sValue(b).indexOf(h)+1)},"JS.ScriptMathProcessor,~A");m(k,"evaluateGetProperty",function(c,a,b,d){var e=a.length,f=d&&1275082241==b,g=d&&1275068725==b,h=1275068446==b,j=0,l=0==e?0:a[0].tok;if(2==e&&(7==l||6==l||14==l))return c.addXObj(this.vwr.extractProperty(a[0].value,a[1].value.toString(),
-1));var p=d&&1==e&&10==a[0].tok?a[0].value:null,k=null==p&&0<e?JS.SV.sValue(a[j++]):"",l=k,q=l.toLowerCase();!f&&0>q.indexOf("[select ")&&(l=q);var t=!1;l.equals("json")&&e>j&&(t=!0,l=JS.SV.sValue(a[j++]));var m=null;if(d){m=c.getX();switch(m.tok){case 10:break;case 4:var n=m.value,e=Array(3);n.startsWith("$")?(n=n.substring(1),a=this.vwr.shm.getShapeIdFromObjectName(n),0<=a&&(e[0]=n,this.vwr.shm.getShapePropertyData(a,"index",e),null!=e[1]&&!k.equals("index")&&(n=e[1].intValue(),e[1]=this.vwr.shm.getShapePropertyIndex(a,
k.intern(),n)))):(a=JV.JC.shapeTokenIndex(JS.T.getTokFromName(n)),0<=a&&(e[0]=k,e[1]=Integer.$valueOf(-1),this.vwr.shm.getShapePropertyData(a,k.intern(),e)));return null==e[1]?c.addXStr(""):c.addXObj(e[1]);case 7:if(g){h=m.getList();if(0==e)return c.addXObj(this.getMinMax(h,1275068725,!0));d=new java.util.Hashtable;l=1<e?JS.SV.sValue(a[e-1]):null;null!=l&&e--;q=Array(e);for(n=0;n<e;n++)q[n]=JS.SV.sValue(a[n]);n=0;for(t=h.size();n<t;n++)if(j=h.get(n),6==j.tok){k=j.getMap();a="";for(m=0;m<e;m++)p=k.get(q[m]),
a+=(0==m?"":l)+JS.SV.sValue(p);k=d.get(a);null==k&&d.put(a,k=JS.SV.newV(7,new JU.Lst));k.getList().addLast(j)}return c.addXMap(d)}if(null!=p){e=m.getList();a=new JU.Lst;for(n=p.nextSetBit(0);0<=n;n=p.nextSetBit(n+1))a.addLast(e.get(n));return c.addXList(a)}default:if(1275068725==b&&6==m.tok){d=new java.util.Hashtable;for(e=m.getMap().entrySet().iterator();e.hasNext()&&((n=e.next())||1);)a=n.getKey(),j=n.getValue().asString(),h=d.get(j),null==h&&d.put(j,h=new JU.Lst),h.addLast(a);if("count".equals(q))for(e=
d.entrySet().iterator();e.hasNext()&&((n=e.next())||1);)n.setValue(Integer.$valueOf(n.getValue().size()));return c.addXMap(d)}f&&(l="[SELECT "+l+"]");return c.addXObj(this.vwr.extractProperty(m,l,-1))}!q.startsWith("bondinfo")&&(!q.startsWith("atominfo")&&!q.startsWith("modelkitinfo"))&&(l="atomInfo."+l)}n="";if(l.equalsIgnoreCase("fileContents")&&2<=e){j=JS.SV.sValue(a[1]);for(n=2;n<e;n++)j+="|"+JS.SV.sValue(a[n]);n=j;j=e}else if(e>j)switch(a[j].tok){case 10:n=a[j++].value;l.equalsIgnoreCase("bondInfo")&&
(e>j&&10==a[j].tok)&&(n=y(-1,[n,a[j].value]));break;case 6:case 4:this.vwr.checkPropertyParameter(l)&&(n=a[j++].value)}if(d&&(n=m.value,0>n.nextSetBit(0)))return c.addXStr("");h&&!d&&(l="auxiliaryInfo.models."+l);l=JU.PT.rep(l,".[","[");n=this.vwr.getProperty(null,l,n);j<e&&(n=this.vwr.extractProperty(n,a,j));return c.addXObj(t?JS.SV.safeJSON("value",n):JS.SV.isVariableType(n)?n:JU.Escape.toReadable(l,n))},"JS.ScriptMathProcessor,~A,~N,~B");m(k,"evaluateFormat",function(c,a,b,d){if(d&&1<b.length)return!1;
var e=2>b.length||1287653388==a?c.getX():null,f;a=-1;var g=null;switch(b.length){case 0:f="%U";break;case 1:if(null==e)return!1;switch(b[0].tok){case 7:f=null;break;case 4:f=b[0].value;a=JS.SV.getFormatType(f);0<=a&&(g=e);break;default:return!1}break;case 2:4!=b[0].tok||4==b[1].tok&&0<=JS.SV.getFormatType(b[1].value)?(g=b[0],f=JS.SV.sValue(b[1])):(f=b[0].value,g=b[1]);a=JS.SV.getFormatType(f);break;default:if(f=b[0].value,a=JS.SV.getFormatType(f),0<=a)return!1}switch(a){case -1:break;case 35:case 39:case 43:case 47:return(12==
g.tok||11==g.tok)&&c.addXStr(this.matToString(g.value,a));case 28:case 0:return c.addXStr(JS.SV.getFormat(g,a));default:return c.addXObj(JS.SV.getFormat(g,a))}var h=null!=e&&10==e.tok?e.value:null;if(!d&&null!=e&&null==h&&0<b.length&&null!=f){if(2==b.length){d=e.getList();e=g.getList();if(null==d||null==e)return!1;e=JS.SV.getVariableList(this.getSublist(d,e))}b=y(-1,[b[0],e]);e=null}if(null==e){if(null==f||0<=a&&28!=a&&2!=b.length)return!1;if(0<=a||2>b.length||7!=b[1].tok)return a=JS.SV.format(b,
a),"string"==typeof a?c.addXStr(a):c.addXObj(a);f=b[1].getList();b=y(-1,[b[0],null]);h=Array(f.size());for(d=h.length;0<=--d;)b[1]=f.get(d),h[d]=JS.SV.format(b,a).toString();return c.addXAS(h)}if(7==e.tok&&null==f)return d=e.getList(),e=b[0].getList(),a=this.getSublist(d,e),c.addXList(a);a=null;a=null==f?"":null==h?JS.SV.sprintf(JU.PT.formatCheck(f),e):this.e.getCmdExt().getBitsetIdent(h,f,e.value,!0,e.index,!1);return c.addXObj(a)},"JS.ScriptMathProcessor,~N,~A,~B");m(k,"getSublist",function(c,a){for(var b=
new JU.Lst,d,e,f,g=0,h=c.size();g<h;g++)switch(e=c.get(g),e.tok){case 6:d=e.getMap();f=new JU.Lst;for(var j=0,l=a.size();j<l;j++)e=d.get(JS.SV.sValue(a.get(j))),f.addLast(null==e?JS.SV.newS(""):e);b.addLast(JS.SV.getVariableList(f));break;case 7:d=new java.util.Hashtable;f=e.getList();j=0;for(l=Math.min(f.size(),a.size());j<l;j++)d.put(JS.SV.sValue(a.get(j)),f.get(j));b.addLast(JS.SV.getVariable(d))}return b},"JU.Lst,JU.Lst");m(k,"evaluateList",function(c,a,b){var d=b.length,e=c.getX(),f=7==e.tok,
g;switch(a){case 1275335685:return 2==d&&c.addX(e.pushPop(b[0],b[1]))||1==d&&c.addX(e.pushPop(null,b[0]));case 1275334681:return 1==d&&c.addX(e.pushPop(b[0],null))||0==d&&c.addX(e.pushPop(null,null));case 1275069441:if(1!=d&&2!=d)return!1;break;case 1275068435:if(0!=d||!f)return!1;break;case 1275069447:case 1275069446:break;default:if(1!=d)return!1}if(2==d)return d=this.listSpecial(a,e,JS.SV.sValue(b[0]),b[1],f),null!=d&&c.addXObj(d);g=1275068435==a?null:0==d?JS.SV.newV(1073742327,"all"):b[0];var h=
null!=g&&1073742327==g.tok;if(!f&&4!=e.tok)return c.binaryOp(JS.MathExt.opTokenFor(a),e,g);var j=JS.SV.isScalar(e),l=null==g||JS.SV.isScalar(g),p=null,m=null;b=e.getList();var q=null==g?null:g.getList(),k=null,r=null;f?d=b.size():j?d=2147483647:(k=JU.PT.split(JS.SV.sValue(e),"\n"),p=u(d=k.length,0),JU.PT.parseFloatArrayData(k,p));if(h&&1275069446!=a){a=0;if(f)for(e=d;0<=--e;)a+=JS.SV.fValue(b.get(e));else if(!j)for(e=d;0<=--e;)a+=p[e];return c.addXFloat(a)}if(1275069446==a&&4==g.tok){f=new JU.SB;
if(j)f.append(JS.SV.sValue(e));else{j=h?"":g.value.toString();for(e=0;e<d;e++)f.append(0<e?j:"").append(JS.SV.sValue(b.get(e)))}return c.addXStr(f.toString())}var n=null;l?n=g:7==g.tok?d=Math.min(d,q.size()):(r=JU.PT.split(JS.SV.sValue(g),"\n"),m=u(r.length,0),JU.PT.parseFloatArrayData(r,m),d=Math.min(d,m.length));var x=JS.MathExt.opTokenFor(a);if(f&&h)return d=new JU.Lst,c.addXList(this.addAllLists(e.getList(),d));var h=j?e:null,D,v=2147483647==d;v&&(d=1);for(var y=Array(d),e=0;e<d;e++){D=l?n:7==
g.tok?q.get(e):Float.isNaN(m[e])?JS.SV.getVariable(JS.SV.unescapePointOrBitsetAsVariable(r[e])):JS.SV.newF(m[e]);j||(h=f?b.get(e):Float.isNaN(p[e])?JS.SV.getVariable(JS.SV.unescapePointOrBitsetAsVariable(k[e])):JS.SV.newF(p[e]));if(1275069446==a&&7!=h.tok){var A=new JU.Lst;A.addLast(h);h=JS.SV.getVariableList(A)}if(null==D?!c.propOp(x,h):!c.binaryOp(x,h,D))return!1;y[e]=c.getX()}return v?c.addXObj(y[0]):c.addXAV(y)},"JS.ScriptMathProcessor,~N,~A");k.opTokenFor=m(k,"opTokenFor",function(c){switch(c){case 1275069441:case 1275069446:return JS.T.tokenPlus;
case 1275068931:return JS.T.tokenMinus;case 1275068929:return JS.T.tokenTimes;case 1275068930:return JS.T.tokenMul3;case 1275068928:return JS.T.tokenDivide;case 1275068435:return JS.T.tokenLength}return null},"~N");m(k,"listSpecial",function(c,a,b,d,e){var f=null,g=null,h=null;if(1275069441==c){f=e?JS.SV.strListValue(a):JU.PT.split(JS.SV.sValue(a),"\n");g=7==d.tok?JS.SV.strListValue(d):JU.PT.split(JS.SV.sValue(d),"\n");a=Math.max(f.length,g.length);h=Array(a);for(c=0;c<a;c++)h[c]=(c>=f.length?"":
f[c])+b+(c>=g.length?"":g[c]);return h}if(1073742335!=d.tok)return null;f=a.getList();(g=0==b.length)&&(b=",");if(1275069446==c){e=Array(f.size());for(c=f.size();0<=--c;){var j=f.get(c).getList();if(null==j)e[c]=f.get(c);else{var l=new JU.SB;a=0;for(d=j.size();a<d;a++){0<a&&l.append(b);var p=j.get(a),h=null;if(4==p.tok){var m=p.value;g&&(h='"'+JU.PT.rep(m,'"','""')+'"')}l.append(null==h?""+p.asString():h)}e[c]=JS.SV.newS(l.toString())}}return e}e=new JU.Lst;g&&(b="\x00");j=O(2,0);c=0;for(l=f.size();c<
l;c++){a=f.get(c).asString();if(g){j[1]=0;for(d=j[0]=0;;){h=JU.PT.getCSVString(a,j);if(null==h){if(-1==j[1]){a+=++c<l?"\n"+f.get(c).asString():'"';j[1]=d;continue}a=a.substring(0,d)+a.substring(d).$replace(",","\x00");break}a=a.substring(0,d)+a.substring(d,j[0]).$replace(",","\x00")+h+a.substring(j[1]);j[1]=d=j[0]+h.length}}p=a.$plit(b);m=new JU.Lst;a=0;for(d=p.length;a<d;a++){h=p[a];if(0>h.indexOf("."))try{m.addLast(JS.SV.newI(Integer.parseInt(h)));continue}catch(q){if(!N(q,Exception))throw q;}else try{m.addLast(JS.SV.getVariable(Float.$valueOf(Float.parseFloat(h))));
continue}catch(k){if(!N(k,Exception))throw k;}m.addLast(JS.SV.newS(h))}e.addLast(JS.SV.getVariableList(m))}return JS.SV.getVariableList(e)},"~N,JS.SV,~S,JS.SV,~B");m(k,"addAllLists",function(c,a){for(var b=c.size(),d=0;d<b;d++){var e=c.get(d);7==e.tok?this.addAllLists(e.getList(),a):a.addLast(e)}return a},"JU.Lst,JU.Lst");m(k,"evaluateLoad",function(c,a,b){if(!this.checkAccess()||1>a.length||3<a.length)return!1;var d=JV.FileManager.fixDOSName(JS.SV.sValue(a[0])),e=1<a.length&&1073742335==a[1].tok,
f=this.vwr.async||d.startsWith("cache://")||2<a.length&&1073742335==a[a.length-1].tok,g=1<a.length&&2==a[1].tok?a[1].asInt():-1;a=1<a.length&&a[1].asString().equalsIgnoreCase("JSON");if(e)return c.addXMap(this.vwr.fm.getFileAsMap(d,null,!1));e=d.startsWith("?");if(JV.Viewer.isJS&&(e||f)){if(b&&e)return c.addXStr("");d=this.e.loadFileAsync("load()_",d,c.oPt,!0)}b=b?this.vwr.fm.getFilePath(d,!1,!1):this.vwr.getFileAsString4(d,g,!1,!1,!0,"script");try{return a?c.addXObj(this.vwr.parseJSON(b)):c.addXStr(b)}catch(h){if(N(h,
Exception))return!1;throw h;}},"JS.ScriptMathProcessor,~A,~B");m(k,"evaluateMath",function(c,a,b){a=JS.SV.fValue(a[0]);switch(b){case 134218246:a=Math.sqrt(a);break;case 134218244:a=Math.sin(3.141592653589793*a/180);break;case 134218245:a=Math.cos(3.141592653589793*a/180);break;case 134218255:a=Math.tan(3.141592653589793*a/180);break;case 134218241:a=180*Math.acos(a)/3.141592653589793}return c.addXFloat(a)},"JS.ScriptMathProcessor,~A,~N");m(k,"evaluateMeasure",function(c,a,b){var d=0;switch(b){case 1745489939:b=
null;for(var e=new JU.Lst,f=u(-1,[3.4028235E38,3.4028235E38]),g=null,h=null,j=!1,l=!1,p=0,m=!1,q=null,k=0,r=3.4028235E38,n=!1,x=!1,q=0;q<a.length;q++)switch(a[q].tok){case 10:var D=a[q].value;0==D.length()&&(m=!0);e.addLast(D);d++;k++;break;case 8:e.addLast(JU.Point3fi.newPF(a[q].value,0));d++;break;case 2:case 3:f[p++%2]=JS.SV.fValue(a[q]);break;case 4:D=JS.SV.sValue(a[q]);if(D.startsWith("property_")){b=D;break}D.equalsIgnoreCase("vdw")||D.equalsIgnoreCase("vanderwaals")?r=(q+1<a.length&&2==a[q+
1].tok?a[++q].asInt():100)/100:D.equalsIgnoreCase("notConnected")?l=!0:D.equalsIgnoreCase("connected")?j=!0:D.equalsIgnoreCase("minArray")?n=1<=k:D.equalsIgnoreCase("asArray")||0==D.length?x=1<=k:JM.Measurement.isUnits(D)?h=D.toLowerCase():g=d+":"+D;break;default:return!1}if(2>d||4<d||2<p||l&&j)return!1;if(m||3.4028235E38!=r&&(2!=k||2!=d))return c.addXStr("");q=3.4028235E38==r?new J.atomdata.RadiusData(f,0,null,null):new J.atomdata.RadiusData(null,r,J.atomdata.RadiusData.EnumType.FACTOR,J.c.VDW.AUTO);
a=this.vwr.newMeasurementData(null,e).set(0,null,q,b,g,h,null,j,l,null,!0,0,0,null,NaN,null).getMeasurements(x,n);return c.addXObj(a);case 134217729:if(3!=(d=a.length)&&4!=d)return!1;break;default:if(2!=(d=a.length))return!1}b=Array(d);for(q=0;q<d;q++)if(null==(b[q]=c.ptValue(a[q],null)))return!1;switch(d){case 2:return c.addXFloat(b[0].distance(b[1]));case 3:return c.addXFloat(JU.Measure.computeAngleABC(b[0],b[1],b[2],!0));case 4:return c.addXFloat(JU.Measure.computeTorsion(b[0],b[1],b[2],b[3],!0))}return!1},
"JS.ScriptMathProcessor,~A,~N");m(k,"evaluateModulation",function(c,a){var b="",d=NaN,e=null;switch(a.length){case 0:break;case 1:switch(a[0].tok){case 8:e=a[0].value;break;case 4:b=a[0].asString();break;default:d=JS.SV.fValue(a[0])}break;case 2:b=JS.SV.sValue(a[0]);d=JS.SV.fValue(a[1]);break;default:return!1}null==e&&1E6>d&&(e=JU.P3.new3(d,d,d));d=c.getX();d=10==d.tok?d.value:new JU.BS;return c.addXList(this.vwr.ms.getModulationList(d,(b+"D").toUpperCase().charAt(0),e))},"JS.ScriptMathProcessor,~A");
m(k,"evaluatePlane",function(c,a,b,d){if(134219777==b&&3!=a.length&&4!=a.length||134217763==b&&2!=a.length&&3!=a.length&&4!=a.length||0==a.length||4<a.length)return!1;var e,f,g=this.e.planeValue(a[0]),h;switch(a.length){case 1:if(134217750==b){if(7!=a[0].tok)return!1;g=JS.SV.flistValue(a[0],3);if(3!=g.length)return!1;b=this.vwr.getOperativeSymmetry();if(null==b)return!1;g=JU.P3.new3(g[0],g[1],g[2]);b.toCartesian(g,!1);g=JU.P4.new4(g.x,g.y,g.z,0);if(d)break}return null!=g&&c.addXPt4(g);case 2:if(134217763==
b){e=this.e.planeValue(a[1]);if(null==e)return!1;d=new JU.P3;b=new JU.V3;h=new JU.V3;if(null!=g)return a=JU.Measure.getIntersectionPP(g,e),null==a?c.addXStr(""):c.addXList(a);f=c.ptValue(a[0],null);return null==f?c.addXStr(""):c.addXPt(JU.Measure.getIntersection(f,null,e,d,b,h))}case 3:case 4:switch(b){case 134219777:b=4==a.length?JS.SV.fValue(a[3]):NaN;g=this.e.getHklPlane(JU.P3.new3(JS.SV.fValue(a[0]),JS.SV.fValue(a[1]),JS.SV.fValue(a[2])),b,null);if(d)break;return null!=g&&c.addXPt4(g);case 134217763:e=
c.ptValue(a[0],null);f=c.ptValue(a[1],null);if(null==e||null==f)return c.addXStr("");f=JU.V3.newV(f);f.normalize();g=this.e.planeValue(a[2]);if(null!=g)return d=new JU.P3,b=new JU.V3,h=new JU.V3,e=JU.Measure.getIntersection(e,f,g,d,b,h),null==e?c.addXStr(""):c.addXPt(e);d=c.ptValue(a[2],null);if(null==d)return c.addXStr("");b=new JU.V3;d=JU.P3.newP(d);if(3==a.length)return JU.Measure.projectOntoAxis(d,e,f,b),c.addXPt(d);g=JS.SV.fValue(a[3]);a=JU.P3.newP(d);JU.Measure.projectOntoAxis(d,e,f,b);a=a.distance(d);
e=new JU.Lst;a==g?e.addLast(d):a<g&&(a=Math.sqrt(g*g-a*a),b.scaleAdd2(a,f,d),e.addLast(JU.P3.newP(b)),b.scaleAdd2(-a,f,d),e.addLast(JU.P3.newP(b)));return c.addXList(e)}switch(a[0].tok){case 2:case 3:if(3==a.length)return g=JS.SV.fValue(a[0]),d=JS.SV.fValue(a[1]),a=JS.SV.fValue(a[2]),b=JU.V3.new3(0,0,1),f=JU.P3.new3(0,1,0),a=JU.Quat.newVA(f,a),a.getMatrix().rotate(b),f.set(0,0,1),a=JU.Quat.newVA(f,d),a.getMatrix().rotate(b),f.setT(b),f.scale(g),g=new JU.P4,JU.Measure.getPlaneThroughPoint(f,b,g),c.addXPt4(g);
break;case 10:case 8:e=c.ptValue(a[0],null);f=c.ptValue(a[1],null);if(null==f)return!1;d=2<a.length&&(10==a[2].tok||8==a[2].tok)?c.ptValue(a[2],null):null;b=JU.V3.newV(f);if(null==d)return g=new JU.P4,2==a.length||2!=a[2].tok&&3!=a[2].tok&&!a[2].asBoolean()?(d=JU.P3.newP(e),d.add(f),d.scale(0.5),b.sub(e),b.normalize()):1073742335==a[2].tok?d=e:(b.sub(e),d=new JU.P3,d.scaleAdd2(a[2].asFloat(),b,e)),JU.Measure.getPlaneThroughPoint(d,b,g),c.addXPt4(g);g=new JU.V3;a=4==a.length?c.ptValue(a[3],null):null;
a=JU.Measure.getDirectedNormalThroughPoints(e,f,d,a,b,g);return c.addXPt4(JU.P4.new4(b.x,b.y,b.z,a))}}if(d)switch(d=c.getX(),d.tok){case 10:a=new JU.Lst;b=JS.SV.getBitSet(d,!1);for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1))d=new JU.P3,JU.Measure.getPlaneProjection(this.vwr.ms.at[e],g,d,new JU.V3),a.addLast(JS.SV.getVariable(d));return c.addXList(a);case 8:return a=JS.SV.ptValue(d),d=new JU.P3,JU.Measure.getPlaneProjection(a,g,d,new JU.V3),c.addXPt(d)}if(4!=a.length)return!1;d=JS.SV.fValue(a[0]);
b=JS.SV.fValue(a[1]);g=JS.SV.fValue(a[2]);a=JS.SV.fValue(a[3]);return c.addXPt4(JU.P4.new4(d,b,g,a))},"JS.ScriptMathProcessor,~A,~N,~B");m(k,"evaluatePoint",function(c,a){var b=null;switch(a.length){default:return!1;case 1:switch(a[0].tok){case 3:case 2:return c.addXInt(a[0].asInt());case 4:b=a[0].value;if(b.startsWith("(")&&")"==b.charAt(b.length-1))return c.addXPt(this.getRealPointFromFraction(b));break;case 7:var d=a[0].getList(),e=d.size();if(0==e)return!1;switch(d.get(0).tok){case 2:case 3:switch(e){case 3:return c.addXPt(JU.P3.new3(d.get(0).asFloat(),
d.get(1).asFloat(),d.get(2).asFloat()));case 4:return c.addXPt4(JU.P4.new4(d.get(0).asFloat(),d.get(1).asFloat(),d.get(2).asFloat(),d.get(3).asFloat()))}return!1;case 7:for(var f=new JU.Lst,b=0;b<e;b++)f.addLast(JS.SV.getVariable(JU.Escape.uP("{"+d.get(b).asString()+"}")));return c.addXList(f);case 4:b=d.get(0).value;if(!b.startsWith("{")||"string"==typeof JU.Escape.uP(b))break;f=new JU.Lst;for(b=0;b<e;b++)f.addLast(JS.SV.getVariable(JU.Escape.uP(JS.SV.sValue(d.get(b)))));return c.addXList(f);default:return!1}b=
"{null}"}null==b&&(b=JS.SV.sValue(a[0]));d=JU.Escape.uP(b);return x(d,"JU.P3")?c.addXPt(d):c.addXStr(""+d);case 2:switch(a[1].tok){case 1073742334:case 1073742335:switch(a[0].tok){case 8:d=JU.P3.newP(a[0].value);break;case 10:d=this.vwr.ms.getAtomSetCenter(a[0].value);break;default:return!1}1073742335==a[1].tok?(this.vwr.tm.transformPt3fSafe(d,d),d.y=this.vwr.tm.height-d.y,this.vwr.antialiased&&d.scale(0.5)):(this.vwr.antialiased&&d.scale(2),d.y=this.vwr.tm.height-d.y,this.vwr.tm.unTransformPoint(d,
d));break;case 8:e=a[0].getList();if(null==e||4!=e.size())return!1;b=JS.SV.ptValue(a[1]);d=JU.P3.newP(JS.SV.ptValue(e.get(0)));d.scaleAdd2(b.x,JS.SV.ptValue(e.get(1)),d);d.scaleAdd2(b.y,JS.SV.ptValue(e.get(2)),d);d.scaleAdd2(b.z,JS.SV.ptValue(e.get(3)),d);break;default:return!1}return c.addXPt(d);case 3:return c.addXPt(JU.P3.new3(a[0].asFloat(),a[1].asFloat(),a[2].asFloat()));case 4:return c.addXPt4(JU.P4.new4(a[0].asFloat(),a[1].asFloat(),a[2].asFloat(),a[3].asFloat()))}},"JS.ScriptMathProcessor,~A");
m(k,"getRealPointFromFraction",function(c){c=JU.PT.rep(c.substring(1,c.length-1).$replace(","," "),"  "," ");c=JU.PT.split(c.trim()," ");return 3!=c.length?null:JU.P3.new3(JU.SimpleUnitCell.parseCalcFunctions(this.vwr,null,c[0]),JU.SimpleUnitCell.parseCalcFunctions(this.vwr,null,c[1]),JU.SimpleUnitCell.parseCalcFunctions(this.vwr,null,c[2]))},"~S");m(k,"evaluatePrompt",function(c,a){if(1!=a.length&&2!=a.length&&3!=a.length)return!1;var b=JS.SV.sValue(a[0]),d=1<a.length&&7==a[1].tok?JS.SV.strListValue(a[1]):
null,e=null!=d||1==a.length||3==a.length&&a[2].asBoolean(),f=null!=d?null:2<=a.length?JS.SV.sValue(a[1]):"OK",b=""+this.vwr.prompt(b,f,d,e);return e&&null!=d?c.addXInt(Integer.parseInt(b)+1):c.addXStr(b)},"JS.ScriptMathProcessor,~A");m(k,"evaluateQuaternion",function(c,a,b){var d=null,e=a.length,f=2147483647,g=!1;134221850==b&&(1<e&&(4==a[e-1].tok&&a[e-1].value.equalsIgnoreCase("relative"))&&(e--,g=!0),1<e&&(2==a[e-1].tok&&10==a[0].tok)&&(f=a[e-1].asInt(),0>=f&&(f=2147483646),e--));switch(e){case 0:case 1:case 4:break;
case 2:if(134221850==b){if(7==a[0].tok&&(7==a[1].tok||1073742335==a[1].tok))break;if(10==a[0].tok&&(2==a[1].tok||10==a[1].tok))break}if(null==(d=c.ptValue(a[0],null))||134221850!=b&&8==a[1].tok)return!1;break;case 3:if(134221850!=b)return!1;if(9==a[0].tok){if(8!=a[2].tok&&10!=a[2].tok)return!1;break}for(var h=0;3>h;h++)if(8!=a[h].tok&&10!=a[h].tok)return!1;break;default:return!1}var j=h=null,l=null;switch(e){case 0:return c.addXPt4(this.vwr.tm.getRotationQ().toPoint4f());default:if(134221850==b&&
7==a[0].tok){b=this.e.getQuaternionArray(a[0].getList(),1073742001);a=JU.Quat.sphereMean(b,null,1E-4);h=x(a,"JU.Quat")?a:null;break}else if(134221850==b&&10==a[0].tok)j=this.vwr.getAtomGroupQuaternions(a[0].value,f);else if(11==a[0].tok)h=JU.Quat.newM(a[0].value);else if(9==a[0].tok)l=a[0].value;else if(l=JS.SV.sValue(a[0]),l=JU.Escape.uP(l.equalsIgnoreCase("best")?this.vwr.getOrientation(1073741864,"best",null,null).toString():l),!x(l,"JU.P4"))return!1;134217731==b&&(h=JU.Quat.newVA(JU.P3.new3(l.x,
l.y,l.z),l.w));break;case 2:if(134221850==b){if(7==a[0].tok&&7==a[1].tok){b=this.e.getQuaternionArray(a[0].getList(),1073742001);j=this.e.getQuaternionArray(a[1].getList(),1073742001);j=JU.Quat.arrayDiv(j,b,f,g);break}if(7==a[0].tok&&1073742335==a[1].tok)return b=this.e.getQuaternionArray(a[0].getList(),1073742001),f=u(1,0),JU.Quat.sphereMean(b,f,1E-4),c.addXFloat(f[0]);if(10==a[0].tok&&10==a[1].tok){b=this.vwr.getAtomGroupQuaternions(a[0].value,2147483647);j=this.vwr.getAtomGroupQuaternions(a[1].value,
2147483647);j=JU.Quat.arrayDiv(j,b,f,g);break}}h=c.ptValue(a[1],null);l=this.e.planeValue(a[0]);h=null!=h?JU.Quat.getQuaternionFrame(JU.P3.new3(0,0,0),d,h):JU.Quat.newVA(d,JS.SV.fValue(a[1]));break;case 3:if(9==a[0].tok)return f=8==a[2].tok?a[2].value:this.vwr.ms.getAtomSetCenter(a[2].value),c.addXStr(JU.Escape.drawQuat(JU.Quat.newP4(a[0].value),"q",JS.SV.sValue(a[1]),f,1));b=Array(3);for(h=0;3>h;h++)b[h]=8==a[h].tok?a[h].value:this.vwr.ms.getAtomSetCenter(a[h].value);h=JU.Quat.getQuaternionFrame(b[0],
b[1],b[2]);break;case 4:134221850==b?l=JU.P4.new4(JS.SV.fValue(a[1]),JS.SV.fValue(a[2]),JS.SV.fValue(a[3]),JS.SV.fValue(a[0])):h=JU.Quat.newVA(JU.P3.new3(JS.SV.fValue(a[0]),JS.SV.fValue(a[1]),JS.SV.fValue(a[2])),JS.SV.fValue(a[3]))}if(null!=j){if(2147483647!=f){f=new JU.Lst;for(h=0;h<j.length;h++)f.addLast(j[h].toPoint4f());return c.addXList(f)}h=0<j.length?j[0]:null}return c.addXPt4((null==h?JU.Quat.newP4(l):h).toPoint4f())},"JS.ScriptMathProcessor,~A,~N");m(k,"evaluateRandom",function(c,a){if(3<
a.length)return!1;null==this.rand&&(this.rand=new java.util.Random);var b=0,d=1;switch(a.length){case 3:this.rand.setSeed(aa(JS.SV.fValue(a[2])));case 2:d=JS.SV.fValue(a[1]);case 1:b=JS.SV.fValue(a[0]);case 0:break;default:return!1}return c.addXFloat(this.rand.nextFloat()*(d-b)+b)},"JS.ScriptMathProcessor,~A");m(k,"evaluateRowCol",function(c,a,b){if(1!=a.length)return!1;a=a[0].asInt()-1;var d=c.getX();switch(d.tok){case 11:if(0>a||2<a)break;d=d.value;switch(b){case 1275068935:return b=u(3,0),d.getRow(a,
b),c.addXAF(b);default:return b=u(3,0),d.getColumn(a,b),c.addXAF(b)}case 12:if(0>a||3<a)break;d=d.value;switch(b){case 1275068935:return b=u(4,0),d.getRow(a,b),c.addXAF(b);default:return b=u(4,0),d.getColumn(a,b),c.addXAF(b)}case 7:b=d.getList();for(var d=new JU.Lst,e=0,f=b.size();e<f;e++){var g=b.get(e).getList();if(null==g)return c.addXStr("");d.addLast(a<g.size()?g.get(a):JS.SV.newS(""))}return c.addXList(d)}return!1},"JS.ScriptMathProcessor,~A,~N");m(k,"evaluateIn",function(c,a){var b=c.getX();
switch(a.length){case 1:var d=a[0].getList();if(null!=d)for(var e=0,f=d.size();e<f;e++)if(JS.SV.areEqual(b,d.get(e)))return c.addXInt(e+1);break;default:for(e=0;e<a.length;e++)if(JS.SV.areEqual(b,a[e]))return c.addXInt(e+1)}return c.addXInt(0)},"JS.ScriptMathProcessor,~A");m(k,"evaluateReplace",function(c,a){var b=!1,d,e;switch(a.length){case 0:b=!0;d=e=null;break;case 3:b=JS.SV.bValue(a[2]);case 2:d=JS.SV.sValue(a[0]);e=JS.SV.sValue(a[1]);break;default:return!1}var f=c.getX();if(7==f.tok){for(var f=
JS.SV.strListValue(f),g=Array(f.length),h=f.length;0<=--h;)g[h]=null==d?JU.PT.clean(f[h]):b?JU.PT.replaceAllCharacters(f[h],d,e):JU.PT.rep(f[h],d,e);return c.addXAS(g)}f=JS.SV.sValue(f);return c.addXStr(null==d?JU.PT.clean(f):b?JU.PT.replaceAllCharacters(f,d,e):JU.PT.rep(f,d,e))},"JS.ScriptMathProcessor,~A");m(k,"evaluateScript",function(c,a,b){if(134222350!=b&&!this.checkAccess()||0==a.length||1!=a.length&&(134222350==b||134238732==b)||(134222350==b||134238732==b)&&1!=a.length||0==a.length)return!1;
var d=JS.SV.sValue(a[0]),e=new JU.SB;switch(b){case 134218759:return 2==a.length?d.equalsIgnoreCase("JSON")&&c.addXObj(this.vwr.parseJSON(JS.SV.sValue(a[1]))):c.addXObj(this.vwr.evaluateExpressionAsVariable(d));case 134222850:a=2==a.length?JS.SV.sValue(a[1]):".";a.equals(".")||e.append(this.vwr.jsEval(a+"\u0001"+d));(a.equals(".")||a.equals("*"))&&this.e.runScriptBuffer(d,e,!0);break;case 134222350:this.e.runScriptBuffer("show "+d,e,!0);break;case 134238732:return c.addX(this.vwr.jsEvalSV(d))}var d=
e.toString(),f;return Float.isNaN(f=JU.PT.parseFloatStrict(d))?c.addXStr(d):0<=d.indexOf(".")?c.addXFloat(f):c.addXInt(JU.PT.parseInt(d))},"JS.ScriptMathProcessor,~A,~N");m(k,"checkAccess",function(){return!this.vwr.haveAccessInternal(null)});m(k,"evaluateSort",function(c,a,b){if(1<a.length)return!1;if(1275068444==b){if(1==a.length&&4==a[0].tok)return c.addX(c.getX().sortMapArray(a[0].asString()));var d=0==a.length?0:a[0].asInt();return c.addX(c.getX().sortOrReverse(d))}b=c.getX();a=0==a.length?null:
a[0];if(4==b.tok){var d=0,e=JS.SV.sValue(b);if(null==a)return c.addXInt(0);a=JS.SV.sValue(a);for(b=0;b<e.length;b++){b=e.indexOf(a,b);if(0>b)break;d++}return c.addXInt(d)}var d=new JU.Lst,f=e=null,g=JS.SV.getVariable(b.value).sortOrReverse(0).getList();if(null==g)return null==a?c.addXStr(""):c.addXInt(0);b=0;for(var h=g.size();b<=h;b++){var j=b==h?null:g.get(b);if(!(null!=a&&null!=j&&!JS.SV.areEqual(j,a)))if(JS.SV.areEqual(j,e))f.intValue++;else{if(null!=e){var l=new JU.Lst;l.addLast(e);l.addLast(f);
d.addLast(JS.SV.getVariableList(l))}f=JS.SV.newI(1);e=j}}return null==a?c.addX(JS.SV.getVariableList(d)):d.isEmpty()?c.addXInt(0):c.addX(d.get(0).getList().get(1))},"JS.ScriptMathProcessor,~A,~N");m(k,"evaluateString",function(c,a,b){var d=c.getX(),e=0<b.length?JS.SV.sValue(b[0]):1275068932==a?"":"\n";switch(b.length){case 0:break;case 1:if(1073742335==b[0].tok)return c.addX(JS.SV.getVariable(JU.PT.getTokens(d.asString())));break;case 2:if(7==d.tok)break;if(1275069447==a){d=JS.SV.getVariable(JU.PT.split(JU.PT.rep(d.value,
"\n\r","\n").$replace("\r","\n"),"\n"));break}default:return!1}if(7==d.tok&&1275068932!=a&&(1275069447!=a||2==b.length))return c.addX(d),this.evaluateList(c,a,b);b=1275069447==a&&10==d.tok||1275068932==a&&7==d.tok?null:JS.SV.sValue(d);switch(a){case 1275069447:if(10==d.tok){e=d.value;d=this.vwr.ms.mc;b=new JU.Lst;for(a=0;a<d;a++){var f=this.vwr.getModelUndeletedAtomsBitSet(a);f.and(e);b.addLast(JS.SV.getVariable(f))}return c.addXList(b)}return c.addXAS(JU.PT.split(b,e));case 1275069446:return 0<b.length&&
"\n"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),c.addXStr(JU.PT.rep(b,"\n",e));case 1275068932:if(null!=b)return c.addXStr(JU.PT.trim(b,e));d=JS.SV.strListValue(d);for(a=d.length;0<=--a;)d[a]=JU.PT.trim(d[a],e);return c.addXAS(d)}return c.addXStr("")},"JS.ScriptMathProcessor,~N,~A");m(k,"evaluateSubstructure",function(c,a,b,d){var e=d?c.getX():null,f=null,g=null;if(null!=e)switch(e.tok){case 10:g=e.value;break;case 4:if(f=e.value,f.startsWith("InChI"))return c.addX(e),this.evaluateInChI(c,
y(-1,[JS.SV.newS("SMILES "+(0<a.length?a[0].asString():0<=f.indexOf("/f")?"fixedh":"amide"))]))}if(d&&134218757==b)return c.addXObj(this.e.getSmilesExt().getSmilesMatches("",null,g,null,1,!0,!1));if(0==a.length||d&&(134218753==b||1<a.length))return!1;e=134218756==b&&!d&&134218756==a[0].tok?a[0].value:null;if(null!=e&&2>a.length)return!1;d=134218756==b&&!d&&10==a[0].tok;f=134218753==a[0].tok?a[0].value:null!=e&&134218753==a[1].tok?a[1].value:null;if(null!=e&&null==f)return!1;var h=d?null:null==f?JS.SV.sValue(a[0]):
null,j=new JU.BS;if(null==h||0<h.length)try{if(d)return c.addX(JS.SV.newV(134218756,this.vwr.getSmilesMatcher().compileSearchTarget(this.vwr.ms.at,this.vwr.ms.ac,JS.SV.getBitSet(a[0],!1))));if(null!=e)return c.addXBs(this.vwr.getSmilesMatcher().getSubstructureSet(f,e,0,null,2));if(134218753==b)return c.addX(JS.SV.newV(134218753,this.vwr.getSmilesMatcher().compileSmartsPattern(h)));null==g&&(g=2==a.length&&10==a[1].tok?a[1].value:this.vwr.getModelUndeletedAtomsBitSet(-1));j=this.vwr.getSmilesMatcher().getSubstructureSet(null==
f?h:f,this.vwr.ms.at,this.vwr.ms.ac,g,134218757==b?1:2)}catch(l){if(N(l,Exception))this.e.evalError(l.getMessage(),null);else throw l;}return 134218753!=b&&c.addXBs(j)},"JS.ScriptMathProcessor,~A,~N,~B");m(k,"evaluateSymop",function(c,a,b){if(!b&&2==a.length&&7==a[0].tok&&4==a[1].tok){for(var d=new JU.Lst,e=a[0].value,f=0,g=e.size();f<g;f++){b=this.getSymopInfo(c,null,y(-1,[e.get(f),a[1]]),f+1,!1);if(null==b)return!1;d.addLast(b)}return c.addXList(d)}d=b?c.getX():null;b=this.getSymopInfo(c,d,a,0,
b);return c.addXObj(b)},"JS.ScriptMathProcessor,~A,~B");m(k,"getSymopInfo",function(c,a,b,d,e){var f=null,g=b.length,h=2==g&&4==b[1].tok?b[1].value.toLowerCase():null;if(null!=h){var j=null,l=null;switch(b[0].tok){case 4:switch(h){case "rxyz":case "matrix":l=b[0].value}break;case 11:switch(h){case "rxyz":case "xyz":case "uvw":j=b[0].value}break;case 12:switch(h){case "rxyz":case "xyz":j=b[0].value}}if(null!=j||null!=l)return this.vwr.getSymStatic().staticConvertOperation(l,j,h)}var p=!1;if(null!=
a&&10!=a.tok&&!(p=8==a.tok))return null;f=null==a||p?null:a.value;a=p?JS.SV.ptValue(a):null;!p&&null==f&&(f=this.vwr.getThisModelAtoms());if(0==g){a=JU.PT.split(JU.PT.trim(this.vwr.getSymTemp().getSpaceGroupInfo(this.vwr.ms,null,null==f||f.isEmpty()?Math.max(0,this.vwr.am.cmi):this.vwr.ms.at[f.nextSetBit(0)].mi,!1,null).get("symmetryInfo"),"\n"),"\n");for(var j=new JU.Lst,m=0,q=a.length;m<q;m++)j.addLast(JU.PT.split(a[m],"\t"));return j}var l=null,k=0,q=-2147483648,r=0,n=null,y=null,D=!1;switch(b[0].tok){case 4:l=
JS.SV.sValue(b[0]);switch(null==l?"":l.toLowerCase()){case "count":return m=this.vwr.getOperativeSymmetry(),1!=g?null:Integer.$valueOf(null==m?0:m.getSpaceGroupOperationCount());case "":k=0;break;case "invariant":k=36868;break;case "wyckoff":k=1086324754;D=!0;break;case "wyckoffm":k=1086324755,D=!0}r++;break;case 11:case 12:l=b[0].escape();r++;break;case 2:q=b[0].asInt();r++;break;case 10:p||(y=b[0].value)}null==f?(r<g&&10==b[r].tok&&(f=new JU.BS).or(b[r].value),r+1<g&&10==b[r+1].tok&&(null==f?f=
new JU.BS:f).or(b[r+1].value)):f.isEmpty()||(f=this.vwr.getModelUndeletedAtomsBitSet(this.vwr.getModelIndexForAtom(f.nextSetBit(0))));p=null;if(g>r&&7==b[r].tok){n=b[r++].getList();if(3!=n.size())return null;p=JU.P3.new3(JS.SV.fValue(n.get(0)),JS.SV.fValue(n.get(1)),JS.SV.fValue(n.get(2)))}else g>r&&2==b[r].tok&&JU.SimpleUnitCell.ijkToPoint3f(JS.SV.iValue(b[r++]),p=new JU.P3,0,0);null==a&&null!=(a=g>r?c.ptValue(b[r],f):null)&&r++;null!=(n=g>r?c.ptValue(b[r],f):null)&&r++;if(null!=a&&null==n&&null!=
y&&!y.isEmpty()){n=a;y=JU.BSUtil.copy(y);y.and(f);a=this.vwr.ms.getSymmetryEquivAtoms(y,null,null).nextSetBit(0);if("basis".equals(h))return JU.BSUtil.newAndSetBit(a);a=JU.P3.newP(this.vwr.ms.at[a])}c=null!=n&&b.length>r&&-2147483648==q&&2==b[r].tok?b[r].intValue:-1;0<=c&&r++;-2147483648==q&&36868!=k&&(q=0);h=null;0==k&&(null!=l&&0>l.indexOf(","))&&(r==g?h=this.vwr.ms.getPointGroupInfo(null,null):6==b[r].tok&&(h=b[r].getMap()));if(null!=h){b=l.indexOf(".");d=l.indexOf("^");0<d?c=JU.PT.parseInt(l.substring(d+
1)):(d=l.length,c=1);0<b&&d>b+1?(q=JU.PT.parseInt(l.substring(b+1,d)),1>q&&(q=1),d=b):q=1;l=l.substring(0,d);f=h.get(l+"_m");if(null==f)return f=h.get(l),null==f?"":f;var v;try{if(x(f,"JS.SV"))if(v=h.get("center").value,l=f,11==l.tok)j=l.value;else if(7==l.tok)j=l.getList().get(q-1).value;else return null;else v=h.get("center"),j=x(f,"JU.M3")?f:f.get(q-1);q=j;j=JU.M3.newM3(j);if(1<c)for(m=1;m<c;m++)j.mul(q);if(null==a)return j;a=JU.P3.newP(a);a.sub(v);j.rotate(a);a.add(v);return a}catch(u){if(!N(u,
Exception))throw u;}return null}v=g==r?D?"":36868==k?"id":null!=n||null==a?"matrix":"point":JS.SV.sValue(b[r++]);g=(m=(!D||e)&&null!=f&&!f.isEmpty())?f.nextSetBit(0):-1;if(D){for(b=m?this.vwr.ms.getAtom(g):a;0<v.length&&JU.PT.isDigit(v.charAt(0));)v=v.substring(1);if(null==b)switch(v){case "":case "*":v="*";break;default:if(1==v.length)v+="*";else return null}if(0==v.length||v.equalsIgnoreCase("label"))v=null;a=null==v?1086324755==k?"":null:v.endsWith("*")||v.equalsIgnoreCase("coord")||v.equalsIgnoreCase("coords")?
v:v.substring(0,1);m=this.vwr.getOperativeSymmetry();return null==m?null:m.getWyckoffPosition(b,null==a?1086324755==k?"M":null:(1086324755==k?"M":"")+a)}v=v.toLowerCase();if(36868==k||v.equals("invariant")&&e)m&&null==a&&(a=this.vwr.ms.at[g]),0>g&&(g=this.vwr.getThisModelAtoms().nextSetBit(0));if(36868==k&&-2147483648==q){l=null;m=this.vwr.getCurrentUnitCell();null!=a?l=null==m?O(0,0):m.getInvariantSymops(a,null):null!=f&&!f.isEmpty()&&(m=f.nextSetBit(0),a=this.vwr.ms.at[m],l=this.vwr.ms.getSymmetryInvariant(m));
if(null!=l&&0<l.length){j=Array(l.length);for(m=0;m<j.length;m++)q=l[m],j[m]=this.vwr.getSymmetryInfo(g,null,q,null,a,a,1275068418,v,0,-1,0,null);return j}return l}m=null!=l&&0<=l.indexOf("u");f=r==b.length?this.vwr.getSymmetryInfo(g,l,0<d?d:q,p,a,n,1275068418,v,0,c,0,null):null;m&&x(f,"JU.M4")&&(m=new JU.M3,f.getRotationScale(m),f=m);return f},"JS.ScriptMathProcessor,JS.SV,~A,~N,~B");m(k,"evaluateTensor",function(c,a){var b=2==a.length&&1275068445==a[1].tok,d=b?null:c.getX();if(2<a.length||!b&&10!=
d.tok)return!1;var d=d.value,e=b||0==a.length?null:JS.SV.sValue(a[0]).toLowerCase(),f=this.vwr.getNMRCalculation();if("unique".equals(e))return c.addXBs(f.getUniqueTensorSet(d));var g=2>a.length?null:JS.SV.sValue(a[1]).toLowerCase();return b?c.addXObj(a[0].value.getInfo(g)):c.addXList(f.getTensorInfo(e,g,d))},"JS.ScriptMathProcessor,~A");m(k,"evaluateUserFunction",function(c,a,b,d,e){var f=null;if(e)switch(f=c.getX(),f.tok){case 10:break;case 6:if(0<b.length)return!1;f=f.getMap().get(a);return null==
f?c.addXStr(""):c.addX(f);default:return!1}a=a.toLowerCase();c.wasX=!1;for(var g=new JU.Lst,h=0;h<b.length;h++)g.addLast(b[h]);if(e)return c.addXObj(this.e.getBitsetProperty(f.value,null,d,null,null,f.value,y(-1,[a,g]),!1,f.index,!1));a=this.e.getUserFunctionResult(a,g,null);return null==a?!1:c.addX(a)},"JS.ScriptMathProcessor,~S,~A,~N,~B");m(k,"evaluateWithin",function(c,a,b){var d=a.length;if(1>d||5<d)return!1;if(1==d&&10==a[0].tok)return c.addX(a[0]);var e=b?JS.SV.getBitSet(c.getX(),!1):null,f=
0,g=a[0].value,h=""+g,j=this.vwr.ms,l=!1,p=!1,m=!1,q=!1,k=null,r=null,n=a[0].tok,u=!1;a:for(;;){switch(4==n?n=JS.T.getTokFromName(h):n){case 1648363544:l=!0,g=null;case 3:case 2:q=!0;if(2>d||3==d&&7==a[1].tok&&7!=a[2].tok)return!1;f=l?100:JS.SV.fValue(a[0]);switch(n=a[1].tok){case 1073742335:case 1073742334:p=a[1].asBoolean();if(2<d&&JS.SV.sValue(a[2]).equalsIgnoreCase("unitcell"))n=1814695966,u=3==d;else if(2<d&&10!=a[2].tok)return!1;u||(d=0);break;case 4:n=JS.SV.sValue(a[1]);if(n.startsWith("$")){k=
this.getAtomsNearSurface(f,n.substring(1));break a}if(n.equalsIgnoreCase("group"))m=!0,n=1086324742;else if(n.equalsIgnoreCase("vanderwaals")||n.equalsIgnoreCase("vdw"))g=null,l=!0,n=1648363544;else if(n=JS.T.getTokFromName(n),0==n)return!1}break;case 7:1==d&&(g=a[0].asString(),n=0);break;case 1073742328:k=3==d&&x(a[1].value,"JU.BS")&&x(a[2].value,"JU.BS")?this.vwr.getBranchBitSet(a[2].value.nextSetBit(0),a[1].value.nextSetBit(0),!0):null;break a;case 134218757:case 1237320707:case 134218756:f=!0;
switch(d){case 2:k=e;break;case 3:if(f=10==a[2].tok)k=a[2].value;break;default:f=!1}return f&&c.addXObj(this.e.getSmilesExt().getSmilesMatches(JS.SV.sValue(a[1]),null,k,null,134218756==n?2:1,c.asBitSet,!1))}if("string"==typeof g){if(0==n){n=1073742362;if(2<d)return!1;d=2}}else if(!q)return!1;switch(d){case 1:switch(n){case 2097184:case 136314895:case 1812599299:case 1814695966:k=j.getAtoms(n,null);break a;case 1073741863:k=j.getAtoms(n,"");break a;case 1073742362:k=j.getAtoms(1086324744,h);break a}return!1;
case 2:switch(n){case 1073742362:n=1086324744;break;case 1073741824:case 1086326786:case 1086326785:case 1073741863:case 1086324744:case 1111490587:case 1073742128:case 1073741925:case 1073742189:k=this.vwr.ms.getAtoms(n,JS.SV.sValue(a[1]));break a;case 1094713349:case 1094713350:k=this.vwr.ms.getAtoms(n,JS.SV.ptValue(a[1]));break a;case 1814695966:if(q){k=this.vwr.ms.getAtoms(n,y(-1,[null,Double.$valueOf(f)]));break a}u=!0}break;case 3:switch(n){case 1073742335:case 1073742334:case 1086324742:case 1648363544:case 134217750:case 134219777:case 1073742329:case 8:case 7:break;
case 1086324744:h=JS.SV.sValue(a[1]);break;case 2:case 3:if(!q||!"unitcell".equals(a[2].value))return!1;u=!0;case 1814695966:if(u){if(q){k=this.vwr.ms.getAtoms(1814695966,y(-1,[null,Double.$valueOf(f),Double.$valueOf(p?f:-f)]));break a}}else u=!0;break;default:return!1}break;case 4:switch(n){case 1814695966:if(!q)return!1;u=!0;break;default:return!1}}if(u){a=this.getUnitCell(a,-1,q?2:1,a.length-1);if(null==a)return!1;a=this.vwr.getSymTemp().getUnitCell(a,!1,null);k=this.vwr.ms.getAtoms(n,y(-1,[a,
q?Float.$valueOf(f):null]));break}g=d=u=null;k=a.length-1;switch(a[k].tok){case 9:u=a[k].value;break;case 8:d=a[k].value;JS.SV.sValue(a[1]).equalsIgnoreCase("hkl")&&(u=this.e.getHklPlane(d,NaN,null));break;case 7:g=2==k&&7==a[1].tok?a[1].getList():null,d=2==k?JS.SV.ptValue(a[1]):1==k?JU.P3.new3(NaN,0,0):null}if(null!=u){k=j.getAtomsNearPlane(f,u);break a}j=10==a[k].tok?a[k].value:null;null==e&&(e=j);if(0<k&&null==d&&null==g&&null==e)return!1;if(1814695966==n)return q=p,(null!=e||null!=d)&&c.addXObj(this.vwr.ms.getUnitCellPointsWithin(f,
e,d,q));if(null!=d||null!=g){if(7==a[k].tok){a=a[k].getList();q=Array(a.size());for(n=q.length;0<=--n;)q[n]=JS.SV.ptValue(a.get(n));a=null;if(null!=g){a=Array(g.size());for(n=a.length;0<=--n;)a[n]=JS.SV.ptValue(g.get(n))}n=Array(1);null!=e&&(e.and(this.vwr.getAllAtoms()),a=this.vwr.ms.at);switch(J.bspt.PointIterator.withinDistPoints(f,d,q,a,e,n)){case 10:return c.addXBs(n[0]);case 134217751:return c.addXPt(n[0]);case 1073742001:return c.addXList(n[0]);case 1275068418:return c.addXAI(n[0]);case 4:return c.addXStr(n[0]);
default:return!1}}return c.addXBs(this.vwr.getAtomsNearPt(f,d,null))}if(1086324744==n)return c.addXBs(this.vwr.ms.getSequenceBits(h,e,new JU.BS));null==e&&(e=new JU.BS);if(!q)try{return c.addXBs(this.vwr.ms.getAtoms(n,e))}catch(D){if(N(D,Exception))return!1;throw D;}if(m)return c.addXBs(this.vwr.getGroupsWithin(aa(f),e));l&&(r=new J.atomdata.RadiusData(null,10<f?f/100:f,10<f?J.atomdata.RadiusData.EnumType.FACTOR:J.atomdata.RadiusData.EnumType.OFFSET,J.c.VDW.AUTO),0>f&&(f=0));e=this.vwr.ms.getAtomsWithinRadius(f,
b?j:e,p,r,b?e:null);b&&e.andNot(j);return c.addXBs(e)}return null!=k?(null!=e&&k.and(e),c.addXBs(k)):!1},"JS.ScriptMathProcessor,~A,~B");m(k,"evaluateWrite",function(c,a){if(!this.checkAccess())return!1;var b=a.length,d=!1;2==b&&1073742335==a[1].tok&&(b=1,d=!0);switch(b){case 0:return!1;case 1:var e=a[0].asString().toUpperCase();if(e.equals("PNGJ"))return b=this.vwr.fm.getFileAsMap(null,"PNGJ",d),d?c.addX(JS.SV.newV(15,new JU.BArray(b))):c.addXMap(b);if(JU.PT.isOneOf(e,";ZIP;ZIPALL;JMOL;")){var b=
new java.util.Hashtable,f=new JU.OC;b.put("outputChannel",f);this.vwr.createZip(null,e,b);e=f.toByteArray();if(d)return c.addX(JS.SV.newV(15,new JU.BArray(e)));b=new java.util.Hashtable;this.vwr.readFileAsMap(JU.Rdr.getBIS(e),b,null);return c.addXMap(b)}}return c.addXStr(this.e.getCmdExt().dispatch(134221856,!0,a))},"JS.ScriptMathProcessor,~A");m(k,"getAtomsNearSurface",function(c,a){var b=y(-1,[a,null,null]);if(this.e.getShapePropertyData(24,"getVertices",b))return this.getAtomsNearPts(c,b[1],b[2]);
b[1]=Integer.$valueOf(0);b[2]=Integer.$valueOf(-1);if(this.e.getShapePropertyData(22,"getCenter",b))return this.vwr.getAtomsNearPt(c,b[2],null);b[1]=Float.$valueOf(c);return this.e.getShapePropertyData(21,"getAtomsWithin",b)?b[2]:new JU.BS},"~N,~S");m(k,"getAtomsNearPts",function(c,a,b){var d=new JU.BS;if(0==a.length||null!=b&&b.isEmpty())return d;null==b&&(b=JU.BSUtil.setAll(a.length));for(var e=this.vwr.ms.at,f=this.vwr.ms.ac;0<=--f;){var g=e[f];if(null!=g)for(var h=b.nextSetBit(0);0<=h;h=b.nextSetBit(h+
1))if(g.distance(a[h])<c){d.set(f);break}}return d},"~N,~A,JU.BS");m(k,"getMinMax",function(c,a,b){for(var d=null,e=null,f=0,g=null;;){if(JU.AU.isAF(c)){if(1275068725==a)return Float.$valueOf(NaN);d=c;f=d.length;if(0==f)break}else if(x(c,"JU.Lst"))if(e=c,f=e.size(),0==f){if(1275068725!=a)break}else{if(1275068725!=a){c=e.get(0);if(8==c.tok)return this.getMinMaxPoint(e,a);if(4==c.tok&&c.value.startsWith("{")){b=JS.SV.ptValue(c);if(x(b,"JU.P3"))return this.getMinMaxPoint(e,a);if(x(b,"JU.P4"))return this.getMinMaxQuaternion(e,
a);break}}}else break;var h,j=!1;switch(a){case 1275068725:g=new java.util.Hashtable;c=h=0;break;case 32:j=!0;c=3.4028235E38;h=2147483647;break;case 64:c=-3.4028235E38;h=-2147483647;break;default:c=h=0}for(var l=0,p=0,k=!0,m=1275068725==a;0<=--f;){var t=null==e?null:e.get(f),r=!b?null:null==t?JS.SV.vF:t,n=m?1:null==d?JS.SV.fValue(r):d[f];if(!Float.isNaN(n))switch(p++,a){case 160:case 192:l+=n*n;case 128:case 96:c+=n;break;case 1275068725:t=null==r?t.toString():r.asString();r=g.get(t);g.put(t,null==
r?Integer.$valueOf(1):Integer.$valueOf(r.intValue()+1));break;case 32:case 64:k=(new Boolean(k&2==r.tok)).valueOf(),j==n<c&&(c=n,k&&(h=r.intValue))}}if(1275068725==a)return g;if(0==p)break;switch(a){case 96:c/=p;break;case 192:if(1==p)break;c=Math.sqrt((l-c*c/p)/(p-1));break;case 32:case 64:if(k)return Integer.$valueOf(h);break;case 160:c=l}return Float.$valueOf(c)}return JS.MathExt.nan},"~O,~N,~B");m(k,"getMinMaxPoint",function(c,a){var b=null,d=null,e=0;x(c,Array)?(b=c,e=b.length):x(c,"JU.Lst")&&
(d=c,e=d.size());if(null==d&&null==b)return JS.MathExt.nan;for(var f=new JU.P3,g=u(e,0),h=0;3>h;h++){for(var j=0;j<e;j++){var l=null==b?JS.SV.ptValue(d.get(j)):b[j];if(null==l)return JS.MathExt.nan;switch(h){case 0:g[j]=l.x;break;case 1:g[j]=l.y;break;case 2:g[j]=l.z}}j=this.getMinMax(g,a,!0);if(!x(j,Number))return JS.MathExt.nan;j=j.floatValue();switch(h){case 0:f.x=j;break;case 1:f.y=j;break;case 2:f.z=j}}return f},"~O,~N");m(k,"getMinMaxQuaternion",function(c,a){var b;switch(a){case 32:case 64:case 128:case 160:return JS.MathExt.nan}for(;;){b=
this.e.getQuaternionArray(c,1073742001);if(null==b)break;var d=u(1,0);b=JU.Quat.sphereMean(b,d,1E-4);switch(a){case 96:return b;case 192:return Float.$valueOf(d[0])}break}return JS.MathExt.nan},"JU.Lst,~N");m(k,"getPatternMatcher",function(){return null==this.pm?this.pm=J.api.Interface.getUtil("PatternMatcher",this.e.vwr,"script"):this.pm});m(k,"setContactBitSets",function(c,a,b,d,e,f){var g,h;null==a?(a=JU.BSUtil.setAll(this.vwr.ms.ac),JU.BSUtil.andNot(a,this.vwr.slm.bsDeleted),a.andNot(c),g=!1):
(h=JU.BSUtil.copy(c),h.or(a),h=this.vwr.ms.getModelBS(h,!1).cardinality(),g=1<h,f&&(1<h&&!this.e.tQuiet)&&this.e.showString(J.i18n.GT.$("Note: More than one model is involved in this contact!")));if(!c.equals(a)){if(f=!b||c.cardinality()<a.cardinality())h=this.vwr.ms.getAtomsWithinRadius(d,c,g,Float.isNaN(d)?e:null,null),a.and(h);b&&(h=this.vwr.ms.getAtomsWithinRadius(d,a,g,Float.isNaN(d)?e:null,null),c.and(h),f||(h=this.vwr.ms.getAtomsWithinRadius(d,c,g,Float.isNaN(d)?e:null,null),a.and(h)),h=JU.BSUtil.copy(a),
h.and(c),h.equals(c)?a.andNot(c):h.equals(a)&&c.andNot(a))}return a},"JU.BS,JU.BS,~B,~N,J.atomdata.RadiusData,~B");k.nan=Float.$valueOf(NaN);k.t0=System.currentTimeMillis()});X("J.bspt");U(null,"J.bspt.PointIterator","JU.BS $.Lst $.P3 J.bspt.Bspt JU.BSUtil $.Point3fi".split(" "),function(){var k=ba(J.bspt,"PointIterator",null);k.withinDistPoints=m(k,"withinDistPoints",function(c,a,b,d,e,f){var g=new JU.Lst,h=new J.bspt.Bspt(3,0),j;if(null!=a&&Float.isNaN(a.x)){for(var l=Array(b.length),k=l.length;0<=
--k;){a=b[k];if(null==a)return 0;null==e&&(l[k]=a=JU.Point3fi.newPF(a,k));h.addTuple(a)}j=h.allocateCubeIterator();if(null!=e){b=JU.BS.newN(d.length);for(k=e.nextSetBit(0);0<=k;k=e.nextSetBit(k+1)){j.initialize(d[k],c,!1);for(h=c*c;j.hasMoreElements();)if(j.nextElement().distanceSquared(d[k])<=h){b.set(k);break}}f[0]=b;return 10}b=JU.BSUtil.newBitSet2(0,b.length);for(k=l.length;0<=--k;){j.initialize(a=l[k],c,!1);h=c*c;for(e=0;j.hasMoreElements();)d=j.nextElement(),b.get(d.i)&&(d.distanceSquared(a)<=
h&&1<++e)&&b.clear(d.i)}for(k=b.nextSetBit(0);0<=k;k=b.nextSetBit(k+1))g.addLast(JU.P3.newP(l[k]));f[0]=g;return 1073742001}if(0==c){if(null==d){h=3.4028235E38;l=null;for(k=b.length;0<=--k;)g=b[k],c=g.distanceSquared(a),c<h&&(l=g,h=c);f[0]=null==l?"":l;return null==l?4:134217751}l=O(d.length,0);for(k=l.length;0<=--k;){h=3.4028235E38;e=-1;a=d[k];for(j=b.length;0<=--j;)g=b[j],c=g.distanceSquared(a),c<h&&(e=j,h=c);l[k]=e}f[0]=l;return 1275068418}for(k=b.length;0<=--k;)h.addTuple(b[k]);j=h.allocateCubeIterator();
j.initialize(a,c,!1);for(h=c*c;j.hasMoreElements();)d=j.nextElement(),d.distanceSquared(a)<=h&&g.addLast(d);j.release();f[0]=g;return 1073742001},"~N,JU.P3,~A,~A,JU.BS,~A")});X("JU");U(null,"JU.PatternMatcher",["JV.Viewer"],function(){var k=ba(JU,"PatternMatcher",null);m(k,"compile",function(c,a){if(JV.Viewer.isJS&&!JV.Viewer.isSwingJS)return new JU.PatternMatcher.JSPattern(c,a)},"~S,~B");k=$(function(){this.strString=this.regexp=null;this.rightBound=this.leftBound=-1;this.results=null;Z(this,arguments)},
JU.PatternMatcher,"JSPattern",null);qa(k,function(c,a){this.regexp=RegExp(c,a?"gi":"g")},"~S,~B");m(k,"find",function(){var c=this.rightBound==this.strString.length?this.strString:this.strString.substring(0,this.rightBound);this.regexp.lastIndex=this.leftBound;this.results=this.regexp.exec(c);this.leftBound=this.regexp.lastIndex;return null!=this.results});m(k,"start",function(){return this.regexp.lastIndex-this.results[0].length});m(k,"end",function(){return this.regexp.lastIndex});m(k,"group",function(){return null==
this.results||0==this.results.length?null:this.results[0]});m(k,"matcher",function(c){this.strString=c;this.leftBound=0;this.rightBound=c.length;return this},"~S")})})(Clazz,Clazz.getClassName,Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.floatToLong,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.newFloatArray,Clazz.declareType,
Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAB,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,
Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.cloneFinals);
