(function(ba,ca,da,ea,Q,fa,F,s,P,N,R,I,Y,S,ga,E,K,T,M,Z,U,W,ha,V,ia,ja,X,ka,la,ma,O,na,oa,pa,qa,$,aa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,d,q){F("J.api");V(J.api,"JmolParallelProcessor");F("J.api");V(J.api,"JmolScriptEvaluator");F("J.api");V(J.api,"JmolScriptFunction");F("J.api");V(J.api,"JmolScriptManager");F("JS");P(["J.thread.JmolThread"],"JS.CommandWatcherThread",["java.lang.Thread","JU.Logger"],function(){c$=R(function(){this.scriptManager=null;N(this,arguments)},JS,
"CommandWatcherThread",J.thread.JmolThread);S(c$,function(){W(this,JS.CommandWatcherThread,[])});q(c$,"setManager",function(a,b){this.scriptManager=a;this.setViewer(b,"CommmandWatcherThread");return 0},"~O,JV.Viewer,~O");q(c$,"run",function(){for(Thread.currentThread().setPriority(1);!this.stopped;)try{Thread.sleep(50),this.stopped||this.scriptManager.runScriptNow()}catch(a){if(E(a,InterruptedException)){var b=a;JU.Logger.warn("CommandWatcher InterruptedException! "+this);break}else if(E(a,Exception)){b=
a;JU.Logger.warn("CommandWatcher Exception! script processing ERROR:\n\n"+b.toString());break}else throw a;}});q(c$,"run1",function(){},"~N");T(c$,"commandDelay",50)});F("JS");P(["J.thread.JmolThread"],"JS.FileLoadThread",null,function(){c$=R(function(){this.key=this.cacheName=this.fileName=null;N(this,arguments)},JS,"FileLoadThread",J.thread.JmolThread);S(c$,function(a,b,c,e,f){this.setViewer(b,"FileLoadThread");this.fileName=c;this.key=e;this.cacheName=f;this.setEval(a);this.sc.pc--},"J.api.JmolScriptEvaluator,JV.Viewer,~S,~S,~S");
q(c$,"run1",function(a){for(;;)switch(a){case -1:a=0;break;case 0:if(this.stopped||!this.vwr.testAsync&&this.eval.isStopped()){a=-2;break}a=null;a=Jmol;null!=a&&a._loadFileAsynchronously(this,this.vwr.html5Applet,this.fileName,null);return;case 1:a=this.vwr.fm.getFileAsBytes(this.fileName,null);this.setData(this.fileName,this.fileName,a,null);return;case -2:this.resumeEval();return}},"~N");d(c$,"setData",function(a,b,c){var e=a.equals("#CANCELED#");this.sc.parentContext.htFileCache.put(this.key,e?
a:this.cacheName=this.cacheName.substring(0,this.cacheName.lastIndexOf("_")+1)+a);this.vwr.cachePut(this.cacheName,c);null!=b&&this.vwr.cachePut(this.vwr.fm.getFilePath(a,!0,!1),c);this.run1(-2)},"~S,~S,~O,~O")});F("JS");P(["JS.ScriptTokenParser","JU.Lst"],"JS.ScriptCompiler","java.lang.Boolean $.Float java.util.Hashtable JU.AU $.BS $.M34 $.M4 $.PT $.SB J.api.Interface J.i18n.GT JM.BondSet $.Group JS.ContextToken $.SV $.ScriptContext $.ScriptError $.ScriptFlowContext $.ScriptFunction $.ScriptManager $.ScriptParam $.T JU.Escape $.Logger JV.FileManager $.Viewer".split(" "),
function(){c$=R(function(){this.filename=null;this.isSilent=!1;this.lineIndices=this.lineNumbers=this.aatokenCompiled=this.contextVariables=null;this.lnLength=8;this.haveComments=this.isCheckOnly=this.isShowScriptOutput=this.preDefining=!1;this.vBraces=this.lltoken=this.ltoken=this.flowContext=this.thisFunction=this.scriptExtensions=null;this.iBrace=this.setEqualPt=this.forPoint3=this.ptSemi=this.bracketCount=this.setBraceCount=this.braceCount=this.parenCount=this.nSemiSkip=this.cchScript=this.cchToken=
this.ichBrace=0;this.endOfLine=this.needRightParen=this.isEndOfCommand=this.iHaveQuotedString=!1;this.comment=null;this.tokLastMath=0;this.checkImpliedScriptCmd=!1;this.vFunctionStack=null;this.implicitString=this.isUserToken=this.isComment=this.isShowCommand=this.allowMissingEnd=!1;this.afterWhite=this.tokInitialPlusPlus=0;this.isDotDot=!1;this.vPush=this.identLC=this.ident=null;this.pushCount=0;this.forceFlowContext=null;this.haveENDIF=!1;this.chFirst="\x00";this.afterMath=0;N(this,arguments)},
JS,"ScriptCompiler",JS.ScriptTokenParser);U(c$,function(){this.vPush=new JU.Lst});S(c$,function(a){this.vwr=a},"JV.Viewer");d(c$,"compile",function(a,b,c,e,f,j){this.isCheckOnly=j;this.filename=a;this.isSilent=e;this.script=b;this.logMessages=!e&&!c&&f;this.preDefining="#predefine"===a;a=this.compile0(!0);this.atokenInfix=null;a||this.handleError();c=new JS.ScriptContext;a=0==this.iBrace&&0==this.parenCount&&0==this.braceCount&&0==this.bracketCount;c.isComplete=a;c.script=b;c.scriptExtensions=this.scriptExtensions;
c.errorType=this.errorType;null!=this.errorType&&(c.iCommandError=this.iCommand,this.setAaTokenCompiled());c.saveTokens(this.aatokenCompiled);c.errorMessage=this.errorMessage;c.errorMessageUntranslated=null==this.errorMessageUntranslated?this.errorMessage:this.errorMessageUntranslated;this.allowMissingEnd&&(null!=c.errorMessage&&0<=c.errorMessageUntranslated.indexOf("missing END"))&&(c.errorMessage=c.errorMessageUntranslated);c.lineIndices=this.lineIndices;c.lineNumbers=this.lineNumbers;c.vars=this.contextVariables;
return c},"~S,~S,~B,~B,~B,~B");d(c$,"newContextVariable",function(a){this.theToken=JS.T.o(1073741824,a);if(0<this.pushCount){var b=this.vPush.get(this.pushCount-1);b.addName(a);if(364558!=b.tok)return}null==this.thisFunction?(null==this.contextVariables&&(this.contextVariables=new java.util.Hashtable),JS.ScriptCompiler.addContextVariable(this.contextVariables,a)):this.thisFunction.addVariable(a,!1)},"~S");c$.addContextVariable=d(c$,"addContextVariable",function(a,b){a.put(b,JS.SV.newS("").setName(b))},
"java.util.Map,~S");d(c$,"isContextVariable",function(a){for(var b=this.vPush.size();0<=--b;){var c=this.vPush.get(b);if(null!=c.contextVariables&&c.contextVariables.containsKey(a))return!0}return null!=this.thisFunction?this.thisFunction.isVariable(a):null!=this.contextVariables&&this.contextVariables.containsKey(a)},"~S");d(c$,"cleanScriptComments",function(a){0<=a.indexOf("\u201c")&&(a=a.$replace("\u201c",'"'));0<=a.indexOf("\u201d")&&(a=a.$replace("\u201d",'"'));0<=a.indexOf("\ufeff")&&(a=a.$replace("\ufeff",
" "));var b=a.indexOf("\u0001##");0<=b&&(this.scriptExtensions=a.substring(b+1),a=a.substring(0,b),this.allowMissingEnd=0<=this.scriptExtensions.indexOf("##noendcheck"));this.haveComments=0<=a.indexOf("#");return JV.FileManager.getEmbeddedScript(a)},"~S");d(c$,"addTokenToPrefix",function(a){this.logMessages&&JU.Logger.info("addTokenToPrefix"+this.lineCurrent+" "+this.iCommand+" "+a);this.ltoken.addLast(a);0!=a.tok&&(this.lastToken=a)},"JS.T");d(c$,"compile0",function(a){this.haveENDIF=!1;this.script=
this.cleanScriptComments(this.script);this.ichToken=this.script.indexOf("# Jmol state version ");if(this.isStateScript=0<=this.ichToken)this.ptSemi=this.script.indexOf(";",this.ichToken),this.ptSemi>=this.ichToken&&JS.ScriptManager.setStateScriptVersion(this.vwr,this.script.substring(this.ichToken+21,this.ptSemi).trim());this.cchScript=this.script.length;a:for(;;){this.vFunctionStack=new JU.Lst;this.htUserFunctions=new java.util.Hashtable;this.errorLine=this.errorMessageUntranslated=this.errorMessage=
this.errorType=this.flowContext=this.thisFunction=this.aatokenCompiled=this.lineIndices=this.lineNumbers=this.contextVariables=null;this.ichBrace=this.ichComment=this.ichCurrentCommand=this.ichToken=this.nSemiSkip=0;this.lineCurrent=1;this.tokLastMath=this.iCommand=0;this.lastToken=JS.T.tokenOff;this.vBraces=new JU.Lst;this.vPush=new JU.Lst;this.parenCount=this.braceCount=this.iBrace=this.pushCount=0;this.isDotDot=!1;this.ptSemi=-10;this.cchToken=0;this.lnLength=8;this.lineNumbers=X(this.lnLength,
0);this.lineIndices=K(this.lnLength,2,0);this.isNewSet=this.isSetBrace=!1;this.ptNewSetModifier=1;this.checkImpliedScriptCmd=this.iHaveQuotedString=this.isShowScriptOutput=!1;this.lltoken=new JU.Lst;this.ltoken=new JU.Lst;this.tokCommand=0;this.tokenAndEquals=this.lastFlowCommand=null;this.bracketCount=this.setBraceCount=this.tokInitialPlusPlus=0;this.forPoint3=-1;this.setEqualPt=2147483647;this.endOfLine=!1;this.comment=null;this.needRightParen=this.isEndOfCommand=!1;this.forceFlowContext=this.lastFlowCommand=
null;this.theTok=0;for(var b=1;;this.ichToken+=this.cchToken){if(0==(this.nTokens=this.ltoken.size()))null!=this.thisFunction&&0==this.thisFunction.chpt0&&(this.thisFunction.chpt0=this.ichToken),this.ichCurrentCommand=this.ichToken,b=this.lineCurrent;if(!this.lookingAtLeadingWhitespace()){this.endOfLine=!1;if(!this.isEndOfCommand){this.endOfLine=this.lookingAtEndOfLine();switch(this.endOfLine?0:this.lookingAtComment()){case 2:continue;case 3:this.isEndOfCommand=!0;continue;case 1:this.isEndOfCommand=
!0,this.comment=this.script.substring(this.ichToken,this.ichToken+this.cchToken).trim()}this.isEndOfCommand=this.isEndOfCommand||this.endOfLine||this.lookingAtTerminator()}if(this.isEndOfCommand){this.isEndOfCommand=!1;switch(this.processTokenList(b,a)){case 2:continue;case 4:return!1}this.checkImpliedScriptCmd=!1;if(this.ichToken<this.cchScript)continue;if(null!=this.flowContext){for(this.ichCurrentCommand=this.ichToken=this.cchScript;null!=this.flowContext;)if(this.fixFlowAddLine(this.flowContext),
!this.haveENDIF&&this.flowContext.checkForceEndIf(0))this.forceFlowEnd(this.flowContext.token),this.processTokenList(b,a);else return this.lineCurrent=this.flowContext.lineStart,this.iCommand=this.flowContext.pt0,this.ichCurrentCommand=this.lineIndices[this.iCommand][0],this.ichToken=this.ichEnd=this.lineIndices[this.iCommand][1],this.errorStr(11,null==this.flowContext.$function?JS.T.nameOf(this.flowContext.token.tok):this.flowContext.$function.getSignature());this.lltoken.addLast(O(-1,[JS.T.o(0,
"// end of script")]))}this.setAaTokenCompiled();return!0}if(0<this.nTokens&&!this.isDotDot)switch(this.checkSpecialParameterSyntax()){case 2:continue;case 4:return!1}if(this.lookingAtLookupToken(this.ichToken)){switch(this.parseKnownToken()){case 2:continue;case 4:return!1;case 5:this.haveENDIF=!0;continue a}switch(this.parseCommandParameter(b,a)){case 2:continue;case 4:return!1;case 5:this.haveENDIF=!0;continue a}this.addTokenToPrefix(this.theToken)}else{if(0==this.nTokens||(this.isNewSet||this.isSetBrace)&&
this.nTokens==this.ptNewSetModifier){if(0==this.nTokens){if(this.lookingAtString(!0)){this.addTokenToPrefix(this.setCommand(JS.T.tokenScript));this.cchToken=0;continue}this.lookingAtImpliedString(!0,!0,!0)&&(this.ichEnd=this.ichToken+this.cchToken)}return this.commandExpected()}return this.errorStr(19,this.script.substring(this.ichToken,this.ichToken+1))}}}}},"~B");d(c$,"setAaTokenCompiled",function(){this.aatokenCompiled=this.lltoken.toArray(Array(this.lltoken.size()))});d(c$,"lookingAtLeadingWhitespace",
function(){for(var a=this.ichToken;JS.ScriptCompiler.isSpaceOrTab(this.charAt(a));)++a;this.isLineContinuation(a,!0)&&(a+=1+this.nCharNewLine(a+1));this.cchToken=a-this.ichToken;if(0==this.cchToken)return!1;this.afterWhite=a;return!0});d(c$,"isLineContinuation",function(a,b){var c=a+2<this.cchScript&&"\\"==this.script.charAt(a)&&0<this.nCharNewLine(a+1)||!this.isShowScriptOutput&&b&&this.lookingAtMathContinuation(a);c&&this.lineCurrent++;return c},"~N,~B");d(c$,"lookingAtMathContinuation",function(a){var b;
if(0==(b=this.nCharNewLine(a))||1073742332==this.lastToken.tok)return!1;if(0<this.parenCount||0<this.bracketCount)return!0;switch(this.tokCommand){case 134320141:case 102436:return this.flowContext.forceEndIf=!1;case 134320648:case 102406:case 134320649:case 364547:case 102402:return this.haveENDIF||(this.flowContext.addLine=1,this.flowContext.forceEndIf=!0),!1;case 36867:if(1<this.nTokens&&537022465==this.ltoken.get(1).tok)return!1;case 36865:case 36869:break;default:return!1}if(this.lastToken.tok==
this.tokLastMath)return!0;for(a+=b;JS.ScriptCompiler.isSpaceOrTab(this.charAt(a));)++a;return this.lookingAtLookupToken(a)&&1==this.tokLastMath},"~N");d(c$,"lookingAtEndOfLine",function(){return this.ichToken>=this.cchScript?(this.ichEnd=this.cchScript,!0):0<(this.cchToken=this.nCharNewLine(this.ichEnd=this.ichToken))});d(c$,"nCharNewLine",function(a){var b;return"\r"!=(b=this.charAt(a))?"\n"==b?1:0:"\n"==this.charAt(++a)?2:1},"~N");d(c$,"lookingAtTerminator",function(){var a=";"==this.script.charAt(this.ichToken);
a&&0<this.nTokens&&(this.ptSemi=this.nTokens);if(!a||0<this.nSemiSkip--)return!1;this.cchToken=1;return!0});d(c$,"lookingAtComment",function(){var a=this.script.charAt(this.ichToken),b=this.ichToken,c=-1;if(this.ichToken==this.ichCurrentCommand&&"$"==a&&(this.isShowScriptOutput||0==this.ichToken)){this.isShowCommand=this.isShowScriptOutput=!0;if("["==this.charAt(++b))for(;"]"!=a&&!this.eol(a=this.charAt(b));)++b;this.cchToken=b-this.ichToken;return 2}this.isShowScriptOutput&&!this.isShowCommand&&
(c=b);if("/"==a&&b+1<this.cchScript)switch(this.script.charAt(++b)){case "/":c=this.ichToken;this.ichEnd=b-1;break;case "*":this.ichEnd=b-1;b="*"==(a=this.charAt(++b))?"**/":"*/";b=this.script.indexOf(b,this.ichToken+2);if(0>b)return this.ichToken=this.cchScript,3;this.incrementLineCount(this.script.substring(this.ichToken,b));this.cchToken=b+("*"==a?3:2)-this.ichToken;return 2;default:return 0}var e=0>c;if(e&&!this.haveComments)return 0;this.ichComment>b&&(b=this.ichComment);for(;b<this.cchScript;b++){if(this.eol(a=
this.script.charAt(b))){this.ichEnd=b;if(0<b&&this.isLineContinuation(b-1,!1)){b+=this.nCharNewLine(b);continue}if(!e&&";"==a)continue;break}0<=c||"#"==a&&(c=b)}if(0>c)return 0;this.ichComment=c;if(e&&0==this.nTokens&&3<=this.cchScript-c&&"j"==this.script.charAt(c+1)&&"c"==this.script.charAt(c+2))return this.cchToken=b-this.ichToken,2;if(c!=this.ichToken)return 0;if(e&&this.cchScript>this.ichToken+3&&"j"==this.script.charAt(this.ichToken+1)&&"x"==this.script.charAt(this.ichToken+2)&&JS.ScriptCompiler.isSpaceOrTab(this.script.charAt(this.ichToken+
3)))return this.cchToken=4,2;if(b==this.ichToken)return 0;this.cchToken=b-this.ichToken;return 0==this.nTokens?1:2});d(c$,"charAt",function(a){return a<this.cchScript?this.script.charAt(a):"\x00"},"~N");d(c$,"processTokenList",function(a,b){var c=this.ltoken.size();if(0<c||null!=this.comment){if(0==c)this.ichCurrentCommand=this.ichToken,null!=this.comment&&(this.isComment=!0,this.addTokenToPrefix(JS.T.o(0,this.comment)));else if(0<this.setBraceCount&&this.endOfLine&&this.ichToken<this.cchScript)return 2;
if(this.wasImpliedScript())return 2;this.isNewSet&&2<c&&1073742336==this.tokAt(2)&&(1275068444==this.tokAt(3)||1140850693==this.tokAt(3)||1275335685==this.tokAt(3)||1275334681==this.tokAt(3))?(this.ltoken.set(0,JS.T.tokenSet),this.ltoken.add(1,1275334681==this.tokAt(3)?JS.T.tokenAll:this.ltoken.get(1))):0!=this.tokInitialPlusPlus&&(this.isNewSet||this.checkNewSetCommand(),this.tokenizePlusPlus(this.tokInitialPlusPlus,!0),this.ichCurrentCommand-=2);this.iCommand=this.lltoken.size();null!=this.thisFunction&&
0>this.thisFunction.cmdpt0&&(this.thisFunction.cmdpt0=this.iCommand);if(1==c&&1==this.braceCount)if(null==this.lastFlowCommand){this.parenCount=this.setBraceCount=this.braceCount=0;this.ltoken.removeItemAt(0);var e=JS.ContextToken.newContext(!0);this.addTokenToPrefix(this.setCommand(e));this.pushContext(e);this.addBrace(this.tokenCommand)}else this.parenCount=this.setBraceCount=0,this.setCommand(this.lastFlowCommand),102439!=this.lastFlowCommand.tok&&1073742332==this.tokAt(0)&&this.ltoken.removeItemAt(0),
this.lastFlowCommand=null,this.forceFlowContext=this.flowContext;if(0<this.bracketCount||0<this.setBraceCount||0<this.parenCount||1==this.braceCount&&!this.checkFlowStartBrace(!0))return this.error(1==c?2:4),4;this.needRightParen&&(this.addTokenToPrefix(JS.T.tokenRightParen),this.needRightParen=!1);if(1073741974==this.tokAt(1)&&JS.T.tokAttr(this.tokCommand,135168))switch(this.tokAt(2)){case 0:case 4:case 12290:break;default:e=this.ltoken.removeItemAt(2),this.ltoken.add(2,JS.T.o(4,2==e.tok?""+e.intValue:
e.value.toString()))}if(0<this.ltoken.size()){if(b&&!this.compileCommand())return 4;this.logMessages&&JU.Logger.info("-------------------------------------");e=!0;switch(this.tokCommand){case 364558:case 102436:case 134320141:case 102409:e=0<this.atokenInfix.length&&2147483647!=this.atokenInfix[0].intValue}e&&(this.iCommand==this.lnLength&&(this.lineNumbers=JU.AU.doubleLengthShort(this.lineNumbers),e=K(2*this.lnLength,2,0),System.arraycopy(this.lineIndices,0,e,0,this.lnLength),this.lineIndices=e,
this.lnLength*=2),this.lineNumbers[this.iCommand]=this.lineNumbers[this.lineNumbers.length-1]=a,this.lineIndices[this.iCommand][0]=this.ichCurrentCommand,this.lineIndices[this.iCommand][1]=Math.max(this.ichCurrentCommand,Math.min(this.cchScript,this.ichEnd==this.ichCurrentCommand?this.ichToken:this.ichEnd)),this.lltoken.addLast(this.atokenInfix),this.iCommand=this.lltoken.size());36867==this.tokCommand&&(this.lastFlowCommand=null)}this.setCommand(null);this.comment=null;this.iHaveQuotedString=this.isNewSet=
this.isSetBrace=this.needRightParen=!1;this.ptNewSetModifier=1;this.ltoken.clear();this.tokInitialPlusPlus=this.nTokens=this.nSemiSkip=0;this.tokenAndEquals=null;this.ptSemi=-10;this.forPoint3=-1;this.setEqualPt=2147483647}var e=null!=this.flowContext&&0==this.flowContext.addLine,f=(this.endOfLine||!e)&&!this.haveENDIF&&null!=this.flowContext&&this.flowContext.checkForceEndIf(-1);if(this.endOfLine){if(f){if(this.isComment)e||(this.flowContext.addLine++,this.flowContext.forceEndIf=!0);else if(0<c&&
!this.haveENDIF||e)this.forceFlowEnd(this.flowContext.token),e||(this.forceFlowContext.forceEndIf=!0);this.isEndOfCommand=!0;this.cchToken=0;this.ichCurrentCommand=this.ichToken;return 2}this.isShowCommand=this.isComment=!1;++this.lineCurrent}else f&&(this.forceFlowEnd(this.flowContext.token),this.forceFlowContext.forceEndIf=!0);if(this.ichToken>=this.cchScript){this.setCommand(JS.T.tokenAll);this.theTok=0;switch(this.checkFlowEndBrace()){case 4:return 4;case 2:return this.isEndOfCommand=!0,this.cchToken=
0,2}this.ichToken=this.cchScript}return 0},"~N,~B");d(c$,"addBrace",function(a){this.vBraces.addLast(a);this.iBrace++},"JS.T");d(c$,"pushContext",function(a){this.pushCount++;this.vPush.addLast(a)},"JS.T");d(c$,"wasImpliedScript",function(){if(this.checkImpliedScriptCmd&&2<=this.nTokens&&(134222850==this.tokCommand||4124==this.tokCommand)){var a=2==this.nTokens?this.lastToken.value.toString().toUpperCase():null;if(2<this.nTokens?!(268435472==this.tokAt(2)&&this.ltoken.get(1).value.toString().endsWith(".spt")):
a.endsWith(".SORT")||a.endsWith(".REVERSE")||a.endsWith(".POP")||0<=a.indexOf(".SORT(")||0<=a.indexOf(".REVERSE(")||0<=a.indexOf(".POP(")||0<=a.indexOf(".PUSH(")||a.endsWith("++")||a.endsWith("--")||a.endsWith("=")||0!=this.tokInitialPlusPlus)return this.ichToken=this.ichCurrentCommand,this.nTokens=0,this.ltoken.clear(),this.tokCommand=this.cchToken=0,!0}return!1});d(c$,"compileCommand",function(){switch(this.ltoken.size()){case 0:return this.atokenInfix=[],!0;case 4:if(this.isNewSet&&this.tokenAt(2).value.equals(".")&&
this.tokenAt(3).value.equals("spt")){var a=this.tokenAt(1).value+"."+this.tokenAt(3).value;this.ltoken.clear();this.addTokenToPrefix(JS.T.tokenScript);this.addTokenToPrefix(JS.T.o(4,a));this.isNewSet=!1}}this.setCommand(this.tokenAt(0));a=this.ltoken.size();1==a&&JS.T.tokAttr(this.tokCommand,524288)&&this.addTokenToPrefix(JS.T.tokenOn);if(null!=this.tokenAndEquals){for(var b,c=0,c=1;c<a&&268435666!=this.tokAt(c);c++);a=c;c++;if(this.ltoken.size()<c)JU.Logger.error("COMPILER ERROR! - andEquals ");
else{for(b=1;b<a;b++,c++)this.ltoken.add(c,this.tokenAt(b));this.ltoken.set(a,JS.T.tokenEquals);this.ltoken.add(c,this.tokenAndEquals);this.ltoken.add(++c,JS.T.tokenLeftParen);this.addTokenToPrefix(JS.T.tokenRightParen)}}this.atokenInfix=this.ltoken.toArray(Array(this.ltoken.size()));return this.compileExpressions()});d(c$,"tokenAt",function(a){return this.ltoken.get(a)},"~N");q(c$,"tokAt",function(a){return a<this.ltoken.size()?this.tokenAt(a).tok:0},"~N");d(c$,"setCommand",function(a){this.tokenCommand=
a;null==a?this.tokCommand=0:(this.tokCommand=this.tokenCommand.tok,this.isMathExpressionCommand=1073741824==this.tokCommand||JS.T.tokAttr(this.tokCommand,36864),this.isSetOrDefine=36867==this.tokCommand||12290==this.tokCommand,this.isCommaAsOrAllowed=JS.T.tokAttr(this.tokCommand,12288),this.implicitString=JS.T.tokAttr(this.tokCommand,20480));return a},"JS.T");d(c$,"replaceCommand",function(a){this.ltoken.removeItemAt(0);this.ltoken.add(0,this.setCommand(a))},"JS.T");d(c$,"getPrefixToken",function(){this.ident=
this.script.substring(this.ichToken,this.ichToken+this.cchToken);this.identLC=this.ident.toLowerCase();var a=1073742336!=this.lastToken.tok&&!this.isDotDot&&this.isContextVariable(this.identLC),b=this.ident,c=null;0==this.nTokens&&(this.isUserToken=a);if(1==this.nTokens&&(134320141==this.tokCommand||102436==this.tokCommand||36868==this.tokCommand)||0!=this.nTokens&&a||!this.isDotDot&&this.isUserFunction(this.identLC)&&null!=(c=this.ident)&&(null==this.thisFunction||!this.thisFunction.name.equals(this.identLC)))this.ident=
null==c?this.identLC:c,this.theToken=null;else if(1==this.ident.length||268435490==this.lastToken.tok){if(null==(this.theToken=JS.T.getTokenFromName(this.ident))&&null!=(this.theToken=JS.T.getTokenFromName(this.identLC)))this.theToken=JS.T.tv(this.theToken.tok,this.theToken.intValue,this.ident)}else if(this.theToken=JS.T.getTokenFromName(this.identLC),a&&(null!=this.theToken&&!this.theToken.value.toString().equalsIgnoreCase(this.identLC))&&(this.theToken=null),null!=this.theToken)switch(this.lastToken.tok){case 1073742336:case 268435520:case 268435504:this.theToken=
JS.T.o(this.theToken.tok,this.ident)}null==this.theToken&&(this.theToken=JS.SV.newSV(0==this.identLC.indexOf("property_")?1715472409:1073741824,2147483647,this.ident).setName(b));return this.theTok=this.theToken.tok});d(c$,"checkSpecialParameterSyntax",function(){if(this.lookingAtString(!this.implicitString)){if(0>this.cchToken)return this.ERROR(4);var a=this.getUnescapedStringLiteral(null!=this.lastToken&&!this.iHaveQuotedString&&1073741983!=this.lastToken.tok&&(36867==this.tokCommand&&2==this.nTokens&&
545259546==this.lastToken.tok||134222849==this.tokCommand||1610616835==this.tokCommand||134222850==this.tokCommand||4124==this.tokCommand));this.iHaveQuotedString=!0;if((134222849==this.tokCommand||135174==this.tokCommand)&&134221834==this.lastToken.tok||134221834==this.tokCommand&&0>a.indexOf("@")){if(!this.getData(a))return this.ERROR(11,"data")}else this.addTokenToPrefix(JS.T.o(4,a)),this.implicitString&&(this.ichEnd=this.ichToken+this.cchToken,this.isEndOfCommand=!0);return 2}if(this.nTokens==
this.ptNewSetModifier){var a=this.script.charAt(this.ichToken),b=0<="+-\\*/&|=".indexOf(a),c=b||"."==a||"["==a,e=this.charAt(this.ichToken+1);if(!this.isNewSet&&this.isUserToken&&c&&("="==a||e==a||"="==e))this.isNewSet=!0;if(this.isNewSet||36867==this.tokCommand||JS.T.tokAttr(this.tokCommand,536870912))if("="==a&&(this.setEqualPt=this.ichToken),JS.T.tokAttr(this.tokCommand,536870912)&&"="==a||(this.isNewSet||this.isSetBrace)&&c)switch(this.setCommand(b?JS.T.tokenSet:"["==a&&!this.isSetBrace||"."==
a&&"."==e?JS.T.tokenSetArray:JS.T.tokenSetProperty),this.ltoken.add(0,this.tokenCommand),this.cchToken=1,a){case "[":return this.tokLastMath=1,this.addTokenToPrefix(JS.T.tokenArrayOpen),this.bracketCount++,2;case ".":if("."==e)return this.addTokenToPrefix(JS.T.tokenArrayOpen),this.cchToken=2,this.isDotDot=!0,2;this.addTokenToPrefix(JS.T.o(1073742336,"."));return 2;case "-":case "+":case "*":case "/":case "\\":case "&":case "|":if(0==e.charCodeAt(0))return this.ERROR(4);if(e!=a&&"="!=e)return this.ERROR(1,
'"'+a+'"');break;default:return this.lastToken=JS.T.tokenMinus,2}}a:switch(this.tokCommand){case 134222350:switch(this.lastToken.tok){case 4120:case 1296041986:case 1715472409:case 1073877010:2==this.nTokens&&(this.iHaveQuotedString=!0);break;case 1073741925:case 1073742189:break;default:if(!this.iHaveQuotedString&&2!=this.nTokens)return 0;break}case 134222849:case 134222850:case 4124:case 1275072526:if("@"==this.script.charAt(this.ichToken))return this.iHaveQuotedString=!0,0;switch(this.tokCommand){case 4124:this.haveMacro=
!0;break a;case 134222849:if(1==this.nTokens||2==this.nTokens&&1073741839==this.tokAt(1)){a=JV.Viewer.isDatabaseCode(this.charAt(this.ichToken));if(this.lookingAtLoadFormat(a)){var f=this.script.substring(this.ichToken,this.ichToken+this.cchToken),j=JS.T.getTokenFromName(f.toLowerCase());switch(null==j?0:j.tok){case 36868:case 1073742015:case 1073742077:case 1073741839:case 1610616855:case 4130:case 1073877011:if(1!=this.nTokens)return 4;case 134221834:case 1228935687:case 1073741983:case 1094717454:case 134218757:case 536870926:case 1073741849:case 1073741851:this.addTokenToPrefix(j);
break;default:j=a?4:JU.PT.isOneOf(f=f.toLowerCase(),";xyz;vxyz;vibration;temperature;occupancy;partialcharge;")?1073741824:0,0!=j&&(this.addTokenToPrefix(JS.T.o(j,f)),this.iHaveQuotedString=4==j)}return 2}break}if("{"==this.script.charAt(this.ichToken)||0<this.parenCount)break a;if(null!=(a=this.lookingAtBitset()))return this.addTokenToPrefix(JS.T.o(10,a)),2}if(!this.iHaveQuotedString&&this.lookingAtImpliedString(134222350==this.tokCommand,134222849==this.tokCommand,1<this.nTokens||134222850!=this.tokCommand&&
4124!=this.tokCommand)){a=this.script.substring(this.ichToken,this.ichToken+this.cchToken);if(134222850==this.tokCommand)if(a.startsWith("javascript:"))this.lookingAtImpliedString(!0,!0,!0),a=this.script.substring(this.ichToken,this.ichToken+this.cchToken);else if(0<=a.toUpperCase().indexOf(".PUSH("))return this.cchToken=0,this.iHaveQuotedString=!0,2;this.iHaveQuotedString=!0;this.addTokenToPrefix(JS.T.o(4,a));return 2}break;case 4156:if(1==this.nTokens&&this.lookForSyncID())return f=this.script.substring(this.ichToken,
this.ichToken+this.cchToken),j=JU.PT.parseInt(f),-2147483648==j||1E3>Math.abs(j)?this.addTokenToPrefix(JS.T.o(1073741824,f)):this.addTokenToPrefix(JS.T.i(j)),2;break;case 134221856:if(2==this.nTokens&&4115==this.lastToken.tok&&(this.iHaveQuotedString=!0),!this.iHaveQuotedString){if("@"==this.script.charAt(this.ichToken))return this.iHaveQuotedString=!0,0;if(this.lookingAtImpliedString(!0,!0,!0)&&(a=this.script.substring(this.ichToken,this.ichToken+this.cchToken),b=a.indexOf(" as "),0<b&&(a=a.substring(0,
this.cchToken=b)),0>a.indexOf(" ")&&0<=a.indexOf(".")))return this.addTokenToPrefix(JS.T.o(4,a)),this.iHaveQuotedString=!0,2}}if((this.implicitString=(new Boolean(this.implicitString&1==this.nTokens)).valueOf())&&(!(134222850==this.tokCommand||4124==this.tokCommand)||!this.iHaveQuotedString)&&this.lookingAtImpliedString(!0,!0,!0))return a=this.script.substring(this.ichToken,this.ichToken+this.cchToken),1825200146==this.tokCommand&&JU.PT.isOneOf(a.toLowerCase(),";on;off;hide;display;")?this.addTokenToPrefix(JS.T.getTokenFromName(a.toLowerCase())):
this.addTokenToPrefix(JS.T.o(4,a)),2;if(this.lookingAtObjectID())return this.addTokenToPrefix(JS.T.getTokenFromName("$")),this.addTokenToPrefix(JS.T.o(1073741824,this.script.substring(this.ichToken,this.ichToken+this.cchToken))),2;if(!Float.isNaN(a=this.lookingAtExponential()))return this.addNumber(3,2147483647,Float.$valueOf(a)),2;if(this.lookingAtDecimal())return a=JU.PT.fVal(this.script.substring(this.ichToken,this.ichToken+this.cchToken)),f=JS.ScriptParam.getFloatEncodedInt(this.script.substring(this.ichToken,
this.ichToken+this.cchToken)),this.addNumber(3,f,Float.$valueOf(a)),2;if(this.lookingAtSeqcode()){a=this.script.charAt(this.ichToken);try{f="*"==a||"^"==a?2147483647:Integer.parseInt(this.script.substring(this.ichToken,this.ichToken+this.cchToken-2));j=this.script.charAt(this.ichToken+this.cchToken-1);"^"==j&&(j=" ");0>f&&(f=-f,this.addTokenToPrefix(JS.T.tokenMinus));var d=JM.Group.getSeqcodeFor(f,j);this.addTokenToPrefix(JS.T.tv(5,d,"seqcode"))}catch(g){if(E(g,NumberFormatException))return this.ERROR(9,
""+a);throw g;}return 2}f=this.lookingAtInteger();if(2147483647!=f){j=this.script.substring(this.ichToken,this.ichToken+this.cchToken);if(102407==this.tokCommand||102408==this.tokCommand){if(1!=this.nTokens)return this.ERROR(0);d=null==this.flowContext?null:this.flowContext.getBreakableContext(f=Math.abs(f));if(null==d)return this.ERROR(1,this.tokenCommand.value);this.tokenAt(0).intValue=d.pt0}this.addNumber(2,f,j);return 2}if(!this.isMathExpressionCommand&&0==this.parenCount||1073741824!=this.lastToken.tok&&
!JS.ScriptTokenParser.tokenAttr(this.lastToken,134217728)){f="["==this.script.charAt(this.ichToken);a=this.lookingAtBitset();if(null!=a)return this.addTokenToPrefix(JS.T.o(10,f?JM.BondSet.newBS(a,null):a)),2;if(f&&(f=this.lookingAtMatrix(),s(f,JU.M34)))return this.addTokenToPrefix(JS.T.o(s(f,JU.M4)?12:11,f)),2}return 0});d(c$,"addNumber",function(a,b,c){this.addTokenToPrefix(this.afterWhite==this.ichToken?JS.SV.newSV(a,b,c):JS.T.tv(a,b,c))},"~N,~N,~O");d(c$,"lookingAtMatrix",function(){var a,b;if(this.ichToken+
4>=this.cchScript||"["!=this.script.charAt(this.ichToken)||"["!=this.script.charAt(this.ichToken+1)||0>(a=this.script.indexOf("]]",this.ichToken))||null==(b=JU.Escape.unescapeMatrix(this.script.substring(this.ichToken,a+2))))return null;this.cchToken=a+2-this.ichToken;return b});d(c$,"parseKnownToken",function(){var a=this.getPrefixToken(),b;if(this.isDotDot)return 268435520==a?this.bracketCount++:(this.addTokenToPrefix(JS.T.o(4,this.ident)),this.addTokenToPrefix(JS.T.tokenArrayClose)),this.isDotDot=
!1,2;0!=this.tokLastMath&&(this.tokLastMath=a);if(null!=this.flowContext&&102410==this.flowContext.token.tok&&null!=this.flowContext.$var&&102411!=a&&102413!=a&&102410!=this.lastToken.tok)return this.ERROR(1,this.ident);if(12290==this.lastToken.tok&&1073742332!=a&&1!=this.nTokens)return this.addTokenToPrefix(12290==a?this.lastToken:JS.T.o(4,this.ident)),2;switch(a){case 1073741824:if(0==this.nTokens&&!this.checkImpliedScriptCmd){if("'"==this.ident.charAt(0))return this.addTokenToPrefix(this.setCommand(JS.T.tokenScript)),
this.cchToken=0,2;if("."==this.charAt(this.ichToken+this.cchToken))return this.addTokenToPrefix(this.setCommand(JS.T.tokenScript)),this.nTokens=1,this.cchToken=0,this.checkImpliedScriptCmd=!0,2}break;case 268435666:if(this.nSemiSkip==this.forPoint3&&this.nTokens==this.ptSemi+2)return b=this.lastToken,this.addTokenToPrefix(JS.T.tokenEquals),this.addTokenToPrefix(b),b=JS.T.getTokenFromName(this.ident.substring(0,1)),this.addTokenToPrefix(b),this.addTokenToPrefix(JS.T.tokenLeftParen),this.needRightParen=
!0,2;this.checkNewSetCommand();return 36867==this.tokCommand?(this.tokenAndEquals=JS.T.getTokenFromName(this.ident.substring(0,1)),this.setEqualPt=this.ichToken,0):554176565==this.tokCommand||554176526==this.tokCommand?(this.addTokenToPrefix(this.tokenCommand),this.replaceCommand(JS.T.tokenSet),this.tokenAndEquals=JS.T.getTokenFromName(this.ident.substring(0,1)),this.setEqualPt=this.ichToken,0):2;case 268435649:case 268435650:if(this.afterWhite==this.ichToken||this.afterMath==this.ichToken)this.theToken=
JS.T.tv(this.theToken.tok,-1,this.theToken.value);!this.isNewSet&&1==this.nTokens&&this.checkNewSetCommand();if(this.isNewSet&&0==this.parenCount&&0==this.bracketCount&&this.ichToken<=this.setEqualPt)return this.tokenizePlusPlus(a,!1),2;if(this.nSemiSkip==this.forPoint3&&this.nTokens==this.ptSemi+2)return b=this.lastToken,this.addTokenToPrefix(JS.T.tokenEquals),this.addTokenToPrefix(b),this.addTokenToPrefix(268435649==a?JS.T.tokenMinus:JS.T.tokenPlus),this.addTokenToPrefix(JS.T.i(1)),2;break;case 268435860:0==
this.parenCount&&0==this.bracketCount&&(this.setEqualPt=this.ichToken);break;case 1073742336:36867==this.tokCommand&&(0==this.parenCount&&0==this.bracketCount&&this.ichToken<this.setEqualPt&&1<this.ltoken.size()&&1073742332==this.ltoken.get(1).tok)&&(this.ltoken.set(0,JS.T.tokenSetProperty),this.ltoken.add(1,JS.T.tokenExpressionBegin),this.addTokenToPrefix(JS.T.tokenExpressionEnd),this.setEqualPt=0);break;case 1073742332:if(1==++this.braceCount&&0==this.parenCount&&this.checkFlowStartBrace(!1))return this.isEndOfCommand=
!0,a=null!=this.flowContext&&0==this.flowContext.addLine||null==this.forceFlowContext?this.flowContext:this.forceFlowContext,null!=a&&(a.addLine=0,a.forceEndIf=!1,this.lastToken=JS.T.tokenLeftBrace,this.forceFlowContext=a),2;this.parenCount++;break;case 268435472:this.parenCount++;if(1<this.nTokens&&(1275082245==this.lastToken.tok||134320648==this.lastToken.tok||134320649==this.lastToken.tok))this.nSemiSkip+=2;break;case 1073742338:if(0<this.iBrace&&0==this.parenCount&&0==this.braceCount)if(this.ichBrace=
this.ichToken,0==this.nTokens)this.braceCount=this.parenCount=1;else return this.wasImpliedScript()||(this.braceCount=this.parenCount=this.nSemiSkip=0,this.addBrace(this.theToken),this.isEndOfCommand=!0,this.ichEnd=this.ichToken),2;this.braceCount--;case 268435473:if(0>--this.parenCount)return this.ERROR(16,this.ident);0==this.parenCount&&(this.nSemiSkip=0);this.needRightParen&&(this.addTokenToPrefix(JS.T.tokenRightParen),this.needRightParen=!1);break;case 268435520:0<this.ichToken&&JU.PT.isWhitespace(this.script.charAt(this.ichToken-
1))&&this.addTokenToPrefix(JS.T.tokenSpaceBeforeSquare);this.bracketCount++;break;case 268435521:this.bracketCount--;if(0>this.bracketCount)return this.ERROR(16,"]");break;case 1073742337:return this.isDotDot=!0,this.addTokenToPrefix(JS.T.tokenArrayOpen),2}switch(this.lastToken.tok){case 1073742336:case 1073742337:case 268435504:case 268435520:return 0}switch(a){case 102409:if(135174==this.tokCommand||4103==this.tokCommand&&1==this.nTokens)break;if(!this.haveENDIF)return 5;case 364548:null!=this.flowContext&&
(this.flowContext.forceEndIf=!1);case 364547:if(0<this.nTokens)return this.isEndOfCommand=!0,this.cchToken=0,2;break;case 134320648:case 102411:case 102413:case 102402:case 134320649:case 102410:case 102406:case 102412:if(1<this.nTokens&&36867!=this.tokCommand&&0==this.nSemiSkip)return this.isEndOfCommand=!0,null!=this.flowContext&&(this.flowContext.forceEndIf=!0),this.cchToken=0,2}return 0});d(c$,"tokenizePlusPlus",function(a,b){b&&(this.setCommand(JS.T.tokenSet),1==this.nTokens&&this.ltoken.add(0,
this.tokenCommand));this.nTokens=this.ltoken.size();this.addTokenToPrefix(JS.T.tokenEquals);this.setEqualPt=0;for(var c=1;c<this.nTokens;c++)this.addTokenToPrefix(this.ltoken.get(c));this.addTokenToPrefix(268435649==a?JS.T.tokenMinus:JS.T.tokenPlus);this.addTokenToPrefix(JS.T.i(1))},"~N,~B");d(c$,"checkNewSetCommand",function(){var a=this.ltoken.get(0).value.toString();if(!this.isContextVariable(a.toLowerCase()))return!1;a=this.setNewSetCommand(!1,a);this.setCommand(JS.T.tokenSet);this.ltoken.add(0,
this.tokenCommand);this.ltoken.set(1,a);return!0});d(c$,"parseCommandParameter",function(a,b){this.nTokens=this.ltoken.size();switch(this.tokCommand){case 0:this.lastToken=JS.T.tokenOff;this.ichCurrentCommand=this.ichEnd=this.ichToken;this.setCommand(this.theToken);this.logMessages&&JU.Logger.info("compiling "+this.theToken);var c=JS.T.tokAttr(this.tokCommand,102400);c&&(this.lastFlowCommand=this.tokenCommand);var e=this.checkFlowEndBrace();if(4==e)return 4;if(2==e)return this.isEndOfCommand=!0,this.cchToken=
0,2;switch(this.theTok){case 1073742332:break;case 268435490:return this.braceCount++,this.isEndOfCommand=!0,0;case 102409:return 0;case 364547:case 102402:if(this.fixFlowAddLine(this.flowContext),102409==this.lltoken.get(this.iCommand-1)[0].tok&&null!=this.forceFlowContext&&this.forceFlowContext.forceEndIf&&0<this.forceFlowContext.addLine&&this.isFlowIfContextOK(this.forceFlowContext))this.flowContext=this.forceFlowContext,this.flowContext.forceEndIf=!0,this.lltoken.removeItemAt(--this.iCommand);
else if(null!=this.flowContext&&0<this.flowContext.addLine)for(;null!=this.flowContext&&!this.isFlowIfContextOK(this.flowContext);)if(this.flowContext.checkForceEndIf(0))this.forceFlowEnd(this.flowContext.token),this.processTokenList(a,b),this.fixFlowAddLine(this.flowContext),this.setCommand(this.theToken),this.theTok=this.theToken.tok;else break;default:if(c)switch(this.checkFlowCommand(this.tokenCommand.value)){case 4:return 4;case 2:return 2;case 5:return 5;case 0:return this.theToken=this.tokenCommand,
102411==this.theTok&&(this.addTokenToPrefix(this.tokenCommand),this.theToken=JS.T.tokenLeftParen),0}if(null!=this.flowContext&&!this.haveENDIF&&0<this.flowContext.addLine)for(this.fixFlowAddLine(this.flowContext);null!=this.flowContext;)if(this.flowContext.checkForceEndIf(0))this.forceFlowEnd(this.flowContext.token),this.processTokenList(a,b),this.setCommand(this.theToken),this.theTok=this.theToken.tok;else break;if(1073742338==this.theTok)return this.forceFlowContext=null,this.addBrace(this.tokenCommand),
this.tokCommand=0,2;this.lastFlowCommand=null}if(268435552==this.theTok){this.setCommand(this.theToken=JS.T.o(4143,"resume"));this.addTokenToPrefix(this.theToken);this.theToken=JS.T.o(14,"context");break}if(JS.T.tokAttr(this.tokCommand,4096))break;if(this.isSetBrace=1073742332==this.theTok)this.lookingAtSetBraceSyntax()||(this.isEndOfCommand=!0,null!=this.flowContext&&(this.flowContext.forceEndIf=!1));else switch(this.theTok){case 268435650:case 268435649:return this.tokInitialPlusPlus=this.theTok,
this.tokCommand=0,2;case 1073741824:case 36868:case 12290:case 268435472:break;default:if(!JS.T.tokAttr(this.theTok,1073741824)&&!JS.T.tokAttr(this.theTok,536870912)&&!this.isContextVariable(this.identLC))return this.commandExpected(),4}this.theToken=this.setNewSetCommand(this.isSetBrace,this.ident);break;case 102412:switch(this.nTokens){case 1:if(268435472!=this.theTok)return this.ERROR(15,"(");break;case 2:268435473!=this.theTok&&(this.tokenCommand.name0=this.ident);this.newContextVariable(this.ident);
break;case 3:if(268435473!=this.theTok)return this.ERROR(15,")");this.isEndOfCommand=!0;this.ichEnd=this.ichToken+1;this.flowContext.setLine();break;default:return this.ERROR(0)}break;case 102436:case 134320141:if(0==this.tokenCommand.intValue){if(1!=this.nTokens)break;this.tokenCommand.value=this.ident;return 2}if(1==this.nTokens){null!=this.thisFunction&&this.vFunctionStack.add(0,this.thisFunction);this.thisFunction=102436==this.tokCommand?J.api.Interface.getInterface("JS.ScriptParallelProcessor",
null,null):new JS.ScriptFunction(this.ident,this.tokCommand);this.thisFunction.set(this.ident,this.tokCommand);this.htUserFunctions.put(this.ident,Boolean.TRUE);this.flowContext.setFunction(this.thisFunction);break}if(2==this.nTokens){if(268435472!=this.theTok)return this.ERROR(15,"(");break}if(3==this.nTokens&&268435473==this.theTok)break;if(0==this.nTokens%2){if(268435504!=this.theTok&&268435473!=this.theTok)return this.ERROR(15,")");break}this.thisFunction.addVariable(this.ident,!0);break;case 102411:if(1<
this.nTokens&&0==this.parenCount&&0==this.braceCount&&268435490==this.theTok)return this.addTokenToPrefix(JS.T.tokenRightParen),this.braceCount=1,this.isEndOfCommand=!0,this.cchToken=0,2;break;case 102413:if(1<this.nTokens)return this.braceCount=1,this.isEndOfCommand=!0,this.cchToken=0,2;break;case 364547:if(1==this.nTokens&&134320649!=this.theTok)return this.isEndOfCommand=!0,this.cchToken=0,2;if(1!=this.nTokens||134320649!=this.theTok&&1073742332!=this.theTok)return this.ERROR(0);this.replaceCommand(this.flowContext.token=
JS.ContextToken.newCmd(102402,"elseif"));this.tokCommand=102402;return 2;case 102409:if(1!=this.nTokens)return this.ERROR(0);if(!this.checkFlowEnd(this.theTok,this.ident,this.ichCurrentCommand,!0))return 4;if(134320141==this.theTok||102436==this.theTok)return 2;break;case 134320648:if(1==this.nTokens){if(268435472!=this.theTok)return this.ERROR(19,this.ident);this.forPoint3=this.nSemiSkip=0;this.nSemiSkip+=2;break}if(3==this.nTokens&&36868==this.tokAt(2)){this.newContextVariable(this.ident);break}if((3==
this.nTokens||4==this.nTokens)&&1275068432==this.theTok){this.nSemiSkip-=2;this.forPoint3=2;this.addTokenToPrefix(this.theToken);this.theToken=JS.T.tokenLeftParen;break}case 102410:case 102406:case 102402:case 134320649:if(2>=this.nTokens||0!=this.braceCount||0!=this.parenCount)break;case 102439:this.isEndOfCommand=!0;this.ichEnd=this.ichToken+1;this.flowContext.setLine();break;case 36868:if(1==this.nTokens){this.replaceCommand(JS.T.tokenSetVar);this.newContextVariable(this.ident);break}else{if(this.ident.equals(","))return 2;
if(JU.PT.isLetter(this.ident.charAt(0))){this.newContextVariable(this.ident);break}else{if(2!=this.nTokens||this.ident.equals("["))return this.ERROR(0);this.replaceCommand(JS.T.tokenSet)}}case 36867:1073742332==this.theTok?this.setBraceCount++:1073742338==this.theTok&&(this.setBraceCount--,this.isSetBrace&&(0==this.setBraceCount&&2147483647==this.ptNewSetModifier)&&(this.ptNewSetModifier=this.nTokens+1));if(this.nTokens==this.ptNewSetModifier){c=this.tokenAt(0);if(268435472==this.theTok||this.isUserFunction(c.value.toString())){this.ltoken.set(0,
this.setCommand(JS.T.tv(1073741824,0,c.value)));this.setBraceCount=0;break}if(1073741824!=this.theTok&&268435666!=this.theTok&&12290!=this.theTok&&!JS.T.tokAttr(this.theTok,536870912))return this.isNewSet?this.commandExpected():this.errorIntStr2(18,"SET",": "+this.ident),4;if(1==this.nTokens&&(268435650==this.lastToken.tok||268435649==this.lastToken.tok)){this.replaceCommand(JS.T.tokenSet);this.addTokenToPrefix(this.lastToken);break}}break;case 134222849:if(12290==this.theTok&&(1==this.nTokens||1073741940==
this.lastToken.tok||1073742152==this.lastToken.tok))return this.addTokenToPrefix(JS.T.tokenDefineString),2;1073741848==this.theTok&&(this.iHaveQuotedString=!1);break;case 12290:if(1==this.nTokens){if(1073741824!=this.theTok)if(this.preDefining){if(!JS.T.tokAttr(this.theTok,2097152))return this.errorStr2("ERROR IN Token.java or JmolConstants.java -- the following term was used in JmolConstants.java but not listed as predefinedset in Token.java: "+this.ident,null),4}else JS.T.tokAttr(this.theTok,2097152)?
JU.Logger.warn("WARNING: predefined term '"+this.ident+"' has been redefined by the user until the next file load."):!this.isCheckOnly&&1<this.ident.length&&(JU.Logger.warn("WARNING: redefining "+this.ident+"; was "+this.theToken+"not all commands may continue to be functional for the life of the applet!"),this.theTok=this.theToken.tok=1073741824,JS.T.addToken(this.ident,this.theToken));this.addTokenToPrefix(this.theToken);this.lastToken=JS.T.tokenComma;return 2}if(2==this.nTokens&&268435860==this.theTok)return this.ltoken.add(0,
JS.T.tokenSet),2;break;case 135190:case 135188:case 135180:c=this.charAt(this.ichToken+this.cchToken),0==this.parenCount&&(0==this.bracketCount&&0<=".:/\\+-!?".indexOf(c)&&!("-"==c&&this.ident.equals("=")))&&this.checkUnquotedFileName()}return 0},"~N,~B");d(c$,"setNewSetCommand",function(a,b){this.tokCommand=36867;this.isNewSet=!a&&!this.isUserFunction(b);this.setBraceCount=a?1:0;this.bracketCount=0;this.setEqualPt=2147483647;this.ptNewSetModifier=this.isNewSet?b.equals("(")?2:1:2147483647;return a||
268435472==this.theToken.tok||536870918==this.theToken.tok||268435650==this.theToken.tok||268435649==this.theToken.tok?this.theToken:JS.T.o(1073741824,b)},"~B,~S");d(c$,"checkUnquotedFileName",function(){for(var a=this.ichToken,b;++a<this.cchScript&&!JU.PT.isWhitespace(b=this.script.charAt(a))&&"#"!=b&&";"!=b&&"}"!=b;);b=this.script.substring(this.ichToken,a).$replace("\\","/");this.cchToken=a-this.ichToken;this.theToken=JS.T.o(4,b)});d(c$,"checkFlowStartBrace",function(a){var b=this.tokCommand;switch(b){default:if(JS.T.tokAttr(b,
102400)){if(a){switch(b){case 102411:case 102413:break;default:this.flowContext.addLine=0,this.addBrace(this.tokenCommand),this.lastFlowCommand=null}this.parenCount=this.braceCount=0}return!0}case 102407:case 102408:return!1}},"~B");d(c$,"checkFlowEndBrace",function(){if(0>=this.iBrace||1073742338!=this.vBraces.get(this.iBrace-1).tok)return 0;this.vBraces.removeItemAt(--this.iBrace);var a=this.vBraces.removeItemAt(--this.iBrace);1073742332==this.theTok&&(this.braceCount--,this.parenCount--);if(1275335685==
a.tok)return this.vPush.removeItemAt(--this.pushCount),this.addTokenToPrefix(this.setCommand(JS.ContextToken.newContext(!1))),this.isEndOfCommand=!0,2;switch(null==this.flowContext?0:this.flowContext.token.tok){case 134320649:case 102402:case 364547:if(364547==this.tokCommand||102402==this.tokCommand)return 0;break;case 102410:case 102411:case 102413:if(102411==this.tokCommand||102413==this.tokCommand)return 0}return this.forceFlowEnd(a)});d(c$,"forceFlowEnd",function(a){var b=this.tokenCommand;this.forceFlowContext=
this.flowContext;a=this.flowStart(a);if(!this.checkFlowEnd(a.tok,a.value,this.ichBrace,!1))return 4;switch(a.tok){case 134320141:case 102436:case 364558:break;default:this.addTokenToPrefix(a)}this.setCommand(b);return 2},"JS.T");d(c$,"flowStart",function(a){switch(a.tok){case 134320649:case 364547:case 102402:return JS.T.tokenIf;case 102413:case 102411:return JS.T.tokenSwitch;default:return JS.T.getTokenFromName(a.value)}},"JS.T");c$.isBreakableContext=d(c$,"isBreakableContext",function(a){return 134320648==
a||102439==a||102406==a||102411==a||102413==a},"~N");d(c$,"checkFlowCommand",function(a){var b=this.lltoken.size();switch(this.tokCommand){case 364548:if(!this.isFlowIfContextOK(this.flowContext)){if(!this.haveENDIF)return 5;this.errorStr(1,a);return 4}this.flowContext.token.intValue=this.flowContext.setPt0(b,!1);this.setFlowEnd(this.tokCommand,a);this.flowContext=this.flowContext.parent;return 0;case 102407:case 102408:b=null==this.flowContext?null:this.flowContext.getBreakableContext(0);if(102408==
this.tokCommand)for(;null!=b&&134320648!=b.token.tok&&102406!=b.token.tok;)b=b.parent;if(null==b)return this.errorStr(1,a),4;this.setCommand(JS.T.tv(this.tokCommand,b.pt0,a));this.theToken=this.tokenCommand;return 1;case 134320141:case 102436:if(null!=this.flowContext)return this.errorStr(1,JS.T.nameOf(this.tokCommand)),4;break;case 102402:case 364547:null!=this.flowContext&&!this.isFlowIfContextOK(this.flowContext)&&(this.flowContext=this.flowContext.parent);if(!this.isFlowIfContextOK(this.flowContext)){if(!this.haveENDIF)return 5;
this.errorStr(1,a);return 4}this.flowContext.token.intValue=this.flowContext.setPt0(b,!1);break;case 102411:case 102413:if(null==this.flowContext||102410!=this.flowContext.token.tok&&102411!=this.flowContext.token.tok&&(102413==this.tokCommand?0<this.flowContext.ptDefault:102413!=this.flowContext.token.tok))return this.errorStr(1,a),4;this.flowContext.token.intValue=this.flowContext.setPt0(b,102413==this.tokCommand)}a=JS.ContextToken.newCmd(this.tokCommand,this.tokenCommand.value);102410==this.tokCommand&&
a.addName("_var");this.setCommand(a);switch(this.tokCommand){case 364558:this.flowContext=new JS.ScriptFlowContext(this,a,b,this.flowContext,this.ichCurrentCommand,this.lineCurrent);null!=this.thisFunction&&this.vFunctionStack.add(0,this.thisFunction);this.thisFunction=new JS.ScriptFunction("",364558);this.flowContext.setFunction(this.thisFunction);this.pushContext(a);break;case 102411:case 102413:a.contextVariables=this.flowContext.token.contextVariables;case 364547:case 102402:this.flowContext.token=
a;break;case 102439:case 134320648:case 102406:case 102412:this.pushContext(a);default:this.flowContext=new JS.ScriptFlowContext(this,a,b,this.flowContext,this.ichCurrentCommand,this.lineCurrent)}return 0},"~S");d(c$,"setFlowEnd",function(a,b){this.setCommand(JS.T.tv(a,0<this.flowContext.ptDefault?this.flowContext.ptDefault:-this.flowContext.pt0,b))},"~N,~S");d(c$,"isFlowIfContextOK",function(a){switch(null==a?0:a.token.tok){case 134320649:case 102402:return!0;case 364547:return 364547!=this.tokCommand}return!1},
"JS.ScriptFlowContext");d(c$,"checkFlowEnd",function(a,b,c,e){if(e){if(null==this.flowContext)return this.errorStr(1,"end "+b);this.flowContext.addLine=0;this.flowContext.forceEndIf=!1;switch(this.flowContext.token.tok){case 134320141:case 102436:case 364558:break;default:this.setFlowEnd(102409,"end"),this.ltoken.set(0,this.tokenCommand)}}else this.setFlowEnd(102409,"end"),this.addTokenToPrefix(this.tokenCommand);if(null==this.flowContext||a!=this.flowContext.tok0)return this.errorStr(1,"end "+b);
var f=this.lltoken.size();this.flowContext.token.intValue=102412==this.tokCommand?-f:f;switch(a){case 134320649:case 102410:break;case 102412:case 134320648:case 102439:case 102406:e||this.vPush.removeItemAt(--this.pushCount);break;case 102436:case 134320141:case 364558:this.isCheckOnly||(this.addTokenToPrefix(JS.T.o(a,this.thisFunction)),JS.ScriptFunction.setFunction(this.thisFunction,this.script,c,this.lltoken.size(),this.lineNumbers,this.lineIndices,this.lltoken));this.thisFunction=0==this.vFunctionStack.size()?
null:this.vFunctionStack.removeItemAt(0);this.tokenCommand.intValue=0;364558==a&&this.vPush.removeItemAt(--this.pushCount);break;default:return this.errorStr(19,"end "+b)}this.flowContext=this.flowContext.parent;this.fixFlowAddLine(this.flowContext);return!0},"~N,~S,~N,~B");d(c$,"fixFlowAddLine",function(a){for(;null!=a;){if(0<a.addLine||a.forceEndIf)a.addLine=this.lineCurrent-a.ptLine,a.forceEndIf=!0;a=a.parent}},"JS.ScriptFlowContext");d(c$,"getData",function(a){this.addTokenToPrefix(JS.T.o(4,a));
this.ichToken+=a.length+2;"\r"==this.charAt(this.ichToken)&&(this.lineCurrent++,this.ichToken++);"\n"==this.charAt(this.ichToken)&&(this.lineCurrent++,this.ichToken++);var b=this.script.indexOf(this.chFirst+a+this.chFirst,this.ichToken)-4;if(0>b||!this.script.substring(b,b+4).equalsIgnoreCase("END "))return!1;var c=this.script.substring(this.ichToken,b);this.incrementLineCount(c);this.addTokenToPrefix(JS.T.o(134221834,c));this.addTokenToPrefix(JS.T.o(1073741824,"end"));this.addTokenToPrefix(JS.T.o(4,
a));this.cchToken=b-this.ichToken+a.length+6;return!0},"~S");d(c$,"incrementLineCount",function(a){var b,c=a.indexOf("\r"),e=a.indexOf("\n");if(0>c&&0>e)return 0;var f=this.lineCurrent;if(0>c||e<c)c=e;for(e=a.length;--e>=c;)("\n"==(b=a.charAt(e))||"\r"==b)&&this.lineCurrent++;return this.lineCurrent-f},"~S");c$.isSpaceOrTab=d(c$,"isSpaceOrTab",function(a){return" "==a||"\t"==a},"~S");d(c$,"eol",function(a){return"\x00"==a||"\r"==a||"\n"==a||";"==a&&0>=this.nSemiSkip},"~S");d(c$,"lookingAtSetBraceSyntax",
function(){for(var a=this.ichToken,b=1;++a<this.cchScript&&0<b;)switch(this.script.charAt(a)){case "{":b++;break;case "}":b--}if("["==this.charAt(a)&&1==++b)for(;++a<this.cchScript&&0<b;)switch(this.script.charAt(a)){case "[":b++;break;case "]":"["==this.charAt(a+1)?a++:b--}return"."==this.charAt(a)&&0==b?!0:!1});d(c$,"lookingAtString",function(a){if(this.ichToken+2>this.cchScript)return!1;this.chFirst=this.script.charAt(this.ichToken);if('"'!=this.chFirst&&(!a||"'"!=this.chFirst))return!1;a=this.ichToken;
for(var b,c=!1;++a<this.cchScript;){b=this.script.charAt(a);if(b==this.chFirst&&!c)break;c="\\"==b?!c:!1}a==this.cchScript?(this.cchToken=-1,this.ichEnd=this.cchScript):this.cchToken=++a-this.ichToken;return!0},"~B");d(c$,"getUnescapedStringLiteral",function(a){return a&&(a=this.script.substring(this.ichToken+1,this.ichToken+this.cchToken-1),0<=a.indexOf("\\u")&&(a=JU.Escape.unescapeUnicode(a)),0!=a.indexOf(";base64,"))?a:JS.ScriptCompiler.unescapeString(this.script,this.ichToken+1,this.cchToken-
2)},"~B");c$.unescapeString=d(c$,"unescapeString",function(a,b,c){var e=JU.SB.newN(c);for(c=b+c;b<c;){var f=a.charAt(b++);if("\\"==f&&b<c)switch(f=a.charAt(b++),f){case "n":f="\n";break;case "t":f="\t";break;case "r":f="\r";case '"':case "\\":case "'":break;case "x":case "u":var j="x"==f?2:4;if(b<c){for(f=0;0<=--j&&b<c;){var d=a.charAt(b),d=JU.Escape.getHexitValue(d);if(0>d)break;f<<=4;f+=d;++b}f=String.fromCharCode(f)}}e.appendC(f)}return e.toString()},"~S,~N,~N");d(c$,"lookingAtLoadFormat",function(a){for(var b=
this.ichToken,c;JU.PT.isLetterOrDigit(c=this.charAt(b))&&(a||JU.PT.isLetter(c))||a&&!this.eol(c)&&!JU.PT.isWhitespace(c);)++b;if(!a&&b==this.ichToken||!JS.ScriptCompiler.isSpaceOrTab(c))return!1;this.cchToken=b-this.ichToken;return!0},"~B");d(c$,"lookingAtImpliedString",function(a,b,c){var e=this.ichToken,f=this.script.charAt(e),j=1073741974==this.lastToken.tok,d=JS.T.tokAttr(this.tokCommand,20480)&&1==(this.tokCommand&1),g="@"==f;if(g&&(e+3<this.cchScript&&"{"==this.script.charAt(e+1))&&(j||!d))return!1;
for(var d=j=-1,m=!0,p=0;m&&!this.eol(f=this.charAt(e));){switch(f){case "(":if(!c&&(4124==this.tokCommand||5<=e&&(this.script.substring(e-4,e).equals(".spt")||this.script.substring(e-4,e).equals(".png")||this.script.substring(e-5,e).equals(".pngj")))){m=!1;continue}break;case "=":if(!b){m=!1;continue}break;case "{":p++;break;case "}":if(p--,0>p&&(0<this.braceCount||0<this.iBrace)){m=!1;continue}default:JU.PT.isWhitespace(f)?0>j&&(j=e):d=e}++e}a?e=d+1:0<j&&(e=j);return g&&(!a||0>j&&0>=p&&1<e-this.ichToken)?
!1:0<(this.cchToken=e-this.ichToken)},"~B,~B,~B");d(c$,"lookingAtExponential",function(){if(this.ichToken==this.cchScript)return NaN;var a=this.ichToken,b=a;"-"==this.script.charAt(a)&&++a;for(var c=!1,e="X";JU.PT.isDigit(e=this.charAt(a));)++a,c=!0;for(a<this.cchScript&&"."==e&&++a;JU.PT.isDigit(e=this.charAt(a));)++a,c=!0;if(a==this.cchScript||!c||(c="E"!=e&&"e"!=e)||++a==this.cchScript)return NaN;e=this.script.charAt(a);for(("-"==e||"+"==e)&&a++;JU.PT.isDigit(this.charAt(a));)a++,c=!0;if(!c)return NaN;
this.cchToken=a-this.ichToken;return JU.PT.dVal(this.script.substring(b,a))});d(c$,"lookingAtDecimal",function(){if(this.ichToken==this.cchScript)return!1;var a=this.ichToken;"-"==this.script.charAt(a)&&++a;for(var b=!1,c;JU.PT.isDigit(c=this.charAt(a++));)b=!0;if("."!=c)return!1;c=this.charAt(a);if(!JS.ScriptCompiler.isSpaceOrTab(c)&&!this.eol(c)&&(JU.PT.isLetter(c)||"?"==c||"*"==c||"_"==c||JU.PT.isLetter(c=this.charAt(a+1))||"?"==c))return!1;for(;JU.PT.isDigit(this.charAt(a));)++a,b=!0;this.cchToken=
a-this.ichToken;return b});d(c$,"lookingAtSeqcode",function(){var a=this.ichToken,b;if("^"==this.charAt(a+1)&&"*"==this.script.charAt(a))b="^",++a;else for("-"==this.script.charAt(a)&&++a;JU.PT.isDigit(b=this.charAt(a));)++a;if("^"!=b)return!1;a++;b=a==this.cchScript?" ":this.script.charAt(a++);if(" "!=b&&"*"!=b&&"?"!=b&&!JU.PT.isLetter(b))return!1;this.cchToken=a-this.ichToken;return!0});d(c$,"lookingAtInteger",function(){if(this.ichToken==this.cchScript)return 2147483647;var a=this.ichToken;"-"==
this.script.charAt(this.ichToken)&&++a;for(var b=a;JU.PT.isDigit(this.charAt(a));)++a;if(b==a)return 2147483647;this.cchToken=a-this.ichToken;try{return Integer.parseInt(this.ident=this.script.substring(this.ichToken,a))}catch(c){if(!E(c,NumberFormatException))throw c;}return 2147483647});d(c$,"lookingAtBitset",function(){if(this.script.indexOf("({null})",this.ichToken)==this.ichToken)return this.cchToken=8,new JU.BS;var a;if(this.ichToken+4>this.cchScript||"{"!=this.script.charAt(this.ichToken+1)||
0>(a=this.script.indexOf("}",this.ichToken))||a+1==this.cchScript)return null;var b=JU.BS.unescape(this.script.substring(this.ichToken,a+2));null!=b&&(this.cchToken=a+2-this.ichToken);return b});d(c$,"lookingAtObjectID",function(){var a=1==this.nTokens,b=this.ichToken;if("$"!=this.charAt(b)||'"'==this.charAt(++b))return!1;for(;b<this.cchScript;){var c;if(JU.PT.isWhitespace(c=this.script.charAt(b))){if(b==this.ichToken+1)return!1;break}if(!JU.PT.isLetterOrDigit(c))switch(c){default:return!1;case "*":if(!a)return!1;
case "~":case "_":}b++}this.cchToken=b-++this.ichToken;return!0});d(c$,"lookingAtLookupToken",function(a){if(a==this.cchScript)return!1;var b=a;this.afterMath=0!=this.tokLastMath?a:0;this.tokLastMath=0;var c;switch(c=this.script.charAt(a++)){case "-":case "+":case "&":case "|":case "*":if(a<this.cchScript)if(this.script.charAt(a)==c){++a;if("-"==c||"+"==c)break;"&"==c&&this.charAt(a)==c&&++a}else"="==this.script.charAt(a)&&++a;this.tokLastMath=1;break;case "/":if("/"==this.charAt(a))break;case "\\":case "!":"="==
this.charAt(a)&&++a;this.tokLastMath=1;break;case ")":case "]":case "}":break;case ".":"."==this.charAt(a)&&++a;this.tokLastMath=1;break;case "@":case "{":this.tokLastMath=2;break;case ":":this.tokLastMath=1;break;case "(":case ",":case "$":case ";":case "[":case "%":this.tokLastMath=1;break;case "<":case "=":case ">":("<"==(c=this.charAt(a))||"="==c||">"==c)&&++a;this.tokLastMath=1;break;default:if(!JU.PT.isLetter(c)&&!this.isDotDot)return!1;case "~":case "_":case "'":case "?":"?"==c&&(this.tokLastMath=
1);for(;JU.PT.isLetterOrDigit(c=this.charAt(a))||"_"==c||"*"==c&&"?"==this.charAt(a-1)||"?"==c||"~"==c||"'"==c||"\\"==c&&"?"==this.charAt(a+1)||"^"==c&&a>b&&JU.PT.isDigit(this.charAt(a-1));)++a}this.cchToken=a-b;return!0},"~N");d(c$,"lookForSyncID",function(){var a;if('"'==(a=this.charAt(this.ichToken))||"@"==a||"\x00"==a)return!1;for(var b=this.ichToken;!JS.ScriptCompiler.isSpaceOrTab(a=this.charAt(b))&&"#"!=a&&"}"!=a&&!this.eol(a);)++b;this.cchToken=b-this.ichToken;return!0});d(c$,"ERROR",function(a){this.errorIntStr2(a,
null,null);return 4},"~N");d(c$,"ERROR",function(a,b){this.errorStr(a,b);return 4},"~N,~S");d(c$,"handleError",function(){this.errorType=this.errorMessage;this.errorLine=this.script.substring(this.ichCurrentCommand,this.ichEnd<=this.ichCurrentCommand?this.ichToken+this.cchToken:this.ichEnd);var a=(this.ichToken<this.ichEnd?this.errorLine.substring(0,this.ichToken-this.ichCurrentCommand)+" >>>> "+this.errorLine.substring(this.ichToken-this.ichCurrentCommand):this.errorLine)+" <<<<";this.errorMessage=
J.i18n.GT._("script compiler ERROR: ")+this.errorMessage+JS.ScriptError.getErrorLineMessage(null,this.filename,this.lineCurrent,this.iCommand,a);if(!this.isSilent){for(this.ichToken=Math.max(this.ichEnd,this.ichToken);!this.lookingAtEndOfLine()&&!this.lookingAtTerminator();)this.ichToken++;this.errorLine=this.script.substring(this.ichCurrentCommand,this.ichToken);this.vwr.addCommand(this.errorLine+"#??");JU.Logger.error(this.errorMessage)}return!1});T(c$,"OK",0,"OK2",1,"CONTINUE",2,"EOL",3,"$ERROR",
4,"RESTART",5)});F("JS");P(["J.thread.JmolThread"],"JS.ScriptDelayThread",null,function(){c$=R(function(){this.seconds=this.millis=0;this.isPauseDelay=this.doPopPush=!1;N(this,arguments)},JS,"ScriptDelayThread",J.thread.JmolThread);S(c$,function(a,b,c){W(this,JS.ScriptDelayThread,[]);this.setViewer(b,"ScriptDelayThread");this.millis=c;this.setEval(a)},"J.api.JmolScriptEvaluator,JV.Viewer,~N");q(c$,"run1",function(a){for(;;)switch(a){case -1:var b;this.doPopPush=0<this.millis;this.isPauseDelay=-100==
this.millis;if(this.doPopPush){if(0<(b=this.vwr.getDelayMaximumMs())&&this.millis>b)this.millis=b}else this.millis=-this.millis;this.millis-=System.currentTimeMillis()-this.startTime;this.isJS?this.seconds=0:(this.seconds=Q(this.millis/1E3),this.millis-=1E3*this.seconds,0>=this.millis&&(this.millis=1));this.doPopPush&&this.vwr.popHoldRepaint("scriptDelayThread INIT");a=0;break;case 0:if(this.stopped||this.eval.isStopped()){a=-2;break}if(!this.runSleep(0<this.seconds--?1E3:this.millis,-2))return;0>
this.seconds&&(this.millis=0);a=0<this.seconds||0<this.millis?0:-2;break;case -2:this.doPopPush&&this.vwr.pushHoldRepaintWhy("delay FINISH");this.isPauseDelay&&this.eval.notifyResumeStatus();this.resumeEval();return}},"~N");T(c$,"PAUSE_DELAY",-100)});F("JS");P(["J.api.JmolScriptEvaluator"],"JS.ScriptError",["java.lang.NullPointerException","JU.PT","J.i18n.GT","JS.ScriptException"],function(){c$=R(function(){this.vwr=null;this.$error=this.ignoreError=this.chk=!1;this.errorType=this.errorMessageUntranslated=
this.errorMessage=null;this.iCommandError=0;N(this,arguments)},JS,"ScriptError",null,J.api.JmolScriptEvaluator);q(c$,"getErrorMessage",function(){return this.errorMessage});q(c$,"getErrorMessageUntranslated",function(){return null==this.errorMessageUntranslated?this.errorMessage:this.errorMessageUntranslated});d(c$,"invArg",function(){this.error(22)});d(c$,"bad",function(){this.error(2)});d(c$,"integerOutOfRange",function(a,b){this.errorOrWarn(21,""+a,""+b,null,!0)},"~N,~N");d(c$,"numberOutOfRange",
function(a,b){this.errorOrWarn(36,""+a,""+b,null,!0)},"~N,~N");d(c$,"error",function(a){this.errorOrWarn(a,null,null,null,!1)},"~N");d(c$,"errorStr",function(a,b){this.errorOrWarn(a,b,null,null,!1)},"~N,~S");d(c$,"errorStr2",function(a,b,c){this.errorOrWarn(a,b,c,null,!1)},"~N,~S,~S");d(c$,"errorMore",function(a,b,c,e){this.errorOrWarn(a,b,c,e,!1)},"~N,~S,~S,~S");d(c$,"warning",function(a,b,c){this.errorOrWarn(a,b,c,null,!0)},"~N,~S,~S");d(c$,"errorOrWarn",function(a,b,c,e,f){var j=this.ignoreError?
null:JS.ScriptError.errorString(a,b,c,e,!0);a=this.ignoreError||!J.i18n.GT.getDoTranslate()?null:JS.ScriptError.errorString(a,b,c,e,!1);f||this.evalError(j,a);this.showStringPrint(j,!0)},"~N,~S,~S,~S,~B");d(c$,"evalError",function(a,b){if(this.ignoreError)throw new NullPointerException;null==b&&(b=a);this.chk||(this.setCursorWait(!1),this.vwr.setBooleanProperty("refreshing",!0),this.vwr.setStringProperty("_errormessage",b));throw new JS.ScriptException(this,a,b,!0);},"~S,~S");d(c$,"setCursorWait",
function(a){this.chk||this.vwr.setCursor(a?3:0)},"~B");c$.errorString=d(c$,"errorString",function(a,b,c,e,f){e=!1;!f&&!0==(e=J.i18n.GT.getDoTranslate())&&J.i18n.GT.setDoTranslate(!1);switch(a){default:a="Unknown error message number: "+a;break;case 0:a=J.i18n.GT._("x y z axis expected");break;case 1:a=J.i18n.GT._("{0} not allowed with background model displayed");break;case 2:a=J.i18n.GT._("bad argument count");break;case 3:a=J.i18n.GT._("Miller indices cannot all be zero.");break;case 4:a=J.i18n.GT._("bad [R,G,B] color");
break;case 5:a=J.i18n.GT._("boolean expected");break;case 6:a=J.i18n.GT._("boolean or number expected");break;case 7:a=J.i18n.GT._("boolean, number, or {0} expected");break;case 56:a=J.i18n.GT._("cannot set value");break;case 8:a=J.i18n.GT._("color expected");break;case 9:a=J.i18n.GT._("a color or palette name (Jmol, Rasmol) is required");break;case 10:a=J.i18n.GT._("command expected");break;case 11:a=J.i18n.GT._("{x y z} or $name or (atom expression) required");break;case 12:a=J.i18n.GT._("draw object not defined");
break;case 13:a=J.i18n.GT._("unexpected end of script command");break;case 14:a=J.i18n.GT._("valid (atom expression) expected");break;case 15:a=J.i18n.GT._("(atom expression) or integer expected");break;case 16:a=J.i18n.GT._("filename expected");break;case 17:a=J.i18n.GT._("file not found");break;case 18:a=J.i18n.GT._("incompatible arguments");break;case 19:a=J.i18n.GT._("insufficient arguments");break;case 20:a=J.i18n.GT._("integer expected");break;case 21:a=J.i18n.GT._("integer out of range ({0} - {1})");
break;case 22:a=J.i18n.GT._("invalid argument");break;case 23:a=J.i18n.GT._("invalid parameter order");break;case 24:a=J.i18n.GT._("keyword expected");break;case 25:a=J.i18n.GT._("no MO coefficient data available");break;case 26:a=J.i18n.GT._("An MO index from 1 to {0} is required");break;case 27:a=J.i18n.GT._("no MO basis/coefficient data available for this frame");break;case 28:a=J.i18n.GT._("no MO occupancy data available");break;case 29:a=J.i18n.GT._("Only one molecular orbital is available in this file");
break;case 30:a=J.i18n.GT._("{0} require that only one model be displayed");break;case 55:a=J.i18n.GT._("{0} requires that only one model be loaded");break;case 31:a=J.i18n.GT._("No data available");break;case 32:a=J.i18n.GT._("No partial charges were read from the file; Jmol needs these to render the MEP data.");break;case 33:a=J.i18n.GT._("No unit cell");break;case 34:a=J.i18n.GT._("number expected");break;case 35:a=J.i18n.GT._("number must be ({0} or {1})");break;case 36:a=J.i18n.GT._("decimal number out of range ({0} - {1})");
break;case 37:a=J.i18n.GT._("object name expected after '$'");break;case 38:a=J.i18n.GT._("plane expected -- either three points or atom expressions or {0} or {1} or {2}");break;case 39:a=J.i18n.GT._("property name expected");break;case 40:a=J.i18n.GT._("space group {0} was not found.");break;case 41:a=J.i18n.GT._("quoted string expected");break;case 42:a=J.i18n.GT._("quoted string or identifier expected");break;case 43:a=J.i18n.GT._("too many rotation points were specified");break;case 44:a=J.i18n.GT._("too many script levels");
break;case 45:a=J.i18n.GT._("unrecognized atom property");break;case 46:a=J.i18n.GT._("unrecognized bond property");break;case 47:a=J.i18n.GT._("unrecognized command");break;case 48:a=J.i18n.GT._("runtime unrecognized expression");break;case 49:a=J.i18n.GT._("unrecognized object");break;case 50:a=J.i18n.GT._("unrecognized {0} parameter");break;case 51:a=J.i18n.GT._("unrecognized {0} parameter in Jmol state script (set anyway)");break;case 52:a=J.i18n.GT._("unrecognized SHOW parameter --  use {0}");
break;case 53:a="{0}";break;case 54:a=J.i18n.GT._('write what? {0} or {1} "filename"')}0>a.indexOf("{0}")?null!=b&&(a+=": "+b):(a=JU.PT.rep(a,"{0}",b),0<=a.indexOf("{1}")?a=JU.PT.rep(a,"{1}",c):null!=c&&(a+=": "+c),0<=a.indexOf("{2}")&&(a=JU.PT.rep(a,"{2}",c)));e&&J.i18n.GT.setDoTranslate(!0);return a},"~N,~S,~S,~S,~B");c$.getErrorLineMessage=d(c$,"getErrorLineMessage",function(a,b,c,e,f){var j="\n----";if(null!=b||null!=a)j+="line "+c+" command "+(e+1)+" of "+(null==a?b:a.equals("try")?"try":"function "+
a)+":";return j+("\n         "+f)},"~S,~S,~N,~N,~S");d(c$,"setErrorMessage",function(a){this.errorMessageUntranslated=null;null==a?(this.$error=!1,this.errorMessage=this.errorType=null,this.iCommandError=-1):(this.$error=!0,null==this.errorMessage&&(this.errorMessage=J.i18n.GT._("script ERROR: ")),this.errorMessage+=a)},"~S");T(c$,"ERROR_axisExpected",0,"ERROR_backgroundModelError",1,"ERROR_badArgumentCount",2,"ERROR_badMillerIndices",3,"ERROR_badRGBColor",4,"ERROR_booleanExpected",5,"ERROR_booleanOrNumberExpected",
6,"ERROR_booleanOrWhateverExpected",7,"ERROR_colorExpected",8,"ERROR_colorOrPaletteRequired",9,"ERROR_commandExpected",10,"ERROR_coordinateOrNameOrExpressionRequired",11,"ERROR_drawObjectNotDefined",12,"ERROR_endOfStatementUnexpected",13,"ERROR_expressionExpected",14,"ERROR_expressionOrIntegerExpected",15,"ERROR_filenameExpected",16,"ERROR_fileNotFoundException",17,"ERROR_incompatibleArguments",18,"ERROR_insufficientArguments",19,"ERROR_integerExpected",20,"ERROR_integerOutOfRange",21,"ERROR_invalidArgument",
22,"ERROR_invalidParameterOrder",23,"ERROR_keywordExpected",24,"ERROR_moCoefficients",25,"ERROR_moIndex",26,"ERROR_moModelError",27,"ERROR_moOccupancy",28,"ERROR_moOnlyOne",29,"ERROR_multipleModelsDisplayedNotOK",30,"ERROR_noData",31,"ERROR_noPartialCharges",32,"ERROR_noUnitCell",33,"ERROR_numberExpected",34,"ERROR_numberMustBe",35,"ERROR_numberOutOfRange",36,"ERROR_objectNameExpected",37,"ERROR_planeExpected",38,"ERROR_propertyNameExpected",39,"ERROR_spaceGroupNotFound",40,"ERROR_stringExpected",
41,"ERROR_stringOrIdentifierExpected",42,"ERROR_tooManyPoints",43,"ERROR_tooManyScriptLevels",44,"ERROR_unrecognizedAtomProperty",45,"ERROR_unrecognizedBondProperty",46,"ERROR_unrecognizedCommand",47,"ERROR_unrecognizedExpression",48,"ERROR_unrecognizedObject",49,"ERROR_unrecognizedParameter",50,"ERROR_unrecognizedParameterWarning",51,"ERROR_unrecognizedShowParameter",52,"ERROR_what",53,"ERROR_writeWhat",54,"ERROR_multipleModelsNotOK",55,"ERROR_cannotSet",56)});F("JS");P(["JS.ScriptExpr"],"JS.ScriptEval",
"java.lang.Boolean $.Float $.NullPointerException $.Thread java.util.Arrays $.Hashtable $.Map javajs.awt.Font JU.AU $.BArray $.BS $.Base64 $.Lst $.M3 $.M4 $.Measure $.P3 $.P4 $.PT $.Quat $.SB $.V3 J.api.Interface $.JmolParallelProcessor J.atomdata.RadiusData J.c.PAL $.STR $.VDW J.i18n.GT JM.BondSet $.Group JS.FileLoadThread $.SV $.ScriptCompiler $.ScriptContext $.ScriptDelayThread $.ScriptInterruption $.ScriptManager $.ScriptMathProcessor $.T JU.BSUtil $.ColorEncoder $.Edge $.Elements $.Escape $.Logger $.Parser $.SimpleUnitCell $.Txt JV.ActionManager $.FileManager $.JC $.StateManager $.Viewer".split(" "),
function(){c$=R(function(){this.sm=null;this.isJS=!1;this.fileLoadThread=this.scriptDelayThread=null;this.allowJSThreads=!0;this.executing=this.executionStepping=this.executionPaused=this.executionStopped=this.tQuiet=this.listCommands=this.isCmdLine_c_or_C_Option=this.isCmdLine_C_Option=this.debugScript=this.historyDisabled=this.isFuncReturn=!1;this.timeEndExecution=this.timeBeginExecution=0;this.mustResumeEval=!1;this.outputBuffer=this.compiler=this.currentThread=null;this.contextPath="";this.functionName=
this.scriptFileName=null;this.$isStateScript=!1;this.scriptLevel=0;this.scriptExtensions=this.script=this.lineIndices=this.lineNumbers=this.aatoken=null;this.pc=0;this.fullCommand=this.thisCommand=null;this.pcEnd=this.lineEnd=0;this.forceNoAddHydrogens=!1;this.parallelProcessor=null;this.pcResume=-1;N(this,arguments)},JS,"ScriptEval",JS.ScriptExpr);q(c$,"getAllowJSThreads",function(){return this.allowJSThreads});d(c$,"doReport",function(){return!this.tQuiet&&this.scriptLevel<=JS.ScriptEval.scriptReportingLevel});
q(c$,"isStateScript",function(){return this.$isStateScript});q(c$,"setStatic",function(a,b){switch(a){case 553648167:return 10<=b&&(JS.ScriptEval.contextDepthMax=b),JS.ScriptEval.contextDepthMax;case 553648148:return 0<=b&&(JS.ScriptEval.commandHistoryLevelMax=b),JS.ScriptEval.commandHistoryLevelMax;case 553648168:return 0<=b&&(JS.ScriptEval.scriptReportingLevel=b),JS.ScriptEval.scriptReportingLevel}return 0},"~N,~N");q(c$,"getScript",function(){return this.script});S(c$,function(){this.currentThread=
Thread.currentThread()});q(c$,"setViewer",function(a){this.vwr=a;this.compiler=null==this.compiler?a.compiler:this.compiler;this.isJS=a.isSingleThreaded;return this},"JV.Viewer");q(c$,"setCompiler",function(){this.vwr.compiler=this.compiler=new JS.ScriptCompiler(this.vwr)});q(c$,"compileScriptString",function(a,b){this.clearState(b);this.contextPath="[script]";return this.compileScript(null,a,this.debugScript)},"~S,~B");q(c$,"compileScriptFile",function(a,b){this.clearState(b);this.contextPath=a;
return this.compileScriptFileInternal(a,null,null,null)},"~S,~B");q(c$,"evaluateCompiledScript",function(a,b,c,e,f,j){var d=this.isCmdLine_C_Option;this.isCmdLine_C_Option=b;this.chk=this.isCmdLine_c_or_C_Option=a;this.historyDisabled=c;this.outputBuffer=f;this.currentThread=Thread.currentThread();this.allowJSThreads=j;this.listCommands=e;this.timeBeginExecution=System.currentTimeMillis();this.executionStepping=this.executionStopped=this.executionPaused=!1;this.executing=!0;this.vwr.pushHoldRepaintWhy("runEval");
this.setScriptExtensions();this.executeCommands(!1,!0);this.isCmdLine_C_Option=d;this.$isStateScript&&JS.ScriptManager.setStateScriptVersion(this.vwr,null)},"~B,~B,~B,~B,JU.SB,~B");d(c$,"useThreads",function(){return!this.chk&&!this.vwr.headless&&!this.vwr.autoExit&&this.vwr.haveDisplay&&null==this.outputBuffer&&this.allowJSThreads});d(c$,"executeCommands",function(a,b){var c=!1;try{if(!this.dispatchCommands(!1,!1,a))return}catch(e){if(E(e,Error))this.vwr.handleError(e,!1),this.setErrorMessage(""+
e+" "+this.vwr.getShapeErrorState()),this.errorMessageUntranslated=""+e,this.report(this.errorMessage,!0),c=!0;else if(E(e,JS.ScriptException)){if(s(e,JS.ScriptInterruption)&&(!a||!e.isError))return;if(a){this.vwr.setStringProperty("_errormessage",""+e);return}this.setErrorMessage(e.toString());this.errorMessageUntranslated=e.getErrorMessageUntranslated();this.report(this.errorMessage,!0);this.vwr.notifyError(null!=this.errorMessage&&0<=this.errorMessage.indexOf("java.lang.OutOfMemoryError")?"Error":
"ScriptException",this.errorMessage,this.errorMessageUntranslated);c=!0}else throw e;}if(c||!this.isJS||!this.allowJSThreads)this.vwr.setTainted(!0),this.vwr.popHoldRepaint("executeCommands "+(0<this.scriptLevel?"\u0001## REPAINT_IGNORE ##":""));this.timeEndExecution=System.currentTimeMillis();null==this.errorMessage&&this.executionStopped?this.setErrorMessage("execution interrupted"):!this.tQuiet&&b&&this.vwr.scriptStatus("Script completed");this.executing=this.chk=this.isCmdLine_c_or_C_Option=this.historyDisabled=
!1;c=this.getErrorMessageUntranslated();this.vwr.setErrorMessage(this.errorMessage,c);!this.tQuiet&&b&&this.vwr.setScriptStatus("Jmol script terminated",this.errorMessage,1+(this.timeEndExecution-this.timeBeginExecution),c)},"~B,~B");q(c$,"resumeEval",function(a){this.setErrorMessage(null);this.executionStopped||null==a||!a.mustResumeEval?this.resumeViewer("resumeEval"):(this.executionPaused||a.pc++,this.thisContext=a,0<a.scriptLevel&&(this.scriptLevel=a.scriptLevel-1),this.restoreScriptContext(a,
!0,!1,!1),this.pcResume=a.pc,this.executeCommands(a.isTryCatch,0>=this.scriptLevel),this.pcResume=-1)},"JS.ScriptContext");d(c$,"resumeViewer",function(a){this.vwr.setTainted(!0);this.vwr.popHoldRepaint(a+(this.chk?"\u0001## REPAINT_IGNORE ##":""));this.vwr.queueOnHold=!1},"~S");q(c$,"runScript",function(a){this.vwr.isPreviewOnly||this.runScriptBuffer(a,this.outputBuffer,!1)},"~S");q(c$,"runScriptBuffer",function(a,b,c){this.pushContext(null,"runScriptBuffer");this.contextPath+=" >> script() ";this.outputBuffer=
b;this.allowJSThreads=!1;b=this.isFuncReturn;this.isFuncReturn=(new Boolean(this.isFuncReturn|c)).valueOf();this.compileScript(null,a+"\u0001## EDITOR_IGNORE ##\u0001## REPAINT_IGNORE ##",!1)&&this.dispatchCommands(!1,!1,!1);this.popContext(!1,!1);this.isFuncReturn=b},"~S,JU.SB,~B");q(c$,"checkScriptSilent",function(a){a=this.compiler.compile(null,a,!1,!0,!1,!0);if(null!=a.errorType)return a;this.restoreScriptContext(a,!1,!1,!1);this.chk=!0;this.isCmdLine_c_or_C_Option=this.isCmdLine_C_Option=!1;
this.pc=0;try{this.dispatchCommands(!1,!1,!1)}catch(b){if(E(b,JS.ScriptException))this.setErrorMessage(b.toString()),a=this.getScriptContext("checkScriptSilent");else throw b;}this.chk=!1;return a},"~S");c$.getContextTrace=d(c$,"getContextTrace",function(a,b,c,e){null==c&&(c=new JU.SB);var f=Math.min(b.pc,b.lineNumbers[b.lineNumbers.length-1]);c.append(JS.ScriptError.getErrorLineMessage(b.functionName,b.scriptFileName,b.lineNumbers[f],f,JS.ScriptEval.statementAsString(a,b.statement,e?b.iToken:9999,
!1)));null!=b.parentContext&&JS.ScriptEval.getContextTrace(a,b.parentContext,c,!1);return c},"JV.Viewer,JS.ScriptContext,JU.SB,~B");q(c$,"setDebugging",function(){this.debugHigh=(this.debugScript=this.vwr.getBoolean(603979825))&&JU.Logger.debugging});q(c$,"haltExecution",function(){this.resumePausedExecution();this.executionStopped=!0});q(c$,"pauseExecution",function(a){!this.chk&&!this.vwr.headless&&(a&&!this.isJS&&this.delayScript(-100),this.vwr.popHoldRepaint("pauseExecution "+a),this.executionStepping=
!1,this.executionPaused=!0)},"~B");q(c$,"stepPausedExecution",function(){this.executionStepping=!0;this.executionPaused=!1});q(c$,"resumePausedExecution",function(){this.executionStepping=this.executionPaused=!1});q(c$,"isExecuting",function(){return this.executing&&!this.executionStopped});q(c$,"isPaused",function(){return this.executionPaused});q(c$,"isStepping",function(){return this.executionStepping});q(c$,"isStopped",function(){return this.executionStopped||!this.isJS&&this.currentThread!==
Thread.currentThread()});q(c$,"getNextStatement",function(){return this.pc<this.aatoken.length?JS.ScriptError.getErrorLineMessage(this.functionName,this.scriptFileName,this.getLinenumber(null),this.pc,JS.ScriptEval.statementAsString(this.vwr,this.aatoken[this.pc],-9999,this.debugHigh)):""});d(c$,"getCommand",function(a,b){if(a>=this.lineIndices.length)return"";if(b){for(var c=-1,e=this.script.length,f=0;f<this.lineNumbers.length;f++)if(this.lineNumbers[f]==this.lineNumbers[a])0>c&&(c=this.lineIndices[f][0]),
e=this.lineIndices[f][1];else if(0==this.lineNumbers[f]||this.lineNumbers[f]>this.lineNumbers[a])break;f=this.script;0<=f.indexOf("\u0001")&&(f=f.substring(0,f.indexOf("\u0001")));e==f.length-1&&f.endsWith("}")&&e++;return c==f.length||e<c?"":f.substring(Math.max(c,0),Math.min(f.length,e))}c=this.lineIndices[a][0];e=this.lineIndices[a][1];f="";if(0>c||e<=c||e>this.script.length)return"";try{f=this.script.substring(c,e),0<=f.indexOf("\\\n")&&(f=JU.PT.rep(f,"\\\n","  ")),0<=f.indexOf("\\\r")&&(f=JU.PT.rep(f,
"\\\r","  ")),0<f.length&&!f.endsWith(";")&&(f+=";")}catch(j){if(E(j,Exception))JU.Logger.error("darn problem in Eval getCommand: ichBegin="+c+" ichEnd="+e+" len = "+this.script.length+"\n"+j);else throw j;}return f},"~N,~B,~B");d(c$,"logDebugScript",function(a,b){this.iToken=-9999;if(this.debugHigh){0<a.length&&JU.Logger.debug(a[0].toString());for(var c=1;c<a.length;++c)null!=a[c]&&JU.Logger.debug(a[c].toString());var c=new JU.SB,e=0<b?"                          ".substring(0,2*b):"";c.append(e).append(JS.ScriptEval.statementAsString(this.vwr,
a,this.iToken,this.debugHigh));this.vwr.scriptStatus(c.toString())}else c=this.getCommand(this.pc,!1,!1),""!==c&&this.vwr.scriptStatus(c)},"~A,~N");q(c$,"evaluateExpression",function(a,b,c){var e=(new JS.ScriptEval).setViewer(this.vwr);try{e.thisContext=this.thisContext,e.contextVariables=this.contextVariables,e.pushContext(null,"evalExp"),e.allowJSThreads=!1}catch(f){if(!E(f,JS.ScriptException))throw f;}var j=this.executing;a=e.evaluate(a,b,c);this.executing=j;return a},"~O,~B,~B");d(c$,"evaluate",
function(a,b,c){try{if(s(a,String)){if(this.compileScript(null,"e_x_p_r_e_s_s_i_o_n = "+a,!1)){if(c)return this.aatoken[0];this.setStatement(this.aatoken[0],1);return b?this.parameterExpressionList(2,-1,!1).get(0):this.parameterExpressionString(2,0)}}else{if(s(a,Array)){var e=this.atomExpression(a,0,0,!0,!1,null,!1);return b?JS.SV.newV(10,e):e}if(s(a,Array))return this.setStatement(a[0],1),b?this.parameterExpressionList(0,-1,!1).get(0):this.parameterExpressionString(0,-1)}}catch(f){if(E(f,Exception))JU.Logger.error("Error evaluating: "+
a+"\n"+f);else throw f;}return b?JS.SV.getVariable("ERROR"):"ERROR"},"~O,~B,~B");q(c$,"checkSelect",function(a,b){var c=!1;try{this.pushContext(null,"checkSelect"),c=this.parameterExpressionSelect(a,b)}catch(e){if(E(e,Exception))JU.Logger.error("checkSelect "+e);else throw e;}this.popContext(!1,!1);return c},"java.util.Map,~A");q(c$,"getAtomBitSet",function(a){if(s(a,JU.BS))return a;var b=new JU.BS;try{this.pushContext(null,"getAtomBitSet");var c="select ("+a+")",c=JU.PT.replaceAllCharacters(c,"\n\r",
"),("),c=JU.PT.rep(c,"()","(none)");this.compileScript(null,c,!1)&&(this.st=this.aatoken[0],this.setStatement(this.st,0),b=this.atomExpression(this.st,1,0,!1,!1,null,!0));this.popContext(!1,!1)}catch(e){if(E(e,Exception))JU.Logger.error("getAtomBitSet "+a+"\n"+e);else throw e;}return b},"~O");d(c$,"compileScript",function(a,b,c){this.scriptFileName=a;b=this.fixScriptPath(b,a);this.restoreScriptContext(this.compiler.compile(a,b,!1,!1,c&&JU.Logger.debugging,!1),!1,!1,!1);this.forceNoAddHydrogens=(this.$isStateScript=
this.compiler.isStateScript)&&0>this.script.indexOf("pdbAddHydrogens");a=this.script;this.pc=this.setScriptExtensions();!this.chk&&(this.vwr.scriptEditorVisible&&0>b.indexOf("\u0001## EDITOR_IGNORE ##"))&&this.vwr.scriptStatus("");this.script=a;return!this.$error},"~S,~S,~B");d(c$,"fixScriptPath",function(a,b){if(null!=b&&0<=a.indexOf("$SCRIPT_PATH$")){var c=b,e=Math.max(b.lastIndexOf("|"),b.lastIndexOf("/")),c=c.substring(0,e+1);a=JU.PT.rep(a,"$SCRIPT_PATH$/",c);a=JU.PT.rep(a,"$SCRIPT_PATH$",c)}return a},
"~S,~S");d(c$,"setScriptExtensions",function(){var a=this.scriptExtensions;if(null==a)return 0;var b=a.indexOf("##SCRIPT_STEP");0<=b&&(this.executionStepping=!0);b=a.indexOf("##SCRIPT_START=");if(0>b)return 0;b=JU.PT.parseInt(a.substring(b+15));if(-2147483648==b)return 0;for(this.pc=0;this.pc<this.lineIndices.length&&!(this.lineIndices[this.pc][0]>b||this.lineIndices[this.pc][1]>=b);this.pc++);0<this.pc&&(this.pc<this.lineIndices.length&&this.lineIndices[this.pc][0]>b)&&--this.pc;return this.pc});
d(c$,"compileScriptFileInternal",function(a,b,c,e){if(0==a.toLowerCase().indexOf("javascript:"))return this.compileScript(a,this.vwr.jsEval(a.substring(11)),this.debugScript);var f=Array(2);f[0]=a;if(!this.vwr.fm.getFileDataAsString(f,-1,!1,!0,!1))return this.setErrorMessage("io error reading "+f[0]+": "+f[1]),!1;if(0<=("\n"+f[1]).indexOf("\nJmolManifest.txt\n")){var j;if(a.endsWith(".all.pngj")||a.endsWith(".all.png"))j="|state.spt",a+="|";else{f[0]=a+="|JmolManifest.txt";if(!this.vwr.fm.getFileDataAsString(f,
-1,!1,!0,!1))return this.setErrorMessage("io error reading "+f[0]+": "+f[1]),!1;j=JV.FileManager.getManifestScriptPath(f[1])}if(null!=j&&0<j.length&&(f[0]=a=a.substring(0,a.lastIndexOf("|"))+j,!this.vwr.fm.getFileDataAsString(f,-1,!1,!0,!1)))return this.setErrorMessage("io error reading "+f[0]+": "+f[1]),!1}this.scriptFileName=a;f[1]=JV.FileManager.getEmbeddedScript(f[1]);f=this.fixScriptPath(f[1],f[0]);null==e&&(e=this.vwr.fm.getFilePath(a,!1,!1),e=e.substring(0,Math.max(e.lastIndexOf("|"),e.lastIndexOf("/"))));
f=JV.FileManager.setScriptFileReferences(f,b,c,e);return this.compileScript(a,f,this.debugScript)},"~S,~S,~S,~S");q(c$,"evalFunctionFloat",function(a,b,c){try{for(var e=0;e<c.length;e++)b.get(e).value=Float.$valueOf(c[e]);return JS.SV.fValue(this.runFunctionAndRet(a,a.name,b,null,!0,!1,!1))}catch(f){if(E(f,Exception))return NaN;throw f;}},"~O,~O,~A");d(c$,"getUserFunctionResult",function(a,b,c){return this.runFunctionAndRet(null,a,b,c,!0,!0,!1)},"~S,JU.Lst,JS.SV");d(c$,"runFunctionAndRet",function(a,
b,c,e,f,j,d){if(null==a){b=b.toLowerCase();a=this.vwr.getFunction(b);if(null==a)return null;j&&(this.contextPath+=" >> function "+b)}else j&&(this.contextPath+=" >> "+b);this.pushContext(null,"runFunctionAndRet ");this.allowJSThreads&&(this.allowJSThreads=d);j=364558==a.getTok();this.thisContext.isTryCatch=j;this.thisContext.isFunction=!j;this.functionName=b;if(j){this.resetError();this.thisContext.displayLoadErrorsSave=this.vwr.displayLoadErrors;this.thisContext.tryPt=++this.vwr.tryPt;this.vwr.displayLoadErrors=
!1;this.restoreFunction(a,c,e);this.contextVariables.put("_breakval",JS.SV.newI(2147483647));this.contextVariables.put("_errorval",JS.SV.newS(""));a=this.contextVariables;for(this.executeCommands(!0,!1);this.thisContext.tryPt>this.vwr.tryPt;)this.popContext(!1,!1);this.processTry(a);return null}s(a,J.api.JmolParallelProcessor)?(this.parallelProcessor=a,this.restoreFunction(a,c,e),this.dispatchCommands(!1,!0,!1),a.runAllProcesses(this.vwr)):(this.restoreFunction(a,c,e),this.dispatchCommands(!1,!0,
!1));a=f?this.getContextVariableAsVariable("_retval",!1):null;this.popContext(!1,!1);return a},"J.api.JmolScriptFunction,~S,JU.Lst,JS.SV,~B,~B,~B");d(c$,"processTry",function(a){this.vwr.displayLoadErrors=this.thisContext.displayLoadErrorsSave;this.popContext(!1,!1);var b=this.vwr.getP("_errormessage");0<b.length&&(a.put("_errorval",JS.SV.newS(b)),this.resetError());a.put("_tryret",a.get("_retval"));b=a.get("_tryret");if(null!=b.value||2147483647!=b.intValue)this.cmdReturn(b);else{b=a.get("_errorval").value;
if(0==b.length&&(a=a.get("_breakval").intValue,2147483647!=a)){this.breakAt(this.pc-a);return}this.pc+1<this.aatoken.length&&102412==this.aatoken[this.pc+1][0].tok&&(a=this.aatoken[this.pc+1][0],null!=a.contextVariables&&null!=a.name0&&a.contextVariables.put(a.name0,JS.SV.newS(b)),a.intValue=(0<b.length?1:-1)*Math.abs(a.intValue))}},"java.util.Map");d(c$,"breakAt",function(a){if(0>a)this.getContextVariableAsVariable("_breakval",!1).intValue=-a,this.pcEnd=this.pc;else{var b=Math.abs(this.aatoken[a][0].intValue),
c=this.aatoken[a][0].tok;if(102411==c||102413==c)this.theToken=this.aatoken[b--][0],a=Math.abs(this.theToken.intValue),102409!=this.theToken.tok&&(this.theToken.intValue=-a);else for(this.pc=-1;this.pc!=a&&null!=this.thisContext;){for(;null!=this.thisContext&&!JS.ScriptCompiler.isBreakableContext(this.thisContext.token.tok);)this.popContext(!0,!1);this.pc=this.thisContext.pc;this.popContext(!0,!1)}this.pc=b}},"~N");d(c$,"restoreFunction",function(a,b,c){this.aatoken=a.aatoken;this.lineNumbers=a.lineNumbers;
this.lineIndices=a.lineIndices;this.script=a.script;this.pc=0;null!=a.names&&(this.contextVariables=new java.util.Hashtable,a.setVariables(this.contextVariables,b));null!=c&&this.contextVariables.put("_x",c)},"J.api.JmolScriptFunction,JU.Lst,JS.SV");d(c$,"clearDefinedVariableAtomSets",function(){this.vwr.definedAtomSets.remove("# variable")});d(c$,"defineSets",function(){if(!this.vwr.definedAtomSets.containsKey("# static")){for(var a=0;a<JV.JC.predefinedStatic.length;a++)this.defineAtomSet(JV.JC.predefinedStatic[a]);
this.defineAtomSet("# static")}if(!this.vwr.definedAtomSets.containsKey("# variable")){for(a=0;a<JV.JC.predefinedVariable.length;a++)this.defineAtomSet(JV.JC.predefinedVariable[a]);for(a=JU.Elements.elementNumberMax;0<=--a;){var b=" elemno="+a;this.defineAtomSet("@"+JU.Elements.elementNameFromNumber(a)+b);this.defineAtomSet("@_"+JU.Elements.elementSymbolFromNumber(a)+b)}for(a=4;0<=--a;)b="@"+JU.Elements.altElementNameFromIndex(a)+" _e="+JU.Elements.altElementNumberFromIndex(a),this.defineAtomSet(b);
for(a=JU.Elements.altElementMax;4<=--a;){var c=JU.Elements.altElementNumberFromIndex(a),e=" _e="+c,b="@_"+JU.Elements.altElementSymbolFromIndex(a);this.defineAtomSet(b+e);b="@_"+JU.Elements.altIsotopeSymbolFromIndex(a);this.defineAtomSet(b+e);b="@_"+JU.Elements.altIsotopeSymbolFromIndex2(a);this.defineAtomSet(b+e);b="@"+JU.Elements.altElementNameFromIndex(a);1<b.length&&this.defineAtomSet(b+e);b=JU.Elements.getElementNumber(c);c=JU.Elements.getNaturalIsotope(b);0<c&&(e=JU.Elements.elementSymbolFromNumber(b),
this.defineAtomSet("@_"+e+c+" _e="+b),this.defineAtomSet("@_"+c+e+" _e="+b))}this.defineAtomSet("# variable")}});d(c$,"defineAtomSet",function(a){if(0==a.indexOf("#"))this.vwr.definedAtomSets.put(a,Boolean.TRUE);else{var b=this.compiler.compile("#predefine",a,!0,!1,!1,!1);if(null!=b.errorType)this.vwr.scriptStatus("JmolConstants.java ERROR: predefined set compile error:"+a+"\ncompile error:"+b.errorMessageUntranslated);else if(1!=b.getTokenCount())this.vwr.scriptStatus("JmolConstants.java ERROR: predefinition does not have exactly 1 command:"+
a);else if(b=b.getToken(0),2>=b.length)this.vwr.scriptStatus("JmolConstants.java ERROR: bad predefinition length:"+a);else{var c=b[1].tok;!JS.T.tokAttr(c,1073741824)&&!JS.T.tokAttr(c,2097152)?this.vwr.scriptStatus("JmolConstants.java ERROR: invalid variable name:"+a):(a=b[1].value.toLowerCase(),a.startsWith("dynamic_")&&(a="!"+a.substring(8)),this.vwr.definedAtomSets.put(a,b))}}},"~S");d(c$,"lookupIdentifierValue",function(a){var b=this.lookupValue(a,!1);if(null!=b)return JU.BSUtil.copy(b);b=this.getAtomBits(1073741824,
a);return null==b?new JU.BS:b},"~S");d(c$,"lookupValue",function(a,b){if(this.chk)return new JU.BS;this.defineSets();a=a.toLowerCase();var c=this.vwr.definedAtomSets.get(a),e=!1;null==c&&(c=this.vwr.definedAtomSets.get("!"+a),e=null!=c);if(s(c,JU.BS))return c;if(s(c,Array))return this.pushContext(null,"lookupValue"),c=this.atomExpression(c,-2,0,!0,!1,null,!0),this.popContext(!1,!1),e||this.vwr.definedAtomSets.put(a,c),c;if(a.equals("water"))return c=this.vwr.ms.getAtoms(1612709912,null),e||this.vwr.definedAtomSets.put(a,
c),c;if(b)return null;e=a.length;if(5>e||"s"!=a.charAt(e-1))return null;a=a.endsWith("ies")?a.substring(0,e-3)+"y":a.substring(0,e-1);return this.lookupValue(a,!0)},"~S,~B");q(c$,"deleteAtomsInVariables",function(a){for(var b,c=this.vwr.definedAtomSets.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var e=b.getValue();s(e,JU.BS)&&(JU.BSUtil.deleteBits(e,a),b.getKey().startsWith("!")||this.vwr.g.setUserVariable("@"+b.getKey(),JS.SV.newV(10,e)))}},"JU.BS");q(c$,"getThisContext",function(){return this.thisContext});
d(c$,"clearState",function(a){this.thisContext=null;this.scriptLevel=0;this.setErrorMessage(null);this.contextPath="";this.tQuiet=a},"~B");q(c$,"pushContextDown",function(a){this.scriptLevel--;this.pushContext2(null,a)},"~S");d(c$,"pushContext",function(a,b){this.scriptLevel==JS.ScriptEval.contextDepthMax&&this.error(44);this.pushContext2(a,b)},"JS.ContextToken,~S");d(c$,"pushContext2",function(a,b){this.thisContext=this.getScriptContext(b);this.thisContext.token=a;if(null==a)this.scriptLevel=++this.thisContext.scriptLevel;
else if(this.thisContext.scriptLevel=-1,this.contextVariables=new java.util.Hashtable,null!=a.contextVariables)for(var c,e=a.contextVariables.keySet().iterator();e.hasNext()&&((c=e.next())||1);)JS.ScriptCompiler.addContextVariable(this.contextVariables,c);(this.debugHigh||this.isCmdLine_c_or_C_Option)&&JU.Logger.info("--\x3e>----------------------".substring(0,Math.min(15,this.scriptLevel+5))+this.scriptLevel+" "+this.scriptFileName+" "+a+" "+this.thisContext.id+" "+b+" path="+this.thisContext.contextPath)},
"JS.ContextToken,~S");q(c$,"getScriptContext",function(a){var b=new JS.ScriptContext;this.debugHigh&&JU.Logger.info("creating context "+b.id+" for "+a+" path="+this.contextPath);b.scriptLevel=this.scriptLevel;b.parentContext=this.thisContext;b.contextPath=this.contextPath;b.scriptFileName=this.scriptFileName;b.parallelProcessor=this.parallelProcessor;b.functionName=this.functionName;b.script=this.script;b.lineNumbers=this.lineNumbers;b.lineIndices=this.lineIndices;b.saveTokens(this.aatoken);b.statement=
this.st;b.statementLength=this.slen;b.pc=b.pc0=this.pc;b.lineEnd=this.lineEnd;b.pcEnd=this.pcEnd;b.iToken=this.iToken;b.theToken=this.theToken;b.theTok=this.theTok;b.outputBuffer=this.outputBuffer;b.vars=this.contextVariables;b.isStateScript=this.$isStateScript;b.errorMessage=this.errorMessage;b.errorType=this.errorType;b.iCommandError=this.iCommandError;b.chk=this.chk;b.executionStepping=this.executionStepping;b.executionPaused=this.executionPaused;b.scriptExtensions=this.scriptExtensions;b.mustResumeEval=
this.mustResumeEval;b.allowJSThreads=this.allowJSThreads;return b},"~S");d(c$,"popContext",function(a,b){if(null!=this.thisContext){0<this.thisContext.scriptLevel&&(this.scriptLevel=this.thisContext.scriptLevel-1);var c=a?this.getScriptContext("popFlow"):null;this.restoreScriptContext(this.thisContext,!0,a,b);null!=c&&this.restoreScriptContext(c,!0,!1,!0);if(this.debugHigh||this.isCmdLine_c_or_C_Option)JU.Logger.info("--<<------------".substring(0,Math.min(15,this.scriptLevel+5))+(this.scriptLevel+
1)+" "+this.scriptFileName+" isFlow "+a+" thisContext="+(null==this.thisContext?"":""+this.thisContext.id)+" pc="+this.pc+"--\x3e"+this.pc+" path="+(null==this.thisContext?"":this.thisContext.contextPath))}},"~B,~B");d(c$,"restoreScriptContext",function(a,b,c,e){this.executing=!this.chk;if(null!=a){if(!c&&(this.st=a.statement,this.slen=a.statementLength,this.pc=a.pc,this.lineEnd=a.lineEnd,this.pcEnd=a.pcEnd,e))return;this.mustResumeEval=a.mustResumeEval;this.script=a.script;this.lineNumbers=a.lineNumbers;
this.lineIndices=a.lineIndices;this.aatoken=a.restoreTokens();this.contextVariables=a.vars;this.scriptExtensions=a.scriptExtensions;b?(this.contextPath=a.contextPath,e=null==this.contextPath?-1:this.contextPath.indexOf(" >> "),0<=e&&(this.contextPath=this.contextPath.substring(0,e)),this.scriptFileName=a.scriptFileName,this.parallelProcessor=a.parallelProcessor,this.functionName=a.functionName,this.iToken=a.iToken,this.theToken=a.theToken,this.theTok=a.theTok,this.outputBuffer=a.outputBuffer,this.$isStateScript=
a.isStateScript,this.thisContext=a.parentContext,this.allowJSThreads=a.allowJSThreads,(this.debugHigh||this.isCmdLine_c_or_C_Option)&&JU.Logger.info("--r------------".substring(0,Math.min(15,this.scriptLevel+5))+this.scriptLevel+" "+this.scriptFileName+" isPop "+b+" isFlow "+c+" context.id="+a.id+" pc="+this.pc+"--\x3e"+a.pc+" "+this.contextPath)):(this.$error=null!=a.errorType,this.errorMessage=a.errorMessage,this.errorMessageUntranslated=a.errorMessageUntranslated,this.iCommandError=a.iCommandError,
this.errorType=a.errorType)}},"JS.ScriptContext,~B,~B,~B");d(c$,"setException",function(a,b,c){a.untranslated=null==c?b:c;c="!".equals(c);this.errorType=b;this.iCommandError=this.pc;if(null==a.message)a.message="";else{for(var e=JS.ScriptEval.getContextTrace(this.vwr,this.getScriptContext("setException"),null,!0).toString();null!=this.thisContext&&!this.thisContext.isTryCatch;)this.popContext(!1,!1);0>a.message.indexOf(e)&&(a.message+=e,a.untranslated+=e);this.resumeViewer(c?"throw context":"scriptException");
if(!c&&!(null!=this.thisContext||this.chk||0<=b.indexOf("NOTE: file recognized as a script file: ")))JU.Logger.error("eval ERROR: "+e+this.toString()),this.vwr.autoExit&&this.vwr.exitJmol()}},"JS.ScriptException,~S,~S");c$.statementAsString=d(c$,"statementAsString",function(a,b,c,e){if(0==b.length)return"";var f=new JU.SB,j=b[0].tok;switch(j){case 0:return b[0].value;case 102409:if(2==b.length&&(134320141==b[1].tok||102436==b[1].tok))return b[1].value.toString()}for(var d=!0,g=!1,m=!1,j=1<b.length&&
36867==j&&b[0].value.equals("")&&(61==b[0].intValue||35==b[0].intValue)&&1073742325!=b[1].tok,p=b.length,k=0;k<p;++k){var l=b[k];if(null==l)break;c==k-1&&f.append(" <<");0!=k&&f.appendC(" ");if(2==k&&j&&((j=268435860!=l.tok)||35==b[0].intValue))if(f.append(j?"= ":"== "),!j)continue;c==k&&1073742326!=l.tok&&f.append("<<<<");switch(l.tok){case 1073742325:d&&f.append("{");continue;case 1073742326:m&&k==b.length-1&&(d=!1);d&&f.append("}");continue;case 268435520:case 268435521:break;case 1073742332:case 1073742338:g=
1073742332==l.tok;break;case 12290:if(0<k&&l.value.equals("define")){f.append("@");k+1<b.length&&1073742325==b[k+1].tok&&(d||(m=!0),d=!0);continue}break;case 1073742335:f.append("true");continue;case 1073742334:f.append("false");continue;case 1275082245:break;case 2:f.appendI(l.intValue);continue;case 8:case 9:case 10:f.append(JS.SV.sValue(l));continue;case 6:if(Boolean.TRUE===l.value.get("$_BINARY_$")){f.append("<BINARY DATA>");continue}case 7:f.append(l.escape());continue;case 5:f.appendC("^");
continue;case 1073742363:2147483647!=l.intValue?f.appendI(l.intValue):f.append(JM.Group.getSeqcodeStringFor(JS.ScriptExpr.getSeqCode(l))),l=b[++k],f.appendC(" "),f.append(g?"-":"- ");case 1073742362:2147483647!=l.intValue?f.appendI(l.intValue):f.append(JM.Group.getSeqcodeStringFor(JS.ScriptExpr.getSeqCode(l)));continue;case 1073742357:f.append("*:");f.append(a.getChainIDStr(l.intValue));continue;case 1073742355:f.append("*%");null!=l.value&&f.append(l.value.toString());continue;case 1073742358:f.append("*/");
case 1073742359:case 3:2147483647>l.intValue?f.append(JU.Escape.escapeModelFileNumber(l.intValue)):f.append(""+l.value);continue;case 1073742361:f.appendC("[");l=6*l.intValue+1;f.append(JM.Group.standardGroupList.substring(l,l+3).trim());f.appendC("]");continue;case 1073742360:f.appendC("[");f.appendO(l.value);f.appendC("]");continue;case 1073742356:f.append("*.");break;case 1094713349:if(s(l.value,JU.P3)){l=l.value;f.append("cell=").append(JU.Escape.eP(l));continue}break;case 4:f.append('"').appendO(l.value).append('"');
continue;case 268435860:case 268435858:case 268435857:case 268435856:case 268435859:case 268435861:1715472409==l.intValue?f.append(b[++k].value).append(" "):2147483647!=l.intValue&&f.append(JS.T.nameOf(l.intValue)).append(" ");break;case 364558:continue;case 102409:f.append("end");continue;default:if(JS.T.tokAttr(l.tok,1073741824)||!e)break;f.appendC("\n").append(l.toString()).appendC("\n");continue}null!=l.value&&f.append(l.value.toString())}return f.toString()},"JV.Viewer,~A,~N,~B");q(c$,"setObjectPropSafe",
function(a,b){try{return this.setObjectProp(a,b,-1)}catch(c){if(E(c,JS.ScriptException))return null;throw c;}},"~S,~N");d(c$,"setAtomProp",function(a,b,c){this.setShapePropertyBs(0,a,b,c)},"~S,~O,JU.BS");d(c$,"restrictSelected",function(a,b){this.chk||this.sm.restrictSelected(a,b)},"~B,~B");d(c$,"showString",function(a){this.showStringPrint(a,!1)},"~S");q(c$,"showStringPrint",function(a,b){this.chk||null==a||(null==this.outputBuffer?this.vwr.showString(a,b):this.appendBuffer(a,b))},"~S,~B");d(c$,
"report",function(a,b){this.chk||(null==this.outputBuffer?this.vwr.scriptStatus(a):this.appendBuffer(a,b))},"~S,~B");d(c$,"appendBuffer",function(a,b){(b||this.isFuncReturn||JU.Logger.isActiveLevel(4))&&this.outputBuffer.append(a).appendC("\n")},"~S,~B");d(c$,"addProcess",function(a,b,c){if(null!=this.parallelProcessor){for(var e=Array(c),f=0;f<a.size();f++)e[f+1-b]=a.get(f);a=this.getScriptContext("addProcess");a.saveTokens(e);a.pc=1-b;a.pcEnd=c;this.parallelProcessor.addProcess("p"+ ++JS.ScriptEval.iProcess,
a)}},"JU.Lst,~N,~N");d(c$,"checkContinue",function(){if(this.executionStopped)return!1;if(this.executionStepping&&this.isCommandDisplayable(this.pc))this.vwr.setScriptStatus("Next: "+this.getNextStatement(),"stepping -- type RESUME to continue",0,null),this.executionPaused=!0;else if(!this.executionPaused)return!0;JU.Logger.debugging&&JU.Logger.debug("script execution paused at command "+(this.pc+1)+" level "+this.scriptLevel+": "+this.thisCommand);for(this.refresh(!1);this.executionPaused;){this.vwr.popHoldRepaint("pause \u0001## REPAINT_IGNORE ##");
var a=this.vwr.getInsertedCommand();if(0<a.length){this.resumePausedExecution();this.setErrorMessage(null);var b=this.getScriptContext("script insertion");this.pc--;try{this.runScript(a)}catch(c){if(E(c,Exception))this.setErrorMessage(""+c);else if(E(c,Error))this.setErrorMessage(""+c);else throw c;}this.$error&&(this.report(this.errorMessage,!0),this.setErrorMessage(null));this.restoreScriptContext(b,!0,!1,!1);this.pauseExecution(!1)}this.doDelay(-100);this.vwr.pushHoldRepaintWhy("pause")}this.notifyResumeStatus();
return!this.$error&&!this.executionStopped});d(c$,"delayScript",function(a){this.vwr.autoExit||(this.stopScriptThreads(),this.scriptDelayThread=new JS.ScriptDelayThread(this,this.vwr,a),this.scriptDelayThread.run())},"~N");d(c$,"doDelay",function(a){if(this.useThreads()){if(this.isJS)throw new JS.ScriptInterruption(this,"delay",a);this.delayScript(a)}},"~N");q(c$,"evalParallel",function(a,b){return this.getCmdExt().evalParallel(a,b)},"JS.ScriptContext,JV.ShapeManager");d(c$,"isCommandDisplayable",
function(a){return a>=this.aatoken.length||a>=this.pcEnd||null==this.aatoken[a]?!1:this.lineIndices[a][1]>this.lineIndices[a][0]},"~N");q(c$,"loadFileResourceAsync",function(a){this.loadFileAsync(null,a,-Math.abs(a.hashCode()),!1)},"~S");d(c$,"loadFileAsync",function(a,b,c,e){if(null!=this.vwr.fm.cacheGet(b,!1))return b;null!=a&&(a="cache://local"+a);var f=this.pc+"_"+c+"_"+b,j;if(null==this.thisContext||null==this.thisContext.htFileCache)this.pushContext(null,"loadFileAsync"),this.thisContext.htFileCache=
new java.util.Hashtable;j=this.thisContext.htFileCache.get(f);if(null!=j&&0<j.length)return this.fileLoadThread=null,this.popContext(!1,!1),this.vwr.queueOnHold=!1,("#CANCELED#".equals(j)||"#CANCELED#".equals(this.vwr.fm.cacheGet(j,!1)))&&this.evalError("#CANCELED#",null),j;this.thisContext.htFileCache.put(f,j=a+System.currentTimeMillis());e&&this.vwr.cacheFileByName(a+"*",!1);this.fileLoadThread=new JS.FileLoadThread(this,this.vwr,b,f,j);this.vwr.testAsync?this.fileLoadThread.start():this.fileLoadThread.run();
0>c&&(this.fileLoadThread=null);throw new JS.ScriptInterruption(this,"load",1);},"~S,~S,~N,~B");d(c$,"logLoadInfo",function(a){0<a.length&&JU.Logger.info(a);a=new JU.SB;var b=this.vwr.ms.mc;1<b&&a.append((this.vwr.am.isMovie?this.vwr.am.getFrameCount()+" frames":b+" models")+"\n");for(var c=0;c<b;c++){var e=this.vwr.ms.getInfo(c,"moData");null!=e&&e.containsKey("mos")&&a.appendI(e.get("mos").size()).append(" molecular orbitals in model ").append(this.vwr.getModelNumberDotted(c)).append("\n")}0<a.length()&&
this.vwr.showString(a.toString(),!1)},"~S");q(c$,"notifyResumeStatus",function(){!this.chk&&(!this.executionStopped&&!this.executionStepping)&&this.vwr.scriptStatus("script execution "+(this.$error||this.executionStopped?"interrupted":"resumed"));JU.Logger.debugging&&JU.Logger.debug("script execution resumed")});d(c$,"refresh",function(a){this.chk||(this.vwr.setTainted(!0),this.vwr.requestRepaintAndWait("refresh cmd"),this.isJS&&a&&this.doDelay(10))},"~B");q(c$,"stopScriptThreads",function(){null!=
this.scriptDelayThread&&(this.scriptDelayThread.interrupt(),this.scriptDelayThread=null);null!=this.fileLoadThread&&(this.fileLoadThread.interrupt(),this.fileLoadThread.resumeEval(),null!=this.thisContext&&this.popContext(!1,!1),this.fileLoadThread=null)});d(c$,"getErrorLineMessage2",function(){return JS.ScriptError.getErrorLineMessage(this.functionName,this.scriptFileName,this.getLinenumber(null),this.pc,JS.ScriptEval.statementAsString(this.vwr,this.st,-9999,this.debugHigh))});d(c$,"getLinenumber",
function(a){return null==a?this.lineNumbers[this.pc]:a.lineNumbers[a.pc]},"JS.ScriptContext");d(c$,"dispatchCommands",function(a,b,c){null==this.sm&&(this.sm=this.vwr.shm);this.debugScript=this.debugHigh=!1;this.chk||this.setDebugging();0==this.pcEnd&&(this.pcEnd=2147483647);0==this.lineEnd&&(this.lineEnd=2147483647);if(null==this.aatoken)return!0;this.tQuiet||(this.tQuiet=0>this.vwr.getInt(536870922));var e=this.isJS&&!b&&this.useThreads()&&0<=this.vwr.getInt(536870922);this.commandLoop(e);if(this.chk)return!0;
var f=this.vwr.getInsertedCommand();"".equals(f)?a&&(this.debugScript&&this.vwr.getBoolean(603979880))&&this.vwr.getChimeMessenger().update(null):this.runScriptBuffer(f,null,!1);return!this.mustResumeEval&&!e||b?!0:!c&&this.mustResumeEval||null==this.thisContext?(a=null==this.thisContext,this.resumeEval(this.thisContext),this.mustResumeEval=!1,a):!0},"~B,~B,~B");d(c$,"commandLoop",function(a){var b="",c=!1,e=null,f=System.currentTimeMillis();if(this.debugScript&&this.debugHigh&&!this.chk){for(var j=
this.pc;j<this.aatoken.length&&j<this.pcEnd;j++)JU.Logger.info("Command "+j),this.debugScript&&this.logDebugScript(this.aatoken[j],0);JU.Logger.info("-----")}for(;this.pc<this.aatoken.length&&this.pc<this.pcEnd;this.pc++){a&&(!this.executionPaused&&1E3<System.currentTimeMillis()-f&&(this.pc--,this.doDelay(-1)),f=System.currentTimeMillis());if(!this.chk&&!this.checkContinue())break;if(this.pc>=this.lineNumbers.length||this.lineNumbers[this.pc]>this.lineEnd)break;this.debugHigh&&(j=0,j=System.currentTimeMillis(),
this.vwr.scriptStatus("Eval.dispatchCommands():"+j),this.vwr.scriptStatus(this.script));this.debugScript&&!this.chk&&JU.Logger.info("Command "+this.pc+(null==this.thisContext?"":" path="+this.thisContext.contextPath));this.theToken=0==this.aatoken[this.pc].length?null:this.aatoken[this.pc][0];if(!this.historyDisabled&&(!this.chk&&this.scriptLevel<=JS.ScriptEval.commandHistoryLevelMax&&!this.tQuiet)&&(j=this.getCommand(this.pc,!0,!0),null!=this.theToken&&0<j.length&&!j.equals(b)&&(134320141==this.theToken.tok||
102436==this.theToken.tok||!JS.T.tokAttr(this.theToken.tok,102400))))this.vwr.addCommand(b=j);!this.chk&&a&&(j=this.vwr.getInsertedCommand(),"".equals(j)||this.runScript(j));if(this.setStatement(this.aatoken[this.pc],1)){this.thisCommand=this.getCommand(this.pc,!1,!0);(this.debugHigh||this.debugScript)&&JU.Logger.info(this.thisCommand);j=this.getCommand(this.pc+1,!1,!0);this.fullCommand=this.thisCommand+(j.startsWith("#")?j:"");this.getToken(0);this.iToken=0;if((this.listCommands||!this.chk&&0<this.scriptLevel)&&
!this.isJS)if(j=this.vwr.getInt(536870922),this.listCommands||0<j)0<j&&this.delayScript(-j),this.vwr.scriptEcho("$["+this.scriptLevel+"."+this.lineNumbers[this.pc]+"."+(this.pc+1)+"] "+this.thisCommand);if(null!=e&&(102409!=this.theTok||2>this.slen||102439!=this.st[1].tok))e.addLast(this.st);else{if(this.chk){if(this.isCmdLine_c_or_C_Option&&JU.Logger.info(this.thisCommand),1==this.slen&&134320141!=this.st[0].tok&&102436!=this.st[0].tok)continue}else this.debugScript&&this.logDebugScript(this.st,
0),0==this.scriptLevel&&this.vwr.g.logCommands&&this.vwr.log(this.thisCommand),this.debugHigh&&null!=this.theToken&&JU.Logger.debug(this.theToken.toString());if(null!=this.theToken)switch(j=this.theToken.tok,j){case 36867:this.cmdSet();continue;case 134320648:c=this.cmdFor(j,c);continue;case 102439:this.pushContext(this.theToken,"PROCESS");null!=this.parallelProcessor&&(e=new JU.Lst);continue;default:if(JS.T.tokAttr(j,102400)){c=this.cmdFlow(j,c,e);102439==this.theTok&&(e=null);continue}this.processCommand(j);
this.setCursorWait(!1);this.executionStepping&&(this.executionPaused=this.isCommandDisplayable(this.pc+1))}}}else JU.Logger.info(this.getCommand(this.pc,!0,!1)+" -- STATEMENT CONTAINING @{} SKIPPED")}},"~B");d(c$,"processCommand",function(a){if(JS.T.tokAttr(this.theToken.tok,135168))this.processShapeCommand(a);else switch(a){case 0:!this.chk&&this.vwr.getBoolean(603979880)&&this.vwr.getChimeMessenger().showHash(this.outputBuffer,this.theToken.value);break;case 1275335685:this.pushContext(this.theToken,
"PUSH");break;case 1275334681:this.popContext(!0,!1);break;case 268435490:break;case 4097:this.cmdAnimation();break;case 1610616835:this.cmdBackground(1);break;case 4100:this.cmdBind();break;case 4101:this.cmdBondorder();break;case 20488:this.cmdCD();break;case 12289:this.cmdCenter(1);break;case 1765808134:this.cmdColor();break;case 12290:this.cmdDefine();break;case 528397:this.cmdDelay();break;case 12291:this.cmdDelete();break;case 554176526:this.cmdSlab(!0);break;case 1610625028:this.cmdDisplay(!0);
break;case 266255:case 266281:if(this.chk)break;0<this.pc&&(266255==this.theToken.tok&&!this.vwr.autoExit)&&this.vwr.clearScriptQueue();this.executionStopped=0<this.pc||!this.vwr.g.useScriptQueue;break;case 266256:if(this.chk)break;null!=this.outputBuffer&&JU.Logger.warn(this.outputBuffer.toString());this.vwr.exitJmol();break;case 1228935687:this.cmdFile();break;case 12293:this.cmdFixed();break;case 4114:this.cmdFont(-1,0);break;case 4115:case 1094717454:this.cmdModel(1);break;case 1073741824:this.cmdFunc();
break;case 1275072526:this.cmdGetProperty();break;case 20500:if(this.vwr.headless)break;this.cmdGoto(!0);break;case 20482:this.cmdHelp();break;case 12294:this.cmdDisplay(!1);break;case 1613238294:this.cmdHbond();break;case 1610616855:this.cmdHistory(1);break;case 544771:this.cmdHover();break;case 266265:this.chk||this.vwr.initialize(!this.$isStateScript,!1);break;case 4122:this.cmdInvertSelected();break;case 134238732:this.cmdScript(134238732,null,null);break;case 134222849:this.cmdLoad();break;case 36869:this.cmdLog();
break;case 528411:this.cmdLoop();break;case 20485:this.cmdMessage();break;case 4128:this.cmdMove();break;case 4129:this.cmdMoveto();break;case 20487:this.cmdPause();break;case 36865:this.cmdPrint();break;case 134256131:this.cmdPrompt();break;case 4139:case 4165:this.cmdUndoRedoMove();break;case 266284:this.refresh(!0);break;case 4141:this.cmdReset();break;case 12295:this.cmdRestrict();break;case 4143:if(0==this.slen){this.chk||this.resumePausedExecution();break}case 4142:this.cmdRestore();break;case 36866:this.cmdReturn(null);
break;case 528432:this.cmdRotate(!1,!1);break;case 4145:this.cmdRotate(!1,!0);break;case 4146:this.cmdSave();break;case 134222850:this.cmdScript(134222850,null,null);break;case 1275082245:this.cmdSelect(1);break;case 1611141171:this.cmdSelectionHalos(1);break;case 554176565:this.cmdSlab(!1);break;case 1611141175:this.cmdRotate(!0,!1);break;case 1611141176:this.cmdSsbond();break;case 266298:this.cmdPause()&&this.stepPausedExecution();break;case 1639976963:this.cmdStructure();break;case 2109448:this.cmdSubset();
break;case 4156:this.cmdSync();break;case 36870:this.cmdThrow();break;case 536875070:this.cmdTimeout(1);break;case 4160:this.cmdTranslate(!1);break;case 4162:this.cmdTranslate(!0);break;case 4164:this.cmdUnbind();break;case 36868:break;case 4166:this.cmdVibration();break;case 12297:this.cmdZap(!0);break;case 4168:this.cmdZoom(!1);break;case 4170:this.cmdZoom(!0);break;default:this.checkExtension(this.theToken.tok)}},"~N");d(c$,"checkExtension",function(a){switch(a){case 4098:case 134221829:case 4102:case 4103:case 4105:case 134221831:case 1094717448:case 4106:case 528395:case 1613238294:case 4120:case 528443:case 4124:case 4125:case 4126:case 1275072532:case 4130:case 134221834:case 4131:case 4133:case 134221850:case 4138:case 134222350:case 134221856:this.getCmdExt().dispatch(a,
!1,this.st);break;default:System.out.println(JS.T.nameOf(a)+" is not a command"),this.error(47)}},"~N");d(c$,"processShapeCommand",function(a){var b=0;switch(a){case 1611272194:b=34;break;case 1114249217:b=9;break;case 1678381065:b=32;break;case 1112152066:b=11;break;case 135174:b=23;break;case 134353926:b=25;break;case 135175:b=17;break;case 1112150019:b=16;break;case 135176:b=22;break;case 537022465:b=31;break;case 1112150020:b=20;break;case 1611272202:b=36;break;case 1112150021:b=19;break;case 1112152070:b=
8;break;case 135180:b=24;break;case 1825200146:b=5;break;case 135182:b=26;break;case 537006096:case 1745489939:b=6;break;case 1112152071:b=13;break;case 1073877010:b=27;break;case 1073877011:b=28;break;case 135190:b=30;break;case 135188:b=29;break;case 1275203608:b=21;break;case 1112152073:b=14;break;case 1112152074:b=15;break;case 1112152075:b=0;break;case 1112152076:b=7;break;case 1649022989:b=12;break;case 659482:b=4;break;case 1112152078:b=10;break;case 1814695966:b=33;break;case 135198:b=18;
break;case 659488:b=1;break;default:this.error(47)}if(null==this.sm.getShape(b)&&2==this.slen)switch(this.st[1].tok){case 1073742334:case 12291:case 1073742333:return}switch(a){case 1114249217:case 1112152066:case 1112152071:case 1112152073:case 1112152074:case 1649022989:case 1112152078:this.setSizeBio(b);return;case 1112150019:case 1112150021:this.cmdDots(b);return;case 1112152070:case 1112152075:case 1112152076:this.setSize(b,1112152070==a?-1E3:1);return;case 1825200146:this.cmdLabel(1,null);return;
case 135198:this.cmdVector();return;case 659488:this.cmdWireframe();return}switch(a){case 1611272194:this.cmdAxes(1);break;case 1678381065:this.cmdBoundbox(1);break;case 537022465:this.cmdEcho(1);break;case 1611272202:this.cmdFrank(1);break;case 1814695966:this.cmdUnitcell(1);break;case 1112150020:case 537006096:case 1745489939:case 1275203608:case 659482:this.getCmdExt().dispatch(b,!1,this.st);break;case 135174:case 134353926:case 135175:case 135176:case 135180:case 135182:case 1073877010:case 1073877011:case 135190:case 135188:this.getIsoExt().dispatch(b,
!1,this.st)}},"~N");d(c$,"cmdAnimation",function(){var a=!1;switch(this.getToken(1).tok){case 1073742335:a=!0;case 1073742334:this.chk||this.vwr.setAnimationOn(a);break;case 1073742029:a=I(this.floatParameter(2));this.chk||this.vwr.am.setMorphCount(Math.abs(a));break;case 1610625028:this.iToken=2;a=1073742327==this.tokAt(2)?null:this.atomExpressionAt(2);this.checkLength(this.iToken+1);this.chk||this.vwr.setAnimDisplay(a);break;case 4115:this.isArrayParameter(2)?this.setFrameSet(2):this.cmdModel(2);
break;case 1073742024:var b=a=1;5<this.slen&&this.bad();var c=JS.T.getTokFromName(this.paramAsStr(2));switch(c){case 1073742070:a=b=0;break;case 528411:case 1073742082:break;default:this.invArg()}4<=this.slen&&(a=b=this.floatParameter(3),5==this.slen&&(b=this.floatParameter(4)));this.chk||this.vwr.am.setAnimationReplayMode(c,a,b);break;case 1073741918:a=2;b=0;switch(this.tokAt(a)){case 268435616:b=-this.intParameter(++a);break;case 268435617:b=this.intParameter(++a);break;case 2:b=this.intParameter(a);
break;default:this.invArg()}this.checkLength(++a);1!=b&&-1!=b&&this.errorStr2(35,"-1","1");this.chk||this.vwr.am.setAnimationDirection(b);break;case 1073741950:this.setIntProperty("animationFps",this.intParameter(this.checkLast(2)));break;default:this.frameControl(1)}});d(c$,"setFrameSet",function(a){a=this.expandFloatArray(this.floatParameterSet(a,0,2147483647),1);this.checkLength(this.iToken+1);if(!this.chk){var b=new java.util.Hashtable;0<a.length&&b.put("frames",a);b.put("currentFrame",Integer.$valueOf(0));
this.vwr.am.setMovie(b)}},"~N");d(c$,"cmdAxes",function(a){var b=this.tickParamAsStr(a,!0,!0,!1);a=this.iToken+1;var c=this.tokAt(a),e=this.optParameterAsString(a).toLowerCase();if(this.slen==a+1&&JU.PT.isOneOf(e,";window;unitcell;molecular;"))this.setBooleanProperty("axes"+e,!0);else{switch(c){case 1073742066:this.setFloatProperty("axisOffset",this.floatParameter(++a));this.checkLast(this.iToken);return;case 12289:this.setShapeProperty(34,"origin",this.centerParameter(a+1,null));this.checkLast(this.iToken);
return;case 1140850696:a=this.stringParameter(a+1);JU.PT.isOneOf(a,";a;b;c;ab;ac;bc;abc;")||(a=null);this.setShapeProperty(34,"type",a);this.checkLast(this.iToken);return;case 1073742138:this.setFloatProperty("axesScale",this.floatParameter(this.checkLast(++a)));return;case 1825200146:switch(c=this.tokAt(a+1)){case 1073742334:case 1073742335:this.checkLength(a+2);this.setShapeProperty(34,"labels"+(1073742335==c?"On":"Off"),null);return}b=null;switch(this.slen-a){case 7:this.setShapeProperty(34,"labels",
O(-1,[this.paramAsStr(++a),this.paramAsStr(++a),this.paramAsStr(++a),this.paramAsStr(++a),this.paramAsStr(++a),this.paramAsStr(++a)]));break;case 5:b=this.paramAsStr(a+4);case 4:this.setShapeProperty(34,"labels",O(-1,[this.paramAsStr(++a),this.paramAsStr(++a),this.paramAsStr(++a),b]));break;default:this.bad()}return}e.equals("position")?(1073742334==this.tokAt(++a)?a=new JU.P3:(a=this.xypParameter(a),null==a&&this.invArg()),this.setShapeProperty(34,"position",a)):(a=this.getSetAxesTypeMad10(a),this.chk||
2147483647==a||(this.setObjectMad10(34,"axes",a),null!=b&&this.setShapeProperty(34,"tickInfo",b)))}},"~N");d(c$,"cmdBackground",function(a){this.getToken(a);if(4120==this.theTok){var b=null;switch(this.tokAt(++a)){case 15:case 6:b=this.getToken(a).value;break;default:a=this.paramAsStr(this.checkLast(a));if(this.chk)return;if(a.equalsIgnoreCase("none")||0==a.length){this.vwr.setBackgroundImage(null,null);return}b=a.startsWith(";base64,")?new JU.BArray(JU.Base64.decodeBase64(a)):a}if(this.vwr.fm.loadImage(b,
null,!this.useThreads()))throw new JS.ScriptInterruption(this,"backgroundImage",1);}else 1073742333==this.theTok||this.isColorParam(a)?(a=this.getArgbParamLast(a,!0),this.chk||(this.setObjectArgb("background",a),this.vwr.setBackgroundImage(null,null))):(b=this.getShapeType(this.theTok),this.colorShape(b,a+1,!0))},"~N");d(c$,"cmdBind",function(){var a=this.stringParameter(1),b=this.paramAsStr(2);this.checkLength(3);this.chk||this.vwr.bindAction(a,b)});d(c$,"cmdBondorder",function(){this.checkLength(-3);
var a=0;switch(this.getToken(1).tok){case 2:case 3:131071==(a=JU.Edge.getBondOrderFromFloat(this.floatParameter(1)))&&this.invArg();break;default:131071==(a=JS.ScriptParam.getBondOrderFromString(this.paramAsStr(1)))&&this.invArg(),33==a&&3==this.tokAt(2)&&(a=JS.ScriptParam.getPartialBondOrderFromFloatEncodedInt(this.st[2].intValue))}this.setShapeProperty(1,"bondOrder",Integer.$valueOf(a))});d(c$,"cmdBoundbox",function(a){var b=this.tickParamAsStr(a,!1,!0,!1);a=this.iToken+1;var c=1;if(1073742138==
this.tokAt(a)&&(c=this.floatParameter(++a),!this.chk&&0==c&&this.invArg(),a++,a==this.slen)){this.chk||this.vwr.ms.setBoundBox(null,null,!0,c);return}var e=1073741902==this.tokAt(a);e&&a++;if(this.isCenterParameter(a)){var f=Array(1),j=a,d=this.centerParameter(a,f);a=this.iToken+1;if(e||this.isCenterParameter(a))f=e?this.centerParameter(a,f):this.getPoint3f(a,!0),a=this.iToken+1,this.chk||this.vwr.ms.setBoundBox(d,f,e,c);else if(null!=f[0]&&s(f[0],JU.BS))this.chk||this.vwr.calcBoundBoxDimensions(f[0],
c);else if(null==f[0]&&1073742330==this.tokAt(j)){if(this.chk)return;a=this.getObjectBoundingBox(this.objectNameParameter(++j));null==a&&this.invArg();this.vwr.ms.setBoundBox(a[0],a[1],!0,c);a=this.iToken+1}else this.invArg();if(a==this.slen)return}c=this.getSetAxesTypeMad10(a);this.chk||2147483647==c||(null!=b&&this.setShapeProperty(32,"tickInfo",b),this.setObjectMad10(32,"boundbox",c))},"~N");d(c$,"cmdCD",function(){if(!this.chk){var a=1==this.slen?null:this.paramAsStr(1);this.showString(this.vwr.cd(a))}});
d(c$,"cmdCenter",function(a){1==this.slen?this.vwr.setNewRotationCenter(null):(a=this.centerParameter(a,null),null==a&&this.invArg(),this.chk||this.vwr.setNewRotationCenter(a))},"~N");d(c$,"cmdColor",function(){var a=1,b=4==this.tokAt(1)?this.stringParameter(1):null;if(this.isColorParam(1))this.theTok=1140850689;else{var c=0,a=2,e=this.getToken(1).tok;4==e&&(e=JS.T.getTokFromName(b),0==e&&(e=4));switch(e){case 1073742330:this.setObjectProperty();return;case 1086324739:case 2097154:case 2097166:case 1086326788:case 1073741946:case 1631586315:case 1086324742:case 1113589786:case 1086324746:case 1073741991:case 1094713360:case 1094713361:case 1073742333:case 1073742074:case 1111492619:case 1094713362:case 1715472409:case 1073742116:case 1073742110:case 1112152075:case 1073742144:case 1111490574:case 1639976963:case 1111490575:case 1111492620:case 603979967:case 1073742186:case 1648363544:this.theTok=
1140850689;a=1;break;case 4:a=2;this.isArrayParameter(a)&&(b=b+="="+JS.SV.sValue(JS.SV.getVariableAS(this.stringParameterSet(a))).$replace("\n"," "),a=this.iToken+1);c=603979967==this.tokAt(a);this.chk||this.vwr.setPropertyColorScheme(b,c,!0);c&&++a;if(1073742114==this.tokAt(a)||1073741826==this.tokAt(a))b=this.floatParameter(++a),a=this.floatParameter(++a),this.chk||this.vwr.cm.setPropertyColorRange(b,a);return;case 1073742114:case 1073741826:b=this.floatParameter(2);a=this.floatParameter(this.checkLast(3));
this.chk||this.vwr.cm.setPropertyColorRange(b,a);return;case 1610616835:c=this.getArgbParamLast(2,!0);this.chk||this.setObjectArgb("background",c);return;case 12290:case 10:case 1073742325:a=-1;this.theTok=1140850689;break;case 1073742134:c=this.getArgbParamLast(2,!1);this.chk||this.vwr.cm.setRubberbandArgb(c);return;case 536870920:case 1611141171:a=2;1073742074==this.tokAt(2)&&a++;c=this.getArgbParamLast(a,!0);if(this.chk)return;this.sm.loadShape(8);this.setShapeProperty(8,1611141171==e?"argbSelection":
"argbHighlight",Integer.$valueOf(c));return;case 1611272194:case 1678381065:case 1814695966:case 1073741824:case 1612709900:b=this.paramAsStr(1);if(this.checkToken(2))switch(c=this.getToken(2).tok,c){case 1073742333:c=1073741991;break;case 1073741991:case 1073742116:case 1073742110:break;default:c=this.getArgbParam(2)}0==c&&this.error(9);this.checkLast(this.iToken);if(b.equalsIgnoreCase("axes")||0<=JV.StateManager.getObjectIdFromName(b)){this.setObjectArgb(b,c);return}if(this.setElementColor(b,c))return;
this.invArg();break;case 135180:case 134353926:this.setShapeProperty(JV.JC.shapeTokenIndex(e),"thisID","+PREVIOUS_MESH+")}}this.colorShape(this.getShapeType(this.theTok),a,!1)});d(c$,"cmdDefine",function(){(3>this.slen||!s(this.getToken(1).value,String))&&this.invArg();var a=this.getToken(1).value.toLowerCase();-2147483648!=JU.PT.parseInt(a)&&this.invArg();if(!this.chk){var b=a.startsWith("site_");if(0==a.indexOf("dynamic_")||b){for(var c=Array(this.slen),e=this.slen;0<=--e;)c[e]=this.st[e];this.vwr.definedAtomSets.put("!"+
(b?a:a.substring(8)),c)}else b=this.atomExpressionAt(2),this.vwr.definedAtomSets.put(a,b),this.chk||this.vwr.g.setUserVariable("@"+a,JS.SV.newV(10,b))}});d(c$,"cmdDelay",function(){var a=0;switch(this.getToken(1).tok){case 1073742335:a=1;break;case 2:a=1E3*this.intParameter(1);break;case 3:a=I(1E3*this.floatParameter(1));break;default:this.error(34)}this.refresh(!1);this.doDelay(Math.abs(a))});d(c$,"cmdDelete",function(){if(1073742330==this.tokAt(1))4==this.slen&&this.optParameterAsString(2).equals("saved")&&
4==this.slen?(this.vwr.stm.deleteSaved(this.optParameterAsString(3)),this.doReport()&&this.report(J.i18n.GT.o(J.i18n.GT._("show saved: {0}"),this.vwr.stm.listSavedStates()),!1)):this.setObjectProperty();else{var a=1==this.slen?null:this.atomExpression(this.st,1,0,!0,!1,null,!1);this.chk||(null==a&&(a=this.vwr.getAllAtoms()),a=this.vwr.deleteAtoms(a,!1),this.doReport()&&this.report(J.i18n.GT.i(J.i18n.GT._("{0} atoms deleted"),a),!1))}});d(c$,"cmdDisplay",function(a){var b=null,c=0,e=1,f;switch(f=this.tokAt(1)){case 1275069441:case 1073742119:c=
f,f=this.tokAt(++e)}var j=1086324742==f;j&&(f=this.tokAt(++e));switch(f){case 1073742330:this.setObjectProperty();return;case 0:break;default:b=4==this.slen&&1677721602==this.tokAt(2)?JM.BondSet.newBS(JU.BSUtil.newBitSet2(0,this.vwr.ms.bondCount),null):this.atomExpressionAt(e)}this.chk||(s(b,JM.BondSet)?this.vwr.ms.displayBonds(b,a):this.vwr.displayAtoms(b,a,j,c,this.tQuiet))},"~B");d(c$,"cmdDots",function(a){this.chk||this.sm.loadShape(a);this.setShapeProperty(a,"init",null);for(var b=NaN,c=J.atomdata.RadiusData.EnumType.ABSOLUTE,
e=1;;){switch(this.getToken(e).tok){case 1073742072:this.restrictSelected(!1,!1);case 1073742335:b=1;c=J.atomdata.RadiusData.EnumType.FACTOR;break;case 1073742334:b=0;break;case 1073741976:this.setShapeProperty(a,"ignore",this.atomExpressionAt(e+1));e=this.iToken+1;continue;case 2:var f=this.intParameter(e);if(1665140738==this.tokAt(e+1)){e++;this.setShapeProperty(a,"atom",Integer.$valueOf(f));this.setShapeProperty(a,"radius",Float.$valueOf(this.floatParameter(++e)));1765808134==this.tokAt(++e)&&
(this.setShapeProperty(a,"colorRGB",Integer.$valueOf(this.getArgbParam(++e))),e++);10!=this.getToken(e).tok&&this.invArg();this.setShapeProperty(a,"dots",this.st[e].value);return}}break}b=Float.isNaN(b)?this.encodeRadiusParameter(e,!1,!0):new J.atomdata.RadiusData(null,b,c,J.c.VDW.AUTO);null!=b&&(Float.isNaN(b.value)&&this.invArg(),this.setShapeSize(a,b))},"~N");d(c$,"cmdEcho",function(a){if(!this.chk){a=this.optParameterAsString(a);var b=!0;this.vwr.ms.getEchoStateActive()&&(a.startsWith("\u0001")&&
(a=a.substring(1),b=!1),null!=a&&this.setShapeProperty(31,"text",a));b&&this.vwr.getRefreshing()&&this.showString(JU.Txt.formatText(this.vwr,a))}},"~N");d(c$,"cmdFile",function(){var a=this.intParameter(this.checkLast(1));if(!this.chk){var b=this.vwr.ms.getModelNumberIndex(1E6*a+1,!1,!1),c=-1;0<=b&&(c=this.vwr.ms.getModelNumberIndex(1E6*(a+1)+1,!1,!1),0>c&&(c=this.vwr.ms.mc),c--);this.vwr.setAnimationOn(!1);this.vwr.am.setAnimationDirection(1);this.vwr.setAnimationRange(b,c);this.vwr.setCurrentModelIndex(-1)}});
d(c$,"cmdFixed",function(){var a=1==this.slen?null:this.atomExpressionAt(1);this.chk||this.vwr.setMotionFixedAtoms(a)});d(c$,"cmdFor",function(a,b){var c=this.theToken,e=this.st[0].intValue,f=c.forVars,j=K(2,0),d=null,g=null,m=null,p=0,k=!0,l=!1,n=0,r=null;if(b&&null!=f)if(a=1275068432,m=f[0],g=f[1],d=f[1].value,n=++g.intValue,2==g.tok){l=0>n;j=d[0];k=d[1];if(k=j!=k&&k<j==l)m.intValue=d[0]=j+(l?-1:1);n=-1}else 7==g.tok?((k=n<=d.size())&&m.setv(JS.SV.selectItemVar(g)),n=-1):(this.isBondSet=s(d,JM.BondSet),
n=d.nextSetBit(n),k=0<=n);else{for(var B=!1,G=1,v=0;G<this.slen&&2>n;G++)switch(a=this.tokAt(G)){case 36868:B=!0;break;case 1073742339:0<v?v--:j[n++]=G;break;case 1275068432:case 1073741952:r=this.paramAsStr(G-1);v-=2;if(this.isAtomExpression(++G))p=10,d=this.atomExpressionAt(G),this.isBondSet&&(d=JM.BondSet.newBS(d,null)),k=0<=d.nextSetBit(0);else switch(p=this.parameterExpressionList(-G,1,!1),(null==p||1>p.size())&&this.invArg(),G=p.get(0),p=G.tok){case 10:d=G.value;k=!d.isEmpty();break;case 7:d=
G.getList();n=d.size();if((k=0<n)&&1073741952==a)d=K(-1,[JS.SV.iValue(d.get(0)),JS.SV.iValue(d.get(n-1))]),l=d[1]<d[0],a=1275068432,p=2;break;case 6:var G=G.getMap(),q=G.keySet().size();if(k=0<q)d=Array(q),G.keySet().toArray(d),java.util.Arrays.sort(d);break;default:this.invArg()}G=this.iToken;break;case 1275082245:v+=2}b||(this.pushContext(c,"FOR"),this.thisContext.forVars=f,f=null);null==r&&(n=b?null==d?j[1]+1:2:2,36868==this.tokAt(n)&&n++,r=this.paramAsStr(n),(l=r.equals("--")||r.equals("++"))&&
(r=this.paramAsStr(++n)));if(k)if(1275068432==a){m=this.getContextVariableAsVariable(r,B);null==m&&!B&&(m=this.vwr.g.getAndSetNewVariable(r,!1));if(null==m||null==m.myName)r.startsWith("_")&&this.invArg(),B?this.contextVariables.put(r.toLowerCase(),m=JS.SV.newI(0)):m=this.vwr.g.getAndSetNewVariable(r,!0);2==p?(m.tok=2,m.intValue=d[0],g=JS.SV.newV(2,d),g.intValue=l?-2147483648:0,n=-1):(g=JS.SV.getVariable(d),10==p?(n=d.nextSetBit(0),g.intValue=0):(g.intValue=1,m.setv(JS.SV.selectItemVar(g)),n=-1));
null==f&&(f=c.forVars=Array(2));f[0]=m;f[1]=g}else{k=this.tokAt(n);if(1073742339!=k&&(JS.T.tokAttr(k,1073741824)||null!=(g=this.getContextVariableAsVariable(r,!1))))!l&&268435860!=this.getToken(++n).tok&&this.invArg(),l&&(n-=2),this.setVariable(++n,this.slen-1,r,!1);k=j[0]+1==j[1]||this.parameterExpressionBoolean(j[0]+1,j[1])}}k&&(1275068432==a&&0<=n)&&(g.intValue=n,m.tok=10,this.isBondSet?(m.value=new JM.BondSet,m.value.set(n)):m.value=JU.BSUtil.newAndSetBit(n));e++;k||(c.forVars=this.thisContext.forVars,
this.popContext(!0,!1));b=!1;!k&&!this.chk&&(this.pc=Math.abs(e)-1);return b},"~N,~B");d(c$,"cmdFlow",function(a,b,c){var e,f=this.st[0].intValue,j=0>f&&!this.chk;e=!0;var d=0;switch(a){case 134320141:case 102436:return this.cmdFunc(),b;case 364558:return b;case 102412:e=this.theToken;this.pushContext(e,"CATCH");!j&&null!=e.name0&&this.contextVariables.put(e.name0,e.contextVariables.get(e.name0));e=!j;this.st[0].intValue=-Math.abs(f);break;case 102410:case 102413:case 102411:d=Math.abs(this.aatoken[Math.abs(f)][0].intValue);
switch(j?0:this.cmdFlowSwitch(this.theToken,a)){case 0:d=-d;e=!1;break;case -1:e=!1}this.aatoken[this.pc][0].intValue=Math.abs(f);this.theToken=this.aatoken[Math.abs(f)][0];102409!=this.theToken.tok&&(this.theToken.intValue=d);break;case 134320649:case 102402:e=!j&&this.parameterExpressionBoolean(1,0);if(this.chk)break;d=Math.abs(this.aatoken[Math.abs(f)][0].intValue);this.aatoken[Math.abs(f)][0].intValue=j||e?-d:d;102412==a&&(this.aatoken[this.pc][0].intValue=-f);break;case 364547:this.checkLength(1);
0>f&&!this.chk&&(this.pc=-f-1);break;case 364548:this.checkLength(1);break;case 102406:b||this.pushContext(this.theToken,"WHILE");b=!1;!this.parameterExpressionBoolean(1,0)&&!this.chk&&(this.pc=f,this.popContext(!0,!1));break;case 102407:if(!this.chk){this.breakAt(f);break}if(1==this.slen)break;j=this.intParameter(this.checkLast(1));if(this.chk)break;for(a=0;a<j;a++)this.popContext(!0,!1);break;case 102408:b=!0;this.chk||(this.pc=f-1);1<this.slen&&this.intParameter(this.checkLast(1));break;case 102409:switch(this.getToken(this.checkLast(1)).tok){case 364558:b=
this.getToken(1).value;if(this.chk)return!1;this.runFunctionAndRet(b,"try",null,null,!0,!0,!0);return!1;case 134320141:case 102436:return this.vwr.addFunction(this.theToken.value),b;case 102412:this.popContext(!0,!1);break;case 102439:this.addProcess(c,f,this.pc);this.popContext(!0,!1);break;case 102410:if(0<f&&-1==this.cmdFlowSwitch(this.aatoken[f][0],0)){for(;f<this.pc&&!(102413!=(a=this.aatoken[f][0].tok)&&102411!=a);f++);e=this.pc==f}break;case 134320648:case 102406:e=!1,b=!0}}!e&&!this.chk&&
(this.pc=Math.abs(f)-1);return b},"~N,~B,JU.Lst");d(c$,"cmdFlowSwitch",function(a,b){102410==b&&a.addName("_var");var c=a.contextVariables.get("_var");if(null==c)return 1;if(0==b)return a.contextVariables.remove("_var"),-1;if(102413==b)return-1;var e=this.parameterExpressionToken(1);if(102411==b)return(c=JS.SV.areEqual(c,e))&&a.contextVariables.remove("_var"),c?1:-1;a.contextVariables.put("_var",e);return 1},"JS.ContextToken,~N");d(c$,"cmdFont",function(a,b){var c="SansSerif",e="Plain",f=0,j=-1;switch(this.iToken=
this.slen){case 6:j=this.floatParameter(5),5<=j&&(j=this.vwr.tm.getZoomSetting()/j/this.vwr.getScalePixelsPerAngstrom(!1));case 5:1073741824!=this.getToken(4).tok&&this.invArg(),e=this.paramAsStr(4);case 4:1073741824!=this.getToken(3).tok&&this.invArg();c=this.paramAsStr(3);this.isFloatParameter(2)||this.error(34);b=this.floatParameter(2);a=this.getShapeType(this.getToken(1).tok);break;case 3:this.isFloatParameter(2)||this.error(34);-1==a?(a=this.getShapeType(this.getToken(1).tok),b=this.floatParameter(2)):
1<=b&&(b+=f=5);break;default:if(5==a){b=13;break}this.bad()}if(5==a){if(0>b||1<=b&&(6>b||63<b)){this.integerOutOfRange(6-f,63-f);return}this.setShapeProperty(5,"setDefaults",this.vwr.slm.noneSelected)}this.chk||(0<=javajs.awt.Font.getFontStyleID(c)&&(e=c,c="SansSerif"),c=this.vwr.getFont3D(c,e,b),this.sm.loadShape(a),this.setShapeProperty(a,"font",c),0<=j&&this.setShapeProperty(a,"scalereference",Float.$valueOf(j)))},"~N,~N");d(c$,"cmdFrank",function(a){var b=!0;if(this.slen>a)switch(this.getToken(this.checkLast(a)).tok){case 1073742335:break;
case 1073742334:b=!1;break;default:this.error(5)}this.setBooleanProperty("frank",b)},"~N");d(c$,"cmdFunc",function(){if(!this.chk||this.isCmdLine_c_or_C_Option){var a=this.getToken(0).value.toLowerCase();this.vwr.isFunction(a)||this.error(10);var b=1==this.slen||3==this.slen&&268435472==this.tokAt(1)&&268435473==this.tokAt(2)?null:this.parameterExpressionList(1,-1,!1);this.chk||this.runFunctionAndRet(null,a,b,null,!1,!0,!0)}});d(c$,"cmdGetProperty",function(){if(!this.chk){var a="",b=a=this.optParameterAsString(1);
0<=b.indexOf(".")&&(b=b.substring(0,b.indexOf(".")));0<=b.indexOf("[")&&(b=b.substring(0,b.indexOf("[")));var b=this.vwr.getPropertyNumber(b),c="";switch(this.tokAt(2)){default:c=this.optParameterAsString(2);break;case 12290:case 1073742325:case 10:c=this.atomExpressionAt(2),a.equalsIgnoreCase("bondInfo")&&this.isAtomExpression(++this.iToken)&&(c=O(-1,[c,this.atomExpressionAt(this.iToken)]))}if(0<a.length&&0>b)c=a="";else if(0<=b&&3>this.slen){if((c=this.vwr.getDefaultPropertyParam(b)).equals("(visible)"))c=
this.vwr.ms.getVisibleSet(!0)}else if(b==this.vwr.getPropertyNumber("fileContents")){b=c.toString();for(c=3;c<this.slen;c++)b+=this.paramAsStr(c);c=b}a=this.vwr.getProperty("readable",a,c);this.showString(a)}});d(c$,"cmdGoto",function(a){a=a?this.paramAsStr(this.checkLast(1)):null;for(var b=null==a?this.aatoken.length-1:-1,c=null,e=b+1;e<this.aatoken.length;e++){var c=this.aatoken[e],f=c[0].tok;switch(f){case 20485:case 0:c=c[c.length-1].value;0==f&&(c=c.substring(c.startsWith("#")?1:2));break;default:continue}if(c.equalsIgnoreCase(a)){b=
e;break}}0>b&&this.invArg();null==a&&(b=0);f=b<this.pc?1:-1;c=0;for(e=b;e!=this.pc;e+=f)switch(this.aatoken[e][0].tok){case 1275335685:case 102439:case 134320648:case 102412:case 102406:c++;break;case 1275334681:c--;break;case 102409:switch(this.aatoken[e][1].tok){case 102439:case 134320648:case 102412:case 102406:c--}}if(null==a)for(b=2147483647;0<c;--c)this.popContext(!1,!1);0!=c&&this.invArg();this.chk||(this.pc=b-1)},"~B");d(c$,"cmdHbond",function(){if(2==this.slen&&4102==this.getToken(1).tok){if(!this.chk){var a=
this.vwr.autoHbond(null,null,!1);this.report(J.i18n.GT.i(J.i18n.GT._("{0} hydrogen bonds"),Math.abs(a)),!1)}}else 2==this.slen&&12291==this.getToken(1).tok?this.chk||this.checkExtension(1613238294):(a=this.getMadParameter(),2147483647!=a&&(this.setShapeProperty(1,"type",Integer.$valueOf(30720)),this.setShapeSizeBs(1,a,null),this.setShapeProperty(1,"type",Integer.$valueOf(1023))))});d(c$,"cmdHelp",function(){if(!this.chk){var a=this.optParameterAsString(1).toLowerCase(),b=0;a.startsWith("mouse")&&
0<=(b=a.indexOf(" "))&&b==a.lastIndexOf(" ")?this.showString(this.vwr.getBindingInfo(a.substring(b+1))):(JS.T.tokAttr(JS.T.getTokFromName(a),4096)&&(a="?command="+a),this.vwr.getHelp(a))}});d(c$,"cmdHistory",function(a){if(1==this.slen)this.showString(this.vwr.getSetHistory(2147483647));else if(2==a)a=this.intParameter(this.checkLast(2)),0>a&&this.invArg(),this.chk||this.vwr.getSetHistory(0==a?0:-2-a);else switch(this.getToken(this.checkLast(1)).tok){case 1073742335:case 1073741882:this.chk||this.vwr.getSetHistory(-2147483648);
break;case 1073742334:this.chk||this.vwr.getSetHistory(0);break;default:this.errorStr(24,"ON, OFF, CLEAR")}},"~N");d(c$,"cmdHover",function(){if(!this.chk){var a=1==this.slen?"on":this.paramAsStr(1);a.equalsIgnoreCase("on")?a="%U":a.equalsIgnoreCase("off")&&(a=null);this.vwr.setHoverLabel(a)}});d(c$,"cmdInvertSelected",function(){var a=null,b=null,c=null,e=-2147483648,f=1;switch(this.tokAt(1)){case 0:if(this.chk)return;c=this.vwr.bsA();a=this.vwr.ms.getAtomSetCenter(c);this.vwr.invertAtomCoordPt(a,
c);return;case 528443:case 1140850689:f++;case 10:case 1073742325:case 12290:c=this.atomExpressionAt(f);if(!this.isAtomExpression(this.iToken+1)){this.checkLengthErrorPt(this.iToken+1,this.iToken+1);if(!this.chk)for(a=c.nextSetBit(0);0<=a;a=c.nextSetBit(a+1))this.vwr.invertRingAt(a,!1);return}e=c.nextSetBit(0);c=this.atomExpressionAt(this.iToken+1);break;case 134217751:a=this.centerParameter(2,null);break;case 134217750:b=this.planeParameter(1);break;case 134219265:b=this.hklParameter(2)}this.checkLengthErrorPt(this.iToken+
1,1);null==b&&(null==a&&-2147483648==e)&&this.invArg();this.chk||-1!=e&&this.vwr.invertSelected(a,b,e,c)});d(c$,"cmdLabel",function(a,b){if(!this.chk){this.sm.loadShape(5);var c=null;switch(this.getToken(a).tok){case 1073742335:c=this.vwr.getStandardLabelFormat(0);break;case 1073742334:break;case 12294:case 1610625028:this.setShapeProperty(5,"display",1610625028==this.theTok?Boolean.TRUE:Boolean.FALSE);return;case 7:c=this.theToken.value;break;default:c=this.paramAsStr(a)}this.sm.setLabel(c,null==
b?this.vwr.bsA():b)}},"~N,JU.BS");d(c$,"cmdLoad",function(){var a=!this.chk||this.isCmdLine_C_Option,b=!1,c=!1,e=!1,f=!1,j=!1,d=this.vwr.async,g=!1,m=!1,p=this.vwr.getBoolean(603979792),k=null,l,n=134221834==this.tokAt(0)?0:1,r=null,B=this.vwr.ms.mc-(this.vwr.fm.getFileName().equals("zapped")?1:0),q=this.vwr.ms.ac,v=(new JU.SB).append("load"),H=1,u=new java.util.Hashtable;this.$isStateScript&&(u.put("isStateScript",Boolean.TRUE),this.forceNoAddHydrogens&&u.put("doNotAddHydrogens",Boolean.TRUE));var y=
null,x=null,t=null,w=null,w=new JU.SB,A=0,C;if(1==this.slen)n=0;else{y=this.paramAsStr(n);if(2==this.slen&&!this.chk&&(y.endsWith(".spt")||y.endsWith(".png")||y.endsWith(".pngj"))){this.cmdScript(0,y,null);return}C=this.tokAt(n);switch(C){case 36868:l=this.paramAsStr(++n);var k="@"+l,D=this.getVarParameter(l,!1);if(s(D,java.util.Map)){this.checkLength(3);this.loadPNGJVar(k,D,u);return}break;case 1073877011:case 1610616855:case 1073742015:b=this.paramAsStr(this.checkLast(2));if(!this.chk)switch(C){case 1073877011:u.put("service",
"nbo");u.put("mode",Integer.$valueOf(1));u.put("action","load");u.put("value",b);u.put("sync",Boolean.TRUE);this.vwr.sm.processService(u);this.runScript(u.get("ret"));break;case 1610616855:this.vwr.setHistory(b);break;case 1073742015:this.vwr.setMenu(b,!0)}return;case 4130:f=b=!0;p=!1;v.append(" mutate");y=this.optParameterAsString(++n);C=JS.T.getTokFromName(y);break;case 1073741839:b=!0;v.append(" append");y=this.optParameterAsString(++n);C=JS.T.getTokFromName(y);break;case 1073742077:m=!0;v.append(" orientation");
this.vwr.stm.saveOrientation("preload",null);y=this.optParameterAsString(++n);C=JS.T.getTokFromName(y);break;case 1073741851:this.chk||this.vwr.playAudio(this.optParameterAsString(++n));return;case 1073741824:n++,v.append(" "+y),A=1073741824==C&&JU.PT.isOneOf(y.toLowerCase(),";xyz;vxyz;vibration;temperature;occupancy;partialcharge;")?JS.T.getTokFromName(y):0,0!=A&&(u.put("atomDataOnly",Boolean.TRUE),u.put("modelNumber",Integer.$valueOf(1)),4166==A&&(A=1145047055),t=this.vwr.fm.getFileInfo(),b=!0)}switch(C){case 1228935687:n++;
v.append(" "+y);this.optParameterAsString(n).equals("+")&&(g=!0,n++,v.append(" +"));7==this.tokAt(n)&&(x=this.stringParameterSet(n),n=this.iToken,n+1!=this.slen&&this.invArg(),null!=x&&(H=x.length));break;case 1073741983:c=!0;n++;v.append(" "+y);break;case 134218757:e=!0;n++;break;case 1073741849:d=!0;u.put("async",Boolean.TRUE);n++;break;case 536870926:case 1094717454:n++;v.append(" "+y);536870926==C&&u.put("isTrajectory",Boolean.TRUE);if(this.isPoint3f(n))D=this.getPoint3f(n,!1),n=this.iToken+1,
u.put("firstLastStep",K(-1,[I(D.x),I(D.y),I(D.z)])),v.append(" "+JU.Escape.eP(D));else switch(this.tokAt(n)){case 10:l=this.getToken(n++).value;u.put("bsModels",l);v.append(" "+JU.Escape.eBS(l));break;default:u.put("firstLastStep",K(-1,[0,-1,1]))}break;case 1073741824:break;case 134221834:l=this.stringParameter(++n).toLowerCase();b=l.startsWith("append");m=0<=l.indexOf("orientation");n=this.addLoadData(v,l,u,n);j=!0;break;default:y="fileset"}null==k&&(null==x&&4!=this.getToken(n).tok)&&this.error(16)}C=
n;D=n+1;l=null;1073741848==this.tokAt(D)&&(l=this.stringParameter(n=D+1),""!==this.vwr.fm.getPathForAllFiles()&&(l=null,C=n));var z=D=null;if(this.slen==n+1){if(null==k&&(0==n||null==x&&0==(k=this.paramAsStr(C)).length))k=this.getFullPathName();if(null==k&&null==x){this.cmdZap(!1);return}if(null==x&&!c)if(e)k="$"+k;else{if(k.equals("String[]"))return;0==k.indexOf("[")&&(x=JU.Escape.unescapeStringArray(k),null!=x&&(1==n&&v.append(" files"),H=x.length))}if(null!=x)for(e=0;e<H;e++)v.append(" /*file*/").append(JU.PT.esc(x[e]))}else if(this.isLoadOption(this.getToken(n+
1).tok)){if(null==k&&0==(k=this.paramAsStr(C)).length&&null==(k=this.getFullPathName())){this.cmdZap(!1);return}(C==n||null!=l)&&n++;if(k.equals("String[]"))return;if(1073742010==(C=this.tokAt(n)))e=this.stringParameter(++n),u.put("manifest",e),w.append(" MANIFEST "+JU.PT.esc(e)),C=this.tokAt(++n);switch(C){case 2:case 7:case 268435520:case 1073742195:n=this.getLoadModelIndex(n,w,u)}n=this.getCmdExt().getLoadSymmetryParams(n,w,u);1073741839==this.tokAt(n)&&(134221834==this.tokAt(++n)?(n+=2,D=this.getToken(n++).value,
z=this.stringParameter(++n),++n):(z=this.stringParameter(n++),D=this.stringParameter(n++)),u.put(z,D));1073741940==this.tokAt(n)&&(r=this.stringParameter(++n))}else H=new JU.Lst,1==n&&(268435617==this.tokAt(n+1)?y="files":n++,v.append(" "+y)),r=this.getLoadFilesList(n,v,w,u,H),x=H.toArray(Array(H=H.size())),!g&&0<=v.indexOf("/*concat*/")&&(g=!0);if(a){null!=x&&(k="fileSet");null!=D&&w.append(' APPEND data "'+z+'"\n'+D+(D.endsWith("\n")?"":"\n")+'end "'+z+'"');null==r&&(r=this.vwr.g.defaultLoadFilter);
0<r.length&&(0<=r.toUpperCase().indexOf("DOCACHE")&&!this.$isStateScript&&!b&&this.vwr.cacheClear(),u.put("filter",r),r.equalsIgnoreCase("2d")&&(r="2D-noMin"),w.append(" FILTER "+JU.PT.esc(r)));a=!1;if(null==x)if(k.equals("string")&&0<=this.vwr.am.cmi&&(k=this.vwr.getCurrentFileAsString(null),v=(new JU.SB).append("load inline "),c=!0),c)u.put("fileData",k);else if(k.startsWith("@")&&1<k.length){D=this.getVarParameter(k.substring(1),!1);if(s(D,java.util.Map)){this.checkLength(n+1);this.loadPNGJVar(k,
D,u);return}a=!0;D=""+D;v=(new JU.SB).append("{\n    var ").append(k.substring(1)).append(" = ").append(JU.PT.esc(D)).append(";\n    ").appendSB(v);u.put("fileData",D)}else if((this.vwr.testAsync||this.vwr.isJS)&&(d||k.startsWith("?"))||this.vwr.apiPlatform.forceAsyncLoad(k))l=null,k=this.loadFileAsync("LOAD"+(b?"_APPEND_":"_"),k,n,!b&&this.pc!=this.pcResume);d=null;null!=l&&(l.equals(".")&&(l=this.vwr.fm.getFilePath(k,!1,!0)),(0==l.length||this.vwr.fm.getFilePath(l,!1,!1).equalsIgnoreCase(this.vwr.fm.getFilePath(k,
!1,!1)))&&this.invArg(),n=O(-1,[l]),d=this.vwr.getOutputChannel(l,n),null==d?JU.Logger.error("Could not create output stream for "+n[0]):u.put("outputChannel",d));if(null==x&&0==A){v.append(" ");a||c?v.append(0<=k.indexOf("\n")||a?JU.PT.esc(k):k):j||(null!=l&&(l=this.vwr.fm.getFilePath(l,!1,!1)),k.equals("String[]")||v.append("/*file*/").append(null!=l?JU.PT.esc(l):"$FILENAME$"));if(!g&&(k.startsWith("=")||k.startsWith("*"))&&0<k.indexOf("/")){g=!0;D=k.indexOf("/");1==D&&this.vwr.ms.getInfo(this.vwr.am.cmi,
"isPDB")===Boolean.TRUE?(c=this.vwr.ms.getInfo(this.vwr.am.cmi,"modelName"),k=k.substring(0,1)+c+k.substring(1),D=k.indexOf("/")):c=k.substring(1,D);j=k.substring(D+1);k=k.substring(0,D);if(0<=(D=k.indexOf(".")))k=k.substring(0,D);0<=";dssr;rna3d;dom;val;".indexOf(";"+j+";")||j.startsWith("dssr--")?(k.startsWith("=")&&(k+=".cif"),x=j.equals("all")?O(-1,[k,"*dom/"+c,"*val/"+c]):O(-1,[k,"*"+j+"/"+c]),k="fileSet",v=null,a=!1,w.setLength(0)):k+="/"+j}0<w.length()&&v.append(" /*options*/ ").append(w.toString());
a&&v.append("\n  }");null!=v&&u.put("loadScript",v)}this.setCursorWait(!0);(c=this.vwr.getBoolean(603979934))&&JU.Logger.startTimer("load");!this.$isStateScript&&!b&&this.vwr.setBooleanProperty("legacyJavaFloat",!1);f&&u.put("isMutate",Boolean.TRUE);u.put("eval",this);w=this.vwr.loadModelFromFile(null,k,x,null,b,u,v,w,A,g);c&&this.showString(JU.Logger.getTimerMsg("load",0));null!=d&&(this.vwr.fm.setFileInfo(O(-1,[l])),JU.Logger.info(J.i18n.GT.o(J.i18n.GT._("file {0} created"),l)),this.showString(this.vwr.fm.getFilePath(l,
!1,!1)+" created"),d.closeChannel());if(0<A)this.vwr.fm.setFileInfo(t),null!=w&&!this.isCmdLine_c_or_C_Option&&this.evalError(w,null);else{if(null!=w&&!this.isCmdLine_c_or_C_Option){if(0==w.indexOf("NOTE: file recognized as a script file: ")){k=w.substring(40).trim();this.cmdScript(0,k,null);return}if(this.vwr.async&&w.startsWith(JV.JC.READER_NOT_FOUND))throw new JS.ScriptInterruption(this,"async",1);this.evalError(w,null)}this.debugHigh&&this.report("Successfully loaded:"+(null==x?u.get("fullPathName"):
y),!1);this.finalizeLoad(b,p,g,m,H,q,B)}}});d(c$,"addLoadData",function(a,b,c,e){a.append(" /*data*/ data");var f=b.indexOf("@");0<=f&&(b=b.$replace("@","_"));a.append(" ").append(JU.PT.esc(b));var j=0<=f?""+this.getParameter(b.substring(f+1),4,!0):this.paramAsStr(++e),j=JV.Viewer.fixInlineString(j,this.vwr.getInlineChar());c.put("fileData",j);c.put("isData",Boolean.TRUE);a.appendC("\n").append(j).append(" end ").append(JU.PT.esc(b));0>f&&(e+=2);return e},"JU.SB,~S,java.util.Map,~N");d(c$,"loadPNGJVar",
function(a,b,c){b=O(-1,[JS.SV.newV(6,b)]);this.getCmdExt().dispatch(1073741866,!1,b);c.put("imageData",b[0].value);b=this.vwr.getOutputChannel(null,null);c.put("outputChannel",b);this.vwr.createZip("","BINARY",c);a="cache://VAR_"+a;this.vwr.cacheFileByName("cache://VAR_*",!1);this.vwr.cachePut(a,b.toByteArray());this.cmdScript(0,a,null)},"~S,~O,java.util.Map");d(c$,"getLoadFilesList",function(a,b,c,e,f){for(var j=null,d=null,g=null,m=null;a<this.slen;){switch(this.tokAt(a)){case 268435617:b.append("/*concat*/ +");
++a;continue;case 2:case 7:case 268435520:case 1073742195:a=this.getLoadModelIndex(a,c,e);continue;case 1073741940:d=this.stringParameter(++a);++a;continue;case 1073742329:e.remove("isTrajectory");null==j&&(j=new JU.Lst,g=JU.P3.new3(0,-1,1));this.isPoint3f(++a)?(g=this.getPoint3f(a,!1),a=this.iToken+1):10==this.tokAt(a)&&(m=this.getToken(a).value,g=null,a=this.iToken+1);break;case 1073741824:this.invArg()}f.addLast(this.paramAsStr(a++));null!=g?(j.addLast(K(-1,[I(g.x),I(g.y),I(g.z)])),b.append(" COORD "+
JU.Escape.eP(g))):null!=m&&(j.addLast(m),b.append(" COORD "+JU.Escape.eBS(m)));b.append(" /*file*/$FILENAME"+f.size()+"$")}null!=j&&e.put("firstLastSteps",j);return d},"~N,JU.SB,JU.SB,java.util.Map,JU.Lst");d(c$,"isLoadOption",function(a){switch(a){case 1073742010:case 2:case 7:case 268435520:case 1073742195:case 1073742332:case 8:case 1073742080:case 1094713350:case 1073742163:case 1073741938:case 1073742114:case 1073742152:case 1814695966:case 1073742066:case 134221834:case 1073741839:return!0;
case 1073741940:case 1073741824:return 1073742329!=this.tokAt(this.iToken+2)}return!1},"~N");d(c$,"getLoadModelIndex",function(a,b,c){switch(this.tokAt(a)){case 2:c.remove("firstLastStep");c.remove("bsModel");c.put("useFileModelNumbers",Boolean.TRUE);a=this.intParameter(a);b.append(" ").appendI(a);0>a?c.put("vibrationNumber",Integer.$valueOf(-a)):c.put("modelNumber",Integer.$valueOf(a));break;case 7:case 268435520:case 1073742195:c.remove("firstLastStep");for(var e=this.floatParameterSet(a,1,2147483647),
f=new JU.BS,j=K(e.length,0),d=0;d<e.length;d++)a=I(e[d]),1<=e[d]&&e[d]==a?f.set(a-1):this.invArg(),j[d]=a;b.append(" "+JU.Escape.eAI(j));c.put("bsModels",f);c.put("useFileModelNumbers",Boolean.TRUE)}return this.iToken+1},"~N,JU.SB,java.util.Map");d(c$,"finalizeLoad",function(a,b,c,e,f,j,d){if(a&&(b||1<f))this.vwr.setAnimationRange(-1,-1),this.vwr.setCurrentModelIndex(d);var g;0==this.scriptLevel&&(!a&&(c||2>f)&&null!=(g=this.vwr.ms.getInfoM("modelLoadNote")))&&this.vwr.showString(g,!1);g=this.vwr.ms.getInfoM("centroidMinMax");
JU.AU.isAI(g)&&0<this.vwr.ms.ac&&(a=JU.BSUtil.newBitSet2(a?j:0,this.vwr.ms.ac),this.vwr.ms.setCentroid(a,g));a=this.vwr.g.defaultLoadScript;g="";0<a.length&&(g+="\nUsing defaultLoadScript: "+a);var m;j=this.vwr.ms.msInfo;null!=j&&this.vwr.allowEmbeddedScripts()&&null!=(m=j.remove("jmolscript"))&&0<m.length?(g+="\nAdding embedded #jmolscript: "+m,a+=";"+m,this.setStringProperty("_loadScript",a),a="allowEmbeddedScripts = false;try{"+a+"} allowEmbeddedScripts = true;"):this.setStringProperty("_loadScript",
"");this.logLoadInfo(g);m=null==j?null:j.remove("sitescript");null!=m&&(a=m+";"+a);e&&(a+=";restore orientation preload");0<a.length&&!this.isCmdLine_c_or_C_Option&&this.runScript(a)},"~B,~B,~B,~B,~N,~N,~N");d(c$,"cmdLog",function(){1==this.slen&&this.bad();if(!this.chk){var a=this.parameterExpressionString(1,0);1073742334==this.tokAt(1)?this.setStringProperty("logFile",""):this.vwr.log(a)}});d(c$,"cmdLoop",function(){this.vwr.headless||(this.chk||(this.pc=-1),this.cmdDelay())});d(c$,"cmdMessage",
function(){var a=this.paramAsStr(this.checkLast(1));this.chk||(a=JU.Txt.formatText(this.vwr,a),null==this.outputBuffer&&!this.vwr.isPrintOnly&&JU.Logger.warn(a),a.startsWith("_")||this.report(a,!1))});d(c$,"cmdModel",function(a){var b=4115==this.theTok||1<this.vwr.ms.mc,c=K(-1,[-1,-1]),e=0,f=!0,j=-1;if(1==this.slen&&1==a){var j=this.vwr.am.cmi,d;if(!this.chk&&0<=j&&0<=(d=this.vwr.ms.getJmolDataSourceFrame(j)))this.vwr.setCurrentModelIndex(d==j?-2147483648:d)}else{switch(this.tokAt(1)){case 2:if(b&&
2==this.slen){this.chk||this.vwr.am.setFrame(this.intParameter(1)-1);return}break;case 1073742325:case 10:j=this.atomExpressionAt(1).nextSetBit(0);if(this.chk||0>j||j>=this.vwr.ms.ac)return;j=this.vwr.ms.at[j].mi;if(this.iToken+1==this.slen){this.vwr.setCurrentModelIndex(j);return}c[e++]=j;a=this.iToken+1;f=!1;break;case 1073741904:this.iToken=1;j=2==this.tokAt(2)?this.intParameter(++this.iToken):1;this.checkLength(this.iToken+1);!this.chk&&0<j&&this.vwr.ms.createModels(j);return;case 1073741974:this.checkLength(3);
j=this.stringParameter(2);this.chk||this.vwr.setCurrentModelID(j);return;case 528397:j=0;this.checkLength(3);switch(this.getToken(2).tok){case 2:case 3:j=Y(1E3*this.floatParameter(2));break;default:this.error(20)}this.chk||this.vwr.setFrameDelayMs(j);return;case 1073742166:0<this.checkLength23()&&(this.chk||this.vwr.setFrameTitleObj(2==this.slen?"@{_modelName}":7==this.tokAt(2)?JS.SV.strListValue(this.st[2]):this.paramAsStr(2)));return;case 1073742077:if(3==this.tokAt(2)&&12==this.tokAt(3)){j=this.vwr.ms.getModelNumberIndex(this.getToken(2).intValue,
!1,!1);c=this.getToken(3).value;0<=j&&(this.vwr.ms.am[j].mat4=c);return}break;case 1073741832:c=1073742333==this.tokAt(2);j=2==this.slen||c?null:this.atomExpressionAt(2);c&&(this.iToken=2);c=12293==this.tokAt(this.iToken+1);this.checkLength(this.iToken+(c?2:1));this.chk||this.vwr.setFrameOffsets(j,c);return}if(268435616==this.getToken(a).tok)++a,(2!=this.getToken(this.checkLast(a)).tok||1!=this.intParameter(a))&&this.invArg(),this.chk||this.vwr.setAnimation(1073742108);else{d=b=!1;var g=null,m=null,
p=!1,g=!1,k=0,l=null,n=this.vwr.haveFileSet();if(this.isArrayParameter(1))this.setFrameSet(1),p=!0;else for(var r=a;r<this.slen;r++)switch(this.getToken(r).tok){case 1073741832:2!=r&&this.invArg();l=this.centerParameter(3,null);this.checkLength(r=this.iToken+1);break;case 1073742327:case 268435633:this.checkLength(a+(d?2:1));p=!0;break;case 268435616:1!=e&&this.invArg();g=!0;break;case 1073742333:this.checkLength(a+1);break;case 3:if(f=!1,0>(k=this.floatParameter(r))){this.checkLength(r+1);this.chk||
this.vwr.am.morph(-k);return}case 2:case 4:2==e&&this.invArg();var B=4==this.theTok?JS.ScriptParam.getFloatEncodedInt(this.theToken.value):this.theToken.intValue;0>B&&1==e&&(g=!0,B=-B,n&&1E6>B&&(B*=1E6));3==this.theTok&&(n&&k==I(k))&&(B=1E6*I(k));if(2147483647==B){f=!1;c[e++]=this.chk||1!=r?0:this.vwr.getModelIndexFromId(this.theToken.value.toString());break}if(-1==B){this.checkLength(a+1);this.chk||this.vwr.setAnimation(1073742108);return}1E3<=B&&(1E6>B&&n)&&(B=1E6*Q(B/1E3)+B%1E3);!f&&(0==B&&0==
e)&&(p=!0);1E6<=B&&(f=!1);c[e++]=B;break;case 1073742096:b=!0;break;case 1073742114:d=!0;break;case 1715472409:if(0>j&&0>(j=this.vwr.am.cmi))return;g=this.paramAsStr(++r);c=this.setVariable(++r,-1,"",!1);if(null!=c&&!this.chk){if(g.equalsIgnoreCase("DSSR")){this.loadDssr(j,c.value);return}m=JS.SV.oValue(c)}this.chk||this.vwr.ms.setInfo(j,g,m);return;default:this.frameControl(a);return}if(!this.chk)if(d&&0==e&&(p=!0),p)this.vwr.setAnimationOn(!1),this.vwr.setAnimationRange(-1,-1),d||this.vwr.setCurrentModelIndex(-1);
else{2==e&&!d&&(g=!0);if(n)f=!1;else if(f)for(r=0;r<e;r++)0<=c[r]&&(c[r]%=1E6);j=this.vwr.ms.getModelNumberIndex(c[0],f,!1);if(null!=l)0<=j&&(this.vwr.ms.translateModel(j,null),this.vwr.ms.translateModel(j,l));else{a=-1;if(n&&0>j&&0!=c[0])if(1E6>c[0]&&(c[0]*=1E6),2==e&&1E6>c[1]&&(c[1]*=1E6),0==c[0]%1E6)c[0]++,j=this.vwr.ms.getModelNumberIndex(c[0],!1,!1),0<=j&&(a=this.vwr.ms.getModelNumberIndex(1==e?c[0]+1E6:0==c[1]?-1:0==c[1]%1E6?c[1]+1000001:c[1]+1,!1,!1),0>a&&(a=this.vwr.ms.mc),a--,d?e=2:!g&&a!=
j&&(g=!0),d=d||j==a);else return;(!b&&!d||0<=j)&&this.vwr.setCurrentModelIndexClear(j,!1);if(b&&2==e||d||g)0>a&&(a=this.vwr.ms.getModelNumberIndex(c[1],f,!1)),this.vwr.setAnimationOn(!1),this.vwr.am.setAnimationDirection(1),this.vwr.setAnimationRange(j,a),this.vwr.setCurrentModelIndexClear(g&&!d?-1:0<=j?j:0,!1);b&&this.vwr.setAnimation(4143)}}}}},"~N");d(c$,"loadDssr",function(a,b){0>a&&0>(a=this.vwr.am.cmi)&&this.errorStr(30,"load <dssr file>");b.startsWith("{")||(b=this.vwr.getFileAsString3(b,!0,
"script"));this.clearDefinedVariableAtomSets();var c=this.vwr.parseJSON(b);this.showString(this.vwr.getAnnotationParser(!0).fixDSSRJSONMap(c));this.vwr.ms.setInfo(a,"dssr",c)},"~N,~S");d(c$,"cmdMove",function(){this.checkLength(-11);var a=JU.V3.new3(this.floatParameter(1),this.floatParameter(2),this.floatParameter(3)),b=this.floatParameter(4),c=JU.V3.new3(this.intParameter(5),this.intParameter(6),this.intParameter(7)),e=this.floatParameter(8),f=this.floatParameter(9),d=11==this.slen?this.intParameter(10):
30;if(!this.chk&&(this.refresh(!1),this.useThreads()||(f=0),this.vwr.move(this,a,b,c,e,f,d),0<f&&this.isJS))throw new JS.ScriptInterruption(this,"move",1);});d(c$,"cmdMoveto",function(){if(2==this.slen&&1073742162==this.tokAt(1))this.chk||this.vwr.tm.stopMotion();else{var a;if(2==this.slen&&this.isFloatParameter(1)){if(a=this.floatParameter(1),!this.chk&&(this.useThreads()||(a=0),0<a&&this.refresh(!1),this.vwr.moveTo(this,a,null,JV.JC.axisZ,0,null,100,0,0,0,null,NaN,NaN,NaN,NaN,NaN,NaN),this.isJS&&
0<a&&this.vwr.g.waitForMoveTo))throw new JS.ScriptInterruption(this,"moveTo",1);}else{var b=JU.V3.new3(NaN,0,0),c=null,e=1;a=this.isFloatParameter(e)?this.floatParameter(e++):2;var f=90,d=null,h=!0,h=!1,g=0,m=0,p=NaN,k=NaN,l=this.vwr.tm.getZoomSetting(),n=null,r=NaN,B=NaN,q=NaN,v=NaN,H=NaN,u=NaN,y=null,x=null;switch(this.getToken(e).tok){case 1073742110:y=this.floatParameterSet(++e,18,21);e=this.iToken+1;if(this.chk&&0<this.checkLength(e))return;break;case 134221850:1073742028==this.tokAt(++e)&&(h=
!0,e++);this.isAtomExpression(e)?(h=!0,x=Array(1),c=this.centerParameter(e,x),s(x[0],JU.BS)||this.invArg(),d=x[0],x=this.chk?new JU.Quat:this.vwr.ms.getQuaternion(d.nextSetBit(0),this.vwr.getQuaternionFrame())):x=this.getQuaternionParameter(e);e=this.iToken+1;null==x&&this.invArg();break;case 9:case 8:case 1073742332:this.isPoint3f(e)?(b.setT(this.getPoint3f(e,!0)),e=this.iToken+1,f=this.floatParameter(e++)):(f=this.getPoint4f(e),e=this.iToken+1,b.set(f.x,f.y,f.z),f=0==f.x&&0==f.y&&0==f.z?NaN:f.w);
break;case 1073741954:b.set(1,0,0);f=0;this.checkLength(++e);break;case 1073741858:b.set(0,1,0);f=180;this.checkLength(++e);break;case 1073741996:b.set(0,1,0);this.checkLength(++e);break;case 1073742126:b.set(0,-1,0);this.checkLength(++e);break;case 1073742172:b.set(1,0,0);this.checkLength(++e);break;case 1073741871:b.set(-1,0,0);this.checkLength(++e);break;case 1073741854:x=this.paramAsStr(++e);x.equals("-")&&(x+=this.paramAsStr(++e));this.checkLength(++e);switch("xyz".indexOf(x)){case 0:x=JU.Quat.new4(0.5,
0.5,0.5,-0.5);break;case 1:x=JU.Quat.new4(0.5,0.5,0.5,0.5);break;case 2:x=JU.Quat.new4(0,0,0,1);break;default:var t;t=this.vwr.getCurrentUnitCell();null==t&&(t=this.vwr.getSymTemp(),t.setUnitCell(M(-1,[1,1,1,90,90,90]),!1));x=t.getQuaternionRotation(x);null==x&&this.invArg()}break;default:b=JU.V3.new3(this.floatParameter(e++),this.floatParameter(e++),this.floatParameter(e++)),f=this.floatParameter(e++)}null!=x&&(f=x.toAxisAngle4f(),b.set(f.x,f.y,f.z),f=(h?-1:1)*(180*f.angle/3.141592653589793));Float.isNaN(b.x)||
Float.isNaN(b.y)||Float.isNaN(b.z)?b.set(0,0,0):0==b.length()&&0==f&&(f=NaN);h=!this.vwr.tm.isInPosition(b,f);this.isFloatParameter(e)&&(p=this.floatParameter(e++));this.isFloatParameter(e)&&!this.isCenterParameter(e)&&(g=this.floatParameter(e++),m=this.floatParameter(e++),!h&&1<=Math.abs(g-this.vwr.tm.getTranslationXPercent())&&(h=!0),!h&&1<=Math.abs(m-this.vwr.tm.getTranslationYPercent())&&(h=!0));null==d&&e!=this.slen&&(x=Array(1),c=this.centerParameter(e,x),s(x[0],JU.BS)&&(d=x[0]),e=this.iToken+
1);if(null!=c){!h&&0.1<=c.distance(this.vwr.tm.fixedRotationCenter)&&(h=!0);this.isFloatParameter(e)&&(k=this.floatParameter(e++));this.isCenterParameter(e)||((0==k||Float.isNaN(k))&&(0==p||Float.isNaN(p))?(d=Math.abs(this.getZoom(0,e,d,0==p?0:l)),e=this.iToken+1,p=d):!h&&0.1<=Math.abs(k-this.vwr.getFloat(570425388))&&(h=!0));if(0==p||Float.isNaN(p))p=100;Float.isNaN(k)&&(k=0);!h&&1<=Math.abs(p-l)&&(h=!0);e!=this.slen&&(n=this.centerParameter(e,null),e=this.iToken+1,e!=this.slen&&(r=this.floatParameter(e++),
B=this.floatParameter(e++)),e!=this.slen&&(q=this.floatParameter(e++)),e!=this.slen&&(v=this.floatParameter(e++),!h&&0.01<=Math.abs(v-this.vwr.tm.getCameraDepth())&&(h=!0)),e+1<this.slen&&(H=this.floatParameter(e++),u=this.floatParameter(e++),!h&&0.01<=Math.abs(H-this.vwr.tm.camera.x)&&(h=!0),!h&&0.01<=Math.abs(u-this.vwr.tm.camera.y)&&(h=!0)))}this.checkLength(e);if(!this.chk&&(h||(a=0),0<a&&this.refresh(!1),this.useThreads()||(a=0),0==v&&(v=H=u=NaN),null!=y?this.vwr.tm.moveToPyMOL(this,a,y):this.vwr.moveTo(this,
a,c,b,f,null,p,g,m,k,n,r,B,q,v,H,u),this.isJS&&0<a&&this.vwr.g.waitForMoveTo))throw new JS.ScriptInterruption(this,"moveTo",1);}}});d(c$,"isAtomExpression",function(a){switch(this.tokAt(a)){case 12290:case 10:case 1073742325:return!0;default:return!1}},"~N");d(c$,"cmdPause",function(){if(this.chk||this.isJS&&!this.allowJSThreads)return!1;var a=this.optParameterAsString(1);this.vwr.getBooleanProperty("_useCommandThread");if(this.vwr.autoExit||!this.vwr.haveDisplay&&!this.vwr.isWebGL)return!1;if(0==
this.scriptLevel&&this.pc==this.aatoken.length-1)return this.vwr.scriptStatus("nothing to pause: "+a),!1;a=0==a.length?": RESUME to continue.":": "+JU.Txt.formatText(this.vwr,a);this.pauseExecution(!0);this.vwr.scriptStatusMsg("script execution paused"+a,"script paused for RESUME");return!0});d(c$,"cmdPrint",function(){1==this.slen?this.chk||this.showStringPrint("\x00",!0):this.showStringPrint(this.parameterExpressionString(1,0),!0)});d(c$,"cmdPrompt",function(){var a=null;1==this.slen?this.chk||
(a=JS.ScriptEval.getContextTrace(this.vwr,this.getScriptContext("prompt"),null,!0).toString()):a=this.parameterExpressionString(1,0);this.chk||this.vwr.prompt(a,"OK",null,!0)});d(c$,"cmdReset",function(){if(3==this.slen&&134320141==this.tokAt(1))this.chk||this.vwr.removeFunction(this.stringParameter(2));else if(this.checkLength(-2),!this.chk)if(1==this.slen)this.vwr.reset(!1);else{switch(this.tokAt(1)){case 36865:!this.chk&&null!=this.outputBuffer&&this.outputBuffer.setLength(0);return;case 134221829:this.vwr.cacheClear();
return;case 1073741935:this.resetError();return;case 1073741995:this.vwr.stm.resetLighting();return;case 1086324748:this.vwr.resetShapes(!0);return;case 134320141:this.vwr.clearFunctions();return;case 1639976963:var a=new JU.BS;this.runScript(this.vwr.ms.getDefaultStructure(this.vwr.bsA(),a));this.vwr.shm.resetBioshapes(a);return;case 1648363544:this.vwr.setData("element_vdw",O(-1,[null,""]),0,0,0,0,0);return;case 1075838996:this.vwr.ms.resetAromatic();return;case 1611141175:this.vwr.reset(!0);return}a=
this.paramAsStr(1);"_"==a.charAt(0)&&this.invArg();this.vwr.unsetProperty(a)}});d(c$,"resetError",function(){this.vwr.g.removeParam("_errormessage")});d(c$,"cmdRestrict",function(){var a=1677721602==this.tokAt(1);this.cmdSelect(a?2:1);this.restrictSelected(a,!0)});d(c$,"cmdReturn",function(a){if(!this.chk){var b=this.getContextVariableAsVariable("_retval",!1);if(null!=b){var c=null!=a||1==this.slen?null:this.parameterExpressionToken(1);null==a&&(a=null==c?JS.SV.newI(0):c);b.value=a.value;b.intValue=
a.intValue;b.tok=a.tok}this.cmdGoto(!1)}},"JS.SV");d(c$,"cmdRotate",function(a,b){if(2==this.slen)switch(this.getToken(1).tok){case 1073742335:this.chk||this.vwr.tm.setSpinOn();return;case 1073742334:this.chk||this.vwr.tm.setSpinOff();return}for(var c=null,e=1.4E-45,f=0,d=3.4028235E38,h=!1,g=!1,m=null,p=null,k=Array(2),l=JU.V3.new3(0,1,0),n=null,r=null,p=null,B=!1,s=1,v,p=null,q=!1,u=!1,y=!1,x=!1,t=null,w=null,A=null,C=null,D=this.vwr.getBoolean(603979806),z=1;z<this.slen;++z){switch(v=this.getToken(z).tok){case 12290:case 10:case 1073742325:if(null!=
n||null!=p||2==f){c=this.atomExpressionAt(z);t=null;b=!0;break}case 1073742332:case 8:case 1073742330:g=!0;2==f&&(f=0);var E=this.centerParameterForModel(z,this.vwr.am.cmi,null);!this.chk&&(1073742330==v&&268435520!=this.tokAt(z+2))&&(h=!0,l=O(-1,[this.objectNameParameter(++z),Integer.$valueOf(this.vwr.am.cmi),null]),l=this.getShapePropertyData(22,"getSpinAxis",l)?l[2]:null);k[f++]=E;break;case 1611141175:a=!0;continue;case 1073741988:case 1073742028:h=!0;continue;case 1113589787:b=!0;break;case 268435504:continue;
case 2:case 3:a?1.4E-45==e?e=this.floatParameter(z):3.4028235E38==d?(d=e,e=this.floatParameter(z)):this.invArg():3.4028235E38==d?d=this.floatParameter(z):1.4E-45==e?(e=this.floatParameter(z),a=!0):this.invArg();if(z==this.slen-2&&(1073741824==this.tokAt(z+1)||4==this.tokAt(z+1)))z=this.paramAsStr(++z).toLowerCase(),z.equals("dps")?y=!0:z.equals("sec")&&(x=!0);break;case 268435616:s=-1;continue;case 1111492629:g=!0;l.set(s,0,0);continue;case 1111492630:g=!0;l.set(0,s,0);continue;case 1111492631:g=
!0;l.set(0,0,D&&!h?-s:s);continue;case 9:case 134221850:case 1073741864:134221850==v&&z++;g=!0;p=this.getQuaternionParameter(z);if(null!=p){if(1073741864==v&&!(h=b))p=p.div(this.vwr.tm.getRotationQ());0==p.q0&&(p.q0=1E-10);q=0>p.q0;l.setT(p.getNormal());d=p.getTheta()}break;case 134217750:if(this.paramAsStr(z+1).equalsIgnoreCase("picked")){v=this.vwr.getPOrNull("pickedList");z=v.size();if(3>z)return;d=Array(3);for(p=0;3>p;p++)d[p]=this.vwr.ms.getAtomSetCenter(JS.SV.getBitSet(v.get(z-3+p),!1))}else if(this.isArrayParameter(z+
1))d=this.getPointArray(++z,-1,!1);else{d=Array(3);for(p=0;3>p;p++)d[p]=this.centerParameter(++z,null),z=this.iToken}z=d.length;if(3>z)return;p=JU.Quat.getQuaternionFrame(d[z-3],d[z-2],d[z-1]);p=JU.Quat.new4(1,0,0,0).mulQ(p.inv().div(this.vwr.tm.getRotationQ()));l.setT(p.getNormal());d=p.getTheta();break;case 134217731:g=!0;if(this.isPoint3f(++z)){l.setT(this.centerParameter(z,null));break}d=this.getPoint4f(z);l.set(d.x,d.y,d.z);d=d.w;p=JU.Quat.newVA(l,d);break;case 1073742328:g=h=b=!0;if(this.isArrayParameter(++z))m=
this.floatParameterSet(z,6,2147483647);else{f=this.atomExpressionAt(z).nextSetBit(0);z=this.atomExpressionAt(++this.iToken).nextSetBit(0);if(0>f||0>z)return;c=this.vwr.getBranchBitSet(z,f,!0);k[0]=this.vwr.ms.at[f];k[1]=this.vwr.ms.at[z];f=2}break;case 4160:n=JU.V3.newV(this.centerParameter(++z,null));h=b=!0;break;case 136314895:u=!0;continue;case 1296041986:v=this.intParameter(++z);if(this.chk)continue;n=this.vwr.getSymTemp().getSpaceGroupInfo(this.vwr.ms,null,-1);h=null==n?null:n.get("operations");
(0==v||null==h||h.length<Math.abs(v))&&this.invArg();h=h[Math.abs(v)-1];n=h[5];A=h[6];k[0]=h[7];null!=h[8]&&(l=h[8]);d=h[9].intValue();0>v&&(d=-d,null!=n&&n.scale(-1));0==d&&null!=k[0]&&(l.normalize(),JU.Measure.getPlaneThroughPoint(k[0],l,C=new JU.P4));p=JU.Quat.newVA(l,d);f=null==k[0]?0:1;b=g=h=!0;continue;case 134221831:w=this.atomExpressionAt(++z);p=this.vwr.ms.getAtomPointVector(w);null==p&&(this.iToken=z,this.invArg());z=this.iToken;t=this.getPointVector(this.getToken(++z),z);if(null==t||p.size()!=
t.size())this.iToken=z,this.invArg();r=new JU.M4;k[0]=new JU.P3;f=1;J.api.Interface.getInterface("JU.Eigen",this.vwr,"script");if(0.001<(this.chk?0:JU.Measure.getTransformMatrix4(p,t,r,k[0])))t=null;case 12:case 11:g=!0;p=new JU.M3;12==v&&(B=!0,r=this.theToken.value);null!=r?(n=new JU.V3,r.getTranslation(n),r.getRotationScale(p)):p=this.theToken.value;p=this.chk?new JU.Quat:JU.Quat.newM(p);l.setT(p.getNormal());d=p.getTheta();h=!0;break;default:this.invArg()}z=this.iToken}if(!this.chk){null!=m&&3.4028235E38!=
d&&(a=!0,e=d);b&&null==c&&(c=this.vwr.bsA());null!=w&&(b=!0,null==c&&(c=w));a&&q&&(d=(0<=d?360:-360)-d,l.scale(-1));null!=p&&(!x&&!y)&&(y=0<e,x=!y);s=1.4E-45==e?10:3.4028235E38==d?e:y?e:x?(0>d?-1:1)*Math.abs(d/e):0>e==(null==p?0<d:!0)?-d/e:e;if(null!=m){if(!a){this.vwr.setDihedrals(m,null,1);return}n=null}null!=p&&(0==f&&(null!=n&&!B)&&(k[0]=this.vwr.ms.getAtomSetCenter(null!=c?c:b?this.vwr.bsA():this.vwr.getAllAtoms())),u&&null!=n&&(k[1]=JU.P3.newP(k[0]),k[1].add(n),r=JU.Measure.computeHelicalAxis(k[0],
k[1],p),k[0]=r[0],u=r[3].x,0!=u&&(n=r[1],l=JU.V3.newV(n),0>u&&l.scale(-1)),r=null),a&&null==r&&(r=JS.ScriptMathProcessor.getMatrix4f(p.getMatrix(),n)),null!=k[0]&&(f=1));if(null!=A&&(this.vwr.invertAtomCoordPt(A,c),null==l)||null!=C&&(this.vwr.invertAtomCoordPlane(C,c),null==l))return;C=a&&(!this.vwr.headless||3.4028235E38==d);a&&!C&&(a=!1);if(2>f&&null==m){if(!h){if(C&&(null==c&&!this.useThreads())&&(a=!1,3.4028235E38==d))return;if(this.vwr.rotateAxisAngleAtCenter(this,k[0],l,s,d,a,c)&&this.isJS&&
a&&null==c&&this.vwr.g.waitForMoveTo&&3.4028235E38!=d)throw new JS.ScriptInterruption(this,"rotate",1);return}0==f&&(k[0]=new JU.P3);k[1]=JU.P3.newP(k[0]);k[1].add(l);f=2}0==f&&(k[0]=new JU.P3);if(2>f||0==k[0].distance(k[1]))k[1]=JU.P3.newP(k[0]),k[1].y+=1;3.4028235E38==d&&(d=0);0!=d&&(null!=n&&!g)&&n.scale(d/n.length());if(a&&null!=n&&(0==d||0==e))d=0.01,s=1.4E-45==e?0.01:0>e?-d/e:0.01*e/n.length();null!=c&&(a&&null==t&&null!=r)&&(p=this.vwr.ms.getAtomPointVector(c),t=JU.Measure.transformPoints(p,
r,k[0]));if(null!=c&&!a&&null!=t)this.vwr.setAtomCoords(c,1145047050,t);else if(!C||this.useThreads())if(this.vwr.rotateAboutPointsInternal(this,k[0],k[1],s,d,a,c,n,t,m,B?r:null)&&this.isJS&&a)throw new JS.ScriptInterruption(this,"rotate",1);}},"~B,~B");d(c$,"cmdRestore",function(){if(1<this.slen){var a=this.optParameterAsString(2),b=this.tokAt(1);switch(b){case 1814695966:this.chk||this.setCurrentCagePts(null,null);return;case 1073742077:case 1073742132:case 1073742139:var c=3<this.slen?this.floatParameter(3):
0;0>c&&this.invArg();if(this.chk)return;var e="";switch(b){case 1073742077:e="Orientation";this.vwr.stm.restoreOrientation(a,c,!0);break;case 1073742132:e="Rotation";this.vwr.stm.restoreOrientation(a,c,!1);break;case 1073742139:e="Scene",this.vwr.stm.restoreScene(a,c)}if(this.isJS&&0<c&&this.vwr.g.waitForMoveTo)throw new JS.ScriptInterruption(this,"restore"+e,1);return}this.checkLength23();switch(b){case 1677721602:this.chk||this.vwr.stm.restoreBonds(a);return;case 14:if(this.chk)return;a=this.vwr.stm.getContext(a);
null!=a&&(this.restoreScriptContext(a,!0,!1,!1),null!=this.thisContext&&(this.thisContext.setMustResume(),this.tQuiet=this.mustResumeEval=!0));return;case 1073742329:if(this.chk)return;a=this.vwr.stm.getSavedCoordinates(a);null==a&&this.invArg();this.runScript(a);this.vwr.checkCoordinatesChanged();return;case 1073742140:this.chk||this.vwr.stm.restoreSelection(a);return;case 1073742158:if(this.chk)return;a=this.vwr.stm.getSavedState(a);null==a&&this.invArg();this.runScript(a);return;case 1639976963:if(this.chk)return;
a=this.vwr.stm.getSavedStructure(a);null==a&&this.invArg();this.runScript(a);return}}this.errorStr2(53,"RESTORE","bonds? context? coordinates? orientation? rotation? selection? state? structure?")});d(c$,"cmdSave",function(){if(1<this.slen){var a=this.optParameterAsString(2);switch(this.tokAt(1)){case 1677721602:this.chk||this.vwr.stm.saveBonds(a);return;case 14:this.chk||this.saveContext(a);return;case 1073742329:this.chk||this.vwr.stm.saveCoordinates(a,this.vwr.bsA());return;case 1073742077:case 1073742132:this.chk||
this.vwr.stm.saveOrientation(a,null);return;case 1073742140:this.chk||(this.vwr.stm.saveSelection(a,this.vwr.bsA()),this.vwr.stm.restoreSelection(a));return;case 1073742158:this.chk||this.vwr.stm.saveState(a);return;case 1639976963:this.chk||this.vwr.stm.saveStructure(a);return}}this.errorStr2(53,"SAVE","bonds? context? coordinates? orientation? rotation? selection? state? structure?")});d(c$,"cmdScript",function(a,b,c){if(134238732==a)this.checkLength(2),this.chk||this.vwr.jsEval(this.paramAsStr(1));
else{var e=!0,f=!1,d=!1,h=this.vwr.async,g=0,m=0,p=0,k=0,l=1,n=null,r=null,s=null,q=null;4124==a&&(l=-2);if(null==b&&null==c)if(a=this.tokAt(l),4!=a&&this.error(16),b=this.paramAsStr(l),b.equalsIgnoreCase("async")&&(h=!0,b=this.paramAsStr(++l)),b.equalsIgnoreCase("applet")){a=this.paramAsStr(++l);c=this.parameterExpressionString(++l,0);this.checkLast(this.iToken);if(this.chk)return;if(0==a.length||a.equals("all"))a="*";if(!a.equals(".")&&(this.vwr.jsEval(a+"\u0001"+c),!a.equals("*")))return}else{a=
this.tokAt(this.slen-1);d=266298==a;b.equalsIgnoreCase("inline")&&(c=this.parameterExpressionString(++l,d?this.slen-1:0),l=this.iToken);for(;b.equalsIgnoreCase("localPath")||b.equalsIgnoreCase("remotePath")||b.equalsIgnoreCase("scriptPath");)b.equalsIgnoreCase("localPath")?n=this.paramAsStr(++l):b.equalsIgnoreCase("scriptPath")?s=this.paramAsStr(++l):r=this.paramAsStr(++l),b=this.paramAsStr(++l);if((this.vwr.isJS||this.vwr.testAsync)&&(h||b.startsWith("?")))b=this.loadFileAsync("SCRIPT_",b,l,!0);
if(1073741878==(a=this.tokAt(++l)))f=!0,a=this.tokAt(++l);1073742050==a&&(e=!1,a=this.tokAt(++l));if(1073741998==a||1140850692==a)l++,p=g=Math.max(this.intParameter(l++),0),this.checkToken(l)&&(p=268435616==this.getToken(l).tok?this.checkToken(++l)?this.intParameter(l++):0:-this.intParameter(l++),0>=p&&this.invArg());else if(1073741890==a||1073741892==a)l++,m=Math.max(this.intParameter(l++)-1,0),k=m+1,this.checkToken(l)&&(k=268435616==this.getToken(l).tok?this.checkToken(++l)?this.intParameter(l++):
0:-this.intParameter(l++),0>=k&&this.invArg());l=-l}else null!=b&&h&&(b=this.loadFileAsync("SCRIPT_",b,l,!0));if(0>l){if(268435472==this.tokAt(l=-l))q=this.parameterExpressionList(l,-1,!1),l=this.iToken+1;this.checkLength(d?l+1:l)}if(!this.chk||this.isCmdLine_c_or_C_Option){this.isCmdLine_c_or_C_Option&&(f=!0);l=this.chk;a=this.isCmdLine_c_or_C_Option;f&&(this.chk=this.isCmdLine_c_or_C_Option=!0);this.pushContext(null,"SCRIPT");this.contextPath+=" >> "+b;if(null==c?this.compileScriptFileInternal(b,
n,r,s):this.compileScript(null,c,!1)){this.pcEnd=k;for(this.lineEnd=p;m<this.lineNumbers.length&&this.lineNumbers[m]<g;)m++;this.pc=m;b=this.isCmdLine_C_Option;this.isCmdLine_C_Option=(new Boolean(this.isCmdLine_C_Option&e)).valueOf();this.executionStepping=(new Boolean(this.executionStepping|d)).valueOf();null==this.contextVariables&&(this.contextVariables=new java.util.Hashtable);this.contextVariables.put("_arguments",null==q?JS.SV.getVariableAI(K(-1,[])):JS.SV.getVariableList(q));this.contextVariables.put("_argcount",
JS.SV.newI(null==q?0:q.size()));f&&(this.listCommands=!0);(e=this.vwr.getBoolean(603979934))&&JU.Logger.startTimer("script");this.dispatchCommands(!1,!1,!1);this.$isStateScript&&JS.ScriptManager.setStateScriptVersion(this.vwr,null);e&&this.showString(JU.Logger.getTimerMsg("script",0));this.isCmdLine_C_Option=b;this.popContext(!1,!1)}else JU.Logger.error(J.i18n.GT._("script ERROR: ")+this.errorMessage),this.popContext(!1,!1),a?this.setErrorMessage(null):this.evalError(null,null);this.chk=l;this.isCmdLine_c_or_C_Option=
a}}},"~N,~S,~S");d(c$,"cmdSelect",function(a){if(1==this.slen)this.vwr.select(null,!1,0,!this.doReport());else if(!(2==this.slen&&1073742072==this.tokAt(1))){var b=this.tokAt(2);this.vwr.slm.noneSelected=Boolean.$valueOf(4==this.slen&&1073742333==b);var c=null;switch(b){case 10:if(s(this.getToken(2).value,JM.BondSet)||1677721602==this.tokAt(2)&&10==this.getToken(3).tok){this.slen!=this.iToken+2&&this.invArg();this.chk||this.vwr.selectBonds(this.theToken.value);return}break;case 1745489939:case 1677721602:if(5==
this.slen&&10==this.tokAt(3))c=this.getToken(3).value,this.iToken++;else if(this.isArrayParameter(4)){var c=new JU.BS,e=this.expandFloatArray(this.floatParameterSet(4,0,2147483647),0);for(a=e.length;0<=--a;)0<=e[a]&&c.set(e[a])}this.checkLast(this.iToken);if(this.chk)return;null==c&&this.invArg();1745489939==b?this.setShapeProperty(6,"select",c):this.vwr.selectBonds(c);return}e=0;b=!1;if(0==this.getToken(1).intValue&&1073742334!=this.theTok)c=this.parameterExpressionToken(0).value,s(c,JU.BS)||this.invArg(),
this.checkLast(this.iToken);else{b=this.tokAt(a);switch(b){case 1073742335:case 1073742334:if(this.chk||this.vwr.setSelectionHalosEnabled(1073742335==b),b=this.tokAt(++a),0==b)return}switch(b){case 1275069441:case 1073742119:e=b,b=this.tokAt(++a)}(b=1086324742==b)&&this.tokAt(++a);c=this.atomExpressionAt(a)}this.chk||(this.isBondSet?this.vwr.selectBonds(c):(c.length()>this.vwr.ms.ac&&(a=this.vwr.getAllAtoms(),a.and(c),c=a),this.vwr.select(c,b,e,!this.doReport())))}},"~N");d(c$,"cmdSelectionHalos",
function(a){var b=!1;switch(a==this.slen?1073742335:this.getToken(a).tok){case 1073742335:case 1113589787:b=!0;case 1073742334:case 1073742333:case 1073742056:this.setBooleanProperty("selectionHalos",b);break;default:this.invArg()}},"~N");d(c$,"cmdSet",function(){if(1==this.slen)this.showString(this.vwr.getAllSettings(null));else{var a=this.paramAsStr(0).equals("set"),b=this.optParameterAsString(1);if(a&&2==this.slen&&0<=b.indexOf("?"))this.showString(this.vwr.getAllSettings(b.substring(0,b.indexOf("?"))));
else{var c=this.getToken(1).tok,e=0,f,d=2147483647,h;h=!this.chk&&this.doReport()&&!this.st[0].value.equals("var");switch(c){case 553648148:case 603979866:case 603979902:case 603979924:case 603979960:case 603979962:case 603979964:case 603979965:case 603979970:if(this.$isStateScript)return;break;case 1611272194:this.cmdAxes(2);return;case 1610616835:this.cmdBackground(2);return;case 1678381065:this.cmdBoundbox(2);return;case 1611272202:this.cmdFrank(2);return;case 1610616855:this.cmdHistory(2);return;
case 1825200146:this.cmdLabel(2,null);return;case 1814695966:this.cmdUnitcell(2);return;case 536870920:this.sm.loadShape(8);this.setShapeProperty(8,"highlight",1073742334==this.tokAt(2)?null:this.atomExpressionAt(2));return;case 1610625028:case 1611141171:this.cmdSelectionHalos(2);return;case 536875070:this.cmdTimeout(2);return;case 536870932:h=this.isArrayParameter(2)?this.floatParameterSet(2,2,2):2==this.tokAt(2)?M(-1,[this.intParameter(2),this.intParameter(3)]):this.stringParameter(2);this.checkLast(this.iToken);
if(this.chk)return;if(s(h,String)){if(this.vwr.fm.loadImage(h,"\x00windowImage",!this.useThreads()))throw new JS.ScriptInterruption(this,"windowImage",1);}else this.vwr.setWindowDimensions(h);return;case 1639976963:h=J.c.STR.getProteinStructureType(this.paramAsStr(2));h===J.c.STR.NOT&&this.invArg();a=this.floatParameterSet(3,0,2147483647);0!=a.length%4&&this.invArg();this.vwr.setStructureList(a,h);this.checkLast(this.iToken);return;case 545259526:d=this.getArgbParam(2);this.chk||this.setObjectArgb("axes",
d);return;case 1610612737:h=!1;switch(this.getToken(this.checkLast(2)).tok){case 268435552:break;case 268435536:h=!0;break;default:this.invArg()}this.setBooleanProperty("bondModeOr",h);return;case 536870916:case 536870917:if(this.chk)return;a=1073742334==this.tokAt(2)||2==this.tokAt(2)&&0==this.intParameter(2)?4:536870917==c?6:5;JU.Logger.setLogLevel(a);this.setIntProperty("logLevel",a);4==a&&(this.vwr.setDebugScript(!1),h&&this.vwr.showParameter("debugScript",!0,80));this.setDebugging();h&&this.vwr.showParameter("logLevel",
!0,80);return;case 537022465:this.cmdSetEcho();return;case 1610612738:this.cmdFont(5,2==this.checkLength23()?0:this.floatParameter(2));return;case 1613238294:h=!1;switch(this.tokAt(this.checkLast(2))){case 1114249217:h=!0;case 2097178:this.setBooleanProperty("hbondsBackbone",h);break;case 1073742150:h=!0;case 1073741926:this.setBooleanProperty("hbondsSolid",h);break;default:this.invArg()}return;case 1745489939:case 537006096:switch(c=this.tokAt(this.checkLast(2))){case 1073742335:case 1073742334:this.setBooleanProperty("measurementlabels",
1073742335==c);return;case 1073741926:case 2:case 3:this.vwr.shm.loadShape(6);h=this.getSetAxesTypeMad10(2);2147483647!=h&&this.setShapeSizeBs(6,Q(h/10),null);return}this.setUnits(this.paramAsStr(2),545259568);return;case 1611141176:h=!1;switch(this.tokAt(this.checkLast(2))){case 1114249217:h=!0;break;case 2097178:break;default:this.invArg()}this.setBooleanProperty("ssbondsBackbone",h);return;case 1610612741:this.cmdSetLabel("toggle");return;case 536870930:h=new JU.Lst;for(b=2;b<this.slen;b++)a=this.getArgbParam(b),
h.addLast(Integer.$valueOf(a)),b=this.iToken;if(this.chk)return;b=h.size();for(a=K(b,0);0<=--b;)a[b]=h.get(b).intValue();this.vwr.cm.ce.setUserScale(a);return;case 553648188:this.isFloatParameter(2)?(this.checkLength(3),this.setIntProperty("zSlab",I(this.floatParameter(2))),f=null):(this.isCenterParameter(2)||this.invArg(),f=this.centerParameter(2,null),this.checkLength(this.iToken+1));this.chk||(this.vwr.tm.zSlabPoint=null==f?null:JU.P3.newP(f));return}var g=!0;switch(c){case 536870914:if(2<this.slen){a=
this.getSettingStr(2,!1);h=!1;0>a.indexOf(".")?(a=JU.PT.parseInt(a),h=!0):a=JS.ScriptParam.getFloatEncodedInt(a);if(this.chk)return;h=this.vwr.ms.getModelNumberIndex(a,h,!0);this.vwr.setBackgroundModelIndex(h);return}break;case 1648363544:if(this.chk)return;this.vwr.setAtomProperty(this.vwr.getAllAtoms(),1648363544,-1,NaN,null,null,null);if(2<this.slen&&"probe".equalsIgnoreCase(this.getSettingStr(2,!1))){this.runScript("#VDW radii for PROBE;{_H}.vdw = 1.0;{_H and connected(_C) and not connected(within(smiles,'[a]'))}.vdw = 1.17;{_C}.vdw = 1.75;{_C and connected(3) and connected(_O)}.vdw = 1.65;{_N}.vdw = 1.55;{_O}.vdw = 1.4;{_P}.vdw = 1.8;{_S}.vdw = 1.8;message VDW radii for H, C, N, O, P, and S set according to Word, et al., J. Mol. Biol. (1999) 285, 1711-1733");
return}e=545259555;case 545259555:2<this.slen&&(f=this.paramAsStr(2),3==this.slen&&(null==J.c.VDW.getVdwType(f)&&null==J.c.VDW.getVdwType(f=this.getSettingStr(2,!1)))&&this.invArg(),this.setStringProperty(b,f));break;case 536870918:if(2<this.slen){var m=this.parameterExpressionToken(2);8==m.tok?f=m.value:(f=new JU.P3,m=m.asInt(),100<=m&&JU.SimpleUnitCell.ijkToPoint3f(m,f,-1));this.chk||this.vwr.setDefaultLattice(f)}break;case 545259552:case 545259545:2<this.slen&&(f=1073741991==(this.theTok=this.tokAt(2))||
1073742116==this.theTok?this.paramAsStr(this.checkLast(2)):this.getSettingStr(2,!1),this.setStringProperty(b,f));break;case 1631586315:d=this.getSettingInt(2);-2147483648==d&&this.invArg();this.chk||this.vwr.ms.setFormalCharges(this.vwr.bsA(),d);return;case 545259564:2<this.slen&&this.setStringProperty(b,this.getSettingStr(2,a));break;case 545259568:case 545259559:2<this.slen&&this.setUnits(this.getSettingStr(2,a),c);break;case 545259573:this.chk||this.vwr.setPicked(-1);if(2<this.slen){this.cmdSetPicking();
return}break;case 545259574:if(2<this.slen){this.cmdSetPickingStyle();return}break;case 1715472409:break;case 536870924:d=this.getSettingInt(2);if(-2147483648==d||0==d||1==d){g=!1;break}c=553648174;b="specularPercent";this.setIntProperty(b,d);break;case 1649022989:c=553648178;b="strandCount";this.setIntProperty(b,this.getSettingInt(2));break;default:g=!1}if(!g||h){m=!g&&!a&&null!=this.getContextVariableAsVariable(b,!1);if(!g&&!m)switch(c){case 1677721602:e=603979928;break;case 1612709894:e=603979908;
break;case 1612709900:e=603979910;break;case 1610612739:e=603979879;break;case 1665140738:e=570425394;this.setFloatProperty("solventProbeRadius",this.getSettingFloat(2));g=!0;break;case 1610612740:e=570425390;break;case 1612709912:e=603979948;break;case 1765808134:e=545259545;break;case 1611141175:f=this.paramAsStr(2).toLowerCase();switch("x;y;z;fps;".indexOf(f+";")){case 0:e=570425398;break;case 2:e=570425400;break;case 4:e=570425402;break;case 6:e=570425396;break;default:this.errorStr2(50,"set SPIN ",
f)}this.chk||this.vwr.setSpin(f,I(this.floatParameter(this.checkLast(3))));g=!0}if(0!=e)b=JS.T.nameOf(c=e);else if(!g&&!m){(0==b.length||"_"==b.charAt(0)&&268435520!=this.tokAt(2))&&this.error(56);e=b.toLowerCase();if(0==e.indexOf("label")&&JU.PT.isOneOf(e.substring(5),";front;group;atom;offset;offsetexact;offsetabsolute;pointer;alignment;toggle;scalereference;for;")&&this.cmdSetLabel(e.substring(5)))return;if(a&&0==e.indexOf("shift_")){h=this.floatParameter(2);this.checkLength(3);this.chk||this.vwr.getNMRCalculation().setChemicalShiftReference(e.substring(6),
h);return}e.endsWith("callback")&&(c=536870912)}a&&!JS.T.tokAttr(c,536870912)&&(this.iToken=1,this.$isStateScript||this.errorStr2(50,"SET",b),this.warning(51,"SET",b));if(!g&&a)switch(this.slen){case 2:this.setBooleanProperty(b,!0);g=!0;break;case 3:2147483647!=d&&(this.setIntProperty(b,d),g=!0)}!g&&(!a&&1073742333==this.tokAt(2))&&(this.chk||this.vwr.removeUserVariable(b.toLowerCase()),g=!0);if(!g&&(this.setVariable(1,0,b,!0),!a))return;h&&this.vwr.showParameter(b,!0,80)}}}});d(c$,"cmdSetEcho",function(){var a=
null,b=null,c=null,e=!0,f=2;switch(this.getToken(2).tok){case 1073742334:c=a="allOff";this.checkLength(++f);break;case 1073742333:e=!1;case 1073742327:c=this.paramAsStr(2);this.checkLength(++f);break;case 1073741996:case 12289:case 1073742126:case 1073742172:case 1073742019:case 1073741871:case 1073741824:case 4:case 1073741974:1073741974==this.theTok&&f++,c=this.paramAsStr(f++)}this.chk||(this.vwr.ms.setEchoStateActive(e),this.sm.loadShape(31),null!=c&&this.setShapeProperty(31,null==a?"target":a,
c));if(f<this.slen)switch(this.getToken(f++).tok){case 1073741832:a="align";switch(this.getToken(f).tok){case 1073741996:case 1073742126:case 12289:b=this.paramAsStr(f++);break;default:this.invArg()}break;case 12289:case 1073741996:case 1073742126:a="align";b=this.paramAsStr(f-1);break;case 554176526:a="%zpos";b=Integer.$valueOf(I(this.floatParameter(f++)));break;case 1610625028:case 2097192:case 1073742335:a="hidden";b=Boolean.FALSE;break;case 12294:case 2097194:a="hidden";b=Boolean.TRUE;break;case 1094717454:b=
this.chk?0:this.modelNumberParameter(f++);b>=this.vwr.ms.mc&&this.invArg();a="model";b=Integer.$valueOf(b);break;case 268435520:case 1073742195:a="xypos";b=this.xypParameter(--f);null==b&&this.invArg();f=this.iToken+1;break;case 2:c=this.intParameter(f-1);e="xpos";268435634==this.tokAt(f)&&(e="%xpos",f++);a="ypos";b=Integer.$valueOf(this.intParameter(f++));268435634==this.tokAt(f)&&(a="%ypos",f++);this.checkLength(f);this.setShapeProperty(31,e,Integer.$valueOf(c));break;case 1073742066:a="offset";
this.isPoint3f(f)?(f=this.getPoint3f(f,!1),b=M(-1,[-1,f.x,f.y,f.z,0,0,0]),f=this.iToken+1):this.isArrayParameter(f)&&(b=this.floatParameterSet(f,7,7),f=this.iToken+1);break;case 1073742334:a="off";break;case 1073742138:a="scale";b=Float.$valueOf(this.floatParameter(f++));break;case 134222850:a="script";b=this.paramAsStr(f++);break;case 4120:f++;case 4:a=4!=this.theTok;this.checkLength(f--);if(a){null==c&&(a=Array(1),this.getShapePropertyData(31,"currentTarget",a),c=a[0]);if(!this.chk&&this.vwr.ms.getEchoStateActive()&&
this.vwr.fm.loadImage(this.getToken(f).value,c,!this.useThreads()))throw new JS.ScriptInterruption(this,"setEchoImage",1);return}this.cmdEcho(f);return;case 134217751:a="point";b=this.isCenterParameter(f)?this.centerParameter(f,null):null;f=this.iToken+1;break;default:if(this.isCenterParameter(f-1)){a="xyz";b=this.centerParameter(f-1,null);f=this.iToken+1;break}this.invArg()}this.checkLength(f);!this.chk&&null!=a&&this.setShapeProperty(31,a,b)});d(c$,"cmdSetLabel",function(a){this.sm.loadShape(5);
var b=null;for(this.setShapeProperty(5,"setDefaults",this.vwr.slm.noneSelected);;){if(a.equals("for")){var c=this.atomExpressionAt(2);this.cmdLabel(this.iToken+1,c);return!0}if(a.equals("scalereference")){c=this.floatParameter(2);5<=c&&(c=this.vwr.tm.getZoomSetting()/c/this.vwr.getScalePixelsPerAngstrom(!1));b=Float.$valueOf(c);break}c=!1;if(a.equals("offset")||(c=a.equals("offsetabsolute")||a.equals("offsetexact"))){a="offset";if(this.isPoint3f(2))c=this.getPoint3f(2,!1),b=M(-1,[-1,c.x,c.y,c.z,0,
0,0]);else if(this.isArrayParameter(2))b=this.floatParameterSet(2,7,7);else{var b=this.intParameterRange(2,-500,500),e=this.intParameterRange(3,-500,500);if(2147483647==b||2147483647==e)return!0;b=Integer.$valueOf(JV.JC.getOffset(b,e,c))}break}if(a.equals("alignment")){switch(this.getToken(2).tok){case 1073741996:case 1073742126:case 12289:a="align";b=this.theToken.value;break;default:this.invArg()}break}if(a.equals("pointer")){c=0;switch(this.getToken(2).tok){case 1073742334:case 1073742333:break;
case 1610616835:c|=2;case 1073742335:c|=1;break;default:this.invArg()}b=Integer.$valueOf(c);break}if(a.equals("toggle")){this.iToken=1;c=2==this.slen?this.vwr.bsA():this.atomExpressionAt(2);this.checkLast(this.iToken);if(this.chk)return!0;this.vwr.shm.loadShape(5);this.vwr.shm.setShapePropertyBs(5,"toggleLabel",null,c);return!0}this.iToken=1;c=2==this.slen||1073742335==this.getToken(2).tok;if(a.equals("front")||a.equals("group")){!c&&1073742334!=this.tokAt(2)&&this.invArg();c||(a="front");b=c?Boolean.TRUE:
Boolean.FALSE;break}if(a.equals("atom")){!c&&1073742334!=this.tokAt(2)&&this.invArg();a="front";b=c?Boolean.FALSE:Boolean.TRUE;break}return!1}c=this.iToken+1<this.slen?this.atomExpressionAt(++this.iToken):null;this.checkLast(this.iToken);if(this.chk)return!0;null==c?this.setShapeProperty(5,a,b):this.setShapePropertyBs(5,a,b,c);return!0},"~S");d(c$,"cmdSetPicking",function(){if(2==this.slen)this.setStringProperty("picking","identify");else if(4<this.slen||4==this.tokAt(2))this.setStringProperty("picking",
this.getSettingStr(2,!1));else{var a=2,b="SELECT";switch(this.getToken(2).tok){case 1275082245:case 1745489939:case 1611141175:4==this.checkLength34()&&(b=this.paramAsStr(2).toUpperCase(),b.equals("SPIN")?this.setIntProperty("pickingSpinRate",this.intParameter(3)):a=3);break;case 12291:break;default:this.checkLength(3)}var c=this.paramAsStr(a);switch(this.getToken(a).tok){case 1073742335:case 1073742056:c="identify";break;case 1073742334:case 1073742333:c="off";break;case 1275082245:c="atom";break;
case 1825200146:c="label";break;case 1677721602:c="bond";break;case 12291:this.checkLength(4),1677721602!=this.tokAt(3)&&this.invArg(),c="deleteBond"}var e=0<=(e=c.indexOf("_"))?e:c.length,e=JV.ActionManager.getPickingMode(c.substring(0,e));0>e&&this.errorStr2(50,"SET PICKING "+b,c);this.setStringProperty("picking",c)}});d(c$,"cmdSetPickingStyle",function(){if(4<this.slen||4==this.tokAt(2))this.setStringProperty("pickingStyle",this.getSettingStr(2,!1));else{var a=2,b=!1,c="SELECT";switch(this.getToken(2).tok){case 1745489939:b=
!0,c="MEASURE";case 1275082245:4==this.checkLength34()&&(a=3);break;default:this.checkLength(3)}var e=this.paramAsStr(a);switch(this.getToken(a).tok){case 1073742333:case 1073742334:e=b?"measureoff":"toggle";break;case 1073742335:b&&(e="measure")}0>JV.ActionManager.getPickingStyleIndex(e)&&this.errorStr2(50,"SET PICKINGSTYLE "+c,e);this.setStringProperty("pickingStyle",e)}});d(c$,"cmdSlab",function(a){var b=!1,c=null;if(this.isCenterParameter(1)||9==this.tokAt(1))c=this.planeParameter(1);else switch(this.getToken(1).tok){case 2:c=
this.intParameter(this.checkLast(1));this.chk||(a?this.vwr.tm.depthToPercent(c):this.vwr.tm.slabToPercent(c));return;case 1073742335:b=!0;case 1073742334:this.checkLength(2);this.setBooleanProperty("slabEnabled",b);return;case 4141:this.checkLength(2);if(this.chk)return;this.vwr.tm.slabReset();this.setBooleanProperty("slabEnabled",!0);return;case 36867:this.checkLength(2);this.chk||this.vwr.tm.setSlabDepthInternal(a);return;case 268435616:b=this.paramAsStr(2);b.equalsIgnoreCase("hkl")?c=this.hklParameter(3):
b.equalsIgnoreCase("plane")&&(c=this.planeParameter(2));null==c&&this.invArg();c.scale4(-1);break;case 134217750:switch(this.getToken(2).tok){case 1073742333:break;default:c=this.planeParameter(1)}break;case 134219265:c=1073742333==this.getToken(2).tok?null:this.hklParameter(2);break;case 1073742118:return;default:this.invArg()}this.chk||this.vwr.tm.slabInternal(c,a)},"~B");d(c$,"cmdSsbond",function(){var a=this.getMadParameter();2147483647!=a&&(this.setShapeProperty(1,"type",Integer.$valueOf(256)),
this.setShapeSizeBs(1,a,null),this.setShapeProperty(1,"type",Integer.$valueOf(1023)))});d(c$,"cmdStructure",function(){var a=J.c.STR.getProteinStructureType(this.paramAsStr(1));a===J.c.STR.NOT&&this.invArg();var b=null;switch(this.tokAt(2)){case 12290:case 10:case 1073742325:b=this.atomExpressionAt(2);this.checkLast(this.iToken);break;default:this.checkLength(2)}this.chk||(this.clearDefinedVariableAtomSets(),this.vwr.setProteinType(a,b))});d(c$,"cmdSubset",function(){var a=null;this.chk||this.vwr.slm.setSelectionSubset(null);
if(1!=this.slen&&(4!=this.slen||!this.getToken(2).value.equals("off")))a=this.atomExpressionAt(1);this.chk||this.vwr.slm.setSelectionSubset(a)});d(c$,"cmdSync",function(){var a="",b="",c=JU.PT.parseInt(this.optParameterAsString(1));if(-2147483648==c)switch(this.checkLength(-3),c=0,this.slen){case 1:b="*";a="ON";break;case 2:b=this.paramAsStr(1);if(0==b.indexOf("jmolApplet")||JU.PT.isOneOf(b,";*;.;^;")){a="ON";this.chk||this.vwr.syncScript(a,b,0);b=".";break}a=b;b="*";break;case 3:b=this.paramAsStr(1),
a=528443==this.tokAt(2)?"GET_GRAPHICS":this.paramAsStr(2)}else{a=null;if(2<this.slen&&null==(a=this.setVariable(2,-1,"",!1)))return;a=2==this.slen?null:6==a.tok?a.toJSON():a.asString();b=null}this.chk||this.vwr.syncScript(a,b,c)});d(c$,"cmdThrow",function(){if(!this.chk){var a=14==this.tokAt(1)?2:1,b=(1==a?this.setVariable(1,this.slen,"thrown_value",!1):this.vwr.g.setUserVariable("thrown_value",JS.SV.newS(this.optParameterAsString(2)))).asString();if(0==b.length&&0==(b=this.optParameterAsString(1)).length)b=
"context";if(2==a)throw this.saveContext(b),this.doReport()&&this.report(J.i18n.GT.o(J.i18n.GT._("to resume, enter: &{0}"),b),!1),new JS.ScriptInterruption(this,b,-2147483648);this.evalError(b,null)}});d(c$,"saveContext",function(a){var b=this.getScriptContext("Context_"+a);this.vwr.stm.saveContext(a,b);this.vwr.g.setUserVariable(a,JS.SV.newV(14,b));return b},"~S");d(c$,"cmdTimeout",function(a){var b=null,c=null,e=0;if(this.slen==a)this.showString(this.vwr.showTimeout(null));else{for(;a<this.slen;a++)switch(this.getToken(a).tok){case 1073741974:b=
this.paramAsStr(++a);if(3==this.slen){this.chk||this.vwr.triggerTimeout(b);return}break;case 1073742334:break;case 2:e=this.intParameter(a);break;case 3:e=Math.round(1E3*this.floatParameter(a));break;default:null==b?b=this.paramAsStr(a):null==c?c=this.paramAsStr(a):this.invArg()}this.chk||this.vwr.setTimeout(b,e,c)}},"~N");d(c$,"cmdTranslate",function(a){var b=null,c=1,b=0;1113589787==this.tokAt(1)&&(a=!0,b=1,c=2);if(this.isPoint3f(c))a=this.getPoint3f(c,!0),b=this.iToken+1<this.slen?this.atomExpressionAt(++this.iToken):
null,this.checkLast(this.iToken),this.chk||this.vwr.setAtomCoordsRelative(a,b);else{var e=(this.paramAsStr(c).toLowerCase()+" ").charAt(0);0>"xyz".indexOf(e)&&this.error(0);var f=this.floatParameter(++c);switch(this.tokAt(++c)){case 0:case 12290:case 10:case 1073742325:c="\x00";break;default:c=(this.optParameterAsString(c).toLowerCase()+"\x00").charAt(0)}0==f&&"\x00"!=c||(this.iToken=b+("\x00"==c?2:3),b=a?this.vwr.bsA():this.iToken+1<this.slen?this.atomExpressionAt(++this.iToken):null,this.checkLast(this.iToken),
this.chk||this.vwr.translate(e,f,c,b))}},"~B");d(c$,"cmdUnbind",function(){1!=this.slen&&this.checkLength23();var a=this.optParameterAsString(1),b=this.optParameterAsString(2);if(0==a.length||1073742327==this.tokAt(1))a=null;if(0==b.length||1073742327==this.tokAt(2))b=null;null==b&&(null!=a&&0<=JV.ActionManager.getActionFromName(a))&&(b=a,a=null);this.chk||this.vwr.unBindAction(a,b)});d(c$,"cmdUndoRedoMove",function(){var a=1,b=2;switch(this.tokAt(1)){case 0:b=1;break;case 1073742327:a=0;break;case 2:a=
this.intParameter(1);break;default:this.invArg()}this.checkLength(b);this.chk||this.vwr.undoMoveAction(this.tokAt(0),a)});d(c$,"setCurrentCagePts",function(a,b){var c=J.api.Interface.getSymmetry(this.vwr,"eval");if(null==c&&this.vwr.async)throw new NullPointerException;try{this.vwr.ms.setModelCage(this.vwr.am.cmi,null==a?null:c.getUnitCell(a,!1,b))}catch(e){if(!E(e,Exception))throw e;}},"~A,~S");d(c$,"cmdUnitcell",function(a){this.getCmdExt().dispatch(1814695966,2==a,null)},"~N");d(c$,"cmdVector",
function(){var a=J.atomdata.RadiusData.EnumType.SCREEN,b=1;this.checkLength(-3);switch(this.iToken=this.slen){case 2:switch(this.getToken(1).tok){case 1073742335:break;case 1073742334:b=0;break;case 2:b=this.intParameterRange(1,0,19);if(2147483647==b)return;break;case 3:a=J.atomdata.RadiusData.EnumType.ABSOLUTE;if(Float.isNaN(b=this.floatParameterRange(1,0,3)))return;break;default:this.error(6)}break;case 3:switch(this.tokAt(1)){case 1112152078:this.setIntProperty("vectorTrace",this.intParameterRange(2,
0,20));return;case 1073742138:Float.isNaN(b=this.floatParameterRange(2,-100,100))||this.setFloatProperty("vectorScale",b);return;case 64:a=this.floatParameter(2);this.chk||this.vwr.ms.scaleVectorsToMax(a);return}}this.setShapeSize(18,new J.atomdata.RadiusData(null,b,a,null))});d(c$,"cmdVibration",function(){this.checkLength(-3);var a=0;switch(this.getToken(1).tok){case 1073742335:this.checkLength(2);a=this.vwr.getFloat(570425412);break;case 1073742334:this.checkLength(2);a=0;break;case 2:case 3:this.checkLength(2);
a=this.floatParameter(1);break;case 1073742138:Float.isNaN(a=this.floatParameterRange(2,-100,100))||this.setFloatProperty("vibrationScale",a);return;case 64:var b=this.floatParameter(2);this.chk||this.vwr.ms.scaleVectorsToMax(b);break;case 1073742090:this.setFloatProperty("vibrationPeriod",this.floatParameter(2));return;case 1073741824:this.invArg();break;default:a=-1}0>a&&this.invArg();this.chk||(0==a?this.vwr.tm.setVibrationPeriod(0):this.vwr.setVibrationPeriod(-a))});d(c$,"cmdWireframe",function(){var a=
-2147483648;4141==this.tokAt(1)?this.checkLast(1):a=this.getMadParameter();this.chk||2147483647==a||(this.setShapeProperty(1,"type",Integer.$valueOf(1023)),this.setShapeSizeBs(1,-2147483648==a?300:a,null))});d(c$,"cmdZap",function(a){if(1==this.slen||!a)(a=a&&!this.$isStateScript)&&this.vwr.cacheFileByName(null,!1),this.vwr.zap(!0,a,!0),this.refresh(!1);else if(a=this.atomExpressionAt(1),!this.chk)if(0>a.nextSetBit(0)&&4==this.slen&&1073742359==this.tokAt(2))a=this.vwr.ms.getModelNumberIndex(this.getToken(2).intValue,
!1,!0),0<=a&&this.vwr.deleteModels(a,null);else{a=this.vwr.deleteAtoms(a,!0);var b=!this.doReport();b||this.report(J.i18n.GT.i(J.i18n.GT._("{0} atoms deleted"),a),!1);this.vwr.select(null,!1,0,b)}},"~B");d(c$,"cmdZoom",function(a){if(!a){var b=1<this.slen?this.getToken(1).tok:1073742335;switch(b){case 1073742335:case 1073742334:2<this.slen&&this.bad();this.chk||this.setBooleanProperty("zoomEnabled",1073742335==b);return}}var c=null,e=1,b=a?this.isFloatParameter(e)?this.floatParameter(e++):1:0;0>b&&
(e--,b=0);var f=0,d=null;if(this.isCenterParameter(e)){var f=e,h=Array(1),c=this.centerParameter(e,h);s(h[0],JU.BS)&&(d=h[0]);e=this.iToken+1}else 2==this.tokAt(e)&&0==this.getToken(e).intValue&&(d=this.vwr.getAtomBitSet("visible"),c=this.vwr.ms.getAtomSetCenter(d));var h=this.vwr.tm.getZoomSetting(),d=this.getZoom(f,e,d,h),e=this.iToken+1,g=h=NaN;e!=this.slen&&(h=this.floatParameter(e++),g=this.floatParameter(e++));e!=this.slen&&this.invArg();0>d&&(d=-d,a&&(1==this.slen?d*=2:null==c&&(d/=2)));(5>
d||2E5<d)&&this.numberOutOfRange(5,2E5);this.vwr.tm.isWindowCentered()||(null!=c&&(a=this.atomExpressionAt(f),this.chk||this.vwr.setCenterBitSet(a,!1)),c=this.vwr.tm.fixedRotationCenter,Float.isNaN(h)&&(h=this.vwr.tm.getTranslationXPercent()),Float.isNaN(g)&&(g=this.vwr.tm.getTranslationYPercent()));if(!this.chk&&(Float.isNaN(h)&&(h=0),Float.isNaN(g)&&(g=0),this.useThreads()||(b=0),this.vwr.moveTo(this,b,c,JV.JC.center,NaN,null,d,h,g,NaN,null,NaN,NaN,NaN,NaN,NaN,NaN),this.isJS&&0<b&&this.vwr.g.waitForMoveTo))throw new JS.ScriptInterruption(this,
"zoomTo",1);},"~B");d(c$,"colorShape",function(a,b,c){var e=null,f=null,d=null,h=null,g=2==b&&1073741859==this.tokAt(1)?"ball":"",m=!1,p=24==a||25==a,k=0,l=!1,n=3.4028235E38;0>b&&(h=this.atomExpressionAt(-b),b=this.iToken+1,this.isBondSet&&(l=!0,a=1));var r=this.getToken(b).tok;c?this.getToken(b):!0==(c=1610616835==r)&&this.getToken(++b);if(c)g="bg";else if(p)switch(this.theTok){case 1073742018:this.getToken(++b);g="mesh";break;case 1073742094:b=this.getArgbParamOrNone(++b,!1);d=0==b?null:Integer.$valueOf(b);
this.getToken(b=this.iToken+1);break;case 12290:case 10:case 1073742325:s(this.theToken.value,JM.BondSet)?(h=this.theToken.value,g="vertex"):(h=this.atomExpressionAt(b),g="atom"),this.getToken(b=this.iToken+1)}if(this.chk||!((27==a||28==a)&&null!=this.getIsoExt().dispatch(a,!0,this.st))){if((c=603979967==this.theTok)||1073742074==this.theTok)1.4E-45==n&&this.invArg(),e=this.paramAsStr(b++),c&&this.isFloatParameter(b)&&(n=this.getTranslucentLevel(b++));r=0;if(b<this.slen&&1073742335!=this.tokAt(b)&&
1073742334!=this.tokAt(b))if(m=!0,r=this.getToken(b).tok,(!p||1073742170!=this.tokAt(b+1))&&this.isColorParam(b)){b=this.getArgbParamOrNone(b,!1);f=0==b?null:Integer.$valueOf(b);if(0!=this.tokAt(b=this.iToken+1)&&null==e)if(this.getToken(b),(c=603979967==this.theTok)||1073742074==this.theTok)e=this.paramAsStr(b++),c&&this.isFloatParameter(b)&&(n=this.getTranslucentLevel(b++));this.isColorParam(b)&&(b=this.getArgbParamOrNone(b,!1),d=0==b?null:Integer.$valueOf(b),b=this.iToken+1);this.checkLength(b)}else if(26==
a)this.iToken--;else{var k=this.paramAsStr(b).toLowerCase(),B=0==k.indexOf("byelement"),q=B||0==k.indexOf("byresidue"),f=q||p?J.c.PAL.PROPERTY:1112152075==r?J.c.PAL.CPK:J.c.PAL.getPalette(k);(f===J.c.PAL.UNKNOWN||(f===J.c.PAL.TYPE||f===J.c.PAL.ENERGY)&&2!=a)&&this.invArg();var v=null,H=f!==J.c.PAL.PROPERTY&&f!==J.c.PAL.VARIABLE||!this.vwr.g.rangeSelected?null:this.vwr.bsA();f===J.c.PAL.PROPERTY?q?this.chk||(v=this.getCmdExt().getBitsetPropertyFloat(H,(B?1094715402:1094713356)|256,null,NaN,NaN)):(B=
k.equals("property"))&&JS.T.tokAttr(r=this.getToken(++b).tok,1077936128)&&!JS.T.tokAttr(r,1086324736)?(r=this.getToken(b).tok,B=1111490587==r?this.getToken(++b).value.toString():null,this.chk||(v=this.getCmdExt().getBitsetPropertyFloat(H,r|256,B,NaN,NaN)),b++):!B&&!p&&b++:f===J.c.PAL.VARIABLE&&(b++,k=this.paramAsStr(b++),v=M(this.vwr.ms.ac,0),JU.Parser.parseStringInfestedFloatArray(""+this.getParameter(k,4,!0),null,v),f=J.c.PAL.PROPERTY);if(f===J.c.PAL.PROPERTY){B=null;4==this.tokAt(b)?(B=this.paramAsStr(b++).toLowerCase(),
this.isArrayParameter(b)&&(B+="="+JS.SV.sValue(JS.SV.getVariableAS(this.stringParameterSet(b))).$replace("\n"," "),b=this.iToken+1)):p&&this.isColorParam(b)&&(B=this.getColorRange(b),b=this.iToken+1);null!=B&&!p&&(this.setStringProperty("propertyColorScheme",(c&&3.4028235E38==n?"translucent ":"")+B),q=0==B.indexOf("byelement")||0==B.indexOf("byresidue"));var u=0,y=3.4028235E38;if(!q&&(1073741826==this.tokAt(b)||1073742114==this.tokAt(b)))u=this.floatParameter(b+1),y=this.floatParameter(b+2),b+=3,
u==y&&p?(q=this.getShapeProperty(a,"dataRange"),null!=q&&(u=q[0],y=q[1])):u==y&&(y=3.4028235E38);p||(null==v?this.chk||this.vwr.setCurrentColorRange(k):this.chk||this.vwr.cm.setPropertyColorRangeData(v,H));if(p){this.checkLength(b);if(this.chk)return;m=!1;k=null==B?this.getShapeProperty(a,"colorEncoder"):null;if(null==k&&null==(k=this.vwr.cm.getColorEncoder(B)))return;k.isTranslucent=c&&3.4028235E38==n;k.setRange(u,y,u>y);3.4028235E38==y&&(k.hi=y);this.setShapeProperty(a,"remapColor",k);this.showString(this.getShapeProperty(a,
"dataRangeStr").$replace("\n"," "));if(3.4028235E38==n)return}else 3.4028235E38!=y&&this.vwr.cm.setPropertyColorRange(u,y)}else b++;this.checkLength(b)}if(!(this.chk||0>a)){switch(a){case 4:k=32768;break;case 2:k=30720;break;case 3:k=256;break;case 1:k=1023;break;default:k=0}0==k?(this.sm.loadShape(a),5==a&&this.setShapeProperty(5,"setDefaults",this.vwr.slm.noneSelected)):(null!=h&&(this.vwr.selectBonds(h),h=null),a=1,this.setShapeProperty(a,"type",Integer.$valueOf(k)));if(m){switch(r){case 1111492619:this.getPartialCharges(h);
break;case 1111490575:case 1111490574:this.vwr.autoCalculate(r,null);break;case 1111492620:this.vwr.g.rangeSelected&&this.vwr.ms.clearBfactorRange();break;case 1086324742:this.vwr.ms.calcSelectedGroupsCount();break;case 1094713362:case 1094713361:this.vwr.ms.calcSelectedMonomersCount();break;case 1094713360:this.vwr.ms.calcSelectedMoleculesCount()}null!=d&&(p||11==a||14==a||21==a)?this.setShapeProperty(a,"colorPhase",O(-1,[d,f])):null==h?this.setShapeProperty(a,g+"color",f):this.setShapePropertyBs(a,
g+"color",f,h)}null!=e&&this.setShapeTranslucency(a,g,e,n,h);0!=k&&this.setShapeProperty(1,"type",Integer.$valueOf(1023));l&&this.vwr.selectBonds(null);0==a&&this.vwr.shm.checkInheritedShapes()}}},"~N,~N,~B");d(c$,"getPartialCharges",function(a){try{this.vwr.getOrCalcPartialCharges(a,null)}catch(b){if(E(b,Exception))throw new JS.ScriptInterruption(this,"partialcharge",1);throw b;}},"JU.BS");d(c$,"encodeRadiusParameter",function(a,b,c){var e=NaN,f=J.atomdata.RadiusData.EnumType.ABSOLUTE,d=null,h=-1==
a?1648363544:this.getToken(a).tok;switch(h){case 1111490561:case 1111490562:case 1111492618:case 1113589786:case 1111492620:case 1648363544:e=1,f=J.atomdata.RadiusData.EnumType.FACTOR,d=1648363544==h?null:J.c.VDW.getVdwType2(JS.T.nameOf(h)),h=this.tokAt(++a)}switch(h){case 4141:return this.vwr.rd;case 1073741852:case 1073742116:case 1073741856:case 1073741857:case 1073741991:e=1;f=J.atomdata.RadiusData.EnumType.FACTOR;this.iToken=a-1;break;case 268435617:case 2:case 3:if(268435617==h)a++;else if(268435634==
this.tokAt(a+1)){e=Math.round(this.floatParameter(a));this.iToken=++a;f=J.atomdata.RadiusData.EnumType.FACTOR;if(0>e||200<e)return this.integerOutOfRange(0,200),null;e/=100;break}else if(2==h){e=this.intParameter(a);if(749<e||-200>e)return this.integerOutOfRange(-200,749),null;0<e?(e/=250,f=J.atomdata.RadiusData.EnumType.ABSOLUTE):(e/=-100,f=J.atomdata.RadiusData.EnumType.FACTOR);break}268435617==h||!c?(f=J.atomdata.RadiusData.EnumType.OFFSET,e=16):(f=J.atomdata.RadiusData.EnumType.ABSOLUTE,d=J.c.VDW.NADA,
e=100);e=this.floatParameterRange(a,b||!c?-e:0,e);if(Float.isNaN(e))return null;b&&(e=-e);16<e&&(e=16.1);break;default:1==e&&a--}null==d&&(d=J.c.VDW.getVdwType(this.optParameterAsString(++this.iToken)),null==d&&(this.iToken=a,d=J.c.VDW.AUTO));return new J.atomdata.RadiusData(null,e,f,d)},"~N,~B,~B");d(c$,"expandFloatArray",function(a,b){var c=a.length,e=!1;try{for(var f=0;f<a.length;f++)0>a[f]&&(c+=Math.abs(a[f-1]+a[f])-1,e=!0);if(e){for(var d=M(c,0),f=e=0;f<a.length;f++)if(c=I(a[f]),0<=c)c<b&&this.invArg(),
d[e++]=c;else for(var h=0>I(a[f-1]+c)?1:-1,g=I(a[f-1]);g!=-a[f];g+=h,e++)d[e]=d[e-1]+h;a=d;c=a.length}for(var m=K(c,0),f=c;0<=--f;)m[f]=I(a[f]);return m}catch(p){if(E(p,Exception))return this.invArg(),null;throw p;}},"~A,~N");d(c$,"frameControl",function(a){switch(this.getToken(this.checkLast(a)).tok){case 1073742098:case 1073742096:case 4143:case 20487:case 1073742037:case 1073742108:case 1073742125:case 1073741942:case 1073741993:this.chk||this.vwr.setAnimation(this.theTok);return}this.invArg()},
"~N");d(c$,"getColorRange",function(a){a=this.getArgbParam(a);1073742170!=this.tokAt(++this.iToken)&&this.invArg();var b=this.getArgbParam(++this.iToken),c=2==this.tokAt(this.iToken+1)?this.intParameter(++this.iToken):0;return JU.ColorEncoder.getColorSchemeList(JU.ColorEncoder.getPaletteAtoB(a,b,c))},"~N");d(c$,"getFullPathName",function(){var a=!this.chk||this.isCmdLine_C_Option?this.vwr.fm.getFullPathName(!0):"test.xyz";null==a&&this.invArg();return a});d(c$,"getObjectBoundingBox",function(a){a=
O(-1,[a,null,null]);return this.getShapePropertyData(24,"getBoundingBox",a)||this.getShapePropertyData(29,"getBoundingBox",a)||this.getShapePropertyData(25,"getBoundingBox",a)||this.getShapePropertyData(28,"getBoundingBox",a)||this.getShapePropertyData(27,"getBoundingBox",a)?a[2]:null},"~S");d(c$,"getObjectCenter",function(a,b,c){a=O(-1,[a,Integer.$valueOf(b),Integer.$valueOf(c)]);return this.getShapePropertyData(22,"getCenter",a)||this.getShapePropertyData(24,"getCenter",a)||this.getShapePropertyData(29,
"getCenter",a)||this.getShapePropertyData(25,"getCenter",a)||this.getShapePropertyData(28,"getCenter",a)||this.getShapePropertyData(27,"getCenter",a)?a[2]:null},"~S,~N,~N");d(c$,"getPlaneForObject",function(a,b){switch(this.sm.getShapeIdFromObjectName(a)){case 22:this.setShapeProperty(22,"thisID",a);var c=this.getShapeProperty(22,"vertices");if(null==c||3>c.length||null==c[0]||null==c[1]||null==c[2])break;return JU.Measure.getPlaneThroughPoints(c[0],c[1],c[2],new JU.V3,b,new JU.P4);case 24:return this.setShapeProperty(24,
"thisID",a),this.getShapeProperty(24,"plane")}return null},"~S,JU.V3");d(c$,"getQuaternionArray",function(a,b){var c;switch(b){case 134221850:c=a;break;case 9:c=Array(a.length);for(var e=0;e<a.length;e++)c[e]=JU.Quat.newP4(a[e]);break;case 1073742001:c=Array(a.size());for(e=0;e<a.size();e++){var f=JS.SV.pt4Value(a.get(e));if(null==f)return null;c[e]=JU.Quat.newP4(f)}break;default:return null}return c},"~O,~N");d(c$,"getSetAxesTypeMad10",function(a){if(a==this.slen)return 1;switch(this.getToken(this.checkLast(a)).tok){case 1073742335:return 1;
case 1073742334:return 0;case 1073741926:return-1;case 2:return this.intParameterRange(a,-1,19);case 3:return a=this.floatParameterRange(a,0,2),Float.isNaN(a)?2147483647:Q(Math.floor(2E4*a))}this.chk||this.errorStr(7,'"DOTTED"');return 0},"~N");d(c$,"getSettingFloat",function(a){return a>=this.slen?NaN:JS.SV.fValue(this.parameterExpressionToken(a))},"~N");d(c$,"getSettingInt",function(a){return a>=this.slen?-2147483648:this.parameterExpressionToken(a).asInt()},"~N");d(c$,"getSettingStr",function(a,
b){return b&&this.slen==a+1?this.paramAsStr(a):this.parameterExpressionToken(a).asString()},"~N,~B");d(c$,"getShapeProperty",function(a,b){return this.sm.getShapePropertyIndex(a,b,-2147483648)},"~N,~S");d(c$,"getShapePropertyData",function(a,b,c){return this.sm.getShapePropertyData(a,b,c)},"~N,~S,~A");d(c$,"getShapeType",function(a){a=JV.JC.shapeTokenIndex(a);0>a&&this.error(49);return a},"~N");d(c$,"getTranslucentLevel",function(a){a=this.floatParameter(a);return 2==this.theTok&&0<a&&9>a?a+1:a},
"~N");d(c$,"getZoom",function(a,b,c,e){var f=this.isFloatParameter(b)?this.floatParameter(b++):NaN;if(0==f||0==e)e=NaN,null==c?1073742330==this.tokAt(a)&&(f=this.getObjectBoundingBox(this.objectNameParameter(a+1)),(null==f||0==(e=f[0].distance(f[1])/2))&&this.invArg()):e=this.vwr.ms.calcRotationRadiusBs(c),Float.isNaN(e)&&this.invArg(),e=100*(this.vwr.getFloat(570425388)/e),f=NaN;if(0>f)f+=e;else if(Float.isNaN(f))switch(a=this.tokAt(b),a){case 1073742079:case 1275068432:f=e*(1073742079==a?0.5:2);
b++;break;case 268435632:case 268435633:case 268435617:c=this.floatParameter(++b);b++;switch(a){case 268435632:f=e/c;break;case 268435633:f=e*c;break;case 268435617:f=e+c}break;default:f=null==c?-e:e}this.iToken=b-1;return f},"~N,~N,JU.BS,~N");d(c$,"setElementColor",function(a,b){for(var c=JU.Elements.elementNumberMax;0<=--c;)if(a.equalsIgnoreCase(JU.Elements.elementNameFromNumber(c)))return this.chk||this.vwr.setElementArgb(c,b),!0;for(c=JU.Elements.altElementMax;0<=--c;)if(a.equalsIgnoreCase(JU.Elements.altElementNameFromIndex(c)))return this.chk||
this.vwr.setElementArgb(JU.Elements.altElementNumberFromIndex(c),b),!0;if("_"!=a.charAt(0))return!1;for(c=JU.Elements.elementNumberMax;0<=--c;)if(a.equalsIgnoreCase("_"+JU.Elements.elementSymbolFromNumber(c)))return this.chk||this.vwr.setElementArgb(c,b),!0;for(c=JU.Elements.altElementMax;4<=--c;)if(a.equalsIgnoreCase("_"+JU.Elements.altElementSymbolFromIndex(c))||a.equalsIgnoreCase("_"+JU.Elements.altIsotopeSymbolFromIndex(c)))return this.chk||this.vwr.setElementArgb(JU.Elements.altElementNumberFromIndex(c),
b),!0;return!1},"~S,~N");d(c$,"setMeshDisplayProperty",function(a,b,c){var e=null,f=null,d=25==a,h=0==b;h||(c=this.getToken(b).tok);switch(c){case 1765808134:if(d)this.iToken++;else break;case 1073742074:case 603979967:return h||this.colorShape(a,this.iToken,!1),!0;case 0:case 12291:case 1073742335:case 1073742334:case 12294:case 2097194:case 1610625028:case 2097192:1==this.iToken&&(0<=a&&0==this.tokAt(2))&&this.setShapeProperty(a,"thisID",null);if(0==c)return 1==this.iToken;if(h)return!0;switch(c){case 12291:return this.setShapeProperty(a,
"delete",null),!0;case 2097194:case 12294:c=1073742334;break;case 2097192:c=1073742335;break;case 1610625028:b+1==this.slen&&(c=1073742335);break}case 1073741958:case 1073741861:case 1073741964:case 1073741898:case 1073742039:case 1112150019:case 1073742042:case 1073742018:case 1073742052:case 1073741938:case 1073742046:case 1073741862:case 1073742057:case 1073742182:case 1073742060:case 1073741960:case 1073742058:e="token",f=Integer.$valueOf(c)}if(null==e)return!1;if(h)return!0;this.setShapeProperty(a,
e,f);0!=this.tokAt(this.iToken+1)&&(this.setMeshDisplayProperty(a,++this.iToken,0)||--this.iToken);return!0},"~N,~N,~N");d(c$,"setObjectArgb",function(a,b){this.chk||this.vwr.setObjectArgb(a,b)},"~S,~N");d(c$,"setObjectMad10",function(a,b,c){this.chk||this.vwr.setObjectMad10(a,b,c)},"~N,~S,~N");d(c$,"setObjectProp",function(a,b,c){for(var e=O(-1,[a,null]),f="",d=JU.PT.isWild(a),h=17;;){if(this.getShapePropertyData(h,"checkID",e)){this.setShapeProperty(h,"thisID",a);switch(b){case 12291:this.setShapeProperty(h,
"delete",null);break;case 12294:case 1610625028:this.setShapeProperty(h,"hidden",1610625028==b?Boolean.FALSE:Boolean.TRUE);break;case 134222350:f+=this.getShapeProperty(h,"command")+"\n";break;case 1765808134:0<=c&&this.colorShape(h,c+1,!1)}if(!d)break}switch(h){case 17:h=20;continue;case 20:h=32}switch(--h){case 27:h--;break;case 28:h-=2}if(21>h)break}return f},"~S,~N,~N");d(c$,"setObjectProperty",function(){var a=this.setShapeNameParameter(2);return this.chk?"":this.setObjectProp(a,this.tokAt(0),
this.iToken)});d(c$,"setShapeNameParameter",function(a){var b=this.paramAsStr(a),c=b.equals("*");0==b.length&&this.invArg();if(c)switch(this.tokAt(a+1)){case 0:case 1073742335:case 1073742334:case 2097192:case 2097194:case 1765808134:case 12291:break;default:if(this.setMeshDisplayProperty(-1,0,this.tokAt(a+1)))break;b+=this.optParameterAsString(++a)}268435633==this.tokAt(a+1)&&(b+=this.paramAsStr(++a));this.iToken=a;return b},"~N");d(c$,"setShapeProperty",function(a,b,c){this.chk||this.sm.setShapePropertyBs(a,
b,c,null)},"~N,~S,~O");d(c$,"setShapePropertyBs",function(a,b,c,e){this.chk||this.sm.setShapePropertyBs(a,b,c,e)},"~N,~S,~O,JU.BS");d(c$,"setShapeSize",function(a,b){this.chk||this.sm.setShapeSizeBs(a,0,b,null)},"~N,J.atomdata.RadiusData");d(c$,"setShapeSizeBs",function(a,b,c){this.chk||this.sm.setShapeSizeBs(a,b,null,c)},"~N,~N,JU.BS");d(c$,"setShapeTranslucency",function(a,b,c,e,f){3.4028235E38==e&&(e=this.vwr.getFloat(570425354));this.setShapeProperty(a,"translucentLevel",Float.$valueOf(e));null!=
b&&(null==f?this.setShapeProperty(a,b+"translucency",c):this.chk||this.setShapePropertyBs(a,b+"translucency",c,f))},"~N,~S,~S,~N,JU.BS");d(c$,"setSize",function(a,b){var c=null,e=!1;switch(this.tokAt(1)){case 1073742072:this.restrictSelected(!1,!1);case 1073742335:break;case 1073742334:b=0;break;case 3:e=0>this.floatParameter(1);default:c=this.encodeRadiusParameter(1,e,!0);if(null==c)return;Float.isNaN(c.value)&&this.invArg()}null==c&&(c=new J.atomdata.RadiusData(null,b,J.atomdata.RadiusData.EnumType.FACTOR,
J.c.VDW.AUTO));e&&this.restrictSelected(!1,!1);this.setShapeSize(a,c)},"~N,~N");d(c$,"setSizeBio",function(a){var b=0;switch(this.getToken(1).tok){case 1073742072:this.restrictSelected(!1,!1);case 1073742335:b=-1;break;case 1073742334:break;case 1639976963:b=-2;break;case 1111492620:case 1073741922:b=-4;break;case 2:if(2147483647==(b=8*this.intParameterRange(1,0,1E3)))return;break;case 3:b=Math.round(2E3*this.floatParameterRange(1,-4,4));if(2147483647==b)return;0>b&&(this.restrictSelected(!1,!1),
b=-b);break;case 10:this.chk||this.sm.loadShape(a);this.setShapeProperty(a,"bitset",this.theToken.value);return;default:this.error(6)}this.setShapeSizeBs(a,b,null)},"~N");d(c$,"setUnits",function(a,b){545259568==b&&(a.endsWith("hz")||JU.PT.isOneOf(a.toLowerCase(),";angstroms;au;bohr;nanometers;nm;picometers;pm;vanderwaals;vdw;"))?this.chk||this.vwr.setUnits(a,!0):545259559==b&&JU.PT.isOneOf(a.toLowerCase(),";kcal;kj;")?this.chk||this.vwr.setUnits(a,!1):this.errorStr2(50,"set "+JS.T.nameOf(b),a);return!0},
"~S,~N");d(c$,"toString",function(){var a=new JU.SB;a.append("Eval\n pc:");a.appendI(this.pc);a.append("\n");a.appendI(this.aatoken.length);a.append(" statements\n");for(var b=0;b<this.aatoken.length;++b){a.append("----\n");for(var c=this.aatoken[b],e=0;e<c.length;++e)a.appendO(c[e]),a.appendC("\n");a.appendC("\n")}a.append("END\n");return a.toString()});T(c$,"saveList","bonds? context? coordinates? orientation? rotation? selection? state? structure?","iProcess",0,"commandHistoryLevelMax",0,"contextDepthMax",
100,"scriptReportingLevel",0)});F("JS");P(["JS.ScriptParam"],"JS.ScriptExpr","java.lang.Boolean $.Float java.util.Hashtable $.Map JU.BArray $.BS $.CU $.Lst $.M34 $.M4 $.Measure $.P3 $.P4 $.PT $.SB J.api.Interface JM.BondSet $.Group $.ModelSet JS.SV $.ScriptContext $.ScriptMathProcessor $.T JU.BSUtil $.Elements $.Escape".split(" "),function(){c$=R(function(){this.debugHigh=!1;this.ptTemp=this.tempStatement=this.smilesExt=this.mathExt=this.isoExt=this.cmdExt=null;N(this,arguments)},JS,"ScriptExpr",
JS.ScriptParam);d(c$,"getCmdExt",function(){return null==this.cmdExt?this.cmdExt=this.getExt("Cmd").init(this):this.cmdExt});d(c$,"getIsoExt",function(){return null==this.isoExt?this.isoExt=this.getExt("Iso").init(this):this.isoExt});d(c$,"getMathExt",function(){return null==this.mathExt?(this.mathExt=this.getExt("Math")).init(this):this.mathExt});d(c$,"getSmilesExt",function(){return null==this.smilesExt?(this.smilesExt=this.getExt("Smiles")).init(this):this.smilesExt});d(c$,"getExt",function(a){return J.api.Interface.getInterface("JS."+
a+"Ext",this.vwr,"script")},"~S");d(c$,"parameterExpressionList",function(a,b,c){return this.parameterExpression(a,-1,null,!0,!0,b,c,null,null,!1)},"~N,~N,~B");d(c$,"parameterExpressionString",function(a,b){return this.parameterExpression(a,b,"",!0,!1,-1,!1,null,null,!1)},"~N,~N");d(c$,"parameterExpressionBoolean",function(a,b){return this.parameterExpression(a,b,null,!0,!1,-1,!1,null,null,!1).booleanValue()},"~N,~N");d(c$,"parameterExpressionToken",function(a){a=this.parameterExpressionList(a,-1,
!1);return 0<a.size()?a.get(0):JS.SV.newS("")},"~N");d(c$,"parameterExpressionSelect",function(a,b){this.st=b;this.slen=this.st.length;return this.parameterExpression(2,-2147483648,null,!0,!1,-1,!1,a,null,!1).booleanValue()},"java.util.Map,~A");d(c$,"parameterExpression",function(a,b,c,e,f,d,h,g,m,p){var k=null!=m,l=null==m&&null!=g,n=0>a,r=!f&&null==c,q=!f&&null!=c&&0==c.length;n&&(a=-a);var G=null==g||-2147483648!=b;b<a&&(b=this.slen);var v=p?0:1,H=-1;c=new JS.ScriptMathProcessor(this,p,h,f,!1,
!1,c);var u,y;h=f=0;var x=!0,t=a;a:for(;t<b;t++){u=null;var w=this.getToken(t).tok;if(k&&1073742336!=this.tokAt(t+1)){var A=null!=g&&g.containsKey(this.theToken.value)?null:this.getBitsetPropertySelector(t,10);if(null!=A){c.addX(g.get(m));c.addOpAllowMath(A,268435472==this.tokAt(t+1),0)||this.invArg();if((134320141==A.intValue||102436==A.intValue)&&268435472!=this.tokAt(this.iToken+1))c.addOp(JS.T.tokenLeftParen),c.addOp(JS.T.tokenRightParen);t=this.iToken;continue}}switch(w){case 268435521:case 1073742338:if(!e&&
x)break a;1073742338==w&&this.invArg();p&&(1==f&&268435860==this.tokAt(t+1))&&(p=c.endAssignment())}switch(w){case 12290:if(1073742325==(w=this.tokAt(++t)))u=this.parameterExpressionToken(++t),t=this.iToken;else if(2==w){u=this.vwr.ms.getAtoms(1094715393,Integer.$valueOf(this.st[t].intValue));break}else if(12290==w&&2==this.tokAt(t+1)){u=this.vwr.ms.getAtomsFromAtomNumberInFrame(this.st[++t].intValue);break}else u=this.getParameter(JS.SV.sValue(this.st[t]),1073742190,!0);u=this.getParameter(u.asString(),
1073742190,!0);break;case 134320649:268435472!=this.getToken(++t).tok&&this.invArg();null==g&&(g=new java.util.Hashtable);y=this.parameterExpression(++t,-1,null,e,!1,-1,!1,g,m,!1);A=y.booleanValue();w=this.iToken;1073742339!=this.getToken(w++).tok&&this.invArg();this.parameterExpressionBoolean(w,-1);var C=this.iToken;1073742339!=this.tokAt(C++)&&this.invArg();this.parameterExpression(-C,-1,null,e,!1,1,!1,g,m,!1);t=this.iToken;268435473!=this.tokAt(t)&&this.invArg();u=this.parameterExpression(A?w:
C,A?C:t,"XXX",e,!1,1,!1,g,m,!1);t=this.iToken=t;break;case 134320648:case 1275082245:w=(A=0<a)&&134320648==w;A?((268435472!=this.getToken(++t).tok||!JS.T.tokAttr(this.getToken(++t).tok,1073741824))&&this.invArg(),C=this.paramAsStr(t),1073742339!=this.getToken(++t).tok&&this.invArg()):C="_x";u=this.parameterExpressionToken(-++t).value;s(u,JU.BS)||this.invArg();t=this.iToken;A&&1073742339!=this.getToken(t++).tok&&this.invArg();var D=new JU.BS,z=new JU.BS,I=w?Array(u.cardinality()):null;null==g&&(g=
new java.util.Hashtable);z.set(0);var F=JS.SV.newV(10,z);F.index=0;g.put(C,F.setName(C));var O=-1;if(A){O=t-1;y=0;for(var L;0<=y&&++O<b;)268435473==(L=this.tokAt(O))?y--:268435472==L&&y++}var Q=0,K=0,M=u.nextSetBit(0);if(0>M||this.chk)this.iToken=O-1;else for(;0<=M;M=u.nextSetBit(M+1))0<=K&&z.clear(K),K=M,z.set(M),F.index=M,y=this.parameterExpression(t,O,w?"XXX":null,e,w,M,!1,g,A?null:C,!1),w?((null==y||0==y.size())&&this.invArg(),I[Q++]=y.get(0).asString()):y.booleanValue()&&D.set(M);if(w)u=I;else if(A)u=
D;else return this.listBS(D);t=this.iToken+1;break;case 1073742339:break a;case 2:if(1073742336==this.tokAt(this.iToken+1)&&(805306401==(w=this.tokAt(this.iToken+2))||268435633==w))this.theToken.value=Float.$valueOf(this.theToken.intValue),this.theToken.tok=3,this.theToken.intValue=2147483647,t++;case 3:case 1073742362:c.addXNum(this.theToken);break;case 134217750:if(268435472==this.tokAt(this.iToken+1)){c.addOpAllowMath(this.theToken,!0,0)||this.invArg();break}case 1073742335:case 1073742334:case 4:case 8:case 9:case 11:case 12:case 7:case 10:case 6:case 14:c.addX(JS.SV.newT(this.theToken));
break;case 1073742330:if(1073742336==this.tokAt(t+2)&&1275072526==this.tokAt(t+3))c.addXStr("$"+this.paramAsStr(++t));else{this.ignoreError=!0;var P;try{P=this.centerParameter(t,null),c.addX(JS.SV.newV(8,P))}catch(N){if(E(N,Exception))c.addXStr("");else throw N;}this.ignoreError=!1;t=this.iToken}break;case 1073742332:if(4==this.tokAt(t+1)){if(1073742338==this.tokAt(t+2)){u=this.chk?new JU.BS:this.getAtomBitSet(this.stringParameter(t+1));t+=2;break}u=this.getAssocArray(t)}else u=this.getPointOrPlane(t,
!1,!0,!0,!1,3,4);t=this.iToken;break;case 1073742325:if(1073742326==this.tokAt(t+1)){u=new java.util.Hashtable;t++;break}else 1073742327==this.tokAt(t+1)&&1073742326==this.tokAt(t+2)&&(w=1073742327,this.iToken+=2);case 1073742327:u=1073742327==w?this.vwr.getAllAtoms():this.atomExpression(this.st,t,0,!0,!0,null,!0);t=this.iToken;if(0==h&&n)return this.iToken++,this.listBS(u);break;case 1073742195:c.addOp(this.theToken);continue;case 1073742326:break a;case 268435504:if(!e&&x)break a;c.addOp(this.theToken)||
this.invArg();break;case 1073742337:case 1073742336:p&&(x&&268435860==this.tokAt(t+2))&&(p=c.endAssignment());if(0==v&&x)switch(this.tokAt(t+1)){case 0:break;case 1275335685:case 1275334681:case 1140850694:case 1140850706:case 1140850696:case 1275068418:if(1073742336==w)break;default:c.addOp(JS.T.tokenArrayOpen);c.addXStr(this.optParameterAsString(++t));c.addOp(JS.T.tokenArrayClose);continue}A=this.getBitsetPropertySelector(t+1,c.getXTok());t=134320141==A.intValue;C=!0;L=this.tokAt(this.iToken+2);
if(1073742336==this.tokAt(this.iToken+1))switch(L){case 1073742327:L=480,1073742336==this.tokAt(this.iToken+3)&&1275068420==this.tokAt(this.iToken+4)&&(L=224);case 32:case 64:case 192:case 128:case 160:case 96:C=t||1275069443==A.intValue||480==L||224==L,A.intValue|=L,this.getToken(this.iToken+2)}w=this.tokAt(this.iToken+1);C=(new Boolean(C&(268435472==w||t))).valueOf();c.addOpAllowMath(A,C,t?w:0)||this.invArg();t=this.iToken;134320141==A.intValue&&268435472!=w&&(c.addOp(JS.T.tokenLeftParen),c.addOp(JS.T.tokenRightParen));
break;case 1086326786:case 1086326785:case 1073742328:case 1678381065:case 1086326788:case 1073742329:case 1111490587:case 1086326789:case 1086324742:case 1094717454:case 1094713360:case 1073742128:case 134218756:case 1086324744:case 1094713366:case 134218757:case 1237320707:case 1639976963:if(!l&&t==H&&268435504==this.tokAt(t+1)){c.addX(JS.SV.newT(this.theToken));break}default:if(268435520==this.theTok&&268435490==this.tokAt(t+2)){u=this.getAssocArray(t);t=this.iToken;break}if(JS.T.tokAttr(this.theTok,
268435456)||JS.T.tokAttr(this.theTok,134217728)&&268435472==this.tokAt(this.iToken+1)){if(!c.addOp(this.theToken)){if(0<=d)break a;this.invArg()}switch(this.theTok){case 134217759:H=t+2;break;case 268435860:x&&(v=t);break;case 268435472:h++;x=!1;break;case 268435473:if(0>=--h&&0==f){if(n){this.iToken++;break a}x=!0}break;case 268435520:f++;x=!1;break;case 268435521:if(0==--f&&0==h){if(n){this.iToken++;break a}x=!0}}}else{A=this.paramAsStr(t).toLowerCase();w=268435472==this.tokAt(t+1);if(!w)if(this.chk)u=
A;else if(null==g||null==(u=JU.PT.getMapValueNoCase(g,A))&&G)A.startsWith("_")&&(u=A.equals("_")?this.vwr.ms.getAuxiliaryInfo(null):A.equals("_m")?this.vwr.getCurrentModelAuxInfo():null),null==u?u=this.getContextVariableAsVariable(A,!1):0==v&&this.invArg();if(null==u)if(JS.T.tokAttr(this.theTok,1073741824)&&this.vwr.isFunction(A))c.addOp(JS.SV.newV(134320141,this.theToken.value))||this.invArg(),w||(c.addOp(JS.T.tokenLeftParen),c.addOp(JS.T.tokenRightParen));else{A=this.vwr.g.getAndSetNewVariable(A,
!1);switch(A.tok){case 2:case 3:if(this.noCopy(t,-1)||this.noCopy(t,1))break;c.addXCopy(A);continue}c.addX(A)}}}null!=u&&(s(u,JU.BS)?c.addXBs(u):c.addXObj(u))}a=c.getResult();null==a&&(this.chk||c.dumpStacks("null result"),this.error(13));if(135198==a.tok)return p&&0==v?(p=new JU.Lst,p.addLast(new JS.SV),p):a.value;if(this.chk){if(r)return Boolean.TRUE;if(q)return""}else{if(r)return Boolean.$valueOf(a.asBoolean());if(q)return 4==a.tok&&(a.intValue=2147483647),a.asString()}switch(a.tok){case 1073742335:case 1073742334:return Boolean.$valueOf(1==
a.intValue);case 2:return Integer.$valueOf(a.intValue);default:return a.value}},"~N,~N,~S,~B,~B,~N,~B,java.util.Map,~S,~B");d(c$,"atomExpressionAt",function(a){this.checkToken(a)||(this.iToken=a,this.bad());return this.atomExpression(this.st,a,0,!0,!1,null,!0)},"~N");d(c$,"atomExpression",function(a,b,c,e,f,d){this.isBondSet=!1;a!==this.st&&(this.tempStatement=this.st,this.st=a);var h=new JS.ScriptMathProcessor(this,!1,!1,!1,null==d,f,null),g,m=!1;this.iToken=1E3;var p=0>b,k=!1,l,n=0,r=this.vwr.ms.ac,
q=-10;p&&(b=-b);p=(new Boolean(p|this.chk)).valueOf();0==c&&a.length>b&&(c=b+1);a:for(;b<c;++b){this.iToken=b;g=a[b];if(null==g)break;l=g.value;switch(g.tok){case 1073742325:c=a.length;n++;break;case 1073742326:n--;if(0<n)continue;break a;case 1073742332:if(this.isPoint3f(b)&&(l=this.getPoint3f(b,!0),null!=l)){h.addXPt(l);b=this.iToken;break}break;case 1073742338:0<b&&1073742332==a[b-1].tok&&h.addXBs(new JU.BS);break;case 268435520:k=!0;h.addOp(g);break;case 268435521:k=!1;h.addOp(g);break;case 12290:h.addXBs(this.getAtomBitSet(l));
break;case 7:if(l=JS.SV.getBitSet(g,!1),null!=l){h.addXBs(l);break}case 6:h.addXBs(this.vwr.ms.getAtoms(1086324744,g.asString()));break;case 134219265:h.addX(JS.SV.newT(g));h.addX(JS.SV.newV(9,this.hklParameter(b+2)));b=this.iToken;break;case 134217750:h.addX(JS.SV.newT(g));h.addX(JS.SV.newV(9,this.planeParameter(b+2)));b=this.iToken;break;case 1073742329:h.addX(JS.SV.newT(g));h.addXPt(this.getPoint3f(b+2,!0));b=this.iToken;break;case 4:var G=l;if(0==G.indexOf("({")){if(l=JU.BS.unescape(G),null!=
l){h.addXBs(l);break}}else if(0<=G.indexOf("|")&&q!=b-4){h.addXBs(this.vwr.ms.getAtoms(1086324744,G));break}h.addX(JS.SV.newT(g));G.equals("hkl")&&(h.addX(JS.SV.newV(9,this.hklParameter(b+2))),b=this.iToken);break;case 134217759:q=b;case 134218757:case 134218756:case 1237320707:case 134353926:case 134217736:case 268435504:case 1275203608:h.addOp(g);break;case 1073742327:h.addXBs(this.vwr.getAllAtoms());break;case 1073742333:h.addXBs(new JU.BS);break;case 1073742335:case 1073742334:h.addX(JS.SV.newT(g));
break;case 1113589787:h.addXBs(JU.BSUtil.copy(this.vwr.bsA()));break;case 2097194:h.addXBs(JU.BSUtil.copy(this.vwr.slm.getHiddenSet()));break;case 12293:h.addXBs(JU.BSUtil.copy(this.vwr.getMotionFixedAtoms()));break;case 2097192:h.addXBs(JU.BSUtil.copyInvert(this.vwr.slm.getHiddenSet(),r));break;case 2097200:h.addXBs(this.vwr.getBaseModelBitSet());break;case 2097198:h.addXBs(this.chk?new JU.BS:JU.BSUtil.copy(this.vwr.ms.getVisibleSet(!m)));m=!0;break;case 2097190:!this.chk&&e&&this.refresh(!1);h.addXBs(this.chk?
new JU.BS:this.vwr.ms.getClickableSet(!e));e=!1;break;case 1073742356:1!=this.vwr.ms.mc||this.vwr.ms.haveBioModels?(G=g.intValue,0<G?(l=this.compareInt(1094713346,268435860,G),2==G&&l.or(this.compareInt(1086326789,268435860,20)),h.addXBs(l)):h.addXBs(this.getAtomBits(g.tok,l))):h.addXBs(this.lookupIdentifierValue("_"+l));break;case 2097155:case 2097188:case 2097156:case 1612709894:case 1073742331:case 2097166:case 2097165:case 2097168:case 2097170:case 2097172:case 2097174:case 1073742360:case 1073742355:case 2097196:case 1088421903:case 1814695966:h.addXBs(this.getAtomBits(g.tok,
l));break;case 1073742358:case 1073742359:g=g.intValue;if(2147483647==g&&s(l,Integer)){g=l.intValue();if(!this.vwr.haveFileSet()){h.addXBs(this.getAtomBits(1073742358,Integer.$valueOf(g)));break}2147>=g&&(g*=1E6)}h.addXBs(this.bitSetForModelFileNumber(g));break;case 1073742361:case 1073742357:h.addXBs(this.getAtomBits(g.tok,Integer.$valueOf(g.intValue)));break;case 1073742362:k?h.addXNum(g):h.addXBs(this.getAtomBits(1073742362,Integer.$valueOf(JS.ScriptExpr.getSeqCode(g))));break;case 1073742363:if(k){h.addXNum(g);
h.addOp(JS.T.tokenMinus);h.addXNum(a[++b]);break}l=b+3<a.length&&268435584==a[b+2].tok&&1073742357==a[b+3].tok?a[b+3].intValue:-1;h.addXBs(this.getAtomBits(1073742363,K(-1,[JS.ScriptExpr.getSeqCode(g),JS.ScriptExpr.getSeqCode(a[++b]),l])));-1!=l&&(b+=2);break;case 1094713350:case 1094713349:h.addXBs(this.getAtomBits(g.tok,K(-1,[Q(Math.floor(1E3*l.x)),Q(Math.floor(1E3*l.y)),Q(Math.floor(1E3*l.z))])));break;case 2097182:h.addXBs(0>this.vwr.am.cmi?this.vwr.getFrameAtoms():this.vwr.getModelUndeletedAtomsBitSet(this.vwr.am.cmi));
break;case 1612709900:case 2097154:case 1114249217:case 1612709912:case 136314895:case 2097159:case 2097160:case 2097162:case 2097178:case 2097180:h.addXBs(this.lookupIdentifierValue(l));break;case 268435859:case 268435858:case 268435857:case 268435856:case 268435860:case 268435861:case 268435862:G=g.tok;g=g.intValue;1094717448==g&&268435860!=G&&this.invArg();var v=null;1715472409==g&&(b+2==a.length&&this.invArg(),this.chk||(v=this.vwr.getDataObj(a[++b].value,null,1)));++b==a.length&&this.invArg();
h.addXBs(this.chk?new JU.BS:this.getComparison(a[b],g,G,l,v));break;case 3:case 2:h.addXNum(g);break;case 10:g=JU.BSUtil.copy(l);h.addXBs(g);break;case 8:h.addXPt(l);break;default:if(JS.T.tokAttr(g.tok,268435456)){h.addOp(g)||this.invArg();break}if(!s(l,String)){h.addXObj(l);break}g=this.getParameter(l,0,!0);if(k){h.addXObj(g);break}if(s(g,String)||s(g,JU.Lst))g=this.getStringObjectAsVariable(g);s(g,String)&&(g=this.lookupIdentifierValue(l));h.addXObj(g)}}a=h.getResult();if(null==a){if(f)return null;
this.chk||h.dumpStacks("after getResult");this.error(13)}f=a.value;if(s(f,String)&&(null==d||f.startsWith("({")))f=this.chk?new JU.BS:this.getAtomBitSet(f);if(null!=d&&!s(f,JU.BS))return d[0]=f,null;l=s(f,JU.BS)?f:new JU.BS;this.isBondSet=s(f,JM.BondSet);!this.isBondSet&&(l=this.vwr.slm.excludeAtoms(l,p)).length()>this.vwr.ms.ac&&l.clearAll();null!=this.tempStatement&&(this.st=this.tempStatement,this.tempStatement=null);return l},"~A,~N,~N,~B,~B,~A,~B");d(c$,"getComparison",function(a,b,c,e,f){var d=
a.tok;if(7==d){d=new JU.BS;268435860!=c&&d.setBits(0,this.vwr.ms.ac);a=a.getList();for(var h=a.size();0<=--h;){var g=this.getComparison(a.get(h),b,c,e,f);268435860==c?d.or(g):d.and(g)}return d}var m=a.intValue,h=NaN,g=1094717454==b,p=JS.T.tokAttr(b,1094713344),k=JS.T.tokAttr(b,1111490560)||1077936128==(b&1136656384),l=p&&k,n=!p&&JS.T.tokAttr(b,1086324736);1086326789==b&&(p=!(n=!1));var r=a.value;if(JS.T.tokAttr(d,1073741824))if("_modelNumber".equalsIgnoreCase(r))m=this.vwr.am.cmi,r=Integer.$valueOf(m=
0>m?0:this.vwr.getModelFileNumber(m));else{var q=this.getParameter(r,1073742190,!1);if(null!=q){if(7==q.tok)return this.getComparison(q,b,c,e,f);m=q.intValue;r=n?JS.SV.sValue(q):JS.SV.nValue(q)}}s(r,JU.P3)?1765808134==b&&(m=JU.CU.colorPtToFFRGB(r),d=2,p=!0):s(r,String)&&(1765808134==b?(m=JU.CU.getArgbFromString(r),0==m&&JS.T.tokAttr(d,1073741824)&&(r=this.getVarParameter(r,!0),r.startsWith("{")?(r=JU.Escape.uP(r),m=s(r,JU.P3)?JU.CU.colorPtToFFRGB(r):0):m=JU.CU.getArgbFromString(r)),d=2,p=!0):n||(1639976963==
b||1237320707==b||1086326789==b?n=!(p=2147483647!=m):r=JS.SV.nValue(a),s(r,Integer)?h=m=r.intValue():s(r,Float)&&g&&(m=JM.ModelSet.modelFileNumberFromFloat(r.floatValue()))));n&&!s(r,String)&&(r=""+r);s(r,Integer)||2==d?g?1E6<=m&&(b=-1094717454):l||k&&(h=m):s(r,Float)?g?b=-1094717454:(h=r.floatValue(),l?p=!1:p&&(m=I(h))):n||(this.iToken++,this.invArg());g&&(1E6<=m&&0==m%1E6)&&(m/=1E6,b=1228935687);if(-1094717454==b&&268435860==c)return this.bitSetForModelFileNumber(m);null!=e&&0<=e.indexOf("-")&&
(p?m=-m:Float.isNaN(h)||(h=-h));return p?this.compareInt(b,c,m):n?this.compareString(b,c,r):this.compareFloatData(b,f,c,h)},"JS.T,~N,~N,~S,~A");d(c$,"noCopy",function(a,b){switch(this.tokAt(a+b)){case 268435650:case 268435649:return-1==this.st[a+b].intValue==(-1==b);default:return!1}},"~N,~N");d(c$,"getAssocArray",function(a){var b=new java.util.Hashtable,c=1073742332==this.tokAt(a)?1073742338:268435521;for(a+=1;a<this.slen&&this.tokAt(a)!=c;a++){var e=null;s(this.st[a],JS.SV)&&(e=this.st[a].myName);
null==e&&(e=JS.SV.sValue(this.st[a]));a++;268435490!=this.tokAt(a++)&&this.invArg();a=this.parameterExpression(a,0,null,!1,!0,-1,!1,null,null,!1);0==a.size()&&this.invArg();b.put(e,a.get(0));a=this.iToken;if(268435504!=this.tokAt(a))break}this.iToken=a;this.tokAt(a)!=c&&this.invArg();return b},"~N");d(c$,"listBS",function(a){var b=new JU.Lst;b.addLast(JS.SV.newV(10,a));return b},"JU.BS");d(c$,"compareFloatData",function(a,b,c,e){var f=new JU.BS,d=this.vwr.ms.ac,h=this.vwr.ms.at,g=0;this.vwr.autoCalculate(a,
null);var m=1715472409==a;!m&&null==this.ptTemp&&(this.ptTemp=new JU.P3);for(;0<=--d;){g=!1;g=h[d];if(m){if(null==b||b.length<=d)continue;g=b[d]}else g=g.atomPropertyFloat(this.vwr,a,this.ptTemp);(g=this.compareFloat(c,g,e))&&f.set(d)}return f},"~N,~A,~N,~N");d(c$,"compareFloat",function(a,b,c){switch(a){case 268435859:return b<c;case 268435858:return b<=c;case 268435857:return b>=c;case 268435856:return b>c;case 268435860:return b==c;case 268435861:return b!=c&&!Float.isNaN(b)}return!1},"~N,~N,~N");
d(c$,"compareString",function(a,b,c){var e=new JU.BS,f=this.vwr.ms.at,d=this.vwr.ms.ac,h=268435862==b||1086326788==a&&this.vwr.getBoolean(603979823);for(h||(c=c.toLowerCase());0<=--d;){var g=f[d].atomPropertyString(this.vwr,a);h||(g=g.toLowerCase());this.compareStringValues(b,g,c)&&e.set(d)}return e},"~N,~N,~S");d(c$,"compareStringValues",function(a,b,c){switch(a){case 268435860:case 268435861:return JU.PT.isMatch(b,c,!0,!0)==(268435860==a);case 268435862:return JU.PT.isLike(b,c);default:this.invArg()}return!1},
"~N,~S,~S");d(c$,"compareInt",function(a,b,c){var e=2147483647,f=null,d=b,h=c,g=this.vwr.ms,m=g.at,p=g.ac,k=-1,l=0,n=-1,r=null,q=0,s;switch(a){case 1296041986:switch(d){case 268435857:case 268435856:k=2147483647}break;case 1094713347:try{switch(b){case 268435859:return JU.BSUtil.newBitSet2(0,c);case 268435858:return JU.BSUtil.newBitSet2(0,c+1);case 268435857:return JU.BSUtil.newBitSet2(c,p);case 268435856:return JU.BSUtil.newBitSet2(c+1,p);case 268435860:return c<p?JU.BSUtil.newBitSet2(c,c+1):new JU.BS;
default:return s=JU.BSUtil.setAll(p),0<=c&&s.clear(c),s}}catch(v){if(E(v,Exception))return new JU.BS;throw v;}}s=JU.BS.newN(p);for(var H=0;H<p;++H){var u=!1,y=m[H];switch(a){default:e=y.atomPropertyInt(a);break;case 1094713368:case 1094717448:return JU.BSUtil.copy(this.vwr.ms.getConformation(-1,c-1,!1,null));case 1296041986:f=y.atomSymmetry;if(null==f)continue;y.mi!=n&&(n=y.mi,r=g.getModelCellRange(n),q=g.getModelSymmetryCount(n));if(200<=h){if(null==r)continue;c=h%1E3;var x=Q(h/1E3)-1;if(0>x)u=!0;
else if(0==q||0<=x&&!(u=f.get(x)))continue;d=1073742333;e=0>x?y.getCellTranslation(c,r,q):y.getSymmetryTranslation(x,r,q)}else if(0<q){if(c>q&&268435859!=d&&268435858!=d)continue;if(268435861==d){0<c&&(c<=q&&!f.get(c))&&s.set(H);continue}f=JU.BSUtil.copy(f);f.clearBits(q,f.length())}switch(d){case 268435859:k=c-1;break;case 268435858:k=c;break;case 268435857:l=c-1;break;case 268435856:l=c;break;case 268435860:k=c;l=c-1;break;case 268435861:u=!f.get(c)}0>l&&(l=0);l<k&&(f=f.nextSetBit(l),0<=f&&f<k&&
(u=!0));if(!u||2147483647==e)b=1073742333}switch(b){case 268435859:u=e<c;break;case 268435858:u=e<=c;break;case 268435857:u=e>=c;break;case 268435856:u=e>c;break;case 268435860:u=e==c;break;case 268435861:u=e!=c}u&&s.set(H)}return s},"~N,~N,~N");d(c$,"getBitsetPropertySelector",function(a,b){var c=this.getToken(a).tok;switch(c){case 32:case 64:case 96:case 192:case 128:case 160:case 1715472409:break;default:if(JS.T.tokAttrOr(c,1077936128,1140850688)||6==b)break;if(805306401!=c&&!JS.T.tokAttr(c,1073741824))break;
var e=this.paramAsStr(a);this.vwr.isFunction(e.toLowerCase())&&(c=134320141)}return JS.SV.newSV(268435665,c,this.paramAsStr(a))},"~N,~N");d(c$,"getBitsetProperty",function(a,b,c,e,f,d,h,g,m){var p=2147483647!=g,k=p||!s(f,JM.BondSet),l=b&480,n=224==l,r=this.vwr.ms.ac,q=256==l?M(r,0):null,G=480==l||n;b&=-481;var v=null;0==b&&(b=k?1140850689:1677721602);var H=!1,u=!1,y=!1,x=!1;switch(b){case 1275068449:return this.vwr.getAuxiliaryInfoForAtoms(a).get("models");case 1145047050:case 1145047055:case 1145047051:case 1145047053:case 1145045008:case 1145045006:case 1765808134:case 1145047052:H=
!0;break;case 1275203608:u=!0;v=O(-1,[null,null]);break;case 134320141:case 1275069443:break;default:y=JS.T.tokAttr(b,1094713344)&&!JS.T.tokAttr(b,1111490560),x=!y&&JS.T.tokAttr(b,1086324736)}var t=H||!k?new JU.P3:null;if(G||x&&!p&&256!=l&&32!=l)l=1073742327;var w=1073742327==l?new JU.Lst:null,A=null,C=A=null,D=null,z=null,E=null,I=null;switch(b){case 1140850689:case 1677721602:if(this.chk)return a;A=1140850689==b?k?a:this.vwr.ms.getAtoms(1677721602,a):k?JM.BondSet.newBS(this.vwr.getBondsForSelectedAtoms(a),
null):a;switch(l){case 32:g=A.nextSetBit(0);break;case 64:g=A.length()-1;break;case 192:case 128:case 160:return Float.$valueOf(NaN);default:return A}A.clearAll();0<=g&&A.set(g);return A;case 1086324745:switch(l){case 0:case 1073742327:return this.getCmdExt().getBitsetIdent(a,null,f,h,g,G)}return"";case 134320141:A=d[0];C=d[1];D=JU.BS.newN(r);z=JS.SV.newV(10,D);break;case 1111490587:for(d=q.length;0<=--d;)q[d]=NaN;case 1111490574:case 1111490575:this.vwr.autoCalculate(b,f);break;case 1275069443:if(null==
c&&null==e)return new JU.P3;break;case 1765808134:E=new JU.P3;break;case 1715472409:I=this.vwr.getDataObj(d,null,1)}var F=h=d=0,L=0,K=0;switch(l){case 32:h=2147483647;F=3.4028235E38;break;case 64:h=-2147483648,F=-3.4028235E38}var P=this.vwr.ms;f=u?4:H?3:x?2:y?1:0;if(k){E=null!=a;p?(k=g,r=g+1):E?(k=a.nextSetBit(0),r=Math.min(r,a.length())):k=0;this.chk&&(r=0);for(g=k;0<=g&&g<r;g=E?a.nextSetBit(g+1):g+1){d++;var N=P.at[g];switch(f){case 0:k=3.4028235E38;switch(b){case 134320141:D.set(g);k=JS.SV.fValue(this.getUserFunctionResult(A,
C,z));D.clear(g);break;case 1715472409:k=null==I?0:I[g];break;case 1275069443:k=null!=e?JU.Measure.distanceToPlane(e,N):N.distance(c);break;default:k=N.atomPropertyFloat(this.vwr,b,this.ptTemp)}if(3.4028235E38==k||Float.isNaN(k)&&1073742327!=l){d--;continue}switch(l){case 32:k<F&&(F=k);break;case 64:k>F&&(F=k);break;case 256:q[g]=k;break;case 1073742327:w.addLast(Float.$valueOf(k));break;case 160:case 192:K+=k*k;default:L+=k}break;case 1:k=0;switch(b){case 1094717448:case 1094713349:this.errorStr(45,
JS.T.nameOf(b));break;default:k=N.atomPropertyInt(b)}switch(l){case 32:k<h&&(h=k);break;case 64:k>h&&(h=k);break;case 256:q[g]=k;break;case 1073742327:w.addLast(Integer.$valueOf(k));break;case 160:case 192:K+=k*k;default:L+=k}break;case 2:k=N.atomPropertyString(this.vwr,b);switch(l){case 256:q[g]=JU.PT.parseFloat(k);break;default:if(null==w)return k;w.addLast(k)}break;case 3:k=N.atomPropertyTuple(this.vwr,b,this.ptTemp);switch(l){case 256:q[g]=null==t?-1:null==k?0:k.length();break;case 1073742327:w.addLast(null==
k?Integer.$valueOf(-1):JU.P3.newP(k));break;default:null==k?d--:t.add(k)}break;case 4:switch(b){case 1275203608:if(v[0]=Integer.$valueOf(g),v[1]="",this.vwr.shm.getShapePropertyData(21,"info",v),null!=v[1]){if(null==w)return v[1];w.addLast(v[1])}}}if(p)break}}else{k=(c=null==a)?0:a.nextSetBit(0);r=this.vwr.ms.bondCount;for(g=k;0<=g&&g<r;g=c?g+1:a.nextSetBit(g+1))switch(d++,e=P.bo[g],b){case 1140850691:k=e.atom1.distance(e.atom2);switch(l){case 32:k<F&&(F=k);break;case 64:k>F&&(F=k);break;case 1073742327:w.addLast(Float.$valueOf(k));
break;case 160:case 192:K+=k*k;default:L+=k}break;case 1145047050:switch(l){case 1073742327:t.ave(e.atom1,e.atom2);w.addLast(JU.P3.newP(t));break;default:t.add(e.atom1),t.add(e.atom2),d++}break;case 1765808134:JU.CU.colorPtFromInt(this.vwr.gdata.getColorArgbOrGray(e.colix),E);switch(l){case 1073742327:w.addLast(JU.P3.newP(E));break;default:t.add(E)}break;default:this.errorStr(46,JS.T.nameOf(b))}}if(256==l)return q;if(1073742327==l){if(m)return w;a=w.size();if((x||u)&&!G&&1==a)return w.get(0);if(n){q=
M(a,0);for(g=a;0<=--g;)switch(b=w.get(g),f){case 0:q[g]=b.floatValue();break;case 1:q[g]=b.floatValue();break;case 2:q[g]=JU.PT.parseFloat(b);break;case 3:q[g]=null==b?-1:b.length()}return q}if(1086324744==b){q=new JU.SB;for(g=0;g<a;g++)q.append(w.get(g));return q.toString()}q=Array(a);for(g=a;0<=--g;)b=w.get(g),q[g]=s(b,JU.P3)?JU.Escape.eP(b):""+w.get(g);return q}if(H)return 0==d?Integer.$valueOf(-1):JU.P3.new3(t.x/d,t.y/d,t.z/d);if(u)return new java.util.Hashtable;if(0==d||1==d&&192==l)return Float.$valueOf(NaN);
if(y)switch(l){case 32:case 64:return Integer.$valueOf(h);case 160:case 192:break;case 128:return Integer.$valueOf(Q(L));default:return L/d==Q(L/d)?Integer.$valueOf(Q(L/d)):Float.$valueOf(L/d)}switch(l){case 32:case 64:L=F;break;case 128:break;case 160:L=K;break;case 192:L=Math.sqrt((K-L*L/d)/(d-1));break;default:L/=d}return Float.$valueOf(L)},"JU.BS,~N,JU.P3,JU.P4,~O,~O,~B,~N,~B");d(c$,"bitSetForModelFileNumber",function(a){var b=JU.BS.newN(this.vwr.ms.ac);if(this.chk)return b;var c=this.vwr.ms.mc,
e=this.vwr.haveFileSet();1E6>a&&e&&(a*=1E6);if(0==a%1E6){e=this.vwr.ms.getModelNumberIndex(a+1,!1,!1);if(0>e)return b;a=0==a?c:this.vwr.ms.getModelNumberIndex(a+1000001,!1,!1);0>e&&(e=0);0>a&&(a=c);this.vwr.ms.isTrajectory(e)&&(a=e+1);for(c=e;c<a;c++)b.or(this.vwr.getModelUndeletedAtomsBitSet(c))}else c=this.vwr.ms.getModelNumberIndex(a,!1,!0),0<=c&&b.or(this.vwr.getModelUndeletedAtomsBitSet(c));return b},"~N");d(c$,"getStringObjectAsVariable",function(a){if(null==a)return a;if(s(a,String))return 0==
a.length?a:JS.SV.unescapePointOrBitsetAsVariable(a);if(0==a.size())return"";if(a.get(0).asString().contains("|"))return this.vwr.ms.getAtoms(1086324744,JS.SV.newV(7,a).asString());a=JS.SV.unEscapeBitSetArray(a,!0);return null==a?"":a},"~O");d(c$,"getAtomBits",function(a,b){return this.chk?new JU.BS:this.vwr.ms.getAtoms(a,b)},"~N,~O");c$.getSeqCode=d(c$,"getSeqCode",function(a){return 2147483647==a.intValue?a.value.intValue():JM.Group.getSeqcodeFor(a.intValue," ")},"JS.T");d(c$,"setVariable",function(a,
b,c,e){var f=null,d="",f=c.startsWith("property_"),h=c.equals("thrown_value"),d=1073742325==this.tokAt(1)||268435472==this.tokAt(1),g=f?null:0==c.length?new JS.SV:this.getContextVariableAsVariable(c,!1);if(e&&!d)switch(this.tokAt(2)){default:a=2;break;case 268435860:a=3;break;case 1073742195:case 268435520:if(61==this.st[0].intValue){a=2;break}case 1073742336:case 1073742337:c=null}d=0;e=this.parameterExpression(a,b,c,!0,!0,-1,!1,null,null,e&&1==a);d=e.size();0==d&&this.invArg();if(this.chk||0==e.get(0).tok)return null;
b=JS.SV.selectItemVar(JS.SV.newS("").setv(e.get(d-1)));if(1<d){c=2<d?e.get(1):null;g=e.get(0);e=!1;switch(g.tok){case 6:case 14:3<d&&this.invArg();g.mapPut(c.asString(),b);break;case 7:d>2+(null==c?0:1)&&this.invArg();null==c?c=g:g=JS.SV.selectItemVar(g);e=!0;break;case 4:if(2!=c.tok){g.value=JU.PT.rep(g.asString(),c.asString(),b.asString());g.intValue=2147483647;break}case 11:case 12:2147483647==g.intValue?e=!0:g.setSelectedValue(g.intValue,c.asInt(),b);break;case 8:a=g.value=JU.P3.newP(g.value);
f=b.asFloat();switch(JS.T.getTokFromName(c.asString())){case 1111492629:a.x=f;break;case 1111492630:a.y=f;break;case 1111492631:a.z=f}break;case 10:var f=JS.SV.getBitSet(g,!0),h=this.vwr.ms.ac,m=f.cardinality(),d=c.asString(),p=JS.T.getTokFromName(d);switch(p){case 0:if(d.startsWith("property_")){a=7==b.tok?JS.SV.flistValue(b,b.getList().size()==m?m:h):b.asString();this.vwr.setData(d,O(-1,[d,a,JU.BSUtil.copy(f),Integer.$valueOf(-1)]),h,0,0,7==b.tok?2147483647:-2147483648,0);break}this.iToken=a;this.error(56);
break;case 1825200146:case 1287653388:this.vwr.shm.loadShape(5);default:this.setBitsetProperty(f,p,b.asInt(),b.asFloat(),b)}}e&&g.setSelectedValue(c.intValue,2147483647,b);return null}if(!f&&(null==g&&(h||!s(b.value,String)&&!(2==b.tok||s(b.value,Integer)||s(b.value,Float)||s(b.value,Boolean))))&&null!=c)(c.startsWith("_")||null==(g=this.vwr.g.getAndSetNewVariable(c,!0)))&&this.errorStr(22,c);if(null!=g)return g.setv(b);g=JS.SV.oValue(b);if(f)return 7==b.tok&&(g=b.asString()),this.vwr.setData(c,O(-1,
[c,""+g,JU.BSUtil.copy(this.vwr.bsA()),Integer.$valueOf(0)]),this.vwr.ms.ac,0,0,-2147483648,0),null;s(g,Boolean)?this.setBooleanProperty(c,g.booleanValue()):s(g,Integer)?this.setIntProperty(c,g.intValue()):s(g,Float)?this.setFloatProperty(c,g.floatValue()):s(g,String)&&this.setStringProperty(c,g);return b},"~N,~N,~S,~B");d(c$,"setBitsetProperty",function(a,b,c,e,f){if(!(this.chk||0==a.cardinality())){var d=null,h=null,g=null,m,p=null;m=0;var k=JS.T.tokAttr(b,1086324736);if(7==f.tok&&(p=f.getList(),
0==(m=p.size())))return;switch(b){case 1145047050:case 1145047051:case 1145047053:case 1145047055:switch(f.tok){case 8:this.vwr.setAtomCoords(a,b,f.value);break;case 7:this.theToken=f,this.vwr.setAtomCoords(a,b,this.getPointArray(-1,m,!0))}return;case 1765808134:var l=null;b="color";switch(f.tok){case 7:f=K(m,0);for(l=m;0<=--l;)b=p.get(l),m=JS.SV.ptValue(b),null!=m?f[l]=JU.CU.colorPtToFFRGB(m):2==b.tok?f[l]=b.intValue:(f[l]=JU.CU.getArgbFromString(b.asString()),0==f[l]&&(f[l]=b.asInt())),0==f[l]&&
this.errorStr2(50,"ARRAY",b.asString());l=f;b="colorValues";break;case 8:l=Integer.$valueOf(JU.CU.colorPtToFFRGB(f.value));break;case 4:l=f.value;break;default:l=Integer.$valueOf(JS.SV.iValue(f))}this.setAtomProp(b,l,a);return;case 1825200146:case 1287653388:7!=f.tok&&(h=JS.SV.sValue(f));break;case 1086326789:case 1094715402:this.clearDefinedVariableAtomSets(),k=!1}switch(f.tok){case 7:k?d=JS.SV.strListValue(f):g=JS.SV.flistValue(f,m);break;case 4:null==h&&(d=JU.PT.getTokens(JS.SV.sValue(f)))}if(null!=
d){m=d.length;if(!k){g=M(m,0);for(l=m;0<=--l;)g[l]=1086326789==b?JU.Elements.elementNumberFromSymbol(d[l],!1):JU.PT.parseFloat(d[l])}7!=f.tok&&1==m&&(k?h=d[0]:e=g[0],c=I(e),g=d=null)}JS.T.tokAttr(b,2048)||this.error(56);this.vwr.setAtomProperty(a,b,c,e,h,g,d)}},"JU.BS,~N,~N,~N,JS.T");d(c$,"setStatement",function(a,b){this.st=a;this.slen=this.st.length;if(0==this.slen)return!0;var c,e,f;for(e=b;e<this.slen;e++){if(null==this.st[e])return this.slen=e,!0;if(12290==this.st[e].tok)break}if(e==this.slen)return e==
this.slen;switch(this.st[0].tok){case 102436:case 134320141:case 1073741824:if(268435472==this.tokAt(1))return!0}c=Array(this.slen);c[0]=this.st[0];var d=!1,h=b;for(e=b;e<this.slen;e++)if(null!=this.st[e]){switch(f=this.getToken(e).tok){default:c[h]=this.st[e];break;case 1073742325:case 1073742326:d=1073742325==f;c[h]=this.st[e];break;case 12290:++e==this.slen&&this.invArg();var g,m=4==this.theToken.intValue,p=this.paramAsStr(e),k=1073742325==this.tokAt(e),l=1==b&&1==h&&this.st[0]===JS.T.tokenSetCmd;
if(k){e=this.parameterExpressionToken(++e);if(this.chk)g=null;else if(7!=e.tok)g=JS.SV.oValue(e);else if(d)if(f=JS.SV.getBitSet(e,!0),null==f){var n=JS.SV.sValue(e);g=0>n.indexOf("|")?this.getAtomBitSet(n):n}else g=f;else g=e;e=this.iToken}else this.chk?g=new JU.BS:(g=2==this.tokAt(e)?this.vwr.ms.getAtoms(1094715393,Integer.$valueOf(this.st[e].intValue)):12290==this.tokAt(e)&&2==this.tokAt(e+1)?this.vwr.ms.getAtomsFromAtomNumberInFrame(this.st[++e].intValue):this.getParameter(p,0,!0),!d&&!l&&(k=!0));
f=this.tokAt(0);m=(new Boolean(m|(JS.T.tokAttr(f,20480)||134222850==f))).valueOf();if(null==g)c[h]=JS.T.tokenAll;else if(s(g,JS.SV))c[h]=g;else if(s(g,Boolean))c[h]=g.booleanValue()?JS.T.tokenOn:JS.T.tokenOff;else if(s(g,Integer))c[h]=JS.T.tv(2,g.intValue(),g);else if(s(g,Float))c[h]=JS.T.tv(3,JS.ScriptParam.getFloatEncodedInt(""+g),g);else if(s(g,String)){if(!m&&!d){if((36867!=f||1<h&&537022465!=this.st[1].tok&&!"labelfor".equalsIgnoreCase(this.st[1].value.toString()))&&JS.T.tokAttr(f,36864))g=this.getParameter(g,
1073742190,!0);s(g,String)&&(g=this.getStringObjectAsVariable(g))}s(g,JS.SV)?c[h]=g:(f=g,d&&!m?c[h]=0<=f.indexOf("|")||JS.T.tokAttr(c[h-1].tok,268435712)?JS.T.o(4,f):JS.T.o(10,this.getAtomBitSet(f)):(f=l?JS.T.getTokFromName(f):k||m||0==f.length||0<=f.indexOf(".")||0<=f.indexOf(" ")||0<=f.indexOf("=")||0<=f.indexOf(";")||0<=f.indexOf("[")||0<=f.indexOf("{")?4:1073741824,c[h]=JS.T.o(f,g)))}else if(s(g,JU.BArray))c[h]=JS.SV.newV(15,g);else if(s(g,JU.BS))c[h]=JS.SV.newV(10,g);else if(s(g,JU.P3))c[h]=
JS.SV.newV(8,g);else if(s(g,JU.P4))c[h]=JS.SV.newV(9,g);else if(s(g,JU.M34))c[h]=JS.SV.newV(s(g,JU.M4)?12:11,g);else if(s(g,java.util.Map)||s(g,JS.ScriptContext)&&null!=(g=g.getFullMap()))c[h]=JS.SV.newV(6,d?g:JS.SV.deepCopy(g,!0,!0));else if(s(g,JU.Lst)){if(!d){c[h]=JS.SV.newV(7,JS.SV.deepCopy(g,!1,!0));break}n=g;f=null;for(m=0;m<n.size();m++){k=n.get(m);if(10!=k.tok){f=null;break}null==f&&(f=new JU.BS);f.or(k.value)}c[h]=null==f?JS.SV.getVariable(g):JS.T.o(10,f)}else g=this.getObjectCenter(p,-2147483648,
-2147483648),null==g&&this.invArg(),c[h]=JS.T.o(8,g);l&&!JS.T.tokAttr(c[h].tok,536870912)&&this.invArg()}h++}this.st=c;for(e=h;e<this.st.length;e++)this.st[e]=null;this.slen=h;return!0},"~A,~N")});F("JS");P(null,"JS.ScriptFlowContext",["JS.ScriptCompiler"],function(){c$=R(function(){this.token=this.compiler=null;this.ptDefault=this.pt0=0;this.parent=this.$var=this.$function=null;this.ptCommand=this.ptLine=this.commandStart=this.lineStart=0;this.forceEndIf=!0;this.ident=null;this.line0=this.ichCommand=
this.tok0=this.addLine=0;N(this,arguments)},JS,"ScriptFlowContext");S(c$,function(a,b,c,e,f,d){this.compiler=a;this.token=b;this.tok0=b.tok;this.ident=b.value;this.pt0=c;this.line0=d;this.parent=e;this.ichCommand=f;this.lineStart=this.ptLine=this.compiler.lineCurrent;this.commandStart=this.ptCommand=this.compiler.iCommand},"JS.ScriptCompiler,JS.ContextToken,~N,JS.ScriptFlowContext,~N,~N");d(c$,"getBreakableContext",function(a){for(var b=this;null!=b&&(!JS.ScriptCompiler.isBreakableContext(b.token.tok)||
0<a--);)b=b.parent;return b},"~N");d(c$,"checkForceEndIf",function(a){this.ptCommand==this.compiler.iCommand&&0<this.addLine&&this.addLine++;if(a=this.forceEndIf&&this.ptCommand<this.compiler.iCommand&&this.ptLine+(0==this.addLine?0:this.addLine+a)==this.compiler.lineCurrent)this.forceEndIf=!1;return a},"~N");d(c$,"setPt0",function(a,b){this.pt0=a;b&&(this.ptDefault=a);this.setLine();return a},"~N,~B");d(c$,"setLine",function(){this.ptLine=this.compiler.lineCurrent;this.ptCommand=this.compiler.iCommand+
1});q(c$,"toString",function(){return"ident "+this.ident+" line "+this.lineStart+" command "+this.commandStart});d(c$,"path",function(){for(var a="",b=this;null!=b;)a=b.ident+"-"+a,b=b.parent;return"["+a+"]"});d(c$,"setFunction",function(a){this.$function=a},"JS.ScriptFunction")});F("JS");P(["J.api.JmolScriptFunction","java.util.Hashtable","JU.Lst"],"JS.ScriptFunction",["JU.AU","$.SB","JS.SV","$.T"],function(){c$=R(function(){this.chpt0=this.pt0=0;this.cmdpt0=-1;this.name=this.typeName=null;this.nParameters=
0;this.names=null;this.tok=0;this.script=this.lineNumbers=this.lineIndices=this.aatoken=this.returnValue=this.variables=null;N(this,arguments)},JS,"ScriptFunction",null,J.api.JmolScriptFunction);U(c$,function(){this.names=new JU.Lst;this.variables=new java.util.Hashtable});d(c$,"isVariable",function(a){return this.variables.containsKey(a)},"~S");S(c$,function(){});S(c$,function(a,b){this.set(a,b);this.typeName=JS.T.nameOf(b)},"~S,~N");d(c$,"set",function(a,b){this.name=a;this.tok=b},"~S,~N");d(c$,
"setVariables",function(a,b){for(var c=null==b?0:b.size(),e=this.names.size();0<=--e;){var f=this.names.get(e).toLowerCase(),d=e<this.nParameters&&e<c?b.get(e):null;null!=d&&7!=d.tok&&(d=JS.SV.newT(d));a.put(f,null==d?JS.SV.newS("").setName(f):d)}364558!=this.tok&&(a.put("_argcount",JS.SV.newI(null==b?0:b.size())),a.put("_arguments",null==b?JS.SV.getVariableAI(K(-1,[])):JS.SV.getVariableList(b)));a.put("_retval",JS.SV.newI(364558==this.tok?2147483647:0))},"java.util.Map,JU.Lst");d(c$,"unsetVariables",
function(a,b){var c=null==b?0:b.size(),e=this.names.size();if(!(0==c||0==e))for(var f=0;f<e&&f<c;f++){var d=b.get(f);if(7==d.tok){var h=a.get(this.names.get(f).toLowerCase());7==h.tok&&(d.value=h.value)}}},"java.util.Map,JU.Lst");d(c$,"addVariable",function(a,b){this.variables.put(a,a);this.names.addLast(a);b&&this.nParameters++},"~S,~B");c$.setFunction=d(c$,"setFunction",function(a,b,c,e,f,d,h){var g=a.cmdpt0,m=a.chpt0,p=e-g;a.setScript(b.substring(m,c));b=a.aatoken=Array(p);a.lineIndices=JU.AU.newInt2(p);
a.lineNumbers=X(p,0);c=f[g]-1;for(var k=0;k<p;k++)if(a.lineNumbers[k]=f[g+k]-c,a.lineIndices[k]=K(-1,[d[g+k][0]-m,d[g+k][1]-m]),b[k]=h.get(g+k),0<b[k].length){var l=b[k][0];JS.T.tokAttr(l.tok,102400)&&(l.intValue-=0>l.intValue?-g:g)}for(k=e;--k>=g;)h.removeItemAt(k),d[k][0]=d[k][1]=0},"JS.ScriptFunction,~S,~N,~N,~A,~A,JU.Lst");d(c$,"setScript",function(a){this.script=a;null!=this.script&&(""!==this.script&&!this.script.endsWith("\n"))&&(this.script+="\n")},"~S");q(c$,"toString",function(){var a=(new JU.SB).append("/*\n * ").append(this.name).append("\n */\n").append(this.getSignature()).append(" {\n");
null!=this.script&&a.append(this.script);a.append("}\n");return a.toString()});q(c$,"getSignature",function(){if(null==this.typeName)return JS.T.nameOf(this.tok);for(var a=(new JU.SB).append(this.typeName).append(" ").append(this.name).append("("),b=0;b<this.nParameters;b++)0<b&&a.append(", "),a.append(this.names.get(b));a.append(")");return a.toString()});q(c$,"geTokens",function(){return this.aatoken});q(c$,"getName",function(){return this.name});q(c$,"getTok",function(){return this.tok})});F("JS");
P(["JS.ScriptException"],"JS.ScriptInterruption",null,function(){c$=Z(JS,"ScriptInterruption",JS.ScriptException);S(c$,function(a,b,c){W(this,JS.ScriptInterruption,[a,b,"!",-2147483648==c||a.vwr.autoExit]);b.equals("delay")&&a.delayScript(c)},"JS.ScriptEval,~S,~N")});F("JS");P(["J.api.JmolScriptManager","JU.Lst"],"JS.ScriptManager","java.io.BufferedInputStream $.BufferedReader java.lang.Boolean $.Thread javajs.api.ZInputStream JU.AU $.BS $.PT $.Rdr $.SB J.api.Interface JS.ScriptQueueThread JU.Elements $.Logger JV.FileManager".split(" "),
function(){c$=R(function(){this.scriptQueue=this.commandWatcherThread=this.scriptQueueRunning=this.queueThreads=this.evalTemp=this.eval=this.vwr=null;this.useCommandWatcherThread=!1;this.scriptIndex=0;this.$isScriptQueued=!0;N(this,arguments)},JS,"ScriptManager",null,J.api.JmolScriptManager);U(c$,function(){this.queueThreads=Array(2);this.scriptQueueRunning=$(2,!1);this.scriptQueue=new JU.Lst});q(c$,"getScriptQueue",function(){return this.scriptQueue});q(c$,"isScriptQueued",function(){return this.$isScriptQueued});
S(c$,function(){});q(c$,"setViewer",function(a){this.vwr=a;this.eval=this.newScriptEvaluator();this.eval.setCompiler();return this.eval},"JV.Viewer");d(c$,"newScriptEvaluator",function(){return J.api.Interface.getInterface("JS.ScriptEval",this.vwr,"setOptions").setViewer(this.vwr)});q(c$,"clear",function(a){a?(this.startCommandWatcher(!1),this.interruptQueueThreads()):this.evalTemp=null},"~B");q(c$,"addScript",function(a,b){return this.addScr("String",a,"",b)},"~S,~B");d(c$,"addScr",function(a,b,
c,e){this.useCommandWatcherThread=!1;this.vwr.g.useScriptQueue||(this.clearQueue(),this.vwr.haltScriptExecution());null==this.commandWatcherThread&&this.useCommandWatcherThread&&this.startCommandWatcher(!0);if(null!=this.commandWatcherThread&&0<=b.indexOf("/*SPLIT*/")){b=JU.PT.split(b,"/*SPLIT*/");for(var f=0;f<b.length;f++)this.addScr(a,b[f],c,e);return"split into "+b.length+" sections for processing"}var f=null!=this.commandWatcherThread&&(0>b.indexOf("javascript")||0<=b.indexOf("#javascript ")),
d=new JU.Lst;d.addLast(b);d.addLast(c);d.addLast(a);d.addLast(e?Boolean.TRUE:Boolean.FALSE);d.addLast(Integer.$valueOf(f?-1:1));this.scriptQueue.addLast(d);this.startScriptQueue(!1);return"pending"},"~S,~S,~S,~B");q(c$,"clearQueue",function(){this.scriptQueue.clear()});q(c$,"waitForQueue",function(){if(!this.vwr.isSingleThreaded)for(var a=0;this.isQueueProcessing();)try{Thread.sleep(100),0==a++%10&&JU.Logger.debugging&&JU.Logger.debug("...scriptManager waiting for queue: "+this.scriptQueue.size()+
" thread="+Thread.currentThread().getName())}catch(b){if(!E(b,InterruptedException))throw b;}});q(c$,"isQueueProcessing",function(){return null!=this.queueThreads[0]||null!=this.queueThreads[1]});d(c$,"flushQueue",function(a){for(var b=this.scriptQueue.size();0<=--b;){var c=this.scriptQueue.get(b).get(0);0==c.indexOf(a)&&(this.scriptQueue.removeItemAt(b),JU.Logger.debugging&&JU.Logger.debug(this.scriptQueue.size()+" scripts; removed: "+c))}},"~S");d(c$,"startScriptQueue",function(a){var b=a?1:0;this.scriptQueueRunning[b]||
(this.scriptQueueRunning[b]=!0,this.queueThreads[b]=new JS.ScriptQueueThread(this,this.vwr,a,b),this.queueThreads[b].start())},"~B");q(c$,"getScriptItem",function(a,b){if(this.vwr.isSingleThreaded&&this.vwr.queueOnHold)return null;var c=this.scriptQueue.get(0),e=c.get(4).intValue();return(a?0>e:b?0==e:1==e)?c:null},"~B,~B");q(c$,"startCommandWatcher",function(a){if(this.useCommandWatcherThread=a){if(null!=this.commandWatcherThread)return;this.commandWatcherThread=J.api.Interface.getInterface("JS.CommandWatcherThread",
this.vwr,"setOptions");this.commandWatcherThread.setManager(this,this.vwr,null);this.commandWatcherThread.start()}else{if(null==this.commandWatcherThread)return;this.clearCommandWatcherThread()}JU.Logger.debugging&&JU.Logger.debug("command watcher "+(a?"started":"stopped")+this.commandWatcherThread)},"~B");d(c$,"interruptQueueThreads",function(){for(var a=0;a<this.queueThreads.length;a++)null!=this.queueThreads[a]&&this.queueThreads[a].interrupt()});d(c$,"clearCommandWatcherThread",function(){null!=
this.commandWatcherThread&&(this.commandWatcherThread.interrupt(),this.commandWatcherThread=null)});q(c$,"queueThreadFinished",function(a){this.queueThreads[a].interrupt();this.scriptQueueRunning[a]=!1;this.queueThreads[a]=null;this.vwr.setSyncDriver(4);this.vwr.queueOnHold=!1},"~N");d(c$,"runScriptNow",function(){if(0<this.scriptQueue.size()){var a=this.getScriptItem(!0,!0);null!=a&&(a.set(4,Integer.$valueOf(0)),this.startScriptQueue(!0))}});q(c$,"evalFile",function(a){var b=a.indexOf(" -noqueue");
return 0<=b?this.evalStringWaitStatusQueued("String","script "+JU.PT.esc(a.substring(0,b)),"",!1,!1):this.addScript("script "+JU.PT.esc(a),!1)},"~S");q(c$,"evalStringWaitStatusQueued",function(a,b,c,e,f){if(null==b)return null;var d=this.checkScriptExecution(b,!1);if(null!=d)return d;var h=null==c||c.equals("output")?new JU.SB:null,d=this.vwr.sm.statusList;this.vwr.getStatusChanged(c);this.vwr.isSyntaxCheck&&JU.Logger.info("--checking script:\n"+this.eval.getScript()+"\n----\n");var g=0==b.indexOf(")");
g&&(b=b.substring(1));g=g||!f;this.vwr.setErrorMessage(null,null);var m=f?this.eval:this.newScriptEvaluator(),p=m.compileScriptString(b,e),k=m.getErrorMessage(),l=m.getErrorMessageUntranslated();this.vwr.setErrorMessage(k,l);this.vwr.refresh(7,"script complete");p?(this.$isScriptQueued=f,e||this.vwr.setScriptStatus(null,b,-2-++this.scriptIndex,null),m.evaluateCompiledScript(this.vwr.isSyntaxCheck,this.vwr.isSyntaxAndFileCheck,g,this.vwr.listCommands,h,f||!this.vwr.isSingleThreaded)):(this.vwr.scriptStatus(k),
this.vwr.setScriptStatus("Jmol script terminated",k,1,l),m.isStateScript()&&JS.ScriptManager.setStateScriptVersion(this.vwr,null));null!=k&&this.vwr.autoExit&&this.vwr.exitJmol();this.vwr.isSyntaxCheck&&(null==k?JU.Logger.info("--script check ok"):JU.Logger.error("--script check error\n"+l),JU.Logger.info("(use 'exit' to stop checking)"));this.$isScriptQueued=!0;if(a.equalsIgnoreCase("String"))return l;if(null!=h)return null==l?h.toString():l;a=this.vwr.getProperty(a,"jmolStatus",c);this.vwr.getStatusChanged(d);
return a},"~S,~S,~S,~B,~B");d(c$,"checkScriptExecution",function(a,b){var c=a;0<=c.indexOf("\u0001##")&&(c=c.substring(0,c.indexOf("\u0001##")));return this.checkResume(c)?"script processing resumed":this.checkStepping(c)?"script processing stepped":this.checkHalt(c,b)?"script execution halted":null},"~S,~B");d(c$,"checkResume",function(a){return a.equalsIgnoreCase("resume")?(this.vwr.setScriptStatus("","execution resumed",0,null),this.eval.resumePausedExecution(),!0):!1},"~S");d(c$,"checkStepping",
function(a){return a.equalsIgnoreCase("step")?(this.eval.stepPausedExecution(),!0):a.equalsIgnoreCase("?")?(this.vwr.scriptStatus(this.eval.getNextStatement()),!0):!1},"~S");q(c$,"evalStringQuietSync",function(a,b,c){c&&(this.vwr.sm.syncingScripts&&0>a.indexOf("#NOSYNC;"))&&this.vwr.syncScript(a+" #NOSYNC;",null,0);this.eval.isPaused()&&"!"!=a.charAt(0)&&(a="!"+JU.PT.trim(a,"\n\r\t "));(c=0<a.length&&"!"==a.charAt(0))&&(a=a.substring(1));var e=this.checkScriptExecution(a,c);if(null!=e)return e;if(this.vwr.isScriptExecuting()&&
(c||this.eval.isPaused()))return this.vwr.setInsertedCommand(a),0==a.indexOf("moveto ")&&this.flushQueue("moveto "),"!"+a;this.vwr.setInsertedCommand("");b&&(a+="\u0001## EDITOR_IGNORE ##");return this.addScript(a,b&&!this.vwr.getBoolean(603979880))},"~S,~B,~B");q(c$,"checkHalt",function(a,b){if(a.equalsIgnoreCase("pause"))return this.vwr.pauseScriptExecution(),this.vwr.scriptEditorVisible&&this.vwr.setScriptStatus("","paused -- type RESUME to continue",0,null),!0;if(a.equalsIgnoreCase("menu"))return this.vwr.getProperty("DATA_API",
"getPopupMenu","\x00"),!0;a=a.toLowerCase();var c=!1,e=null;a.startsWith("exit")?(this.vwr.haltScriptExecution(),this.vwr.clearScriptQueue(),this.vwr.clearTimeouts(),c=a.equals(e="exit")):a.startsWith("quit")&&(this.vwr.haltScriptExecution(),c=a.equals(e="quit"));if(null==e)return!1;b&&(this.vwr.clearThreads(),this.vwr.queueOnHold=!1);(b||this.vwr.g.waitForMoveTo)&&this.vwr.tm.stopMotion();JU.Logger.info(this.vwr.isSyntaxCheck?e+" -- stops script checking":(b?"!":"")+e+" received");this.vwr.isSyntaxCheck=
!1;return c},"~S,~B");q(c$,"getAtomBitSetEval",function(a,b){null==a&&(a=this.evalTemp,null==a&&(a=this.evalTemp=this.newScriptEvaluator()));return this.vwr.slm.excludeAtoms(a.getAtomBitSet(b),!1)},"J.api.JmolScriptEvaluator,~O");q(c$,"scriptCheckRet",function(a,b){if(0==a.indexOf(")")||0==a.indexOf("!"))a=a.substring(1);var c=this.newScriptEvaluator().checkScriptSilent(a);return b||null==c.errorMessage?c:c.errorMessage},"~S,~B");q(c$,"openFileAsync",function(a,b){var c=2==(b&2),e=4==(b&4),d=1==(b&
1)&&!e,j=null;a=a.trim();a.startsWith("\t")&&(c=!0,a=a.substring(1));a=a.$replace("\\","/");var h=a.startsWith("cache://");this.vwr.isApplet&&0>a.indexOf("://")&&(a="file://"+(a.startsWith("/")?"":"/")+a);try{if(a.endsWith(".pse"))j=(h?"":"zap;")+"load SYNC "+JU.PT.esc(a)+(this.vwr.isApplet?"":" filter 'DORESIZE'");else{if(a.endsWith("jvxl"))j="isosurface ";else if(!a.toLowerCase().endsWith(".spt")){var g=this.getDragDropFileTypeName(a);if(null==g){g=JV.FileManager.determineSurfaceTypeIs(this.vwr.getBufferedInputStream(a));
null!=g&&(j="if (_filetype == 'Pdb') { isosurface sigma 1.0 within 2.0 {*} "+JU.PT.esc(a)+" mesh nofill }; else; { isosurface "+JU.PT.esc(a)+"}");return}if(g.equals("dssr"))j="model {visible} property dssr ";else if(g.equals("Jmol"))j="script ";else if(g.equals("Cube"))j="isosurface sign red blue ";else if(!g.equals("spt")){j=this.vwr.g.defaultDropScript;j=JU.PT.rep(j,"%FILE",a);j=JU.PT.rep(j,"%ALLOWCARTOONS",""+d);if(j.toLowerCase().startsWith("zap")&&(h||e))j=j.substring(3);e&&(j=JU.PT.rep(j,"load SYNC",
"load append"));return}}null==j&&!c&&this.vwr.scriptEditorVisible?this.vwr.showEditor(O(-1,[a,this.vwr.getFileAsString3(a,!0,null)])):j=(null==j?"script ":j)+JU.PT.esc(a)}}finally{null!=j&&this.vwr.evalString(j)}},"~S,~N");d(c$,"getDragDropFileTypeName",function(a){var b=a.indexOf("::");if(0<=b)return a.substring(0,b);if(a.startsWith("="))return"pdb";if(a.endsWith(".dssr"))return"dssr";b=this.vwr.fm.getUnzippedReaderOrStreamFromName(a,null,!0,!1,!0,!0,null);return s(b,javajs.api.ZInputStream)?(a=
this.getZipDirectoryAsString(a),0<=a.indexOf("JmolManifest")?"Jmol":this.vwr.getModelAdapter().getFileTypeName(JU.Rdr.getBR(a))):s(b,java.io.BufferedReader)||s(b,java.io.BufferedInputStream)?this.vwr.getModelAdapter().getFileTypeName(b):JU.AU.isAS(b)?b[0]:null},"~S");d(c$,"getZipDirectoryAsString",function(a){a=this.vwr.fm.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1,!0);return this.vwr.getJzt().getZipDirectoryAsStringAndClose(a)},"~S");c$.setStateScriptVersion=d(c$,"setStateScriptVersion",
function(a,b){if(null!=b){JS.ScriptManager.prevCovalentVersion=JU.Elements.bondingVersion;var c=JU.PT.getTokens(b.$replace("."," ").$replace("_"," "));try{var e=JU.PT.parseInt(c[0]),d=JU.PT.parseInt(c[1]),j=JU.PT.parseInt(c[2]);-2147483648==j&&(j=0);if(-2147483648!=e&&-2147483648!=d){var h=a.stateScriptVersionInt=1E4*e+100*d+j;a.setBooleanProperty("legacyautobonding",110924>h);a.g.legacyHAddition=130117>h;a.setBooleanProperty("legacyjavafloat",140206>h||140300<=h&&140306>h);a.setIntProperty("bondingVersion",
140111>h?0:1);return}}catch(g){if(!E(g,Exception))throw g;}}a.setIntProperty("bondingVersion",JS.ScriptManager.prevCovalentVersion);a.setBooleanProperty("legacyautobonding",!1);a.g.legacyHAddition=!1;a.stateScriptVersionInt=2147483647},"JV.Viewer,~S");q(c$,"addHydrogensInline",function(a,b,c){var e=this.vwr.ms.at[a.nextSetBit(0)].mi;if(e!=this.vwr.ms.mc-1)return new JU.BS;a=this.vwr.getModelUndeletedAtomsBitSet(e);this.vwr.g.appendNew=!1;for(var d=this.vwr.ms.ac,j=this.vwr.ms.getAtomCountInModel(e),
h=new JU.SB,g=0;g<b.size();g++){var m=b.get(g);h.append(";  connect 0 100 ").append("({"+d++ +"}) ").append("({"+m.i+"}) group;")}b=new JU.SB;b.appendI(c.length).append("\n").append("Viewer.AddHydrogens").append("#noautobond").append("\n");for(g=0;g<c.length;g++)b.append("H ").appendF(c[g].x).append(" ").appendF(c[g].y).append(" ").appendF(c[g].z).append(" - - - - ").appendI(++j).appendC("\n");this.vwr.openStringInlineParamsAppend(b.toString(),null,!0);this.eval.runScriptBuffer(h.toString(),null,
!1);c=this.vwr.getModelUndeletedAtomsBitSet(e);c.andNot(a);return c},"JU.BS,JU.Lst,~A");T(c$,"prevCovalentVersion",1)});F("JS");P(null,"JS.ScriptMathProcessor","java.lang.Float java.util.Hashtable JU.A4 $.AU $.BS $.CU $.DF $.Lst $.M3 $.M4 $.P3 $.P4 $.PT $.Quat $.V3 JM.BondSet JS.SV $.T JU.BSUtil $.Escape $.Logger".split(" "),function(){c$=R(function(){this.asBitSet=this.wasX=!1;this.oPt=-1;this.debugHigh=this.wasSyntaxCheck=this.chk=!1;this.ifStack=this.xStack=this.oStack=this.vwr=this.eval=null;
this.xPt=this.ifPt=-1;this.braceCount=this.squareCount=this.parenCount=0;this.haveSpaceBeforeSquare=this.asVector=this.isArrayItem=!1;this.ptid=this.equalCount=0;this.pto=this.ptx=2147483647;this.isSpecialAssignment=!1;this.doSelections=!0;this.skipping=this.isAssignment=this.allowUnderflow=this.assignLeft=!1;this.lastAssignedString=null;N(this,arguments)},JS,"ScriptMathProcessor");U(c$,function(){this.oStack=Array(8);this.xStack=Array(8);this.ifStack=aa(8,"\x00")});S(c$,function(a,b,c,e,d,j,h){this.eval=
a;this.isAssignment=(this.isSpecialAssignment=this.assignLeft=b)||null!=h;this.vwr=a.vwr;this.debugHigh=a.debugHigh;this.chk=this.wasSyntaxCheck=a.chk;this.isArrayItem=c;this.asVector=e||c;this.asBitSet=d;this.allowUnderflow=j;this.wasX=c;this.debugHigh&&JU.Logger.debug("initialize RPN")},"JS.ScriptExpr,~B,~B,~B,~B,~B,~S");d(c$,"endAssignment",function(){return this.doSelections=this.assignLeft=!1});d(c$,"getResult",function(){for(var a=!0;a&&0<=this.oPt&&null!=this.oStack[this.oPt];)a=this.operate();
if(a){if(this.asVector){this.isAssignment&&(0<this.xPt&&0>this.oPt||0<=this.oPt&&null!=this.oStack[this.oPt])&&this.eval.invArg();for(var a=new JU.Lst,b=0;b<=this.xPt;b++)a.addLast(this.isSpecialAssignment?this.xStack[b]:JS.SV.selectItemVar(this.xStack[b]));null!=this.lastAssignedString&&(a.removeItemAt(0),a.add(0,this.lastAssignedString),this.lastAssignedString.intValue=this.xStack[0].intValue);return JS.SV.newV(135198,a)}if(0==this.xPt){a=this.xStack[0];if(this.chk)return this.asBitSet?JS.SV.newV(10,
new JU.BS):a;if(10==a.tok||7==a.tok||15==a.tok||4==a.tok||11==a.tok||12==a.tok)a=JS.SV.selectItemVar(a);this.asBitSet&&7==a.tok&&(a=JS.SV.newV(10,JS.SV.unEscapeBitSetArray(a.value,!1)));return a}}!this.allowUnderflow&&(0<=this.xPt||0<=this.oPt)&&this.eval.invArg();return null});d(c$,"putX",function(a){if(!this.skipping){if(this.wasX)try{this.addOp(JS.T.tokenComma)}catch(b){if(!E(b,JS.ScriptException))throw b;}++this.xPt==this.xStack.length&&(this.xStack=JU.AU.doubleLength(this.xStack));0>this.xPt&&
System.out.println("testing scriptemaafe");this.xStack[this.xPt]=a;this.ptx=++this.ptid;this.debugHigh&&JU.Logger.debug("\nputx= "+a+" ptx="+this.ptid)}},"JS.SV");d(c$,"putOp",function(a){++this.oPt>=this.oStack.length&&(this.oStack=JU.AU.doubleLength(this.oStack));this.oStack[this.oPt]=a;this.pto=++this.ptid;this.debugHigh&&JU.Logger.debug("\nputop="+a+" pto="+this.ptid)},"JS.T");d(c$,"putIf",function(a){++this.ifPt>=this.ifStack.length&&(this.ifStack=JU.AU.doubleLength(this.ifStack));this.ifStack[this.ifPt]=
a},"~S");d(c$,"addXCopy",function(a){switch(a.tok){case 2:a=JS.SV.newI(a.intValue);break;case 3:a=JS.SV.newV(3,a.value)}return this.addX(a)},"JS.SV");d(c$,"addX",function(a){this.putX(a);return this.wasX=!0},"JS.SV");d(c$,"addXObj",function(a){a=JS.SV.getVariable(a);if(null==a)return!1;this.putX(a);return this.wasX=!0},"~O");d(c$,"addXStr",function(a){this.putX(JS.SV.newS(a));return this.wasX=!0},"~S");d(c$,"addXBool",function(a){this.putX(JS.SV.getBoolean(a));return this.wasX=!0},"~B");d(c$,"addXInt",
function(a){this.putX(JS.SV.newI(a));return this.wasX=!0},"~N");d(c$,"addXList",function(a){this.putX(JS.SV.getVariableList(a));return this.wasX=!0},"JU.Lst");d(c$,"addXMap",function(a){this.putX(JS.SV.getVariableMap(a));return this.wasX=!0},"java.util.Map");d(c$,"addXM3",function(a){this.putX(JS.SV.newV(11,a));return this.wasX=!0},"JU.M3");d(c$,"addXM4",function(a){this.putX(JS.SV.newV(12,a));return this.wasX=!0},"JU.M4");d(c$,"addXFloat",function(a){if(Float.isNaN(a))return this.addXStr("NaN");
this.putX(JS.SV.newF(a));return this.wasX=!0},"~N");d(c$,"addXBs",function(a){this.putX(JS.SV.newV(10,a));return this.wasX=!0},"JU.BS");d(c$,"addXPt",function(a){this.putX(JS.SV.newV(8,a));return this.wasX=!0},"JU.P3");d(c$,"addXPt4",function(a){this.putX(JS.SV.newV(9,a));return this.wasX=!0},"JU.P4");d(c$,"addXNum",function(a){if(!s(a,JS.SV))switch(a.tok){case 3:if(this.wasX){var b=a.value.floatValue();if(0>b||0==b&&-Infinity==1/b){this.addOp(JS.T.tokenMinus);a=JS.SV.newF(-b);break}}a=JS.SV.newV(3,
a.value);break;default:a=a.intValue,this.wasX&&0>a&&(this.addOp(JS.T.tokenMinus),a=-a),a=JS.SV.newI(a)}this.putX(a);return this.wasX=!0},"JS.T");d(c$,"addXAV",function(a){this.putX(JS.SV.getVariableAV(a));return this.wasX=!0},"~A");d(c$,"addXAD",function(a){this.putX(JS.SV.getVariableAD(a));return this.wasX=!0},"~A");d(c$,"addXAS",function(a){this.putX(JS.SV.getVariableAS(a));return this.wasX=!0},"~A");d(c$,"addXAI",function(a){this.putX(JS.SV.getVariableAI(a));return this.wasX=!0},"~A");d(c$,"addXAII",
function(a){this.putX(JS.SV.getVariableAII(a));return this.wasX=!0},"~A");d(c$,"addXAF",function(a){this.putX(JS.SV.getVariableAF(a));return this.wasX=!0},"~A");d(c$,"addXAFF",function(a){this.putX(JS.SV.getVariableAFF(a));return this.wasX=!0},"~A");c$.isOpFunc=d(c$,"isOpFunc",function(a){return null!=a&&(JS.T.tokAttr(a.tok,134217728)&&a!==JS.T.tokenArraySquare||268435665==a.tok&&JS.T.tokAttr(a.intValue,134217728))},"JS.T");d(c$,"addOp",function(a){return this.addOpAllowMath(a,!0,0)},"JS.T");d(c$,
"addOpAllowMath",function(a,b,c){this.debugHigh&&this.dumpStacks("adding "+a+" wasx="+this.wasX);var e=0<=this.oPt&&null!=this.oStack[this.oPt]?this.oStack[this.oPt].tok:0;if(this.skipping=0<=this.ifPt&&("F"==this.ifStack[this.ifPt]||"X"==this.ifStack[this.ifPt]))return this.checkSkip(a,e);var d=268435665==a.tok;if(d&&!this.wasX)return!1;var j=b&&JS.ScriptMathProcessor.isOpFunc(a);1<=this.oPt&&(268435472!=a.tok&&134217750==e)&&(e=this.oStack[--this.oPt].tok);var h=null,g=!1;switch(a.tok){case 1073742195:return this.haveSpaceBeforeSquare=
!0;case 268435504:if(!this.wasX)return!1;break;case 268435649:case 268435650:if(this.wasX&&-1==a.intValue&&this.addOp(JS.T.tokenComma))return this.addOp(a);break;case 268435521:break;case 268435473:if(!this.wasX&&1<=this.oPt&&268435472==e&&!JS.ScriptMathProcessor.isOpFunc(this.oStack[this.oPt-1]))return!1;break;case 268435616:this.wasX||(a=JS.SV.newV(268435648,"-"));break;case 32:case 64:case 96:case 128:case 160:case 192:case 480:e=0>this.oPt?0:e;if(!this.wasX||!(268435665==e||1677721602==e||1140850689==
e))return!1;this.oStack[this.oPt].intValue|=a.tok;return!0;case 268435520:g=!0;if(!this.wasX||this.haveSpaceBeforeSquare)this.squareCount++,a=h=JS.T.tokenArraySquare,this.haveSpaceBeforeSquare=!1;break;case 268435568:case 268435472:g=!0;default:if(j){j=1<=this.oPt&&268435472==e;if(d){if(268435472==c&&6==this.xStack[this.xPt].tok)return!1}else if(this.wasX&&!j)return!1;h=a;g=!0;break}if(this.wasX==g&&268435665!=e){if(!this.wasX||!b)return!1;if(this.addOp(JS.T.tokenComma))return this.addOp(a)}}for(;0<=
this.oPt&&268435490!=e&&(268435649!=a.tok&&268435650!=a.tok||this.wasX)&&(!g||268435665==e&&(268435665==a.tok||268435520==a.tok))&&JS.T.getPrecedence(e)>=JS.T.getPrecedence(a.tok)&&(268435648!=e||268435648!=a.tok);){if(268435473==a.tok&&268435472==e){0<=this.xPt&&(this.xStack[this.xPt]=JS.SV.selectItemVar(this.xStack[this.xPt]));this.wasX=!0;break}if(268435521==a.tok&&1275068418==e)break;if(268435521==a.tok&&268435520==e){if(this.isArrayItem&&1==this.squareCount&&0==this.equalCount){this.wasX=!1;
this.addX(JS.SV.newT(JS.T.tokenArrayOpen));break}if(!this.doSelection())return!1;this.wasX=!0;break}if(!this.operate())return!1;e=0<=this.oPt&&null!=this.oStack[this.oPt]?this.oStack[this.oPt].tok:0}null!=h&&(this.wasX=!1,this.addX(JS.SV.newV(268435860,h)));switch(a.tok){case 268435472:this.parenCount++;this.wasX=!1;break;case 805306401:return a=this.getX().asBoolean(),268435490==e?this.ifPt--:this.putOp(JS.T.tokenColon),this.putIf(a?"T":"F"),this.skipping=!a,this.wasX=!1,!0;case 268435490:if(268435490!=
e||0>this.ifPt)return!1;this.ifStack[this.ifPt]="X";this.wasX=!1;return this.skipping=!0;case 268435473:this.wasX=!0;if(0>=this.parenCount--)return!1;268435490==e&&(this.ifPt--,this.oPt--);this.oPt--;if(0>this.oPt)return!0;if(JS.ScriptMathProcessor.isOpFunc(this.oStack[this.oPt])&&(this.wasX=!1,!this.evaluateFunction(0)))return!1;this.skipping=0<=this.ifPt&&"X"==this.ifStack[this.ifPt];return!0;case 268435504:return this.wasX=!1,!0;case 268435520:this.squareCount++;this.wasX=!1;break;case 268435521:this.wasX=
!0;if(0>=this.squareCount--||0>this.oPt||!this.doSelections)return!this.doSelections;if(1275068418==this.oStack[this.oPt].tok)return this.evaluateFunction(268435520);this.oPt--;return!0;case 268435665:this.wasX=!b||!JS.T.tokAttr(a.intValue,134217728);break;case 1073742332:this.braceCount++;this.wasX=!1;break;case 1073742338:if(0>=this.braceCount--)return!1;this.wasX=!1;break;case 268435552:case 268435536:if(!this.wasSyntaxCheck&&0>this.xPt)return!1;!this.wasSyntaxCheck&&(10!=this.xStack[this.xPt].tok&&
7!=this.xStack[this.xPt].tok)&&(e=this.getX().asBoolean(),this.addX(JS.SV.getBoolean(e)),e==(268435536==a.tok)&&(this.chk=!0,a=268435536==a.tok?JS.T.tokenOrTRUE:JS.T.tokenAndFALSE));this.wasX=!1;break;case 268435650:case 268435649:break;case 268435860:0==this.squareCount&&(this.doSelections=!0,this.assignLeft=!1,this.equalCount++);this.wasX=!1;break;default:this.wasX=!1}this.putOp(a);switch(a.tok){case 268435665:return 134320141==(a.intValue&-481)&&134320141!=a.intValue?this.evaluateFunction(0):!0;
case 268435650:case 268435649:return this.wasX?this.operate():!0}return!0},"JS.T,~B,~N");d(c$,"checkSkip",function(a,b){switch(a.tok){case 268435472:this.putOp(a);break;case 268435490:if(268435490!=b||"X"==this.ifStack[this.ifPt])break;this.ifStack[this.ifPt]="T";this.skipping=this.wasX=!1;break;case 268435473:if(268435472==b){this.oPt--;break}if(268435490!=b){this.putOp(a);break}this.wasX=!0;this.ifPt--;this.oPt-=2;this.skipping=!1}return!0},"JS.T,~N");d(c$,"doSelection",function(){if(0>this.xPt||
0==this.xPt&&!this.isArrayItem)return!1;var a=this.xStack[this.xPt--],b=this.xStack[this.xPt];if((7==b.tok||15==b.tok)&&2147483647!=b.intValue)if(4==a.tok||this.assignLeft&&1==this.squareCount)this.xStack[this.xPt]=b=JS.SV.selectItemTok(b,-2147483648);this.assignLeft&&4!=b.tok&&(this.lastAssignedString=null);switch(b.tok){case 6:case 14:this.doSelections?(a=b.mapValue(JS.SV.sValue(a)),this.xStack[this.xPt]=null==a?JS.SV.newS(""):a):(this.xPt++,this.putOp(null));break;default:b=JS.SV.newS(JS.SV.sValue(b));
case 10:case 15:case 7:case 4:case 11:case 12:this.doSelections||7==b.tok&&2147483647==b.intValue?(this.xStack[this.xPt]=JS.SV.selectItemTok(b,a.asInt()),this.assignLeft&&(4==b.tok&&1==this.squareCount)&&(this.lastAssignedString=b)):this.xPt++,this.doSelections||this.putOp(null)}return!0});d(c$,"dumpStacks",function(a){JU.Logger.debug("\n\n------------------\nRPN stacks: "+a+"\n");for(a=0;a<=this.xPt;a++)JU.Logger.debug("x["+a+"]: "+this.xStack[a]);JU.Logger.debug("\n");for(a=0;a<=this.oPt;a++)JU.Logger.debug("o["+
a+"]: "+this.oStack[a]+" prec="+(null==this.oStack[a]?"--":""+JS.T.getPrecedence(this.oStack[a].tok)));JU.Logger.debug(" ifStack = "+String.instantialize(this.ifStack).substring(0,this.ifPt+1))},"~S");d(c$,"getX",function(){0>this.xPt&&this.eval.error(13);var a=JS.SV.selectItemVar(this.xStack[this.xPt]);this.xStack[this.xPt--]=null;this.wasX=!1;return a});d(c$,"getXTok",function(){return 0>this.xPt?0:this.xStack[this.xPt].tok});d(c$,"evaluateFunction",function(a){var b=this.oStack[this.oPt--];0==
a&&(a=268435665==b.tok?b.intValue&-481:b.tok);for(var c=JS.T.getMaxMathParams(a),e=0,d=this.xPt;0<=d&&this.xStack[d--].value!==b;)e++;if(0<c&&e>c)return!1;for(c=Array(e);0<=--e;)c[e]=this.getX();this.xPt--;if(!this.chk)return this.eval.getMathExt().evaluate(this,b,c,a);268435665==b.tok&&this.xPt--;0>this.xPt&&(this.xPt=0);switch(a){case 134217736:case 1275203608:case 134218756:case 134218757:case 134217759:case 134353926:return this.addXBs(new JU.BS)}return this.addXBool(!0)},"~N");d(c$,"operate",
function(){var a=this.oStack[this.oPt--],b;this.debugHigh&&this.dumpStacks("operate: "+a);if(268435860==a.tok&&(this.isArrayItem&&0==this.squareCount&&1==this.equalCount&&0>this.oPt||0<=this.oPt&&null==this.oStack[this.oPt]))return!0;var c;switch(a.tok){case 268435649:case 268435650:if(0<=this.xPt&&this.xStack[this.xPt].canIncrement()){c=this.xStack[this.xPt--];this.wasX=!1;break}default:c=this.getX()}if(c===JS.T.tokenArrayOpen)return!1;switch(a.tok){case 268435649:case 268435650:b=c;if(!this.chk){this.ptx<
this.pto&&(b=JS.SV.newS("").setv(c));if(!c.increment(268435650==a.tok?1:-1))return!1;this.ptx>this.pto&&(b=JS.SV.newS("").setv(c))}this.wasX=!1;this.putX(b);return this.wasX=!0;case 268435648:switch(c.tok){case 2:return this.addXInt(-c.asInt());case 8:return a=JU.P3.newP(c.value),a.scale(-1),this.addXPt(a);case 9:return a=JU.P4.newPt(c.value),a.scale4(-1),this.addXPt4(a);case 11:return a=JU.M3.newM3(c.value),a.invert(),this.addXM3(a);case 12:return a=JU.M4.newM4(c.value),a.invert(),this.addXM4(a);
case 10:return this.addXBs(JU.BSUtil.copyInvert(c.value,s(c.value,JM.BondSet)?this.vwr.ms.bondCount:this.vwr.ms.ac))}return this.addXFloat(-c.asFloat());case 268435568:if(this.chk)return this.addXBool(!0);switch(c.tok){case 9:return this.addXPt4(JU.Quat.newP4(c.value).inv().toPoint4f());case 11:return a=JU.M3.newM3(c.value),a.invert(),this.addXM3(a);case 12:return this.addXM4(JU.M4.newM4(c.value).invert());case 10:return this.addXBs(JU.BSUtil.copyInvert(c.value,s(c.value,JM.BondSet)?this.vwr.ms.bondCount:
this.vwr.ms.ac));default:return this.addXBool(!c.asBoolean())}case 268435665:b=805306401==a.intValue?805306401:a.intValue&-481;if(this.chk)return this.addXObj(JS.SV.newS(""));if(this.vwr.allowArrayDotNotation)switch(c.tok){case 6:case 14:switch(b){case 1275068418:case 1140850706:case 1140850694:case 1140850696:break;default:return a=c.mapValue(a.value),this.addXObj(null==a?JS.SV.newS(""):a)}}switch(b){case 1275068418:return this.addX(c.toArray());case 805306401:case 1073741824:return 10==c.tok&&(this.chk?
this.addXStr(""):this.getAllProperties(c,a.value));case 1140850696:return this.addXStr(JS.ScriptMathProcessor.typeOf(c));case 1140850706:return a=c.getKeys(480==(a.intValue&480)),null==a?this.addXStr(""):this.addXAS(a);case 1140850691:case 1275068425:case 1140850694:if(1140850691==b&&s(c.value,JM.BondSet))break;return this.addXInt(JS.SV.sizeOf(c));case 1140850692:switch(c.tok){case 11:case 12:a=JS.SV.sValue(c);a=JU.PT.rep(a.substring(1,a.length-1),"],[","]\n[");break;case 4:a=c.value;break;default:a=
JS.SV.sValue(c)}a=JU.PT.rep(a,"\n\r","\n").$replace("\r","\n");return this.addXAS(JU.PT.split(a,"\n"));case 1765808134:switch(c.tok){case 4:case 7:return this.addXPt(JU.CU.colorPtFromString(JS.SV.sValue(c)));case 2:case 3:return this.addXPt(this.vwr.getColorPointForPropertyValue(JS.SV.fValue(c)));case 8:return this.addXStr(JU.Escape.escapeColor(JU.CU.colorPtToFFRGB(c.value)))}break;case 1678381065:return this.chk?this.addXStr("x"):this.getBoundBox(c)}if(this.chk)return this.addXStr(JS.SV.sValue(c));
if(4==c.tok&&(c=JS.SV.unescapePointOrBitsetAsVariable(JS.SV.sValue(c)),!s(c,JS.SV)))return!1;a.tok==c.tok&&(c=this.getX());return this.getPointOrBitsetOperation(a,c)}b=this.getX();if(this.chk){if(a===JS.T.tokenAndFALSE||a===JS.T.tokenOrTRUE)this.chk=!1;return this.addX(JS.SV.newT(b))}return this.binaryOp(a,b,c)});d(c$,"binaryOp",function(a,b,c){var e;switch(a.tok){case 268435584:case 268435552:switch(b.tok){case 10:switch(a=b.value,c.tok){case 2:var d=c.asInt();return this.addXBool(0>d?!1:a.get(d));
case 10:return a=JU.BSUtil.copy(a),a.and(c.value),this.addXBs(a)}}return this.addXBool(b.asBoolean()&&c.asBoolean());case 268435536:switch(b.tok){case 10:a=JU.BSUtil.copy(b.value);switch(c.tok){case 10:return a.or(c.value),this.addXBs(a);case 2:d=c.asInt();if(0>d)break;a.set(d);return this.addXBs(a);case 7:d=c.value;for(c=d.size();0<=--c;)b=d.get(c).asInt(),0<=b&&a.set(b);return this.addXBs(a)}break;case 7:return this.addX(JS.SV.concatList(b,c,!1))}return this.addXBool(b.asBoolean()||c.asBoolean());
case 268435537:if(10==b.tok&&10==c.tok)return a=JU.BSUtil.copy(b.value),a.xor(c.value),this.addXBs(a);a=b.asBoolean();b=c.asBoolean();return this.addXBool(a&&!b||b&&!a);case 268435538:return 10!=b.tok||10!=c.tok?!1:this.addXBs(JU.BSUtil.toggleInPlace(JU.BSUtil.copy(b.value),c.value));case 268435858:return this.addXBool(b.asFloat()<=c.asFloat());case 268435857:return this.addXBool(b.asFloat()>=c.asFloat());case 268435856:return this.addXBool(b.asFloat()>c.asFloat());case 268435859:return this.addXBool(b.asFloat()<
c.asFloat());case 268435860:return this.addXBool(JS.SV.areEqual(b,c));case 268435861:return this.addXBool(!JS.SV.areEqual(b,c));case 268435862:return this.addXBool(JS.SV.isLike(b,c));case 268435617:switch(b.tok){case 6:return b=new java.util.Hashtable(b.value),c=c.getMap(),null!=c&&b.putAll(c),this.addX(JS.SV.getVariableMap(b));case 2:if(!this.isDecimal(c))return this.addXInt(b.intValue+c.asInt());break;case 4:return this.addX(JS.SV.newS(JS.SV.sValue(b)+JS.SV.sValue(c)));case 8:switch(a=JU.P3.newP(b.value),
c.tok){case 8:return a.add(c.value),this.addXPt(a);case 9:return e=c.value,a.add(JU.P3.new3(e.x,e.y,e.z)),this.addXPt(a);default:return e=c.asFloat(),this.addXPt(JU.P3.new3(a.x+e,a.y+e,a.z+e))}case 11:switch(c.tok){default:return this.addXFloat(b.asFloat()+c.asFloat());case 11:return b=JU.M3.newM3(b.value),b.add(c.value),this.addXM3(b);case 8:return this.addXM4(JS.ScriptMathProcessor.getMatrix4f(b.value,c.value))}case 9:switch(b=JU.Quat.newP4(b.value),c.tok){default:return this.addXPt4(b.add(c.asFloat()).toPoint4f());
case 9:return this.addXPt4(b.mulQ(JU.Quat.newP4(c.value)).toPoint4f())}case 7:return this.addX(JS.SV.concatList(b,c,!0))}return this.addXFloat(b.asFloat()+c.asFloat());case 268435616:switch(b.tok){case 2:if(!this.isDecimal(c))return this.addXInt(b.intValue-c.asInt());break;case 4:if(!this.isDecimal(c)&&!this.isDecimal(b))return this.addXInt(b.asInt()-c.asInt());break;case 6:return b=new java.util.Hashtable(b.value),b.remove(JS.SV.sValue(c)),this.addX(JS.SV.getVariableMap(b));case 11:if(11!=c.tok)break;
b=JU.M3.newM3(b.value);b.sub(c.value);return this.addXM3(b);case 12:if(12!=c.tok)break;b=JU.M4.newM4(b.value);b.sub(c.value);return this.addXM4(b);case 8:a=JU.P3.newP(b.value);switch(c.tok){case 8:return a.sub(c.value),this.addXPt(a);case 9:return e=c.value,a.sub(JU.P3.new3(e.x,e.y,e.z)),this.addXPt(a)}e=c.asFloat();return this.addXPt(JU.P3.new3(a.x-e,a.y-e,a.z-e));case 9:return b=JU.Quat.newP4(b.value),9==c.tok?(c=JU.Quat.newP4(c.value),this.addXPt4(c.mulQ(b.inv()).toPoint4f())):this.addXPt4(b.add(-c.asFloat()).toPoint4f())}return this.addXFloat(b.asFloat()-
c.asFloat());case 1275068930:if(8==b.tok&&8==c.tok)return a=b.value,c=c.value,this.addXPt(JU.P3.new3(a.x*c.x,a.y*c.y,a.z*c.z));case 268435633:switch(b.tok){case 2:return this.isDecimal(c)?this.addXFloat(b.intValue*c.asFloat()):this.addXInt(b.intValue*c.asInt());case 4:return this.isDecimal(c)||this.isDecimal(b)?this.addXFloat(b.asFloat()*c.asFloat()):this.addXInt(b.asInt()*c.asInt())}a=11==b.tok||12==b.tok?this.ptValue(c,null):11==c.tok?this.ptValue(b,null):null;e=12==b.tok?this.planeValue(c):12==
c.tok?this.planeValue(b):null;switch(c.tok){case 11:if(null!=a)return c=JU.M3.newM3(c.value),c.transpose(),a=JU.P3.newP(a),c.rotate(a),7==b.tok?this.addX(JS.SV.getVariableAF(M(-1,[a.x,a.y,a.z]))):this.addXPt(a);if(null!=e)return this.addXPt4(JU.Quat.newP4(e).mulQ(JU.Quat.newM(c.value)).toPoint4f());break;case 12:if(null!=e)return c=JU.M4.newM4(c.value),c.transpose(),a=JU.P4.newPt(e),c.transform(a),7==b.tok?this.addX(JS.SV.getVariableAF(M(-1,[a.x,a.y,a.z,a.w]))):this.addXPt4(a)}switch(b.tok){case 11:d=
b.value;if(null!=a)return a=JU.P3.newP(a),d.rotate(a),7==c.tok?this.addX(JS.SV.getVariableAF(M(-1,[a.x,a.y,a.z]))):this.addXPt(a);switch(c.tok){case 11:return b=JU.M3.newM3(c.value),b.mul2(d,b),this.addXM3(b);case 9:return this.addXM3(JU.Quat.newM(d).mulQ(JU.Quat.newP4(c.value)).getMatrix())}e=c.asFloat();c=new JU.A4;c.setM(d);c.angle*=e;return this.addXM3((new JU.M3).setAA(c));case 12:return b=b.value,null!=a?(a=JU.P3.newP(a),b.rotTrans(a),7==c.tok?this.addX(JS.SV.getVariableAF(M(-1,[a.x,a.y,a.z]))):
this.addXPt(a)):null!=e?(b.transform(e),7==c.tok?this.addX(JS.SV.getVariableAF(M(-1,[e.x,e.y,e.z,e.w]))):this.addXPt4(e)):12==c.tok?(c=JU.M4.newM4(c.value),c.mul2(b,c),this.addXM4(c)):this.addXStr("NaN");case 8:a=JU.P3.newP(b.value);switch(c.tok){case 8:return c=c.value,this.addXFloat(a.x*c.x+a.y*c.y+a.z*c.z)}e=c.asFloat();return this.addXPt(JU.P3.new3(a.x*e,a.y*e,a.z*e));case 9:return 9==c.tok?this.addXPt4(JU.Quat.newP4(b.value).mulQ(JU.Quat.newP4(c.value)).toPoint4f()):this.addXPt4(JU.Quat.newP4(b.value).mul(c.asFloat()).toPoint4f())}return this.addXFloat(b.asFloat()*
c.asFloat());case 268435632:switch(b.tok){case 2:if(2==c.tok&&0!=c.intValue)return this.addXInt(Q(b.intValue/c.intValue));d=this.isDecimal(c)?0:c.asInt();if(0!=d)return this.addXInt(Q(b.intValue/d));break;case 4:if(!this.isDecimal(b)&&!this.isDecimal(c)&&0!=(e=c.asInt()))return this.addXInt(Q(b.asInt()/e));break;case 8:return a=JU.P3.newP(b.value),this.addXPt(0==(d=c.asFloat())?JU.P3.new3(NaN,NaN,NaN):JU.P3.new3(a.x/d,a.y/d,a.z/d));case 9:return this.addXPt4(9==c.tok?JU.Quat.newP4(b.value).div(JU.Quat.newP4(c.value)).toPoint4f():
0==(d=c.asFloat())?JU.P4.new4(NaN,NaN,NaN,NaN):JU.Quat.newP4(b.value).mul(1/d).toPoint4f())}return this.addXFloat(b.asFloat()/c.asFloat());case 268435635:return e=c.asFloat(),9==b.tok?0==e?this.addXPt4(JU.P4.new4(NaN,NaN,NaN,NaN)):9==c.tok?this.addXPt4(JU.Quat.newP4(b.value).divLeft(JU.Quat.newP4(c.value)).toPoint4f()):this.addXPt4(JU.Quat.newP4(b.value).mul(1/e).toPoint4f()):this.addXInt(0==e?0:Q(Math.floor(b.asFloat()/c.asFloat())));case 268435651:return e=Math.pow(b.asFloat(),c.asFloat()),2==b.tok&&
2==c.tok?this.addXInt(I(e)):this.addXFloat(e);case 268435634:a=null;d=c.asInt();switch(b.tok){case 3:e=b.asFloat();if(0==d)return this.addXInt(Math.round(e));a=JU.DF.formatDecimal(e,d);return this.addXStr(a);case 4:return a=b.value,this.addXStr(0==d?JU.PT.trim(a,"\n\t "):9999==d?a.toUpperCase():-9999==d?a.toLowerCase():0<d?JU.PT.formatS(a,d,d,!1,!1):JU.PT.formatS(a,d,d-1,!0,!1));case 7:b=JS.SV.strListValue(b);for(c=0;c<b.length;c++)b[c]=0==d?b[c].trim():0<d?JU.PT.formatS(b[c],d,d,!0,!1):JU.PT.formatS(a,
-d,d,!1,!1);return this.addXAS(b);case 8:return a=JU.P3.newP(b.value),this.vwr.toUnitCell(a,JU.P3.new3(d,d,d)),this.addXPt(a);case 9:e=b.value;if(8==c.tok)return this.addXPt(JU.Quat.newP4(e).transform2(c.value,new JU.P3));if(9==c.tok)return c=JU.P4.newPt(c.value),JU.Quat.newP4(e).getThetaDirected(c),this.addXPt4(c);0==d&&4==c.tok&&(a=" "+c.value.toString().trim().toLowerCase()+":",c=" w:0 x:1 y:2 z:3 normal:4 eulerzxz:5 eulerzyz:6 vector:-1 theta:-2 axisx:-3 axisy:-4 axisz:-5 axisangle:-6 matrix:-9".indexOf(a),
d=0<=c?JU.PT.parseInt(" w:0 x:1 y:2 z:3 normal:4 eulerzxz:5 eulerzyz:6 vector:-1 theta:-2 axisx:-3 axisy:-4 axisz:-5 axisangle:-6 matrix:-9".substring(c+a.length)):-99);switch(d){case 0:return this.addXFloat(e.w);case 1:return this.addXFloat(e.x);case 2:return this.addXFloat(e.y);case 3:return this.addXFloat(e.z)}c=JU.Quat.newP4(e);switch(d){case 4:return this.addXPt(JU.P3.newP(c.getNormal()));case 5:return this.addXAF(c.getEulerZXZ());case 6:return this.addXAF(c.getEulerZYZ());case -1:return this.addXPt(JU.P3.newP(c.getVector(-1)));
case -2:return this.addXFloat(c.getTheta());case -3:return this.addXPt(JU.P3.newP(c.getVector(0)));case -4:return this.addXPt(JU.P3.newP(c.getVector(1)));case -5:return this.addXPt(JU.P3.newP(c.getVector(2)));case -6:return c=c.toAxisAngle4f(),this.addXPt4(JU.P4.new4(c.x,c.y,c.z,180*c.angle/3.141592653589793));case -9:return this.addXM3(c.getMatrix());default:return this.addXStr("NaN")}case 12:switch(b=b.value,d){case 1:return d=new JU.M3,b.getRotationScale(d),this.addXM3(d);case 2:return c=new JU.V3,
b.getTranslation(c),this.addXPt(JU.P3.newP(c));default:return!1}case 10:return this.addXBs(JS.SV.bsSelectRange(b,d))}return this.addXInt(0==d?b.asInt():b.asInt()%d)}return!0},"JS.T,JS.SV,JS.SV");d(c$,"isDecimal",function(a){var b;return 3==a.tok||4==a.tok&&(0<=(b=JS.SV.sValue(a).trim()).indexOf(".")||0<b.indexOf("+")||0<b.lastIndexOf("-"))},"JS.SV");d(c$,"ptValue",function(a,b){var c;switch(a.tok){case 8:return a.value;case 10:c=a.value;if(c.isEmpty())break;null!=b&&(c=JU.BSUtil.copy(c),c.and(b));
return this.eval.getBitsetProperty(c,1145047050,null,null,a.value,null,!1,2147483647,!1);case 4:c=JU.Escape.uP(JS.SV.sValue(a));if(s(c,JU.P3))return c;break;case 7:if(c=JU.Escape.uP("{"+JS.SV.sValue(a).$replace("]"," ").$replace("["," ")+"}"),s(c,JU.P3))return c}return null},"JS.SV,JU.BS");d(c$,"planeValue",function(a){switch(a.tok){case 9:return a.value;case 7:case 4:return a=JU.Escape.uP(JS.SV.sValue(a)),s(a,JU.P4)?a:null}return null},"JS.T");c$.typeOf=d(c$,"typeOf",function(a){var b=null==a?0:
a.tok;switch(b){case 1073742335:case 1073742334:return"boolean";case 10:return s(a.value,JM.BondSet)?"bondset":"bitset";case 2:case 3:case 8:case 9:case 4:case 7:case 6:case 15:case 11:case 12:case 14:return JS.T.astrType[b]}return"?"},"JS.SV");d(c$,"getAllProperties",function(a,b){var c=a.value,e,d=c.cardinality();if(0==d||!b.endsWith("?")||null==(e=JS.T.getAtomPropertiesLike(b.substring(0,b.length-1))))return this.addXStr("");for(var j=new java.util.Hashtable,d=1==d?c.nextSetBit(0):2147483647,h=
e.size();0<=--h;){var g=e.get(h),m=g.tok;switch(m){case 1094717448:case 1094713349:continue;default:2147483647==d&&(m|=480),j.put(g.value,JS.SV.getVariable(this.eval.getBitsetProperty(c,m,null,null,null,null,!1,d,!0)))}}return this.addXMap(j)},"JS.SV,~S");c$.getMatrix4f=d(c$,"getMatrix4f",function(a,b){return JU.M4.newMV(a,null==b?new JU.V3:JU.V3.newV(b))},"JU.M3,JU.T3");d(c$,"getBoundBox",function(a){if(10!=a.tok)return!1;a=this.vwr.ms.getBoxInfo(a.value,1).getBoundBoxPoints(!0);for(var b=new JU.Lst,
c=0;4>c;c++)b.addLast(a[c]);return this.addXList(b)},"JS.SV");d(c$,"getPointOrBitsetOperation",function(a,b){switch(b.tok){case 7:switch(a.intValue){case 32:case 64:case 96:case 192:case 128:case 160:case 1140850707:return this.addXObj(this.eval.getMathExt().getMinMax(b.getList(),a.intValue));case 1275334681:return this.addX(b.pushPop(null,null));case 1275068444:case 1140850693:return this.addX(b.sortOrReverse(1140850693==a.intValue?-2147483648:1))}for(var c=Array(b.getList().size()),e=0;e<c.length;e++){var d=
JS.SV.unescapePointOrBitsetAsVariable(b.getList().get(e));if(!s(d,JS.SV)||!this.getPointOrBitsetOperation(a,d))return!1;c[e]=this.xStack[this.xPt--]}return this.addXAV(c);case 8:switch(a.intValue){case 1111492609:case 1111492629:return this.addXFloat(b.value.x);case 1111492610:case 1111492630:return this.addXFloat(b.value.y);case 1111492611:case 1111492631:return this.addXFloat(b.value.z);case 1145047050:return c=JU.P3.newP(b.value),this.vwr.toCartesian(c,!1),this.addXPt(c);case 1111492612:case 1111492613:case 1111492614:case 1145047051:return c=
JU.P3.newP(b.value),this.vwr.toFractional(c,!1),1145047051==a.intValue?this.addXPt(c):this.addXFloat(1111492612==a.intValue?c.x:1111492613==a.intValue?c.y:c.z);case 1111492615:case 1111492616:case 1111492617:case 1145047053:return c=JU.P3.newP(b.value),this.vwr.toFractional(c,!1),1145047053==a.intValue?this.addXPt(c):this.addXFloat(1111492615==a.intValue?c.x:1111492616==a.intValue?c.y:c.z);case 1111490577:case 1111490578:case 1111490579:case 1145045006:return c=JU.P3.newP(b.value),this.vwr.toUnitCell(c,
null),this.vwr.toFractional(c,!1),1145045006==a.intValue?this.addXPt(c):this.addXFloat(1111490577==a.intValue?c.x:1111490578==a.intValue?c.y:c.z)}break;case 9:switch(a.intValue){case 1111492609:case 1111492629:return this.addXFloat(b.value.x);case 1111492610:case 1111492630:return this.addXFloat(b.value.y);case 1111492611:case 1111492631:return this.addXFloat(b.value.z);case 1140850705:return this.addXFloat(b.value.w)}break;case 10:c=1677721602!=a.intValue;if(!c&&s(b.value,JM.BondSet))return this.addX(b);
e=b.value;c&&(1==e.cardinality()&&0==(a.intValue&480))&&(a.intValue|=32);d=this.eval.getBitsetProperty(e,a.intValue,null,null,b.value,a.value,!1,b.index,!0);return c?this.addXObj(d):this.addX(JS.SV.newV(10,JM.BondSet.newBS(d,this.vwr.ms.getAtomIndices(e))))}return!1},"JS.T,JS.SV");T(c$,"qMods"," w:0 x:1 y:2 z:3 normal:4 eulerzxz:5 eulerzyz:6 vector:-1 theta:-2 axisx:-3 axisy:-4 axisz:-5 axisangle:-6 matrix:-9")});F("JS");P(["JS.ScriptError"],"JS.ScriptParam","java.lang.Float java.util.Hashtable JU.BS $.CU $.Lst $.Measure $.P3 $.P4 $.PT $.Quat $.SB $.V3 JM.TickInfo JS.SV $.T JU.BSUtil $.Edge $.Escape $.Logger".split(" "),
function(){c$=R(function(){this.thisContext=this.contextVariables=null;this.theTok=this.iToken=0;this.st=this.theToken=null;this.slen=0;this.fractionalPoint=null;this.isBondSet=this.coordinatesAreFractional=!1;N(this,arguments)},JS,"ScriptParam",JS.ScriptError);d(c$,"getToken",function(a){this.checkToken(a)||this.error(13);this.theToken=this.st[a];this.theTok=this.theToken.tok;return this.theToken},"~N");d(c$,"tokAt",function(a){return a<this.slen&&null!=this.st[a]?this.st[a].tok:0},"~N");d(c$,"checkToken",
function(a){return(this.iToken=a)<this.slen},"~N");d(c$,"getParameter",function(a,b,c){var e=this.getContextVariableAsVariable(a,!1);if(null==e)if(c)e=this.vwr.getP(a);else if(null==(e=this.vwr.getPOrNull(a)))return null;switch(b){case 1073742190:return JS.SV.getVariable(e);case 4:if(!s(e,JU.Lst))break;a=e;b=new JU.SB;for(c=0;c<a.size();c++)b.append(a.get(c).asString()).appendC("\n");return b.toString()}return JS.SV.oValue(e)},"~S,~N,~B");d(c$,"getVarParameter",function(a,b){var c=this.getContextVariableAsVariable(a,
!1);if(null!=c)return b?c.asString():JS.SV.oValue(c);c=this.vwr.getP(a);return b&&0==(""+c).length?a:c},"~S,~B");d(c$,"getContextVariableAsVariable",function(a,b){if(a.equals("expressionBegin"))return null;if(a.equalsIgnoreCase("_caller")){for(var c=this.thisContext;null!=c;){if(c.isFunction)return JS.SV.newV(6,c.vars);c=c.parentContext}return JS.SV.newV(6,new java.util.Hashtable)}a=a.toLowerCase();return null!=this.contextVariables&&this.contextVariables.containsKey(a)?this.contextVariables.get(a):
b||null==this.thisContext?null:this.thisContext.getVariable(a)},"~S,~B");d(c$,"paramAsStr",function(a){this.getToken(a);null==this.theToken&&this.error(13);return JS.SV.sValue(this.theToken)},"~N");d(c$,"stringParameter",function(a){(!this.checkToken(a)||4!=this.getToken(a).tok)&&this.error(41);return this.theToken.value},"~N");d(c$,"stringParameterSet",function(a){switch(this.tokAt(a)){case 4:var b=this.stringParameter(a);return b.startsWith('["')&&(a=this.vwr.evaluateExpression(b),s(a,String))?
JU.PT.split(a,"\n"):O(-1,[b]);case 1073742195:a+=2;break;case 268435520:++a;break;case 7:return JS.SV.strListValue(this.getToken(a));default:this.invArg()}for(var c,b=new JU.Lst;268435521!=(c=this.tokAt(a));){switch(c){case 268435504:break;case 4:b.addLast(this.stringParameter(a));break;default:case 0:this.invArg()}a++}this.iToken=a;a=b.size();c=Array(a);for(var e=0;e<a;e++)c[e]=b.get(e);return c},"~N");d(c$,"objectNameParameter",function(a){this.checkToken(a)||this.error(37);return this.paramAsStr(a)},
"~N");d(c$,"atomCenterOrCoordinateParameter",function(a,b){switch(this.getToken(a).tok){case 10:case 1073742325:var c=this.atomExpression(this.st,a,0,!0,!1,b,!0);if(null==c)return(null==b||!s(b[0],JU.P3))&&this.invArg(),b[0];null!=b&&(2==b.length&&s(b[1],JU.BS)&&(c=JU.BSUtil.copy(c),c.and(b[1])),b[0]=c);return 1==c.cardinality()?this.vwr.ms.at[c.nextSetBit(0)]:this.vwr.ms.getAtomSetCenter(c);case 1073742332:case 8:return this.getPoint3f(a,!0)}this.invArg();return null},"~N,~A");d(c$,"isCenterParameter",
function(a){a=this.tokAt(a);return 1073742330==a||1073742332==a||1073742325==a||8==a||10==a},"~N");d(c$,"centerParameter",function(a,b){return this.centerParameterForModel(a,-2147483648,b)},"~N,~A");d(c$,"centerParameterForModel",function(a,b,c){var e=null;if(this.checkToken(a))switch(this.getToken(a).tok){case 1073742330:c=this.objectNameParameter(++a);e=-2147483648;268435520==this.tokAt(a+1)&&(e=this.parameterExpressionList(-a-1,-1,!0).get(0).asInt(),268435521!=this.getToken(--this.iToken).tok&&
this.invArg());if(this.chk)return new JU.P3;if(1073742336==this.tokAt(a+1)&&(1140850691==this.tokAt(a+2)||1140850694==this.tokAt(a+2)))e=2147483647,this.iToken=a+2;null==(e=this.getObjectCenter(c,e,b))&&this.errorStr(12,c);break;case 10:case 1073742325:case 1073742332:case 8:null==c&&(c=Array(1)),e=this.atomCenterOrCoordinateParameter(a,c)}null==e&&this.error(11);return e},"~N,~N,~A");d(c$,"planeParameter",function(a){var b=new JU.V3,c=new JU.V3,e=null;134217750==this.tokAt(a)&&a++;var d=268435616==
this.tokAt(a);d&&a++;if(a<this.slen)switch(this.getToken(a).tok){case 9:e=JU.P4.newPt(this.theToken.value);break;case 1073742330:e=this.objectNameParameter(++a);if(this.chk)return new JU.P4;e=this.getPlaneForObject(e,b);break;case 1111492629:(!this.checkToken(++a)||268435860!=this.getToken(a++).tok)&&this.evalError("x=?",null);e=JU.P4.new4(1,0,0,-this.floatParameter(a));break;case 1111492630:(!this.checkToken(++a)||268435860!=this.getToken(a++).tok)&&this.evalError("y=?",null);e=JU.P4.new4(0,1,0,
-this.floatParameter(a));break;case 1111492631:(!this.checkToken(++a)||268435860!=this.getToken(a++).tok)&&this.evalError("z=?",null);e=JU.P4.new4(0,0,1,-this.floatParameter(a));break;case 1073741824:case 4:b=this.paramAsStr(a);b.equalsIgnoreCase("xy")?e=JU.P4.new4(0,0,d?-1:1,0):b.equalsIgnoreCase("xz")?e=JU.P4.new4(0,d?-1:1,0,0):b.equalsIgnoreCase("yz")&&(e=JU.P4.new4(d?-1:1,0,0,0));break;case 1073742332:case 8:if(!this.isPoint3f(a)){e=this.getPoint4f(a);break}case 10:case 1073742325:a=this.atomCenterOrCoordinateParameter(a,
null);268435504==this.getToken(++this.iToken).tok&&++this.iToken;var j=this.atomCenterOrCoordinateParameter(this.iToken,null);268435504==this.getToken(++this.iToken).tok&&++this.iToken;if(this.isFloatParameter(this.iToken)){var h=this.floatParameter(this.iToken),e=new JU.P4;b.sub2(j,a);b.scale(2*h);JU.Measure.getBisectingPlane(a,b,c,b,e)}else e=this.atomCenterOrCoordinateParameter(this.iToken,null),c=new JU.V3,b=JU.Measure.getNormalThroughPoints(a,j,e,c,b),e=new JU.P4,e.set4(c.x,c.y,c.z,b);!this.chk&&
JU.Logger.debugging&&JU.Logger.debug(" defined plane: "+e)}null==e&&this.errorMore(38,"{a b c d}",'"xy" "xz" "yz" "x=..." "y=..." "z=..."',"$xxxxx");d&&e.scale4(-1);return e},"~N");d(c$,"hklParameter",function(a){!this.chk&&null==this.vwr.getCurrentUnitCell()&&this.error(33);a=this.getPointOrPlane(a,!1,!0,!1,!0,3,3);a=this.getHklPlane(a);null==a&&this.error(3);!this.chk&&JU.Logger.debugging&&JU.Logger.debug("defined plane: "+a);return a},"~N");d(c$,"getHklPlane",function(a){var b=JU.P3.new3(0==a.x?
1:1/a.x,0,0),c=JU.P3.new3(0,0==a.y?1:1/a.y,0),e=JU.P3.new3(0,0,0==a.z?1:1/a.z);if(0==a.x&&0==a.y&&0==a.z)return null;0==a.x&&0==a.y?(b.set(1,0,e.z),c.set(0,1,e.z)):0==a.y&&0==a.z?(c.set(b.x,0,1),e.set(b.x,1,0)):0==a.z&&0==a.x?(e.set(0,c.y,1),b.set(1,c.y,0)):0==a.x?b.set(1,c.y,0):0==a.y?c.set(0,1,e.z):0==a.z&&e.set(b.x,0,1);this.vwr.toCartesian(b,!1);this.vwr.toCartesian(c,!1);this.vwr.toCartesian(e,!1);return JU.Measure.getPlaneThroughPoints(b,c,e,new JU.V3,new JU.V3,new JU.P4)},"JU.P3");d(c$,"getPointOrPlane",
function(a,b,c,e,d,j,h){var g=M(6,0),m=0;this.coordinatesAreFractional=d;if(8==this.tokAt(a)){if(3>=j&&3<=h)return this.getToken(a).value;this.invArg()}if(9==this.tokAt(a)){if(4>=j&&4<=h)return this.getToken(a).value;this.invArg()}d=1;a:for(;a<this.st.length;a++)switch(this.getToken(a).tok){case 1073742332:case 268435504:case 268435552:case 268435584:break;case 1073742338:break a;case 268435616:d=-1;break;case 1073742363:6==m&&this.invArg();g[m++]=this.theToken.intValue;d=-1;break;case 2:case 1073742362:6==
m&&this.invArg();g[m++]=this.theToken.intValue*d;d=1;break;case 268435632:case 1073742358:c||this.invArg();268435632==this.theTok&&this.getToken(++a);m--;(0>m||b)&&this.invArg();s(this.theToken.value,Integer)||2==this.theTok?g[m++]/=2147483647==this.theToken.intValue?this.theToken.value.intValue():this.theToken.intValue:s(this.theToken.value,Float)&&(g[m++]/=this.theToken.value.floatValue());this.coordinatesAreFractional=!0;break;case 1073742357:case 1073741824:g[m++]=NaN;break;case 3:case 1073742359:b&&
this.invArg();6==m&&this.invArg();g[m++]=this.theToken.value.floatValue();break;default:this.invArg()}(m<j||m>h)&&this.invArg();return 3==m?(b=JU.P3.new3(g[0],g[1],g[2]),this.coordinatesAreFractional&&e&&(this.fractionalPoint=JU.P3.newP(b),this.chk||this.vwr.toCartesian(b,!1)),b):4==m?(this.coordinatesAreFractional&&this.invArg(),JU.P4.new4(g[0],g[1],g[2],g[3])):g},"~N,~B,~B,~B,~B,~N,~N");d(c$,"isPoint3f",function(a){var b;if((b=8==this.tokAt(a))||9==this.tokAt(a)||this.isFloatParameter(a+1)&&this.isFloatParameter(a+
2)&&this.isFloatParameter(a+3)&&this.isFloatParameter(a+4))return b;this.ignoreError=!0;var c=this.iToken;b=!0;try{this.getPoint3f(a,!0)}catch(e){if(E(e,Exception))b=!1;else throw e;}this.ignoreError=!1;this.iToken=c;return b},"~N");d(c$,"getPoint3f",function(a,b){return this.getPointOrPlane(a,!1,b,!0,!1,3,3)},"~N,~B");d(c$,"getPoint4f",function(a){return this.getPointOrPlane(a,!1,!1,!1,!1,4,4)},"~N");d(c$,"xypParameter",function(a){var b=this.tokAt(a);1073742195==b&&(b=this.tokAt(++a));if(268435520!=
b||!this.isFloatParameter(++a))return null;b=new JU.P3;b.x=this.floatParameter(a);268435504==this.tokAt(++a)&&a++;if(!this.isFloatParameter(a))return null;b.y=this.floatParameter(a);var c=268435634==this.tokAt(++a);c&&++a;if(268435521!=this.tokAt(a))return null;this.iToken=a;b.z=3.4028235E38*(c?-1:1);return b},"~N");d(c$,"xyzpParameter",function(a){var b=this.tokAt(a);1073742195==b&&(b=this.tokAt(++a));if(268435520!=b||!this.isFloatParameter(++a))return null;b=new JU.P4;b.x=this.floatParameter(a);
268435504==this.tokAt(++a)&&a++;if(!this.isFloatParameter(a))return null;b.y=this.floatParameter(a);268435504==this.tokAt(++a)&&a++;if(!this.isFloatParameter(a))return null;b.z=this.floatParameter(a);var c=268435634==this.tokAt(++a);c&&++a;if(268435521!=this.tokAt(a))return null;this.iToken=a;b.w=3.4028235E38*(c?-1:1);return b},"~N");d(c$,"optParameterAsString",function(a){return a>=this.slen?"":this.paramAsStr(a)},"~N");d(c$,"intParameter",function(a){if(this.checkToken(a)&&2==this.getToken(a).tok)return this.theToken.intValue;
this.error(20);return 0},"~N");d(c$,"isFloatParameter",function(a){switch(this.tokAt(a)){case 2:case 3:return!0}return!1},"~N");d(c$,"floatParameter",function(a){if(this.checkToken(a))switch(this.getToken(a),this.theTok){case 1073742363:return-this.theToken.intValue;case 1073742362:case 2:return this.theToken.intValue;case 1073742359:case 3:return this.theToken.value.floatValue()}this.error(34);return 0},"~N");d(c$,"getPointArray",function(a,b,c){2147483647==b&&(b=-1);var e=0>b?null:Array(b),d=0>
b?new JU.Lst:null,j=0>a?7:this.getToken(a++).tok;switch(j){case 7:d=this.theToken.getList();0<=b&&d.size()!=b&&this.invArg();b=d.size();null==e&&(e=Array(b));for(j=0;j<b;j++)null==(e[j]=JS.SV.ptValue(d.get(j)))&&!c&&this.invArg();return e;case 1073742195:j=this.tokAt(a++)}268435520!=j&&this.invArg();for(c=0;268435521!=j&&0!=j;)switch(j=this.getToken(a).tok,j){case 0:case 268435521:break;case 268435504:a++;break;default:if(0<=b&&c==b){j=0;break}a=this.centerParameter(a,null);null==e?d.addLast(a):e[c]=
a;c++;a=this.iToken+1}268435521!=j&&this.invArg();null==e&&(e=d.toArray(Array(d.size())));0<b&&null==e[b-1]&&this.invArg();return e},"~N,~N,~B");d(c$,"listParameter",function(a,b,c){var e=new JU.Lst,d=this.tokAt(a);1073742195==d&&(d=this.tokAt(++a));var j=1073742332==d,h=268435520==d;(j||h)&&a++;for(var g=0;g<c;){d=this.tokAt(a);if(j&&1073742338==d||h&&268435521==d)break;switch(d){case 268435504:case 268435616:case 1073742332:case 1073742338:case 4:break;case 9:d=this.getPoint4f(a);e.addLast(Float.$valueOf(d.x));
e.addLast(Float.$valueOf(d.y));e.addLast(Float.$valueOf(d.z));e.addLast(Float.$valueOf(d.w));g+=4;break;default:if(this.isCenterParameter(a)){d=this.centerParameter(a,null);a=this.iToken;e.addLast(Float.$valueOf(d.x));e.addLast(Float.$valueOf(d.y));e.addLast(Float.$valueOf(d.z));g+=3;break}e.addLast(Float.$valueOf(this.floatParameter(a)));g++}a+=g==c&&h&&1073742338==this.tokAt(a+1)?2:1}(j&&1073742338!=this.tokAt(a++)||h&&268435521!=this.tokAt(a++)||g<b||g>c)&&this.invArg();this.iToken=a-1;return e},
"~N,~N,~N");d(c$,"floatParameterSet",function(a,b,c){var e=null,d=null,j=0,j=null;this.iToken=a;switch(this.tokAt(a)){case 4:j=JS.SV.sValue(this.st[a]);j=JU.PT.replaceWithCharacter(j,"{},[]\"'"," ");d=JU.PT.parseFloatArray(j);j=d.length;break;case 7:d=JS.SV.flistValue(this.st[a],0);j=d.length;break;default:e=this.listParameter(a,b,c),j=e.size()}(j<b||j>c)&&this.invArg();if(null==d){d=M(j,0);for(a=0;a<j;a++)d[a]=e.get(a).floatValue()}return d},"~N,~N,~N");d(c$,"isArrayParameter",function(a){switch(this.tokAt(a)){case 7:case 11:case 12:case 1073742195:case 268435520:return!0}return!1},
"~N");d(c$,"getQuaternionParameter",function(a){switch(this.tokAt(a)){case 7:a=this.getToken(a).getList();var b=null;(0==a.size()||null==(b=JS.SV.pt4Value(a.get(0))))&&this.invArg();return JU.Quat.newP4(b);case 1073741864:return this.chk?null:JU.Quat.newP4(JU.Escape.uP(this.vwr.getOrientationText(1073741864,null)));default:return JU.Quat.newP4(this.getPoint4f(a))}},"~N");d(c$,"checkLast",function(a){return this.checkLength(a+1)-1},"~N");d(c$,"checkLength",function(a){if(0<=a)return this.checkLengthErrorPt(a,
0);this.slen>-a&&(this.iToken=-a,this.bad());return this.slen},"~N");d(c$,"checkLengthErrorPt",function(a,b){this.slen!=a&&(this.iToken=0<b?b:this.slen,0<b?this.invArg():this.bad());return this.slen},"~N,~N");d(c$,"checkLength23",function(){this.iToken=this.slen;2!=this.slen&&3!=this.slen&&this.bad();return this.slen});d(c$,"checkLength34",function(){this.iToken=this.slen;3!=this.slen&&4!=this.slen&&this.bad();return this.slen});d(c$,"modelNumberParameter",function(a){var b=0,c=!1;switch(this.tokAt(a)){case 2:c=
!0;case 3:b=this.getToken(a).intValue;break;case 4:b=JS.ScriptParam.getFloatEncodedInt(this.stringParameter(a));break;default:this.invArg()}return this.vwr.ms.getModelNumberIndex(b,c,!0)},"~N");d(c$,"getMadParameter",function(){var a=1;switch(this.getToken(1).tok){case 1073742072:this.restrictSelected(!1,!1);case 1073742335:break;case 1073742334:a=0;break;case 2:a=8*this.intParameterRange(1,0,750);break;case 3:a=this.floatParameterRange(1,-3,3);a=Float.isNaN(a)?2147483647:Q(Math.floor(2E3*a));0>a&&
(this.restrictSelected(!1,!1),a=-a);break;default:this.error(6)}return a});d(c$,"intParameterRange",function(a,b,c){a=this.intParameter(a);return a<b||a>c?(this.integerOutOfRange(b,c),2147483647):a},"~N,~N,~N");d(c$,"floatParameterRange",function(a,b,c){a=this.floatParameter(a);return a<b||a>c?(this.numberOutOfRange(b,c),NaN):a},"~N,~N,~N");d(c$,"getPointVector",function(a,b){switch(a.tok){case 10:return this.vwr.ms.getAtomPointVector(a.value);case 7:for(var c=new JU.Lst,e,d=a.getList(),j=0;j<d.size();j++)if(null!=
(e=JS.SV.ptValue(d.get(j))))c.addLast(e);else return null;return c}return 0<b?this.vwr.ms.getAtomPointVector(this.atomExpressionAt(b)):null},"JS.T,~N");c$.getFloatEncodedInt=d(c$,"getFloatEncodedInt",function(a){var b=a.indexOf(".");if(1>b||"-"==a.charAt(0)||a.endsWith(".")||a.contains(".0"))return 2147483647;var c=0,e=0;if(0<b)try{c=Integer.parseInt(a.substring(0,b)),0>c&&(c=-c)}catch(d){if(E(d,NumberFormatException))c=-1;else throw d;}if(b<a.length-1)try{e=Integer.parseInt(a.substring(b+1))}catch(j){if(!E(j,
NumberFormatException))throw j;}c=1E6*c+e;return 0>c?2147483647:c},"~S");c$.getPartialBondOrderFromFloatEncodedInt=d(c$,"getPartialBondOrderFromFloatEncodedInt",function(a){return(Q(a/1E6)%7<<5)+(a%1E6&31)},"~N");c$.getBondOrderFromString=d(c$,"getBondOrderFromString",function(a){return 0>a.indexOf(" ")?JU.Edge.getBondOrderFromString(a):0==a.toLowerCase().indexOf("partial ")?JS.ScriptParam.getPartialBondOrderFromString(a.substring(8).trim()):131071},"~S");c$.getPartialBondOrderFromString=d(c$,"getPartialBondOrderFromString",
function(a){return JS.ScriptParam.getPartialBondOrderFromFloatEncodedInt(JS.ScriptParam.getFloatEncodedInt(a))},"~S");d(c$,"isColorParam",function(a){var b=this.tokAt(a);return 570425378==b||1073742195==b||268435520==b||7==b||8==b||this.isPoint3f(a)||(4==b||JS.T.tokAttr(b,1073741824))&&0!=JU.CU.getArgbFromString(this.st[a].value)},"~N");d(c$,"getArgbParam",function(a){return this.getArgbParamOrNone(a,!1)},"~N");d(c$,"getArgbParamLast",function(a,b){var c=this.getArgbParamOrNone(a,b);this.checkLast(this.iToken);
return c},"~N,~B");d(c$,"getArgbParamOrNone",function(a,b){var c=null;if(this.checkToken(a))switch(this.getToken(a).tok){default:if(!JS.T.tokAttr(this.theTok,1073741824))break;case 570425378:case 4:return JU.CU.getArgbFromString(this.paramAsStr(a));case 1073742195:return this.getColorTriad(a+2);case 268435520:return this.getColorTriad(++a);case 7:var e=JS.SV.flistValue(this.theToken,3);null!=e&&3!=e.length&&(c=JU.P3.new3(e[0],e[1],e[2]));break;case 8:c=this.theToken.value;break;case 1073742332:c=
this.getPoint3f(a,!1);break;case 1073742333:if(b)return 0}null==c&&this.error(8);return JU.CU.colorPtToFFRGB(c)},"~N,~B");d(c$,"getColorTriad",function(a){var b=M(3,0),c=0,e="";this.getToken(a);var d=null,j=0;a:switch(this.theTok){case 2:case 1073742362:case 3:for(;a<this.slen;a++){switch(this.getToken(a).tok){case 268435504:continue;case 1073741824:(1!=c||0!=b[0])&&this.error(4);e="0"+this.paramAsStr(a);break a;case 3:2<c&&this.error(4);j=this.floatParameter(a);break;case 2:2<c&&this.error(4);j=
this.theToken.intValue;break;case 1073742362:2<c&&this.error(4);j=this.theToken.value.intValue()%256;break;case 268435521:3!=c&&this.error(4);--a;d=JU.P3.new3(b[0],b[1],b[2]);break a;default:this.error(4)}b[c++]=j}this.error(4);break;case 8:d=this.theToken.value;break;case 1073741824:e=this.paramAsStr(a);break;default:this.error(4)}268435521!=this.getToken(++a).tok&&this.error(4);if(null!=d)return JU.CU.colorPtToFFRGB(d);0==(c=JU.CU.getArgbFromString("["+e+"]"))&&this.error(4);return c},"~N");d(c$,
"tickParamAsStr",function(a,b,c,e){this.iToken=a-1;if(1073742164!=this.tokAt(a))return null;var d=" ";switch(this.tokAt(a+1)){case 1111492629:case 1111492630:case 1111492631:d=this.paramAsStr(++a).toLowerCase();break;case 1073741824:this.invArg()}if(1073742333==this.tokAt(++a))return b=new JM.TickInfo(null),b.type=d,this.iToken=a,b;b=new JM.TickInfo(this.getPointOrPlane(a,!1,!0,!1,!1,3,3));if(this.coordinatesAreFractional||1814695966==this.tokAt(this.iToken+1))b.scale=JU.P3.new3(NaN,NaN,NaN),c=!1;
1814695966==this.tokAt(this.iToken+1)&&this.iToken++;b.type=d;1287653388==this.tokAt(this.iToken+1)&&(b.tickLabelFormats=this.stringParameterSet(this.iToken+2));if(!c)return b;1073742138==this.tokAt(this.iToken+1)&&(this.isFloatParameter(this.iToken+2)?(a=this.floatParameter(this.iToken+2),b.scale=JU.P3.new3(a,a,a)):b.scale=this.getPoint3f(this.iToken+2,!0));e&&1073741942==this.tokAt(this.iToken+1)&&(b.first=this.floatParameter(this.iToken+2));return b},"~N,~B,~B,~B");d(c$,"setBooleanProperty",function(a,
b){this.chk||this.vwr.setBooleanProperty(a,b)},"~S,~B");d(c$,"setIntProperty",function(a,b){this.chk||this.vwr.setIntProperty(a,b);return!0},"~S,~N");d(c$,"setFloatProperty",function(a,b){this.chk||this.vwr.setFloatProperty(a,b);return!0},"~S,~N");d(c$,"setStringProperty",function(a,b){this.chk||this.vwr.setStringProperty(a,b)},"~S,~S")});F("JS");c$=R(function(){this.context=this.processName=null;N(this,arguments)},JS,"ScriptProcess");S(c$,function(a,b){this.processName=a;this.context=b},"~S,JS.ScriptContext");
F("JS");P(null,"JS.ScriptProcessRunnable",["JU.Logger"],function(){c$=R(function(){this.shapeManager=this.processLock=this.process=this.parallelProcessor=null;N(this,arguments)},JS,"ScriptProcessRunnable",null,Runnable);S(c$,function(a,b,c,e){this.parallelProcessor=a;this.process=b;this.processLock=c;this.shapeManager=e},"JS.ScriptParallelProcessor,JS.ScriptProcess,~O,JV.ShapeManager");q(c$,"run",function(){try{null==this.parallelProcessor.error&&(JU.Logger.debugging&&JU.Logger.debug("Running process "+
this.process.processName+" "+this.process.context.pc+" - "+(this.process.context.pcEnd-1)),this.parallelProcessor.eval(this.process.context,this.shapeManager),JU.Logger.debugging&&JU.Logger.debug("Process "+this.process.processName+" complete"))}catch(a){if(E(a,Exception))a.printStackTrace();else if(E(a,Error))this.parallelProcessor.clearShapeManager(a);else throw a;}finally{--this.parallelProcessor.counter,this.processLock.notifyAll()}})});F("JS");P(["J.thread.JmolThread"],"JS.ScriptQueueThread",
["JU.Logger"],function(){c$=R(function(){this.scriptManager=null;this.startedByCommandThread=!1;this.pt=0;N(this,arguments)},JS,"ScriptQueueThread",J.thread.JmolThread);S(c$,function(a,b,c,e){this.setViewer(b,"QueueThread"+e);this.scriptManager=a;this.vwr=b;this.startedByCommandThread=c;this.pt=e},"J.api.JmolScriptManager,JV.Viewer,~B,~N");q(c$,"run1",function(a){for(;;)switch(a){case -1:a=0;break;case 0:if(this.stopped||0==this.scriptManager.getScriptQueue().size()){a=-2;break}if(!this.runNextScript()&&
!this.runSleep(100,0))return;break;case -2:this.scriptManager.queueThreadFinished(this.pt);return}},"~N");d(c$,"runNextScript",function(){var a=this.scriptManager.getScriptQueue();if(0==a.size())return!1;var b=this.scriptManager.getScriptItem(!1,this.startedByCommandThread);if(null==b)return!1;var c=b.get(0),e=b.get(1),d=b.get(2),b=b.get(3).booleanValue();JU.Logger.debugging&&JU.Logger.debug("Queue["+this.pt+"]["+a.size()+"] scripts; running: "+c);a.removeItemAt(0);this.vwr.evalStringWaitStatusQueued(d,
c,e,b,!0);return 0==a.size()?!1:!0})});F("JS");P(null,"JS.ScriptTokenParser","java.lang.Boolean $.Float JU.Lst $.P3 $.PT J.i18n.GT JS.ScriptParam $.T JU.Logger $.SimpleUnitCell".split(" "),function(){c$=R(function(){this.script=this.vwr=null;this.isStateScript=!1;this.ichToken=this.ichEnd=this.ichComment=this.ichCurrentCommand=this.iCommand=this.lineCurrent=0;this.tokenAndEquals=this.lastToken=this.tokenCommand=this.lastFlowCommand=this.theToken=null;this.ptNewSetModifier=this.tokCommand=this.nTokens=
this.theTok=0;this.haveMacro=this.isNewSet=!1;this.logMessages=!0;this.atokenInfix=null;this.itokenInfix=0;this.isSetOrDefine=this.isMathExpressionCommand=this.isSetBrace=!1;this.ltokenPostfix=null;this.isCommaAsOrAllowed=this.isEmbeddedExpression=!1;this.htUserFunctions=this.theValue=null;this.residueSpecCodeGenerated=this.haveString=!1;this.errorType=this.errorLine=this.errorMessageUntranslated=this.errorMessage=null;N(this,arguments)},JS,"ScriptTokenParser");d(c$,"compileExpressions",function(){var a=
(134222850==this.tokCommand||4124==this.tokCommand)&&268435472==this.tokAt(2);this.isEmbeddedExpression=a||0!=this.tokCommand&&(134320141!=this.tokCommand&&102436!=this.tokCommand&&364558!=this.tokCommand&&102412!=this.tokCommand||2147483647!=this.tokenCommand.intValue)&&102409!=this.tokCommand&&!JS.T.tokAttr(this.tokCommand,12288)&&(2<this.nTokens||!JS.T.tokAttr(this.tokCommand,20480));this.isMathExpressionCommand=1073741824==this.tokCommand||a||JS.T.tokAttr(this.tokCommand,36864);a=this.isEmbeddedExpression||
JS.T.tokAttr(this.tokCommand,12288);1073742330==this.tokAt(1)&&JS.T.tokAttr(this.tokCommand,12288)&&(a=!1);if(a&&!this.compileExpression())return!1;for(var a=this.atokenInfix.length,b=0,c=1;c<a;c++)12290==this.tokAt(c)&&b++;a-=b;this.isNewSet&&1==a&&(this.atokenInfix[0]=JS.T.tv(134320141,0,this.atokenInfix[0].value),this.isNewSet=!1);if((this.isNewSet||this.isSetBrace)&&a<this.ptNewSetModifier+2){if(!this.isNewSet||!this.haveMacro)return this.commandExpected();this.htUserFunctions.put(this.atokenInfix[0].value,
Boolean.TRUE)}return 1==a||!JS.T.tokAttr(this.tokCommand,262144)?!0:this.error(0)});d(c$,"compileExpression",function(){var a=this.isSetOrDefine&&!this.isSetBrace?2:1;this.ltokenPostfix=new JU.Lst;this.itokenInfix=0;var b=null,c=this.tokAt(1);switch(this.tokCommand){case 12290:c=12290==this.tokAt(1)?2:1;if(2==this.tokAt(c)&&1073742336==this.tokAt(c+1)&&268435860==this.tokAt(c+3)){this.tokCommand=36867;this.isSetBrace=!0;this.ptNewSetModifier=c+3;this.isEmbeddedExpression=this.isMathExpressionCommand=
!0;this.addTokenToPostfixToken(JS.T.tokenSetProperty);this.addTokenToPostfixToken(JS.T.tokenExpressionBegin);for(a=0;a++<=c;)this.addNextToken();this.addTokenToPostfixToken(JS.T.tokenExpressionEnd);a=0}break;case 12295:1677721602==c&&(a=2);break;case 1275082245:switch(c){case 1073742335:case 1073742334:c=this.tokAt(++a);break}case 12294:case 1610625028:switch(c){case 1275069441:case 1073742119:c=this.tokAt(++a)}1086324742==c&&!JS.T.tokAttr(this.tokAt(a+1),268435456)&&a++}for(c=0;c<a&&this.addNextToken();c++);
for(;this.moreTokens();){if(this.isEmbeddedExpression){for(;!this.isExpressionNext();){if(this.tokPeekIs(1073741824)&&!(134222849==this.tokCommand&&1==this.itokenInfix)&&(a=this.atokenInfix[this.itokenInfix].value,c=JS.T.getTokenFromName(a),null!=c&&(!this.isMathExpressionCommand&&12290!=this.lastToken.tok||(1073742336==this.lastToken.tok||268435472==this.tokAt(this.itokenInfix+1))&&!this.isUserFunction(a))))this.atokenInfix[this.itokenInfix]=c;if(!this.addNextToken())break}if(!this.moreTokens())break}if(12290==
this.lastToken.tok){if(!this.clauseDefine(!0,!1))return!1}else{this.isMathExpressionCommand||this.addTokenToPostfixToken(b=JS.T.o(1073742325,"implicitExpressionBegin"));if(!this.clauseOr(this.isCommaAsOrAllowed||!this.isMathExpressionCommand&&this.tokPeekIs(268435472)))return!1;!this.isMathExpressionCommand&&!(this.isEmbeddedExpression&&this.lastToken===JS.T.tokenCoordinateEnd)&&this.addTokenToPostfixToken(JS.T.tokenExpressionEnd);if(this.moreTokens()){if(1275082245!=this.tokCommand&&12291!=this.tokCommand&&
!this.isEmbeddedExpression)return this.error(5);1275082245==this.tokCommand&&(this.tokCommand=b.intValue=0,this.isMathExpressionCommand=this.isEmbeddedExpression=!0,this.isCommaAsOrAllowed=!1)}}}this.atokenInfix=this.ltokenPostfix.toArray(Array(this.ltokenPostfix.size()));return!0});d(c$,"isUserFunction",function(a){a=a.toLowerCase();return!this.isStateScript&&(this.vwr.isFunction(a)||this.htUserFunctions.containsKey(a))},"~S");d(c$,"isExpressionNext",function(){return this.tokPeekIs(1073742332)&&
!(4==this.tokAt(this.itokenInfix+1)&&268435490==this.tokAt(this.itokenInfix+2))||!this.isMathExpressionCommand&&this.tokPeekIs(268435472)});c$.tokenAttr=d(c$,"tokenAttr",function(a,b){return null!=a&&JS.T.tokAttr(a.tok,b)},"JS.T,~N");d(c$,"moreTokens",function(){return this.itokenInfix<this.atokenInfix.length});d(c$,"tokAt",function(a){return a<this.atokenInfix.length?this.atokenInfix[a].tok:0},"~N");d(c$,"tokPeek",function(){return this.itokenInfix>=this.atokenInfix.length?0:this.atokenInfix[this.itokenInfix].tok});
d(c$,"tokPeekIs",function(a){return this.tokAt(this.itokenInfix)==a},"~N");d(c$,"intPeek",function(){return this.itokenInfix>=this.atokenInfix.length?2147483647:this.atokenInfix[this.itokenInfix].intValue});d(c$,"valuePeek",function(){return this.moreTokens()?this.atokenInfix[this.itokenInfix].value:""});d(c$,"tokenNext",function(){return this.itokenInfix>=this.atokenInfix.length?null:this.atokenInfix[this.itokenInfix++]});d(c$,"tokenNextTok",function(a){var b=this.tokenNext();return null!=b&&b.tok==
a},"~N");d(c$,"returnToken",function(){this.itokenInfix--;return!1});d(c$,"getToken",function(){this.theValue=null==(this.theToken=this.tokenNext())?null:this.theToken.value;return this.theToken});d(c$,"getNumericalToken",function(){return null!=this.getToken()&&(2==this.theToken.tok||3==this.theToken.tok)});d(c$,"floatValue",function(){switch(this.theToken.tok){case 2:return this.theToken.intValue;case 3:return this.theValue.floatValue()}return 0});d(c$,"addTokenToPostfix",function(a,b){return this.addTokenToPostfixToken(JS.T.o(a,
b))},"~N,~O");d(c$,"addTokenToPostfixInt",function(a,b,c){return this.addTokenToPostfixToken(JS.T.tv(a,b,c))},"~N,~N,~O");d(c$,"addTokenToPostfixToken",function(a){if(null==a)return!1;this.logMessages&&JU.Logger.debug("addTokenToPostfix"+a);if(268435520==a.tok&&(1073742336==this.lastToken.tok||1073742337==this.lastToken.tok)){var b=this.ltokenPostfix.size()-1;this.ltokenPostfix.removeItemAt(b);this.ltokenPostfix.addLast(JS.T.tokenRightParen);for(var c=0,e,d=this.ltokenPostfix.size();0<=--d&&0<=c;)switch(e=
this.ltokenPostfix.get(d).tok){case 268435473:case 268435521:c++;break;case 268435472:case 268435520:c--;var j;if(1==c&&268435473!=(j=this.ltokenPostfix.get(d-1).tok)&&268435521!=j)b=268435520==e?d-1:d,c=-10;break;default:j=0==d?0:this.ltokenPostfix.get(d-1).tok;if(1073742336==j||1073742337==j){b=d-1;break}d==b-1&&(b=d,c=-10)}-10==c&&this.ltokenPostfix.add(b,JS.T.tokenLeftParen)}this.ltokenPostfix.addLast(a);this.lastToken=a;return!0},"JS.T");d(c$,"addNextToken",function(){return this.addTokenToPostfixToken(this.tokenNext())});
d(c$,"addNextTokenIf",function(a){return this.tokPeekIs(a)&&this.addNextToken()},"~N");d(c$,"addSubstituteTokenIf",function(a,b){if(!this.tokPeekIs(a))return!1;this.itokenInfix++;return this.addTokenToPostfixToken(b)},"~N,JS.T");d(c$,"clauseOr",function(a){this.haveString=!1;if(!this.clauseAnd())return!1;if(this.isEmbeddedExpression&&1073742326==this.lastToken.tok)return!0;for(var b;268435536==(b=this.tokPeek())||268435537==b||268435538==b||a&&268435504==b;){268435504==b&&!this.haveString?this.addSubstituteTokenIf(268435504,
JS.T.tokenOr):this.addNextToken();if(!this.clauseAnd())return!1;if(a&&(1073742338==this.lastToken.tok||10==this.lastToken.tok))this.haveString=!0}return!0},"~B");d(c$,"clauseAnd",function(){if(!this.clauseNot())return!1;if(this.isEmbeddedExpression&&1073742326==this.lastToken.tok)return!0;for(;this.tokPeekIs(268435552);)if(this.addNextToken(),!this.clauseNot())return!1;return!0});d(c$,"clauseNot",function(){return this.tokPeekIs(268435568)?(this.addNextToken(),this.clauseNot()):this.clausePrimitive()});
d(c$,"clausePrimitive",function(){var a=this.tokPeek();switch(a){case 1073742195:return this.itokenInfix++,this.clausePrimitive();case 0:return this.error(4);case 1073742327:case 10:case 268435632:case 136314895:case 2097160:case 2097159:case 2097162:case 1073742331:case 1073742333:case 2097184:return this.addNextToken();case 4:return this.haveString=!0,this.addNextToken();case 3:return this.addTokenToPostfixInt(1073742359,this.fixModelSpec(this.getToken()),this.theValue);case 1094713349:case 1094713350:return this.clauseCell(a);
case 134217736:case 1275203608:return this.clauseConnected(1275203608==a);case 134218756:case 134218757:return this.clauseSubstructure();case 134217759:case 134353926:return this.clauseWithin(134217759==a);case 12290:return this.clauseDefine(!1,!1);case 1677721602:case 1745489939:this.addNextToken();if(this.tokPeekIs(10))this.addNextToken();else if(this.tokPeekIs(12290))return this.clauseDefine(!1,!1);return!0;case 268435472:return this.addNextToken(),!this.clauseOr(!0)?!1:!this.addNextTokenIf(268435473)?
this.errorStr(15,")"):this.checkForItemSelector(!0);case 1073742332:return this.checkForCoordinate(this.isMathExpressionCommand);default:if(this.clauseResidueSpec())return!0;if(this.isError())return!1;if(JS.T.tokAttr(a,1077936128)){var b=this.itokenInfix,c=this.clauseComparator(!0);if(c||this.itokenInfix!=b)return c;if(1237320707==a)return this.clauseSubstructure()}return this.addNextToken()}});d(c$,"checkForCoordinate",function(a){var b=!1,c=this.ltokenPostfix.size();a?(this.addTokenToPostfixToken(JS.T.tokenExpressionBegin),
this.tokenNext()):this.isEmbeddedExpression?(this.tokenNext(),c--):this.addNextToken();var e=this.tokPeekIs(4);if(e){a=!1;this.returnToken();this.ltokenPostfix.removeItemAt(this.ltokenPostfix.size()-1);this.addNextToken();for(var d=1;0!=d;){if(this.tokPeekIs(1073742332))if(this.isExpressionNext()){this.addTokenToPostfixToken(JS.T.o(1073742325,"implicitExpressionBegin"));if(!this.clauseOr(!1))return!1;this.lastToken!==JS.T.tokenCoordinateEnd&&this.addTokenToPostfixToken(JS.T.tokenExpressionEnd)}else d++;
this.tokPeekIs(1073742338)&&d--;this.addNextToken()}}else{if(!this.tokPeekIs(1073742338)&&!this.clauseOr(!1))return!1;for(b=1;!this.tokPeekIs(1073742338);){d=this.addNextTokenIf(268435504);if(!this.clauseOr(!1))return d||3>b?!1:this.errorStr(15,"}");b++}b=2<=b}b&&(a||this.isEmbeddedExpression)?(this.ltokenPostfix.set(c,JS.T.tokenCoordinateBegin),this.addTokenToPostfixToken(JS.T.tokenCoordinateEnd),this.tokenNext()):a?(this.addTokenToPostfixToken(JS.T.tokenExpressionEnd),this.tokenNext()):this.isEmbeddedExpression?
e||this.tokenNext():this.addNextToken();return this.checkForItemSelector(!e)},"~B");d(c$,"checkForItemSelector",function(a){var b;if(268435520==(b=this.tokAt(this.itokenInfix+1))||a&&1073742332==b)return!0;for(;this.addNextTokenIf(268435520);){if(!this.clauseItemSelector())return!1;if(!this.addNextTokenIf(268435521))return this.errorStr(15,"]")}return!0},"~B");d(c$,"clauseWithin",function(a){this.addNextToken();if(!this.addNextTokenIf(268435472)||null==this.getToken())return!1;var b=3.4028235E38,
c=null,e=a,d,j=this.theToken.tok;if(!a){d=-1;for(var h=this.itokenInfix;0!=d;h++)switch(d=this.tokAt(h)){case 268435504:d=0;break;case 1073742332:case 268435472:case 268435473:b=100,this.returnToken(),j=d=0}}switch(j){case 268435616:if(null==this.getToken())return!1;if(2!=this.theToken.tok)return this.error(12);b=-this.theToken.intValue;break;case 2:case 3:b=this.floatValue();break;case 12290:this.addTokenToPostfixToken(this.theToken);if(!this.clauseDefine(!0,!1))return!1;c="";e=!1}if(a&&3.4028235E38==
b)switch(j){case 12290:break;case 1111490587:case 1073742128:case 134218756:case 134218757:case 1237320707:case 1073741925:case 1073742189:this.addTokenToPostfix(4,this.theValue);if(!this.addNextTokenIf(268435504))return!1;e=!1;d=this.tokPeek();switch(d){case 0:return!1;case 4:this.addNextToken();c="";break;case 12290:if(!this.clauseDefine(!1,!0))return!1;c="";break;default:return!1}break;case 1073742328:e=!1;case 1086326785:case 1086326786:case 1073741863:case 1678381065:case 1086326788:case 1073742329:case 1086326789:case 1086324742:case 1814695966:case 136314895:case 1094717454:case 1094713360:case 134217750:case 134219265:case 1094713362:case 1086324744:case 2097184:case 1094713366:case 1639976963:case 4:case 1648363544:c=
this.theValue;break;default:c=this.theValue.toLowerCase()}null==c?this.addTokenToPostfix(3,Float.$valueOf(b)):0<c.length&&this.addTokenToPostfix(4,c);for(h=!1;!h&&(0==j||this.addNextTokenIf(268435504));){0==j&&(j=134353926);var g=!1;d=this.tokPeek();if(a){switch(j){case 2:case 3:if(1073742335==d||1073742334==d){this.addTokenToPostfixToken(this.getToken());if(!this.addNextTokenIf(268435504))break;d=this.tokPeek()}}if(null==c){switch(d){case 134219265:case 1073742329:case 134217750:g=!0;this.addNextToken();
break;case 1073742330:this.getToken();this.getToken();this.addTokenToPostfix(4,"$"+this.theValue);h=!0;break;case 1086324742:case 1648363544:case 1814695966:this.getToken();this.addTokenToPostfix(4,JS.T.nameOf(d));break;case 1073742332:this.returnToken(),g=!0,this.addTokenToPostfixToken(JS.T.getTokenFromName(3.4028235E38==b?"plane":"coord"))}h||this.addNextTokenIf(268435504)}}this.tokPeek();if(h)break;if(g)for(;!this.tokPeekIs(268435473);)switch(this.tokPeek()){case 0:return this.error(4);case 268435472:this.addTokenToPostfixToken(JS.T.tokenExpressionBegin);
this.addNextToken();if(!this.clauseOr(!1))return this.errorIntStr2(18,"WITHIN",": ?");if(!this.addNextTokenIf(268435473))return this.errorStr(15,", / )");this.addTokenToPostfixToken(JS.T.tokenExpressionEnd);break;case 12290:if(!this.clauseDefine(!1,!1))return!1;break;default:this.addTokenToPostfixToken(this.getToken())}else this.clauseOr(e)}return!this.addNextTokenIf(268435473)?this.errorStr(15,")"):!0},"~B");d(c$,"clauseConnected",function(a){this.addNextToken();if(!this.addNextTokenIf(268435472))return this.addTokenToPostfixToken(JS.T.tokenLeftParen),
this.addTokenToPostfixToken(JS.T.tokenRightParen),!0;for(;;){if(this.addNextTokenIf(2)){if(!this.addNextTokenIf(268435504))break;if(a){this.returnToken();break}}else if(a&&(this.addNextTokenIf(4)||this.addNextTokenIf(1073741824)))break;if(this.addNextTokenIf(2)&&!this.addNextTokenIf(268435504))break;if(this.addNextTokenIf(3)&&!this.addNextTokenIf(268435504))break;if(this.addNextTokenIf(3)&&!this.addNextTokenIf(268435504))break;a=this.getToken().value;a=s(a,String)?a:" ";if(131071==JS.ScriptParam.getBondOrderFromString(a))this.returnToken();
else if(this.addTokenToPostfix(4,a),!this.addNextTokenIf(268435504))break;if(this.addNextTokenIf(268435473))return!0;if(!this.clauseOr(this.tokPeekIs(268435472)))return!1;if(this.addNextTokenIf(268435473))return!0;if(!this.addNextTokenIf(268435504)||!this.clauseOr(this.tokPeekIs(268435472)))return!1;break}return!this.addNextTokenIf(268435473)?this.errorStr(15,")"):!0},"~B");d(c$,"clauseSubstructure",function(){this.addNextToken();if(!this.addNextTokenIf(268435472))return!1;if(this.tokPeekIs(12290)){if(!this.clauseDefine(!1,
!0))return!1}else if(!this.addNextTokenIf(4))return this.errorStr(15,'"..."');return this.addNextTokenIf(268435504)&&!this.clauseOr(this.tokPeekIs(268435472))?!1:!this.addNextTokenIf(268435473)?this.errorStr(15,")"):!0});d(c$,"clauseItemSelector",function(){for(var a,b=0;0!=(a=this.tokPeek())&&268435521!=a;)this.addNextToken(),268435520==a&&b++,268435521==this.tokPeek()&&0<b--&&this.addNextToken();return!0});d(c$,"clauseComparator",function(a){var b=this.tokenNext(),c=this.tokenNext();if(!JS.ScriptTokenParser.tokenAttr(c,
268435712)){if(!a)return this.errorStr(15,"== != < > <= >=");null!=c&&this.returnToken();this.returnToken();return!1}if(JS.ScriptTokenParser.tokenAttr(b,1086324736)&&268435860!=c.tok&&268435862!=c.tok&&268435861!=c.tok)return this.errorStr(15,"== !=");if(268435520==this.tokPeek()){this.getToken();for(this.addTokenToPostfixToken(JS.T.tokenLeftParen);;){if(!this.addCompare(b,c))return!1;if(268435504==this.tokPeek())this.getToken();else if(268435521==this.tokPeek())break;this.addTokenToPostfixToken(268435861==
c.tok?JS.T.tokenAnd:JS.T.tokenOr)}this.getToken();this.addTokenToPostfixToken(JS.T.tokenRightParen);return!0}return this.addCompare(b,c)},"~B");d(c$,"addCompare",function(a,b){if(null==this.getToken())return this.errorStr(17,""+this.valuePeek());var c=268435616==this.theToken.tok;if(c&&null==this.getToken())return this.error(12);switch(this.theToken.tok){case 2:case 3:case 1073741824:case 4:case 1073742332:case 12290:break;default:if(!JS.T.tokAttr(this.theToken.tok,1073741824))return this.error(13)}this.addTokenToPostfixInt(b.tok,
a.tok,b.value+(c?" -":""));1715472409==a.tok&&this.addTokenToPostfixToken(a);if(1073742332==this.theToken.tok)return this.returnToken(),this.clausePrimitive();this.addTokenToPostfixToken(this.theToken);return 12290==this.theToken.tok?this.clauseDefine(!0,!1):!0},"JS.T,JS.T");d(c$,"clauseCell",function(a){var b=new JU.P3;this.tokenNext();if(!this.tokenNextTok(268435860))return this.errorStr(15,"=");if(null==this.getToken())return this.error(3);if(2==this.theToken.tok)return JU.SimpleUnitCell.ijkToPoint3f(this.theToken.intValue,
b,1),this.addTokenToPostfix(a,b);if(1073742332!=this.theToken.tok||!this.getNumericalToken())return this.error(3);b.x=this.floatValue();this.tokPeekIs(268435504)&&this.tokenNext();if(!this.getNumericalToken())return this.error(3);b.y=this.floatValue();this.tokPeekIs(268435504)&&this.tokenNext();if(!this.getNumericalToken()||!this.tokenNextTok(1073742338))return this.error(3);b.z=this.floatValue();return this.addTokenToPostfix(a,b)},"~N");d(c$,"clauseDefine",function(a,b){if(!a){var c=this.tokenNext();
b&&(c=JS.T.tokenDefineString);this.addTokenToPostfixToken(c)}if(this.tokPeekIs(0))return this.error(4);if(!this.addSubstituteTokenIf(1073742332,JS.T.tokenExpressionBegin))return 12290==this.tokPeek()&&this.addNextToken(),this.addNextToken()&&this.checkForItemSelector(!0);for(;this.moreTokens()&&!this.tokPeekIs(1073742338);)if(this.tokPeekIs(1073742332)){if(!this.checkForCoordinate(!0))return!1}else this.addNextToken();return this.addSubstituteTokenIf(1073742338,JS.T.tokenExpressionEnd)&&this.checkForItemSelector(!0)},
"~B,~B");d(c$,"generateResidueSpecCode",function(a){this.residueSpecCodeGenerated&&this.addTokenToPostfixToken(JS.T.tokenAndSpec);this.addTokenToPostfixToken(a);return this.residueSpecCodeGenerated=!0},"JS.T");d(c$,"clauseResidueSpec",function(){var a=this.tokPeek(),b=this.residueSpecCodeGenerated=!1;switch(a){case 0:case 2097156:case 2097174:return!1;case 2:case 268435490:case 268435634:case 5:break;case 268435633:case 268435520:case 1073741824:b=!0;break;default:if(JS.T.tokAttr(a,268435712))return!1;
b=""+this.valuePeek();b=2==b.length||3==b.length;if(!b)return!1}var c=!1;if(b){if(!this.clauseResNameSpec())return!1;c=!0;a=this.tokPeek()}if(2==a||268435633==a||5==a){if(!this.clauseSequenceSpec())return!1;c=!0;a=this.tokPeek()}if(268435490==a){if(!this.clauseChainSpec(a))return!1;c=!0;a=this.tokPeek()}if(1073742336==a){if(!this.clauseAtomSpec())return!1;c=!0;a=this.tokPeek()}if(268435634==a){if(!this.clauseAlternateSpec())return!1;c=!0;a=this.tokPeek()}if(268435632==a){if(!this.clauseModelSpec())return!1;
c=!0;this.tokPeek()}if(!c)return this.error(14);this.residueSpecCodeGenerated||this.addTokenToPostfixToken(JS.T.tokenAll);return!0});d(c$,"clauseResNameSpec",function(){this.getToken();var a=this.tokPeek();switch(this.theToken.tok){case 268435633:return!0;case 268435520:for(a="";null!=this.getToken()&&268435521!=this.theToken.tok;)a+=this.theValue;if(null==this.theToken)return!1;if(""===a)return!0;var b;return 0<a.length&&0<=(b=a.indexOf("*"))&&b!=a.length-1?this.error(14):this.generateResidueSpecCode(JS.T.o(1073742360,
a.toUpperCase()));default:if(JS.T.tokAttr(a,268435712))return this.returnToken(),!1;b=this.theValue;268435633==a&&(b=this.theValue+"*",this.getToken());return this.generateResidueSpecCode(JS.T.o(1073741824,b))}});d(c$,"clauseSequenceSpec",function(){if(268435633==this.tokPeek())return null!=this.getToken();var a=this.getSequenceCode(!1);if(null==a)return!1;var b=this.tokPeek();return 268435616==b||2==b&&0>this.intPeek()?(268435616==b?this.tokenNext():(b=-this.intPeek(),this.tokenNext().intValue=b,
this.returnToken()),a.tok=1073742363,this.generateResidueSpecCode(a),this.addTokenToPostfixToken(this.getSequenceCode(!0))):this.generateResidueSpecCode(a)});d(c$,"getSequenceCode",function(a){var b=2147483647,c=2147483647;switch(this.tokPeek()){case 5:b=this.tokenNext().intValue;break;case 2:c=this.tokenNext().intValue;break;default:if(!a)return null}return JS.T.tv(1073742362,c,Integer.$valueOf(b))},"~B");d(c$,"clauseChainSpec",function(a){this.tokenNext();a=this.tokPeek();if(this.isTerminator(a))a=
" ";else{switch(a){case 268435633:return null!=this.getToken();case 2:this.getToken();a=this.theToken.intValue;if(0>a||9999<a)return this.error(8);a=""+a;break;case 4:this.vwr.getChainID("a",!0);default:a=""+this.getToken().value}if(0==a.length)a=" ";else if(a.equals("?"))return!0}a=this.vwr.getChainID(a,!1);return this.generateResidueSpecCode(JS.T.tv(1073742357,a,"spec_chain"))},"~N");d(c$,"clauseAlternateSpec",function(){this.tokenNext();if(this.isTerminator(this.tokPeek()))return this.generateResidueSpecCode(JS.T.o(1073742355,
null));switch(this.getToken().tok){case 268435633:case 4:case 2:case 1073741824:case 805306401:case 1111492629:case 1111492630:case 1111492631:case 1140850705:break;default:return this.error(10)}return this.generateResidueSpecCode(JS.T.o(1073742355,this.theToken.value))});d(c$,"isTerminator",function(a){switch(a){case 0:case 268435632:case 268435552:case 268435536:case 268435568:case 268435504:case 268435473:case 1073742338:return!0;default:return!1}},"~N");d(c$,"clauseModelSpec",function(){this.getToken();
switch(this.tokPeek()){case 268435633:return this.getToken(),!0;case 2:return this.generateResidueSpecCode(JS.T.o(1073742358,Integer.$valueOf(this.getToken().intValue)));case 3:return this.generateResidueSpecCode(JS.T.tv(1073742358,this.fixModelSpec(this.getToken()),this.theValue));case 268435504:case 1073742338:case 0:return this.generateResidueSpecCode(JS.T.o(1073742358,Integer.$valueOf(1)))}return this.error(10)});d(c$,"fixModelSpec",function(a){a=a.intValue;if(2147483647==a){var b=this.theValue.floatValue();
b==I(b)&&(a=1E6*I(b));0>a&&(a=2147483647)}return a},"JS.T");d(c$,"clauseAtomSpec",function(){if(!this.tokenNextTok(1073742336))return this.error(7);if(null==this.getToken())return!0;var a="";if(2==this.theToken.tok&&(a+=""+this.theToken.intValue,null==this.getToken()))return this.error(7);if(268435633==this.theToken.tok)return!0;a+=""+this.theToken.value;this.tokPeekIs(268435633)&&(this.tokenNext(),a+="'");return this.generateResidueSpecCode(JS.T.tv(1073742356,this.vwr.getJBR().lookupSpecialAtomID(a.toUpperCase()),
a))});c$.errorString=d(c$,"errorString",function(a,b,c,d){var f=!1;!d&&!0==(f=J.i18n.GT.getDoTranslate())&&J.i18n.GT.setDoTranslate(!1);switch(a){default:a="Unknown compiler error message number: "+a;break;case 0:a=J.i18n.GT._("bad argument count");break;case 1:a=J.i18n.GT._("invalid context for {0}");break;case 2:a=J.i18n.GT._("command expected");break;case 3:a=J.i18n.GT._("{ number number number } expected");break;case 4:a=J.i18n.GT._("unexpected end of script command");break;case 5:a=J.i18n.GT._("end of expression expected");
break;case 6:a=J.i18n.GT._("identifier or residue specification expected");break;case 7:a=J.i18n.GT._("invalid atom specification");break;case 8:a=J.i18n.GT._("invalid chain specification");break;case 9:a=J.i18n.GT._("invalid expression token: {0}");break;case 10:a=J.i18n.GT._("invalid model specification");break;case 11:a=J.i18n.GT._("missing END for {0}");break;case 12:a=J.i18n.GT._("number expected");break;case 13:a=J.i18n.GT._("number or variable name expected");break;case 14:a=J.i18n.GT._("residue specification (ALA, AL?, A*) expected");
break;case 15:a=J.i18n.GT._("{0} expected");break;case 16:a=J.i18n.GT._("{0} unexpected");break;case 17:a=J.i18n.GT._("unrecognized expression token: {0}");break;case 18:a=J.i18n.GT._("unrecognized {0} parameter");break;case 19:a=J.i18n.GT._("unrecognized token: {0}")}0>a.indexOf("{0}")?null!=b&&(a+=": "+b):(a=JU.PT.rep(a,"{0}",b),0<=a.indexOf("{1}")?a=JU.PT.rep(a,"{1}",c):null!=c&&(a+=": "+c));d||J.i18n.GT.setDoTranslate(f);return a},"~N,~S,~S,~B");d(c$,"commandExpected",function(){this.ichToken=
this.ichCurrentCommand;return this.error(2)});d(c$,"error",function(a){return this.errorIntStr2(a,null,null)},"~N");d(c$,"errorStr",function(a,b){return this.errorIntStr2(a,b,null)},"~N,~S");d(c$,"errorIntStr2",function(a,b,c){var d=JS.ScriptTokenParser.errorString(a,b,c,!0);a=J.i18n.GT.getDoTranslate()?JS.ScriptTokenParser.errorString(a,b,c,!1):null;return this.errorStr2(d,a)},"~N,~S,~S");d(c$,"isError",function(){return null!=this.errorMessage});d(c$,"errorStr2",function(a,b){this.errorMessage=
a;this.errorMessageUntranslated=b;return!1},"~S,~S");T(c$,"ERROR_badArgumentCount",0,"ERROR_badContext",1,"ERROR_commandExpected",2,"ERROR_endOfCommandUnexpected",4,"ERROR_invalidExpressionToken",9,"ERROR_missingEnd",11,"ERROR_tokenExpected",15,"ERROR_tokenUnexpected",16,"ERROR_unrecognizedParameter",18,"ERROR_unrecognizedToken",19,"ERROR_coordinateExpected",3,"ERROR_endOfExpressionExpected",5,"ERROR_identifierOrResidueSpecificationExpected",6,"ERROR_invalidAtomSpecification",7,"ERROR_invalidChainSpecification",
8,"ERROR_invalidModelSpecification",10,"ERROR_numberExpected",12,"ERROR_numberOrVariableNameExpected",13,"ERROR_residueSpecificationExpected",14,"ERROR_unrecognizedExpressionToken",17)})})(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.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.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);
