Clazz.declarePackage("J.viewer");
Clazz.load(["J.api.JmolScriptManager","J.util.JmolList"],"J.viewer.ScriptManager","java.lang.Boolean $.Thread J.api.Interface J.thread.CommandWatcherThread $.ScriptQueueThread J.util.Logger $.SB $.TextFormat".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.scriptQueue=this.commandWatcherThread=this.scriptQueueRunning=this.queueThreads=this.evalTemp=this.eval=this.viewer=null;this.useCommandWatcherThread=!1;this.scriptIndex=0;this.$isScriptQueued=!0;Clazz.instantialize(this,arguments)},
J.viewer,"ScriptManager",null,J.api.JmolScriptManager);Clazz.prepareFields(c$,function(){this.queueThreads=Array(2);this.scriptQueueRunning=Clazz.newBooleanArray(2,!1);this.scriptQueue=new J.util.JmolList});Clazz.overrideMethod(c$,"getEval",function(){return this.eval});Clazz.overrideMethod(c$,"getScriptQueue",function(){return this.scriptQueue});Clazz.overrideMethod(c$,"isScriptQueued",function(){return this.$isScriptQueued});Clazz.makeConstructor(c$,function(){});Clazz.overrideMethod(c$,"setViewer",
function(a){this.viewer=a;this.eval=this.newScriptEvaluator();this.eval.setCompiler()},"J.viewer.Viewer");$_M(c$,"newScriptEvaluator",($fz=function(){return J.api.Interface.getOptionInterface("script.ScriptEvaluator").setViewer(this.viewer)},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"clear",function(a){a?(this.startCommandWatcher(!1),this.interruptQueueThreads()):this.evalTemp=null},"~B");Clazz.overrideMethod(c$,"addScript",function(a,b,c){return this.addScr("String",a,"",b,c)},"~S,~B,~B");$_M(c$,
"addScr",($fz=function(a,b,c,d,e){this.useCommandWatcherThread=!1;this.viewer.global.useScriptQueue||(this.clearQueue(),this.viewer.haltScriptExecution());null==this.commandWatcherThread&&this.useCommandWatcherThread&&this.startCommandWatcher(!0);if(null!=this.commandWatcherThread&&0<=b.indexOf("/*SPLIT*/")){b=J.util.TextFormat.splitChars(b,"/*SPLIT*/");for(var f=0;f<b.length;f++)this.addScr(a,b[f],c,d,e);return"split into "+b.length+" sections for processing"}var f=null!=this.commandWatcherThread&&
(0>b.indexOf("javascript")||0<=b.indexOf("#javascript ")),g=new J.util.JmolList;g.addLast(b);g.addLast(c);g.addLast(a);g.addLast(d?Boolean.TRUE:Boolean.FALSE);g.addLast(e?Boolean.TRUE:Boolean.FALSE);g.addLast(Integer.$valueOf(f?-1:1));this.scriptQueue.addLast(g);this.startScriptQueue(!1);return"pending"},$fz.isPrivate=!0,$fz),"~S,~S,~S,~B,~B");Clazz.overrideMethod(c$,"clearQueue",function(){this.scriptQueue.clear()});Clazz.overrideMethod(c$,"waitForQueue",function(){if(!this.viewer.isSingleThreaded)for(var a=
0;null!=this.queueThreads[0]||null!=this.queueThreads[1];)try{Thread.sleep(100),0==a++%10&&J.util.Logger.debugging&&J.util.Logger.info("...scriptManager waiting for queue: "+this.scriptQueue.size()+" thread="+Thread.currentThread().getName())}catch(b){if(!Clazz.exceptionOf(b,InterruptedException))throw b;}});$_M(c$,"flushQueue",($fz=function(a){for(var b=this.scriptQueue.size();0<=--b;){var c=this.scriptQueue.get(b).get(0);0==c.indexOf(a)&&(this.scriptQueue.remove(b),J.util.Logger.debugging&&J.util.Logger.debug(this.scriptQueue.size()+
" scripts; removed: "+c))}},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"startScriptQueue",($fz=function(a){var b=a?1:0;this.scriptQueueRunning[b]||(this.scriptQueueRunning[b]=!0,this.queueThreads[b]=new J.thread.ScriptQueueThread(this,this.viewer,a,b),this.queueThreads[b].start())},$fz.isPrivate=!0,$fz),"~B");Clazz.overrideMethod(c$,"getScriptItem",function(a,b){if(this.viewer.isSingleThreaded&&this.viewer.queueOnHold)return null;var c=this.scriptQueue.get(0),d=c.get(5).intValue();return(a?0>d:b?0==d:1==
d)?c:null},"~B,~B");Clazz.overrideMethod(c$,"startCommandWatcher",function(a){if(this.useCommandWatcherThread=a){if(null!=this.commandWatcherThread)return;this.commandWatcherThread=new J.thread.CommandWatcherThread(this.viewer,this);this.commandWatcherThread.start()}else{if(null==this.commandWatcherThread)return;this.clearCommandWatcherThread()}J.util.Logger.debugging&&J.util.Logger.info("command watcher "+(a?"started":"stopped")+this.commandWatcherThread)},"~B");$_M(c$,"interruptQueueThreads",function(){for(var a=
0;a<this.queueThreads.length;a++)null!=this.queueThreads[a]&&this.queueThreads[a].interrupt()});$_M(c$,"clearCommandWatcherThread",function(){null!=this.commandWatcherThread&&(this.commandWatcherThread.interrupt(),this.commandWatcherThread=null)});Clazz.overrideMethod(c$,"queueThreadFinished",function(a){this.queueThreads[a].interrupt();this.scriptQueueRunning[a]=!1;this.queueThreads[a]=null;this.viewer.setSyncDriver(4)},"~N");$_M(c$,"runScriptNow",function(){if(0<this.scriptQueue.size()){var a=this.getScriptItem(!0,
!0);null!=a&&(a.set(5,Integer.$valueOf(0)),this.startScriptQueue(!0))}});Clazz.overrideMethod(c$,"evalStringWaitStatusQueued",function(a,b,c,d,e,f){if(null==b)return null;var g=this.checkScriptExecution(b,!1);if(null!=g)return g;var h=null==c||c.equals("output")?new J.util.SB:null,g=this.viewer.statusManager.getStatusList();this.viewer.getStatusChanged(c);this.viewer.isSyntaxCheck&&J.util.Logger.info("--checking script:\n"+this.eval.getScript()+"\n----\n");var j=0==b.indexOf(")");j&&(b=b.substring(1));
j=j||!f;this.viewer.setErrorMessage(null,null);d=d?this.eval.compileScriptFile(b,e):this.eval.compileScriptString(b,e);var k=this.eval.getErrorMessage(),m=this.eval.getErrorMessageUntranslated();this.viewer.setErrorMessage(k,m);this.viewer.refresh(7,"script complete");d?(this.$isScriptQueued=f,e||this.viewer.setScriptStatus(null,b,-2-++this.scriptIndex,null),this.eval.evaluateCompiledScript(this.viewer.isSyntaxCheck,this.viewer.isSyntaxAndFileCheck,j,this.viewer.listCommands,h,f||!this.viewer.isSingleThreaded)):
(this.viewer.scriptStatus(k),this.viewer.setScriptStatus("Jmol script terminated",k,1,m),this.viewer.setStateScriptVersion(null));null!=k&&this.viewer.autoExit&&this.viewer.exitJmol();this.viewer.isSyntaxCheck&&(null==k?J.util.Logger.info("--script check ok"):J.util.Logger.error("--script check error\n"+m),J.util.Logger.info("(use 'exit' to stop checking)"));this.$isScriptQueued=!0;if(a.equalsIgnoreCase("String"))return m;if(null!=h)return null==m?h.toString():m;a=this.viewer.getStatusChanged(c);
this.viewer.getStatusChanged(g);return a},"~S,~S,~S,~B,~B,~B");$_M(c$,"checkScriptExecution",($fz=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},$fz.isPrivate=!0,$fz),"~S,~B");$_M(c$,"checkResume",($fz=function(a){return a.equalsIgnoreCase("resume")?(this.viewer.setScriptStatus("","execution resumed",
0,null),this.eval.resumePausedExecution(),!0):!1},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"checkStepping",($fz=function(a){return a.equalsIgnoreCase("step")?(this.eval.stepPausedExecution(),!0):a.equalsIgnoreCase("?")?(this.viewer.scriptStatus(this.eval.getNextStatement()),!0):!1},$fz.isPrivate=!0,$fz),"~S");Clazz.overrideMethod(c$,"evalStringQuietSync",function(a,b,c){c&&(this.viewer.statusManager.syncingScripts&&0>a.indexOf("#NOSYNC;"))&&this.viewer.syncScript(a+" #NOSYNC;",null,0);this.eval.isPaused()&&
"!"!=a.charAt(0)&&(a="!"+J.util.TextFormat.trim(a,"\n\r\t "));(c=0<a.length&&"!"==a.charAt(0))&&(a=a.substring(1));var d=this.checkScriptExecution(a,c);if(null!=d)return d;if(this.viewer.isScriptExecuting()&&(c||this.eval.isPaused()))return this.viewer.insertedCommand=a,0==a.indexOf("moveto ")&&this.flushQueue("moveto "),"!"+a;this.viewer.insertedCommand="";b&&(a+="\u0001## EDITOR_IGNORE ##");return this.addScript(a,!1,b&&!this.viewer.getBoolean(603979879))},"~S,~B,~B");Clazz.overrideMethod(c$,"checkHalt",
function(a,b){if(a.equalsIgnoreCase("pause"))return this.viewer.pauseScriptExecution(),this.viewer.scriptEditorVisible&&this.viewer.setScriptStatus("","paused -- type RESUME to continue",0,null),!0;if(a.equalsIgnoreCase("menu"))return this.viewer.getProperty("DATA_API","getPopupMenu","\x00"),!0;a=a.toLowerCase();var c=!1,d=null;a.startsWith("exit")?(this.viewer.haltScriptExecution(),this.viewer.clearScriptQueue(),this.viewer.clearTimeouts(),c=a.equals(d="exit")):a.startsWith("quit")&&(this.viewer.haltScriptExecution(),
c=a.equals(d="quit"));if(null==d)return!1;b&&(this.viewer.clearThreads(),this.viewer.queueOnHold=!1);(b||this.viewer.global.waitForMoveTo)&&this.viewer.stopMotion();J.util.Logger.info(this.viewer.isSyntaxCheck?d+" -- stops script checking":(b?"!":"")+d+" received");this.viewer.isSyntaxCheck=!1;return c},"~S,~B");Clazz.overrideMethod(c$,"getAtomBitSetEval",function(a,b){null==a&&(a=this.evalTemp,null==a&&(a=this.evalTemp=this.newScriptEvaluator()));return a.getAtomBitSet(b)},"J.api.JmolScriptEvaluator,~O");
Clazz.overrideMethod(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")});Clazz.declarePackage("J.api");Clazz.declareInterface(J.api,"JmolScriptManager");Clazz.declarePackage("J.thread");
Clazz.load(["J.thread.JmolThread"],"J.thread.CommandWatcherThread",["java.lang.Thread","J.util.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.scriptManager=null;Clazz.instantialize(this,arguments)},J.thread,"CommandWatcherThread",J.thread.JmolThread);Clazz.makeConstructor(c$,function(a,b){Clazz.superConstructor(this,J.thread.CommandWatcherThread);this.setViewer(a,"CommmandWatcherThread");this.scriptManager=b},"J.viewer.Viewer,J.viewer.ScriptManager");Clazz.overrideMethod(c$,"run",function(){for(Thread.currentThread().setPriority(1);!this.stopped;)try{Thread.sleep(50),
this.stopped||this.scriptManager.runScriptNow()}catch(a){if(Clazz.exceptionOf(a,InterruptedException)){var b=a;J.util.Logger.warn("CommandWatcher InterruptedException! "+this);break}else if(Clazz.exceptionOf(a,Exception)){for(var b=a,c="script processing ERROR:\n\n"+b.toString(),d=0;d<b.getStackTrace().length;d++)c+="\n"+b.getStackTrace()[d].toString();J.util.Logger.warn("CommandWatcher Exception! "+c);break}else throw a;}});Clazz.overrideMethod(c$,"run1",function(){},"~N");Clazz.defineStatics(c$,
"commandDelay",50)});Clazz.declarePackage("J.thread");
Clazz.load(["J.thread.JmolThread"],"J.thread.ScriptQueueThread",["J.util.Logger"],function(){c$=Clazz.decorateAsClass(function(){this.scriptManager=null;this.startedByCommandThread=!1;this.pt=0;Clazz.instantialize(this,arguments)},J.thread,"ScriptQueueThread",J.thread.JmolThread);Clazz.makeConstructor(c$,function(a,b,c,d){Clazz.superConstructor(this,J.thread.ScriptQueueThread);this.setViewer(b,"QueueThread"+d);this.scriptManager=a;this.viewer=b;this.startedByCommandThread=c;this.pt=d},"J.api.JmolScriptManager,J.viewer.Viewer,~B,~N");
Clazz.overrideMethod(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");$_M(c$,"runNextScript",($fz=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),
d=b.get(1),e=b.get(2),f=b.get(3).booleanValue(),b=b.get(4).booleanValue();J.util.Logger.debugging&&J.util.Logger.info("Queue["+this.pt+"]["+a.size()+"] scripts; running: "+c);a.remove(0);this.viewer.evalStringWaitStatusQueued(e,c,d,f,b,!0);return 0==a.size()?!1:!0},$fz.isPrivate=!0,$fz))});Clazz.declarePackage("J.script");
Clazz.load(["J.api.JmolScriptEvaluator"],"J.script.ScriptEvaluator","java.lang.Boolean $.Float $.NullPointerException $.Short $.Thread java.util.Hashtable J.atomdata.RadiusData J.constant.EnumAnimationMode $.EnumAxesMode $.EnumPalette $.EnumStereoMode $.EnumStructure $.EnumVdw J.i18n.GT J.io.JmolBinary J.modelset.Atom $.AtomCollection $.Bond $.Group $.LabelToken $.MeasurementData $.ModelCollection $.TickInfo J.script.SV $.ScriptCompiler $.ScriptContext $.ScriptException $.ScriptInterruption $.ScriptMathProcessor $.T J.shape.Object2d J.util.ArrayUtil $.BS $.BSUtil $.BoxInfo $.C $.ColorEncoder $.ColorUtil $.Elements $.Escape $.GData $.JmolEdge $.JmolList $.Logger $.Matrix3f $.Matrix4f $.Measure $.MeshSurface $.P3 $.P4 $.Parser $.Point3fi $.Quaternion $.SB $.TextFormat $.V3 J.viewer.ActionManager $.FileManager $.JC $.StateManager $.Viewer".split(" "),function(){c$=
Clazz.decorateAsClass(function(){this.allowJSThreads=!0;this.executing=this.executionStepping=this.executionPaused=this.executionStopped=this.debugScript=this.logMessages=this.historyDisabled=this.isCmdLine_c_or_C_Option=this.isCmdLine_C_Option=this.chk=this.tQuiet=this.isJS=this.listCommands=!1;this.timeEndExecution=this.timeBeginExecution=0;this.mustResumeEval=!1;this.outputBuffer=this.definedAtomSets=this.compiler=this.viewer=this.currentThread=this.sm=null;this.contextPath="";this.functionName=
this.scriptFileName=null;this.isStateScript=!1;this.commandHistoryLevelMax=this.scriptReportingLevel=this.scriptLevel=0;this.$script=this.contextVariables=this.lineIndices=this.lineNumbers=this.aatoken=null;this.pc=0;this.st=this.fullCommand=this.thisCommand=null;this.pcEnd=this.lineEnd=this.iToken=this.slen=0;this.scriptExtensions=null;this.forceNoAddHydrogens=!1;this.thisContext=this.parallelProcessor=null;this.$error=!1;this.errorType=this.errorMessageUntranslated=this.errorMessage=null;this.iCommandError=
0;this.ignoreError=!1;this.tempStatement=null;this.isBondSet=!1;this.expressionResult=null;this.theTok=0;this.theToken=null;this.coordinatesAreFractional=!1;this.$data=this.fractionalPoint=null;Clazz.instantialize(this,arguments)},J.script,"ScriptEvaluator",null,J.api.JmolScriptEvaluator);Clazz.overrideMethod(c$,"getAllowJSThreads",function(){return this.allowJSThreads});Clazz.overrideMethod(c$,"setViewer",function(a){this.viewer=a;this.compiler=null==this.compiler?a.compiler:this.compiler;this.isJS=
a.isSingleThreaded;this.definedAtomSets=a.definedAtomSets;return this},"J.viewer.Viewer");Clazz.makeConstructor(c$,function(){this.currentThread=Thread.currentThread()});Clazz.overrideMethod(c$,"setCompiler",function(){this.viewer.compiler=this.compiler=new J.script.ScriptCompiler(this.viewer)});Clazz.overrideMethod(c$,"compileScriptString",function(a,b){this.clearState(b);this.contextPath="[script]";return this.compileScript(null,a,this.debugScript)},"~S,~B");Clazz.overrideMethod(c$,"compileScriptFile",
function(a,b){this.clearState(b);this.contextPath=a;return this.compileScriptFileInternal(a,null,null,null)},"~S,~B");Clazz.overrideMethod(c$,"evaluateCompiledScript",function(a,b,c,d,e,f){var g=this.isCmdLine_C_Option;this.isCmdLine_C_Option=b;this.executionStepping=this.executionStopped=this.executionPaused=!1;this.executing=!0;this.chk=this.isCmdLine_c_or_C_Option=a;this.timeBeginExecution=System.currentTimeMillis();this.historyDisabled=c;this.outputBuffer=e;this.currentThread=Thread.currentThread();
this.allowJSThreads=f;this.listCommands=d;this.startEval();this.isCmdLine_C_Option=g;this.viewer.setStateScriptVersion(null)},"~B,~B,~B,~B,J.util.SB,~B");$_M(c$,"createFunction",($fz=function(a,b,c){var d=new J.script.ScriptEvaluator;d.setViewer(this.viewer);try{d.compileScript(null,"function "+a+"("+b+") { return "+c+"}",!1);var e=new J.util.JmolList;for(a=0;a<b.length;a+=2)e.addLast(J.script.SV.newVariable(3,Float.$valueOf(0)).setName(b.substring(a,a+1)));return[d.aatoken[0][1].value,e]}catch(f){if(Clazz.exceptionOf(f,
Exception))return null;throw f;}},$fz.isPrivate=!0,$fz),"~S,~S,~S");$_M(c$,"useThreads",($fz=function(){return!this.viewer.autoExit&&this.viewer.haveDisplay&&null==this.outputBuffer},$fz.isPrivate=!0,$fz));$_M(c$,"startEval",($fz=function(){this.viewer.pushHoldRepaintWhy("runEval");this.setScriptExtensions();this.executeCommands(!1)},$fz.isPrivate=!0,$fz));$_M(c$,"executeCommands",($fz=function(a){var b=!1;try{if(!this.dispatchCommands(!1,!1))return}catch(c){if(Clazz.exceptionOf(c,Error))this.viewer.handleError(c,
!1),this.setErrorMessage(""+c+" "+this.viewer.getShapeErrorState()),this.errorMessageUntranslated=""+c,this.scriptStatusOrBuffer(this.errorMessage),b=!0;else if(Clazz.exceptionOf(c,J.script.ScriptException)){if(Clazz.instanceOf(c,J.script.ScriptInterruption))return;if(a){this.viewer.setStringProperty("_errormessage",""+c);return}this.setErrorMessage(c.toString());this.errorMessageUntranslated=c.getErrorMessageUntranslated();this.scriptStatusOrBuffer(this.errorMessage);this.viewer.notifyError(null!=
this.errorMessage&&0<=this.errorMessage.indexOf("java.lang.OutOfMemoryError")?"Error":"ScriptException",this.errorMessage,this.errorMessageUntranslated);b=!0}else throw c;}if(b||!this.isJS||!this.allowJSThreads)this.viewer.setTainted(!0),this.viewer.popHoldRepaintWhy("runEval");this.timeEndExecution=System.currentTimeMillis();null==this.errorMessage&&this.executionStopped?this.setErrorMessage("execution interrupted"):!this.tQuiet&&!this.chk&&this.viewer.scriptStatus("Script completed");this.executing=
this.chk=this.isCmdLine_c_or_C_Option=this.historyDisabled=!1;a=this.getErrorMessageUntranslated();this.viewer.setErrorMessage(this.errorMessage,a);this.tQuiet||this.viewer.setScriptStatus("Jmol script terminated",this.errorMessage,1+this.getExecutionWalltime(),a)},$fz.isPrivate=!0,$fz),"~B");Clazz.overrideMethod(c$,"resumeEval",function(a){this.setErrorMessage(null);this.executionStopped||null==a||!a.mustResumeEval?(this.viewer.setTainted(!0),this.viewer.popHoldRepaintWhy("runEval"),this.viewer.queueOnHold=
!1):(this.executionPaused||a.pc++,this.thisContext=a,0<a.scriptLevel&&(this.scriptLevel=a.scriptLevel-1),this.restoreScriptContext(a,!0,!1,!1),this.executeCommands(a.isTryCatch))},"J.script.ScriptContext");Clazz.overrideMethod(c$,"runScriptBuffer",function(a,b){this.pushContext(null);this.contextPath+=" >> script() ";this.outputBuffer=b;this.allowJSThreads=!1;this.compileScript(null,a+"\u0001## EDITOR_IGNORE ##",!1)&&this.dispatchCommands(!1,!1);this.popContext(!1,!1)},"~S,J.util.SB");Clazz.overrideMethod(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)}catch(b){if(Clazz.exceptionOf(b,J.script.ScriptException))this.setErrorMessage(b.toString()),a=this.getScriptContext();else throw b;}this.chk=!1;return a},"~S");c$.getContextTrace=$_M(c$,"getContextTrace",function(a,b,c){null==b&&(b=new J.util.SB);
b.append(J.script.ScriptEvaluator.setErrorLineMessage(a.functionName,a.scriptFileName,a.lineNumbers[a.pc],a.pc,J.script.ScriptEvaluator.statementAsString(a.statement,c?a.iToken:9999,!1)));null!=a.parentContext&&J.script.ScriptEvaluator.getContextTrace(a.parentContext,b,!1);return b},"J.script.ScriptContext,J.util.SB,~B");Clazz.overrideMethod(c$,"setDebugging",function(){this.logMessages=(this.debugScript=this.viewer.getBoolean(603979824))&&J.util.Logger.debugging});$_M(c$,"getExecutionWalltime",($fz=
function(){return this.timeEndExecution-this.timeBeginExecution},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"haltExecution",function(){this.resumePausedExecution();this.executionStopped=!0});Clazz.overrideMethod(c$,"pauseExecution",function(a){!this.chk&&!this.viewer.isHeadless()&&(a&&!this.isJS&&this.viewer.delayScript(this,-100),this.viewer.popHoldRepaintWhy("pauseExecution"),this.executionStepping=!1,this.executionPaused=!0)},"~B");Clazz.overrideMethod(c$,"stepPausedExecution",function(){this.executionStepping=
!0;this.executionPaused=!1});Clazz.overrideMethod(c$,"resumePausedExecution",function(){this.executionStepping=this.executionPaused=!1});Clazz.overrideMethod(c$,"isExecuting",function(){return this.executing&&!this.executionStopped});Clazz.overrideMethod(c$,"isPaused",function(){return this.executionPaused});Clazz.overrideMethod(c$,"isStepping",function(){return this.executionStepping});Clazz.overrideMethod(c$,"isStopped",function(){return this.executionStopped||!this.isJS&&this.currentThread!==Thread.currentThread()});
Clazz.overrideMethod(c$,"getNextStatement",function(){return this.pc<this.aatoken.length?J.script.ScriptEvaluator.setErrorLineMessage(this.functionName,this.scriptFileName,this.getLinenumber(null),this.pc,J.script.ScriptEvaluator.statementAsString(this.aatoken[this.pc],-9999,this.logMessages)):""});$_M(c$,"getCommand",($fz=function(a,b){if(a>=this.lineIndices.length)return"";if(b){for(var c=-1,d=this.$script.length,e=0;e<this.lineNumbers.length;e++)if(this.lineNumbers[e]==this.lineNumbers[a])0>c&&
(c=this.lineIndices[e][0]),d=this.lineIndices[e][1];else if(0==this.lineNumbers[e]||this.lineNumbers[e]>this.lineNumbers[a])break;d==this.$script.length-1&&this.$script.endsWith("}")&&d++;return c==this.$script.length||d<c?"":this.$script.substring(Math.max(c,0),Math.min(this.$script.length,d))}c=this.lineIndices[a][0];d=this.lineIndices[a][1];e="";if(0>c||d<=c||d>this.$script.length)return"";try{e=this.$script.substring(c,d),0<=e.indexOf("\\\n")&&(e=J.util.TextFormat.simpleReplace(e,"\\\n","  ")),
0<=e.indexOf("\\\r")&&(e=J.util.TextFormat.simpleReplace(e,"\\\r","  ")),0<e.length&&!e.endsWith(";")&&(e+=";")}catch(f){if(Clazz.exceptionOf(f,Exception))J.util.Logger.error("darn problem in Eval getCommand: ichBegin="+c+" ichEnd="+d+" len = "+this.$script.length+"\n"+f);else throw f;}return e},$fz.isPrivate=!0,$fz),"~N,~B,~B");$_M(c$,"logDebugScript",($fz=function(a){if(this.logMessages){0<this.st.length&&J.util.Logger.debug(this.st[0].toString());for(var b=1;b<this.slen;++b)J.util.Logger.debug(this.st[b].toString())}this.iToken=
-9999;this.logMessages?(b=new J.util.SB,a=0<a?"                          ".substring(0,2*a):"",b.append(a).append(J.script.ScriptEvaluator.statementAsString(this.st,this.iToken,this.logMessages)),this.viewer.scriptStatus(b.toString())):(a=this.getCommand(this.pc,!1,!1),""!==a&&this.viewer.scriptStatus(a))},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"evaluateExpression",function(a,b){var c=(new J.script.ScriptEvaluator).setViewer(this.viewer);try{c.pushContext(null),c.allowJSThreads=!1}catch(d){if(!Clazz.exceptionOf(d,
J.script.ScriptException))throw d;}return c.evaluate(a,b)},"~O,~B");$_M(c$,"evaluate",($fz=function(a,b){try{if(Clazz.instanceOf(a,String)){if(this.compileScript(null,"e_x_p_r_e_s_s_i_o_n = "+a,!1))return this.contextVariables=this.viewer.getContextVariables(),this.setStatement(0),b?this.parameterExpressionList(2,-1,!1).get(0):this.parameterExpressionString(2,0)}else if(Clazz.instanceOf(a,Array)){this.contextVariables=this.viewer.getContextVariables();var c=this.atomExpression(a,0,0,!0,!1,!0,!1);
return b?J.script.SV.newScriptVariableBs(c,-1):c}}catch(d){if(Clazz.exceptionOf(d,Exception))J.util.Logger.error("Error evaluating: "+a+"\n"+d);else throw d;}return b?J.script.SV.getVariable("ERROR"):"ERROR"},$fz.isPrivate=!0,$fz),"~O,~B");Clazz.overrideMethod(c$,"evaluateParallel",function(a,b){var c=new J.script.ScriptEvaluator;c.setViewer(this.viewer);c.historyDisabled=!0;c.compiler=new J.script.ScriptCompiler(this.viewer);c.sm=b;try{c.restoreScriptContext(a,!0,!1,!1),c.allowJSThreads=!1,c.dispatchCommands(!1,
!1)}catch(d){if(Clazz.exceptionOf(d,Exception))return this.viewer.setStringProperty("_errormessage",""+d),null==c.thisContext&&(J.util.Logger.error("Error evaluating context"),d.printStackTrace()),!1;throw d;}return!0},"J.script.ScriptContext,J.viewer.ShapeManager");Clazz.overrideMethod(c$,"getAtomBitSet",function(a){if(Clazz.instanceOf(a,J.util.BS))return a;var b=new J.util.BS;try{this.pushContext(null);var c="select ("+a+")",c=J.util.TextFormat.replaceAllCharacters(c,"\n\r","),("),c=J.util.TextFormat.simpleReplace(c,
"()","(none)");this.compileScript(null,c,!1)&&(this.st=this.aatoken[0],b=this.atomExpression(this.st,1,0,!1,!1,!0,!0));this.popContext(!1,!1)}catch(d){if(Clazz.exceptionOf(d,Exception))J.util.Logger.error("getAtomBitSet "+a+"\n"+d);else throw d;}return b},"~O");Clazz.overrideMethod(c$,"getAtomBitSetVector",function(a,b){for(var c=new J.util.JmolList,d=this.getAtomBitSet(b),e=d.nextSetBit(0);0<=e;e=d.nextSetBit(e+1))c.addLast(Integer.$valueOf(e));return c},"~N,~O");$_M(c$,"parameterExpressionList",
($fz=function(a,b,c){return this.parameterExpression(a,-1,null,!0,!0,b,c,null,null)},$fz.isPrivate=!0,$fz),"~N,~N,~B");$_M(c$,"parameterExpressionString",($fz=function(a,b){return this.parameterExpression(a,b,"",!0,!1,-1,!1,null,null)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"parameterExpressionBoolean",($fz=function(a,b){return this.parameterExpression(a,b,null,!0,!1,-1,!1,null,null).booleanValue()},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"parameterExpressionToken",($fz=function(a){a=this.parameterExpressionList(a,
-1,!1);return 0<a.size()?a.get(0):J.script.SV.newVariable(4,"")},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"parameterExpression",($fz=function(a,b,c,d,e,f,g,h,j){var k,m,l=null!=j,s=0>a,p=!e&&null==c;c=!e&&null!=c&&0==c.length;var r=0;s&&(a=-a);var v=0;e=new J.script.ScriptMathProcessor(this,g,e,!1);0==a&&0==b&&(a=2);b<a&&(b=this.slen);g=a;a:for(;g<b;g++){k=null;var y=this.getToken(g).tok;if(l&&1048584!=this.tokAt(g+1)){var z=null!=h&&h.containsKey(this.theToken.value)?null:this.getBitsetPropertySelector(g,
!1);if(null!=z){e.addXVar(h.get(j));e.addOpAllowMath(z,269484048==this.tokAt(g+1))||this.error(22);if((135368713==z.intValue||102436==z.intValue)&&269484048!=this.tokAt(this.iToken+1))e.addOp(J.script.T.tokenLeftParen),e.addOp(J.script.T.tokenRightParen);g=this.iToken;continue}}switch(y){case 1060866:if(1048577==this.tokAt(++g))k=this.parameterExpressionToken(++g),g=this.iToken;else if(2==this.tokAt(g)){k=this.viewer.getAtomBits(1095763969,Integer.$valueOf(this.st[g].intValue));break}else k=this.getParameter(J.script.SV.sValue(this.st[g]),
1073742190);k=this.getParameter(k.asString(),1073742190);break;case 135369225:269484048!=this.getToken(++g).tok&&this.error(22);null==h&&(h=new java.util.Hashtable);m=this.parameterExpression(++g,-1,null,d,!1,-1,!1,h,j);z=m.booleanValue();y=this.iToken;1048591!=this.getToken(y++).tok&&this.error(22);this.parameterExpressionBoolean(y,-1);var n=this.iToken;1048591!=this.tokAt(n++)&&this.error(22);this.parameterExpression(-n,-1,null,d,!1,1,!1,h,j);g=this.iToken;269484049!=this.tokAt(g)&&this.error(22);
k=this.parameterExpression(z?y:n,z?n:g,"XXX",d,!1,1,!1,h,j);break;case 135369224:case 135280132:y=(z=0<a)&&135369224==y;z?((269484048!=this.getToken(++g).tok||!J.script.T.tokAttr(this.getToken(++g).tok,1073741824))&&this.error(22),n=this.parameterAsString(g),1048591!=this.getToken(++g).tok&&this.error(22)):n="_x";k=this.parameterExpressionToken(-++g).value;Clazz.instanceOf(k,J.util.BS)||this.error(22);g=this.iToken;z&&1048591!=this.getToken(g++).tok&&this.error(22);var w=new J.util.BS,u=new J.util.BS,
t=y?Array(J.util.BSUtil.cardinalityOf(k)):null;null==h&&(h=new java.util.Hashtable);u.set(0);var A=J.script.SV.newScriptVariableBs(u,0);h.put(n,A.setName(n));var G=-1;if(z){G=g-1;m=0;for(var H;0<=m&&++G<b;)269484049==(H=this.tokAt(G))?m--:269484048==H&&m++}var K=0,C=0,P=k.nextSetBit(0);if(0>P)this.iToken=G-1;else if(!this.chk)for(;0<=P;P=k.nextSetBit(P+1))0<=C&&u.clear(C),C=P,u.set(P),A.index=P,m=this.parameterExpression(g,G,y?"XXX":null,d,y,P,!1,h,z?null:n),y?((null==m||0==m.size())&&this.error(22),
t[K++]=m.get(0).asString()):m.booleanValue()&&w.set(P);if(y)k=t;else if(z)k=w;else return this.bitsetVariableVector(w);g=this.iToken+1;break;case 1048591:break a;case 3:e.addXNum(J.script.SV.newVariable(3,this.theToken.value));break;case 1048614:case 2:e.addXNum(J.script.SV.newScriptVariableInt(this.theToken.intValue));break;case 135266319:if(269484048==this.tokAt(this.iToken+1)){e.addOpAllowMath(this.theToken,!0)||this.error(22);break}e.addXVar(J.script.SV.newScriptVariableToken(this.theToken));
break;case 1087375362:case 1087375361:case 1048580:case 1679429641:case 1087373316:case 1048582:case 1087375365:case 1087373318:case 1095766028:case 1095761934:case 1087373320:case 1095761938:case 135267335:case 135267336:case 1238369286:case 1641025539:case 1048589:case 1048588:case 4:case 8:case 9:case 11:case 12:case 10:case 6:e.addXVar(J.script.SV.newScriptVariableToken(this.theToken));break;case 1048583:this.ignoreError=!0;var N;try{N=this.centerParameter(g),e.addXVar(J.script.SV.newVariable(8,
N))}catch(R){if(Clazz.exceptionOf(R,Exception))e.addXStr("");else throw R;}this.ignoreError=!1;g=this.iToken;break;case 1048586:k=4==this.tokAt(g+1)?this.getHash(g):this.getPointOrPlane(g,!1,!0,!0,!1,3,4);g=this.iToken;break;case 1048577:if(1048578==this.tokAt(g+1)){k=new java.util.Hashtable;g++;break}else 1048579==this.tokAt(g+1)&&1048578==this.tokAt(g+2)&&(y=1048579,this.iToken+=2);case 1048579:k=1048579==y?this.viewer.getModelUndeletedAtomsBitSet(-1):this.atomExpression(this.st,g,0,!0,!0,!0,!0);
g=this.iToken;if(0==v&&s)return this.iToken++,this.bitsetVariableVector(k);break;case 1073742195:e.addOp(this.theToken);continue;case 1048578:break a;case 1048590:if(!d&&0==v&&0==r)break a;this.error(22);break;case 269484080:if(!d&&0==v&&0==r)break a;e.addOp(this.theToken)||this.error(22);break;case 1048584:z=this.getBitsetPropertySelector(g+1,!1);null==z&&this.error(22);g=135368713==z.intValue;y=!0;H=this.tokAt(this.iToken+2);if(1048584==this.tokAt(this.iToken+1))switch(H){case 1048579:H=480,1048584==
this.tokAt(this.iToken+3)&&1276118529==this.tokAt(this.iToken+4)&&(H=224);case 32:case 64:case 192:case 128:case 160:case 96:y=g||480==H||224==H,z.intValue|=H,this.getToken(this.iToken+2)}y=(new Boolean(y&(269484048==this.tokAt(this.iToken+1)||g))).valueOf();e.addOpAllowMath(z,y)||this.error(22);g=this.iToken;135368713==z.intValue&&269484048!=this.tokAt(g+1)&&(e.addOp(J.script.T.tokenLeftParen),e.addOp(J.script.T.tokenRightParen));break;default:if(J.script.T.tokAttr(this.theTok,269484032)||J.script.T.tokAttr(this.theTok,
135266304)&&269484048==this.tokAt(this.iToken+1)){if(!e.addOp(this.theToken)){if(0<=f)break a;this.error(22)}switch(this.theTok){case 269484048:v++;break;case 269484049:if(0>=--v&&0==r&&s){this.iToken++;break a}break;case 269484096:r++;break;case 269484097:if(0==--r&&0==v&&s){this.iToken++;break a}}}else{z=this.parameterAsString(g).toLowerCase();y=269484048==this.tokAt(g+1);if(this.chk)k=z;else if(!y&&(null==h||null==(k=h.get(z))))k=this.getContextVariableAsVariable(z);null==k&&(J.script.T.tokAttr(this.theTok,
1073741824)&&this.viewer.isFunction(z)?(e.addOp(J.script.SV.newVariable(135368713,this.theToken.value))||this.error(22),y||(e.addOp(J.script.T.tokenLeftParen),e.addOp(J.script.T.tokenRightParen))):e.addXVar(this.viewer.getOrSetNewVariable(z,!1)))}}null!=k&&(Clazz.instanceOf(k,J.util.BS)?e.addXBs(k):e.addXObj(k))}a=e.getResult(!1);null==a&&(this.chk||e.dumpStacks("null result"),this.error(13));if(135198==a.tok)return a.value;if(p)return Boolean.$valueOf(a.asBoolean());if(c)return 4==a.tok&&(a.intValue=
2147483647),a.asString();switch(a.tok){case 1048589:case 1048588:return Boolean.$valueOf(1==a.intValue);case 2:return Integer.$valueOf(a.intValue);default:return a.value}},$fz.isPrivate=!0,$fz),"~N,~N,~S,~B,~B,~N,~B,java.util.Map,~S");$_M(c$,"getHash",($fz=function(a){var b=new java.util.Hashtable;for(a+=1;a<this.slen&&1048590!=this.tokAt(a);a++){var c=this.stringParameter(a++);269484066!=this.tokAt(a++)&&this.error(22);a=this.parameterExpression(a,0,null,!1,!0,-1,!1,null,null);b.put(c,a.get(0));
a=this.iToken;if(269484080!=this.tokAt(a))break}this.iToken=a;1048590!=this.tokAt(a)&&this.error(22);return b},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"bitsetVariableVector",function(a){var b=new J.util.JmolList;Clazz.instanceOf(a,J.util.BS)&&b.addLast(J.script.SV.newVariable(10,a));return b},"~O");$_M(c$,"getBitsetIdent",function(a,b,c,d,e,f){var g=!Clazz.instanceOf(c,J.modelset.Bond.BondSet);g&&(null==b?b=this.viewer.getStandardLabelFormat(0):0==b.length&&(b="%[label]"));var h=null==b?-1:b.indexOf("%"),
j=2147483647!=e;if(null==a||this.chk||g&&0>h)return null==b&&(b=""),f?[b]:b;var h=this.viewer.modelSet,k=0;c=g||!d?null:c.getAssociatedAtoms();null==c&&(null!=b&&0<b.indexOf("%D"))&&(c=this.viewer.getAtomIndices(a));d=null==b||0==b.length;var m=g||d?null:J.modelset.LabelToken.getBondLabelValues();b=d?null:g?J.modelset.LabelToken.compile(this.viewer,b,"\x00",null):J.modelset.LabelToken.compile(this.viewer,b,"\u0001",m);var l=j?1:J.util.BSUtil.cardinalityOf(a),s=Array(l);for(e=j?e:a.nextSetBit(0);0<=
e;e=a.nextSetBit(e+1)){var p;g?p=d?h.atoms[e].getInfo():J.modelset.LabelToken.formatLabelAtomArray(this.viewer,h.atoms[e],b,"\x00",c):(p=h.getBondAt(e),p=d?p.getIdentity():J.modelset.LabelToken.formatLabelBond(this.viewer,p,b,m,c));p=J.util.TextFormat.formatStringI(p,"#",k+1);s[k++]=p;if(j)break}return 1==l&&!f?s[0]:s},"J.util.BS,~S,~O,~B,~N,~B");$_M(c$,"getBitsetPropertySelector",($fz=function(a,b){var c=this.getToken(a).tok;switch(c){case 32:case 64:case 96:case 192:case 128:case 160:case 1716520973:break;
default:if(J.script.T.tokAttrOr(c,1078984704,1141899264))break;if(806354977!=c&&!J.script.T.tokAttr(c,1073741824))return null;c=this.parameterAsString(a);if(!b&&this.viewer.isFunction(c)){c=135368713;break}if(!c.endsWith("?"))return null;c=1073741824}return b&&!J.script.T.tokAttr(c,2048)?null:J.script.SV.newScriptVariableIntValue(269484241,c,this.parameterAsString(a).toLowerCase())},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"getBitsetPropertyFloat",($fz=function(a,b,c,d){a=this.getBitsetProperty(a,b,
null,null,null,null,!1,2147483647,!1);if(!Float.isNaN(c))for(b=0;b<a.length;b++)a[b]<c&&(a[b]=NaN);if(!Float.isNaN(d))for(b=0;b<a.length;b++)a[b]>d&&(a[b]=NaN);return a},$fz.isPrivate=!0,$fz),"J.util.BS,~N,~N,~N");$_M(c$,"getBitsetProperty",function(a,b,c,d,e,f,g,h,j){var k=2147483647!=h,m=k||!Clazz.instanceOf(e,J.modelset.Bond.BondSet),l=b&480,s=224==l,p=this.viewer.getAtomCount(),r=256==l?Clazz.newFloatArray(p,0):null,v=480==l||s;b&=-481;0==b&&(b=m?1141899265:1678770178);var y=!1,z=!1,n=!1;switch(b){case 1146095626:case 1146095631:case 1146095627:case 1146095629:case 1146093582:case 1766856708:case 1146095628:y=
!0;break;case 135368713:case 1276118018:break;default:z=J.script.T.tokAttr(b,1095761920)&&!J.script.T.tokAttr(b,1112539136),n=!z&&J.script.T.tokAttr(b,1087373312)}var w=256==l?new J.util.P3:null,u=y||!m?new J.util.P3:null;if(v||n&&!k&&256!=l&&32!=l)l=1048579;var t=1048579==l?new J.util.JmolList:null,A=null,G=A=null,H=null,K=null,C=null,P=null;switch(b){case 1141899265:case 1678770178:if(this.chk)return a;A=1141899265==b?m?a:this.viewer.getAtomBits(1678770178,a):m?new J.modelset.Bond.BondSet(this.viewer.getBondsForSelectedAtoms(a)):
a;switch(l){case 32:h=A.nextSetBit(0);break;case 64:h=A.length()-1;break;case 192:case 128:case 160:return Float.$valueOf(NaN);default:return A}A.clearAll();0<=h&&A.set(h);return A;case 1087373321:switch(l){case 0:case 1048579:return this.getBitsetIdent(a,null,e,g,h,v)}return"";case 135368713:A=f[0];G=f[1];H=J.util.BSUtil.newBitSet(p);K=J.script.SV.newVariable(10,H);break;case 1112539148:case 1112539149:this.viewer.autoCalculate(b);break;case 1276118018:if(null==c&&null==d)return new J.util.P3;break;
case 1766856708:C=new J.util.P3;break;case 1716520973:P=this.viewer.getDataFloat(f)}var N=f=0,R=g=0,M=0,V=0;switch(l){case 32:g=2147483647;R=3.4028235E38;break;case 64:g=-2147483648,R=-3.4028235E38}var L=this.viewer.modelSet;e=y?3:n?2:z?1:0;if(m){var C=null!=a,m=-1,D;k?(D=h,p=h+1):C?(D=a.nextSetBit(0),p=Math.min(p,a.length())):D=0;this.chk&&(p=0);for(h=D;0<=h&&h<p;h=C?a.nextSetBit(h+1):h+1){f++;var S=L.atoms[h];switch(e){case 0:D=3.4028235E38;switch(b){case 135368713:H.set(h);D=J.script.SV.fValue(this.runFunctionRet(null,
A,G,K,!0,!0,!1));H.clear(h);break;case 1716520973:D=null==P?0:P[h];break;case 1276118018:D=null!=d?J.util.Measure.distanceToPlane(d,S):S.distance(c);break;default:D=J.modelset.Atom.atomPropertyFloat(this.viewer,S,b)}if(3.4028235E38==D||Float.isNaN(D)&&1048579!=l){f--;continue}switch(l){case 32:D<R&&(R=D);break;case 64:D>R&&(R=D);break;case 256:r[h]=D;break;case 1048579:t.addLast(Float.$valueOf(D));break;case 160:case 192:V+=D*D;default:M+=D}break;case 1:D=0;switch(b){case 1297090050:S.getModelIndex()!=
m&&(m=S.getModelIndex());S=S.getAtomSymmetry();if(null==S)break;var x=0;switch(l){case 32:N=2147483647;break;case 64:N=-2147483648}for(var I=S.nextSetBit(0);0<=I;I=S.nextSetBit(I+1)){D+=I+1;switch(l){case 32:N=Math.min(N,I+1);break;case 64:N=Math.max(N,I+1)}x++}switch(l){case 32:case 64:D=N}f+=x-1;break;case 1095766022:case 1095761925:this.errorStr(45,J.script.T.nameOf(b));break;default:D=J.modelset.Atom.atomPropertyInt(S,b)}switch(l){case 32:D<g&&(g=D);break;case 64:D>g&&(g=D);break;case 256:r[h]=
D;break;case 1048579:t.addLast(Integer.$valueOf(D));break;case 160:case 192:V+=D*D;default:M+=D}break;case 2:D=J.modelset.Atom.atomPropertyString(this.viewer,S,b);switch(l){case 256:r[h]=J.util.Parser.parseFloatStr(D);break;default:if(null==t)return D;t.addLast(D)}break;case 3:switch(D=J.modelset.Atom.atomPropertyTuple(S,b),null==D&&this.errorStr(45,J.script.T.nameOf(b)),l){case 256:r[h]=Math.sqrt(D.x*D.x+D.y*D.y+D.z*D.z);break;case 1048579:t.addLast(J.util.P3.newP(D));break;default:u.add(D)}}if(k)break}}else{D=
(c=null==a)?0:a.nextSetBit(0);p=this.viewer.getBondCount();for(h=D;0<=h&&h<p;h=c?h+1:a.nextSetBit(h+1))switch(f++,d=L.getBondAt(h),b){case 1141899267:D=d.getAtom1().distance(d.getAtom2());switch(l){case 32:D<R&&(R=D);break;case 64:D>R&&(R=D);break;case 1048579:t.addLast(Float.$valueOf(D));break;case 160:case 192:V+=D*D;default:M+=D}break;case 1146095626:switch(l){case 1048579:u.setT(d.getAtom1());u.add(d.getAtom2());u.scale(0.5);t.addLast(J.util.P3.newP(u));break;default:u.add(d.getAtom1()),u.add(d.getAtom2()),
f++}break;case 1766856708:J.util.ColorUtil.colorPointFromInt(this.viewer.getColorArgbOrGray(d.colix),C);switch(l){case 1048579:t.addLast(J.util.P3.newP(C));break;default:u.add(C)}break;default:this.errorStr(46,J.script.T.nameOf(b))}}if(256==l)return r;if(1048579==l){if(j)return t;a=t.size();if(n&&!v&&1==a)return t.get(0);if(s){r=Clazz.newFloatArray(a,0);for(h=a;0<=--h;)switch(b=t.get(h),e){case 0:r[h]=b.floatValue();break;case 1:r[h]=b.floatValue();break;case 2:r[h]=J.util.Parser.parseFloatStr(b);
break;case 3:r[h]=b.distance(w)}return r}if(1087373320==b){r=new J.util.SB;for(h=0;h<a;h++)r.append(t.get(h));return r.toString()}r=Array(a);for(h=a;0<=--h;)b=t.get(h),r[h]=Clazz.instanceOf(b,J.util.P3)?J.util.Escape.eP(b):""+t.get(h);return r}if(y)return 0==f?u:J.util.P3.new3(u.x/f,u.y/f,u.z/f);if(0==f||1==f&&192==l)return Float.$valueOf(NaN);if(z)switch(l){case 32:case 64:return Integer.$valueOf(g);case 160:case 192:break;case 128:return Integer.$valueOf(Clazz.doubleToInt(M));default:return M/f==
Clazz.doubleToInt(M/f)?Integer.$valueOf(Clazz.doubleToInt(M/f)):Float.$valueOf(M/f)}switch(l){case 32:case 64:M=R;break;case 128:break;case 160:M=V;break;case 192:M=Math.sqrt((V-M*M/f)/(f-1));break;default:M/=f}return Float.$valueOf(M)},"J.util.BS,~N,J.util.P3,J.util.P4,~O,~O,~B,~N,~B");$_M(c$,"setBitsetProperty",($fz=function(a,b,c,d,e){if(!(this.chk||0==J.util.BSUtil.cardinalityOf(a))){var f=null,g=null,h=null,j,k=null;j=0;var m=J.script.T.tokAttr(b,1087373312);if(7==e.tok&&(k=e.getList(),0==(j=
k.size())))return;switch(b){case 1146095626:case 1146095627:case 1146095629:case 1146095631:switch(e.tok){case 8:this.viewer.setAtomCoords(a,b,e.value);break;case 7:this.theToken=e,this.viewer.setAtomCoords(a,b,this.getPointArray(-1,j))}return;case 1766856708:var l=null;b="color";switch(e.tok){case 7:e=Clazz.newIntArray(j,0);for(l=j;0<=--l;)b=k.get(l),j=J.script.SV.ptValue(b),null!=j?e[l]=J.util.ColorUtil.colorPtToInt(j):2==b.tok?e[l]=b.intValue:(e[l]=J.util.ColorUtil.getArgbFromString(b.asString()),
0==e[l]&&(e[l]=b.asInt())),0==e[l]&&this.errorStr2(50,"ARRAY",b.asString());l=e;b="colorValues";break;case 8:l=Integer.$valueOf(J.util.ColorUtil.colorPtToInt(e.value));break;case 4:l=e.value;break;default:l=Integer.$valueOf(J.script.SV.iValue(e))}this.setShapePropertyBs(0,b,l,a);return;case 1826248715:case 1288701960:7!=e.tok&&(g=J.script.SV.sValue(e));break;case 1087375365:case 1095763976:this.clearDefinedVariableAtomSets(),m=!1}switch(e.tok){case 7:m?f=J.script.SV.listValue(e):h=J.script.SV.flistValue(e,
j);break;case 4:null==g&&(f=J.util.Parser.getTokens(J.script.SV.sValue(e)))}if(null!=f){j=f.length;if(!m){h=Clazz.newFloatArray(j,0);for(l=j;0<=--l;)h[l]=1087375365==b?J.util.Elements.elementNumberFromSymbol(f[l],!1):J.util.Parser.parseFloatStr(f[l])}7!=e.tok&&1==j&&(m?g=f[0]:d=h[0],c=Clazz.floatToInt(d),h=f=null)}this.viewer.setAtomProperty(a,b,c,d,g,h,f)}},$fz.isPrivate=!0,$fz),"J.util.BS,~N,~N,~N,J.script.T");Clazz.overrideMethod(c$,"getDefinedAtomSets",function(){return this.definedAtomSets});
Clazz.overrideMethod(c$,"getContextVariables",function(){return this.contextVariables});Clazz.overrideMethod(c$,"getScript",function(){return this.$script});$_M(c$,"compileScript",($fz=function(a,b,c){this.scriptFileName=a;b=this.fixScriptPath(b,a);this.restoreScriptContext(this.compiler.compile(a,b,!1,!1,c,!1),!1,!1,!1);this.forceNoAddHydrogens=(this.isStateScript=0<=this.$script.indexOf("# Jmol state version "))&&0>this.$script.indexOf("pdbAddHydrogens");a=this.$script;this.pc=this.setScriptExtensions();
!this.chk&&(this.viewer.scriptEditorVisible&&0>b.indexOf("\u0001## EDITOR_IGNORE ##"))&&this.viewer.scriptStatus("");this.$script=a;return!this.$error},$fz.isPrivate=!0,$fz),"~S,~S,~B");$_M(c$,"fixScriptPath",($fz=function(a,b){if(null!=b&&0<=a.indexOf("$SCRIPT_PATH$")){var c=b,d=Math.max(b.lastIndexOf("|"),b.lastIndexOf("/")),c=c.substring(0,d+1);a=J.util.TextFormat.simpleReplace(a,"$SCRIPT_PATH$/",c);a=J.util.TextFormat.simpleReplace(a,"$SCRIPT_PATH$",c)}return a},$fz.isPrivate=!0,$fz),"~S,~S");
$_M(c$,"setScriptExtensions",($fz=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=J.util.Parser.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},
$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"runScript",function(a){this.viewer.isPreviewOnly()||this.runScriptBuffer(a,this.outputBuffer)},"~S");$_M(c$,"compileScriptFileInternal",($fz=function(a,b,c,d){if(0==a.toLowerCase().indexOf("javascript:"))return this.compileScript(a,this.viewer.jsEval(a.substring(11)),this.debugScript);var e=Array(2);e[0]=a;if(!this.viewer.getFileAsStringBin(e,2147483647,!1))return this.setErrorMessage("io error reading "+e[0]+": "+e[1]),!1;if(0<=("\n"+e[1]).indexOf("\nJmolManifest.txt\n")){var f;
if(a.endsWith(".all.pngj")||a.endsWith(".all.png"))f="|state.spt",a+="|";else{e[0]=a+="|JmolManifest.txt";if(!this.viewer.getFileAsStringBin(e,2147483647,!1))return this.setErrorMessage("io error reading "+e[0]+": "+e[1]),!1;f=J.io.JmolBinary.getManifestScriptPath(e[1])}if(null!=f&&0<f.length&&(e[0]=a=a.substring(0,a.lastIndexOf("|"))+f,!this.viewer.getFileAsStringBin(e,2147483647,!1)))return this.setErrorMessage("io error reading "+e[0]+": "+e[1]),!1}this.scriptFileName=a;e[1]=J.io.JmolBinary.getEmbeddedScript(e[1]);
e=this.fixScriptPath(e[1],e[0]);null==d&&(d=this.viewer.getFilePath(a,!1),d=d.substring(0,Math.max(d.lastIndexOf("|"),d.lastIndexOf("/"))));e=J.viewer.FileManager.setScriptFileReferences(e,b,c,d);return this.compileScript(a,e,this.debugScript)},$fz.isPrivate=!0,$fz),"~S,~S,~S,~S");$_M(c$,"getParameter",($fz=function(a,b){var c=this.getContextVariableAsVariable(a);null==c&&(c=this.viewer.getParameter(a));switch(b){case 1073742190:return J.script.SV.getVariable(c);case 4:if(!Clazz.instanceOf(c,J.util.JmolList))break;
for(var d=new J.util.SB,e=0;e<c.size();e++)d.append(c.get(e).asString()).appendC("\n");return d.toString()}return Clazz.instanceOf(c,J.script.SV)?J.script.SV.oValue(c):c},$fz.isPrivate=!0,$fz),"~S,~N");$_M(c$,"getParameterEscaped",($fz=function(a){var b=this.getContextVariableAsVariable(a);return null==b?""+this.viewer.getParameterEscaped(a):b.escape()},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getStringParameter",($fz=function(a,b){var c=this.getContextVariableAsVariable(a);if(null!=c)return c.asString();
c=""+this.viewer.getParameter(a);return 0==c.length&&b?a:c},$fz.isPrivate=!0,$fz),"~S,~B");$_M(c$,"getNumericParameter",($fz=function(a){if(a.equalsIgnoreCase("_modelNumber"))return a=this.viewer.getCurrentModelIndex(),Integer.$valueOf(0>a?0:this.viewer.getModelFileNumber(a));var b=this.getContextVariableAsVariable(a);if(null==b){a=this.viewer.getParameter(a);if(!Clazz.instanceOf(a,String))return a;b=J.script.SV.newVariable(4,a)}return J.script.SV.nValue(b)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getContextVariableAsVariable",
($fz=function(a){if(a.equals("expressionBegin"))return null;a=a.toLowerCase();if(null!=this.contextVariables&&this.contextVariables.containsKey(a))return this.contextVariables.get(a);for(var b=this.thisContext;null!=b&&!0!=b.isFunction;){if(null!=b.contextVariables&&b.contextVariables.containsKey(a))return b.contextVariables.get(a);b=b.parentContext}return null},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getStringObjectAsVariable",($fz=function(a,b){if(null==a||0==a.length)return a;var c=J.script.SV.unescapePointOrBitsetAsVariable(a);
Clazz.instanceOf(c,String)&&null!=b&&(c=this.viewer.setUserVariable(b,J.script.SV.newVariable(4,c)));return c},$fz.isPrivate=!0,$fz),"~S,~S");Clazz.overrideMethod(c$,"evalFunctionFloat",function(a,b,c){try{for(var d=0;d<c.length;d++)b.get(d).value=Float.$valueOf(c[d]);return J.script.SV.fValue(this.runFunctionRet(a,a.name,b,null,!0,!1,!1))}catch(e){if(Clazz.exceptionOf(e,Exception))return NaN;throw e;}},"~O,~O,~A");$_M(c$,"runFunctionRet",function(a,b,c,d,e,f,g){if(null==a){a=this.viewer.getFunction(b);
if(null==a)return null;f&&(this.contextPath+=" >> function "+b)}else f&&(this.contextPath+=" >> "+b);this.pushContext(null);this.allowJSThreads&&(this.allowJSThreads=g);f=364558==a.getTok();this.thisContext.isTryCatch=f;this.thisContext.isFunction=!f;this.functionName=b;if(f){this.viewer.resetError();this.thisContext.displayLoadErrorsSave=this.viewer.displayLoadErrors;this.thisContext.tryPt=($t$=++J.script.ScriptEvaluator.tryPt,J.script.ScriptEvaluator.prototype.tryPt=J.script.ScriptEvaluator.tryPt,
$t$);this.viewer.displayLoadErrors=!1;this.restoreFunction(a,c,d);this.contextVariables.put("_breakval",J.script.SV.newScriptVariableInt(2147483647));this.contextVariables.put("_errorval",J.script.SV.newVariable(4,""));a=this.contextVariables;for(this.executeCommands(!0);this.thisContext.tryPt!=J.script.ScriptEvaluator.tryPt;)this.popContext(!1,!1);this.processTry(a);return null}Clazz.instanceOf(a,J.api.JmolParallelProcessor)?(this.parallelProcessor=a,this.restoreFunction(a,c,d),this.dispatchCommands(!1,
!0),a.runAllProcesses(this.viewer)):(this.restoreFunction(a,c,d),this.dispatchCommands(!1,!0));a=e?this.getContextVariableAsVariable("_retval"):null;this.popContext(!1,!1);return a},"J.api.JmolScriptFunction,~S,J.util.JmolList,J.script.SV,~B,~B,~B");$_M(c$,"processTry",($fz=function(a){this.viewer.displayLoadErrors=this.thisContext.displayLoadErrorsSave;this.popContext(!1,!1);var b=this.viewer.getParameter("_errormessage");0<b.length&&(a.put("_errorval",J.script.SV.newVariable(4,b)),this.viewer.resetError());
a.put("_tryret",a.get("_retval"));b=a.get("_tryret");if(null!=b.value||2147483647!=b.intValue)this.returnCmd(b);else{b=a.get("_errorval").value;if(0==b.length&&(a=a.get("_breakval").intValue,2147483647!=a)){this.breakCmd(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,J.script.SV.newVariable(4,b)),a.intValue=(0<b.length?1:-1)*Math.abs(a.intValue))}},$fz.isPrivate=
!0,$fz),"java.util.Map");$_M(c$,"restoreFunction",($fz=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)},$fz.isPrivate=!0,$fz),"J.api.JmolScriptFunction,J.util.JmolList,J.script.SV");$_M(c$,"clearDefinedVariableAtomSets",($fz=function(){this.definedAtomSets.remove("# variable")},
$fz.isPrivate=!0,$fz));$_M(c$,"defineSets",($fz=function(){if(!this.definedAtomSets.containsKey("# static")){for(var a=0;a<J.viewer.JC.predefinedStatic.length;a++)this.defineAtomSet(J.viewer.JC.predefinedStatic[a]);this.defineAtomSet("# static")}if(!this.definedAtomSets.containsKey("# variable")){for(a=0;a<J.viewer.JC.predefinedVariable.length;a++)this.defineAtomSet(J.viewer.JC.predefinedVariable[a]);for(a=J.util.Elements.elementNumberMax;0<=--a;){var b=" elemno="+a;this.defineAtomSet("@"+J.util.Elements.elementNameFromNumber(a)+
b);this.defineAtomSet("@_"+J.util.Elements.elementSymbolFromNumber(a)+b)}for(a=4;0<=--a;)b="@"+J.util.Elements.altElementNameFromIndex(a)+" _e="+J.util.Elements.altElementNumberFromIndex(a),this.defineAtomSet(b);for(a=J.util.Elements.altElementMax;4<=--a;){var c=J.util.Elements.altElementNumberFromIndex(a),d=" _e="+c,b="@_"+J.util.Elements.altElementSymbolFromIndex(a);this.defineAtomSet(b+d);b="@_"+J.util.Elements.altIsotopeSymbolFromIndex(a);this.defineAtomSet(b+d);b="@_"+J.util.Elements.altIsotopeSymbolFromIndex2(a);
this.defineAtomSet(b+d);b="@"+J.util.Elements.altElementNameFromIndex(a);1<b.length&&this.defineAtomSet(b+d);b=J.util.Elements.getElementNumber(c);c=J.util.Elements.getNaturalIsotope(b);0<c&&(d=J.util.Elements.elementSymbolFromNumber(b),this.defineAtomSet("@_"+d+c+" _e="+b),this.defineAtomSet("@_"+c+d+" _e="+b))}this.defineAtomSet("# variable")}},$fz.isPrivate=!0,$fz));$_M(c$,"defineAtomSet",($fz=function(a){if(0==a.indexOf("#"))this.definedAtomSets.put(a,Boolean.TRUE);else{var b=this.compiler.compile("#predefine",
a,!0,!1,!1,!1);if(null!=b.errorType)this.viewer.scriptStatus("JmolConstants.java ERROR: predefined set compile error:"+a+"\ncompile error:"+b.errorMessageUntranslated);else if(1!=b.aatoken.length)this.viewer.scriptStatus("JmolConstants.java ERROR: predefinition does not have exactly 1 command:"+a);else if(b=b.aatoken[0],2>=b.length)this.viewer.scriptStatus("JmolConstants.java ERROR: bad predefinition length:"+a);else{var c=b[1].tok;!J.script.T.tokAttr(c,1073741824)&&!J.script.T.tokAttr(c,3145728)?
this.viewer.scriptStatus("JmolConstants.java ERROR: invalid variable name:"+a):(a=b[1].value.toLowerCase(),a.startsWith("dynamic_")&&(a="!"+a.substring(8)),this.definedAtomSets.put(a,b))}}},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"lookupIdentifierValue",($fz=function(a){var b=this.lookupValue(a,!1);if(null!=b)return J.util.BSUtil.copy(b);b=this.getAtomBits(1073741824,a);return null==b?new J.util.BS:b},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"lookupValue",($fz=function(a,b){if(this.chk)return new J.util.BS;
this.defineSets();a=a.toLowerCase();var c=this.definedAtomSets.get(a),d=!1;null==c&&(c=this.definedAtomSets.get("!"+a),d=null!=c);if(Clazz.instanceOf(c,J.util.BS))return c;if(Clazz.instanceOf(c,Array))return this.pushContext(null),c=this.atomExpression(c,-2,0,!0,!1,!0,!0),this.popContext(!1,!1),d||this.definedAtomSets.put(a,c),c;if(b)return null;d=a.length;if(5>d||"s"!=a.charAt(d-1))return null;a=a.endsWith("ies")?a.substring(0,d-3)+"y":a.substring(0,d-1);return this.lookupValue(a,!0)},$fz.isPrivate=
!0,$fz),"~S,~B");Clazz.overrideMethod(c$,"deleteAtomsInVariables",function(a){for(var b,c=this.definedAtomSets.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var d=b.getValue();Clazz.instanceOf(d,J.util.BS)&&(J.util.BSUtil.deleteBits(d,a),b.getKey().startsWith("!")||this.viewer.setUserVariable("@"+b.getKey(),J.script.SV.newVariable(10,d)))}},"J.util.BS");$_M(c$,"setStatement",($fz=function(a){this.st=this.aatoken[a];this.slen=this.st.length;if(0==this.slen)return!0;var b,c;for(b=1;b<this.slen;b++){if(null==
this.st[b])return this.slen=b,!0;if(1060866==this.st[b].tok)break}if(b==this.slen)return b==this.slen;switch(this.st[0].tok){case 102436:case 135368713:case 1073741824:if(269484048==this.tokAt(1))return!0}a=Array(this.slen);a[0]=this.st[0];var d=!1,e=1;for(b=1;b<this.slen;b++)if(null!=this.st[b]){switch(c=this.getToken(b).tok){default:a[e]=this.st[b];break;case 1048577:case 1048578:d=1048577==c;a[e]=this.st[b];break;case 1060866:++b==this.slen&&this.error(22);var f,g=4==this.theToken.intValue,h;h=
this.parameterAsString(b);var j=1048577==this.tokAt(b),k=1==e&&this.st[0]===J.script.T.tokenSetCmd;j?(f=this.parameterExpressionToken(++b),b=this.iToken,f=7==f.tok?f:J.script.SV.oValue(f)):(f=2==this.tokAt(b)?this.viewer.getAtomBits(1095763969,Integer.$valueOf(this.st[b].intValue)):this.getParameter(h,0),!d&&!k&&(j=!0));c=this.tokAt(0);g=(new Boolean(g|(J.script.T.tokAttr(c,20480)||135271429==c))).valueOf();if(Clazz.instanceOf(f,J.script.SV))a[e]=f,d&&7==a[e].tok&&(g=J.script.SV.getBitSet(f,!0),a[e]=
J.script.SV.newVariable(10,null==g?this.getAtomBitSet(J.script.SV.sValue(a[e])):g));else if(Clazz.instanceOf(f,Boolean))a[e]=f.booleanValue()?J.script.T.tokenOn:J.script.T.tokenOff;else if(Clazz.instanceOf(f,Integer))a[e]=J.script.T.tv(2,f.intValue(),f);else if(Clazz.instanceOf(f,Float))a[e]=J.script.T.tv(3,J.script.ScriptEvaluator.getFloatEncodedInt(""+f),f);else if(Clazz.instanceOf(f,String)){if(!g){if((1085443!=c||1<e&&537022465!=this.st[1].tok)&&J.script.T.tokAttr(c,36864))f=this.getParameter(f,
1073742190);Clazz.instanceOf(f,String)&&(f=this.getStringObjectAsVariable(f,null))}Clazz.instanceOf(f,J.script.SV)?a[e]=f:(h=f,d&&!g?a[e]=J.script.T.o(10,this.getAtomBitSet(h)):(c=k?J.script.T.getTokFromName(h):j||g||0==h.length||0<=h.indexOf(".")||0<=h.indexOf(" ")||0<=h.indexOf("=")||0<=h.indexOf(";")||0<=h.indexOf("[")||0<=h.indexOf("{")?4:1073741824,a[e]=J.script.T.o(c,f)))}else if(Clazz.instanceOf(f,J.util.BS))a[e]=J.script.SV.newVariable(10,f);else if(Clazz.instanceOf(f,J.util.P3))a[e]=J.script.SV.newVariable(8,
f);else if(Clazz.instanceOf(f,J.util.P4))a[e]=J.script.SV.newVariable(9,f);else if(Clazz.instanceOf(f,J.util.Matrix3f))a[e]=J.script.SV.newVariable(11,f);else if(Clazz.instanceOf(f,J.util.Matrix4f))a[e]=J.script.SV.newVariable(12,f);else if(Clazz.instanceOf(f,java.util.Map))a[e]=J.script.SV.newVariable(6,f);else if(Clazz.instanceOf(f,J.util.JmolList)){j=f;g=null;for(h=0;h<j.size();h++){c=j.get(h);if(10!=c.tok){g=null;break}null==g&&(g=new J.util.BS);g.or(c.value)}a[e]=null==g?J.script.SV.getVariable(f):
J.script.T.o(10,g)}else f=this.getObjectCenter(h,-2147483648,-2147483648),null==f&&this.error(22),a[e]=J.script.T.o(8,f);k&&!J.script.T.tokAttr(a[e].tok,536870912)&&this.error(22)}e++}this.st=a;for(b=e;b<this.st.length;b++)this.st[b]=null;this.slen=e;return!0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"clearState",($fz=function(a){this.thisContext=null;this.scriptLevel=0;this.setErrorMessage(null);this.contextPath="";this.tQuiet=a},$fz.isPrivate=!0,$fz),"~B");Clazz.overrideMethod(c$,"getThisContext",function(){return this.thisContext});
Clazz.overrideMethod(c$,"pushContextDown",function(){this.scriptLevel--;this.pushContext2(null)});$_M(c$,"pushContext",($fz=function(a){100==this.scriptLevel&&this.error(44);this.pushContext2(a)},$fz.isPrivate=!0,$fz),"J.script.ContextToken");$_M(c$,"pushContext2",($fz=function(a){this.thisContext=this.getScriptContext();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 b,
c=a.contextVariables.keySet().iterator();c.hasNext()&&((b=c.next())||1);)J.script.ScriptCompiler.addContextVariable(this.contextVariables,b);(this.debugScript||this.isCmdLine_c_or_C_Option)&&J.util.Logger.info("--\x3e>-------------".substring(0,Math.max(17,this.scriptLevel+5))+this.scriptLevel+" "+this.scriptFileName+" "+a+" "+this.thisContext)},$fz.isPrivate=!0,$fz),"J.script.ContextToken");Clazz.overrideMethod(c$,"getScriptContext",function(){var a=new J.script.ScriptContext;a.scriptLevel=this.scriptLevel;
a.parentContext=this.thisContext;a.contextPath=this.contextPath;a.scriptFileName=this.scriptFileName;a.parallelProcessor=this.parallelProcessor;a.functionName=this.functionName;a.script=this.$script;a.lineNumbers=this.lineNumbers;a.lineIndices=this.lineIndices;a.aatoken=this.aatoken;a.statement=this.st;a.statementLength=this.slen;a.pc=this.pc;a.lineEnd=this.lineEnd;a.pcEnd=this.pcEnd;a.iToken=this.iToken;a.outputBuffer=this.outputBuffer;a.contextVariables=this.contextVariables;a.isStateScript=this.isStateScript;
a.errorMessage=this.errorMessage;a.errorType=this.errorType;a.iCommandError=this.iCommandError;a.chk=this.chk;a.executionStepping=this.executionStepping;a.executionPaused=this.executionPaused;a.scriptExtensions=this.scriptExtensions;a.mustResumeEval=this.mustResumeEval;a.allowJSThreads=this.allowJSThreads;return a});$_M(c$,"popContext",function(a,b){if(null!=this.thisContext){0<this.thisContext.scriptLevel&&(this.scriptLevel=this.thisContext.scriptLevel-1);var c=a?this.getScriptContext():null;this.restoreScriptContext(this.thisContext,
!0,a,b);null!=c&&this.restoreScriptContext(c,!0,!1,!0);if(this.debugScript||this.isCmdLine_c_or_C_Option)J.util.Logger.info("--<<-------------".substring(0,Math.max(17,this.scriptLevel+5))+this.scriptLevel+" "+this.scriptFileName+" "+(null==this.thisContext?"":""+this.thisContext.token)+" "+this.thisContext)}},"~B,~B");$_M(c$,"restoreScriptContext",($fz=function(a,b,c,d){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,d))return;
this.mustResumeEval=a.mustResumeEval;this.$script=a.script;this.lineNumbers=a.lineNumbers;this.lineIndices=a.lineIndices;this.aatoken=a.aatoken;this.contextVariables=a.contextVariables;this.scriptExtensions=a.scriptExtensions;b?(this.contextPath=a.contextPath,this.scriptFileName=a.scriptFileName,this.parallelProcessor=a.parallelProcessor,this.functionName=a.functionName,this.iToken=a.iToken,this.outputBuffer=a.outputBuffer,this.isStateScript=a.isStateScript,this.thisContext=a.parentContext,this.allowJSThreads=
a.allowJSThreads):(this.$error=null!=a.errorType,this.errorMessage=a.errorMessage,this.errorMessageUntranslated=a.errorMessageUntranslated,this.iCommandError=a.iCommandError,this.errorType=a.errorType)}},$fz.isPrivate=!0,$fz),"J.script.ScriptContext,~B,~B,~B");$_M(c$,"getContext",($fz=function(a){for(var b=new J.util.SB,c=this.thisContext;null!=c;)a?null!=c.contextVariables&&(b.append(this.getScriptID(c)),b.append(J.viewer.StateManager.getVariableList(c.contextVariables,80,!0,!1))):b.append(J.script.ScriptEvaluator.setErrorLineMessage(c.functionName,
c.scriptFileName,this.getLinenumber(c),c.pc,J.script.ScriptEvaluator.statementAsString(c.statement,-9999,this.logMessages))),c=c.parentContext;a?null!=this.contextVariables&&(b.append(this.getScriptID(null)),b.append(J.viewer.StateManager.getVariableList(this.contextVariables,80,!0,!1))):b.append(J.script.ScriptEvaluator.setErrorLineMessage(this.functionName,this.scriptFileName,this.getLinenumber(null),this.pc,J.script.ScriptEvaluator.statementAsString(this.st,-9999,this.logMessages)));return b.toString()},
$fz.isPrivate=!0,$fz),"~B");$_M(c$,"getLinenumber",($fz=function(a){return null==a?this.lineNumbers[this.pc]:a.lineNumbers[a.pc]},$fz.isPrivate=!0,$fz),"J.script.ScriptContext");$_M(c$,"getScriptID",($fz=function(a){return"\n# "+(null==a?this.functionName:"function "+a.functionName)+" (file "+(null==a?this.scriptFileName:a.scriptFileName)+")\n"},$fz.isPrivate=!0,$fz),"J.script.ScriptContext");Clazz.overrideMethod(c$,"setException",function(a,b,c){a.untranslated=null==c?b:c;this.errorType=b;this.iCommandError=
this.pc;if(null==a.message)a.message="";else{for(c=J.script.ScriptEvaluator.getContextTrace(this.getScriptContext(),null,!0).toString();null!=this.thisContext&&!this.thisContext.isTryCatch;)this.popContext(!1,!1);a.message+=c;a.untranslated+=c;null!=this.thisContext||(this.chk||0<=b.indexOf("file recognized as a script file:"))||(J.util.Logger.error("eval ERROR: "+this.toString()),this.viewer.autoExit&&this.viewer.exitJmol())}},"J.script.ScriptException,~S,~S");Clazz.overrideMethod(c$,"getErrorMessage",
function(){return this.errorMessage});Clazz.overrideMethod(c$,"getErrorMessageUntranslated",function(){return null==this.errorMessageUntranslated?this.errorMessage:this.errorMessageUntranslated});$_M(c$,"setErrorMessage",($fz=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)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,
"planeExpected",($fz=function(){this.errorMore(38,"{a b c d}",'"xy" "xz" "yz" "x=..." "y=..." "z=..."',"$xxxxx")},$fz.isPrivate=!0,$fz));$_M(c$,"integerOutOfRange",($fz=function(a,b){this.errorStr2(21,""+a,""+b)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"numberOutOfRange",($fz=function(a,b){this.errorStr2(36,""+a,""+b)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"errorAt",function(a,b){this.iToken=b;this.errorOrWarn(a,null,null,null,!1)},"~N,~N");$_M(c$,"error",function(a){this.errorOrWarn(a,null,null,null,
!1)},"~N");$_M(c$,"errorStr",function(a,b){this.errorOrWarn(a,b,null,null,!1)},"~N,~S");$_M(c$,"errorStr2",function(a,b,c){this.errorOrWarn(a,b,c,null,!1)},"~N,~S,~S");$_M(c$,"errorMore",function(a,b,c,d){this.errorOrWarn(a,b,c,d,!1)},"~N,~S,~S,~S");$_M(c$,"warning",($fz=function(a,b,c){this.errorOrWarn(a,b,c,null,!0)},$fz.isPrivate=!0,$fz),"~N,~S,~S");$_M(c$,"errorOrWarn",function(a,b,c,d,e){var f=this.ignoreError?null:J.script.ScriptEvaluator.errorString(a,b,c,d,!0);a=!this.ignoreError&&J.i18n.GT.getDoTranslate()?
J.script.ScriptEvaluator.errorString(a,b,c,d,!1):null;e||this.evalError(f,a);this.showString(f)},"~N,~S,~S,~S,~B");$_M(c$,"evalError",function(a,b){if(this.ignoreError)throw new NullPointerException;this.chk||(this.setCursorWait(!1),this.viewer.setBooleanProperty("refreshing",!0),this.viewer.setStringProperty("_errormessage",b));throw new J.script.ScriptException(this,a,b,!0);},"~S,~S");c$.errorString=$_M(c$,"errorString",function(a,b,c,d,e){d=!1;!e&&!0==(d=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=J.util.TextFormat.simpleReplace(a,"{0}",
b),0<=a.indexOf("{1}")?a=J.util.TextFormat.simpleReplace(a,"{1}",c):null!=c&&(a+=": "+c),0<=a.indexOf("{2}")&&(a=J.util.TextFormat.simpleReplace(a,"{2}",c)));d&&J.i18n.GT.setDoTranslate(!0);return a},"~N,~S,~S,~S,~B");c$.setErrorLineMessage=$_M(c$,"setErrorLineMessage",function(a,b,c,d,e){var f="\n----";if(null!=b||null!=a)f+="line "+c+" command "+(d+1)+" of "+(null==a?b:a.equals("try")?"try":"function "+a)+":";return f+("\n         "+e)},"~S,~S,~N,~N,~S");$_M(c$,"toString",function(){var a=new J.util.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],d=0;d<c.length;++d)a.appendO(c[d]),a.appendC("\n");a.appendC("\n")}a.append("END\n");return a.toString()});c$.statementAsString=$_M(c$,"statementAsString",function(a,b,c){if(0==a.length)return"";var d=new J.util.SB,e=a[0].tok;switch(e){case 0:return a[0].value;case 1150985:if(2==a.length&&(135368713==a[1].tok||
102436==a[1].tok))return a[1].value.toString()}for(var f=!0,g=!1,h=!1,e=1<a.length&&1085443==e&&a[0].value.equals("")&&(61==a[0].intValue||35==a[0].intValue)&&1048577!=a[1].tok,j=a.length,k=0;k<j;++k){var m=a[k];if(null==m){j=k;break}b==k-1&&d.append(" <<");0!=k&&d.appendC(" ");if(2==k&&e&&((e=269484436!=m.tok)||35==a[0].intValue))if(d.append(e?"= ":"== "),!e)continue;b==k&&1048578!=m.tok&&d.append(">> ");switch(m.tok){case 1048577:f&&d.append("{");continue;case 1048578:h&&k==a.length-1&&(f=!1);f&&
d.append("}");continue;case 269484096:case 269484097:break;case 1048586:case 1048590:g=1048586==m.tok;break;case 1060866:if(0<k&&m.value.equals("define")){d.append("@");k+1<a.length&&1048577==a[k+1].tok&&(f||(h=!0),f=!0);continue}break;case 1048589:d.append("true");continue;case 1048588:d.append("false");continue;case 135280132:break;case 2:d.appendI(m.intValue);continue;case 8:case 9:case 10:d.append(J.script.SV.sValue(m));continue;case 7:case 6:d.append(m.escape());continue;case 5:d.appendC("^");
continue;case 1048615:2147483647!=m.intValue?d.appendI(m.intValue):d.append(J.modelset.Group.getSeqcodeStringFor(J.script.ScriptEvaluator.getSeqCode(m))),m=a[++k],d.appendC(" "),d.append(g?"-":"- ");case 1048614:2147483647!=m.intValue?d.appendI(m.intValue):d.append(J.modelset.Group.getSeqcodeStringFor(J.script.ScriptEvaluator.getSeqCode(m)));continue;case 1048609:d.append("*:");d.appendC(String.fromCharCode(m.intValue));continue;case 1048607:d.append("*%");null!=m.value&&d.append(m.value.toString());
continue;case 1048610:d.append("*/");case 1048611:case 3:2147483647>m.intValue?d.append(J.util.Escape.escapeModelFileNumber(m.intValue)):d.append(""+m.value);continue;case 1048613:d.appendC("[");d.append(J.modelset.Group.getGroup3For(m.intValue));d.appendC("]");continue;case 1048612:d.appendC("[");d.appendO(m.value);d.appendC("]");continue;case 1048608:d.append("*.");break;case 1095761925:if(Clazz.instanceOf(m.value,J.util.P3)){m=m.value;d.append("cell=").append(J.util.Escape.eP(m));continue}break;
case 4:d.append('"').appendO(m.value).append('"');continue;case 269484436:case 269484434:case 269484433:case 269484432:case 269484435:case 269484438:1716520973==m.intValue?d.append(a[++k].value).append(" "):2147483647!=m.intValue&&d.append(J.script.T.nameOf(m.intValue)).append(" ");break;case 364558:continue;case 1150985:d.append("end");continue;default:if(J.script.T.tokAttr(m.tok,1073741824)||!c)break;d.appendC("\n").append(m.toString()).appendC("\n");continue}null!=m.value&&d.append(m.value.toString())}b>=
j-1&&9999!=b&&d.append(" <<");return d.toString()},"~A,~N,~B");$_M(c$,"getShapeProperty",($fz=function(a,b){return this.sm.getShapePropertyIndex(a,b,-2147483648)},$fz.isPrivate=!0,$fz),"~N,~S");$_M(c$,"getShapePropertyData",($fz=function(a,b,c){return this.sm.getShapePropertyData(a,b,c)},$fz.isPrivate=!0,$fz),"~N,~S,~A");$_M(c$,"getShapePropertyIndex",($fz=function(a,b,c){return this.sm.getShapePropertyIndex(a,b,c)},$fz.isPrivate=!0,$fz),"~N,~S,~N");$_M(c$,"addShapeProperty",($fz=function(a,b,c){this.chk||
a.addLast([b,c])},$fz.isPrivate=!0,$fz),"J.util.JmolList,~S,~O");$_M(c$,"setObjectMad",($fz=function(a,b,c){this.chk||this.viewer.setObjectMad(a,b,c)},$fz.isPrivate=!0,$fz),"~N,~S,~N");$_M(c$,"setObjectArgb",($fz=function(a,b){this.chk||this.viewer.setObjectArgb(a,b)},$fz.isPrivate=!0,$fz),"~S,~N");$_M(c$,"setShapeProperty",($fz=function(a,b,c){this.chk||this.sm.setShapePropertyBs(a,b,c,null)},$fz.isPrivate=!0,$fz),"~N,~S,~O");$_M(c$,"setShapePropertyBs",($fz=function(a,b,c,d){this.chk||this.sm.setShapePropertyBs(a,
b,c,d)},$fz.isPrivate=!0,$fz),"~N,~S,~O,J.util.BS");$_M(c$,"setShapeSizeBs",($fz=function(a,b,c){this.chk||this.sm.setShapeSizeBs(a,b,null,c)},$fz.isPrivate=!0,$fz),"~N,~N,J.util.BS");$_M(c$,"setShapeSize",($fz=function(a,b){this.chk||this.sm.setShapeSizeBs(a,0,b,null)},$fz.isPrivate=!0,$fz),"~N,J.atomdata.RadiusData");$_M(c$,"setBooleanProperty",($fz=function(a,b){this.chk||this.viewer.setBooleanProperty(a,b)},$fz.isPrivate=!0,$fz),"~S,~B");$_M(c$,"setIntProperty",($fz=function(a,b){this.chk||this.viewer.setIntProperty(a,
b);return!0},$fz.isPrivate=!0,$fz),"~S,~N");$_M(c$,"setFloatProperty",($fz=function(a,b){this.chk||this.viewer.setFloatProperty(a,b);return!0},$fz.isPrivate=!0,$fz),"~S,~N");$_M(c$,"setStringProperty",($fz=function(a,b){this.chk||this.viewer.setStringProperty(a,b)},$fz.isPrivate=!0,$fz),"~S,~S");$_M(c$,"showString",($fz=function(a){this.showStringPrint(a,!1)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"showStringPrint",($fz=function(a,b){this.chk||null==a||(null!=this.outputBuffer?this.outputBuffer.append(a).appendC("\n"):
this.viewer.showString(a,b))},$fz.isPrivate=!0,$fz),"~S,~B");$_M(c$,"scriptStatusOrBuffer",($fz=function(a){this.chk||(null!=this.outputBuffer?this.outputBuffer.append(a).appendC("\n"):this.viewer.scriptStatus(a))},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"atomExpressionAt",($fz=function(a){this.checkToken(a)||this.errorAt(2,a);return this.atomExpression(this.st,a,0,!0,!1,!0,!0)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"atomExpression",($fz=function(a,b,c,d,e,f){this.isBondSet=!1;a!==this.st&&(this.tempStatement=
this.st,this.st=a);var g=new J.script.ScriptMathProcessor(this,!1,!1,f),h,j=2147483647,k=!1;this.iToken=1E3;var m=0>b,l=!1,s=0,p=this.viewer.getAtomCount();m&&(b=-b);m=(new Boolean(m|this.chk)).valueOf();0==c&&a.length>b&&(c=b+1);a:for(;b<c;++b){this.iToken=b;j=a[b];if(null==j)break;var r=j.value;switch(j.tok){case 1048577:c=a.length;s++;break;case 1048578:s--;if(0<s)continue;break a;case 1048586:if(this.isPoint3f(b)&&(r=this.getPoint3f(b,!0),null!=r)){g.addXPt(r);b=this.iToken;break}break;case 1048590:0<
b&&1048586==a[b-1].tok&&g.addXBs(new J.util.BS);break;case 269484096:l=!0;g.addOp(j);break;case 269484097:l=!1;g.addOp(j);break;case 1060866:g.addXBs(this.getAtomBitSet(r));break;case 135267841:g.addXVar(J.script.SV.newScriptVariableToken(j));g.addXVar(J.script.SV.newVariable(9,this.hklParameter(b+2)));b=this.iToken;break;case 135266319:g.addXVar(J.script.SV.newScriptVariableToken(j));g.addXVar(J.script.SV.newVariable(9,this.planeParameter(b+2)));b=this.iToken;break;case 1048582:g.addXVar(J.script.SV.newScriptVariableToken(j));
g.addXPt(this.getPoint3f(b+2,!0));b=this.iToken;break;case 4:if(0==r.indexOf("({")&&(h=J.util.Escape.uB(r),null!=h)){g.addXBs(h);break}g.addXVar(J.script.SV.newScriptVariableToken(j));r.equals("hkl")&&(g.addXVar(J.script.SV.newVariable(9,this.hklParameter(b+2))),b=this.iToken);break;case 135267336:case 135267335:case 1238369286:case 135266324:case 135402505:case 135266310:case 269484080:g.addOp(j);break;case 1048579:g.addXBs(this.viewer.getModelUndeletedAtomsBitSet(-1));break;case 1048587:g.addXBs(new J.util.BS);
break;case 1048589:case 1048588:g.addXVar(J.script.SV.newScriptVariableToken(j));break;case 1114638350:g.addXBs(J.util.BSUtil.copy(this.viewer.getSelectionSet(!1)));break;case 3158024:r=this.viewer.getSelectionSubset();g.addXBs(null==r?this.viewer.getModelUndeletedAtomsBitSet(-1):J.util.BSUtil.copy(r));break;case 3145770:g.addXBs(J.util.BSUtil.copy(this.viewer.getHiddenSet()));break;case 1060869:g.addXBs(J.util.BSUtil.copy(this.viewer.getMotionFixedAtoms()));break;case 3145768:g.addXBs(J.util.BSUtil.copyInvert(this.viewer.getHiddenSet(),
p));break;case 3145776:g.addXBs(this.viewer.getBaseModelBitSet());break;case 3145774:!this.chk&&!k&&this.viewer.setModelVisibility();k=!0;g.addXBs(this.viewer.getVisibleSet());break;case 3145766:!this.chk&&d&&this.refresh();g.addXBs(this.viewer.getClickableSet());break;case 1048608:this.viewer.allowSpecAtom()?(h=j.intValue,0<h?g.addXBs(this.compareInt(1095761922,269484436,h)):g.addXBs(this.getAtomBits(j.tok,r))):g.addXBs(this.lookupIdentifierValue("_"+r));break;case 3145764:case 3145732:case 1613758470:case 1048585:case 3145742:case 3145744:case 3145746:case 3145748:case 3145750:case 1048612:case 1048607:case 3145772:case 1089470478:case 1614417948:g.addXBs(this.getAtomBits(j.tok,
r));break;case 1048610:case 1048611:h=j.intValue;if(2147483647==h&&Clazz.instanceOf(r,Integer)){h=r.intValue();if(!this.viewer.haveFileSet()){g.addXBs(this.getAtomBits(1048610,Integer.$valueOf(h)));break}2147>=h&&(h*=1E6)}g.addXBs(this.bitSetForModelFileNumber(h));break;case 1048613:case 1048609:g.addXBs(this.getAtomBits(j.tok,Integer.$valueOf(j.intValue)));break;case 1048614:l?g.addXNum(J.script.SV.newScriptVariableInt(j.intValue)):g.addXBs(this.getAtomBits(1048614,Integer.$valueOf(J.script.ScriptEvaluator.getSeqCode(j))));
break;case 1048615:if(l){g.addXNum(J.script.SV.newScriptVariableInt(j.intValue));g.addOp(J.script.T.tokenMinus);g.addXNum(J.script.SV.newScriptVariableInt(a[++b].intValue));break}r=b+3<a.length&&269484160==a[b+2].tok&&1048609==a[b+3].tok?a[b+3].intValue:9;g.addXBs(this.getAtomBits(1048615,[J.script.ScriptEvaluator.getSeqCode(j),J.script.ScriptEvaluator.getSeqCode(a[++b]),r]));9!=r&&(b+=2);break;case 1095761925:g.addXBs(this.getAtomBits(1095761925,[Clazz.doubleToInt(Math.floor(1E3*r.x)),Clazz.doubleToInt(Math.floor(1E3*
r.y)),Clazz.doubleToInt(Math.floor(1E3*r.z))]));break;case 3145758:g.addXBs(this.viewer.getModelUndeletedAtomsBitSet(this.viewer.getCurrentModelIndex()));break;case 1613758476:case 3145730:case 1115297793:case 1613758488:case 137363468:case 3145735:case 3145736:case 3145738:case 3145754:case 3145756:g.addXBs(this.lookupIdentifierValue(r));break;case 269484435:case 269484434:case 269484433:case 269484432:case 269484436:case 269484438:b+1==a.length&&this.error(22);h=a[++b].value;var v=j.tok,y=j.intValue,
z=1716520973==y?h:null;null!=z&&(b+1==a.length&&this.error(22),h=a[++b].value);1095766022==y&&269484436!=v&&this.error(22);if(this.chk){g.addXBs(new J.util.BS);break}var n=1095766028==y,w=J.script.T.tokAttr(y,1095761920),u=J.script.T.tokAttr(y,1112539136),t=w&&u,A=!w&&J.script.T.tokAttr(y,1087373312);1087375365==y&&(w=!(A=!1));var G=a[b].tok,j=a[b].intValue,H=NaN;Clazz.instanceOf(h,J.util.P3)?1766856708==y&&(j=J.util.ColorUtil.colorPtToInt(h),G=2,w=!0):Clazz.instanceOf(h,String)&&(1766856708==y?(j=
J.util.ColorUtil.getArgbFromString(h),0==j&&J.script.T.tokAttr(G,1073741824)&&(h=this.getStringParameter(h,!0),h.startsWith("{")?(h=J.util.Escape.uP(h),j=Clazz.instanceOf(h,J.util.P3)?J.util.ColorUtil.colorPtToInt(h):0):j=J.util.ColorUtil.getArgbFromString(h)),G=2,w=!0):A?J.script.T.tokAttr(G,1073741824)&&(h=this.getStringParameter(h,!0)):(J.script.T.tokAttr(G,1073741824)&&(h=this.getNumericParameter(h)),Clazz.instanceOf(h,String)&&(1641025539==y||1238369286==y||1087375365==y?A=!(w=2147483647!=j):
h=J.script.SV.nValue(a[b])),Clazz.instanceOf(h,Integer)?H=j=h.intValue():Clazz.instanceOf(h,Float)&&n&&(j=J.modelset.ModelCollection.modelFileNumberFromFloat(h.floatValue()))));A&&!Clazz.instanceOf(h,String)&&(h=""+h);Clazz.instanceOf(h,Integer)||2==G?n?1E6<=j&&(y=-1095766028):t||u&&(H=j):Clazz.instanceOf(h,Float)?n?y=-1095766028:(H=h.floatValue(),t?w=!1:w&&(j=Clazz.floatToInt(H))):A||(this.iToken++,this.error(22));n&&(1E6<=j&&0==j%1E6)&&(j/=1E6,y=1229984263);if(-1095766028==y&&269484436==v){g.addXBs(this.bitSetForModelFileNumber(j));
break}null!=r&&0<=r.indexOf("-")&&(w?j=-j:Float.isNaN(H)||(H=-H));r=1716520973==y?this.viewer.getDataFloat(z):null;g.addXBs(w?this.compareInt(y,v,j):A?this.compareString(y,v,h):this.compareFloatData(y,r,v,H));break;case 3:case 2:g.addXNum(J.script.SV.newScriptVariableToken(j));break;case 10:r=J.util.BSUtil.copy(r);g.addXBs(r);break;case 8:g.addXPt(r);break;default:if(J.script.T.tokAttr(j.tok,269484032)){g.addOp(j)||this.error(22);break}if(!Clazz.instanceOf(r,String)){g.addXObj(r);break}h=this.getParameter(r,
0);if(l){g.addXObj(h);break}Clazz.instanceOf(h,String)&&(h=this.getStringObjectAsVariable(h,null));Clazz.instanceOf(h,J.util.JmolList)&&(h=J.script.SV.unEscapeBitSetArray(h,!0),h=null==h?r:h);Clazz.instanceOf(h,String)&&(h=this.lookupIdentifierValue(r));g.addXObj(h)}}this.expressionResult=g.getResult(e);if(null==this.expressionResult){if(e)return null;this.chk||g.dumpStacks("after getResult");this.error(13)}this.expressionResult=this.expressionResult.value;if(Clazz.instanceOf(this.expressionResult,
String)&&(f||this.expressionResult.startsWith("({")))this.expressionResult=this.chk?new J.util.BS:this.getAtomBitSet(this.expressionResult);if(!f&&!Clazz.instanceOf(this.expressionResult,J.util.BS))return null;h=Clazz.instanceOf(this.expressionResult,J.util.BS)?this.expressionResult:new J.util.BS;this.isBondSet=Clazz.instanceOf(this.expressionResult,J.modelset.Bond.BondSet);this.isBondSet||(this.viewer.excludeAtoms(h,m),h.length()>this.viewer.getAtomCount()&&h.clearAll());null!=this.tempStatement&&
(this.st=this.tempStatement,this.tempStatement=null);return h},$fz.isPrivate=!0,$fz),"~A,~N,~N,~B,~B,~B,~B");$_M(c$,"compareFloatData",($fz=function(a,b,c,d){var e=new J.util.BS,f=this.viewer.getAtomCount(),g=this.viewer.modelSet.atoms,h=0;for(this.viewer.autoCalculate(a);0<=--f;){h=!1;switch(a){default:h=J.modelset.Atom.atomPropertyFloat(this.viewer,g[f],a);break;case 1716520973:if(null==b||b.length<=f)continue;h=b[f]}(h=J.script.ScriptEvaluator.compareFloat(c,h,d))&&e.set(f)}return e},$fz.isPrivate=
!0,$fz),"~N,~A,~N,~N");$_M(c$,"compareString",($fz=function(a,b,c){var d=new J.util.BS,e=this.viewer.modelSet.atoms,f=this.viewer.getAtomCount(),g=1087373316==a&&this.viewer.getBoolean(603979822);for(g||(c=c.toLowerCase());0<=--f;){var h=J.modelset.Atom.atomPropertyString(this.viewer,e[f],a);g||(h=h.toLowerCase());this.compareStringValues(b,h,c)&&d.set(f)}return d},$fz.isPrivate=!0,$fz),"~N,~N,~S");$_M(c$,"compareInt",function(a,b,c){var d=2147483647,e=null,f=b,g=c,h=this.viewer.getAtomCount(),j=
this.viewer.modelSet,k=j.atoms,m=-1,l=0,s=-1,p=null,r=0,v;switch(a){case 1297090050:switch(f){case 269484433:case 269484432:m=2147483647}break;case 1095761923:try{switch(b){case 269484435:return J.util.BSUtil.newBitSet2(0,c);case 269484434:return J.util.BSUtil.newBitSet2(0,c+1);case 269484433:return J.util.BSUtil.newBitSet2(c,h);case 269484432:return J.util.BSUtil.newBitSet2(c+1,h);case 269484436:return c<h?J.util.BSUtil.newBitSet2(c,c+1):new J.util.BS;default:return v=J.util.BSUtil.setAll(h),0<=
c&&v.clear(c),v}}catch(y){if(Clazz.exceptionOf(y,Exception))return new J.util.BS;throw y;}}v=J.util.BSUtil.newBitSet(h);for(var z=0;z<h;++z){var n=!1,w=k[z];switch(a){default:d=J.modelset.Atom.atomPropertyInt(w,a);break;case 1095766022:return J.util.BSUtil.copy(this.viewer.getConformation(-1,c-1,!1));case 1297090050:e=w.getAtomSymmetry();if(null==e)continue;w.getModelIndex()!=s&&(s=w.getModelIndex(),p=j.getModelCellRange(s),r=j.getModelSymmetryCount(s));if(200<=g){if(null==p)continue;c=g%1E3;var u=
Clazz.doubleToInt(g/1E3)-1;if(0>u)n=!0;else if(0==r||0<=u&&!(n=e.get(u)))continue;f=1048587;d=0>u?w.getCellTranslation(c,p,r):w.getSymmetryTranslation(u,p,r)}else if(0<r){if(c>r&&269484435!=f&&269484434!=f)continue;if(269484438==f){0<c&&(c<=r&&!e.get(c))&&v.set(z);continue}}switch(f){case 269484435:m=c-1;break;case 269484434:m=c;break;case 269484433:l=c-1;break;case 269484432:l=c;break;case 269484436:m=c;l=c-1;break;case 269484438:n=!e.get(c)}0>l&&(l=0);l<m&&(e=e.nextSetBit(l),0<=e&&e<m&&(n=!0));
if(!n||2147483647==d)b=1048587}switch(b){case 269484435:n=d<c;break;case 269484434:n=d<=c;break;case 269484433:n=d>=c;break;case 269484432:n=d>c;break;case 269484436:n=d==c;break;case 269484438:n=d!=c}n&&v.set(z)}return v},"~N,~N,~N");$_M(c$,"compareStringValues",($fz=function(a,b,c){switch(a){case 269484436:case 269484438:return J.util.TextFormat.isMatch(b,c,!0,!0)==(269484436==a);default:this.error(22)}return!1},$fz.isPrivate=!0,$fz),"~N,~S,~S");c$.compareFloat=$_M(c$,"compareFloat",($fz=function(a,
b,c){switch(a){case 269484435:return b<c;case 269484434:return b<=c;case 269484433:return b>=c;case 269484432:return b>c;case 269484436:return b==c;case 269484438:return b!=c}return!1},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"getAtomBits",($fz=function(a,b){return this.chk?new J.util.BS:this.viewer.getAtomBits(a,b)},$fz.isPrivate=!0,$fz),"~N,~O");c$.getSeqCode=$_M(c$,"getSeqCode",($fz=function(a){return 2147483647!=a.intValue?J.modelset.Group.getSeqcodeFor(a.intValue," "):a.value.intValue()},$fz.isPrivate=
!0,$fz),"J.script.T");$_M(c$,"checkLast",($fz=function(a){return this.checkLength(a+1)-1},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"checkLength",($fz=function(a){if(0<=a)return this.checkLengthErrorPt(a,0);this.slen>-a&&(this.iToken=-a,this.error(2));return this.slen},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"checkLengthErrorPt",($fz=function(a,b){this.slen!=a&&(this.iToken=0<b?b:this.slen,this.error(0<b?22:2));return this.slen},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"checkLength23",($fz=function(){this.iToken=
this.slen;2!=this.slen&&3!=this.slen&&this.error(2);return this.slen},$fz.isPrivate=!0,$fz));$_M(c$,"checkLength34",($fz=function(){this.iToken=this.slen;3!=this.slen&&4!=this.slen&&this.error(2);return this.slen},$fz.isPrivate=!0,$fz));$_M(c$,"getToken",($fz=function(a){this.checkToken(a)||this.error(13);this.theToken=this.st[a];this.theTok=this.theToken.tok;return this.theToken},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"tokAt",($fz=function(a){return a<this.slen&&null!=this.st[a]?this.st[a].tok:0},$fz.isPrivate=
!0,$fz),"~N");c$.tokAtArray=$_M(c$,"tokAtArray",($fz=function(a,b){return a<b.length&&null!=b[a]?b[a].tok:0},$fz.isPrivate=!0,$fz),"~N,~A");$_M(c$,"tokenAt",($fz=function(a,b){return a<b.length?b[a]:null},$fz.isPrivate=!0,$fz),"~N,~A");$_M(c$,"checkToken",($fz=function(a){return(this.iToken=a)<this.slen},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"modelNumberParameter",($fz=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=J.script.ScriptEvaluator.getFloatEncodedInt(this.stringParameter(a));
break;default:this.error(22)}return this.viewer.getModelNumberIndex(b,c,!0)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"optParameterAsString",($fz=function(a){return a>=this.slen?"":this.parameterAsString(a)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"parameterAsString",($fz=function(a){this.getToken(a);null==this.theToken&&this.error(13);return J.script.SV.sValue(this.theToken)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"intParameter",($fz=function(a){if(this.checkToken(a)&&2==this.getToken(a).tok)return this.theToken.intValue;
this.error(20);return 0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"intParameterRange",($fz=function(a,b,c){a=this.intParameter(a);(a<b||a>c)&&this.integerOutOfRange(b,c);return a},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"isFloatParameter",($fz=function(a){switch(this.tokAt(a)){case 2:case 3:return!0}return!1},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"floatParameterRange",($fz=function(a,b,c){a=this.floatParameter(a);(a<b||a>c)&&this.numberOutOfRange(b,c);return a},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"floatParameter",
($fz=function(a){if(this.checkToken(a))switch(this.getToken(a),this.theTok){case 1048615:return-this.theToken.intValue;case 1048614:case 2:return this.theToken.intValue;case 1048611:case 3:return this.theToken.value.floatValue()}this.error(34);return 0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"floatParameterSet",($fz=function(a,b,c){var d=this.tokAt(a);1073742195==d&&(d=this.tokAt(++a));var e=1048586==d,f=269484096==d,g=null,h=new J.util.JmolList,j=0;(e||f)&&a++;d=null;switch(this.tokAt(a)){case 4:d=J.script.SV.sValue(this.st[a]);
d=J.util.TextFormat.replaceAllCharacter(d,"{},[]\"'"," ");g=J.util.Parser.parseFloatArray(d);j=g.length;break;case 7:g=J.script.SV.flistValue(this.st[a++],0);j=g.length;break;default:for(;j<c;){d=this.tokAt(a);if(e&&1048590==d||f&&269484097==d)break;switch(d){case 269484080:case 1048586:case 1048590:break;case 4:break;case 8:d=this.getPoint3f(a,!1);h.addLast(Float.$valueOf(d.x));h.addLast(Float.$valueOf(d.y));h.addLast(Float.$valueOf(d.z));j+=3;break;case 9:d=this.getPoint4f(a);h.addLast(Float.$valueOf(d.x));
h.addLast(Float.$valueOf(d.y));h.addLast(Float.$valueOf(d.z));h.addLast(Float.$valueOf(d.w));j+=4;break;default:h.addLast(Float.$valueOf(this.floatParameter(a))),j++,j==c&&(f&&1048590==this.tokAt(a+1))&&a++}a++}}(e&&1048590!=this.tokAt(a++)||f&&269484097!=this.tokAt(a++))&&this.error(22);this.iToken=a-1;(j<b||j>c)&&this.error(22);if(null==g){g=Clazz.newFloatArray(j,0);for(a=0;a<j;a++)g[a]=h.get(a).floatValue()}return g},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"isArrayParameter",($fz=function(a){switch(this.tokAt(a)){case 7:case 11:case 12:case 1073742195:case 269484096:return!0}return!1},
$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getPointArray",($fz=function(a,b){var c=0>b?null:Array(b),d=0>b?new J.util.JmolList:null,e=0>a?7:this.getToken(a++).tok;switch(e){case 7:d=this.theToken.getList();0<=b&&d.size()!=b&&this.error(22);b=d.size();null==c&&(c=Array(b));for(e=0;e<b;e++)null==(c[e]=J.script.SV.ptValue(d.get(e)))&&this.error(22);return c;case 1073742195:e=this.tokAt(a++)}269484096!=e&&this.error(22);for(var f=0;269484097!=e&&0!=e;)switch(e=this.getToken(a).tok,e){case 0:case 269484097:break;
case 269484080:a++;break;default:if(0<=b&&f==b){e=0;break}var g=this.getPoint3f(a,!0);null==c?d.addLast(g):c[f]=g;f++;a=this.iToken+1}269484097!=e&&this.error(22);null==c&&(c=d.toArray(Array(d.size())));return c},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"floatArraySet",($fz=function(a,b,c){var d=this.tokAt(a++);1073742195==d&&(d=this.tokAt(a++));269484096!=d&&this.error(22);for(var e=J.util.ArrayUtil.newFloat2(b),f=0;269484097!=d;)switch(d=this.getToken(a).tok,d){case 1073742195:case 269484097:continue;
case 269484080:a++;break;case 269484096:a++;d=Clazz.newFloatArray(c,0);e[f++]=d;for(var g=0;g<c;g++)d[g]=this.floatParameter(a++),269484080==this.tokAt(a)&&a++;269484097!=this.tokAt(a++)&&this.error(22);d=0;f==b&&269484097!=this.tokAt(a)&&this.error(22);break;default:this.error(22)}return e},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"floatArraySetXYZ",($fz=function(a,b,c,d){var e=this.tokAt(a++);1073742195==e&&(e=this.tokAt(a++));(269484096!=e||0>=b)&&this.error(22);for(var f=J.util.ArrayUtil.newFloat3(b,
-1),g=0;269484097!=e;)switch(e=this.getToken(a).tok,e){case 1073742195:case 269484097:continue;case 269484080:a++;break;case 269484096:f[g++]=this.floatArraySet(a,c,d);a=++this.iToken;e=0;g==b&&269484097!=this.tokAt(a)&&this.error(22);break;default:this.error(22)}return f},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N");$_M(c$,"stringParameter",($fz=function(a){(!this.checkToken(a)||4!=this.getToken(a).tok)&&this.error(41);return this.theToken.value},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"stringParameterSet",($fz=
function(a){switch(this.tokAt(a)){case 4:var b=this.stringParameter(a);return b.startsWith('["')&&(a=this.viewer.evaluateExpression(b),Clazz.instanceOf(a,String))?J.util.TextFormat.split(a,"\n"):[b];case 1073742195:a+=2;break;case 269484096:++a;break;case 7:return J.script.SV.listValue(this.getToken(a));default:this.error(22)}for(var c,b=new J.util.JmolList;269484097!=(c=this.tokAt(a));){switch(c){case 269484080:break;case 4:b.addLast(this.stringParameter(a));break;default:case 0:this.error(22)}a++}this.iToken=
a;a=b.size();c=Array(a);for(var d=0;d<a;d++)c[d]=b.get(d);return c},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"objectNameParameter",($fz=function(a){this.checkToken(a)||this.error(37);return this.parameterAsString(a)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"booleanParameter",($fz=function(a){if(this.slen==a)return!0;switch(this.getToken(this.checkLast(a)).tok){case 1048589:return!0;case 1048588:break;default:this.error(5)}return!1},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"atomCenterOrCoordinateParameter",($fz=function(a){switch(this.getToken(a).tok){case 10:case 1048577:a=
this.atomExpression(this.st,a,0,!0,!1,!1,!0);if(null!=a)return this.viewer.getAtomSetCenter(a);if(Clazz.instanceOf(this.expressionResult,J.util.P3))return this.expressionResult;this.error(22);break;case 1048586:case 8:return this.getPoint3f(a,!0)}this.error(22);return null},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"isCenterParameter",($fz=function(a){a=this.tokAt(a);return 1048583==a||1048586==a||1048577==a||8==a||10==a},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"centerParameter",($fz=function(a){return this.centerParameterForModel(a,
-2147483648)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"centerParameterForModel",($fz=function(a,b){var c=null;this.expressionResult=null;if(this.checkToken(a))switch(this.getToken(a).tok){case 1048583:var d=this.objectNameParameter(++a),c=-2147483648;269484096==this.tokAt(a+1)&&(c=this.parameterExpressionList(-a-1,-1,!0).get(0).asInt(),269484097!=this.getToken(--this.iToken).tok&&this.error(22));if(this.chk)return new J.util.P3;if(1048584==this.tokAt(a+1)&&(1141899267==this.tokAt(a+2)||1141899270==this.tokAt(a+
2)))c=2147483647,this.iToken=a+2;null==(c=this.getObjectCenter(d,c,b))&&this.errorStr(12,d);break;case 10:case 1048577:case 1048586:case 8:c=this.atomCenterOrCoordinateParameter(a)}null==c&&this.error(11);return c},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"planeParameter",($fz=function(a){var b=new J.util.V3,c=new J.util.V3,d=null,e=269484192==this.tokAt(a);e&&a++;if(a<this.slen)switch(this.getToken(a).tok){case 9:d=J.util.P4.newPt(this.theToken.value);break;case 1048583:a=this.objectNameParameter(++a);
if(this.chk)return new J.util.P4;switch(this.sm.getShapeIdFromObjectName(a)){case 22:this.setShapeProperty(22,"thisID",a);a=this.getShapeProperty(22,"vertices");if(null==a||3>a.length||null==a[0]||null==a[1]||null==a[2])break;J.util.Measure.getPlaneThroughPoints(a[0],a[1],a[2],new J.util.V3,b,c,d=new J.util.P4);break;case 24:this.setShapeProperty(24,"thisID",a),d=this.getShapeProperty(24,"plane")}break;case 1112541205:(!this.checkToken(++a)||269484436!=this.getToken(a++).tok)&&this.evalError("x=?",
null);d=J.util.P4.new4(1,0,0,-this.floatParameter(a));break;case 1112541206:(!this.checkToken(++a)||269484436!=this.getToken(a++).tok)&&this.evalError("y=?",null);d=J.util.P4.new4(0,1,0,-this.floatParameter(a));break;case 1112541207:(!this.checkToken(++a)||269484436!=this.getToken(a++).tok)&&this.evalError("z=?",null);d=J.util.P4.new4(0,0,1,-this.floatParameter(a));break;case 1073741824:case 4:b=this.parameterAsString(a);if(b.equalsIgnoreCase("xy"))return J.util.P4.new4(0,0,1,0);if(b.equalsIgnoreCase("xz"))return J.util.P4.new4(0,
1,0,0);if(b.equalsIgnoreCase("yz"))return J.util.P4.new4(1,0,0,0);this.iToken+=2;break;case 1048586:if(!this.isPoint3f(a)){d=this.getPoint4f(a);break}case 10:case 1048577:a=this.atomCenterOrCoordinateParameter(a);269484080==this.getToken(++this.iToken).tok&&++this.iToken;var f=this.atomCenterOrCoordinateParameter(this.iToken);269484080==this.getToken(++this.iToken).tok&&++this.iToken;var g=this.atomCenterOrCoordinateParameter(this.iToken),h=new J.util.V3,b=J.util.Measure.getNormalThroughPoints(a,
f,g,h,b,c),d=new J.util.P4;d.set(h.x,h.y,h.z,b);!this.chk&&J.util.Logger.debugging&&J.util.Logger.debug("points: "+a+f+g+" defined plane: "+d)}null==d&&this.planeExpected();e&&d.scale(-1);return d},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"hklParameter",($fz=function(a){!this.chk&&null==this.viewer.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&&J.util.Logger.debugging&&J.util.Logger.info("defined plane: "+a);return a},
$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getHklPlane",function(a){var b=new J.util.V3,c=new J.util.V3,d=J.util.P3.new3(0==a.x?1:1/a.x,0,0),e=J.util.P3.new3(0,0==a.y?1:1/a.y,0),f=J.util.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?(d.set(1,0,f.z),e.set(0,1,f.z)):0==a.y&&0==a.z?(e.set(d.x,0,1),f.set(d.x,1,0)):0==a.z&&0==a.x?(f.set(0,e.y,1),d.set(1,e.y,0)):0==a.x?d.set(1,e.y,0):0==a.y?e.set(0,1,f.z):0==a.z&&f.set(d.x,0,1);this.viewer.toCartesian(d,!1);this.viewer.toCartesian(e,
!1);this.viewer.toCartesian(f,!1);a=new J.util.V3;b=J.util.Measure.getNormalThroughPoints(d,e,f,a,b,c);c=new J.util.P4;c.set(a.x,a.y,a.z,b);return c},"J.util.P3");$_M(c$,"getMadParameter",($fz=function(){var a=1;switch(this.getToken(1).tok){case 1073742072:this.restrictSelected(!1,!1);break;case 1048589:break;case 1048588:a=0;break;case 2:a=8*this.intParameterRange(1,0,750);break;case 3:a=Clazz.doubleToInt(Math.floor(2E3*this.floatParameterRange(1,-3,3)));0>a&&(this.restrictSelected(!1,!1),a=-a);
break;default:this.error(6)}return a},$fz.isPrivate=!0,$fz));$_M(c$,"getSetAxesTypeMad",($fz=function(a){if(a==this.slen)return 1;switch(this.getToken(this.checkLast(a)).tok){case 1048589:return 1;case 1048588:return 0;case 1073741926:return-1;case 2:return this.intParameterRange(a,-1,19);case 3:return a=this.floatParameterRange(a,0,2),Clazz.doubleToInt(Math.floor(2E3*a))}this.errorStr(7,'"DOTTED"');return 0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"isColorParam",($fz=function(a){var b=this.tokAt(a);return 570425378==
b||1073742195==b||269484096==b||7==b||8==b||this.isPoint3f(a)||(4==b||J.script.T.tokAttr(b,1073741824))&&0!=J.util.ColorUtil.getArgbFromString(this.st[a].value)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getArgbParam",($fz=function(a){return this.getArgbParamOrNone(a,!1)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getArgbParamLast",($fz=function(a,b){var c=this.getArgbParamOrNone(a,b);this.checkLast(this.iToken);return c},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"getArgbParamOrNone",($fz=function(a,b){var c=null;
if(this.checkToken(a))switch(this.getToken(a).tok){default:if(!J.script.T.tokAttr(this.theTok,1073741824))break;case 570425378:case 4:return J.util.ColorUtil.getArgbFromString(this.parameterAsString(a));case 1073742195:return this.getColorTriad(a+2);case 269484096:return this.getColorTriad(++a);case 7:var d=J.script.SV.flistValue(this.theToken,3);null!=d&&3!=d.length&&(c=J.util.P3.new3(d[0],d[1],d[2]));break;case 8:c=this.theToken.value;break;case 1048586:c=this.getPoint3f(a,!1);break;case 1048587:if(b)return 0}null==
c&&this.error(8);return J.util.ColorUtil.colorPtToInt(c)},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"getColorTriad",($fz=function(a){var b=Clazz.newFloatArray(3,0),c=0,d="";this.getToken(a);var e=null,f=0;a:switch(this.theTok){case 2:case 1048614:case 3:for(;a<this.slen;a++){switch(this.getToken(a).tok){case 269484080:continue;case 1073741824:(1!=c||0!=b[0])&&this.error(4);d="0"+this.parameterAsString(a);break a;case 3:2<c&&this.error(4);f=this.floatParameter(a);break;case 2:2<c&&this.error(4);f=this.theToken.intValue;
break;case 1048614:2<c&&this.error(4);f=this.theToken.value.intValue()%256;break;case 269484097:3!=c&&this.error(4);--a;e=J.util.P3.new3(b[0],b[1],b[2]);break a;default:this.error(4)}b[c++]=f}this.error(4);break;case 8:e=this.theToken.value;break;case 1073741824:d=this.parameterAsString(a);break;default:this.error(4)}269484097!=this.getToken(++a).tok&&this.error(4);if(null!=e)return J.util.ColorUtil.colorPtToInt(e);0==(c=J.util.ColorUtil.getArgbFromString("["+d+"]"))&&this.error(4);return c},$fz.isPrivate=
!0,$fz),"~N");$_M(c$,"isPoint3f",($fz=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(d){if(Clazz.exceptionOf(d,Exception))b=!1;else throw d;}this.ignoreError=!1;this.iToken=c;return b},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getPoint3f",($fz=function(a,b){return this.getPointOrPlane(a,!1,b,!0,!1,
3,3)},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"getPoint4f",($fz=function(a){return this.getPointOrPlane(a,!1,!1,!1,!1,4,4)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getPointOrPlane",($fz=function(a,b,c,d,e,f,g){var h=Clazz.newFloatArray(6,0),j=0;this.coordinatesAreFractional=e;if(8==this.tokAt(a)){if(3>=f&&3<=g)return this.getToken(a).value;this.error(22)}if(9==this.tokAt(a)){if(4>=f&&4<=g)return this.getToken(a).value;this.error(22)}e=1;a:for(;a<this.st.length;a++)switch(this.getToken(a).tok){case 1048586:case 269484080:case 269484128:case 269484160:break;
case 1048590:break a;case 269484192:e=-1;break;case 1048615:6==j&&this.error(22);h[j++]=this.theToken.intValue;e=-1;break;case 2:case 1048614:6==j&&this.error(22);h[j++]=this.theToken.intValue*e;e=1;break;case 269484208:case 1048610:c||this.error(22);269484208==this.theTok&&this.getToken(++a);j--;(0>j||b)&&this.error(22);Clazz.instanceOf(this.theToken.value,Integer)||2==this.theTok?h[j++]/=2147483647==this.theToken.intValue?this.theToken.value.intValue():this.theToken.intValue:Clazz.instanceOf(this.theToken.value,
Float)&&(h[j++]/=this.theToken.value.floatValue());this.coordinatesAreFractional=!0;break;case 3:case 1048611:b&&this.error(22);6==j&&this.error(22);h[j++]=this.theToken.value.floatValue();break;default:this.error(22)}(j<f||j>g)&&this.error(22);return 3==j?(b=J.util.P3.new3(h[0],h[1],h[2]),this.coordinatesAreFractional&&d&&(this.fractionalPoint=J.util.P3.newP(b),this.chk||this.viewer.toCartesian(b,!this.viewer.getBoolean(603979848))),b):4==j?(this.coordinatesAreFractional&&this.error(22),J.util.P4.new4(h[0],
h[1],h[2],h[3])):h},$fz.isPrivate=!0,$fz),"~N,~B,~B,~B,~B,~N,~N");$_M(c$,"xypParameter",($fz=function(a){var b=this.tokAt(a);1073742195==b&&(b=this.tokAt(++a));if(269484096!=b||!this.isFloatParameter(++a))return null;b=new J.util.P3;b.x=this.floatParameter(a);269484080==this.tokAt(++a)&&a++;if(!this.isFloatParameter(a))return null;b.y=this.floatParameter(a);var c=269484210==this.tokAt(++a);c&&++a;if(269484097!=this.tokAt(a))return null;this.iToken=a;b.z=3.4028235E38*(c?-1:1);return b},$fz.isPrivate=
!0,$fz),"~N");$_M(c$,"isCommandDisplayable",($fz=function(a){return a>=this.aatoken.length||a>=this.pcEnd||null==this.aatoken[a]?!1:this.lineIndices[a][1]>this.lineIndices[a][0]},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"checkContinue",($fz=function(){if(this.executionStopped)return!1;if(this.executionStepping&&this.isCommandDisplayable(this.pc))this.viewer.setScriptStatus("Next: "+this.getNextStatement(),"stepping -- type RESUME to continue",0,null),this.executionPaused=!0;else if(!this.executionPaused)return!0;
J.util.Logger.debugging&&J.util.Logger.info("script execution paused at command "+(this.pc+1)+" level "+this.scriptLevel+": "+this.thisCommand);for(this.refresh();this.executionPaused;){this.viewer.popHoldRepaintWhy("pause");var a=this.viewer.getInsertedCommand();if(""!==a){this.resumePausedExecution();this.setErrorMessage(null);var b=this.getScriptContext();this.pc--;try{this.runScript(a)}catch(c){if(Clazz.exceptionOf(c,Exception))this.setErrorMessage(""+c);else if(Clazz.exceptionOf(c,Error))this.setErrorMessage(""+
c);else throw c;}this.$error&&(this.scriptStatusOrBuffer(this.errorMessage),this.setErrorMessage(null));this.restoreScriptContext(b,!0,!1,!1);this.pauseExecution(!1)}this.doDelay(-100);this.viewer.pushHoldRepaintWhy("pause")}this.notifyResumeStatus();return!this.$error&&!this.executionStopped},$fz.isPrivate=!0,$fz));Clazz.overrideMethod(c$,"notifyResumeStatus",function(){!this.chk&&(!this.executionStopped&&!this.executionStepping)&&this.viewer.scriptStatus("script execution "+(this.$error||this.executionStopped?
"interrupted":"resumed"));J.util.Logger.debug("script execution resumed")});$_M(c$,"doDelay",($fz=function(a){if(this.useThreads()){if(this.isJS&&this.allowJSThreads)throw new J.script.ScriptInterruption(this,"delay",a);this.viewer.delayScript(this,a)}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"dispatchCommands",($fz=function(a,b){var c=0;null==this.sm&&(this.sm=this.viewer.getShapeManager());this.debugScript=this.logMessages=!1;this.chk||this.setDebugging();this.logMessages&&(c=System.currentTimeMillis(),
this.viewer.scriptStatus("Eval.dispatchCommands():"+c),this.viewer.scriptStatus(this.$script));0==this.pcEnd&&(this.pcEnd=2147483647);0==this.lineEnd&&(this.lineEnd=2147483647);if(null==this.aatoken)return!0;this.commandLoop(b);if(this.chk)return!0;c=this.viewer.getInsertedCommand();""!==c?this.runScriptBuffer(c,null):a&&(this.debugScript&&this.viewer.getBoolean(603979879))&&this.viewer.scriptStatus("script <exiting>");return!this.isJS||!this.allowJSThreads||b?!0:this.mustResumeEval||null==this.thisContext?
(c=null==this.thisContext,this.resumeEval(this.thisContext),this.mustResumeEval=!1,c):!0},$fz.isPrivate=!0,$fz),"~B,~B");$_M(c$,"commandLoop",($fz=function(a){for(var b="",c=!1,d=null,e=System.currentTimeMillis();this.pc<this.aatoken.length&&this.pc<this.pcEnd;this.pc++){!this.chk&&(this.isJS&&this.allowJSThreads&&!a)&&(!this.executionPaused&&100<System.currentTimeMillis()-e&&(this.pc--,this.doDelay(-1)),e=System.currentTimeMillis());if(!this.chk&&!this.checkContinue())break;if(this.lineNumbers[this.pc]>
this.lineEnd)break;this.theToken=0==this.aatoken[this.pc].length?null:this.aatoken[this.pc][0];if(!this.historyDisabled&&!this.chk&&this.scriptLevel<=this.commandHistoryLevelMax&&!this.tQuiet){var f=this.getCommand(this.pc,!0,!0);if(null!=this.theToken&&0<f.length&&!f.equals(b)&&(135368713==this.theToken.tok||102436==this.theToken.tok||!J.script.T.tokAttr(this.theToken.tok,102400)))this.viewer.addCommand(b=f)}this.chk||(f=this.viewer.getInsertedCommand(),""!==f&&this.runScript(f));if(this.setStatement(this.pc)){this.thisCommand=
this.getCommand(this.pc,!1,!0);this.fullCommand=this.thisCommand+this.getNextComment();this.getToken(0);this.iToken=0;if((this.listCommands||!this.chk&&0<this.scriptLevel)&&!this.isJS)if(f=this.viewer.getInt(536870922),this.listCommands||0<f)0<f&&this.viewer.delayScript(this,-f),this.viewer.scriptEcho("$["+this.scriptLevel+"."+this.lineNumbers[this.pc]+"."+(this.pc+1)+"] "+this.thisCommand);if(null!=d&&(1150985!=this.theTok||2>this.slen||102439!=this.st[1].tok))d.addLast(this.st);else{if(this.chk){if(this.isCmdLine_c_or_C_Option&&
J.util.Logger.info(this.thisCommand),1==this.slen&&135368713!=this.st[0].tok&&102436!=this.st[0].tok)continue}else this.debugScript&&this.logDebugScript(0),0==this.scriptLevel&&this.viewer.global.logCommands&&this.viewer.log(this.thisCommand),this.logMessages&&null!=this.theToken&&J.util.Logger.debug(this.theToken.toString());if(null!=this.theToken){if(J.script.T.tokAttr(this.theToken.tok,135168))this.processShapeCommand(this.theToken.tok);else switch(this.theToken.tok){case 0:if(this.chk||!this.viewer.getBoolean(603979879))break;
f=this.theToken.value;if(null==f)break;null==this.outputBuffer&&this.viewer.showMessage(f);this.scriptStatusOrBuffer(f);break;case 266280:this.pushContext(this.theToken);break;case 266278:this.popContext(!0,!1);break;case 269484066:break;case 20500:case 528410:if(this.viewer.isHeadless())break;case 102412:case 102407:case 102408:case 364547:case 102402:case 1150985:case 364548:case 135369224:case 135369225:case 102410:case 102411:case 102413:case 102406:c=this.flowControl(this.theToken.tok,c,d);102439==
this.theTok&&(d=null);break;case 4097:this.animation();break;case 4098:this.assign();break;case 1610616835:this.background(1);break;case 4100:this.bind();break;case 4101:this.bondorder();break;case 4102:this.calculate();break;case 135270422:this.cache();break;case 1069064:this.cd();break;case 12289:this.center(1);break;case 4105:this.centerAt();break;case 1766856708:this.color();break;case 135270405:this.compare();break;case 1095766022:this.configuration();break;case 4106:this.connect(1);break;case 528395:this.console();
break;case 135270407:this.data();break;case 1060866:this.define();break;case 528397:this.delay();break;case 12291:this.$delete();break;case 554176526:this.slab(!0);break;case 1610625028:this.display(!0);break;case 266255:case 266281:if(this.chk)break;0<this.pc&&266255==this.theToken.tok&&this.viewer.clearScriptQueue();this.executionStopped=0<this.pc||!this.viewer.global.useScriptQueue;break;case 266256:if(this.chk)return;this.viewer.exitJmol();break;case 1229984263:this.file();break;case 1060869:this.fixed();
break;case 4114:this.font(-1,0);break;case 4115:case 1095766028:this.frame(1);break;case 102436:case 135368713:case 1073741824:this.$function();break;case 135270410:this.getProperty();break;case 20482:this.help();break;case 12294:this.display(!1);break;case 1612189718:this.hbond();break;case 1610616855:this.history(1);break;case 544771:this.hover();break;case 266264:this.chk||this.viewer.initialize(!this.isStateScript);break;case 4121:this.invertSelected();break;case 135287308:this.script(135287308,
null);break;case 135271426:this.load();break;case 36869:this.log();break;case 1052700:this.mapProperty();break;case 20485:this.message();break;case 4126:this.minimize();break;case 4128:this.move();break;case 4130:this.moveto();break;case 4131:this.navigate();break;case 20487:this.pause();break;case 4133:case 135270417:case 1052714:this.plot(this.st);break;case 36865:this.print();break;case 102439:this.pushContext(this.theToken);null!=this.parallelProcessor&&(d=new J.util.JmolList);break;case 135304707:this.prompt();
break;case 4139:case 4165:this.undoRedoMove();break;case 266284:this.refresh();break;case 4141:this.reset();break;case 4142:this.restore();break;case 12295:this.restrict();break;case 266287:this.chk||this.resumePausedExecution();break;case 36866:this.returnCmd(null);break;case 528432:this.rotate(!1,!1);break;case 4145:this.rotate(!1,!0);break;case 4146:this.save();break;case 1085443:this.set();break;case 135271429:this.script(135271429,null);break;case 135280132:this.select(1);break;case 1611141171:this.selectionHalo(1);
break;case 4148:this.show();break;case 554176565:this.slab(!1);break;case 1611141175:this.rotate(!0,!1);break;case 1611141176:this.ssbond();break;case 266298:this.pause()&&this.stepPausedExecution();break;case 528443:this.stereo();break;case 1641025539:this.structure();break;case 3158024:this.subset();break;case 4156:this.sync();break;case 536875070:this.timeout(1);break;case 4160:this.translate(!1);break;case 4162:this.translate(!0);break;case 4164:this.unbind();break;case 4166:this.vibration();
break;case 135270421:this.write(null);break;case 1060873:this.zap(!0);break;case 4168:this.zoom(!1);break;case 4170:this.zoom(!0);break;default:this.error(47)}this.setCursorWait(!1);this.executionStepping&&(this.executionPaused=this.isCommandDisplayable(this.pc+1))}}}else J.util.Logger.info(this.getCommand(this.pc,!0,!1)+" -- STATEMENT CONTAINING @{} SKIPPED")}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"cache",($fz=function(){this.checkLength(3);var a=this.tokAt(1),b=this.parameterAsString(2);switch(a){case 1276118017:case 1073742119:this.chk||
(1073742119==a&&1048579==this.tokAt(2)&&(b=null),b=this.viewer.cacheFileByName(b,1276118017==a),this.showString(0>b?"cache cleared":b+" bytes "+(1276118017==a?" cached":" removed")));break;default:this.error(22)}},$fz.isPrivate=!0,$fz));$_M(c$,"setCursorWait",($fz=function(a){this.chk||this.viewer.setCursor(a?4:0)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"processShapeCommand",($fz=function(a){var b=0;switch(a){case 1611272194:b=31;break;case 1115297793:b=9;break;case 1679429641:b=32;break;case 1113200642:b=
11;break;case 135174:b=23;break;case 135402505:b=25;break;case 135175:b=17;break;case 1113198595:b=16;break;case 135176:b=22;break;case 537022465:b=30;break;case 1113198596:b=20;break;case 1611272202:b=35;break;case 1113198597:b=19;break;case 1113200646:b=8;break;case 135180:b=24;break;case 1826248715:b=5;break;case 135182:b=26;break;case 537006096:case 1746538509:b=6;break;case 1113200647:b=13;break;case 1183762:b=27;break;case 135190:b=29;break;case 135188:b=28;break;case 135192:b=21;break;case 1113200649:b=
14;break;case 1113200650:b=15;break;case 1113200651:b=0;break;case 1113200652:b=7;break;case 1650071565:b=12;break;case 1708058:b=4;break;case 1113200654:b=10;break;case 1614417948: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 1048588:case 12291:case 1048587:return}switch(a){case 1115297793:case 1113200642:case 1113200647:case 1113200649:case 1113200650:case 1650071565:case 1113200654:this.proteinShape(b);
return;case 1113198595:case 1113198597:this.dots(b);return;case 1113198596:this.ellipsoid();return;case 1113200646:case 1113200651:case 1113200652:this.setAtomShapeSize(b,1113200646==a?-1:1);return;case 1826248715:this.label(1);return;case 135182:this.lcaoCartoon();return;case 135192:this.polyhedra();return;case 1708058:this.struts();return;case 135198:this.vector();return;case 659488:this.wireframe();return}switch(a){case 1611272194:this.axes(1);break;case 1679429641:this.boundbox(1);break;case 135174:this.cgo();
break;case 135402505:this.contact();break;case 135175:this.dipole();break;case 135176:this.draw();break;case 537022465:this.echo(1,null,!1);break;case 1611272202:this.frank(1);break;case 135180:case 135190:case 135188:this.isosurface(b);break;case 537006096:case 1746538509:this.measure();break;case 1183762:this.mo(!1);break;case 1614417948:this.unitcell(1)}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"flowControl",($fz=function(a,b,c){var d;switch(a){case 20500:return this.gotoCmd(this.parameterAsString(this.checkLast(1))),
b;case 528410:return this.chk||(this.pc=-1),this.delay(),b}var e=this.st[0].intValue,f=0>e&&!this.chk;d=!0;var g=0;switch(a){case 102412:d=this.theToken;this.pushContext(d);!f&&null!=d.name0&&this.contextVariables.put(d.name0,d.contextVariables.get(d.name0));d=!f;break;case 102410:case 102413:case 102411:g=Math.abs(this.aatoken[Math.abs(e)][0].intValue);switch(f?0:this.switchCmd(this.theToken,a)){case 0:g=-g;d=!1;break;case -1:d=!1}this.aatoken[this.pc][0].intValue=Math.abs(e);this.theToken=this.aatoken[Math.abs(e)][0];
1150985!=this.theToken.tok&&(this.theToken.intValue=g);break;case 135369225:case 102402:d=!f&&this.ifCmd();if(this.chk)break;g=Math.abs(this.aatoken[Math.abs(e)][0].intValue);this.aatoken[Math.abs(e)][0].intValue=f||d?-g:g;102412==a&&(this.aatoken[this.pc][0].intValue=-e);break;case 364547:this.checkLength(1);0>e&&!this.chk&&(this.pc=-e-1);break;case 364548:this.checkLength(1);break;case 102406:b||this.pushContext(this.theToken);b=!1;!this.ifCmd()&&!this.chk&&(this.pc=e,this.popContext(!0,!1));break;
case 102407:if(!this.chk){this.breakCmd(e);break}if(1==this.slen)break;f=this.intParameter(this.checkLast(1));if(this.chk)break;for(var h=0;h<f;h++)this.popContext(!0,!1);break;case 102408:b=!0;this.chk||(this.pc=e-1);1<this.slen&&this.intParameter(this.checkLast(1));break;case 135369224:g=this.theToken;f=Clazz.newIntArray(2,0);c=0;a=null;for(var h=1,j=0;h<this.slen&&2>c;h++)switch(this.tokAt(h)){case 1048591:0<j?j--:f[c++]=h;break;case 1073741980:j-=2;if(1048577==this.tokAt(++h)||10==this.tokAt(h))a=
this.atomExpressionAt(h),this.isBondSet&&(a=new J.modelset.Bond.BondSet(a));else switch(h=this.parameterExpressionList(-h,1,!1),(null==h||1>h.size())&&this.error(22),h=h.get(0),h.tok){case 10:a=J.script.SV.getBitSet(h,!1);break;case 7:a=h.getList();break;default:this.error(22)}h=this.iToken;break;case 135280132:j+=2}b?c=null==a?f[1]+1:2:(this.pushContext(g),c=2);36868==this.tokAt(c)&&c++;g=this.parameterAsString(c);(h=g.equals("--")||g.equals("++"))&&(g=this.parameterAsString(++c));j=null;if(J.script.T.tokAttr(this.tokAt(c),
1073741824)||null!=(j=this.getContextVariableAsVariable(g)))if(null==a&&(!h&&269484436!=this.getToken(++c).tok)&&this.error(22),null==a)h&&(c-=2),this.setVariable(++c,this.slen-1,g,0);else if(d=!0,c=g+"_incr",null==j&&(j=this.getContextVariableAsVariable(c)),null==j&&(g.startsWith("_")&&this.error(22),j=this.viewer.getOrSetNewVariable(c,!0)),!b||10!=j.tok&&7!=j.tok||2147483647==j.intValue?b?d=!1:(j.setv(J.script.SV.getVariable(a),!1),j.intValue=1):j.intValue++,d=d&&(Clazz.instanceOf(a,J.util.BS)?
1==J.script.SV.bsSelectVar(j).cardinality():j.intValue<=j.getList().size()))j=J.script.SV.selectItemVar(j),b=this.getContextVariableAsVariable(g),null==b&&(b=this.viewer.getOrSetNewVariable(g,!0)),b.setv(j,!1);null==a&&(d=this.parameterExpressionBoolean(f[0]+1,f[1]));e++;d||this.popContext(!0,!1);b=!1;break;case 1150985:switch(this.getToken(this.checkLast(1)).tok){case 364558:e=this.getToken(1).value;if(this.chk)return!1;this.runFunctionRet(e,"try",null,null,!0,!0,!0);return!1;case 102412:this.popContext(!0,
!1);break;case 135368713:case 102436:return this.viewer.addFunction(this.theToken.value),b;case 102439:this.addProcess(c,e,this.pc);this.popContext(!0,!1);break;case 102410:if(0<e&&-1==this.switchCmd(this.aatoken[e][0],0)){for(;e<this.pc&&!(102413!=(a=this.aatoken[e][0].tok)&&102411!=a);e++);d=this.pc==e}}d&&(d=102412==this.theTok||102439==this.theTok||135369225==this.theTok||102410==this.theTok);b=135369224==this.theTok||102406==this.theTok}!d&&!this.chk&&(this.pc=Math.abs(e)-1);return b},$fz.isPrivate=
!0,$fz),"~N,~B,J.util.JmolList");$_M(c$,"gotoCmd",($fz=function(a){for(var b=null==a?this.aatoken.length-1:-1,c=null,d=b+1;d<this.aatoken.length;d++){var c=this.aatoken[d],e=c[0].tok;switch(e){case 20485:case 0:c=c[c.length-1].value;0==e&&(c=c.substring(c.startsWith("#")?1:2));break;default:continue}if(c.equalsIgnoreCase(a)){b=d;break}}0>b&&this.error(22);null==a&&(b=0);e=b<this.pc?1:-1;c=0;for(d=b;d!=this.pc;d+=e)switch(this.aatoken[d][0].tok){case 266280:case 102439:case 135369224:case 102412:case 102406:c++;
break;case 266278:c--;break;case 1150985:switch(this.aatoken[d][1].tok){case 102439:case 135369224:case 102412:case 102406:c--}}if(null==a)for(b=2147483647;0<c;--c)this.popContext(!1,!1);0!=c&&this.error(22);this.chk||(this.pc=b-1)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"breakCmd",($fz=function(a){if(0>a)this.getContextVariableAsVariable("_breakval").intValue=-a,this.pcEnd=this.pc;else if(this.pc=Math.abs(this.aatoken[a][0].intValue),a=this.aatoken[a][0].tok,102411==a||102413==a)this.theToken=this.aatoken[this.pc--][0],
a=Math.abs(this.theToken.intValue),1150985!=this.theToken.tok&&(this.theToken.intValue=-a);else{for(;null!=this.thisContext&&!J.script.ScriptCompiler.isBreakableContext(this.thisContext.token.tok);)this.popContext(!0,!1);this.popContext(!0,!1)}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"addProcess",($fz=function(a,b,c){if(null!=this.parallelProcessor){for(var d=Array(c),e=0;e<a.size();e++)d[e+1-b]=a.get(e);a=this.getScriptContext();a.aatoken=d;a.pc=1-b;a.pcEnd=c;this.parallelProcessor.addProcess("p"+($t$=
++J.script.ScriptEvaluator.iProcess,J.script.ScriptEvaluator.prototype.iProcess=J.script.ScriptEvaluator.iProcess,$t$),a)}},$fz.isPrivate=!0,$fz),"J.util.JmolList,~N,~N");$_M(c$,"switchCmd",($fz=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 d=this.parameterExpressionToken(1);if(102411==b)return(c=J.script.SV.areEqual(c,d))&&a.contextVariables.remove("_var"),c?1:-1;a.contextVariables.put("_var",
d);return 1},$fz.isPrivate=!0,$fz),"J.script.ContextToken,~N");$_M(c$,"ifCmd",($fz=function(){return this.parameterExpressionBoolean(1,0)},$fz.isPrivate=!0,$fz));$_M(c$,"returnCmd",($fz=function(a){var b=this.getContextVariableAsVariable("_retval");if(null==b)this.chk||this.gotoCmd(null);else{var c=null!=a||1==this.slen?null:this.parameterExpressionToken(1);this.chk||(null==a&&(a=null==c?J.script.SV.newScriptVariableInt(0):c),b.value=a.value,b.intValue=a.intValue,b.tok=a.tok,this.gotoCmd(null))}},
$fz.isPrivate=!0,$fz),"J.script.SV");$_M(c$,"help",($fz=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.viewer.getBindingInfo(a.substring(b+1))):(J.script.T.tokAttr(J.script.T.getTokFromName(a),4096)&&(a="?command="+a),this.viewer.getHelp(a))}},$fz.isPrivate=!0,$fz));$_M(c$,"move",($fz=function(){11<this.slen&&this.error(2);var a=J.util.V3.new3(this.floatParameter(1),this.floatParameter(2),
this.floatParameter(3)),b=this.floatParameter(4),c=J.util.V3.new3(this.intParameter(5),this.intParameter(6),this.intParameter(7)),d=this.floatParameter(8),e=this.floatParameter(9),f=11==this.slen?this.intParameter(10):30;if(!this.chk&&(this.refresh(),this.useThreads()||(e=0),this.viewer.move(this,a,b,c,d,e,f),0<e&&this.isJS))throw new J.script.ScriptInterruption(this,"move",1);},$fz.isPrivate=!0,$fz));$_M(c$,"moveto",($fz=function(){if(2==this.slen&&1073742162==this.tokAt(1))this.chk||this.viewer.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(),this.viewer.moveTo(this,a,null,J.viewer.JC.axisZ,0,null,100,0,0,0,null,NaN,NaN,NaN),this.isJS&&0<a&&this.viewer.global.waitForMoveTo))throw new J.script.ScriptInterruption(this,"moveTo",1);}else{var b=J.util.V3.new3(NaN,0,0),c=null,d=1;a=this.isFloatParameter(d)?this.floatParameter(d++):2;var e=90,f=null;switch(this.getToken(d).tok){case 135270417:var g,e=!1;1073742029==
this.tokAt(++d)&&(e=!0,d++);10==this.tokAt(d)||1048577==this.tokAt(d)?(e=!0,c=this.centerParameter(d),Clazz.instanceOf(this.expressionResult,J.util.BS)||this.error(22),f=this.expressionResult,g=this.chk?new J.util.Quaternion:this.viewer.getAtomQuaternion(f.nextSetBit(0))):g=this.getQuaternionParameter(d);d=this.iToken+1;null==g&&this.error(22);g=g.toAxisAngle4f();b.set(g.x,g.y,g.z);e=(e?-1:1)*(180*g.angle/3.141592653589793);break;case 9:case 8:case 1048586:this.isPoint3f(d)?(b.setT(this.getPoint3f(d,
!0)),d=this.iToken+1,e=this.floatParameter(d++)):(e=this.getPoint4f(d),d=this.iToken+1,b.set(e.x,e.y,e.z),e=0==e.x&&0==e.y&&0==e.z?NaN:e.w);break;case 1073741954:b.set(1,0,0);e=0;this.checkLength(++d);break;case 1073741860:b.set(0,1,0);e=180;this.checkLength(++d);break;case 1073741996:b.set(0,1,0);this.checkLength(++d);break;case 1073742128:b.set(0,-1,0);this.checkLength(++d);break;case 1074790748:b.set(1,0,0);this.checkLength(++d);break;case 1073741871:b.set(-1,0,0);this.checkLength(++d);break;default:b=
J.util.V3.new3(this.floatParameter(d++),this.floatParameter(d++),this.floatParameter(d++)),e=this.floatParameter(d++)}Float.isNaN(b.x)||Float.isNaN(b.y)||Float.isNaN(b.z)?b.set(0,0,0):0==b.length()&&0==e&&(e=NaN);g=!this.viewer.isInPosition(b,e);var h=this.isFloatParameter(d)?this.floatParameter(d++):NaN,j=0,k=0;this.isFloatParameter(d)&&!this.isCenterParameter(d)&&(j=this.floatParameter(d++),k=this.floatParameter(d++),!g&&1<=Math.abs(j-this.viewer.getTranslationXPercent())&&(g=!0),!g&&1<=Math.abs(k-
this.viewer.getTranslationYPercent())&&(g=!0));null==f&&d!=this.slen&&(c=this.centerParameter(d),Clazz.instanceOf(this.expressionResult,J.util.BS)&&(f=this.expressionResult),d=this.iToken+1);var m=NaN,l=this.viewer.getZoomSetting();null!=c&&(!g&&0.1<=c.distance(this.viewer.getRotationCenter())&&(g=!0),this.isFloatParameter(d)&&(m=this.floatParameter(d++)),this.isCenterParameter(d)||((0==m||Float.isNaN(m))&&(0==h||Float.isNaN(h))?(f=Math.abs(this.getZoom(0,d,f,0==h?0:l)),d=this.iToken+1,h=f):!g&&0.1<=
Math.abs(m-this.viewer.getFloat(570425388))&&(g=!0)));if(0==h||Float.isNaN(h))h=100;Float.isNaN(m)&&(m=0);!g&&1<=Math.abs(h-l)&&(g=!0);var f=null,s=l=NaN,p=NaN;d!=this.slen&&(f=this.centerParameter(d),d=this.iToken+1,d!=this.slen&&(l=this.floatParameter(d++),s=this.floatParameter(d++)),d!=this.slen&&(p=this.floatParameter(d++)));d!=this.slen&&this.error(2);if(!this.chk&&(g||(a=0),0<a&&this.refresh(),this.useThreads()||(a=0),this.viewer.moveTo(this,a,c,b,e,null,h,j,k,m,f,l,s,p),this.isJS&&0<a&&this.viewer.global.waitForMoveTo))throw new J.script.ScriptInterruption(this,
"moveTo",1);}}},$fz.isPrivate=!0,$fz));$_M(c$,"navigate",($fz=function(){if(1==this.slen)this.setBooleanProperty("navigationMode",!0);else{var a=J.util.V3.new3(0,1,0),b=new J.util.JmolList,c;if(2==this.slen)switch(this.getToken(1).tok){case 1048589:case 1048588:if(this.chk)return;this.setObjectMad(31,"axes",1);this.setShapeProperty(31,"position",J.util.P3.new3(50,50,3.4028235E38));this.setBooleanProperty("navigationMode",!0);this.viewer.setNavOn(1048589==this.theTok);return;case 1073742162:this.chk||
this.viewer.setNavXYZ(0,0,0);return;case 8:break;default:this.error(22)}!this.chk&&!this.viewer.getBoolean(603979886)&&this.setBooleanProperty("navigationMode",!0);for(var d=1;d<this.slen;d++){var e=this.isFloatParameter(d)?this.floatParameter(d++):2;0>e&&this.error(22);!this.chk&&0<e&&this.refresh();switch(this.getToken(d).tok){case 8:case 1048586:c=this.getPoint3f(d,!0);this.iToken++;this.iToken!=this.slen&&this.error(22);this.chk||this.viewer.setNavXYZ(c.x,c.y,c.z);return;case 554176526:c=this.floatParameter(++d);
this.chk||b.addLast([Integer.$valueOf(554176526),Float.$valueOf(e),Float.$valueOf(c)]);continue;case 12289:c=this.centerParameter(++d);d=this.iToken;this.chk||b.addLast([Integer.$valueOf(135266320),Float.$valueOf(e),c]);continue;case 528432:switch(this.getToken(++d).tok){case 1112541205:a.set(1,0,0);d++;break;case 1112541206:a.set(0,1,0);d++;break;case 1112541207:a.set(0,0,1);d++;break;case 8:case 1048586:a.setT(this.getPoint3f(d,!0));d=this.iToken+1;break;case 1073741824:this.error(22)}c=this.floatParameter(d);
this.chk||b.addLast([Integer.$valueOf(528432),Float.$valueOf(e),a,Float.$valueOf(c)]);continue;case 4160:var f=c=NaN;if(this.isFloatParameter(++d))c=this.floatParameter(d),f=this.floatParameter(++d);else switch(this.tokAt(d)){case 1112541205:c=this.floatParameter(++d);break;case 1112541206:f=this.floatParameter(++d);break;default:c=this.centerParameter(d);d=this.iToken;this.chk||b.addLast([Integer.$valueOf(4160),Float.$valueOf(e),c]);continue}this.chk||b.addLast([Integer.$valueOf(269484210),Float.$valueOf(e),
Float.$valueOf(c),Float.$valueOf(f)]);continue;case 269484208:continue;case 1113200654:c=new J.util.JmolList;f=this.atomExpressionAt(++d);d=this.iToken;if(this.chk)return;this.viewer.getPolymerPointsAndVectors(f,c);var g;if(0<(g=c.size())){for(var f=Array(g),h=0;h<g;h++)f[h]=c.get(h);b.addLast([Integer.$valueOf(1113200654),Float.$valueOf(e),f]);continue}break;case 1073742084:if(1048583==this.getToken(d+1).tok){d++;c=this.objectNameParameter(++d);if(this.chk)return;this.setShapeProperty(22,"thisID",
c);c=this.getShapeProperty(22,"vertices");this.refresh();null==c&&this.error(22);f=Clazz.floatToInt(this.isFloatParameter(d+1)?this.floatParameter(++d):0);g=Clazz.floatToInt(this.isFloatParameter(d+1)?this.floatParameter(++d):2147483647);b.addLast([Integer.$valueOf(1073742084),Float.$valueOf(e),c,null,[f,g]]);continue}for(c=new J.util.JmolList;this.isCenterParameter(d+1);)c.addLast(this.centerParameter(++d)),d=this.iToken;if(0<c.size()){c=c.toArray(Array(c.size()));this.chk||b.addLast([Integer.$valueOf(1073742084),
Float.$valueOf(e),c,null,[0,2147483647]]);continue}default:this.error(22)}}this.chk||this.viewer.navigateList(this,b)}},$fz.isPrivate=!0,$fz));$_M(c$,"bondorder",($fz=function(){this.checkLength(-3);var a=0;switch(this.getToken(1).tok){case 2:case 3:131071==(a=J.util.JmolEdge.getBondOrderFromFloat(this.floatParameter(1)))&&this.error(22);break;default:131071==(a=J.script.ScriptEvaluator.getBondOrderFromString(this.parameterAsString(1)))&&this.error(22),33==a&&3==this.tokAt(2)&&(a=J.script.ScriptEvaluator.getPartialBondOrderFromFloatEncodedInt(this.st[2].intValue))}this.setShapeProperty(1,
"bondOrder",Integer.$valueOf(a))},$fz.isPrivate=!0,$fz));$_M(c$,"console",($fz=function(){switch(this.getToken(1).tok){case 1048588:this.chk||this.viewer.showConsole(!1);break;case 1048589:this.chk||this.viewer.showConsole(!0);break;case 1073741882:this.chk||this.viewer.clearConsole();break;case 135270421:this.showString(this.stringParameter(2));break;default:this.error(22)}},$fz.isPrivate=!0,$fz));$_M(c$,"centerAt",($fz=function(){var a=null;switch(this.getToken(1).tok){case 1073741826:a="absolute";
break;case 96:a="average";break;case 1679429641:a="boundbox";break;default:this.error(22)}var b=J.util.P3.new3(0,0,0);5==this.slen?(b.x=this.floatParameter(2),b.y=this.floatParameter(3),b.z=this.floatParameter(4)):this.isCenterParameter(2)?(b=this.centerParameter(2),this.checkLast(this.iToken)):this.checkLength(2);this.chk||this.viewer.setCenterAt(a,b)},$fz.isPrivate=!0,$fz));$_M(c$,"stereo",($fz=function(){for(var a=J.constant.EnumStereoMode.DOUBLE,b=-5,c=!1,d=null,e=0,f=1;f<this.slen;++f)if(this.isColorParam(f))1<
e&&this.error(2),0==e&&(d=Clazz.newIntArray(2,0)),c||(b=3),d[e]=this.getArgbParam(f),0==e++&&(d[1]=~d[0]),f=this.iToken;else switch(this.getToken(f).tok){case 1048589:this.checkLast(this.iToken=1);this.iToken=1;break;case 1048588:this.checkLast(this.iToken=1);a=J.constant.EnumStereoMode.NONE;break;case 2:case 3:b=this.floatParameter(f);c=!0;break;case 1073741824:if(c||(b=3),a=J.constant.EnumStereoMode.getStereoMode(this.parameterAsString(f)),null!=a)break;default:this.error(22)}this.chk||this.viewer.setStereoMode(d,
a,b)},$fz.isPrivate=!0,$fz));$_M(c$,"compare",($fz=function(){var a=!1,b=!1,c=!1,d=!1,e=NaN,f=null,g=null,h=null,j=null,k=null,m=null,l=3158024==this.tokAt(1)?null:this.atomExpressionAt(1),s=3158024==this.tokAt(++this.iToken)?null:this.atomExpressionAt(this.iToken);(null==l||null==s)&&this.error(22);var p=null,r=!1,v=null,y=J.util.BSUtil.copy(l);y.or(s);for(var y=d=y.equals(l),z=this.iToken+1;z<this.slen;++z)switch(this.getToken(z).tok){case 4115:y=!0;break;case 135267336:r=!0;case 135267335:v=this.stringParameter(++z);
break;case 3:case 2:e=Math.abs(this.floatParameter(z));break;case 269484080:break;case 3158024:p=this.atomExpressionAt(++z);z=this.iToken;break;case 10:case 1048577:null!=m&&this.error(22);var h=this.atomExpressionAt(this.iToken),n=d?0:this.tokAt(this.iToken+1),j=10==n||1048577==n?this.atomExpressionAt(++this.iToken):J.util.BSUtil.copy(h);null!=p&&(h.and(p),j.and(p));j.and(s);null==k&&(k=new J.util.JmolList);k.addLast([h,j]);z=this.iToken;break;case 7:null!=k&&this.error(22);a=!0;f=J.script.ScriptMathProcessor.getQuaternionArray(this.theToken.getList(),
1073742001);this.getToken(++z);g=J.script.ScriptMathProcessor.getQuaternionArray(this.theToken.getList(),1073742001);null==m&&(m=new J.util.JmolList);m.addLast([f,g]);break;case 1073742077:a=!0;break;case 135266320:case 1141899265:a=!1;break;case 528432:b=!0;break;case 4160:c=!0;break;default:this.error(22)}if(!this.chk){y&&(e=0);Float.isNaN(e)||0>e?e=1:!b&&!c&&(b=c=!0);d=0!=e;n=!a&&null==v;null==k&&null==m&&(null==p?(h=n?this.viewer.getAtomBitSet("spine"):new J.util.BS,0>h.nextSetBit(0)?(h=l,j=s):
(j=J.util.BSUtil.copy(h),h.and(l),j.and(s))):(h=J.util.BSUtil.copy(l),j=J.util.BSUtil.copy(s),h.and(p),j.and(p),h.and(l),j.and(s)),k=new J.util.JmolList,k.addLast([h,j]));if(y){l=this.viewer.getModelBitSet(l,!1);p=Array(l.cardinality());z=0;for(h=l.nextSetBit(0);0<=h;h=l.nextSetBit(h+1),z++)p[z]=this.viewer.getModelUndeletedAtomsBitSet(h)}else p=[l];for(h=0;h<p.length;h++){for(var l=p[h],w=Clazz.newFloatArray(2,0),z=null,u=new J.util.JmolList,j=null,t=y?new J.util.JmolList:k,z=0;z<k.size();++z){var A=
k.get(z);y&&t.addLast(A=[J.util.BSUtil.copy(A[0]),A[1]]);A[0].and(l)}if(n)j=this.viewer.getCenterAndPoints(t,!0),z=J.util.Measure.calculateQuaternionRotation(j,w,!0),u=Float.isNaN(w[1])?NaN:Math.round(100*w[0])/100,w=Float.isNaN(w[1])?NaN:Math.round(100*w[1])/100,this.showString("RMSD "+u+" --\x3e "+w+" Angstroms");else if(a){if(null==m)for(z=0;z<t.size();z++){A=t.get(z);f=this.viewer.getAtomGroupQuaternions(A[0],2147483647);g=this.viewer.getAtomGroupQuaternions(A[1],2147483647);for(A=0;A<f.length&&
A<g.length;A++)u.addLast(g[A].div(f[A]))}else for(A=0;A<f.length&&A<g.length;A++)u.addLast(g[A].div(f[A]));w[0]=0;f=u.toArray(Array(u.size()));z=J.util.Quaternion.sphereMean(f,w,1E-4);this.showString("RMSD = "+w[0]+" degrees")}else z=new J.util.Matrix4f,w=this.getSmilesCorrelation(l,s,v,null,null,z,null,!r,!1),Float.isNaN(w)&&this.error(22),w=new J.util.V3,z.get(w),w=new J.util.Matrix3f,z.getRotationScale(w),z=J.util.Quaternion.newM(w);null==j&&(j=this.viewer.getCenterAndPoints(t,!0));t=new J.util.P3;
u=NaN;w=null;c&&(w=J.util.V3.newV(j[1][0]),w.sub(j[0][0]),u=0);b&&(null==z&&this.evalError("option not implemented",null),t.setT(j[0][0]),t.add(z.getNormal()),u=z.getTheta());if(!Float.isNaN(u)&&!Float.isNaN(t.x)&&(A=null,b&&(c&&0!=e)&&(A=this.viewer.getAtomPointVector(l),z=J.script.ScriptMathProcessor.getMatrix4f(z.getMatrix(),w),A=J.util.Measure.transformPoints(A,z,j[0][0])),this.useThreads()||(d=!1),this.viewer.rotateAboutPointsInternal(this,j[0][0],t,u/e,u,d,l,w,A),d&&this.isJS))throw new J.script.ScriptInterruption(this,
"compare",1);}}},$fz.isPrivate=!0,$fz));$_M(c$,"getSmilesCorrelation",function(a,b,c,d,e,f,g,h,j){try{null==d&&(d=new J.util.JmolList,e=new J.util.JmolList);null==f&&(f=new J.util.Matrix4f);var k=this.viewer.modelSet.atoms,m=this.viewer.getAtomCount(),l=this.viewer.getSmilesMatcher().getCorrelationMaps(c,k,m,a,h,!0);null==l&&this.evalError(this.viewer.getSmilesMatcher().getLastException(),null);if(0==l.length)return NaN;for(a=0;a<l[0].length;a++)d.addLast(k[l[0][a]]);l=this.viewer.getSmilesMatcher().getCorrelationMaps(c,
k,m,b,h,!1);null==l&&this.evalError(this.viewer.getSmilesMatcher().getLastException(),null);if(0==l.length)return NaN;if(j){for(a=0;a<l.length;a++)for(var s=0;s<l[a].length;s++)e.addLast(k[l[a][s]]);return 0}b=3.4028235E38;c=null;for(a=0;a<l.length;a++){e.clear();for(s=0;s<l[a].length;s++)e.addLast(k[l[a][s]]);var p=J.util.Measure.getTransformMatrix4(d,e,f,null);J.util.Logger.info("getSmilesCorrelation stddev="+p);if(null!=g&&0.1>p){for(var r=new J.util.BS,s=0;s<l[a].length;s++)r.set(l[a][s]);g.addLast(r)}p<
b&&(c=l[a],b=p)}for(a=0;a<c.length;a++)e.addLast(k[c[a]]);return b}catch(v){if(Clazz.exceptionOf(v,Exception))return this.evalError(v.toString(),null),0;throw v;}},"J.util.BS,J.util.BS,~S,J.util.JmolList,J.util.JmolList,J.util.Matrix4f,J.util.JmolList,~B,~B");$_M(c$,"getSmilesMatches",function(a,b,c,d,e,f){if(this.chk)return f?new J.util.BS:["({})"];if(0==a.length){var g=this.viewer.getSmiles(0,0,c,!f,!1,!0,!0);null==g&&this.evalError(this.viewer.getSmilesMatcher().getLastException(),null);return g}g=
!0;if(null==d){if(a=(g=null==b)?this.viewer.getSmilesMatcher().getSubstructureSetArray(a,this.viewer.modelSet.atoms,this.viewer.getAtomCount(),c,null,e,!1):this.viewer.getSmilesMatcher().find(a,b,e,!1),null==a)return this.showStringPrint(this.viewer.getSmilesMatcher().getLastException(),!1),!g&&!e?Integer.$valueOf(-1):"?"}else{b=new J.util.JmolList;a=this.getSmilesCorrelation(d,c,a,null,null,null,b,e,!1);if(Float.isNaN(a))return f?new J.util.BS:[];this.showString("RMSD "+a+" Angstroms");a=b.toArray(Array(b.size()))}if(f){f=
new J.util.BS;for(c=0;c<a.length;c++)f.or(a[c]);if(g)return f;if(!e)return Integer.$valueOf(f.cardinality());g=Clazz.newIntArray(f.cardinality(),0);e=0;for(a=f.nextSetBit(0);0<=a;a=f.nextSetBit(a+1))g[e++]=a+1;return g}e=Array(a.length);for(c=0;c<a.length;c++)e[c]=g?J.util.Escape.eBS(a[c]):J.util.Escape.eBond(a[c]);return e},"~S,~S,J.util.BS,J.util.BS,~B,~B");$_M(c$,"connect",($fz=function(a){var b=Clazz.newFloatArray(2,0),c=Array(2);c[0]=c[1]=this.viewer.getSelectionSet(!1);var d=NaN,e=-2147483648,
f=0,g=131071,h=1073742026,j=!1,k=!1,m=!1,l=null,s=3.4028235E38,p=!1,r=0,v=0,y=new J.util.BS,z=!1,n=0,w=0,u=0,t=!1;if(1==this.slen)this.chk||this.viewer.rebondState(this.isStateScript);else{for(;a<this.slen;++a){switch(this.getToken(a).tok){case 1048589:case 1048588:this.checkLength(2);this.chk||this.viewer.rebondState(this.isStateScript);return;case 2:case 3:if(0<r){(k||p)&&this.error(23);g=J.util.JmolEdge.getBondOrderFromFloat(this.floatParameter(a));131071==g&&this.error(22);k=!0;break}2<++v&&this.error(2);
var A=this.floatParameter(a);269484210==this.tokAt(a+1)&&(A=-A/100,a++);b[f++]=A;break;case 10:case 1048577:(2<r||z&&0<r)&&this.error(2);(k||p)&&this.error(23);c[r++]=this.atomExpressionAt(a);z=this.isBondSet;if(2==r){for(var A=this.iToken,G=a;G<A;G++)if(1073741824==this.tokAt(G)&&this.parameterAsString(G).equals("_1")){n=a;break}this.iToken=A}a=this.iToken;break;case 1087373318:t=!0;break;case 1766856708:A=this.tokAt(a+1);1073742180!=A&&1073742074!=A&&(w=a+1);continue;case 1073742180:case 1073742074:null!=
l&&this.error(22);p=!0;l=this.parameterAsString(a);1073742180==this.theTok&&this.isFloatParameter(a+1)&&(s=this.getTranslucentLevel(++a));w=a+1;break;case 1074790662:b=1073741852==this.tokAt(2);this.checkLength(b?3:2);this.chk||this.viewer.setPdbConectBonding(b,this.isStateScript);return;case 1073741830:case 1073741852:case 1073741904:case 1073742025:case 1073742026:m=!0;++a!=this.slen&&this.error(23);h=this.theTok;1073741852==this.theTok&&!(131071==g||2048==g||515==g)&&this.error(22);break;case 1708058:p||
(e=16777215,l="translucent",s=0.5,d=this.viewer.getFloat(570425406),p=!0),m||(h=1073742026),m=!0;case 1073741824:case 1076887572:case 1612189718:if(0<a){if(w==a)break;if(this.isColorParam(a)){w=-a;break}}g=this.parameterAsString(a);131071==(g=J.script.ScriptEvaluator.getBondOrderFromString(g))&&this.error(22);k&&this.error(18);k=!0;switch(g){case 33:switch(this.tokAt(a+1)){case 3:g=J.script.ScriptEvaluator.getPartialBondOrderFromFloatEncodedInt(this.st[++a].intValue);break;case 2:g=this.intParameter(++a)}break;
case 2048:2==this.tokAt(a+1)&&(g=this.intParameter(++a)<<11,u=this.floatParameter(++a))}break;case 1666189314:d=this.floatParameter(++a);p=!0;break;case 1048587:case 12291:++a!=this.slen&&this.error(23);h=12291;j=!0;p=!1;break;default:w=a}0<a&&(w==-a||w==a&&this.isColorParam(a)?(e=this.getArgbParam(a),a=this.iToken,p=!0):w==a&&this.error(22))}if(!this.chk){2>f&&(0==f&&(b[0]=1E8),b[1]=b[0],b[0]=0.1);if(null!=l||!Float.isNaN(d)||-2147483648!=e)k||(g=65535),m||(h=1073742025);k=f=0;if(0<n){u=new J.util.BS;
this.definedAtomSets.put("_1",u);t=c[0];for(m=t.nextSetBit(0);0<=m;m=t.nextSetBit(m+1))u.set(m),c=this.viewer.makeConnections(b[0],b[1],g,h,u,this.atomExpressionAt(n),y,z,!1,0),f+=Math.abs(c[0]),k+=c[1],u.clear(m)}else c=this.viewer.makeConnections(b[0],b[1],g,h,c[0],c[1],y,z,t,u),f+=Math.abs(c[0]),k+=c[1];j?this.tQuiet||this.scriptLevel>this.scriptReportingLevel||this.scriptStatusOrBuffer(J.i18n.GT._("{0} connections deleted",k)):(p&&(this.viewer.selectBonds(y),Float.isNaN(d)||this.setShapeSizeBs(1,
Math.round(2E3*d),null),-2147483648!=e&&this.setShapePropertyBs(1,"color",Integer.$valueOf(e),y),null!=l&&(3.4028235E38==s&&(s=this.viewer.getFloat(570425354)),this.setShapeProperty(1,"translucentLevel",Float.$valueOf(s)),this.setShapePropertyBs(1,"translucency",l,y)),this.viewer.selectBonds(null)),this.tQuiet||this.scriptLevel>this.scriptReportingLevel||this.scriptStatusOrBuffer(J.i18n.GT._("{0} new bonds; {1} modified",[Integer.$valueOf(f),Integer.$valueOf(k)])))}}},$fz.isPrivate=!0,$fz),"~N");
$_M(c$,"getTranslucentLevel",($fz=function(a){a=this.floatParameter(a);return 2==this.theTok&&0<a&&9>a?a+1:a},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getProperty",($fz=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 c=this.viewer.getPropertyNumber(b),b=this.optParameterAsString(2),d=this.tokAt(2),d=1048577==d||10==d?this.atomExpressionAt(2):null;if(0<a.length&&0>c)b=a="";else if(0<=
c&&3>this.slen)b=this.viewer.getDefaultPropertyParam(c),b.equals("(visible)")&&(this.viewer.setModelVisibility(),d=this.viewer.getVisibleSet());else if(c==this.viewer.getPropertyNumber("fileContents"))for(c=3;c<this.slen;c++)b+=this.parameterAsString(c);a=this.viewer.getProperty("readable",a,null==d?b:d);this.showString(a)}},$fz.isPrivate=!0,$fz));$_M(c$,"background",($fz=function(a){this.getToken(a);if(1073741979==this.theTok)a=this.parameterAsString(this.checkLast(++a)),!this.chk&&(!a.equalsIgnoreCase("none")&&
0<a.length)&&this.viewer.loadImage(a,null);else if(this.isColorParam(a)||1048587==this.theTok)a=this.getArgbParamLast(a,!0),this.chk||(this.setObjectArgb("background",a),this.viewer.setBackgroundImage(null,null));else{var b=this.getShapeType(this.theTok);this.colorShape(b,a+1,!0)}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"center",($fz=function(a){1==this.slen?this.viewer.setNewRotationCenter(null):(a=this.centerParameter(a),null==a&&this.error(22),this.chk||this.viewer.setNewRotationCenter(a))},$fz.isPrivate=
!0,$fz),"~N");$_M(c$,"setObjectProperty",($fz=function(){var a="",b=this.getShapeNameParameter(2),c=[b,null];if(this.chk)return"";for(var d=this.iToken,e=this.tokAt(0),f=J.util.TextFormat.isWild(b),g=17;;){if(27!=g&&this.getShapePropertyData(g,"checkID",c)){this.setShapeProperty(g,"thisID",b);switch(e){case 12291:this.setShapeProperty(g,"delete",null);break;case 12294:case 1610625028:this.setShapeProperty(g,"hidden",1610625028==e?Boolean.FALSE:Boolean.TRUE);break;case 4148:a+=this.getShapeProperty(g,
"command")+"\n";break;case 1766856708:this.colorShape(g,d+1,!1)}if(!f)break}17==g&&(g=31);if(22>--g)break}return a},$fz.isPrivate=!0,$fz));$_M(c$,"color",($fz=function(){var a=1;if(this.isColorParam(1))this.theTok=1141899265;else{var b=0,a=2,c=this.getToken(1).tok;switch(c){case 1048583:this.setObjectProperty();return;case 1087373315:case 3145730:case 1087373316:case 1073741946:case 1632634889:case 1087373318:case 1114638346:case 1087373322:case 1073741992:case 1095761934:case 1073742030:case 1048587:case 1073742074:case 1112541196:case 1095761935:case 1716520973:case 1073742116:case 1113200651:case 1073742144:case 1112539148:case 1641025539:case 1112539149:case 1112541199:case 1073742180:case 1073742186:case 1649412112:this.theTok=
1141899265;a=1;break;case 4:a=1;b=this.stringParameter(a++);this.isArrayParameter(a)&&(b=b+="="+J.script.SV.sValue(J.script.SV.getVariableAS(this.stringParameterSet(a))).$replace("\n"," "),a=this.iToken+1);c=1073742180==this.tokAt(a);this.chk||this.viewer.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.viewer.setCurrentColorRange(b,a);return;case 1073742114:case 1073741826:b=this.floatParameter(2);
a=this.floatParameter(this.checkLast(3));this.chk||this.viewer.setCurrentColorRange(b,a);return;case 1610616835:b=this.getArgbParamLast(2,!0);this.chk||this.setObjectArgb("background",b);return;case 10:case 1048577:a=-1;this.theTok=1141899265;break;case 1073742134:b=this.getArgbParamLast(2,!1);this.chk||this.viewer.setRubberbandArgb(b);return;case 536870920:case 1611141171:a=2;1073742074==this.tokAt(2)&&a++;b=this.getArgbParamLast(a,!0);if(this.chk)return;this.sm.loadShape(8);this.setShapeProperty(8,
1611141171==c?"argbSelection":"argbHighlight",Integer.$valueOf(b));return;case 1611272194:case 1679429641:case 1614417948:case 1073741824:case 1613758476:c=this.parameterAsString(1);if(this.checkToken(2))switch(this.getToken(2).tok){case 1073742116:b=1073742116;break;case 1048587:case 1073741992:b=1073741992;break;default:b=this.getArgbParam(2)}0==b&&this.error(9);this.checkLast(this.iToken);if(c.equalsIgnoreCase("axes")||0<=J.viewer.StateManager.getObjectIdFromName(c)){this.setObjectArgb(c,b);return}if(this.changeElementColor(c,
b))return;this.error(22);break;case 135180:case 135402505:this.setShapeProperty(J.viewer.JC.shapeTokenIndex(c),"thisID","+PREVIOUS_MESH+")}}this.colorShape(this.getShapeType(this.theTok),a,!1)},$fz.isPrivate=!0,$fz));$_M(c$,"changeElementColor",($fz=function(a,b){for(var c=J.util.Elements.elementNumberMax;0<=--c;)if(a.equalsIgnoreCase(J.util.Elements.elementNameFromNumber(c)))return this.chk||this.viewer.setElementArgb(c,b),!0;for(c=J.util.Elements.altElementMax;0<=--c;)if(a.equalsIgnoreCase(J.util.Elements.altElementNameFromIndex(c)))return this.chk||
this.viewer.setElementArgb(J.util.Elements.altElementNumberFromIndex(c),b),!0;if("_"!=a.charAt(0))return!1;for(c=J.util.Elements.elementNumberMax;0<=--c;)if(a.equalsIgnoreCase("_"+J.util.Elements.elementSymbolFromNumber(c)))return this.chk||this.viewer.setElementArgb(c,b),!0;for(c=J.util.Elements.altElementMax;4<=--c;)if(a.equalsIgnoreCase("_"+J.util.Elements.altElementSymbolFromIndex(c))||a.equalsIgnoreCase("_"+J.util.Elements.altIsotopeSymbolFromIndex(c)))return this.chk||this.viewer.setElementArgb(J.util.Elements.altElementNumberFromIndex(c),
b),!0;return!1},$fz.isPrivate=!0,$fz),"~S,~N");$_M(c$,"colorShape",($fz=function(a,b,c){var d=null,e=null,f=null,g=null,h="",j=!1,k=24==a||25==a,m=0,l=!1,s=3.4028235E38;0>b&&(g=this.atomExpressionAt(-b),b=this.iToken+1,this.isBondSet&&(l=!0,a=1));c?this.getToken(b):!0==(c=1610616835==this.getToken(b).tok)&&this.getToken(++b);if(c)h="bg";else if(k)switch(this.theTok){case 1073742018:this.getToken(++b);h="mesh";break;case 1073742094:m=this.getArgbParamOrNone(++b,!1);f=0==m?null:Integer.$valueOf(m);
this.getToken(b=this.iToken+1);break;case 10:case 1048577:Clazz.instanceOf(this.theToken.value,J.modelset.Bond.BondSet)?(g=this.theToken.value,h="vertex"):(g=this.atomExpressionAt(b),h="atom"),s=1.4E-45,this.getToken(b=this.iToken+1)}if(this.chk||27!=a||this.mo(!0)){if((m=1073742180==this.theTok)||1073742074==this.theTok)1.4E-45==s&&this.error(22),d=this.parameterAsString(b++),m&&this.isFloatParameter(b)&&(s=this.getTranslucentLevel(b++));c=0;if(b<this.slen&&1048589!=this.tokAt(b)&&1048588!=this.tokAt(b))if(j=
!0,c=this.getToken(b).tok,(!k||1074790746!=this.tokAt(b+1))&&this.isColorParam(b)){if(m=this.getArgbParamOrNone(b,!1),e=0==m?null:Integer.$valueOf(m),null==d&&0!=this.tokAt(b=this.iToken+1))this.getToken(b),(m=1073742180==this.theTok)||1073742074==this.theTok?(d=this.parameterAsString(b),m&&this.isFloatParameter(b+1)&&(s=this.getTranslucentLevel(++b))):this.isColorParam(b)&&(m=this.getArgbParamOrNone(b,!1),f=0==m?null:Integer.$valueOf(m))}else if(26==a)this.iToken--;else{var p=this.parameterAsString(b).toLowerCase(),
r=0==p.indexOf("byelement"),v=r||0==p.indexOf("byresidue"),e=v||k?J.constant.EnumPalette.PROPERTY:1113200651==c?J.constant.EnumPalette.CPK:J.constant.EnumPalette.getPalette(p);(e===J.constant.EnumPalette.UNKNOWN||(e===J.constant.EnumPalette.TYPE||e===J.constant.EnumPalette.ENERGY)&&2!=a)&&this.error(22);var y=null,z=e!==J.constant.EnumPalette.PROPERTY&&e!==J.constant.EnumPalette.VARIABLE||!this.viewer.global.rangeSelected?null:this.viewer.getSelectionSet(!1);if(e===J.constant.EnumPalette.PROPERTY)if(v)this.chk||
(y=this.getBitsetPropertyFloat(z,(r?1095763976:1095761930)|256,NaN,NaN));else{if(!v&&!k&&b++,p.equals("property")&&J.script.T.tokAttr(c=this.getToken(b).tok,1078984704)&&!J.script.T.tokAttr(c,1087373312))this.chk||(y=this.getBitsetPropertyFloat(z,this.getToken(b++).tok|256,NaN,NaN))}else e===J.constant.EnumPalette.VARIABLE&&(b++,p=this.parameterAsString(b++),y=Clazz.newFloatArray(this.viewer.getAtomCount(),0),J.util.Parser.parseStringInfestedFloatArray(""+this.getParameter(p,4),null,y),e=J.constant.EnumPalette.PROPERTY);
if(e===J.constant.EnumPalette.PROPERTY){var n=null;4==this.tokAt(b)?(n=this.parameterAsString(b++).toLowerCase(),this.isArrayParameter(b)&&(n+="="+J.script.SV.sValue(J.script.SV.getVariableAS(this.stringParameterSet(b))).$replace("\n"," "),b=this.iToken+1)):k&&this.isColorParam(b)&&(n=this.getColorRange(b),b=this.iToken+1);null!=n&&!k&&(this.setStringProperty("propertyColorScheme",(m&&3.4028235E38==s?"translucent ":"")+n),v=0==n.indexOf("byelement")||0==n.indexOf("byresidue"));var r=0,w=3.4028235E38;
if(!v&&(1073741826==this.tokAt(b)||1073742114==this.tokAt(b)))r=this.floatParameter(b+1),w=this.floatParameter(b+2),b+=3,r==w&&k?(v=this.getShapeProperty(a,"dataRange"),null!=v&&(r=v[0],w=v[1])):r==w&&(w=3.4028235E38);if(!this.chk)if(k||(null==y?this.viewer.setCurrentColorRange(p):this.viewer.setCurrentColorRangeData(y,z)),k){this.checkLength(b);j=!1;p=this.viewer.getColorEncoder(n);if(null==p)return;p.isTranslucent=m&&3.4028235E38==s;p.setRange(r,w,r>w);3.4028235E38==w&&(p.hi=w);this.setShapeProperty(a,
"remapColor",p);this.showString(this.getIsosurfaceDataRange(a,""));if(3.4028235E38==s)return}else 3.4028235E38!=w&&this.viewer.setCurrentColorRange(r,w)}else b++;this.checkLength(b)}if(!(this.chk||0>a)){switch(a){case 4:m=32768;break;case 2:m=30720;break;case 3:m=256;break;case 1:m=1023;break;default:m=0}0==m?(this.sm.loadShape(a),5==a&&this.setShapeProperty(5,"setDefaults",this.viewer.getNoneSelected())):(null!=g&&(this.viewer.selectBonds(g),g=null),a=1,this.setShapeProperty(a,"type",Integer.$valueOf(m)));
if(j){switch(c){case 1112539149:case 1112539148:this.viewer.autoCalculate(c);break;case 1112541199:this.viewer.global.rangeSelected&&this.viewer.clearBfactorRange();break;case 1087373318:this.viewer.calcSelectedGroupsCount();break;case 1095761935:case 1073742030:this.viewer.calcSelectedMonomersCount();break;case 1095761934:this.viewer.calcSelectedMoleculesCount()}null!=f&&(k||11==a||14==a)?this.setShapeProperty(a,"colorPhase",[f,e]):null==g?this.setShapeProperty(a,h+"color",e):this.setShapePropertyBs(a,
h+"color",e,g)}null!=d&&this.setShapeTranslucency(a,h,d,s,g);0!=m&&this.setShapeProperty(1,"type",Integer.$valueOf(1023));l&&this.viewer.selectBonds(null);0==a&&this.viewer.checkInheritedShapes()}}},$fz.isPrivate=!0,$fz),"~N,~N,~B");$_M(c$,"setShapeTranslucency",($fz=function(a,b,c,d,e){3.4028235E38==d&&(d=this.viewer.getFloat(570425354));this.setShapeProperty(a,"translucentLevel",Float.$valueOf(d));null!=b&&(null==e?this.setShapeProperty(a,b+"translucency",c):this.chk||this.setShapePropertyBs(a,
b+"translucency",c,e))},$fz.isPrivate=!0,$fz),"~N,~S,~S,~N,J.util.BS");$_M(c$,"cd",($fz=function(){if(!this.chk){var a=1==this.slen?null:this.parameterAsString(1);this.showString(this.viewer.cd(a))}},$fz.isPrivate=!0,$fz));$_M(c$,"mapProperty",($fz=function(){for(var a,b,c,d,e,f=0,g=0,h=0;;){if(1114638350==this.tokAt(1))a=this.viewer.getSelectionSet(!1),b=this.atomExpressionAt(2),c=d="selected";else{a=this.atomExpressionAt(1);if(1048584!=this.tokAt(++this.iToken)||!J.script.T.tokAttr(f=this.tokAt(++this.iToken),
1078984704))break;c=this.parameterAsString(this.iToken);b=this.atomExpressionAt(++this.iToken);if(1048584!=this.tokAt(++this.iToken)||!J.script.T.tokAttr(g=this.tokAt(++this.iToken),2048))break;d=this.parameterAsString(this.iToken)}e=J.script.T.tokAttr(h=this.tokAt(this.iToken+1),1078984704)?this.parameterAsString(++this.iToken):J.script.T.nameOf(h=1095763969);this.checkLast(this.iToken);if(this.chk)return;var j=null;this.showString("mapping "+c.toUpperCase()+" for "+a.cardinality()+" atoms to "+
d.toUpperCase()+" for "+b.cardinality()+" atoms using "+e.toUpperCase());if(J.script.T.tokAttrOr(f,1095761920,1112539136)&&J.script.T.tokAttrOr(g,1095761920,1112539136)&&J.script.T.tokAttrOr(h,1095761920,1112539136)){var k=this.getBitsetPropertyFloat(a,f|224,NaN,NaN),m=this.getBitsetPropertyFloat(a,h|224,NaN,NaN),f=this.getBitsetPropertyFloat(b,h|224,NaN,NaN),l=1716520973==g,s=Clazz.newFloatArray(l?this.viewer.getAtomCount():f.length,0),j=new J.util.BS;if(k.length==m.length){for(var p=new java.util.Hashtable,
h=0;h<k.length;h++)p.put(Float.$valueOf(m[h]),Float.$valueOf(k[h]));k=-1;for(h=m=0;h<f.length;h++){var k=b.nextSetBit(k+1),r=p.get(Float.$valueOf(f[h]));null!=r&&(j.set(k),s[l?k:m]=r.floatValue(),m++)}l?this.viewer.setData(d,[d,s,j,Integer.$valueOf(0)],this.viewer.getAtomCount(),0,0,2147483647,0):this.viewer.setAtomProperty(j,g,0,0,null,s,null)}}if(null==j){c=this.getBitsetIdent(a,"{"+e+"=%["+e+"]}."+d+" = %["+c+"]",null,!1,2147483647,!1);a=new J.util.SB;for(h=0;h<c.length;h++)0>c[h].indexOf("null")&&
a.append(c[h]).appendC("\n");J.util.Logger.debugging&&J.util.Logger.info(a.toString());c=J.util.BSUtil.copy(this.viewer.getSelectionSubset());this.viewer.setSelectionSubset(b);try{this.runScript(a.toString())}catch(v){if(Clazz.exceptionOf(v,Exception))b=v,this.viewer.setSelectionSubset(c),this.errorStr(-1,"Error: "+b.toString());else if(Clazz.exceptionOf(v,Error))b=v,this.viewer.setSelectionSubset(c),this.errorStr(-1,"Error: "+b.toString());else throw v;}this.viewer.setSelectionSubset(c)}this.showString("DONE");
return}this.error(22)},$fz.isPrivate=!0,$fz));$_M(c$,"data",($fz=function(){var a=null,b=null,c=!1,d;switch(this.iToken=this.slen){case 5:a=this.parameterAsString(2);case 4:case 2:b=this.parameterAsString(1);if(b.equalsIgnoreCase("clear")){this.chk||this.viewer.setData(null,null,0,0,0,0,0);return}if(0<=(d=b.indexOf("@")))a=""+this.getParameter(b.substring(d+1),4),b=b.substring(0,d).trim();else if(null==a&&0<=(d=b.indexOf(" ")))a=b.substring(d+1).trim(),b=b.substring(0,d).trim(),c=!0;break;default:this.error(2)}d=
b+" ";d=d.substring(0,d.indexOf(" ")).toLowerCase();if(d.equals("model")||d.equals("append"))this.load();else if(!this.chk){var e=0<=b.toLowerCase().indexOf("(default)");this.$data=Array(4);if(d.equals("element_vdw")){this.$data[0]=d;this.$data[1]=a.$replace(";","\n");a=J.util.Elements.elementNumberMax;d=Clazz.newIntArray(a+1,0);for(e=1;e<=a;e++)d[e]=e;this.$data[2]=d;this.$data[3]=Integer.$valueOf(0);this.viewer.setData("element_vdw",this.$data,a,0,0,0,0)}else if(d.equals("connect_atoms"))this.viewer.connect(J.util.Parser.parseFloatArray2d(a));
else if(0==d.indexOf("ligand_"))this.viewer.setLigandModel(b.substring(7),a.trim());else if(0==d.indexOf("data2d_"))this.$data[0]=b,this.$data[1]=J.util.Parser.parseFloatArray2d(a),this.$data[3]=Integer.$valueOf(2),this.viewer.setData(b,this.$data,0,0,0,0,0);else if(0==d.indexOf("data3d_"))this.$data[0]=b,this.$data[1]=J.util.Parser.parseFloatArray3d(a),this.$data[3]=Integer.$valueOf(3),this.viewer.setData(b,this.$data,0,0,0,0,0);else{var f=J.util.Parser.getTokens(b);if(0==d.indexOf("property_")&&
!(2==f.length&&f[1].equals("set"))){e=this.viewer.getSelectionSet(!1);this.$data[0]=d;var g=c?0:this.viewer.getParameter("propertyAtomNumberField").intValue(),h=c?0:this.viewer.getParameter("propertyAtomNumberColumnCount").intValue(),j=c?-2147483648:this.viewer.getParameter("propertyDataField").intValue(),k=c?0:this.viewer.getParameter("propertyDataColumnCount").intValue();!c&&0<=b.indexOf(" ")&&(3==f.length&&(g=J.util.Parser.parseInt(f[1]),j=J.util.Parser.parseInt(f[2])),5==f.length&&(g=J.util.Parser.parseInt(f[1]),
h=J.util.Parser.parseInt(f[2]),j=J.util.Parser.parseInt(f[3]),k=J.util.Parser.parseInt(f[4])));0>g&&(g=0);0>j&&(j=0);b=this.viewer.getAtomCount();c=null;f=J.util.BSUtil.newBitSet(b);if(0<g){for(var c=Clazz.newIntArray(b+2,0),m=0;m<=b;m++)c[m]=-1;for(m=e.nextSetBit(0);0<=m;m=e.nextSetBit(m+1)){var l=this.viewer.getAtomNumber(m);l>b+1||(0>l||f.get(l))||(f.set(l),c[l]=m)}this.$data[2]=c}else this.$data[2]=J.util.BSUtil.copy(e);this.$data[1]=a;this.$data[3]=Integer.$valueOf(0);this.viewer.setData(d,this.$data,
b,g,h,j,k)}else g=J.modelset.AtomCollection.getUserSettableType(d),0<=g?this.viewer.setAtomData(g,d,a,e):(this.$data[0]=b,this.$data[1]=a,this.$data[3]=Integer.$valueOf(0),this.viewer.setData(d,this.$data,0,0,0,0,0))}}},$fz.isPrivate=!0,$fz));$_M(c$,"define",($fz=function(){(3>this.slen||!Clazz.instanceOf(this.getToken(1).value,String))&&this.error(22);var a=this.getToken(1).value.toLowerCase();-2147483648!=J.util.Parser.parseInt(a)&&this.error(22);if(!this.chk){var b=a.startsWith("site_");if(0==
a.indexOf("dynamic_")||b){for(var c=Array(this.slen),d=this.slen;0<=--d;)c[d]=this.st[d];this.definedAtomSets.put("!"+(b?a:a.substring(8)),c)}else b=this.atomExpressionAt(2),this.definedAtomSets.put(a,b),this.chk||this.viewer.setUserVariable("@"+a,J.script.SV.newVariable(10,b))}},$fz.isPrivate=!0,$fz));$_M(c$,"echo",($fz=function(a,b,c){if(!this.chk){a=this.optParameterAsString(a);if(this.viewer.getEchoStateActive()){if(c){this.viewer.loadImage(a,b);return}a.startsWith("\u0001")&&(a=a.substring(1),
c=!0);null!=a&&this.setShapeProperty(30,"text",a)}!c&&this.viewer.getRefreshing()&&this.showString(this.viewer.formatText(a))}},$fz.isPrivate=!0,$fz),"~N,~S,~B");$_M(c$,"message",($fz=function(){var a=this.parameterAsString(this.checkLast(1));this.chk||(a=this.viewer.formatText(a),null==this.outputBuffer&&this.viewer.showMessage(a),a.startsWith("_")||this.scriptStatusOrBuffer(a))},$fz.isPrivate=!0,$fz));$_M(c$,"log",($fz=function(){1==this.slen&&this.error(2);if(!this.chk){var a=this.parameterExpressionString(1,
0);1048588==this.tokAt(1)?this.setStringProperty("logFile",""):this.viewer.log(a)}},$fz.isPrivate=!0,$fz));$_M(c$,"label",($fz=function(a){if(!this.chk){this.sm.loadShape(5);var b=null;switch(this.getToken(a).tok){case 1048589:b=this.viewer.getStandardLabelFormat(0);break;case 1048588:break;case 12294:case 1610625028:this.setShapeProperty(5,"display",1610625028==this.theTok?Boolean.TRUE:Boolean.FALSE);return;default:b=this.parameterAsString(a)}this.sm.setLabel(b,this.viewer.getSelectionSet(!1))}},
$fz.isPrivate=!0,$fz),"~N");$_M(c$,"hover",($fz=function(){if(!this.chk){var a=this.parameterAsString(1);a.equalsIgnoreCase("on")?a="%U":a.equalsIgnoreCase("off")&&(a=null);this.viewer.setHoverLabel(a)}},$fz.isPrivate=!0,$fz));$_M(c$,"load",($fz=function(){var a=!this.chk||this.isCmdLine_C_Option,b=!1,c=!1,d=!1,e=!1,f,g=135270407==this.tokAt(0)?0:1,h=this.viewer.getBoolean(603979792),j=null,k=null,m=this.viewer.getModelCount()-(this.viewer.getFileName().equals("zapped")?1:0),l=this.viewer.getAtomCount(),
s=(new J.util.SB).append("load"),p=1,r=new java.util.Hashtable;this.isStateScript&&(r.put("isStateScript",Boolean.TRUE),this.forceNoAddHydrogens&&r.put("doNotAddHydrogens",Boolean.TRUE));var v=null,y=null,z=null,n=null,n="",w=0,u;if(1==this.slen)g=0;else{v=this.parameterAsString(g);if(2==this.slen&&!this.chk&&(v.endsWith(".spt")||v.endsWith(".png")||v.endsWith(".pngj"))){this.script(0,v);return}switch(u=this.tokAt(g)){case 1073742015:b=this.parameterAsString(this.checkLast(2));this.chk||this.viewer.setMenu(b,
!0);return;case 135270407:e=!0;s.append(" /*data*/ data");f=this.stringParameter(++g).toLowerCase();s.append(" ").append(J.util.Escape.eS(f));var b=f.startsWith("append"),t=0<=f.indexOf("@")?""+this.getParameter(f.substring(f.indexOf("@")+1),4):this.parameterAsString(++g),t=J.viewer.Viewer.fixInlineString(t,this.viewer.getInlineChar());r.put("fileData",t);r.put("isData",Boolean.TRUE);s.appendC("\n");s.append(t);0>f.indexOf("@")&&(s.append(" end ").append(J.util.Escape.eS(f)),g+=2);break;case 1073741839:b=
!0;s.append(" append");v=this.optParameterAsString(++g);u=J.script.T.getTokFromName(v);break;case 1073741824:g++,s.append(" "+v),w=1073741824==u&&J.util.Parser.isOneOf(v.toLowerCase(),"xyz;vxyz;vibration;temperature;occupancy;partialcharge")?J.script.T.getTokFromName(v):0,0!=w&&(r.put("atomDataOnly",Boolean.TRUE),r.put("modelNumber",Integer.$valueOf(1)),4166==w&&(w=1146095631),z=this.viewer.getFileInfo(),b=!0)}switch(u){case 1229984263:case 1073741983:c=1073741983==u;g++;s.append(" "+v);break;case 135267336:d=
!0;g++;break;case 4156:r.put("async",Boolean.TRUE);g++;break;case 536870926:case 1095766028:g++;s.append(" "+v);536870926==u&&r.put("isTrajectory",Boolean.TRUE);this.isPoint3f(g)?(u=this.getPoint3f(g,!1),g=this.iToken+1,r.put("firstLastStep",[Clazz.floatToInt(u.x),Clazz.floatToInt(u.y),Clazz.floatToInt(u.z)]),s.append(" "+J.util.Escape.eP(u))):10==this.tokAt(g)?(f=this.getToken(g++).value,r.put("bsModels",f),s.append(" "+J.util.Escape.eBS(f))):r.put("firstLastStep",[0,-1,1]);break;case 1073741824:break;
default:v="fileset"}4!=this.getToken(g).tok&&this.error(16)}u=g;f=null;1073741848==this.tokAt(u+1)&&(f=this.stringParameter(g+=2),""!==this.viewer.getPathForAllFiles()&&(f=null,u=g));var A=t=null,G=null;if(this.slen==g+1){if(0==g||0==(t=this.parameterAsString(u)).length)t=this.viewer.getFullPathName();if(null==t){this.zap(!1);return}if(d)t="$"+t;else if(!c){if(0<=t.indexOf("[]"))return;if(0==t.indexOf("[")&&(y=J.util.Escape.unescapeStringArray(t),null!=y)){1==g&&s.append(" files");0>s.indexOf(" files")&&
this.error(22);for(d=0;d<y.length;d++)s.append(" /*file*/").append(J.util.Escape.eS(y[d]))}}}else if(1073742010==this.getToken(g+1).tok||2==this.theTok||7==this.theTok||269484096==this.theTok||1073742195==this.theTok||1048586==this.theTok||8==this.theTok||1073742080==this.theTok||1073741877==this.theTok||1073742163==this.theTok||1073742114==this.theTok||1073742152==this.theTok||1614417948==this.theTok||1073742066==this.theTok||1073741940==this.theTok&&1048582!=this.tokAt(g+3)||1073741839==this.theTok||
1073741824==this.theTok&&1048582!=this.tokAt(g+3)){if(0==(t=this.parameterAsString(u)).length&&null==(t=this.viewer.getFullPathName())){this.zap(!1);return}u==g&&g++;if(0<=t.indexOf("[]"))return;if(1073742010==(u=this.tokAt(g)))k=this.stringParameter(++g),r.put("manifest",k),n+=" MANIFEST "+J.util.Escape.eS(k),u=this.tokAt(++g);switch(u){case 2:k=this.intParameter(g);n+=" "+k;0>k?r.put("vibrationNumber",Integer.$valueOf(-k)):r.put("modelNumber",Integer.$valueOf(k));u=this.tokAt(++g);break;case 7:case 269484096:case 1073742195:for(var k=
this.floatParameterSet(g,1,2147483647),g=this.iToken,H=new J.util.BS,d=0;d<k.length;d++)1<=k[d]&&k[d]==Clazz.floatToInt(k[d])&&H.set(Clazz.floatToInt(k[d])-1);r.put("bsModels",H);k=Clazz.newIntArray(H.cardinality(),0);u=0;for(d=H.nextSetBit(0);0<=d;d=H.nextSetBit(d+1))k[u++]=d+1;n+=" "+J.util.Escape.eAI(k);u=this.tokAt(g)}d=null;if(1048586==u||8==u)d=this.getPoint3f(g,!1),g=this.iToken+1,u=this.tokAt(g);switch(u){case 1073742080:case 1073741877:case 1073742163:case 1073742114:case 1073742152:case 1614417948:null==
d&&(d=J.util.P3.new3(555,555,-1)),this.iToken=g-1}k=null;if(null!=d){r.put("lattice",d);g=this.iToken+1;n+=" {"+Clazz.floatToInt(d.x)+" "+Clazz.floatToInt(d.y)+" "+Clazz.floatToInt(d.z)+"}";1073742080==this.tokAt(g)&&(r.put("packed",Boolean.TRUE),n+=" PACKED",g++);1073741877==this.tokAt(g)&&(r.put("centroid",Boolean.TRUE),n+=" CENTROID",g++,1073742080==this.tokAt(g)&&!r.containsKey("packed")&&(r.put("packed",Boolean.TRUE),n+=" PACKED",g++));if(1073742163==this.tokAt(g)){if(this.isPoint3f(++g)){u=
this.getPoint3f(g,!1);if(u.x!=Clazz.floatToInt(u.x)||u.y!=Clazz.floatToInt(u.y)||u.z!=Clazz.floatToInt(u.z)||1>u.x||1>u.y||1>u.z)this.iToken=g,this.error(22);g=this.iToken+1}else u=this.stringParameter(g++);r.put("supercell",u)}u=0;1073742114==this.tokAt(g)&&(g++,u=this.floatParameter(g++),n+=" range "+u);r.put("symmetryRange",Float.$valueOf(u));u=null;u=-2147483648;1073742152==this.tokAt(g)&&(++g,u=J.util.TextFormat.simpleReplace(this.parameterAsString(g++),"''",'"'),n+=" spacegroup "+J.util.Escape.eS(u),
u.equalsIgnoreCase("ignoreOperators")?u=-999:(0==u.length?(d=this.viewer.getCurrentUnitCell(),null!=d&&(u=d.getSpaceGroupName())):0<=u.indexOf(",")&&9>d.x&&(9>d.y&&0==d.z)&&(u+="#doNormalize=0"),r.put("spaceGroupName",u),u=-2));H=null;if(1614417948==this.tokAt(g)){++g;0==this.optParameterAsString(g).length?(d=this.viewer.getCurrentUnitCell(),null!=d&&(H=d.getUnitCellAsArray(!0),k=d.getCartesianOffset())):H=this.floatParameterSet(g,6,9);(null==H||6!=H.length&&9!=H.length)&&this.error(22);n+=" unitcell {";
for(d=0;d<H.length;d++)n+=(0==d?"":" ")+H[d];n+="}";r.put("unitcell",H);-2147483648==u&&(u=-1)}g=this.iToken+1;-2147483648!=u&&r.put("spaceGroupIndex",Integer.$valueOf(u))}null!=k?this.coordinatesAreFractional=!1:1073742066==this.tokAt(g)&&(k=this.getPoint3f(++g,!0));null!=k&&(this.coordinatesAreFractional?(k.setT(this.fractionalPoint),r.put("unitCellOffsetFractional",this.coordinatesAreFractional?Boolean.TRUE:Boolean.FALSE),n+=" offset {"+k.x+" "+k.y+" "+k.z+"/1}"):n+=" offset "+J.util.Escape.eP(k),
r.put("unitCellOffset",k),g=this.iToken+1);1073741839==this.tokAt(g)&&(135270407==this.tokAt(++g)?(g+=2,A=this.getToken(g++).value,G=this.stringParameter(++g),++g):(G=this.stringParameter(g++),A=this.stringParameter(g++)),r.put(G,A));1073741940==this.tokAt(g)&&(j=this.stringParameter(++g))}else{1==g&&(g++,s.append(" "+v));H=u=null;for(t=new J.util.JmolList;g<this.slen;){switch(this.tokAt(g)){case 1073741940:j=this.stringParameter(++g);++g;continue;case 1048582:r.remove("isTrajectory");null==k&&(k=
new J.util.JmolList,u=J.util.P3.new3(0,-1,1));this.isPoint3f(++g)?(u=this.getPoint3f(g,!1),g=this.iToken+1):10==this.tokAt(g)&&(H=this.getToken(g).value,u=null,g=this.iToken+1);break;case 1073741824:this.error(22)}t.addLast(this.parameterAsString(g++));null!=u?(k.addLast([Clazz.floatToInt(u.x),Clazz.floatToInt(u.y),Clazz.floatToInt(u.z)]),s.append(" COORD "+J.util.Escape.eP(u))):null!=H&&(k.addLast(H),s.append(" COORD "+J.util.Escape.eBS(H)));s.append(" /*file*/$FILENAME"+t.size()+"$")}null!=k&&r.put("firstLastSteps",
k);p=t.size();y=Array(p);for(d=0;d<p;d++)y[d]=t.get(d);t="fileSet"}if(a){null!=A&&(n+=' APPEND data "'+G+'"\n'+A+(A.endsWith("\n")?"":"\n")+'end "'+G+'"');null==j&&(j=this.viewer.getDefaultLoadFilter());0<j.length&&(r.put("filter",j),j.equalsIgnoreCase("2d")&&(j="2D-noMin"),n+=" FILTER "+J.util.Escape.eS(j));a=!1;null==y&&(c?r.put("fileData",t):t.startsWith("@")&&1<t.length&&(a=!0,g=this.getStringParameter(t.substring(1),!1),r.put("fileData",g),s=(new J.util.SB).append("{\n    var ").append(t.substring(1)).append(" = ").append(J.util.Escape.eS(g)).append(";\n    ").appendSB(s)));
g=null;null!=f&&(f.equals(".")&&(f=this.viewer.getFilePath(t,!0)),(0==f.length||this.viewer.getFilePath(f,!1).equalsIgnoreCase(this.viewer.getFilePath(t,!1)))&&this.error(22),j=[f],g=this.viewer.getOutputStream(f,j),null==g?J.util.Logger.error("Could not create output stream for "+j[0]):r.put("OutputStream",g));null==y&&0==w&&(s.append(" "),a||c?s.append(J.util.Escape.eS(t)):e||(!t.equals("string")&&!t.equals("string[]")&&s.append("/*file*/"),null!=f&&(f=this.viewer.getFilePath(f,!1)),s.append(null!=
f?J.util.Escape.eS(f):"$FILENAME$")),0<n.length&&s.append(" /*options*/ ").append(n),a&&s.append("\n  }"),r.put("loadScript",s));this.setCursorWait(!0);n=this.viewer.loadModelFromFile(null,t,y,null,b,r,s,w);if(null!=g)try{this.viewer.setFileInfo([f,f,f]),J.util.Logger.info(J.i18n.GT._("file {0} created",f)),this.showString(this.viewer.getFilePath(f,!1)+" created"),g.close()}catch(K){if(Clazz.exceptionOf(K,java.io.IOException))J.util.Logger.error("error closing file "+K.toString());else throw K;}if(0<
w)this.viewer.setFileInfo(z),null!=n&&!this.isCmdLine_c_or_C_Option&&this.evalError(n,null);else{if(null!=n&&!this.isCmdLine_c_or_C_Option){if(0==n.indexOf("NOTE: file recognized as a script file: ")){t=n.substring(40).trim();this.script(0,t);return}this.evalError(n,null)}if(b&&(h||1<p))this.viewer.setAnimationRange(-1,-1),this.viewer.setCurrentModelIndex(m);0==this.scriptLevel&&(!b&&2>p)&&this.showString(this.viewer.getModelSetAuxiliaryInfoValue("modelLoadNote"));this.logMessages&&this.scriptStatusOrBuffer("Successfully loaded:"+
(null==y?r.get("fullPathName"):v));c=this.viewer.getModelSetAuxiliaryInfo();null!=c&&(c.containsKey("centroidMinMax")&&0<this.viewer.getAtomCount())&&this.viewer.setCentroid(b?l:0,this.viewer.getAtomCount()-1,c.get("centroidMinMax"));b=this.viewer.getDefaultLoadScript();l="";0<b.length&&(l+="\nUsing defaultLoadScript: "+b);null!=c&&this.viewer.allowEmbeddedScripts()&&(e=c.remove("jmolscript"),null!=e&&0<e.length&&(l+="\nAdding embedded #jmolscript: "+e,b+=";"+e,this.setStringProperty("_loadScript",
b),b="allowEmbeddedScripts = false;try{"+b+"} allowEmbeddedScripts = true;"));this.logLoadInfo(l);l=null==c?null:c.remove("sitescript");null!=l&&(b=l+";"+b);0<b.length&&!this.isCmdLine_c_or_C_Option&&this.runScript(b)}}},$fz.isPrivate=!0,$fz));$_M(c$,"logLoadInfo",($fz=function(a){0<a.length&&J.util.Logger.info(a);a=new J.util.SB;var b=this.viewer.getModelCount();1<b&&a.append((this.viewer.isMovie()?this.viewer.getFrameCount()+" frames":b+" models")+"\n");for(var c=0;c<b;c++){var d=this.viewer.getModelAuxiliaryInfoValue(c,
"moData");null!=d&&a.appendI(d.get("mos").size()).append(" molecular orbitals in model ").append(this.viewer.getModelNumberDotted(c)).append("\n")}0<a.length()&&this.showString(a.toString())},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getFullPathName",($fz=function(){var a=!this.chk||this.isCmdLine_C_Option?this.viewer.getFullPathName():"test.xyz";null==a&&this.error(22);return a},$fz.isPrivate=!0,$fz));$_M(c$,"measure",($fz=function(){if(135267335==this.tokAt(1)){var a=this.stringParameter(3==this.slen?
2:4);if(!this.chk){var b=this.viewer.modelSet.atoms,c=this.viewer.getAtomCount(),a=this.viewer.getSmilesMatcher().getCorrelationMaps(a,b,c,this.viewer.getSelectionSet(!1),!0,!1);null!=a&&this.setShapeProperty(6,"maps",a)}}else{switch(this.slen){case 1:case 2:switch(this.getToken(1).tok){case 0:case 1048589:this.setShapeProperty(6,"hideAll",Boolean.FALSE);return;case 1048588:this.setShapeProperty(6,"hideAll",Boolean.TRUE);return;case 1073742001:this.chk||this.showStringPrint(this.viewer.getMeasurementInfoAsString(),
!1);return;case 12291:this.chk||this.viewer.clearAllMeasurements();return;case 4:this.setShapeProperty(6,"setFormats",this.stringParameter(1));return}this.errorStr(24,"ON, OFF, DELETE");break;case 3:switch(this.getToken(1).tok){case 12291:if(1048579==this.getToken(2).tok)this.chk||this.viewer.clearAllMeasurements();else{var d=this.intParameter(2)-1;this.chk||this.viewer.deleteMeasurement(d)}return}}for(var e=0,a=0,f=c=b=-1,g=Clazz.newIntArray(5,0),h=[3.4028235E38,3.4028235E38],j=!1,k=!1,m=!1,l=!0,
s=null,p=null,r=269484114,v=null,y=new J.util.JmolList,z=new J.util.BS,n=null,w=null,u=0,d=1;d<this.slen;++d)switch(this.getToken(d).tok){case 1073741824:this.errorStr(24,"ALL, ALLCONNECTED, DELETE");break;default:this.error(15);break;case 269484144:135266310!=this.tokAt(d+1)&&this.error(22);d++;m=!0;break;case 135266310:case 1073741834:case 1048579:k=1073741834==this.theTok;c=-1;j=!0;k&&m&&this.error(22);break;case 3:null!=s&&this.error(22);l=j=!0;f=(f+1)%2;h[f]=this.floatParameter(d);break;case 12291:269484114!=
r&&this.error(22);r=12291;break;case 2:var t=this.intParameter(d);if(j)l=!0,f=(f+1)%2,h[f]=t;else{c=this.viewer.getAtomIndexFromAtomNumber(t);if(!this.chk&&0>c)return;null!=n&&this.error(22);4<(g[0]=++e)&&this.error(2);g[e]=c}break;case 1095761933:b=this.intParameter(++d);break;case 1048588:269484114!=r&&this.error(22);r=1048588;break;case 1048589:269484114!=r&&this.error(22);r=1048589;break;case 1073742114:l=j=!0;c=-1;break;case 1073741989:case 1073741990:p=Boolean.$valueOf(1073741989==this.theTok);
j=!0;m=1073741990==this.theTok;break;case 1649412112:0<=f&&this.error(22);s=this.encodeRadiusParameter(d,!1,!0);s.values=h;d=this.iToken;j=m=!0;p=Boolean.$valueOf(!1);1==u&&(u++,e++,t=J.util.BSUtil.copy(z),J.util.BSUtil.invertInPlace(t,this.viewer.getAtomCount()),t.and(this.viewer.getAtomsWithinRadius(5,z,!1,null)),y.addLast(t));break;case 10:case 1048577:case 1048586:case 8:case 1048583:(10==this.theTok||1048577==this.theTok)&&u++;0<=c&&this.error(22);this.expressionResult=Boolean.FALSE;n=this.centerParameter(d);
if(Clazz.instanceOf(this.expressionResult,J.util.BS)&&(n=z=this.expressionResult,!this.chk&&0==z.length()))return;Clazz.instanceOf(n,J.util.P3)&&(d=new J.util.Point3fi,d.setT(n),d.modelIndex=b,n=d);4<(e=++a)&&this.error(2);d=this.iToken;y.addLast(n);break;case 4:v=this.stringParameter(d);break;case 1073742164:w=this.checkTicks(d,!1,!0,!0),d=this.iToken,r=1060866}(null!=s&&(0<=f||2!=e)||2>e&&(null==w||1==e))&&this.error(2);null!=v&&0!=v.indexOf(e+":")&&(v=e+":"+v);l&&h[1]<h[0]&&(h[1]=h[0],h[0]=3.4028235E38==
h[1]?3.4028235E38:-200);if(!this.chk)if(null!=n||null!=w)null==s&&(s=new J.atomdata.RadiusData(h,0,null,null)),null==n&&(w.id="default"),null!=n&&(null!=v&&269484114==r)&&(r=1060866),this.setShapeProperty(6,"measure",(new J.modelset.MeasurementData(this.viewer,y)).set(r,s,v,null,w,k,m,p,j));else switch(r){case 12291:this.setShapeProperty(6,"delete",g);break;case 1048589:this.setShapeProperty(6,"show",g);break;case 1048588:this.setShapeProperty(6,"hide",g);break;default:this.setShapeProperty(6,null==
v?"toggle":"toggleOn",g),null!=v&&this.setShapeProperty(6,"setFormats",v)}}},$fz.isPrivate=!0,$fz));$_M(c$,"plot",($fz=function(a){var b=this.viewer.getCurrentModelIndex();0>b&&this.errorStr(30,"plot");var b=this.viewer.getJmolDataSourceFrame(b),c=a.length-1,d=a!==this.st,e=this.st;d&&(this.st=a);var f=d?4148:a[0].tok,g=d||135270417==f||1052714==f?0:1,h=null,j=!0,k=!1;switch(f){case 135176:j=!1;k=!0;break;case 4148:j=!1;break;case 135270421:j=!1,4==J.script.ScriptEvaluator.tokAtArray(c,a)?h=this.stringParameter(c--):
1048584==J.script.ScriptEvaluator.tokAtArray(c-1,a)?(h=this.parameterAsString(c-2)+"."+this.parameterAsString(c),c-=3):(this.st=e,this.iToken=this.st.length,this.error(13))}var d="",m=null,l="",s=!1,p=!1,r=!1,v=!1,y=0,z=0,n=0,w=J.util.BSUtil.copy(this.viewer.getSelectionSet(!1)),u="; select "+J.util.Escape.eBS(w)+";\n ",v=this.optParameterAsString(c).toLowerCase(),t=null,A=null,G=J.script.ScriptEvaluator.tokAtArray(g,a);4==G&&(G=J.script.T.getTokFromName(a[g].value));switch(G){default:this.iToken=
1;this.error(22);break;case 135270407:this.iToken=1;v="data";u="";break;case 1716520973:this.iToken=g+1;(!J.script.T.tokAttr(y=this.tokAt(this.iToken++),1078984704)||!J.script.T.tokAttr(z=this.tokAt(this.iToken++),1078984704))&&this.error(22);J.script.T.tokAttr(n=this.tokAt(this.iToken),1078984704)?this.iToken++:n=0;32==this.tokAt(this.iToken)&&(t=this.getPoint3f(++this.iToken,!1),this.iToken++);64==this.tokAt(this.iToken)&&(A=this.getPoint3f(++this.iToken,!1),this.iToken++);v="property "+J.script.T.nameOf(y)+
" "+J.script.T.nameOf(z)+(0==n?"":" "+J.script.T.nameOf(n));0>w.nextSetBit(0)&&(w=this.viewer.getModelUndeletedAtomsBitSet(b));l="select "+J.util.Escape.eBS(w)+";\n ";break;case 1052714:v.equalsIgnoreCase("draw")&&(v=this.optParameterAsString(--c).toLowerCase());v=c>g&&v.startsWith("r");v="ramachandran"+(v?" r":"")+(135176==f?" draw":"");break;case 135270417:case 137363468:d=' "'+this.viewer.getQuaternionFrame()+'"';l="set quaternionFrame"+d+";\n  ";s=!0;v.equalsIgnoreCase("draw")&&(k=!0,v=this.optParameterAsString(--c).toLowerCase());
r=(p=v.startsWith("deriv")||v.startsWith("diff"))&&0<v.indexOf("2");p&&c--;if(v.equalsIgnoreCase("helix")||v.equalsIgnoreCase("axis"))p=k=!0,c=-1;v=((c<=g?"":this.optParameterAsString(c))+"w").substring(0,1);if(v.equals("a")||v.equals("r"))p=!0;J.util.Parser.isOneOf(v,"w;x;y;z;r;a")||this.evalError("QUATERNION [w,x,y,z,a,r] [difference][2]",null);v="quaternion "+v+(p?" difference":"")+(r?"2":"")+(k?" draw":"")}this.st=e;if(this.chk)return"";if(j&&(l+="plot "+v,a=this.viewer.getJmolDataFrameIndex(b,
l),0<a&&135270421!=f&&4148!=f))return this.viewer.setCurrentModelIndexClear(a,!0),"";e=c=a=null;g=J.util.P3.new3(1,1,1);if(1716520973==G){a=this.getBitsetPropertyFloat(w,y|224,null==t?NaN:t.x,null==A?NaN:A.x);c=this.getBitsetPropertyFloat(w,z|224,null==t?NaN:t.y,null==A?NaN:A.y);0!=n&&(e=this.getBitsetPropertyFloat(w,n|224,null==t?NaN:t.z,null==A?NaN:A.z));null==t&&(t=J.util.P3.new3(J.script.ScriptEvaluator.getMinMax(a,!1,y),J.script.ScriptEvaluator.getMinMax(c,!1,z),J.script.ScriptEvaluator.getMinMax(e,
!1,n)));null==A&&(A=J.util.P3.new3(J.script.ScriptEvaluator.getMinMax(a,!0,y),J.script.ScriptEvaluator.getMinMax(c,!0,z),J.script.ScriptEvaluator.getMinMax(e,!0,n)));J.util.Logger.info("plot min/max: "+t+" "+A);m=J.util.P3.newP(A);m.add(t);m.scale(0.5);g.setT(A);g.sub(t);g.set(g.x/200,g.y/200,g.z/200);J.script.T.tokAttr(y,1095761920)?(g.x=1,m.x=0):0.1<g.x&&10>=g.x&&(g.x=1);J.script.T.tokAttr(z,1095761920)?(g.y=1,m.y=0):0.1<g.y&&10>=g.y&&(g.y=1);J.script.T.tokAttr(n,1095761920)?(g.z=1,m.z=0):0.1<g.z&&
10>=g.z&&(g.z=1);0==n&&(m.z=t.z=A.z=g.z=0);for(j=0;j<a.length;j++)a[j]=(a[j]-m.x)/g.x;for(j=0;j<c.length;j++)c[j]=(c[j]-m.y)/g.y;if(0!=n)for(j=0;j<e.length;j++)e[j]=(e[j]-m.z)/g.z;m=[w,a,c,e,t,A,g,m]}if(135270421==f)return this.viewer.streamFileData(h,"PLOT",v,b,m);h=v.equals("data")?"1 0 H 0 0 0 # Jmol PDB-encoded data":this.viewer.getPdbData(b,v,m);if(4148==f)return h;J.util.Logger.debugging&&J.util.Logger.info(h);if(135176==f)return this.runScript(h),"";f=this.viewer.getFileInfo();w=this.viewer.getBoolean(603979792);
this.viewer.setAppendNew(!0);h=null!=h&&null==this.viewer.loadInline(h,!0);this.viewer.setAppendNew(w);this.viewer.setFileInfo(f);if(!h)return"";f=this.viewer.getModelCount();this.viewer.setJmolDataFrame(l,b,f-1);1716520973!=G&&(l+=";\n"+u);l=this.viewer.addStateScript(l,!0,!1);h=150;switch(G){default:b="frame 0.0; frame last; reset;select visible;wireframe only;";h=10;break;case 1716520973:this.viewer.setFrameTitle(f-1,v+" plot for model "+this.viewer.getModelNumberDotted(b));b="frame 0.0; frame last; reset;select visible; spacefill 3; wireframe 0;draw plotAxisX"+
f+' {100 -100 -100} {-100 -100 -100} "'+J.script.T.nameOf(y)+'";draw plotAxisY'+f+' {-100 100 -100} {-100 -100 -100} "'+J.script.T.nameOf(z)+'";';0!=n&&(b+="draw plotAxisZ"+f+' {-100 -100 100} {-100 -100 -100} "'+J.script.T.nameOf(n)+'";');break;case 1052714:this.viewer.setFrameTitle(f-1,"ramachandran plot for model "+this.viewer.getModelNumberDotted(b));b="frame 0.0; frame last; reset;select visible; color structure; spacefill 3.0; wireframe 0;draw ramaAxisX"+f+' {100 0 0} {-100 0 0} "phi";draw ramaAxisY'+
f+' {0 100 0} {0 -100 0} "psi";';break;case 135270417:case 137363468:this.viewer.setFrameTitle(f-1,v.$replace("w"," ")+d+" for model "+this.viewer.getModelNumberDotted(b)),b=J.util.C.getHexCode(this.viewer.getColixBackgroundContrast()),b="frame 0.0; frame last; reset;select visible; wireframe 0; spacefill 3.0; isosurface quatSphere"+f+" color "+b+" sphere 100.0 mesh nofill frontonly translucent 0.8;draw quatAxis"+f+'X {100 0 0} {-100 0 0} color red "x";draw quatAxis'+f+'Y {0 100 0} {0 -100 0} color green "y";draw quatAxis'+
f+'Z {0 0 100} {0 0 -100} color blue "z";color structure;draw quatCenter'+f+"{0 0 0} scale 0.02;"}this.runScript(b+u);l.setModelIndex(this.viewer.getCurrentModelIndex());this.viewer.setRotationRadius(h,!0);this.sm.loadShape(30);this.showString("frame "+this.viewer.getModelNumberDotted(f-1)+(0<v.length?" created: "+v+(s?d:""):""));return""},$fz.isPrivate=!0,$fz),"~A");c$.getMinMax=$_M(c$,"getMinMax",($fz=function(a,b,c){if(null==a)return 0;switch(c){case 1112539142:case 1112539143:case 1112539144:return b?
180:-180;case 1112539140:case 1112539150:return b?360:0;case 1112539148:return b?1:-1}c=b?-1E10:1E10;for(var d=a.length;0<=--d;){var e=a[d];Float.isNaN(e)||b==e>c&&(c=e)}return c},$fz.isPrivate=!0,$fz),"~A,~B,~N");$_M(c$,"pause",($fz=function(){if(this.chk||this.isJS&&!this.allowJSThreads)return!1;var a=this.optParameterAsString(1);this.viewer.getBooleanProperty("_useCommandThread");if(this.viewer.autoExit||!this.viewer.haveDisplay&&!this.viewer.isWebGL)return!1;if(0==this.scriptLevel&&this.pc==this.aatoken.length-
1)return this.viewer.scriptStatus("nothing to pause: "+a),!1;a=0==a.length?": RESUME to continue.":": "+this.viewer.formatText(a);this.pauseExecution(!0);this.viewer.scriptStatusMsg("script execution paused"+a,"script paused for RESUME");return!0},$fz.isPrivate=!0,$fz));$_M(c$,"print",($fz=function(){1==this.slen&&this.error(2);this.showStringPrint(this.parameterExpressionString(1,0),!0)},$fz.isPrivate=!0,$fz));$_M(c$,"prompt",($fz=function(){var a=null;1==this.slen?this.chk||(a=J.script.ScriptEvaluator.getContextTrace(this.getScriptContext(),
null,!0).toString()):a=this.parameterExpressionString(1,0);this.chk||this.viewer.prompt(a,"OK",null,!0)},$fz.isPrivate=!0,$fz));$_M(c$,"refresh",($fz=function(){this.chk||(this.viewer.setTainted(!0),this.viewer.requestRepaintAndWait())},$fz.isPrivate=!0,$fz));$_M(c$,"reset",($fz=function(){if(3==this.slen&&135368713==this.tokAt(1))this.chk||this.viewer.removeFunction(this.stringParameter(2));else if(this.checkLength(-2),!this.chk)if(1==this.slen)this.viewer.reset(!1);else{switch(this.tokAt(1)){case 135270422:this.viewer.cacheClear();
return;case 1073741936:this.viewer.resetError();return;case 1087373323:this.viewer.resetShapes(!0);return;case 135368713:this.viewer.clearFunctions();return;case 1641025539:var a=new J.util.BS;this.runScript(this.viewer.getDefaultStructure(null,a));this.viewer.resetBioshapes(a);return;case 1649412112:this.viewer.setData("element_vdw",[null,""],0,0,0,0,0);return;case 1076887572:this.viewer.resetAromatic();return;case 1611141175:this.viewer.reset(!0);return}a=this.parameterAsString(1);"_"==a.charAt(0)&&
this.error(22);this.viewer.unsetProperty(a)}},$fz.isPrivate=!0,$fz));$_M(c$,"restrict",($fz=function(){var a=1678770178==this.tokAt(1);this.select(a?2:1);this.restrictSelected(a,!0)},$fz.isPrivate=!0,$fz));$_M(c$,"restrictSelected",($fz=function(a,b){if(!this.chk){var c=J.util.BSUtil.copy(this.viewer.getSelectionSet(!0));if(b){this.viewer.invertSelection();var d=this.viewer.getSelectionSubset();null!=d&&(c=J.util.BSUtil.copy(this.viewer.getSelectionSet(!0)),c.and(d),this.viewer.select(c,!1,null,!0),
J.util.BSUtil.invertInPlace(c,this.viewer.getAtomCount()),c.and(d))}J.util.BSUtil.andNot(c,this.viewer.getDeletedAtoms());d=this.viewer.getBoolean(603979812);a||this.setBooleanProperty("bondModeOr",!0);this.setShapeSizeBs(1,0,null);this.setShapeProperty(1,"type",Integer.$valueOf(32768));this.setShapeSizeBs(1,0,null);this.setShapeProperty(1,"type",Integer.$valueOf(1023));for(var e=this.viewer.getSelectionSet(!1),f=21;0<=--f;)6!=f&&null!=this.sm.getShape(f)&&this.setShapeSizeBs(f,0,e);null!=this.sm.getShape(21)&&
this.setShapeProperty(21,"delete",e);this.sm.setLabel(null,e);a||this.setBooleanProperty("bondModeOr",d);this.viewer.select(c,!1,null,!0)}},$fz.isPrivate=!0,$fz),"~B,~B");$_M(c$,"rotate",($fz=function(a,b){if(2==this.slen)switch(this.getToken(1).tok){case 1048589:this.chk||this.viewer.setSpinOn(!0);return;case 1048588:this.chk||this.viewer.setSpinOn(!1);return}for(var c=null,d=1.4E-45,e=0,f=3.4028235E38,g=!1,h=!1,j=null,k=Array(2),m=J.util.V3.new3(0,1,0),l=null,s=null,j=null,p=1,r,j=null,v=!1,y=null,
z=null,n=null,w=null,u=this.viewer.getBoolean(603979806),t=1;t<this.slen;++t){switch(r=this.getToken(t).tok){case 10:case 1048577:case 1048586:case 8:case 1048583:if(10==r||1048577==r)if(null!=l||null!=j||2==e){c=this.atomExpressionAt(t);y=null;b=!0;break}h=!0;2==e&&(e=0);var A=this.centerParameterForModel(t,this.viewer.getCurrentModelIndex());!this.chk&&(1048583==r&&269484096!=this.tokAt(t+2))&&(g=!0,m=this.getDrawObjectAxis(this.objectNameParameter(++t),this.viewer.getCurrentModelIndex()));k[e++]=
A;break;case 1611141175:a=!0;continue;case 1073741988:case 1073742029:g=!0;continue;case 1114638350:b=!0;break;case 269484080:continue;case 2:case 3:if(a)if(1.4E-45==d){d=this.floatParameter(t);continue}else{if(3.4028235E38==f){f=d;d=this.floatParameter(t);continue}}else if(3.4028235E38==f){f=this.floatParameter(t);continue}else if(1.4E-45==d){d=this.floatParameter(t);a=!0;continue}this.error(22);break;case 269484192:p=-1;continue;case 1112541205:h=!0;m.set(p,0,0);continue;case 1112541206:h=!0;m.set(0,
p,0);continue;case 1112541207:h=!0;m.set(0,0,u&&!g?-p:p);continue;case 9:case 135270417:135270417==r&&t++;h=!0;j=this.getQuaternionParameter(t);m.setT(j.getNormal());f=j.getTheta();break;case 135266307:h=!0;if(this.isPoint3f(++t)){m.setT(this.centerParameter(t));break}f=this.getPoint4f(t);m.set(f.x,f.y,f.z);f=f.w;j=J.util.Quaternion.newVA(m,f);break;case 1048580:h=!0;e=this.atomExpressionAt(++t).nextSetBit(0);t=this.atomExpressionAt(++this.iToken).nextSetBit(0);if(0>e||0>t)return;c=this.viewer.getBranchBitSet(t,
e);g=b=!0;k[0]=this.viewer.getAtomPoint3f(e);k[1]=this.viewer.getAtomPoint3f(t);e=2;break;case 4160:l=J.util.V3.newV(this.centerParameter(++t));g=b=!0;break;case 137363468:v=!0;continue;case 1297090050:r=this.intParameter(++t);if(this.chk)continue;l=this.viewer.getSpaceGroupInfo(null);g=null==l?null:l.get("operations");(0==r||null==g||g.length<Math.abs(r))&&this.error(22);g=g[Math.abs(r)-1];l=g[5];n=g[6];k[0]=g[7];null!=g[8]&&(m=g[8]);f=g[9].intValue();0>r&&(f=-f,null!=l&&l.scale(-1));0==f&&null!=
k[0]&&(m.normalize(),J.util.Measure.getPlaneThroughPoint(k[0],m,w=new J.util.P4));j=J.util.Quaternion.newVA(m,f);e=null==k[0]?0:1;b=h=g=!0;continue;case 135270405:case 12:case 11:h=!0;if(135270405==r){if(z=this.atomExpressionAt(++t),j=this.viewer.getAtomPointVector(z),null==j&&this.errorAt(22,t),t=this.iToken,y=this.getPointVector(this.getToken(++t),t),(null==y||j.size()!=y.size())&&this.errorAt(22,t),s=new J.util.Matrix4f,k[0]=new J.util.P3,e=1,0.001<(this.chk?0:J.util.Measure.getTransformMatrix4(j,
y,s,k[0])))y=null}else 12==r&&(s=this.theToken.value);j=new J.util.Matrix3f;null!=s?(l=new J.util.V3,s.get(l),s.getRotationScale(j)):j=this.theToken.value;j=this.chk?new J.util.Quaternion:J.util.Quaternion.newM(j);m.setT(j.getNormal());f=j.getTheta();g=!0;break;default:this.error(22)}t=this.iToken}if(!this.chk){b&&null==c&&(c=this.viewer.getSelectionSet(!1));null!=z&&(b=!0,null==c&&(c=z));p=1.4E-45==d?10:3.4028235E38==f?d:0>d==0<f?-f/d:d;null!=j&&(0==e&&null!=l&&(k[0]=this.viewer.getAtomSetCenter(null!=
c?c:b?this.viewer.getSelectionSet(!1):this.viewer.getModelUndeletedAtomsBitSet(-1))),v&&null!=l&&(k[1]=J.util.P3.newP(k[0]),k[1].add(l),s=J.util.Measure.computeHelicalAxis(null,135266306,k[0],k[1],j),k[0]=s[0],v=s[3].x,0!=v&&(l=s[1],m=J.util.V3.newV(l),0>v&&m.scale(-1)),s=null),a&&null==s&&(s=J.script.ScriptMathProcessor.getMatrix4f(j.getMatrix(),l)),null!=k[0]&&(e=1));if(null!=n&&(this.viewer.invertAtomCoordPt(n,c),null==m)||null!=w&&(this.viewer.invertAtomCoordPlane(w,c),null==m))return;if(2>e){if(!g){if(a&&
null==c&&!this.useThreads())return;if(this.viewer.rotateAxisAngleAtCenter(this,k[0],m,p,f,a,c)&&this.isJS&&a&&null==c)throw new J.script.ScriptInterruption(this,"rotate",1);return}0==e&&(k[0]=new J.util.P3);k[1]=J.util.P3.newP(k[0]);k[1].add(m);e=2}0==e&&(k[0]=new J.util.P3);if(2>e||0==k[0].distance(k[1]))k[1]=J.util.P3.newP(k[0]),k[1].y+=1;3.4028235E38==f&&(f=0);0!=f&&(null!=l&&!h)&&l.scale(f/l.length());if(a&&null!=l&&(0==f||0==d))f=0.01,p=1.4E-45==d?0.01:0>d?-f/d:0.01*d/l.length();null!=c&&(a&&
null==y&&null!=s)&&(j=this.viewer.getAtomPointVector(c),y=J.util.Measure.transformPoints(j,s,k[0]));if(null!=c&&!a&&null!=y)this.viewer.setAtomCoords(c,1146095626,y);else if(this.useThreads()&&this.viewer.rotateAboutPointsInternal(this,k[0],k[1],p,f,a,c,l,y)&&this.isJS&&a)throw new J.script.ScriptInterruption(this,"rotate",1);}},$fz.isPrivate=!0,$fz),"~B,~B");$_M(c$,"getQuaternionParameter",($fz=function(a){if(7==this.tokAt(a)){a=this.getToken(a).getList();var b=null;(0==a.size()||null==(b=J.script.SV.pt4Value(a.get(0))))&&
this.error(22);return J.util.Quaternion.newP4(b)}return J.util.Quaternion.newP4(this.getPoint4f(a))},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getPointVector",function(a,b){switch(a.tok){case 10:return this.viewer.getAtomPointVector(a.value);case 7:for(var c=new J.util.JmolList,d,e=a.getList(),f=0;f<e.size();f++)if(null!=(d=J.script.SV.ptValue(e.get(f))))c.addLast(d);else return null;return c}return 0<b?this.viewer.getAtomPointVector(this.atomExpressionAt(b)):null},"J.script.T,~N");$_M(c$,"getObjectCenter",
($fz=function(a,b,c){a=[a,Integer.$valueOf(b),Integer.$valueOf(c)];return this.getShapePropertyData(22,"getCenter",a)||this.getShapePropertyData(24,"getCenter",a)||this.getShapePropertyData(28,"getCenter",a)||this.getShapePropertyData(25,"getCenter",a)||this.getShapePropertyData(27,"getCenter",a)?a[2]:null},$fz.isPrivate=!0,$fz),"~S,~N,~N");$_M(c$,"getObjectBoundingBox",($fz=function(a){a=[a,null,null];return this.getShapePropertyData(24,"getBoundingBox",a)||this.getShapePropertyData(28,"getBoundingBox",
a)||this.getShapePropertyData(25,"getBoundingBox",a)||this.getShapePropertyData(27,"getBoundingBox",a)?a[2]:null},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"getDrawObjectAxis",($fz=function(a,b){var c=[a,Integer.$valueOf(b),null];return this.getShapePropertyData(22,"getSpinAxis",c)?c[2]:null},$fz.isPrivate=!0,$fz),"~S,~N");$_M(c$,"script",($fz=function(a,b){var c=!0,d=!1,e=!1,f=0,g=0,h=0,j=0,k=2,m=null,l=null,s=null,p=null,r=null;if(135287308==a)this.checkLength(2),this.chk||this.viewer.jsEval(this.parameterAsString(1));
else{if(null==b)if(a=this.tokAt(1),4!=a&&this.error(16),b=this.parameterAsString(1),b.equalsIgnoreCase("applet")){k=this.parameterAsString(2);m=this.parameterExpressionString(3,0);this.checkLast(this.iToken);if(this.chk)return;if(0==k.length||k.equals("all"))k="*";if(!k.equals(".")&&(this.viewer.jsEval(k+"\u0001"+m),!k.equals("*")))return}else{a=this.tokAt(this.slen-1);e=266298==a;b.equalsIgnoreCase("inline")&&(m=this.parameterExpressionString(2,e?this.slen-1:0),k=this.iToken+1);for(;b.equalsIgnoreCase("localPath")||
b.equalsIgnoreCase("remotePath")||b.equalsIgnoreCase("scriptPath");)b.equalsIgnoreCase("localPath")?l=this.parameterAsString(k++):b.equalsIgnoreCase("scriptPath")?p=this.parameterAsString(k++):s=this.parameterAsString(k++),b=this.parameterAsString(k++);if(1073741878==(a=this.tokAt(k)))d=!0,a=this.tokAt(++k);1073742050==a&&(c=!1,a=this.tokAt(++k));if(1073741998==a||1141899268==a)k++,h=f=Math.max(this.intParameter(k++),0),this.checkToken(k)&&(h=269484192==this.getToken(k).tok?this.checkToken(++k)?this.intParameter(k++):
0:-this.intParameter(k++),0>=h&&this.error(22));else if(1073741890==a||1073741892==a)k++,g=Math.max(this.intParameter(k++)-1,0),j=g+1,this.checkToken(k)&&(j=269484192==this.getToken(k).tok?this.checkToken(++k)?this.intParameter(k++):0:-this.intParameter(k++),0>=j&&this.error(22));269484048==this.tokAt(k)&&(r=this.parameterExpressionList(k,-1,!1),k=this.iToken+1);this.checkLength(e?k+1:k)}if(!this.chk||this.isCmdLine_c_or_C_Option){this.isCmdLine_c_or_C_Option&&(d=!0);var k=this.chk,v=this.isCmdLine_c_or_C_Option;
d&&(this.chk=this.isCmdLine_c_or_C_Option=!0);this.pushContext(null);this.contextPath+=" >> "+b;if(null==m?this.compileScriptFileInternal(b,l,s,p):this.compileScript(null,m,!1)){this.pcEnd=j;for(this.lineEnd=h;g<this.lineNumbers.length&&this.lineNumbers[g]<f;)g++;this.pc=g;f=this.isCmdLine_C_Option;this.isCmdLine_C_Option=(new Boolean(this.isCmdLine_C_Option&c)).valueOf();this.executionStepping=(new Boolean(this.executionStepping|e)).valueOf();this.contextVariables=new java.util.Hashtable;this.contextVariables.put("_arguments",
null==r?J.script.SV.getVariableAI([]):J.script.SV.getVariableList(r));d&&(this.listCommands=!0);this.dispatchCommands(!1,!1);this.isCmdLine_C_Option=f;this.popContext(!1,!1)}else J.util.Logger.error(J.i18n.GT._("script ERROR: ")+this.errorMessage),this.popContext(!1,!1),v?this.setErrorMessage(null):this.evalError(null,null);this.chk=k;this.isCmdLine_c_or_C_Option=v}}},$fz.isPrivate=!0,$fz),"~N,~S");$_M(c$,"$function",($fz=function(){if(!this.chk||this.isCmdLine_c_or_C_Option){var a=this.getToken(0).value;
this.viewer.isFunction(a)||this.error(10);var b=1==this.slen||3==this.slen&&269484048==this.tokAt(1)&&269484049==this.tokAt(2)?null:this.parameterExpressionList(1,-1,!1);this.chk||this.runFunctionRet(null,a,b,null,!1,!0,!0)}},$fz.isPrivate=!0,$fz));$_M(c$,"sync",($fz=function(){this.checkLength(-3);var a="",b="";switch(this.slen){case 1:b="*";a="ON";break;case 2:b=this.parameterAsString(1);if(0==b.indexOf("jmolApplet")||J.util.Parser.isOneOf(b,"*;.;^")){a="ON";this.chk||this.viewer.syncScript(a,b,
0);b=".";break}if(2==this.tokAt(1)){this.chk||this.viewer.syncScript(null,null,this.intParameter(1));return}a=b;b="*";break;case 3:if(this.chk)return;b=this.parameterAsString(1);a=528443==this.tokAt(2)?"GET_GRAPHICS":this.parameterAsString(2);if(2==this.tokAt(1)){this.viewer.syncScript(a,null,this.intParameter(1));return}}this.chk||this.viewer.syncScript(a,b,0)},$fz.isPrivate=!0,$fz));$_M(c$,"history",($fz=function(a){if(1==this.slen)this.showString(this.viewer.getSetHistory(2147483647));else if(2==
a)a=this.intParameter(this.checkLast(2)),0>a&&this.error(22),this.chk||this.viewer.getSetHistory(0==a?0:-2-a);else switch(this.getToken(this.checkLast(1)).tok){case 1048589:case 1073741882:this.chk||this.viewer.getSetHistory(-2147483648);break;case 1048588:this.chk||this.viewer.getSetHistory(0);break;default:this.errorStr(24,"ON, OFF, CLEAR")}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"display",($fz=function(a){var b=null,c=null,d=1,e;switch(e=this.tokAt(1)){case 1276118017:case 1073742119:c=Boolean.$valueOf(1276118017==
e),e=this.tokAt(++d)}var f=1087373318==e;f&&(e=this.tokAt(++d));switch(e){case 1048583:this.setObjectProperty();return;case 0:break;default:b=4==this.slen&&1678770178==this.tokAt(2)?new J.modelset.Bond.BondSet(J.util.BSUtil.newBitSet2(0,this.viewer.modelSet.bondCount)):this.atomExpressionAt(d)}this.chk||(Clazz.instanceOf(b,J.modelset.Bond.BondSet)?this.viewer.displayBonds(b,a):this.viewer.displayAtoms(b,a,f,c,this.tQuiet))},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"$delete",($fz=function(){if(1==this.slen)this.zap(!0);
else if(1048583==this.tokAt(1))this.setObjectProperty();else{var a=this.atomExpression(this.st,1,0,!0,!1,!0,!1);this.chk||(a=this.viewer.deleteAtoms(a,!1),this.tQuiet||this.scriptLevel>this.scriptReportingLevel||this.scriptStatusOrBuffer(J.i18n.GT._("{0} atoms deleted",a)))}},$fz.isPrivate=!0,$fz));$_M(c$,"minimize",($fz=function(){for(var a=null,b=2147483647,c=0,d=!1,e=!1,f=null,g=this.viewer.getMinimizer(!1),h=1;h<this.slen;h++)switch(this.getToken(h).tok){case 1073741828:d=!0;continue;case 1073741874:case 1073742162:this.checkLength(2);
if(this.chk||null==g)return;g.setProperty(this.parameterAsString(h),null);return;case 1073741882:this.checkLength(2);if(this.chk||null==g)return;g.setProperty("clear",null);return;case 1073741894:1!=h&&this.error(22);b=a=0;c=Clazz.newIntArray(5,0);if(1073741882==this.tokAt(++h))this.checkLength(3);else{for(;4>a&&!this.isFloatParameter(h);)c[++a]=this.atomExpressionAt(h).nextSetBit(0),h=this.iToken+1;c[0]=a;1==a&&this.error(22);b=this.floatParameter(this.checkLast(h))}this.chk||this.viewer.getMinimizer(!0).setProperty("constraint",
[c,Clazz.newIntArray(a,0),Float.$valueOf(b)]);return;case 1073741905:c=this.floatParameter(++h);continue;case 1073741935:b=0;continue;case 1060869:1!=h&&this.error(22);f=this.atomExpressionAt(++h);0>f.nextSetBit(0)&&(f=null);h=this.iToken;this.chk||this.viewer.getMinimizer(!0).setProperty("fixed",f);if(h+1==this.slen)return;continue;case 135280132:a=this.atomExpressionAt(++h);h=this.iToken;continue;case 1073742148:e=!0;break;case 266298:b=this.intParameter(++h);continue;default:this.error(22)}this.chk||
this.viewer.minimize(b,c,a,f,0,d,e,!1)},$fz.isPrivate=!0,$fz));$_M(c$,"select",($fz=function(a){if(1==this.slen)this.viewer.select(null,!1,null,this.tQuiet||this.scriptLevel>this.scriptReportingLevel);else if(!(2==this.slen&&1073742072==this.tokAt(1))){this.viewer.setNoneSelected(4==this.slen&&1048587==this.tokAt(2));if(10==this.tokAt(2)&&Clazz.instanceOf(this.getToken(2).value,J.modelset.Bond.BondSet)||1678770178==this.getToken(2).tok&&10==this.getToken(3).tok){if(this.slen==this.iToken+2){this.chk||
this.viewer.selectBonds(this.theToken.value);return}this.error(22)}if(1746538509==this.getToken(2).tok){if(5==this.slen&&10==this.getToken(3).tok){this.chk||this.setShapeProperty(6,"select",this.theToken.value);return}this.error(22)}var b=null,c=null,d=!1;if(0==this.getToken(1).intValue)a=this.parameterExpressionToken(0).value,Clazz.instanceOf(a,J.util.BS)||this.error(22),this.checkLast(this.iToken),b=a;else{d=this.tokAt(a);switch(d){case 1276118017:case 1073742119:c=Boolean.$valueOf(1276118017==
d),d=this.tokAt(++a)}(d=1087373318==d)&&this.tokAt(++a);b=this.atomExpressionAt(a)}this.chk||(this.isBondSet?this.viewer.selectBonds(b):(b.length()>this.viewer.getAtomCount()&&(a=this.viewer.getModelUndeletedAtomsBitSet(-1),a.and(b),b=a),this.viewer.select(b,d,c,this.tQuiet||this.scriptLevel>this.scriptReportingLevel)))}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"subset",($fz=function(){var a=null;this.chk||this.viewer.setSelectionSubset(null);if(1!=this.slen&&(4!=this.slen||!this.getToken(2).value.equals("off")))a=
this.atomExpressionAt(1);this.chk||this.viewer.setSelectionSubset(a)},$fz.isPrivate=!0,$fz));$_M(c$,"invertSelected",($fz=function(){var a=null,b=null,c=null,d=-2147483648;switch(this.tokAt(1)){case 0:if(this.chk)return;c=this.viewer.getSelectionSet(!1);a=this.viewer.getAtomSetCenter(c);this.viewer.invertAtomCoordPt(a,c);return;case 528443:d=this.atomExpressionAt(2).nextSetBit(0);c=this.atomExpressionAt(this.iToken+1);break;case 135266320:a=this.centerParameter(2);break;case 135266319:b=this.planeParameter(2);
break;case 135267841:b=this.hklParameter(2)}this.checkLengthErrorPt(this.iToken+1,1);null==b&&(null==a&&-2147483648==d)&&this.error(22);this.chk||-1!=d&&this.viewer.invertSelected(a,b,d,c)},$fz.isPrivate=!0,$fz));$_M(c$,"translate",($fz=function(a){var b=null,c=1,b=0;1114638350==this.tokAt(1)&&(a=!0,b=1,c=2);if(this.isPoint3f(c)){var d=this.getPoint3f(c,!0),b=!a&&this.iToken+1<this.slen?this.atomExpressionAt(++this.iToken):null;this.checkLast(this.iToken);this.chk||this.viewer.setAtomCoordsRelative(d,
b)}else{d=this.parameterAsString(c).toLowerCase().charAt(0);0>"xyz".indexOf(d)&&this.error(0);var e=this.floatParameter(++c);switch(this.tokAt(++c)){case 0:case 10:case 1048577:c="\x00";break;default:c=(this.optParameterAsString(c).toLowerCase()+"\x00").charAt(0)}0==e&&"\x00"!=c||(this.iToken=b+("\x00"==c?2:3),b=a?this.viewer.getSelectionSet(!1):this.iToken+1<this.slen?this.atomExpressionAt(++this.iToken):null,this.checkLast(this.iToken),this.chk||this.viewer.translate(d,e,c,b))}},$fz.isPrivate=!0,
$fz),"~B");$_M(c$,"zap",($fz=function(a){if(1==this.slen||!a)this.viewer.zap(!0,a&&!this.isStateScript,!0),this.refresh();else if(a=this.atomExpressionAt(1),!this.chk){a=this.viewer.deleteAtoms(a,!0);var b=this.tQuiet||this.scriptLevel>this.scriptReportingLevel;b||this.scriptStatusOrBuffer(J.i18n.GT._("{0} atoms deleted",a));this.viewer.select(null,!1,null,b)}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"zoom",($fz=function(a){if(!a){var b=1<this.slen?this.getToken(1).tok:1048589;switch(b){case 1048589:case 1048588:2<
this.slen&&this.error(2);this.chk||this.setBooleanProperty("zoomEnabled",1048589==b);return}}var c=null,d=1,b=a?this.isFloatParameter(d)?this.floatParameter(d++):2:0;0>b&&(d--,b=0);var e=0,f=null;this.isCenterParameter(d)?(e=d,c=this.centerParameter(d),Clazz.instanceOf(this.expressionResult,J.util.BS)&&(f=this.expressionResult),d=this.iToken+1):2==this.tokAt(d)&&0==this.getToken(d).intValue&&(f=this.viewer.getAtomBitSet("visible"),c=this.viewer.getAtomSetCenter(f));var g=this.viewer.getZoomSetting(),
f=this.getZoom(e,d,f,g),d=this.iToken+1,h=g=NaN;d!=this.slen&&(g=this.floatParameter(d++),h=this.floatParameter(d++));d!=this.slen&&this.error(22);0>f&&(f=-f,a&&(1==this.slen?f*=2:null==c&&(f/=2)));a=this.viewer.getMaxZoomPercent();(5>f||f>a)&&this.numberOutOfRange(5,a);this.viewer.isWindowCentered()||(null!=c&&(a=this.atomExpressionAt(e),this.chk||this.viewer.setCenterBitSet(a,!1)),c=this.viewer.getRotationCenter(),Float.isNaN(g)&&(g=this.viewer.getTranslationXPercent()),Float.isNaN(h)&&(h=this.viewer.getTranslationYPercent()));
if(!this.chk&&(Float.isNaN(g)&&(g=0),Float.isNaN(h)&&(h=0),this.viewer.moveTo(this,b,c,J.viewer.JC.center,NaN,null,f,g,h,NaN,null,NaN,NaN,NaN),this.isJS&&0<b&&this.viewer.global.waitForMoveTo))throw new J.script.ScriptInterruption(this,"zoomTo",1);},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"getZoom",($fz=function(a,b,c,d){var e=this.isFloatParameter(b)?this.floatParameter(b++):NaN;if(0==e||0==d)d=NaN,null==c?1048583==this.tokAt(a)&&(e=this.getObjectBoundingBox(this.objectNameParameter(a+1)),(null==e||0==
(d=e[0].distance(e[1])/2))&&this.error(22)):d=this.viewer.calcRotationRadiusBs(c),Float.isNaN(d)&&this.error(22),d=100*(this.viewer.getFloat(570425388)/d),e=NaN;if(0>e)e+=d;else if(Float.isNaN(e))switch(a=this.tokAt(b),a){case 1073742079:case 1073741980:e=d*(1073742079==a?0.5:2);b++;break;case 269484208:case 269484209:case 269484193:c=this.floatParameter(++b);b++;switch(a){case 269484208:e=d/c;break;case 269484209:e=d*c;break;case 269484193:e=d+c}break;default:e=null==c?-d:d}this.iToken=b-1;return e},
$fz.isPrivate=!0,$fz),"~N,~N,J.util.BS,~N");$_M(c$,"delay",($fz=function(){var a=0;switch(this.getToken(1).tok){case 1048589:a=1;break;case 2:a=1E3*this.intParameter(1);break;case 3:a=Clazz.floatToInt(1E3*this.floatParameter(1));break;default:this.error(34)}!this.chk&&(!this.viewer.isHeadless()&&!this.viewer.autoExit)&&(this.refresh(),this.doDelay(Math.abs(a)))},$fz.isPrivate=!0,$fz));$_M(c$,"slab",($fz=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.viewer.depthToPercent(c):this.viewer.slabToPercent(c));return;case 1048589:this.checkLength(2),b=!0;case 1048588:this.checkLength(2);this.setBooleanProperty("slabEnabled",b);return;case 4141:this.checkLength(2);if(this.chk)return;this.viewer.slabReset();this.setBooleanProperty("slabEnabled",!0);return;case 1085443:this.checkLength(2);if(this.chk)return;this.viewer.setSlabDepthInternal(a);this.setBooleanProperty("slabEnabled",
!0);return;case 269484192:b=this.parameterAsString(2);b.equalsIgnoreCase("hkl")?c=this.hklParameter(3):b.equalsIgnoreCase("plane")&&(c=this.planeParameter(3));null==c&&this.error(22);c.scale(-1);break;case 135266319:switch(this.getToken(2).tok){case 1048587:break;default:c=this.planeParameter(2)}break;case 135267841:c=1048587==this.getToken(2).tok?null:this.hklParameter(2);break;case 1073742118:return;default:this.error(22)}this.chk||this.viewer.slabInternal(c,a)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,
"ellipsoid",($fz=function(){var a=0,b=1;switch(this.getToken(1).tok){case 1048589:a=50;break;case 1048588:break;case 2:a=this.intParameter(1);break;case 1085443:this.checkLength(3);this.sm.loadShape(20);this.setShapeProperty(20,"select",Integer.$valueOf(this.intParameterRange(2,1,3)));return;case 1074790550:case 269484209:case 1073741824:this.sm.loadShape(20);1074790550==this.theTok&&b++;this.setShapeId(20,b,!1);for(b=this.iToken;++b<this.slen;){var a=this.parameterAsString(b),c=null;switch(this.tokAt(b)){case 1048583:a=
"points";c=Array(3);c[0]=this.objectNameParameter(++b);if(this.chk)continue;this.getShapePropertyData(24,"getVertices",c);break;case 10:case 1048577:a="atoms";c=this.atomExpressionAt(b);b=this.iToken;break;case 1611272194:for(var c=Array(3),d=0;3>d;d++)c[d]=new J.util.V3,c[d].setT(this.centerParameter(++b)),b=this.iToken;break;case 12289:c=this.centerParameter(++b);b=this.iToken;break;case 1766856708:a=NaN;1766856708==this.tokAt(b)&&b++;1073742180==(this.theTok=this.tokAt(b))?(c="translucent",a=this.isFloatParameter(++b)?
this.getTranslucentLevel(b++):this.viewer.getFloat(570425354)):1073742074==this.theTok&&(c="opaque",b++);this.isColorParam(b)&&(this.setShapeProperty(20,"color",Integer.$valueOf(this.getArgbParam(b))),b=this.iToken);if(null==c)continue;Float.isNaN(a)||this.setShapeProperty(20,"translucentLevel",Float.$valueOf(a));a="translucency";break;case 12291:c=Boolean.TRUE;this.checkLength(3);break;case 1095761933:c=Integer.$valueOf(this.intParameter(++b));break;case 1048589:c=Boolean.TRUE;break;case 1048588:a=
"on";c=Boolean.FALSE;break;case 1073742138:c=Float.$valueOf(this.floatParameter(++b))}null==c&&this.error(22);this.setShapeProperty(20,a.toLowerCase(),c)}this.setShapeProperty(20,"thisID",null);return;default:this.error(22)}this.setShapeSizeBs(20,a,null)},$fz.isPrivate=!0,$fz));$_M(c$,"getShapeNameParameter",($fz=function(a){var b=this.parameterAsString(a),c=b.equals("*");0==b.length&&this.error(22);if(c)switch(this.tokAt(a+1)){case 0:case 1048589:case 1048588:case 3145768:case 3145770:case 1766856708:case 12291:break;
default:if(this.setMeshDisplayProperty(-1,0,this.tokAt(a+1)))break;b+=this.optParameterAsString(++a)}269484209==this.tokAt(a+1)&&(b+=this.parameterAsString(++a));this.iToken=a;return b},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setShapeId",($fz=function(a,b,c){c&&this.error(22);b=this.getShapeNameParameter(b).toLowerCase();this.setShapeProperty(a,"thisID",b);return b},$fz.isPrivate=!0,$fz),"~N,~N,~B");$_M(c$,"setAtomShapeSize",($fz=function(a,b){var c=null,d=!1;switch(this.tokAt(1)){case 1073742072:this.restrictSelected(!1,
!1);break;case 1048589:break;case 1048588:b=0;break;case 3:d=0>this.floatParameter(1);default:c=this.encodeRadiusParameter(1,d,!0),Float.isNaN(c.value)&&this.error(22)}null==c&&(c=new J.atomdata.RadiusData(null,b,J.atomdata.RadiusData.EnumType.FACTOR,J.constant.EnumVdw.AUTO));d&&this.restrictSelected(!1,!1);this.setShapeSize(a,c)},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"encodeRadiusParameter",($fz=function(a,b,c){var d=NaN,e=J.atomdata.RadiusData.EnumType.ABSOLUTE,f=null,g=-1==a?1649412112:this.getToken(a).tok;
switch(g){case 1112539137:case 1112539138:case 1112541195:case 1114638346:case 1112541199:case 1649412112:d=1,e=J.atomdata.RadiusData.EnumType.FACTOR,f=1649412112==g?null:J.constant.EnumVdw.getVdwType2(J.script.T.nameOf(g)),g=this.tokAt(++a)}switch(g){case 4141:return this.viewer.getDefaultRadiusData();case 1073741852:case 1073742116:case 1073741856:case 1073741858:case 1073741992:d=1;e=J.atomdata.RadiusData.EnumType.FACTOR;this.iToken=a-1;break;case 269484193:case 2:case 3:if(269484193==g)a++;else if(269484210==
this.tokAt(a+1)){d=Math.round(this.floatParameter(a));this.iToken=++a;e=J.atomdata.RadiusData.EnumType.FACTOR;(0>d||200<d)&&this.integerOutOfRange(0,200);d/=100;break}else if(2==g){d=this.intParameter(a);(749<d||-200>d)&&this.integerOutOfRange(-200,749);0<d?(d/=250,e=J.atomdata.RadiusData.EnumType.ABSOLUTE):(d/=-100,e=J.atomdata.RadiusData.EnumType.FACTOR);break}d=this.floatParameterRange(a,b||!c?-16:0,16);269484193==g||!c?e=J.atomdata.RadiusData.EnumType.OFFSET:(e=J.atomdata.RadiusData.EnumType.ABSOLUTE,
f=J.constant.EnumVdw.NADA);b&&(d=-d);break;default:1==d&&a--}null==f&&(f=J.constant.EnumVdw.getVdwType(this.optParameterAsString(++this.iToken)),null==f&&(this.iToken=a,f=J.constant.EnumVdw.AUTO));return new J.atomdata.RadiusData(null,d,e,f)},$fz.isPrivate=!0,$fz),"~N,~B,~B");$_M(c$,"structure",($fz=function(){var a=J.constant.EnumStructure.getProteinStructureType(this.parameterAsString(1));a===J.constant.EnumStructure.NOT&&this.error(22);var b=null;switch(this.tokAt(2)){case 10:case 1048577:b=this.atomExpressionAt(2);
this.checkLast(this.iToken);break;default:this.checkLength(2)}this.chk||(this.clearDefinedVariableAtomSets(),this.viewer.setProteinType(a,b))},$fz.isPrivate=!0,$fz));$_M(c$,"wireframe",($fz=function(){var a=-2147483648;4141==this.tokAt(1)?this.checkLast(1):a=this.getMadParameter();this.chk||(this.setShapeProperty(1,"type",Integer.$valueOf(1023)),this.setShapeSizeBs(1,-2147483648==a?300:a,null))},$fz.isPrivate=!0,$fz));$_M(c$,"ssbond",($fz=function(){var a=this.getMadParameter();this.setShapeProperty(1,
"type",Integer.$valueOf(256));this.setShapeSizeBs(1,a,null);this.setShapeProperty(1,"type",Integer.$valueOf(1023))},$fz.isPrivate=!0,$fz));$_M(c$,"struts",($fz=function(){var a=1073742072==this.tokAt(1)||1048589==this.tokAt(1)||1==this.slen,b=this.getMadParameter();a&&(b=Math.round(2E3*this.viewer.getFloat(570425406)));this.setShapeProperty(1,"type",Integer.$valueOf(32768));this.setShapeSizeBs(1,b,null);this.setShapeProperty(1,"type",Integer.$valueOf(1023))},$fz.isPrivate=!0,$fz));$_M(c$,"hbond",
($fz=function(){if(2==this.slen&&4102==this.getToken(1).tok){if(!this.chk){var a=this.viewer.autoHbond(null,null,!1);this.scriptStatusOrBuffer(J.i18n.GT._("{0} hydrogen bonds",Math.abs(a)))}}else 2==this.slen&&12291==this.getToken(1).tok?this.chk||this.connect(0):(a=this.getMadParameter(),this.setShapeProperty(1,"type",Integer.$valueOf(30720)),this.setShapeSizeBs(1,a,null),this.setShapeProperty(1,"type",Integer.$valueOf(1023)))},$fz.isPrivate=!0,$fz));$_M(c$,"configuration",($fz=function(){var a;
if(1==this.slen)a=this.viewer.setConformation(),this.viewer.addStateScriptRet("select",null,this.viewer.getSelectionSet(!1),null,"configuration",!0,!1);else{var b=this.intParameter(this.checkLast(1));if(this.chk)return;a=this.viewer.getConformation(this.viewer.getCurrentModelIndex(),b-1,!0);this.viewer.addStateScript("configuration "+b+";",!0,!1)}this.chk||(this.setShapeProperty(1,"type",Integer.$valueOf(30720)),this.setShapeSizeBs(1,0,a),this.viewer.autoHbond(a,a,!0),this.viewer.select(a,!1,null,
this.tQuiet))},$fz.isPrivate=!0,$fz));$_M(c$,"vector",($fz=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 1048589:break;case 1048588:b=0;break;case 2:b=this.intParameterRange(1,0,19);break;case 3:a=J.atomdata.RadiusData.EnumType.ABSOLUTE;b=this.floatParameterRange(1,0,3);break;default:this.error(6)}break;case 3:if(1073742138==this.tokAt(1)){this.setFloatProperty("vectorScale",this.floatParameterRange(2,
-100,100));return}}this.setShapeSize(18,new J.atomdata.RadiusData(null,b,a,null))},$fz.isPrivate=!0,$fz));$_M(c$,"dipole",($fz=function(){var a=null,b=null,c=!1,d=!1,e=!1;this.sm.loadShape(17);if(!(1073742001==this.tokAt(1)&&this.listIsosurface(17)))if(this.setShapeProperty(17,"init",null),1==this.slen)this.setShapeProperty(17,"thisID",null);else{for(var f=1;f<this.slen;++f){b=a=null;switch(this.getToken(f).tok){case 1048589:a="on";break;case 1048588:a="off";break;case 12291:a="delete";break;case 2:case 3:a=
"value";b=Float.$valueOf(this.floatParameter(f));break;case 10:a="atomBitset";case 1048577:null==a&&(a=c||d?"endSet":"startSet");b=this.atomExpressionAt(f);f=this.iToken;c=!0;break;case 1048586:case 8:b=this.getPoint3f(f,!0);f=this.iToken;a=c||d?"endCoord":"startCoord";d=!0;break;case 1678770178:a="bonds";break;case 4102:a="calculate";break;case 1074790550:this.setShapeId(17,++f,e);f=this.iToken;break;case 135267329:a="cross";b=Boolean.TRUE;break;case 1073742040:a="cross";b=Boolean.FALSE;break;case 1073742066:b=
this.floatParameter(++f);2==this.theTok?(a="offsetPercent",b=Integer.$valueOf(Clazz.floatToInt(b))):(a="offset",b=Float.$valueOf(b));break;case 1073742068:a="offsetSide";b=Float.$valueOf(this.floatParameter(++f));break;case 1073742188:a="value";b=Float.$valueOf(this.floatParameter(++f));break;case 1073742196:a="width";b=Float.$valueOf(this.floatParameter(++f));break;default:if(269484209==this.theTok||J.script.T.tokAttr(this.theTok,1073741824)){this.setShapeId(17,f,e);f=this.iToken;break}this.error(22)}e=
12291!=this.theTok&&4102!=this.theTok;null!=a&&this.setShapeProperty(17,a,b)}(d||c)&&this.setShapeProperty(17,"set",null)}},$fz.isPrivate=!0,$fz));$_M(c$,"animationMode",($fz=function(){var a=1,b=1;5<this.slen&&this.error(2);var c=null;switch(this.getToken(2).tok){case 1073742070:c=J.constant.EnumAnimationMode.ONCE;a=b=0;break;case 528410:c=J.constant.EnumAnimationMode.LOOP;break;case 1073742082:c=J.constant.EnumAnimationMode.PALINDROME;break;default:this.error(22)}4<=this.slen&&(a=b=this.floatParameter(3),
5==this.slen&&(b=this.floatParameter(4)));this.chk||this.viewer.setAnimationReplayMode(c,a,b)},$fz.isPrivate=!0,$fz));$_M(c$,"vibration",($fz=function(){this.checkLength(-3);var a=0;switch(this.getToken(1).tok){case 1048589:this.checkLength(2);a=this.viewer.getFloat(570425412);break;case 1048588:this.checkLength(2);a=0;break;case 2:case 3:this.checkLength(2);a=this.floatParameter(1);break;case 1073742138:this.setFloatProperty("vibrationScale",this.floatParameterRange(2,-10,10));return;case 1073742090:this.setFloatProperty("vibrationPeriod",
this.floatParameter(2));return;case 1073741824:this.error(22);break;default:a=-1}0>a&&this.error(22);this.chk||(0==a?this.viewer.setVibrationOff():this.viewer.setVibrationPeriod(-a))},$fz.isPrivate=!0,$fz));$_M(c$,"animationDirection",($fz=function(){var a=2,b=0;switch(this.tokAt(a)){case 269484192:b=-this.intParameter(++a);break;case 269484193:b=this.intParameter(++a);break;case 2:b=this.intParameter(a);0<b&&(b=0);break;default:this.error(22)}this.checkLength(++a);1!=b&&-1!=b&&this.errorStr2(35,
"-1","1");this.chk||this.viewer.setAnimationDirection(b)},$fz.isPrivate=!0,$fz));$_M(c$,"calculate",($fz=function(){var a=!1,b=!1,c=null,d=-2147483648;if(2<=(this.iToken=this.slen)){this.clearDefinedVariableAtomSets();switch(this.getToken(1).tok){case 1073741824:this.checkLength(2);break;case 1076887572:this.checkLength(2);this.chk||this.viewer.assignAromaticBonds();return;case 1612189718:if(2==this.slen){if(!this.chk){d=this.viewer.autoHbond(null,null,!1);break}return}a=null;a=(b=1641025539==this.tokAt(++this.iToken))?
this.viewer.getSelectionSet(!1):this.atomExpressionAt(this.iToken);!b&&1641025539!=this.tokAt(++this.iToken)&&(c=this.atomExpressionAt(this.iToken));if(!this.chk){d=this.viewer.autoHbond(a,c,!1);break}return;case 1613758476:a=2==this.slen?null:this.atomExpressionAt(2);this.checkLast(this.iToken);this.chk||this.viewer.addHydrogens(a,!1,!1);return;case 1112541196:this.iToken=1;a=2==this.slen?null:this.atomExpressionAt(2);this.checkLast(this.iToken);this.chk||this.viewer.calculatePartialCharges(a);return;
case 1073742102:this.pointGroup();return;case 1112539148:this.checkLength(2);this.chk||(this.viewer.calculateStraightness(),this.viewer.addStateScript("set quaternionFrame '"+this.viewer.getQuaternionFrame()+"'; calculate straightness",!1,!0));return;case 1641025539:a=4>this.slen?null:this.atomExpressionAt(2);switch(this.tokAt(++this.iToken)){case 1052714:break;case 1073741915:b=!0;break;case 0:b=this.viewer.getBoolean(603979825);break;default:this.error(22)}this.chk||this.showString(this.viewer.calculateStructures(a,
b,!0));return;case 1708058:a=this.iToken+1<this.slen?this.atomExpressionAt(++this.iToken):null;c=this.iToken+1<this.slen?this.atomExpressionAt(++this.iToken):null;this.checkLength(++this.iToken);this.chk||(d=this.viewer.calculateStruts(a,c),0<d&&(this.setShapeProperty(1,"type",Integer.$valueOf(32768)),this.setShapePropertyBs(1,"color",Integer.$valueOf(16777215),null),this.setShapeTranslucency(1,"","translucent",0.5,null),this.setShapeProperty(1,"type",Integer.$valueOf(1023))),this.showString(J.i18n.GT._("{0} struts added",
d)));return;case 3145756:a=!0;case 1112539149:b=!1;switch(this.tokAt(2)){case 135266324:this.iToken++;break;case 0:b=!a;break;case 1073741952:b=!0;this.iToken++;break;default:b=!0}a=this.iToken+1<this.slen?this.atomExpressionAt(++this.iToken):this.viewer.getSelectionSet(!1);this.checkLength(++this.iToken);this.chk||this.viewer.calculateSurface(a,b?3.4028235E38:-1);return}if(-2147483648!=d){this.scriptStatusOrBuffer(J.i18n.GT._("{0} hydrogen bonds",Math.abs(d)));return}}this.errorStr2(53,"CALCULATE",
"aromatic? hbonds? hydrogen? partialCharge? pointgroup? straightness? structure? struts? surfaceDistance FROM? surfaceDistance WITHIN?")},$fz.isPrivate=!0,$fz));$_M(c$,"pointGroup",($fz=function(){switch(this.tokAt(0)){case 4102:this.chk||this.showString(this.viewer.calculatePointGroup());return;case 4148:this.chk||this.showString(this.viewer.getPointGroupAsString(!1,null,0,0));return}var a=2,b=1073742138==this.tokAt(a)?"":this.optParameterAsString(a),c=1,d=0;0<b.length&&this.isFloatParameter(++a)&&
(d=this.intParameter(a++));1073742138==this.tokAt(a)&&(c=this.floatParameter(++a));this.chk||this.runScript(this.viewer.getPointGroupAsString(!0,b,d,c))},$fz.isPrivate=!0,$fz));$_M(c$,"dots",($fz=function(a){this.chk||this.sm.loadShape(a);this.setShapeProperty(a,"init",null);for(var b=NaN,c=J.atomdata.RadiusData.EnumType.ABSOLUTE,d=1;;){switch(this.getToken(d).tok){case 1073742072:this.restrictSelected(!1,!1);b=1;c=J.atomdata.RadiusData.EnumType.FACTOR;break;case 1048589:b=1;c=J.atomdata.RadiusData.EnumType.FACTOR;
break;case 1048588:b=0;break;case 1073741976:this.setShapeProperty(a,"ignore",this.atomExpressionAt(d+1));d=this.iToken+1;continue;case 2:var e=this.intParameter(d);if(1666189314==this.tokAt(d+1)){d++;this.setShapeProperty(a,"atom",Integer.$valueOf(e));this.setShapeProperty(a,"radius",Float.$valueOf(this.floatParameter(++d)));1766856708==this.tokAt(++d)&&(this.setShapeProperty(a,"colorRGB",Integer.$valueOf(this.getArgbParam(++d))),d++);10!=this.getToken(d).tok&&this.error(22);this.setShapeProperty(a,
"dots",this.st[d].value);return}}break}b=Float.isNaN(b)?this.encodeRadiusParameter(d,!1,!0):new J.atomdata.RadiusData(null,b,c,J.constant.EnumVdw.AUTO);Float.isNaN(b.value)&&this.error(22);this.setShapeSize(a,b)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"proteinShape",($fz=function(a){var b=0;switch(this.getToken(1).tok){case 1073742072:if(this.chk)return;this.restrictSelected(!1,!1);b=-1;break;case 1048589:b=-1;break;case 1048588:break;case 1641025539:b=-2;break;case 1112541199:case 1073741922:b=-4;break;
case 2:b=8*this.intParameterRange(1,0,1E3);break;case 3:b=Math.round(2E3*this.floatParameterRange(1,-4,4));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)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"animation",($fz=function(){var a=!1;switch(this.getToken(1).tok){case 1048589:a=!0;case 1048588:this.chk||this.viewer.setAnimationOn(a);break;case 1073742031:a=
Clazz.floatToInt(this.floatParameter(2));this.chk||this.viewer.setAnimMorphCount(Math.abs(a));break;case 1610625028:this.iToken=2;a=1048579==this.tokAt(2)?null:this.atomExpressionAt(2);this.checkLength(this.iToken+1);this.chk||this.viewer.setAnimDisplay(a);break;case 4115:this.frame(2);break;case 1073742024:this.animationMode();break;case 1073741918:this.animationDirection();break;case 1074790526:this.setIntProperty("animationFps",this.intParameter(this.checkLast(2)));break;default:this.frameControl(1)}},
$fz.isPrivate=!0,$fz));$_M(c$,"assign",($fz=function(){var a=this.tokAt(1),b=this.atomExpressionAt(2).nextSetBit(0),c=-1,d=null;if(!(0>b)){4106==a?c=this.atomExpressionAt(++this.iToken).nextSetBit(0):d=this.parameterAsString(++this.iToken);var e=++this.iToken<this.slen?this.centerParameter(this.iToken):null;if(!this.chk)switch(a){case 1141899265:this.clearDefinedVariableAtomSets();this.viewer.assignAtom(b,e,d);break;case 1678770178:this.viewer.assignBond(b,(d+"p").charAt(0));break;case 4106:this.viewer.assignConnect(b,
c)}}},$fz.isPrivate=!0,$fz));$_M(c$,"file",($fz=function(){var a=this.intParameter(this.checkLast(1));if(!this.chk){var b=this.viewer.getModelNumberIndex(1E6*a+1,!1,!1),c=-1;0<=b&&(c=this.viewer.getModelNumberIndex(1E6*(a+1)+1,!1,!1),0>c&&(c=this.viewer.getModelCount()),c--);this.viewer.setAnimationOn(!1);this.viewer.setAnimationDirection(1);this.viewer.setAnimationRange(b,c);this.viewer.setCurrentModelIndex(-1)}},$fz.isPrivate=!0,$fz));$_M(c$,"fixed",($fz=function(){var a=1==this.slen?null:this.atomExpressionAt(1);
this.chk||this.viewer.setMotionFixedAtoms(a)},$fz.isPrivate=!0,$fz));$_M(c$,"frame",($fz=function(a){var b=!0;if(1==this.slen&&1==a){var c=this.viewer.getCurrentModelIndex(),d;if(!this.chk&&0<=c&&0<=(d=this.viewer.getJmolDataSourceFrame(c)))this.viewer.setCurrentModelIndex(d==c?-2147483648:d)}else{switch(this.tokAt(1)){case 1048577:case 10:d=this.atomExpressionAt(1).nextSetBit(0);this.checkLength(this.iToken+1);if(this.chk||0>d)return;b=new J.util.BS;b.set(d);this.viewer.setCurrentModelIndex(this.viewer.getModelBitSet(b,
!1).nextSetBit(0));return;case 1073741904:this.iToken=1;b=2==this.tokAt(2)?this.intParameter(++this.iToken):1;this.checkLength(this.iToken+1);!this.chk&&0<b&&this.viewer.createModels(b);return;case 1074790550:this.checkLength(3);c=this.stringParameter(2);this.chk||this.viewer.setCurrentModelID(c);return;case 528397:b=0;this.checkLength(3);switch(this.getToken(2).tok){case 2:case 3:b=Clazz.floatToLong(1E3*this.floatParameter(2));break;default:this.error(20)}this.chk||this.viewer.setFrameDelayMs(b);
return;case 1073742166:0<this.checkLength23()&&(this.chk||this.viewer.setFrameTitleObj(2==this.slen?"@{_modelName}":7==this.tokAt(2)?J.script.SV.listValue(this.st[2]):this.parameterAsString(2)));return;case 1073741832:b=2==this.slen||1048587==this.tokAt(2)?null:this.atomExpressionAt(2);this.chk||this.viewer.setFrameOffsets(b);return}if(269484192==this.getToken(a).tok)++a,(2!=this.getToken(this.checkLast(a)).tok||1!=this.intParameter(a))&&this.error(22),this.chk||this.viewer.setAnimation(1073742108);
else{var e=!1,f=!1,g=!1,h=!1,j=[-1,-1],k=0,m=0,l=this.viewer.haveFileSet();for(d=a;d<this.slen;d++)switch(this.getToken(d).tok){case 1048579:case 269484209:this.checkLength(a+(f?2:1));g=!0;break;case 269484192:1!=k&&this.error(22);h=!0;break;case 1048587:this.checkLength(a+1);break;case 3:if(b=!1,0>(m=this.floatParameter(d))){this.checkLength(d+1);this.chk||this.viewer.morph(-m);return}case 2:case 4:2==k&&this.error(22);c=4==this.theTok?J.script.ScriptEvaluator.getFloatEncodedInt(this.theToken.value):
this.theToken.intValue;0>c&&1==k&&(h=!0,c=-c,l&&1E6>c&&(c*=1E6));3==this.theTok&&(l&&m==Clazz.floatToInt(m))&&(c=1E6*Clazz.floatToInt(m));if(2147483647==c){if(1==d&&(c=this.theToken.value.toString(),c=this.chk?-1:this.viewer.getModelIndexFromId(c),0<=c)){this.checkLength(2);this.viewer.setCurrentModelIndex(c);return}c=0}if(-1==c){this.checkLength(a+1);this.chk||this.viewer.setAnimation(1073742108);return}1E3<=c&&(1E6>c&&l)&&(c=1E6*Clazz.doubleToInt(c/1E3)+c%1E3);!b&&(0==c&&0==k)&&(g=!0);1E6<=c&&(b=
!1);j[k++]=c;break;case 1073742096:e=!0;break;case 1073742114:f=!0;break;default:this.frameControl(a);return}f&&0==k&&(g=!0);if(!this.chk)if(g)this.viewer.setAnimationOn(!1),this.viewer.setAnimationRange(-1,-1),f||this.viewer.setCurrentModelIndex(-1);else{2==k&&!f&&(h=!0);if(l)b=!1;else if(b)for(d=0;d<k;d++)0<=j[d]&&(j[d]%=1E6);c=this.viewer.getModelNumberIndex(j[0],b,!1);a=-1;if(l&&0>c&&0!=j[0])if(1E6>j[0]&&(j[0]*=1E6),2==k&&1E6>j[1]&&(j[1]*=1E6),0==j[0]%1E6)j[0]++,c=this.viewer.getModelNumberIndex(j[0],
!1,!1),0<=c&&(a=this.viewer.getModelNumberIndex(1==k?j[0]+1E6:0==j[1]?-1:0==j[1]%1E6?j[1]+1000001:j[1]+1,!1,!1),0>a&&(a=this.viewer.getModelCount()),a--,f?k=2:!h&&a!=c&&(h=!0),f=f||c==a);else return;(!e&&!f||0<=c)&&this.viewer.setCurrentModelIndexClear(c,!1);if(e&&2==k||f||h)0>a&&(a=this.viewer.getModelNumberIndex(j[1],b,!1)),this.viewer.setAnimationOn(!1),this.viewer.setAnimationDirection(1),this.viewer.setAnimationRange(c,a),this.viewer.setCurrentModelIndexClear(h&&!f?-1:0<=c?c:0,!1);e&&this.viewer.setAnimation(266287)}}}},
$fz.isPrivate=!0,$fz),"~N");$_M(c$,"bitSetForModelFileNumber",function(a){var b=J.util.BSUtil.newBitSet(this.viewer.getAtomCount());if(this.chk)return b;var c=this.viewer.getModelCount(),d=this.viewer.haveFileSet();1E6>a&&d&&(a*=1E6);if(0==a%1E6){d=this.viewer.getModelNumberIndex(a+1,!1,!1);if(0>d)return b;a=0==a?c:this.viewer.getModelNumberIndex(a+1000001,!1,!1);0>d&&(d=0);0>a&&(a=c);this.viewer.isTrajectory(d)&&(a=d+1);for(c=d;c<a;c++)b.or(this.viewer.getModelUndeletedAtomsBitSet(c))}else c=this.viewer.getModelNumberIndex(a,
!1,!0),0<=c&&b.or(this.viewer.getModelUndeletedAtomsBitSet(c));return b},"~N");$_M(c$,"frameControl",($fz=function(a){switch(this.getToken(this.checkLast(a)).tok){case 1073742098:case 1073742096:case 266287:case 20487:case 1073742037:case 1073742108:case 1073742126:case 1073741942:case 1073741993:this.chk||this.viewer.setAnimation(this.theTok);return}this.error(22)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getShapeType",($fz=function(a){a=J.viewer.JC.shapeTokenIndex(a);0>a&&this.error(49);return a},$fz.isPrivate=
!0,$fz),"~N");$_M(c$,"font",($fz=function(a,b){var c="SansSerif",d="Plain",e=0,f=-1;switch(this.iToken=this.slen){case 6:f=this.floatParameter(5),5<=f&&(f=this.viewer.getZoomSetting()/f/this.viewer.getScalePixelsPerAngstrom(!1));case 5:1073741824!=this.getToken(4).tok&&this.error(22),d=this.parameterAsString(4);case 4:1073741824!=this.getToken(3).tok&&this.error(22);c=this.parameterAsString(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+=e=5);break;default:if(5==a){b=13;break}this.error(2)}5==a&&((0>b||1<=b&&(6>b||63<b))&&this.integerOutOfRange(6-e,63-e),this.setShapeProperty(5,"setDefaults",this.viewer.getNoneSelected()));this.chk||(0<=J.util.GData.getFontStyleID(c)&&(d=c,c="SansSerif"),c=this.viewer.getFont3D(c,d,b),this.sm.loadShape(a),this.setShapeProperty(a,"font",c),0<=f&&this.setShapeProperty(a,
"scalereference",Float.$valueOf(f)))},$fz.isPrivate=!0,$fz),"~N,~N");$_M(c$,"set",($fz=function(){if(1==this.slen)this.showString(this.viewer.getAllSettings(null));else{var a=this.parameterAsString(0).equals("set"),b=this.optParameterAsString(1);if(a&&2==this.slen&&0<=b.indexOf("?"))this.showString(this.viewer.getAllSettings(b.substring(0,b.indexOf("?"))));else{var c=this.getToken(1).tok,d=0,e,f=2147483647,g=!this.chk&&!this.tQuiet&&this.scriptLevel<=this.scriptReportingLevel&&!this.st[0].value.equals("var");
switch(c){case 1611272194:this.axes(2);return;case 1610616835:this.background(2);return;case 1679429641:this.boundbox(2);return;case 1611272202:this.frank(2);return;case 1610616855:this.history(2);return;case 1826248715:this.label(2);return;case 1614417948:this.unitcell(2);return;case 536870920:this.sm.loadShape(8);this.setShapeProperty(8,"highlight",1048588==this.tokAt(2)?null:this.atomExpressionAt(2));return;case 1610625028:case 1611141171:this.selectionHalo(2);return;case 536875070:this.timeout(2);
return}switch(c){case 1641025539:g=J.constant.EnumStructure.getProteinStructureType(this.parameterAsString(2));g===J.constant.EnumStructure.NOT&&this.error(22);a=this.floatParameterSet(3,0,2147483647);0!=a.length%4&&this.error(22);this.viewer.setStructureList(a,g);this.checkLast(this.iToken);return;case 545259526:f=this.getArgbParam(2);this.chk||this.setObjectArgb("axes",f);return;case 1610612737:this.setBondmode();return;case 536870916:if(this.chk)return;a=1048588==this.tokAt(2)||2==this.tokAt(2)&&
0==this.intParameter(2)?4:5;J.util.Logger.setLogLevel(a);this.setIntProperty("logLevel",a);4==a&&(this.viewer.setDebugScript(!1),g&&this.viewer.showParameter("debugScript",!0,80));this.setDebugging();g&&this.viewer.showParameter("logLevel",!0,80);return;case 537022465:this.setEcho();return;case 1610612738:this.font(5,2==this.checkLength23()?0:this.floatParameter(2));return;case 1612189718:this.setHbond();return;case 1746538509:case 537006096:this.setMonitor();return;case 1611141176:this.setSsbond();
return;case 1610612741:this.setLabel("toggle");return;case 536870930:this.setUserColors();return;case 553648188:this.setZslab();return}var h=!0;switch(c){case 536870914:if(2<this.slen){a=this.stringSetting(2,!1);g=!1;0>a.indexOf(".")?(a=J.util.Parser.parseInt(a),g=!0):a=J.script.ScriptEvaluator.getFloatEncodedInt(a);if(this.chk)return;g=this.viewer.getModelNumberIndex(a,g,!0);this.viewer.setBackgroundModelIndex(g);return}break;case 1649412112:if(this.chk)return;this.viewer.setAtomProperty(this.viewer.getModelUndeletedAtomsBitSet(-1),
1649412112,-1,NaN,null,null,null);switch(this.tokAt(2)){case 1073742109: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}d=545259555;case 545259555:2<this.slen&&(e=3==this.slen&&
null==J.constant.EnumVdw.getVdwType(this.parameterAsString(2))?this.stringSetting(2,!1):this.parameterAsString(2),null==J.constant.EnumVdw.getVdwType(e)&&this.error(22),this.setStringProperty(b,e));break;case 536870918:2<this.slen&&(e=this.parameterExpressionToken(2),8==e.tok?e=e.value:(e=e.asInt(),e=555>e?new J.util.P3:this.viewer.getSymmetry().ijkToPoint3f(e+111)),this.chk||this.viewer.setDefaultLattice(e));break;case 545259552:case 545259545:2<this.slen&&(e=1073741992==(this.theTok=this.tokAt(2))||
1073742116==this.theTok?this.parameterAsString(this.checkLast(2)):this.stringSetting(2,!1),this.setStringProperty(b,e));break;case 1632634889:f=this.intSetting(2);-2147483648==f&&this.error(22);this.chk||this.viewer.setFormalCharges(f);return;case 553648148:f=this.intSetting(2);this.chk||(-2147483648!=f&&(this.commandHistoryLevelMax=f),this.setIntProperty(b,f));break;case 545259564:2<this.slen&&this.setStringProperty(b,this.stringSetting(2,a));break;case 545259568:case 545259558:2<this.slen&&this.setUnits(this.stringSetting(2,
a),c);break;case 545259572:this.chk||this.viewer.setPicked(-1);if(2<this.slen){this.setPicking();return}break;case 545259574:if(2<this.slen){this.setPickingStyle();return}break;case 1716520973:break;case 553648168:f=this.intSetting(2);!this.chk&&-2147483648!=f&&this.setIntProperty(b,this.scriptReportingLevel=f);break;case 536870924:f=this.intSetting(2);if(-2147483648==f||0==f||1==f){h=!1;break}c=553648174;b="specularPercent";this.setIntProperty(b,f);break;case 1650071565:c=553648178;b="strandCount";
this.setIntProperty(b,this.intSetting(2));break;default:h=!1}if(!h||g){var j=!h&&!a&&null!=this.getContextVariableAsVariable(b);if(!h&&!j)switch(c){case 1678770178:d=603979928;break;case 1613758470:d=603979908;break;case 1613758476:d=603979910;break;case 1610612739:d=603979878;break;case 1666189314:d=570425394;this.setFloatProperty("solventProbeRadius",this.floatSetting(2));h=!0;break;case 1610612740:d=570425390;break;case 1613758488:d=603979948;break;case 1766856708:d=545259545;break;case 1611141175:e=
this.parameterAsString(2).toLowerCase();switch("x;y;z;fps".indexOf(e+";")){case 0:d=570425398;break;case 2:d=570425400;break;case 4:d=570425402;break;case 6:d=570425396;break;default:this.errorStr2(50,"set SPIN ",e)}this.chk||this.viewer.setSpin(e,Clazz.floatToInt(this.floatParameter(this.checkLast(3))));h=!0}if(0!=d)b=J.script.T.nameOf(c=d);else if(!h&&!j){(0==b.length||"_"==b.charAt(0))&&this.error(56);d=b.toLowerCase();if(0==d.indexOf("label")&&J.util.Parser.isOneOf(b.substring(5).toLowerCase(),
"front;group;atom;offset;offsetexact;pointer;alignment;toggle;scalereference")&&this.setLabel(b.substring(5)))return;d.endsWith("callback")&&(c=536870912)}a&&!J.script.T.tokAttr(c,536870912)&&(this.iToken=1,this.isStateScript||this.errorStr2(50,"SET",b),this.warning(51,"SET",b));if(!h&&a)switch(this.slen){case 2:this.setBooleanProperty(b,!0);h=!0;break;case 3:2147483647!=f&&(this.setIntProperty(b,f),h=!0)}!h&&(!a&&1048587==this.tokAt(2))&&(this.chk||this.viewer.removeUserVariable(b.toLowerCase()),
h=!0);if(!h&&(f=1048577==this.tokAt(1)?0:this.tokAt(2),c=this.st[0].intValue,e=269484436==f?3:61==c&&!b.equals("return")&&269484436!=f?0:2,this.setVariable(e,0,b,c),!a))return;g&&this.viewer.showParameter(b,!0,80)}}}},$fz.isPrivate=!0,$fz));$_M(c$,"setZslab",($fz=function(){var a=null;this.isFloatParameter(2)?(this.checkLength(3),this.setIntProperty("zSlab",Clazz.floatToInt(this.floatParameter(2)))):(this.isCenterParameter(2)||this.error(22),a=this.centerParameter(2),this.checkLength(this.iToken+
1));this.chk||this.viewer.setZslabPoint(a)},$fz.isPrivate=!0,$fz));$_M(c$,"setBondmode",($fz=function(){var a=!1;switch(this.getToken(this.checkLast(2)).tok){case 269484128:break;case 269484112:a=!0;break;default:this.error(22)}this.setBooleanProperty("bondModeOr",a)},$fz.isPrivate=!0,$fz));$_M(c$,"setEcho",($fz=function(){var a=null,b=null,c=null,d=!0,e=2;switch(this.getToken(2).tok){case 1048588:c=a="allOff";this.checkLength(++e);break;case 1048587:d=!1;case 1048579:c=this.parameterAsString(2);
this.checkLength(++e);break;case 1073741996:case 12289:case 1073742128:case 1074790748:case 1073742019:case 1073741871:case 1073741824:case 4:case 1074790550:1074790550==this.theTok&&e++,c=this.parameterAsString(e++)}this.chk||(this.viewer.setEchoStateActive(d),this.sm.loadShape(30),null!=c&&this.setShapeProperty(30,null==a?"target":a,c));if(e<this.slen)switch(this.getToken(e++).tok){case 1073741832:a="align";switch(this.getToken(e).tok){case 1073741996:case 1073742128:case 12289:b=this.parameterAsString(e++);
break;default:this.error(22)}break;case 12289:case 1073741996:case 1073742128:a="align";b=this.parameterAsString(e-1);break;case 554176526:a="%zpos";b=Integer.$valueOf(Clazz.floatToInt(this.floatParameter(e++)));break;case 1610625028:case 3145768:case 1048589:a="hidden";b=Boolean.FALSE;break;case 12294:case 3145770:a="hidden";b=Boolean.TRUE;break;case 1095766028:b=this.chk?0:this.modelNumberParameter(e++);b>=this.viewer.getModelCount()&&this.error(22);a="model";b=Integer.$valueOf(b);break;case 269484096:case 1073742195:a=
"xypos";b=this.xypParameter(--e);null==b?e--:e=this.iToken+1;break;case 2:e--;c=this.intParameter(e++);d="xpos";269484210==this.tokAt(e)&&(d="%xpos",e++);a="ypos";b=Integer.$valueOf(this.intParameter(e++));269484210==this.tokAt(e)&&(a="%ypos",e++);this.checkLength(e);this.setShapeProperty(30,d,Integer.$valueOf(c));break;case 1048588:a="off";break;case 1073742138:a="scale";b=Float.$valueOf(this.floatParameter(e++));break;case 135271429:a="script";b=this.parameterAsString(e++);break;case 4:case 1073741979:(a=
1073741979==this.theTok)&&e++;this.checkLength(e);null==c&&a&&(b=Array(1),this.getShapePropertyData(30,"currentTarget",b),c=b[0]);this.echo(e-1,c,a);return;default:if(this.isCenterParameter(e-1)){a="xyz";b=this.centerParameter(e-1);e=this.iToken+1;break}this.error(22)}this.checkLength(e);!this.chk&&null!=a&&this.setShapeProperty(30,a,b)},$fz.isPrivate=!0,$fz));$_M(c$,"intSetting",($fz=function(a){return a==this.slen?-2147483648:this.parameterExpressionToken(a).asInt()},$fz.isPrivate=!0,$fz),"~N");
$_M(c$,"floatSetting",($fz=function(a){return a==this.slen?NaN:J.script.SV.fValue(this.parameterExpressionToken(a))},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"stringSetting",($fz=function(a,b){return b&&this.slen==a+1?this.parameterAsString(a):this.parameterExpressionToken(a).asString()},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"setLabel",($fz=function(a){this.sm.loadShape(5);var b=null;for(this.setShapeProperty(5,"setDefaults",this.viewer.getNoneSelected());;){if(a.equals("scalereference")){b=this.floatParameter(2);
5<=b&&(b=this.viewer.getZoomSetting()/b/this.viewer.getScalePixelsPerAngstrom(!1));b=Float.$valueOf(b);break}if(a.equals("offset")||a.equals("offsetexact")){if(this.isPoint3f(2))b=this.getPoint3f(2,!1),b=[1,b.x,b.y,b.z,0,0,0];else if(this.isArrayParameter(2))b=this.floatParameterSet(2,7,7);else var b=this.intParameterRange(2,-127,127),c=this.intParameterRange(3,-127,127),b=Integer.$valueOf(J.shape.Object2d.getOffset(b,c));break}if(a.equals("alignment")){switch(this.getToken(2).tok){case 1073741996:case 1073742128:case 12289:a=
"align";b=this.theToken.value;break;default:this.error(22)}break}if(a.equals("pointer")){b=0;switch(this.getToken(2).tok){case 1048588:case 1048587:break;case 1610616835:b|=2;case 1048589:b|=1;break;default:this.error(22)}b=Integer.$valueOf(b);break}if(a.equals("toggle"))return this.iToken=1,c=2==this.slen?null:this.atomExpressionAt(2),this.checkLast(this.iToken),this.chk||this.viewer.togglePickingLabel(c),!0;this.iToken=1;b=2==this.slen||1048589==this.getToken(2).tok;if(a.equals("front")||a.equals("group")){!b&&
1048588!=this.tokAt(2)&&this.error(22);b||(a="front");b=b?Boolean.TRUE:Boolean.FALSE;break}if(a.equals("atom")){!b&&1048588!=this.tokAt(2)&&this.error(22);a="front";b=b?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},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"setMonitor",($fz=function(){var a=this.tokAt(this.checkLast(2));
switch(a){case 1048589:case 1048588:this.setBooleanProperty("measurementlabels",1048589==a);return;case 1073741926:case 2:case 3:this.setShapeSizeBs(6,this.getSetAxesTypeMad(2),null);return}this.setUnits(this.parameterAsString(2),545259568)},$fz.isPrivate=!0,$fz));$_M(c$,"setUnits",($fz=function(a,b){545259568==b&&J.util.Parser.isOneOf(a.toLowerCase(),"angstroms;au;bohr;nanometers;nm;picometers;pm;vanderwaals;vdw")?this.chk||this.viewer.setUnits(a,!0):545259558==b&&J.util.Parser.isOneOf(a.toLowerCase(),
"kcal;kj")?this.chk||this.viewer.setUnits(a,!1):this.errorStr2(50,"set "+J.script.T.nameOf(b),a);return!0},$fz.isPrivate=!0,$fz),"~S,~N");$_M(c$,"setSsbond",($fz=function(){var a=!1;switch(this.tokAt(this.checkLast(2))){case 1115297793:a=!0;break;case 3145754:break;default:this.error(22)}this.setBooleanProperty("ssbondsBackbone",a)},$fz.isPrivate=!0,$fz));$_M(c$,"setHbond",($fz=function(){var a=!1;switch(this.tokAt(this.checkLast(2))){case 1115297793:a=!0;case 3145754:this.setBooleanProperty("hbondsBackbone",
a);break;case 1073742150:a=!0;case 1073741926:this.setBooleanProperty("hbondsSolid",a);break;default:this.error(22)}},$fz.isPrivate=!0,$fz));$_M(c$,"setPicking",($fz=function(){if(2==this.slen)this.setStringProperty("picking","identify");else if(4<this.slen||4==this.tokAt(2))this.setStringProperty("picking",this.stringSetting(2,!1));else{var a=2,b="SELECT";switch(this.getToken(2).tok){case 135280132:case 1746538509:case 1611141175:4==this.checkLength34()&&(b=this.parameterAsString(2).toUpperCase(),
b.equals("SPIN")?this.setIntProperty("pickingSpinRate",this.intParameter(3)):a=3);break;case 12291:break;default:this.checkLength(3)}var c=this.parameterAsString(a);switch(this.getToken(a).tok){case 1048589:case 1073742056:c="identify";break;case 1048588:case 1048587:c="off";break;case 135280132:c="atom";break;case 1826248715:c="label";break;case 1678770178:c="bond";break;case 12291:this.checkLength(4),1678770178!=this.tokAt(3)&&this.error(22),c="deleteBond"}var d=0<=(d=c.indexOf("_"))?d:c.length,
d=J.viewer.ActionManager.getPickingMode(c.substring(0,d));0>d&&this.errorStr2(50,"SET PICKING "+b,c);this.setStringProperty("picking",c)}},$fz.isPrivate=!0,$fz));$_M(c$,"setPickingStyle",($fz=function(){if(4<this.slen||4==this.tokAt(2))this.setStringProperty("pickingStyle",this.stringSetting(2,!1));else{var a=2,b=!1,c="SELECT";switch(this.getToken(2).tok){case 1746538509:b=!0,c="MEASURE";case 135280132:4==this.checkLength34()&&(a=3);break;default:this.checkLength(3)}var d=this.parameterAsString(a);
switch(this.getToken(a).tok){case 1048587:case 1048588:d=b?"measureoff":"toggle";break;case 1048589:b&&(d="measure")}0>J.viewer.ActionManager.getPickingStyleIndex(d)&&this.errorStr2(50,"SET PICKINGSTYLE "+c,d);this.setStringProperty("pickingStyle",d)}},$fz.isPrivate=!0,$fz));$_M(c$,"timeout",($fz=function(a){var b=null,c=null,d=0;if(this.slen==a)this.showString(this.viewer.showTimeout(null));else{for(;a<this.slen;a++)switch(this.getToken(a).tok){case 1074790550:b=this.parameterAsString(++a);if(3==
this.slen){this.chk||this.viewer.triggerTimeout(b);return}break;case 1048588:break;case 2:d=this.intParameter(a);break;case 3:d=Math.round(1E3*this.floatParameter(a));break;default:null==b?b=this.parameterAsString(a):null==c?c=this.parameterAsString(a):this.error(22)}this.chk||this.viewer.setTimeout(b,d,c)}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setUserColors",($fz=function(){for(var a=new J.util.JmolList,b=2;b<this.slen;b++){var c=this.getArgbParam(b);a.addLast(Integer.$valueOf(c));b=this.iToken}if(!this.chk){b=
a.size();for(c=Clazz.newIntArray(b,0);0<=--b;)c[b]=a.get(b).intValue();this.viewer.setUserScale(c)}},$fz.isPrivate=!0,$fz));$_M(c$,"setVariable",($fz=function(a,b,c,d){var e=null,f="",g=0,h=91==d,j=!1,k=!1,m=c.startsWith("property_");d=m?null:this.getContextVariableAsVariable(c);var l=null!=d;0<a&&1048577==this.tokAt(a-1)&&(e=this.atomExpressionAt(a-1),a=this.iToken+1,k=!0);1048584==this.tokAt(a)&&(j=!0,f=this.getBitsetPropertySelector(++a,!0),null==f&&this.error(22),269484436!=this.tokAt(++a)&&this.error(22),
a++,g=f.intValue,f=f.value);k&&!j&&this.error(22);a=this.parameterExpression(a,b,c,!0,!0,-1,h,null,null);b=a.size();(0==b||!h&&1<b||h&&(3>b||1!=b%2))&&this.error(22);if(!this.chk){b=a.get(h?a.size()-1:0);if(!l&&!k&&!m&&(h||j||!Clazz.instanceOf(b.value,String)&&!(2==b.tok||Clazz.instanceOf(b.value,Integer)||Clazz.instanceOf(b.value,Float)||Clazz.instanceOf(b.value,Boolean))))c.startsWith("_")&&this.errorStr(22,c),d=this.viewer.getOrSetNewVariable(c,!0),l=!0;if(h){c=J.script.SV.newVariable(4,"").setv(b,
!1);e=Clazz.doubleToInt(a.size()/2);for(g=0;g<e;g++)if(f=g+1==e,h=a.get(2*g),10==d.tok&&(d.tok=6,d.value=new java.util.Hashtable),6==d.tok){h=h.asString();d=d.value;if(f){d.put(h,c);break}d=d.get(h)}else{h=h.asInt();7==d.tok&&(d=J.script.SV.selectItemVar(d));switch(d.tok){case 7:j=d.getList();if(h>j.size()||f)break;0>=h&&(h=j.size()+h);0>--h&&(h=0);d=j.get(h);continue;case 11:case 12:f=11==d.tok?3:4;if(1==e&&1<=Math.abs(h)&&Math.abs(h)<=f&&7==c.tok&&c.getList().size()==f)break;if(2==e&&(j=a.get(2).asInt(),
1<=j&&j<=f&&(2==c.tok||3==c.tok))){h=10*h+j;break}d.toArray();--g;continue}d.setSelectedValue(h,c);break}}else j?(k||(e=J.script.SV.getBitSet(d,!0),null==e&&this.error(22)),f.startsWith("property_")?this.viewer.setData(f,[f,7==b.tok?J.script.SV.flistValue(b,b.value.size()==e.cardinality()?e.cardinality():this.viewer.getAtomCount()):b.asString(),J.util.BSUtil.copy(e),Integer.$valueOf(7==b.tok?1:0)],this.viewer.getAtomCount(),0,0,7==b.tok?2147483647:-2147483648,0):this.setBitsetProperty(e,g,b.asInt(),
b.asFloat(),b)):l?d.setv(b,!1):(h=J.script.SV.oValue(b),c.startsWith("property_")?(7==b.tok&&(h=b.asString()),this.viewer.setData(c,[c,""+h,J.util.BSUtil.copy(this.viewer.getSelectionSet(!1)),Integer.$valueOf(0)],this.viewer.getAtomCount(),0,0,-2147483648,0)):Clazz.instanceOf(h,Boolean)?this.setBooleanProperty(c,h.booleanValue()):Clazz.instanceOf(h,Integer)?this.setIntProperty(c,h.intValue()):Clazz.instanceOf(h,Float)?this.setFloatProperty(c,h.floatValue()):Clazz.instanceOf(h,String)?this.setStringProperty(c,
h):Clazz.instanceOf(h,J.modelset.Bond.BondSet)?this.setStringProperty(c,J.util.Escape.eBond(h)):Clazz.instanceOf(h,J.util.BS)||Clazz.instanceOf(h,J.util.P3)||Clazz.instanceOf(h,J.util.P4)?this.setStringProperty(c,J.util.Escape.e(h)):J.util.Logger.error("ERROR -- return from propertyExpression was "+h))}},$fz.isPrivate=!0,$fz),"~N,~N,~S,~N");$_M(c$,"axes",($fz=function(a){var b=this.checkTicks(a,!0,!0,!1);a=this.iToken+1;var c=this.tokAt(a),d=this.optParameterAsString(a).toLowerCase();if(this.slen==
a+1&&J.util.Parser.isOneOf(d,"window;unitcell;molecular"))this.setBooleanProperty("axes"+d,!0);else{switch(c){case 12289:a=this.centerParameter(a+1);this.setShapeProperty(31,"origin",a);this.checkLast(this.iToken);return;case 1073742138:this.setFloatProperty("axesScale",this.floatParameter(this.checkLast(++a)));return;case 1826248715:switch(c=this.tokAt(a+1)){case 1048588:case 1048589:this.checkLength(a+2);this.setShapeProperty(31,"labels"+(1048589==c?"On":"Off"),null);return}b=null;switch(this.slen-
a){case 7:this.setShapeProperty(31,"labels",[this.parameterAsString(++a),this.parameterAsString(++a),this.parameterAsString(++a),this.parameterAsString(++a),this.parameterAsString(++a),this.parameterAsString(++a)]);break;case 5:b=this.parameterAsString(a+4);case 4:this.setShapeProperty(31,"labels",[this.parameterAsString(++a),this.parameterAsString(++a),this.parameterAsString(++a),b]);break;default:this.error(2)}return}d.equals("position")?(1048588==this.tokAt(++a)?a=new J.util.P3:(a=this.xypParameter(a),
null==a&&this.error(22)),this.setShapeProperty(31,"position",a)):(a=this.getSetAxesTypeMad(a),this.chk||(this.setObjectMad(31,"axes",a),null!=b&&this.setShapeProperty(31,"tickInfo",b)))}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"boundbox",($fz=function(a){var b=this.checkTicks(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.error(22),a++,a==this.slen)){this.chk||this.viewer.setBoundBox(null,null,!0,c);return}var d=1073741902==this.tokAt(a);
d&&a++;if(this.isCenterParameter(a)){this.expressionResult=null;var e=a,f=this.centerParameter(a);a=this.iToken+1;if(d||this.isCenterParameter(a))e=d?this.centerParameter(a):this.getPoint3f(a,!0),a=this.iToken+1,this.chk||this.viewer.setBoundBox(f,e,d,c);else if(null!=this.expressionResult&&Clazz.instanceOf(this.expressionResult,J.util.BS))this.chk||this.viewer.calcBoundBoxDimensions(this.expressionResult,c);else if(null==this.expressionResult&&1048583==this.tokAt(e)){if(this.chk)return;a=this.getObjectBoundingBox(this.objectNameParameter(++e));
null==a&&this.error(22);this.viewer.setBoundBox(a[0],a[1],!0,c);a=this.iToken+1}else this.error(22);if(a==this.slen)return}c=this.getSetAxesTypeMad(a);this.chk||(null!=b&&this.setShapeProperty(32,"tickInfo",b),this.setObjectMad(32,"boundbox",c))},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"checkTicks",($fz=function(a,b,c,d){this.iToken=a-1;if(1073742164!=this.tokAt(a))return null;var e=" ";switch(this.tokAt(a+1)){case 1112541205:case 1112541206:case 1112541207:e=this.parameterAsString(++a).toLowerCase();
break;case 1073741824:this.error(22)}if(1048587==this.tokAt(++a))return b=new J.modelset.TickInfo(null),b.type=e,this.iToken=a,b;b=new J.modelset.TickInfo(this.getPointOrPlane(a,!1,!0,!1,!1,3,3));if(this.coordinatesAreFractional||1614417948==this.tokAt(this.iToken+1))b.scale=J.util.P3.new3(NaN,NaN,NaN),c=!1;1614417948==this.tokAt(this.iToken+1)&&this.iToken++;b.type=e;1288701960==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=J.util.P3.new3(a,a,a)):b.scale=this.getPoint3f(this.iToken+2,!0));d&&1073741942==this.tokAt(this.iToken+1)&&(b.first=this.floatParameter(this.iToken+2));return b},$fz.isPrivate=!0,$fz),"~N,~B,~B,~B");$_M(c$,"unitcell",($fz=function(a){var b=2147483647,c=2147483647,d=null,e=this.checkTicks(a,!0,!1,!1);a=this.iToken;var f=null,g=null;switch(this.tokAt(a+1)){case 4:f=this.objectNameParameter(++a);break;case 1048583:a++;
f=this.objectNameParameter(++a);break;default:this.isArrayParameter(a+1)?(g=this.getPointArray(++a,4),a=this.iToken):this.slen==a+2?2==this.getToken(a+1).tok&&111<=this.intParameter(a+1)&&(b=this.intParameter(++a)):this.slen>a+1&&(d=this.getPointOrPlane(++a,!1,!0,!1,!0,3,3),a=this.iToken)}c=this.getSetAxesTypeMad(++a);this.checkLast(this.iToken);this.chk||(2147483647!=b?this.viewer.setCurrentUnitCellOffset(b):null!=f?this.viewer.setCurrentCage(f):null!=g&&this.viewer.setCurrentCagePts(g),this.setObjectMad(33,
"unitCell",c),null!=d&&this.viewer.setCurrentUnitCellOffsetPt(d),null!=e&&this.setShapeProperty(33,"tickInfo",e))},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"frank",($fz=function(a){this.setBooleanProperty("frank",this.booleanParameter(a))},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"selectionHalo",($fz=function(a){var b=!1;switch(a==this.slen?1048589:this.getToken(a).tok){case 1048589:case 1114638350:b=!0;case 1048588:case 1048587:case 1073742056:this.setBooleanProperty("selectionHalos",b);break;default:this.error(22)}},
$fz.isPrivate=!0,$fz),"~N");$_M(c$,"save",($fz=function(){if(1<this.slen){var a=this.optParameterAsString(2);switch(this.tokAt(1)){case 1073742132:this.chk||this.viewer.saveOrientation(a);return;case 1073742077:this.chk||this.viewer.saveOrientation(a);return;case 1678770178:this.chk||this.viewer.saveBonds(a);return;case 1073742158:this.chk||this.viewer.saveState(a);return;case 1641025539:this.chk||this.viewer.saveStructure(a);return;case 1048582:this.chk||this.viewer.saveCoordinates(a,this.viewer.getSelectionSet(!1));
return;case 1073742140:this.chk||this.viewer.saveSelection(a);return}}this.errorStr2(53,"SAVE","bonds? coordinates? orientation? selection? state? structure?")},$fz.isPrivate=!0,$fz));$_M(c$,"restore",($fz=function(){if(1<this.slen){var a=this.optParameterAsString(2);1073742077!=this.getToken(1).tok&&this.checkLength23();var b;switch(this.getToken(1).tok){case 1073742132:b=3<this.slen?this.floatParameter(3):0;0>b&&this.error(22);if(!this.chk&&(this.viewer.restoreRotation(a,b),this.isJS&&0<b&&this.viewer.global.waitForMoveTo))throw new J.script.ScriptInterruption(this,
"restoreRotation",1);return;case 1073742077:b=3<this.slen?this.floatParameter(3):0;0>b&&this.error(22);if(!this.chk&&(this.viewer.restoreOrientation(a,b),this.isJS&&0<b&&this.viewer.global.waitForMoveTo))throw new J.script.ScriptInterruption(this,"restoreOrientation",1);return;case 1678770178:this.chk||this.viewer.restoreBonds(a);return;case 1048582:if(this.chk)return;a=this.viewer.getSavedCoordinates(a);null==a&&this.error(22);this.runScript(a);this.viewer.checkCoordinatesChanged();return;case 1073742158:if(this.chk)return;
a=this.viewer.getSavedState(a);null==a&&this.error(22);this.runScript(a);return;case 1641025539:if(this.chk)return;a=this.viewer.getSavedStructure(a);null==a&&this.error(22);this.runScript(a);return;case 1073742140:this.chk||this.viewer.restoreSelection(a);return}}this.errorStr2(53,"RESTORE","bonds? coords? orientation? selection? state? structure?")},$fz.isPrivate=!0,$fz));$_M(c$,"write",function(a){var b=0,c=0,d,e;null==a?(a=this.st,b=c=1,d=!0,e=this.viewer.isApplet()&&!this.viewer.isSignedApplet()||
!this.viewer.isRestricted(J.viewer.Viewer.ACCESS.ALL)||0<this.viewer.getPathForAllFiles().length):(d=!1,e=!0);var f=d?this.slen:a.length,g=0,h=0,j=-1,k=-1,m=-2147483648,l=this.viewer.getExportDriverList(),s="PNGJ",p=null,r="",v=null,y=null,z=null,n=null,w=null,u=Array(1),t=!1,A=!1,G=!1,H=null,K=null,C="SPT",n=d&&1==a.length?1073741884:J.script.ScriptEvaluator.tokAtArray(b,a);switch(n){case 0:break;case 135271429:this.isArrayParameter(b+1)&&(K=this.stringParameterSet(++b),z=y=".",c=b=this.iToken+1,
n=this.tokAt(b));break;default:C=J.script.SV.sValue(this.tokenAt(b,a)).toUpperCase()}switch(n){case 135270417:case 1052714:case 1716520973:w=this.plot(a);if(!d)return w;break;case 1073741983:C="INLINE";p=J.script.SV.sValue(this.tokenAt(++b,a));b++;break;case 1073742102:C="PGRP";b++;r=J.script.SV.sValue(this.tokenAt(b,a)).toLowerCase();r.equals("draw")&&b++;break;case 1048582:b++;t=!0;break;case 1073742158:case 135271429:for(n=J.script.SV.sValue(this.tokenAt(++b,a)).toLowerCase();n.equals("localpath")||
n.equals("remotepath");)n.equals("localpath")?y=J.script.SV.sValue(this.tokenAt(++b,a)):z=J.script.SV.sValue(this.tokenAt(++b,a)),n=J.script.SV.sValue(this.tokenAt(++b,a)).toLowerCase();C="SPT";break;case 1229984263:case 135368713:case 1610616855:case 135180:case 1073742015:case 1073742018:case 1183762:case 135188:b++;break;case 1073741992:C="ZIPALL";b++;break;case 36868:C="VAR";b+=2;break;case 4115:case 1073741824:case 1073741979:case 1073742139:case 4:case 4166:switch(n){case 1073741979:b++;break;
case 4166:h=this.intParameterRange(++b,1,10);this.chk||(this.viewer.setVibrationOff(),this.isJS||this.viewer.delayScript(this,100));b++;break;case 4115:b+1<f&&1048577==a[++b].tok||10==a[b].tok?(n=this.atomExpression(a,b,0,!0,!1,!0,!0),b=this.iToken+1):n=this.viewer.getModelUndeletedAtomsBitSet(-1);this.chk||(H=this.viewer.getModelBitSet(n,!0));break;case 1073742139:n=J.script.SV.sValue(this.tokenAt(++b,a)).toUpperCase();J.util.Parser.isOneOf(n,"PNG;PNGJ")&&(s=n,b++);break;default:case 4:n=J.script.T.getTokenFromName(J.script.SV.sValue(a[b]).toLowerCase()),
null!=n&&(C=J.script.SV.sValue(n).toUpperCase()),J.util.Parser.isOneOf(C,l.toUpperCase())?(b++,C=C.substring(0,1).toUpperCase()+C.substring(1).toLowerCase(),A=!0,d&&(v="Jmol."+C)):C.equals("ZIP")?b++:C.equals("ZIPALL")?b++:C="(image)"}2==J.script.ScriptEvaluator.tokAtArray(b,a)&&(j=J.script.SV.iValue(this.tokenAt(b++,a)),k=J.script.SV.iValue(this.tokenAt(b++,a)))}if(null==w){n=J.script.SV.sValue(this.tokenAt(b,a));if(n.equalsIgnoreCase("clipboard")){if(this.chk)return""}else J.util.Parser.isOneOf(n.toLowerCase(),
"png;pngj;pngt;jpg;jpeg;jpg64;jpeg64")?(2==J.script.ScriptEvaluator.tokAtArray(b+1,a)&&2==J.script.ScriptEvaluator.tokAtArray(b+2,a)&&(j=J.script.SV.iValue(this.tokenAt(++b,a)),k=J.script.SV.iValue(this.tokenAt(++b,a))),2==J.script.ScriptEvaluator.tokAtArray(b+1,a)&&(m=J.script.SV.iValue(this.tokenAt(++b,a)))):J.util.Parser.isOneOf(n.toLowerCase(),"xyz;xyzrn;xyzvib;mol;sdf;v2000;v3000;cd;pdb;pqr;cml")&&(C=n.toUpperCase(),b+1==f&&b++);C.equals("(image)")&&J.util.Parser.isOneOf(n.toUpperCase(),"GIF;JPG;JPG64;JPEG;JPEG64;PNG;PNGJ;PNGT;PPM")&&
(C=n.toUpperCase(),b++);b+2==f&&(p=J.script.SV.sValue(this.tokenAt(++b,a)),0<p.length&&"."!=p.charAt(0)&&(C=n.toUpperCase()));switch(J.script.ScriptEvaluator.tokAtArray(b,a)){case 0:e=!0;break;case 1073741884:break;case 1073741824:case 4:v=J.script.SV.sValue(this.tokenAt(b,a));b==f-3&&1048584==J.script.ScriptEvaluator.tokAtArray(b+1,a)&&(v+="."+J.script.SV.sValue(this.tokenAt(b+2,a)));if("VAR"!==C&&b==c)C="IMAGE";else if(0<v.length&&"."==v.charAt(0)&&(b==c+1||b==c+2))v=J.script.SV.sValue(this.tokenAt(b-
1,a))+v,"VAR"!==C&&b==c+1&&(C="IMAGE");if(v.equalsIgnoreCase("clipboard")||!this.viewer.isRestricted(J.viewer.Viewer.ACCESS.ALL))v=null;break;default:this.error(22)}if(C.equals("IMAGE")||C.equals("FRAME")||C.equals("VIBRATION"))C=null!=v&&0<=v.indexOf(".")?v.substring(v.lastIndexOf(".")+1).toUpperCase():"JPG";C.equals("MNU")?C="MENU":C.equals("WRL")||C.equals("VRML")?(C="Vrml",A=!0):C.equals("X3D")?(C="X3d",A=!0):C.equals("IDTF")?(C="Idtf",A=!0):C.equals("MA")?(C="Maya",A=!0):C.equals("JS")?(C="Js",
A=!0):C.equals("OBJ")?(C="Obj",A=!0):C.equals("JVXL")?C="ISOSURFACE":C.equals("XJVXL")?C="ISOSURFACE":C.equals("JMOL")?C="ZIPALL":C.equals("HIS")&&(C="HISTORY");C.equals("COORD")&&(C=null!=v&&0<=v.indexOf(".")?v.substring(v.lastIndexOf(".")+1).toUpperCase():"XYZ");G=J.util.Parser.isOneOf(C,"GIF;JPEG64;JPEG;JPG64;JPG;PPM;PNG;PNGJ;PNGT;SCENE");null!=K&&(C.equals("PNG")&&(C="PNGJ"),!C.equals("PNGJ")&&!C.equals("ZIPALL")&&this.error(22));G&&e?C="JPG64":!G&&(!A&&!J.util.Parser.isOneOf(C,"SCENE;JMOL;ZIP;ZIPALL;SPT;HISTORY;MO;ISOSURFACE;MESH;PMESH;VAR;FILE;FUNCTION;CD;CML;XYZ;XYZRN;XYZVIB;MENU;MOL;PDB;PGRP;PQR;QUAT;RAMA;SDF;V2000;V3000;INLINE"))&&
this.errorStr2(54,"COORDS|FILE|FUNCTIONS|HISTORY|IMAGE|INLINE|ISOSURFACE|JMOL|MENU|MO|POINTGROUP|QUATERNION [w,x,y,z] [derivative]|RAMACHANDRAN|SPT|STATE|VAR x|ZIP|ZIPALL  CLIPBOARD","CML|GIF|JPG|JPG64|JMOL|JVXL|MESH|MOL|PDB|PMESH|PNG|PNGJ|PNGT|PPM|PQR|SDF|V2000|V3000|SPT|XJVXL|XYZ|XYZRN|XYZVIB|ZIP"+l.toUpperCase().$replace(";","|"));if(this.chk)return"";b=null;c=!1;if(null==p||A){p=C.intern();if(A){u[0]=v;p=this.viewer.generateOutputForExport(p,d||null!=v?u:null,j,k);if(null==p||0==p.length)return"";
if(!d)return p;(C.equals("Povray")||C.equals("Idtf"))&&null!=u[0]?(d=C.equals("Idtf")?".tex":".ini",v=u[0]+d,w=this.viewer.createImageSet(v,d,p,null,null,-2147483648,0,0,null,0,u),C.equals("Idtf")&&(p=p.substring(0,p.indexOf("\\begin{comment}"))),p="Created "+u[0]+":\n\n"+p):w=p;null!=w&&(w.startsWith("OK")||this.evalError(w,null),this.scriptStatusOrBuffer(p));return""}if("MENU"===p)p=this.viewer.getMenu("");else if("PGRP"===p)p=this.viewer.getPointGroupAsString(r.equals("draw"),null,0,1);else if("PDB"===
p||"PQR"===p)e?p=this.viewer.getPdbData(null,null):c=!0;else if("FILE"===p)e?p=this.viewer.getCurrentFileAsString():c=!0,"?".equals(v)&&(v="?Jmol."+this.viewer.getParameter("_fileType"));else if(("SDF"===p||"MOL"===p||"V2000"===p||"V3000"===p||"CD"===p)&&t)p=this.viewer.getModelExtract("selected",!0,!1,p),p.startsWith("ERROR:")&&(b=p);else if("XYZ"===p||"XYZRN"===p||"XYZVIB"===p||"MOL"===p||"SDF"===p||"V2000"===p||"V3000"===p||"CML"===p||"CD"===p)p=this.viewer.getData("selected",p),p.startsWith("ERROR:")&&
(b=p);else if("FUNCTION"===p)p=this.viewer.getFunctionCalls(null),C="TXT";else if("VAR"===p)p=this.getParameter(J.script.SV.sValue(this.tokenAt(d?2:1,a)),1073742190).asString(),C="TXT";else if("SPT"===p)if(t)a=this.viewer.getTaintedAtoms(2),this.viewer.setAtomCoordsRelative(J.util.P3.new3(0,0,0),null),p=this.viewer.getStateInfo(),this.viewer.setTaintedAtoms(a,2);else{if(p=this.viewer.getStateInfo(),null!=y||null!=z)p=J.viewer.FileManager.setScriptFileReferences(p,y,z,null)}else"ZIP"===p||"ZIPALL"===
p?(p=this.viewer.getStateInfo(),b=this.viewer.createZip(v,C,p,K)):"HISTORY"===p?(p=this.viewer.getSetHistory(2147483647),C="SPT"):"MO"===p?(p=this.getMoJvxl(2147483647),C="XJVXL"):"PMESH"===p?(null==(p=this.getIsosurfaceJvxl(!0,28))&&this.error(31),C="XJVXL"):"ISOSURFACE"===p||"MESH"===p?(null==(p=this.getIsosurfaceJvxl("MESH"===p,24))&&this.error(31),C=0<=p.indexOf("<?xml")?"XJVXL":"JVXL",e||this.showString(this.getShapeProperty(24,"jvxlFileInfo"))):(g=-1,0>m&&(m=-1));null==p&&!c&&(p="");0==g&&!c&&
(null==b||Clazz.instanceOf(b,String));G&&(this.refresh(),0>j&&(j=this.viewer.getScreenWidth()),0>k&&(k=this.viewer.getScreenHeight()))}if(!d)return p;if(e)return this.showStringPrint(p,!0),"";if(null!=b&&Clazz.instanceOf(b,String))return this.scriptStatusOrBuffer(b),b;if(C.equals("SCENE"))b=s;else if(null==b&&(!G||null!=v))b=p;w=c?this.viewer.streamFileData(v,C,r,0,null):this.viewer.createImageSet(v,C,Clazz.instanceOf(b,String)?b:null,Clazz.instanceOf(b,Array)?b:null,K,m,j,k,H,h,u)}return!this.chk&&
null!=w?(w.startsWith("OK")||this.evalError(w,null),this.scriptStatusOrBuffer(w+(G?"; width="+j+"; height="+k:"")),w):""},"~A");$_M(c$,"show",($fz=function(){var a=null,b=this.parameterAsString(1),c=null,d=null,e=2,f=this.getToken(1),d=Clazz.instanceOf(f,J.script.SV)?0:f.tok;4==d&&(f=J.script.T.getTokenFromName(b.toLowerCase()),null!=f&&(d=f.tok));1297090050!=d&&1073742158!=d&&this.checkLength(-3);if(2==this.slen&&0<=b.indexOf("?"))this.showString(this.viewer.getAllSettings(b.substring(0,b.indexOf("?"))));
else{switch(d){case 0:this.chk||(c=this.theToken.escape());break;case 135270422:this.chk||(c=J.util.Escape.e(this.viewer.cacheList()));break;case 1073741915:this.checkLength(2);this.chk||(c=this.viewer.calculateStructures(null,!0,!1));break;case 545259570:this.checkLength(2);this.chk||(c=this.viewer.getPathForAllFiles());break;case 1073742038:case 135267336:case 1073741929:case 1073741879:this.checkLength(1073741879==d?3:2);if(this.chk)return;c=this.viewer.getSmiles(0,0,this.viewer.getSelectionSet(!1),
!1,!0,!1,!1);switch(d){case 1073741929:if(0<c.length){this.viewer.show2D(c);return}c="Could not show drawing -- Either insufficient atoms are selected or the model is a PDB file.";break;case 1073742038:if(0<c.length){this.viewer.showNMR(c);return}c="Could not show nmr -- Either insufficient atoms are selected or the model is a PDB file.";break;case 1073741879:if(e=3,f=null,0<c.length){d="/";switch(this.getToken(2).tok){case 1073741977:d="I";break;case 1073741978:d="K";break;case 1073742035:d="N";
break;default:f=this.parameterAsString(2)}c=this.viewer.getChemicalInfo(c,d,f);0<=c.indexOf("FileNotFound")&&(c="?")}else c="Could not show name -- Either insufficient atoms are selected or the model is a PDB file."}break;case 1297090050:3<this.slen?(e=this.centerParameter(2),f=this.centerParameter(++this.iToken),this.chk||(c=this.viewer.getSymmetryOperation(null,0,e,f,!1)),e=++this.iToken):(e=2==this.checkLength23()?0:this.intParameter(2),this.chk||(c=this.viewer.getSymmetryOperation(null,e,null,
null,!1)),e=-3);break;case 1649412112:a=null;2<this.slen&&(a=J.constant.EnumVdw.getVdwType(this.parameterAsString(2)),null==a&&this.error(22));this.chk||this.showString(this.viewer.getDefaultVdwTypeNameOrData(0,a));return;case 135368713:this.checkLength23();this.chk||this.showString(this.viewer.getFunctionCalls(this.optParameterAsString(2)));return;case 1085443:this.checkLength(2);this.chk||this.showString(this.viewer.getAllSettings(null));return;case 1074790760:if(2==this.slen){this.chk||this.viewer.showUrl(this.getFullPathName());
return}d=this.parameterAsString(2);this.chk||this.viewer.showUrl(d);return;case 1766856708:b="defaultColorScheme";break;case 1610612740:b="scaleAngstromsPerInch";break;case 135270417:case 1052714:if(this.chk)return;0>this.viewer.getCurrentModelIndex()&&this.errorStr(30,"show "+this.theToken.value);c=this.plot(this.st);e=this.slen;break;case 1113200654:this.chk||(c=this.getContext(!1));break;case 1073741888:d=this.optParameterAsString(2);0<d.length&&(e=3);this.chk||(a=this.viewer.getColorSchemeList(d));
break;case 1073742192:this.chk||(c=this.viewer.getAtomDefs(this.definedAtomSets)+this.viewer.getVariableList()+this.getContext(!0));break;case 536870926:this.chk||(c=this.viewer.getTrajectoryState());break;case 553648148:a=""+this.commandHistoryLevelMax;break;case 553648150:a=""+J.util.Logger.getLogLevel();break;case 603979824:a=""+this.viewer.getBoolean(603979824);break;case 553648178:c="set strandCountForStrands "+this.viewer.getStrandCount(12)+"; set strandCountForMeshRibbon "+this.viewer.getStrandCount(13);
break;case 536875070:c=this.viewer.showTimeout(2==(e=this.slen)?null:this.parameterAsString(2));break;case 536870918:a=J.util.Escape.eP(this.viewer.getDefaultLattice());break;case 4126:this.chk||(c=this.viewer.getMinimizationInfo());break;case 1611272194:switch(this.viewer.getAxesMode()){case J.constant.EnumAxesMode.UNITCELL:c="set axesUnitcell";break;case J.constant.EnumAxesMode.BOUNDBOX:c="set axesWindow";break;default:c="set axesMolecular"}break;case 1610612737:c="set bondMode "+(this.viewer.getBoolean(603979812)?
"OR":"AND");break;case 1650071565:this.chk||(c="set strandCountForStrands "+this.viewer.getStrandCount(12)+"; set strandCountForMeshRibbon "+this.viewer.getStrandCount(13));break;case 1612189718:c="set hbondsBackbone "+this.viewer.getBoolean(603979852)+";set hbondsSolid "+this.viewer.getBoolean(603979854);break;case 1611141175:this.chk||(c=this.viewer.getSpinState());break;case 1611141176:c="set ssbondsBackbone "+this.viewer.getBoolean(603979952);break;case 1610625028:case 1611141171:c="selectionHalos "+
(this.viewer.getSelectionHaloEnabled(!1)?"ON":"OFF");break;case 1613758470:c="set selectHetero "+this.viewer.getBoolean(1613758470);break;case 1073741828:c=J.util.Escape.eAP(this.viewer.getAdditionalHydrogens(null,!0,!0,null));break;case 1613758476:c="set selectHydrogens "+this.viewer.getBoolean(1613758476);break;case 553648130:case 553648142:case 536870924:case 553648176:case 553648172:case 1073741995:this.chk||(c=this.viewer.getSpecularState());break;case 4146:this.chk||(c=this.viewer.listSavedStates());
break;case 1614417948:this.chk||(c=this.viewer.getUnitCellInfoText());break;case 1048582:if(2==(e=this.slen)){this.chk||(c=this.viewer.getCoordinateState(this.viewer.getSelectionSet(!1)));break}f=this.parameterAsString(2);this.chk||(c=this.viewer.getSavedCoordinates(f));break;case 1073742158:this.chk||this.viewer.clearConsole();if(2==(e=this.slen)){this.chk||(c=this.viewer.getStateInfo());break}d=this.parameterAsString(2);if(d.equals("/")&&4==(e=this.slen)){d=this.parameterAsString(3).toLowerCase();
if(!this.chk){for(var f=J.util.TextFormat.split(this.viewer.getStateInfo(),"\n"),c=new J.util.SB,g=0;g<f.length;g++)0<=f[g].toLowerCase().indexOf(d)&&c.append(f[g]).appendC("\n");c=c.toString()}break}else if(1229984263==this.tokAt(2)&&4==(e=this.slen)){this.chk||(c=this.viewer.getEmbeddedFileState(this.parameterAsString(3)));break}e=3;this.chk||(c=this.viewer.getSavedState(d));break;case 1641025539:if(2==(e=this.slen)){this.chk||(c=this.viewer.getProteinStructureState());break}f=this.parameterAsString(2);
this.chk||(c=this.viewer.getSavedStructure(f));break;case 135270407:d=3==(e=this.slen)?this.parameterAsString(2):null;this.chk||(c=null==d?this.$data:this.viewer.getData(d),c=null==c?"no data":J.util.Escape.encapsulateData(c[0],c[1],c[3].intValue()));break;case 1073742152:f=null;2==(e=this.slen)?this.chk||(f=this.viewer.getSpaceGroupInfo(null)):(d=this.parameterAsString(2),this.chk||(f=this.viewer.getSpaceGroupInfo(J.util.TextFormat.simpleReplace(d,"''",'"'))));null!=f&&(c=""+f.get("spaceGroupInfo")+
f.get("symmetryInfo"));break;case 1048583:e=3;c=this.setObjectProperty();break;case 1679429641:this.chk||(c=this.viewer.getBoundBoxCommand(!0));break;case 12289:this.chk||(c="center "+J.util.Escape.eP(this.viewer.getRotationCenter()));break;case 135176:this.chk||(c=this.getShapeProperty(22,"command"));break;case 1229984263:this.chk||this.viewer.clearConsole();if(2==this.slen){this.chk||(c=this.viewer.getCurrentFileAsString());null==c&&(c="<unavailable>");break}e=3;a=this.parameterAsString(2);this.chk||
(c=this.viewer.getFileAsString(a));break;case 4115:c=1048579==this.tokAt(2)&&0<(e=3)?this.viewer.getModelFileInfoAll():this.viewer.getModelFileInfo();break;case 1610616855:f=2==(e=this.slen)?2147483647:this.intParameter(2);1>f&&this.error(22);this.chk||(this.viewer.clearConsole(),0==this.scriptLevel&&this.viewer.removeCommand(),c=this.viewer.getSetHistory(f));break;case 135180:this.chk||(c=this.getShapeProperty(24,"jvxlDataXml"));break;case 1183762:this.optParameterAsString(2).equalsIgnoreCase("list")?
(c=this.viewer.getMoInfo(-1),e=3):(f=2==(e=this.slen)?-2147483648:this.intParameter(2),this.chk||(c=this.getMoJvxl(f)));break;case 1095766028:this.chk||(c=this.viewer.getModelInfoAsString());break;case 537006096:this.chk||(c=this.viewer.getMeasurementInfoAsString());break;case 1073742178:case 1073742132:case 4130:this.chk||(c=this.viewer.getOrientationText(d,null));break;case 1073742077:e=2;if(3<this.slen)break;switch(d=this.tokAt(2)){case 1073742178:case 1073742132:case 4130:case 0:this.chk||(c=
this.viewer.getOrientationText(d,null));break;default:d=this.optParameterAsString(2),c=this.viewer.getOrientationText(0,d)}e=this.slen;break;case 1073742088:this.chk||(c=this.viewer.getPDBHeader());break;case 1073742102:this.pointGroup();return;case 1089470478:this.chk||(c=this.viewer.getSymmetryInfoAsString());break;case 1073742176:this.chk||(c="transform:\n"+this.viewer.getTransformText());break;case 4168:c="zoom "+(this.viewer.getZoomEnabled()?""+this.viewer.getZoomSetting():"off");break;case 1611272202:c=
this.viewer.getShowFrank()?"frank ON":"frank OFF";break;case 1666189314:b="solventProbeRadius";break;case 1073741864:case 1087373316:case 1087373320:case 1073742120:case 1114638350:case 1087373318:case 1141899265:case 1073741982:c=this.viewer.getChimeInfo(d);break;case 537022465:case 1610612738:case 1716520973:case 20482:case 1613758488:a="?";break;case 1073741824:b.equalsIgnoreCase("fileHeader")?this.chk||(c=this.viewer.getPDBHeader()):b.equalsIgnoreCase("menu")?this.chk||(a=this.viewer.getMenu("")):
b.equalsIgnoreCase("mouse")&&(f=2==(e=this.slen)?null:this.parameterAsString(2),this.chk||(c=this.viewer.getBindingInfo(f)))}this.checkLength(e);this.chk||(null!=c?this.showString(c):null!=a?this.showString(b+" = "+a):null!=b&&(0<=b.indexOf(" ")?this.showString(b):this.showString(b+" = "+this.getParameterEscaped(b))))}},$fz.isPrivate=!0,$fz));$_M(c$,"getIsosurfaceJvxl",($fz=function(a,b){return this.chk?"":this.getShapeProperty(b,a?"jvxlMeshX":"jvxlDataXml")},$fz.isPrivate=!0,$fz),"~B,~N");$_M(c$,
"getMoJvxl",($fz=function(a){this.sm.loadShape(27);var b=this.viewer.getCurrentModelIndex();0>b&&this.errorStr(30,"MO isosurfaces");var c=this.viewer.getModelAuxiliaryInfoValue(b,"moData");null==c&&this.error(27);var d=this.getShapeProperty(27,"moNumber");(null==d||0==d.intValue())&&this.setShapeProperty(27,"init",Integer.$valueOf(b));this.setShapeProperty(27,"moData",c);return this.getShapePropertyIndex(27,"showMO",a)},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"cgo",($fz=function(){this.sm.loadShape(23);
if(!(1073742001==this.tokAt(1)&&this.listIsosurface(23))){for(var a=0,b=null!=this.initIsosurface(23),c=b&&null==this.getShapeProperty(23,"ID"),d=!1,e=!1,f=null,g=3.4028235E38,h=-2147483648,j=0,k=this.iToken;k<this.slen;++k){var m=null,l=null;switch(this.getToken(k).tok){case 7:case 269484096:case 1073742195:(null!=f||c)&&this.error(22);f=this.floatParameterSet(k,2,2147483647);k=this.iToken;continue;case 1073742138:++k>=this.slen&&this.error(34);switch(this.getToken(k).tok){case 2:j=this.intParameter(k);
continue;case 3:j=Math.round(100*this.floatParameter(k));continue}this.error(34);break;case 1766856708:case 1073742180:case 1073742074:1766856708!=this.theTok&&--k;1073742180==this.tokAt(k+1)?(k++,d=!0,this.isFloatParameter(k+1)&&(g=this.getTranslucentLevel(++k))):1073742074==this.tokAt(k+1)&&(k++,d=!0,g=0);this.isColorParam(k+1)?(h=this.getArgbParam(++k),k=this.iToken):d||this.error(22);b=!0;continue;case 1074790550:this.setShapeId(23,++k,b);c=null==this.getShapeProperty(23,"ID");k=this.iToken;break;
default:if(!this.setMeshDisplayProperty(23,0,this.theTok)){if(269484209==this.theTok||J.script.T.tokAttr(this.theTok,1073741824)){this.setShapeId(23,k,b);k=this.iToken;break}this.error(22)}0==a&&(a=k);k=this.iToken;continue}b=12291!=this.theTok;null!=f&&!e&&(m="points",l=Integer.$valueOf(j),e=!0,j=0);null!=m&&this.setShapeProperty(23,m,l)}this.finalizeObject(23,h,d?g:3.4028235E38,j,!0,f,a)}},$fz.isPrivate=!0,$fz));$_M(c$,"finalizeObject",($fz=function(a,b,c,d,e,f,g){e&&this.setShapeProperty(a,"set",
f);-2147483648!=b&&this.setShapeProperty(a,"color",Integer.$valueOf(b));3.4028235E38!=c&&this.setShapeTranslucency(a,"","translucent",c,null);0!=d&&this.setShapeProperty(a,"scale",Integer.$valueOf(d));0<g&&(this.setMeshDisplayProperty(a,g,0)||this.error(22))},$fz.isPrivate=!0,$fz),"~N,~N,~N,~N,~B,~O,~N");$_M(c$,"draw",($fz=function(){this.sm.loadShape(22);switch(this.tokAt(1)){case 1073742001:if(this.listIsosurface(22))return;break;case 1073742102:this.pointGroup();return;case 137363468:case 135270417:case 1052714:this.plot(this.st);
return}for(var a=!1,b=!1,c=!1,d=!1,e=!1,f=!1,g,h=0,j=3.4028235E38,k=-2147483648,m=0,l="",s=0,p=null,r=this.initIsosurface(22),v=(g=null!=r)&&null==this.getShapeProperty(22,"ID"),y=null,z=0,n=this.iToken;n<this.slen;++n){var w=null,u=null;switch(this.getToken(n).tok){case 1614417948:case 1679429641:if(this.chk)break;a=this.viewer.getPlaneIntersection(this.theTok,null,m/100,0);m=0;w="polygon";u=a;a=!0;break;case 4106:y=Clazz.newIntArray(4,0);z=4;a=this.floatParameterSet(++n,4,4);n=this.iToken;for(g=
0;4>g;g++)y[g]=Clazz.floatToInt(a[g]);a=!0;break;case 1678770178:case 1141899265:if(null==y||z>(1095761924==this.theTok?2:3))z=0,y=[-1,-1,-1,-1];y[z++]=this.atomExpressionAt(++n).nextSetBit(0);n=this.iToken;y[z++]=1678770178==this.theTok?this.atomExpressionAt(++n).nextSetBit(0):-1;n=this.iToken;a=!0;break;case 554176565:switch(this.getToken(++n).tok){case 1048583:w="slab";u=this.objectNameParameter(++n);n=this.iToken;a=!0;break;default:this.error(22)}break;case 135267842:switch(this.getToken(++n).tok){case 1614417948:case 1679429641:h=
this.theTok;e=!0;continue;case 1048583:w="intersect";u=this.objectNameParameter(++n);n=this.iToken;a=e=!0;break;default:this.error(22)}break;case 1073742106:var w="polygon",a=!0,u=new J.util.JmolList,t=0,A=0,G=null,H=null;if(this.isArrayParameter(++n))G=this.getPointArray(n,-1),t=G.length;else{t=Math.max(0,this.intParameter(n));G=Array(t);for(g=0;g<t;g++)G[g]=this.centerParameter(++this.iToken)}switch(this.getToken(++this.iToken).tok){case 11:case 12:n=J.script.SV.newScriptVariableToken(this.theToken);
n.toArray();H=n.getList();A=H.size();break;case 7:H=this.theToken.getList();A=H.size();break;default:A=Math.max(0,this.intParameter(this.iToken))}n=J.util.ArrayUtil.newInt2(A);for(g=0;g<A;g++){var K=null==H?this.floatParameterSet(++this.iToken,3,4):J.script.SV.flistValue(H.get(g),0);(3>K.length||4<K.length)&&this.error(22);n[g]=[Clazz.floatToInt(K[0]),Clazz.floatToInt(K[1]),Clazz.floatToInt(K[2]),3==K.length?7:Clazz.floatToInt(K[3])]}0<t?(u.addLast(G),u.addLast(n)):u=null;n=this.iToken;break;case 1297090050:b=
null;c=0;d=null;switch(this.tokAt(++n)){case 4:b=this.stringParameter(n);break;case 12:b=J.script.SV.sValue(this.getToken(n));break;default:this.isCenterParameter(n)||(c=this.intParameter(n++));this.isCenterParameter(n)&&(p=this.centerParameter(n));this.isCenterParameter(this.iToken+1)&&(d=this.centerParameter(++this.iToken));if(this.chk)return;n=this.iToken}e=null;null==p&&n+1<this.slen&&(p=this.centerParameter(++n),e=10==this.tokAt(n)||1048577==this.tokAt(n)?this.atomExpressionAt(n):null);this.checkLast(this.iToken);
this.chk||this.runScript(this.viewer.getSymmetryInfo(e,b,c,p,d,r,135176));return;case 4115:f=!0;continue;case 1048586:case 9:case 8:if(9==this.theTok||!this.isPoint3f(n)){u=this.getPoint4f(n);if(f){this.checkLast(this.iToken);this.chk||this.runScript(J.util.Quaternion.newP4(u).draw(null==r?"frame":r," "+l,null==p?new J.util.P3:p,m/100));return}w="planedef"}else u=p=this.getPoint3f(n,!0),w="coord";n=this.iToken;a=!0;break;case 135267841:case 135266319:if(!a&&!e&&0==h&&135267841!=this.theTok){w="plane";
break}g=135266319==this.theTok?this.planeParameter(++n):this.hklParameter(++n);n=this.iToken;if(0!=h){if(this.chk)break;a=this.viewer.getPlaneIntersection(h,g,m/100,0);m=0;w="polygon";u=a}else u=g,w="planedef";a=!0;break;case 1073742E3:w="lineData";u=this.floatParameterSet(++n,0,2147483647);n=this.iToken;a=!0;break;case 10:case 1048577:w="atomSet";u=this.atomExpressionAt(n);f&&(p=this.centerParameter(n));n=this.iToken;a=!0;break;case 7:w="modelBasedPoints";u=J.script.SV.listValue(this.theToken);a=
!0;break;case 1073742195:case 269484080:break;case 269484096:u=this.xypParameter(n);if(null!=u){n=this.iToken;w="coord";a=!0;break}c&&this.error(22);c=!0;break;case 269484097:c||this.error(22);c=!1;break;case 1141899269:w="reverse";break;case 4:u=this.stringParameter(n);w="title";break;case 135198:w="vector";break;case 1141899267:u=Float.$valueOf(this.floatParameter(++n));w="length";break;case 3:u=Float.$valueOf(this.floatParameter(n));w="length";break;case 1095761933:w="modelIndex";u=Integer.$valueOf(this.intParameter(++n));
break;case 2:c?(w="modelIndex",u=Integer.$valueOf(this.intParameter(n))):m=this.intParameter(n);break;case 1073742138:++n>=this.slen&&this.error(34);switch(this.getToken(n).tok){case 2:m=this.intParameter(n);continue;case 3:m=Math.round(100*this.floatParameter(n));continue}this.error(34);break;case 1074790550:r=this.setShapeId(22,++n,g);v=null==this.getShapeProperty(22,"ID");n=this.iToken;break;case 1073742028:w="fixed";u=Boolean.FALSE;break;case 1060869:w="fixed";u=Boolean.TRUE;break;case 1073742066:g=
this.getPoint3f(++n,!0);n=this.iToken;w="offset";u=g;break;case 1073741906:w="crossed";break;case 1073742196:u=Float.$valueOf(this.floatParameter(++n));w="width";l=w+" "+u;break;case 1073741998:w="line";u=Boolean.TRUE;break;case 1073741908:w="curve";break;case 1074790416:w="arc";break;case 1073741846:w="arrow";break;case 1073741880:w="circle";break;case 1073741912:w="cylinder";break;case 1073742194:w="vertices";break;case 1073742048:w="nohead";break;case 1073741861:w="isbarb";break;case 1073742130:w=
"rotate45";break;case 1073742092:w="perp";break;case 1666189314:case 1073741916:l=1666189314==this.theTok;K=this.floatParameter(++n);l&&(K*=2);u=Float.$valueOf(K);w=l||3==this.tokAt(n)?"width":"diameter";l=w+(3==this.tokAt(n)?" "+K:" "+Clazz.floatToInt(K));break;case 1048583:if(269484096==this.tokAt(n+2)||f){a=p=this.centerParameter(n);n=this.iToken;w="coord";u=a;a=!0;break}u=this.objectNameParameter(++n);w="identifier";a=!0;break;case 1766856708:case 1073742180:case 1073742074:1766856708!=this.theTok&&
--n;1073742180==this.tokAt(n+1)?(n++,d=!0,this.isFloatParameter(n+1)&&(j=this.getTranslucentLevel(++n))):1073742074==this.tokAt(n+1)&&(n++,d=!0,j=0);this.isColorParam(n+1)?(k=this.getArgbParam(++n),n=this.iToken):d||this.error(22);g=!0;continue;default:if(!this.setMeshDisplayProperty(22,0,this.theTok)){if(269484209==this.theTok||J.script.T.tokAttr(this.theTok,1073741824)){r=this.setShapeId(22,n,g);n=this.iToken;break}this.error(22)}0==s&&(s=n);n=this.iToken;continue}g=12291!=this.theTok;a&&(!b&&!f)&&
(this.setShapeProperty(22,"points",Integer.$valueOf(m)),b=!0,m=0);a&&v&&this.error(22);null!=w&&this.setShapeProperty(22,w,u)}this.finalizeObject(22,k,d?j:3.4028235E38,m,a,y,s)},$fz.isPrivate=!0,$fz));$_M(c$,"polyhedra",($fz=function(){var a=!1,b=!1,c=!1,d=!1,e=!1,f=0,g=0;this.sm.loadShape(21);this.setShapeProperty(21,"init",null);for(var h="centers",j="radius_",k=!1,m=3.4028235E38,l=-2147483648,s=1;s<this.slen;++s){var p=null,r=null;switch(this.getToken(s).tok){case 12291:case 1048589:case 1048588:(s+
1!=this.slen||a||1<g||0==g&&"to".equals(h))&&this.error(18);p=1048588==this.theTok?"off":1048589==this.theTok?"on":"delete";b=!0;break;case 269484436:case 269484080:continue;case 1678770178:0<g&&this.error(23);a=!0;p="bonds";break;case 1666189314:j="radius";continue;case 2:case 3:0<g&&!e&&this.error(23);if(2==this.theTok&&"radius_"===j){p="nVertices";r=Integer.$valueOf(this.intParameter(s));a=!0;break}p="radius_"===j?"radius":j;r=Float.$valueOf(this.floatParameter(s));j="radius_";e=!1;a=!0;break;
case 10:case 1048577:c&&this.error(23);2<++g&&this.error(2);"to".equals(h)&&(a=!0);p=h;h="to";r=this.atomExpressionAt(s);s=this.iToken;break;case 1074790746:1<g&&this.error(23);if(10==this.tokAt(s+1)||1048577==this.tokAt(s+1)&&!a){p="toBitSet";r=this.atomExpressionAt(++s);s=this.iToken;a=!0;break}else a||this.error(19);h="to";continue;case 1073741937:a||this.error(19);j="faceCenterOffset";e=!0;continue;case 1073741924:a||this.error(19);j="distanceFactor";e=!0;continue;case 1766856708:case 1073742180:case 1073742074:k=
!1;1766856708!=this.theTok&&--s;1073742180==this.tokAt(s+1)?(s++,k=!0,this.isFloatParameter(s+1)&&(m=this.getTranslucentLevel(++s))):1073742074==this.tokAt(s+1)&&(s++,k=!0,m=0);this.isColorParam(s+1)?(l=this.getArgbParam(s),s=this.iToken):k||this.error(22);continue;case 1073741886:case 1073741948:p="collapsed";r=1073741886==this.theTok?Boolean.TRUE:Boolean.FALSE;c&&this.error(18);c=!0;break;case 1073742044:case 1073741934:case 1073741956:d&&this.error(18);p=this.parameterAsString(s);d=!0;break;case 1073741964:f=
this.theTok;continue;default:if(this.isColorParam(s)){l=this.getArgbParam(s);s=this.iToken;continue}this.error(22)}this.setShapeProperty(21,p,r);if(b)return}!a&&(!c&&!d&&0==f)&&this.error(19);a&&this.setShapeProperty(21,"generate",null);-2147483648!=l&&this.setShapeProperty(21,"colorThis",Integer.$valueOf(l));k&&this.setShapeTranslucency(21,"","translucentThis",m,null);0!=f&&this.setShapeProperty(21,"token",Integer.$valueOf(f));this.setShapeProperty(21,"init",null)},$fz.isPrivate=!0,$fz));$_M(c$,
"contact",($fz=function(){this.sm.loadShape(25);if(!(1073742001==this.tokAt(1)&&this.listIsosurface(25))){var a=0;this.iToken=1;for(var b=null!=this.initIsosurface(25),c=b&&null==this.getShapeProperty(25,"ID"),d=null,e=null,f=null,g=null,h=null,j=!1,k=new J.util.SB,m=2147483647,l=135266319,s=0,p=NaN,r=NaN,v=!0,y=null,z=null,n=0,w=!1,u=1<this.iToken,t=this.iToken;t<this.slen;++t){switch(f=this.getToken(t).tok){default:u=!0;if(!this.setMeshDisplayProperty(25,0,this.theTok)){269484209!=this.theTok&&
!J.script.T.tokAttr(this.theTok,1073741824)&&this.error(22);this.setShapeId(25,t,b);t=this.iToken;break}0==a&&(a=t);t=this.iToken;continue;case 1074790550:u=!0;this.setShapeId(25,++t,b);c=null==this.getShapeProperty(25,"ID");t=this.iToken;break;case 1766856708:switch(this.tokAt(t+1)){case 1073741914:f=0;j=!0;k.append(" color density");t++;break;case 1141899272:f=0,w=!0,k.append(" color type"),t++}if(0==f)break;case 1073742180:case 1073742074:u=!0;0==n&&(n=t);this.setMeshDisplayProperty(25,t,this.theTok);
t=this.iToken;break;case 554176565:u=!0;z=this.getCapSlabObject(t,!1);this.setShapeProperty(25,"slab",z);t=this.iToken;break;case 1073741914:j=!0;k.append(" density");this.isFloatParameter(t+1)&&(null==h&&(h=Clazz.newFloatArray(1,0)),h[0]=-Math.abs(this.floatParameter(++t)),k.append(" "+-h[0]));break;case 1073742122:b=this.floatParameter(++t);0<b&&(k.append(" resolution ").appendF(b),this.setShapeProperty(25,"resolution",Float.$valueOf(b)));break;case 135266324:case 1276118018:p=this.floatParameter(++t);
k.append(" within ").appendF(p);break;case 269484193:case 2:case 3:g=this.encodeRadiusParameter(t,!1,!1);k.append(" ").appendO(g);t=this.iToken;break;case 1073741990:case 1073741989:y=1073741989==f?Boolean.TRUE:Boolean.FALSE;k.append(" ").appendO(this.theToken.value);break;case 1073742020:m=this.intParameter(++t);break;case 1612189718:case 1073741881:case 1649412112:s=f;k.append(" ").appendO(this.theToken.value);break;case 1073742136:this.isFloatParameter(t+1)&&(r=this.floatParameter(++t));case 1074790451:case 1073742036:case 3145756:v=
!1;case 1276117510:case 1073741961:case 135266319:case 4106:l=f;k.append(" ").appendO(this.theToken.value);1073742136==f&&k.append(" ").appendF(r);break;case 1073742083:h=this.floatParameterSet(++t,1,10);t=this.iToken;break;case 10:case 1048577:(c||null!=e)&&this.error(22),f=J.util.BSUtil.copy(this.atomExpressionAt(t)),t=this.iToken,null==d?d=f:e=f,k.append(" ").append(J.util.Escape.eBS(f))}b=12291!=this.theTok}!u&&null==d&&this.error(13);if(!this.chk){if(null!=d){1649412112==s&&null==g&&(g=new J.atomdata.RadiusData(null,
0,J.atomdata.RadiusData.EnumType.OFFSET,J.constant.EnumVdw.AUTO));t=null==g?new J.atomdata.RadiusData(null,0.26,J.atomdata.RadiusData.EnumType.OFFSET,J.constant.EnumVdw.AUTO):g;e=1073742036==l&&null==e&&null!=y&&y.booleanValue()?d:this.setContactBitSets(d,e,v,p,t,!0);switch(l){case 1074790451:case 1073742136:t=this.lookupIdentifierValue("solvent");d.andNot(t);e.andNot(t);e.andNot(d);break;case 3145756:e.andNot(d);break;case 1073742036:2147483647==m&&(m=100),this.setShapeProperty(25,"minset",Integer.$valueOf(m)),
k.append(" minSet ").appendI(m),null==h&&(h=[0.5,2])}null!=y&&(h=null==h?Clazz.newFloatArray(2,0):J.util.ArrayUtil.ensureLengthA(h,2),h[1]=y.booleanValue()?1:2);null!=h&&k.append(" parameters ").append(J.util.Escape.eAF(h));this.setShapeProperty(25,"set",[Integer.$valueOf(s),Integer.$valueOf(l),Boolean.$valueOf(j),Boolean.$valueOf(w),d,e,g,Float.$valueOf(r),h,k.toString()]);0<n&&this.setMeshDisplayProperty(25,n,0)}0<a&&(this.setMeshDisplayProperty(25,a,0)||this.error(22));null!=z&&null!=d&&this.setShapeProperty(25,
"slab",z);if(null!=d&&(1073742036==l||v)){a=this.getShapeProperty(25,"volume");if(J.util.Escape.isAD(a)){for(t=d=0;t<a.length;t++)d+=Math.abs(a[t]);a=Float.$valueOf(d)}d=this.getShapeProperty(25,"nSets").intValue();if(j||1276117510!=l)this.showString((0==d?"":d+" contacts with ")+"net volume "+a+" A^3")}}}},$fz.isPrivate=!0,$fz));$_M(c$,"setContactBitSets",function(a,b,c,d,e,f){var g,h;null==b?(b=J.util.BSUtil.setAll(this.viewer.getAtomCount()),J.util.BSUtil.andNot(b,this.viewer.getDeletedAtoms()),
b.andNot(a),g=!1):(h=J.util.BSUtil.copy(a),h.or(b),h=this.viewer.getModelBitSet(h,!1).cardinality(),g=1<h,f&&(1<h&&!this.tQuiet)&&this.showString(J.i18n.GT._("Note: More than one model is involved in this contact!")));if(!a.equals(b)){if(f=!c||a.cardinality()<b.cardinality())h=this.viewer.getAtomsWithinRadius(d,a,g,Float.isNaN(d)?e:null),b.and(h);c&&(h=this.viewer.getAtomsWithinRadius(d,b,g,Float.isNaN(d)?e:null),a.and(h),f||(h=this.viewer.getAtomsWithinRadius(d,a,g,Float.isNaN(d)?e:null),b.and(h)),
h=J.util.BSUtil.copy(b),h.and(a),h.equals(a)?b.andNot(a):h.equals(b)&&a.andNot(b))}return b},"J.util.BS,J.util.BS,~B,~N,J.atomdata.RadiusData,~B");$_M(c$,"lcaoCartoon",($fz=function(){this.sm.loadShape(26);if(!(1073742001==this.tokAt(1)&&this.listIsosurface(26)))if(this.setShapeProperty(26,"init",this.fullCommand),1==this.slen)this.setShapeProperty(26,"lcaoID",null);else{for(var a=!1,b=null,b=1;b<this.slen;b++){var c=null,d=null;switch(this.getToken(b).tok){case 1074790451:case 554176565:c=this.theToken.value;
1048588==this.tokAt(b+1)&&(this.iToken=b+1);d=this.getCapSlabObject(b,!0);b=this.iToken;break;case 12289:this.isosurface(26);return;case 528432:var e=d=0,f=0;switch(this.getToken(++b).tok){case 1112541205:d=0.017453292*this.floatParameter(++b);break;case 1112541206:e=0.017453292*this.floatParameter(++b);break;case 1112541207:f=0.017453292*this.floatParameter(++b);break;default:this.error(22)}c="rotationAxis";d=J.util.V3.new3(d,e,f);break;case 1048589:case 1610625028:case 3145768:c="on";break;case 1048588:case 12294:case 3145770:c=
"off";break;case 12291:c="delete";break;case 10:case 1048577:c="select";d=this.atomExpressionAt(b);b=this.iToken;break;case 1766856708:b=this.setColorOptions(null,b+1,26,-2);null!=b&&this.setShapeProperty(26,"settranslucency",b);b=this.iToken;a=!0;continue;case 1073742180:case 1073742074:this.setMeshDisplayProperty(26,b,this.theTok);b=this.iToken;a=!0;continue;case 1113200651:case 4:d=this.parameterAsString(b).toLowerCase();d.equals("spacefill")&&(d="cpk");c="create";this.optParameterAsString(b+1).equalsIgnoreCase("molecular")&&
(b++,c="molecular");break;case 135280132:10==this.tokAt(b+1)||1048577==this.tokAt(b+1)?(c="select",d=this.atomExpressionAt(b+1),b=this.iToken):(c="selectType",d=this.parameterAsString(++b),d.equals("spacefill")&&(d="cpk"));break;case 1073742138:c="scale";d=Float.$valueOf(this.floatParameter(++b));break;case 1073742004:case 1073742006:c="lonePair";break;case 1073742112:case 1073742111:c="radical";break;case 1073742029:c="molecular";break;case 1073741904:d=this.parameterAsString(++b);c="create";this.optParameterAsString(b+
1).equalsIgnoreCase("molecular")&&(b++,c="molecular");break;case 1074790550:d=this.getShapeNameParameter(++b);b=this.iToken;a&&this.error(22);c="lcaoID";break;default:if(269484209==this.theTok||J.script.T.tokAttr(this.theTok,1073741824))269484209!=this.theTok&&(d=this.parameterAsString(b)),a&&this.error(22),c="lcaoID"}12291!=this.theTok&&(a=!0);null==c&&this.error(22);this.setShapeProperty(26,c,d)}this.setShapeProperty(26,"clear",null)}},$fz.isPrivate=!0,$fz));$_M(c$,"getCapSlabObject",($fz=function(a,
b){if(0>a)return J.util.MeshSurface.getSlabWithinRange(a,0);var c=null,d=554176565==this.tokAt(a),e=this.tokAt(a+1),f=null,g=f=null,h=null,j=null;if(1073742180==e)switch(h=this.isFloatParameter(++a+1)?this.floatParameter(++a):0.5,this.isColorParam(a+1)?(h=Short.$valueOf(J.util.C.getColixTranslucent3(J.util.C.getColix(this.getArgbParam(a+1)),0!=h,h)),a=this.iToken):h=Short.$valueOf(J.util.C.getColixTranslucent3(1,0!=h,h)),e=this.tokAt(a+1)){case 1073742018:case 1073741938:j=Integer.$valueOf(e);e=this.tokAt(++a+
1);break;default:j=Integer.$valueOf(1073741938)}switch(e){case 10:case 1048577:c=this.atomExpressionAt(a+1);e=3;this.iToken++;break;case 1048588:return this.iToken=a+1,Integer.$valueOf(-2147483648);case 1048587:this.iToken=a+1;break;case 1048583:a++;c=[Float.$valueOf(1),this.parameterAsString(++a)];e=1073742018;break;case 135266324:a++;if(1073742114==this.tokAt(++a))c=this.floatParameter(++a),e=this.floatParameter(++a),c=[Float.$valueOf(c),Float.$valueOf(e)],e=1073742114;else if(this.isFloatParameter(a)){c=
this.floatParameter(a);if(this.isCenterParameter(++a))if(f=this.centerParameter(a),this.chk||!Clazz.instanceOf(this.expressionResult,J.util.BS))f=[f];else for(var k=this.viewer.modelSet.atoms,g=this.expressionResult,f=Array(g.cardinality()),m=0,l=g.nextSetBit(0);0<=l;l=g.nextSetBit(l+1),m++)f[m]=k[l];else f=this.getPointArray(a,-1);0==f.length&&(this.iToken=a,this.error(22));c=[Float.$valueOf(c),f,g]}else c=this.getPointArray(a,4),e=1679429641;break;case 1679429641:this.iToken=a+1;c=J.util.BoxInfo.getCriticalPoints(this.viewer.getBoundBoxVertices(),
null);break;case 1073741872:case 1614417948:this.iToken=a+1;g=this.viewer.getCurrentUnitCell();if(null==g)1614417948==e&&this.error(22);else{f=J.util.BoxInfo.getCriticalPoints(g.getUnitCellVertices(),g.getCartesianOffset());g=Clazz.floatToInt(g.getUnitCellInfoType(6));k=c=null;switch(g){case 1:k=J.util.V3.newV(f[2]),k.sub(f[0]),k.scale(1E3);case 2:c=J.util.V3.newV(f[1]),c.sub(f[0]),c.scale(1E3),f[0].sub(c),f[1].scale(2E3),1==g&&(f[0].sub(k),f[2].scale(2E3))}c=f}break;default:if(!b&&d&&this.isFloatParameter(a+
1)){c=this.floatParameter(++a);if(!this.isFloatParameter(a+1))return Integer.$valueOf(Clazz.floatToInt(c));e=this.floatParameter(++a);c=[Float.$valueOf(c),Float.$valueOf(e)];e=1073742114;break}f=this.planeParameter(++a);e=this.isFloatParameter(this.iToken+1)?this.floatParameter(++this.iToken):NaN;Float.isNaN(e)||(f.w-=e);c=f;e=135266319}return J.util.MeshSurface.getSlabObject(e,c,!d,null==j?null:[j,h])},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"mo",($fz=function(a){var b=2147483647,c=!1,d=this.viewer.getVisibleFramesBitSet(),
e=new J.util.JmolList,f=1;if(1095766028==this.tokAt(1)||4115==this.tokAt(1))f=this.modelNumberParameter(2),0>f&&this.error(22),d.clearAll(),d.set(f),f=3;for(var g=d.nextSetBit(0);0<=g;g=d.nextSetBit(g+1)){this.sm.loadShape(27);var h=f;if(1073742001==this.tokAt(h)&&this.listIsosurface(27))break;this.setShapeProperty(27,"init",Integer.$valueOf(g));var j=null,k=this.getShapeProperty(27,"moNumber").intValue(),m=this.getShapeProperty(27,"moLinearCombination");if(a)break;0==k&&(k=2147483647);var l=null,
s=null;switch(this.getToken(h).tok){case 1074790451:case 554176565:l=this.theToken.value;s=this.getCapSlabObject(h,!1);break;case 1073741914:l="squareLinear";s=Boolean.TRUE;m=[1];b=k=0;break;case 2:k=this.intParameter(h);m=this.moCombo(e);null==m&&0>k&&(m=[-100,-k]);break;case 269484192:switch(this.tokAt(++h)){case 1073741973:case 1073742008:break;default:this.error(22)}c=!0;case 1073741973:case 1073742008:2147483647==(b=this.moOffset(h))&&this.error(22);k=0;m=this.moCombo(e);break;case 1073742037:k=
1073742037;m=this.moCombo(e);break;case 1073742108:k=1073742108;m=this.moCombo(e);break;case 1766856708:this.setColorOptions(null,h+1,27,2);break;case 135266319:l="plane";s=this.planeParameter(h+1);break;case 135266320:this.addShapeProperty(e,"randomSeed",2==this.tokAt(h+2)?Integer.$valueOf(this.intParameter(h+2)):null);l="monteCarloCount";s=Integer.$valueOf(this.intParameter(h+1));break;case 1073742138:l="scale";s=Float.$valueOf(this.floatParameter(h+1));break;case 1073741910:269484193==this.tokAt(h+
1)?(l="cutoffPositive",s=Float.$valueOf(this.floatParameter(h+2))):(l="cutoff",s=Float.$valueOf(this.floatParameter(h+1)));break;case 536870916:l="debug";break;case 1073742054:l="plane";break;case 1073742104:case 1073742122:l="resolution";s=Float.$valueOf(this.floatParameter(h+1));break;case 1073742156:l="squareData";s=Boolean.TRUE;break;case 1073742168:h+1<this.slen&&4==this.tokAt(h+1)&&(l="titleFormat",s=this.parameterAsString(h+1));break;case 1073741824:this.error(22);break;default:if(this.isArrayParameter(h)){m=
this.floatParameterSet(h,1,2147483647);1073742156==this.tokAt(this.iToken+1)&&(this.addShapeProperty(e,"squareLinear",Boolean.TRUE),this.iToken++);break}a=this.iToken;this.setMeshDisplayProperty(27,0,this.theTok)||this.error(22);this.setShapeProperty(27,"setProperties",e);this.setMeshDisplayProperty(27,a,this.tokAt(a));return!0}null!=l&&this.addShapeProperty(e,l,s);if(2147483647!=k||null!=m)4==this.tokAt(this.iToken+1)&&(j=this.parameterAsString(++this.iToken)),this.setCursorWait(!0),this.setMoData(e,
k,m,b,c,g,j),this.addShapeProperty(e,"finalize",null);0<e.size()&&this.setShapeProperty(27,"setProperties",e);e.clear()}return!0},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"moCombo",($fz=function(a){if(1073742156!=this.tokAt(this.iToken+1))return null;this.addShapeProperty(a,"squareLinear",Boolean.TRUE);this.iToken++;return Clazz.newFloatArray(0,0)},$fz.isPrivate=!0,$fz),"J.util.JmolList");$_M(c$,"moOffset",($fz=function(a){var b=1073741973==this.getToken(a).tok?0:1,c=this.tokAt(++a);2==c&&0>this.intParameter(a)?
b+=this.intParameter(a):269484193==c?b+=this.intParameter(++a):269484192==c&&(b-=this.intParameter(++a));return b},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setMoData",($fz=function(a,b,c,d,e,f,g){if(!this.chk){0>f&&(f=this.viewer.getCurrentModelIndex(),0>f&&this.errorStr(30,"MO isosurfaces"));f=this.viewer.getModelAuxiliaryInfoValue(f,"moData");var h=null,j,k,m=0;if(null==c||2>c.length){null!=c&&1==c.length&&(d=0);null==f&&this.error(27);var l=f.containsKey("lastMoNumber")?f.get("lastMoNumber").intValue():
0,h=f.containsKey("lastMoCount")?f.get("lastMoCount").intValue():1;1073742108==b?b=l-1:1073742037==b&&(b=l+h);h=f.get("mos");m=null==h?0:h.size();0==m&&this.error(25);1==m&&1<b&&this.error(29);if(2147483647!=d){if(f.containsKey("HOMO"))b=f.get("HOMO").intValue()+d;else{b=-1;for(l=0;l<m;l++)if(j=h.get(l),null!=(k=j.get("occupancy"))){if(0.5>k.floatValue()){b=l;break}}else if(null!=(k=j.get("energy"))){if(0<k.floatValue()){b=l;break}}else break;0>b&&this.error(28);b+=d}J.util.Logger.info("MO "+b)}(1>
b||b>m)&&this.errorStr(26,""+m)}b=Math.abs(b);f.put("lastMoNumber",Integer.$valueOf(b));f.put("lastMoCount",Integer.$valueOf(1));e&&null==c&&(c=[-100,b]);if(null!=c&&2>c.length){j=h.get(b-1);if(null==(k=j.get("energy")))c=[100,b];else{j=k.floatValue();d=J.util.BS.newN(m);e=0;c=1==c.length&&1==c[0];for(l=0;l<m;l++)if(null!=(k=h.get(l).get("energy")))if(k=k.floatValue(),c?k<=j:k==j)d.set(l+1),e+=2;c=Clazz.newFloatArray(e,0);for(h=l=0;l<e;l+=2)c[l]=1,c[l+1]=h=d.nextSetBit(h+1);f.put("lastMoNumber",Integer.$valueOf(d.nextSetBit(0)));
f.put("lastMoCount",Integer.$valueOf(Clazz.doubleToInt(e/2)))}this.addShapeProperty(a,"squareLinear",Boolean.TRUE)}this.addShapeProperty(a,"moData",f);null!=g&&this.addShapeProperty(a,"title",g);this.addShapeProperty(a,"molecularOrbital",null!=c?c:Integer.$valueOf(Math.abs(b)));this.addShapeProperty(a,"clear",null)}},$fz.isPrivate=!0,$fz),"J.util.JmolList,~N,~A,~N,~B,~N,~S");$_M(c$,"initIsosurface",($fz=function(a){this.setShapeProperty(a,"init",this.fullCommand);this.iToken=0;var b=this.tokAt(1),
c=this.tokAt(2);if(12291==b||12291==c&&1048579==this.tokAt(++this.iToken))return this.setShapeProperty(a,"delete",null),this.iToken+=2,this.slen>this.iToken&&(this.setShapeProperty(a,"init",this.fullCommand),this.setShapeProperty(a,"thisID","+PREVIOUS_MESH+")),null;this.iToken=1;return!this.setMeshDisplayProperty(a,0,b)&&(this.setShapeProperty(a,"thisID","+PREVIOUS_MESH+"),22!=a&&this.setShapeProperty(a,"title",[this.thisCommand]),1074790550!=b&&(269484209==c||269484209==b&&this.setMeshDisplayProperty(a,
0,c)))?(a=this.setShapeId(a,1,!1),this.iToken++,a):null},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getNextComment",($fz=function(){var a=this.getCommand(this.pc+1,!1,!0);return a.startsWith("#")?a:""},$fz.isPrivate=!0,$fz));$_M(c$,"listIsosurface",($fz=function(a){this.checkLength23();this.chk||this.showString(this.getShapeProperty(a,"list"+(0==this.tokAt(2)?"":" "+this.getToken(2).value)));return!0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"isosurface",($fz=function(a){this.sm.loadShape(a);if(!(1073742001==
this.tokAt(1)&&this.listIsosurface(a))){var b=0,c=24==a,d=28==a,e=29==a,f=26==a,g=!1,h=!1,j=!1,k=!1,m=!1,l=!1,s=!1,p=!1,r=!1,v=!1,y=!1,z=!1,n=!1,w=null,u=null,t=-1,A,G,H,K,C,P=NaN,N=NaN,R=0,M=null,V=2147483647,L=null,D=null,S=null,x=new J.util.SB,I,oa=null,Fa=null,ga,X=null,O=this.chk?0:-2147483648;this.setCursorWait(!0);var ea=null!=this.initIsosurface(a),$a=ea&&null==this.getShapeProperty(a,"ID"),ab=!1,Ga=!1,pa=null,Ha=null,Z=null,Ia=null,qa=null,F=new J.util.JmolList,bb=!1;(d||e)&&this.addShapeProperty(F,
"fileType","Pmesh");for(var q=this.iToken;q<this.slen;++q){var E=null,B=null;this.getToken(q);1073741824==this.theTok&&(X=this.parameterAsString(q));switch(this.theTok){case 603979871:M=1048589==this.getToken(++q).tok?Boolean.TRUE:1048588==this.theTok?Boolean.FALSE:null;null==M&&this.error(22);continue;case 553648149:V=this.intParameter(++q);continue;case 4128:E="moveIsosurface";12!=this.tokAt(++q)&&this.error(22);B=this.getToken(q++).value;break;case 1073742066:E="offset";B=this.centerParameter(++q);
q=this.iToken;break;case 528432:E="rotate";B=1048587==this.tokAt(this.iToken=++q)?null:this.getPoint4f(q);q=this.iToken;break;case 1610612740:E="scale3d";B=Float.$valueOf(this.floatParameter(++q));break;case 1073742090:x.append(" periodic");E="periodic";break;case 1073742078:case 266298:case 135266320:E=this.theToken.value.toString();x.append(" ").appendO(this.theToken.value);B=this.centerParameter(++q);x.append(" ").append(J.util.Escape.eP(B));q=this.iToken;break;case 1679429641:if(0<=this.fullCommand.indexOf("# BBOX=")){var cb=
J.util.TextFormat.split(J.util.Parser.getQuotedAttribute(this.fullCommand,"# BBOX"),",");ga=[J.util.Escape.uP(cb[0]),J.util.Escape.uP(cb[1])]}else this.isCenterParameter(q+1)?(ga=[this.getPoint3f(q+1,!0),this.getPoint3f(this.iToken+1,!0)],q=this.iToken):ga=this.viewer.getBoundBoxVertices();x.append(" boundBox "+J.util.Escape.eP(ga[0])+" "+J.util.Escape.eP(ga[ga.length-1]));E="boundingBox";B=ga;break;case 135188:d=!0;x.append(" pmesh");E="fileType";B="Pmesh";break;case 135267842:D=this.atomExpressionAt(++q);
this.chk?L=new J.util.BS:1048577==this.tokAt(this.iToken+1)||10==this.tokAt(this.iToken+1)?(L=this.atomExpressionAt(++this.iToken),L.and(this.viewer.getAtomsWithinRadius(5,D,!1,null))):(L=this.viewer.getAtomsWithinRadius(5,D,!0,null),L.andNot(this.viewer.getAtomBits(1095761934,D)));L.andNot(D);x.append(" intersection ").append(J.util.Escape.eBS(D)).append(" ").append(J.util.Escape.eBS(L));q=this.iToken;if(135368713==this.tokAt(q+1)){q++;var ra=this.getToken(++q).value;x.append(" function ").append(J.util.Escape.eS(ra));
this.chk||this.addShapeProperty(F,"func",ra.equals("a+b")||ra.equals("a-b")?ra:this.createFunction("__iso__","a,b",ra))}else n=!0;E="intersection";B=[D,L];break;case 1610625028:case 135266324:var Ja=1610625028==this.theTok;if(Ja){x.append(" display");var b=q,ba=this.tokAt(q+1);if(0==ba)continue;q++;this.addShapeProperty(F,"token",Integer.$valueOf(1048589));if(10==ba||1048579==ba){E="bsDisplay";1048579==ba?x.append(" all"):(B=this.st[q].value,x.append(" ").append(J.util.Escape.eBS(B)));this.checkLast(q);
break}else 135266324!=ba&&(this.iToken=q,this.error(22))}else R=q;var xa,ha=null,L=null,Ka=!1;1048577==this.tokAt(q+1)?(xa=this.floatParameter(q+3),this.isPoint3f(q+4)?(ha=this.centerParameter(q+4),Ka=!0,this.iToken+=2):this.isPoint3f(q+5)?(ha=this.centerParameter(q+5),Ka=!0,this.iToken+=2):(L=this.atomExpression(this.st,q+5,this.slen,!0,!1,!1,!0),null==L&&this.error(22))):(xa=this.floatParameter(++q),ha=this.centerParameter(++q));Ja&&this.checkLast(this.iToken);q=this.iToken;0<=this.fullCommand.indexOf("# WITHIN=")?
L=J.util.Escape.uB(J.util.Parser.getQuotedAttribute(this.fullCommand,"# WITHIN")):Ka||(L=Clazz.instanceOf(this.expressionResult,J.util.BS)?this.expressionResult:null);this.chk||(null!=L&&0<=O&&L.and(this.viewer.getModelUndeletedAtomsBitSet(O)),null==ha&&(ha=this.viewer.getAtomSetCenter(L)),this.getWithinDistanceVector(F,xa,ha,L,Ja),x.append(" within ").appendF(xa).append(" ").append(null==L?J.util.Escape.eP(ha):J.util.Escape.eBS(L)));continue;case 1073742083:var E="parameters",db=this.floatParameterSet(++q,
1,10),q=this.iToken,B=db;x.append(" parameters ").append(J.util.Escape.eAF(db));break;case 1716520973:case 1073742190:var pa=this.theToken.value,vb=1073742190==this.theTok,sa=this.tokAt(q+1);if(null==Ia){!g&&(!j&&!h)&&(this.addShapeProperty(F,"sasurface",Float.$valueOf(0)),x.append(" vdw"),g=!0);E="property";if(null==M){var eb=!0;switch(sa){case 1095761923:case 1095763969:case 1095763976:case 1766856708:case 1095761937:eb=!1}M=eb&&1==this.viewer.getIsosurfacePropertySmoothing(!1)?Boolean.TRUE:Boolean.FALSE}this.addShapeProperty(F,
"propertySmoothing",M);x.append(" isosurfacePropertySmoothing "+M);M===Boolean.TRUE&&(2147483647==V&&(V=this.viewer.getIsosurfacePropertySmoothing(!0)),this.addShapeProperty(F,"propertySmoothingPower",Integer.$valueOf(V)),x.append(" isosurfacePropertySmoothingPower "+V));this.viewer.global.rangeSelected&&this.addShapeProperty(F,"rangeSelected",Boolean.TRUE)}else E=Ia;X=this.parameterAsString(q);x.append(" ").append(X);if(0==X.toLowerCase().indexOf("property_")){w=Clazz.newFloatArray(this.viewer.getAtomCount(),
0);if(this.chk)continue;w=this.viewer.getDataFloat(X);null==w&&this.error(22);this.addShapeProperty(F,E,w);continue}var ta=this.viewer.getAtomCount(),w=Clazz.newFloatArray(ta,0);if(vb){var fb=this.parameterAsString(++q);0==fb.length?w=this.floatParameterSet(q,ta,ta):(w=Clazz.newFloatArray(ta,0),this.chk||J.util.Parser.parseStringInfestedFloatArray(""+this.getParameter(fb,4),null,w));this.chk||x.append(' "" ').append(J.util.Escape.eAF(w))}else{this.getToken(++q);if(!this.chk){x.append(" "+this.theToken.value);
var La=this.viewer.modelSet.atoms;this.viewer.autoCalculate(sa);if(1766856708!=sa)for(var ia=ta;0<=--ia;)w[ia]=J.modelset.Atom.atomPropertyFloat(this.viewer,La[ia],sa)}1766856708==sa&&(Z="inherit");if(135266324==this.tokAt(q+1)){var gb=this.floatParameter(q+=2);x.append(" within "+gb);this.addShapeProperty(F,"propertyDistanceMax",Float.$valueOf(gb))}}B=w;break;case 1095761933:case 1095766028:g&&this.error(22);O=1095761933==this.theTok?this.intParameter(++q):this.modelNumberParameter(++q);x.append(" modelIndex "+
O);if(0>O){E="fixed";B=Boolean.TRUE;break}E="modelIndex";B=Integer.$valueOf(O);break;case 135280132:var E="select",Ma=this.atomExpressionAt(++q),B=Ma,q=this.iToken;if(1073742072==this.tokAt(q+1)){q++;var Na=J.util.BSUtil.copy(Ma);J.util.BSUtil.invertInPlace(Na,this.viewer.getAtomCount());this.addShapeProperty(F,"ignore",Na);x.append(" ignore ").append(J.util.Escape.eBS(Na))}g||j?x.append(" select "+J.util.Escape.eBS(Ma)):(D=B,0>O&&0<=D.nextSetBit(0)&&(O=this.viewer.getAtomModelIndex(D.nextSetBit(0))));
break;case 1085443:t=this.intParameter(++q);break;case 12289:E="center";B=this.centerParameter(++q);x.append(" center "+J.util.Escape.eP(B));q=this.iToken;break;case 1073742147:case 1766856708:var aa,ea=!0,Oa=1073742147==this.theTok;if(Oa)x.append(" sign"),this.addShapeProperty(F,"sign",Boolean.TRUE);else{if(1073741914==this.tokAt(q+1)){q++;E="colorDensity";x.append(" color density");break}if(4==this.getToken(q+1).tok)Z=this.parameterAsString(++q),0<Z.indexOf(" ")&&(qa=J.util.C.getColixArray(Z),null==
qa&&this.error(4));else if(1073742018==this.theTok){q++;x.append(" color mesh");aa=this.getArgbParam(++q);this.addShapeProperty(F,"meshcolor",Integer.$valueOf(aa));x.append(" ").append(J.util.Escape.escapeColor(aa));q=this.iToken;continue}if(1073742180==(this.theTok=this.tokAt(q+1))||1073742074==this.theTok){x.append(" color");Ha=this.setColorOptions(x,q+1,24,-2);q=this.iToken;continue}switch(this.tokAt(q+1)){case 1073741826:case 1073742114:this.getToken(++q);x.append(" color range");this.addShapeProperty(F,
"rangeAll",null);if(1048579==this.tokAt(q+1)){q++;x.append(" all");continue}var hb=this.floatParameter(++q),ib=this.floatParameter(++q);this.addShapeProperty(F,"red",Float.$valueOf(hb));this.addShapeProperty(F,"blue",Float.$valueOf(ib));x.append(" ").appendF(hb).append(" ").appendF(ib);continue}if(this.isColorParam(q+1)&&(aa=this.getArgbParam(q+1),1074790746==this.tokAt(q+2))){Z=this.getColorRange(q+1);q=this.iToken;break}x.append(" color")}this.isColorParam(q+1)?(aa=this.getArgbParam(++q),x.append(" ").append(J.util.Escape.escapeColor(aa)),
q=this.iToken,this.addShapeProperty(F,"colorRGB",Integer.$valueOf(aa)),ea=!0,this.isColorParam(q+1)?(aa=this.getArgbParam(++q),q=this.iToken,this.addShapeProperty(F,"colorRGB",Integer.$valueOf(aa)),x.append(" ").append(J.util.Escape.escapeColor(aa)),k=!0):Oa&&this.error(23)):!Oa&&null==qa&&this.error(23);continue;case 135270422:c||this.error(22);v=!this.chk;continue;case 1229984263:4!=this.tokAt(q+1)&&this.error(23);continue;case 1112541195:case 1649412112:x.append(" ").appendO(this.theToken.value);
var ya=this.encodeRadiusParameter(q,!1,!0);x.append(" ").appendO(ya);Float.isNaN(ya.value)&&(ya.value=100);B=ya;E="radius";r=!0;j&&(g=!1);q=this.iToken;break;case 135266319:h=!0;E="plane";B=this.planeParameter(++q);q=this.iToken;x.append(" plane ").append(J.util.Escape.eP4(B));break;case 1073742138:E="scale";B=Float.$valueOf(this.floatParameter(++q));x.append(" scale ").appendO(B);break;case 1048579:ea&&this.error(22);E="thisID";break;case 1113198596:g=!0;++q;try{B=this.getPoint4f(q);E="ellipsoid";
q=this.iToken;x.append(" ellipsoid ").append(J.util.Escape.eP4(B));break}catch(jb){if(!Clazz.exceptionOf(jb,J.script.ScriptException))throw jb;}try{E="ellipsoid";B=this.floatParameterSet(q,6,6);q=this.iToken;x.append(" ellipsoid ").append(J.util.Escape.eAF(B));break}catch(kb){if(!Clazz.exceptionOf(kb,J.script.ScriptException))throw kb;}L=this.atomExpressionAt(q);x.append(" ellipsoid ").append(J.util.Escape.eBS(L));ia=L.nextSetBit(0);La=this.viewer.modelSet.atoms;0<=ia&&(B=La[ia].getEllipsoid());if(null==
B)return;q=this.iToken;E="ellipsoid";this.chk||this.addShapeProperty(F,"center",this.viewer.getAtomPoint3f(ia));break;case 135267841:h=!0;E="plane";B=this.hklParameter(++q);q=this.iToken;x.append(" plane ").append(J.util.Escape.eP4(B));break;case 135182:var g=!0,za=this.parameterAsString(++q);this.addShapeProperty(F,"lcaoType",za);x.append(" lcaocartoon ").append(J.util.Escape.eS(za));switch(this.getToken(++q).tok){case 10:case 1048577:E="lcaoCartoon";L=this.atomExpressionAt(q);q=this.iToken;if(this.chk)continue;
var ua=L.nextSetBit(0);0>ua&&this.error(14);x.append(" ({").appendI(ua).append("})");O=this.viewer.getAtomModelIndex(ua);this.addShapeProperty(F,"modelIndex",Integer.$valueOf(O));var Pa=[new J.util.V3,new J.util.V3,J.util.V3.newV(this.viewer.getAtomPoint3f(ua)),new J.util.V3];if(!za.equalsIgnoreCase("s")&&null==this.viewer.getHybridizationAndAxes(ua,Pa[0],Pa[1],za))return;B=Pa;break;default:this.error(14)}break;case 1183762:var va=2147483647,ma=2147483647,Qa=269484192==this.tokAt(q+1);Qa&&q++;var wa=
null;switch(this.tokAt(++q)){case 0:this.error(2);break;case 1073741914:x.append("mo [1] squared ");this.addShapeProperty(F,"squareLinear",Boolean.TRUE);wa=[1];ma=va=0;q++;break;case 1073741973:case 1073742008:ma=this.moOffset(q);va=0;q=this.iToken;x.append(" mo "+(Qa?"-":"")+"HOMO ");0<ma&&x.append("+");0!=ma&&x.appendI(ma);break;case 2:va=this.intParameter(q);x.append(" mo ").appendI(va);break;default:this.isArrayParameter(q)&&(wa=this.floatParameterSet(q,1,2147483647),q=this.iToken)}if(1073742156==
this.tokAt(q+1))this.addShapeProperty(F,"squareLinear",Boolean.TRUE),x.append(" squared"),null==wa&&(wa=Clazz.newFloatArray(0,0));else if(135266320==this.tokAt(q+1)){++q;var lb=this.intParameter(++q),mb=2==this.tokAt(q+1)?this.intParameter(++q):-System.currentTimeMillis()%1E4;this.addShapeProperty(F,"monteCarloCount",Integer.$valueOf(lb));this.addShapeProperty(F,"randomSeed",Integer.$valueOf(mb));x.append(" points ").appendI(lb).appendC(" ").appendI(mb)}this.setMoData(F,va,wa,ma,Qa,O,null);g=!0;continue;
case 1073742036:E="nci";x.append(" "+E);var ba=this.tokAt(q+1),nb=1229984263!=ba&&4!=ba&&1073742033!=ba,B=Boolean.$valueOf(nb);nb&&(g=!0);break;case 1073742016:case 1073742022:var Ra=1073742016==this.theTok,E=Ra?"mep":"mlp";x.append(" "+E);var Aa=null,Sa=-1,g=!0;2==this.tokAt(q+1)&&(Sa=this.intParameter(++q),x.append(" "+Sa),this.addShapeProperty(F,"mepCalcType",Integer.$valueOf(Sa)));if(4==this.tokAt(q+1))Aa=this.stringParameter(++q),x.append(" /*file*/"+J.util.Escape.eS(Aa));else if(1716520973==
this.tokAt(q+1)){Ia=E;continue}if(!this.chk)try{w=null==Aa&&Ra?this.viewer.getPartialCharges():this.viewer.getAtomicPotentials(Ra,D,S,Aa)}catch(ob){if(!Clazz.exceptionOf(ob,Exception))throw ob;}!this.chk&&null==w&&this.error(32);B=w;break;case 1313866247:s=!this.chk;x.append(" volume");break;case 1074790550:this.setShapeId(a,++q,ea);$a=null==this.getShapeProperty(a,"ID");q=this.iToken;break;case 1073741888:1073742180==this.tokAt(q+1)&&(ab=!0,q++);Z=this.parameterAsString(++q).toLowerCase();Z.equals("sets")?
x.append(' colorScheme "sets"'):this.isColorParam(q)&&(Z=this.getColorRange(q),q=this.iToken);break;case 1073741828:E="addHydrogens";B=Boolean.TRUE;x.append(" addHydrogens");break;case 1073741836:E="angstroms";x.append(" angstroms");break;case 1073741838:E="anisotropy";B=this.getPoint3f(++q,!1);x.append(" anisotropy").append(J.util.Escape.eP(B));q=this.iToken;break;case 1073741842:l=!this.chk;x.append(" area");break;case 1073741850:case 1073742076:g=!0;k&&!m&&(x.append(' phase "_orb"'),this.addShapeProperty(F,
"phase","_orb"));var U=Clazz.newFloatArray(7,0);U[0]=this.intParameter(++q);U[1]=this.intParameter(++q);U[2]=this.intParameter(++q);U[3]=this.isFloatParameter(q+1)?this.floatParameter(++q):6;x.append(" atomicOrbital ").appendI(Clazz.floatToInt(U[0])).append(" ").appendI(Clazz.floatToInt(U[1])).append(" ").appendI(Clazz.floatToInt(U[2])).append(" ").appendF(U[3]);135266320==this.tokAt(q+1)&&(q+=2,U[4]=this.intParameter(q),U[5]=3==this.tokAt(q+1)?this.floatParameter(++q):0,U[6]=2==this.tokAt(q+1)?this.intParameter(++q):
-System.currentTimeMillis()%1E4,x.append(" points ").appendI(Clazz.floatToInt(U[4])).appendC(" ").appendF(U[5]).appendC(" ").appendI(Clazz.floatToInt(U[6])));E="hydrogenOrbital";B=U;break;case 1073741866:x.append(" binary");continue;case 1073741868:x.append(" blockData");E="blockData";B=Boolean.TRUE;break;case 1074790451:case 554176565:z=!0;E=this.theToken.value;B=this.getCapSlabObject(q,!1);q=this.iToken;break;case 1073741876:c||this.error(22);p=!0;if(this.chk)continue;var pb=this.isFloatParameter(q+
1)?this.floatParameter(++q):1.2,Ta=this.isFloatParameter(q+1)?this.floatParameter(++q):10;10<Ta&&this.integerOutOfRange(0,10);x.append(" cavity ").appendF(pb).append(" ").appendF(Ta);this.addShapeProperty(F,"envelopeRadius",Float.$valueOf(Ta));this.addShapeProperty(F,"cavityRadius",Float.$valueOf(pb));E="cavity";break;case 1073741896:case 1073741900:E="contour";x.append(" contour");switch(this.tokAt(q+1)){case 1073741920:B=this.floatParameterSet(q+2,1,2147483647);x.append(" discrete ").append(J.util.Escape.eAF(B));
q=this.iToken;break;case 1073741981:I=this.getPoint3f(q+2,!1);(0>=I.z||I.y<I.x)&&this.error(22);I.z==Clazz.floatToInt(I.z)&&I.z>I.y-I.x&&(I.z=(I.y-I.x)/I.z);B=I;q=this.iToken;x.append(" increment ").append(J.util.Escape.eP(I));break;default:B=Integer.$valueOf(2==this.tokAt(q+1)?this.intParameter(++q):0),x.append(" ").appendO(B)}break;case 3:case 2:case 269484193:case 1073741910:x.append(" cutoff ");1073741910==this.theTok&&q++;269484193==this.tokAt(q)?(E="cutoffPositive",B=Float.$valueOf(N=this.floatParameter(++q)),
x.append("+").appendO(B)):this.isFloatParameter(q)?(E="cutoff",B=Float.$valueOf(N=this.floatParameter(q)),x.appendO(B)):(E="cutoffRange",B=this.floatParameterSet(q,2,2),this.addShapeProperty(F,"cutoff",Float.$valueOf(0)),x.append(J.util.Escape.eAF(B)),q=this.iToken);break;case 1073741928:E="downsample";B=Integer.$valueOf(this.intParameter(++q));x.append(" downsample ").appendO(B);break;case 1073741930:E="eccentricity";B=this.getPoint4f(++q);x.append(" eccentricity ").append(J.util.Escape.eP4(B));
q=this.iToken;break;case 1074790508:x.append(" ed");this.setMoData(F,-1,null,0,!1,O,null);g=!0;continue;case 536870916:case 1073742041:x.append(" ").appendO(this.theToken.value);E="debug";B=536870916==this.theTok?Boolean.TRUE:Boolean.FALSE;break;case 1060869:x.append(" fixed");E="fixed";B=Boolean.TRUE;break;case 1073741962:x.append(" fullPlane");E="fullPlane";B=Boolean.TRUE;break;case 1073741966:case 1073741968:var wb=1073741968==this.theTok,E=""+this.theToken.value,ca=new J.util.JmolList,B=ca,y=
g=!0;x.append(" ").append(E);var W=this.parameterAsString(++q);if(W.equals("=")){x.append(" =");W=this.parameterAsString(++q);x.append(" ").append(J.util.Escape.eS(W));ca.addLast(W);this.chk||this.addShapeProperty(F,"func",this.createFunction("__iso__","x,y,z",W));break}var Ua=J.util.Parser.getQuotedAttribute(this.fullCommand,"# DATA"+(y?"2":""));null==Ua?Ua="inline":W=Ua;var qb=0==W.indexOf("data2d_"),xb=0==W.indexOf("data3d_"),Ga=W.equals("inline");x.append(" inline");ca.addLast(W);var rb=this.getPoint3f(++q,
!1);x.append(" ").append(J.util.Escape.eP(rb));ca.addLast(rb);var da;K=++this.iToken;ca.addLast(da=this.getPoint4f(K));x.append(" ").append(J.util.Escape.eP4(da));A=Clazz.floatToInt(da.x);C=++this.iToken;ca.addLast(da=this.getPoint4f(C));x.append(" ").append(J.util.Escape.eP4(da));G=Clazz.floatToInt(da.x);ca.addLast(da=this.getPoint4f(++this.iToken));x.append(" ").append(J.util.Escape.eP4(da));H=Clazz.floatToInt(da.x);(0==A||0==G||0==H)&&this.error(22);if(!this.chk){var Y=null,$=null;if(wb){Ga?(A=
Math.abs(A),G=Math.abs(G),H=Math.abs(H),$=this.floatArraySetXYZ(++this.iToken,A,G,H)):$=xb?this.viewer.getDataFloat3D(W):this.viewer.functionXYZ(W,A,G,H);A=Math.abs(A);G=Math.abs(G);H=Math.abs(H);null==$&&(this.iToken=K,this.errorStr(53,"xyzdata is null."));if($.length!=A||$[0].length!=G||$[0][0].length!=H)this.iToken=K,this.errorStr(53,"xyzdata["+$.length+"]["+$[0].length+"]["+$[0][0].length+"] is not of size ["+A+"]["+G+"]["+H+"]");ca.addLast($);x.append(" ").append(J.util.Escape.e($))}else{Ga?
(A=Math.abs(A),G=Math.abs(G),Y=this.floatArraySet(++this.iToken,A,G)):qb?(Y=this.viewer.getDataFloat2D(W),A=null==Y?0:Y.length,G=3):(Y=this.viewer.functionXY(W,A,G),A=Math.abs(A),G=Math.abs(G));null==Y&&(this.iToken=K,this.errorStr(53,"fdata is null."));Y.length!=A&&!qb&&(this.iToken=K,this.errorStr(53,"fdata length is not correct: "+Y.length+" "+A+"."));for(var ja=0;ja<A;ja++)null==Y[ja]&&(this.iToken=C,this.errorStr(53,"fdata["+ja+"] is null.")),Y[ja].length!=G&&(this.iToken=C,this.errorStr(53,
"fdata["+ja+"] is not the right length: "+Y[ja].length+" "+G+"."));ca.addLast(Y);x.append(" ").append(J.util.Escape.e(Y))}}q=this.iToken;break;case 1073741970:E="gridPoints";x.append(" gridPoints");break;case 1073741976:E="ignore";B=S=this.atomExpressionAt(++q);x.append(" ignore ").append(J.util.Escape.eBS(S));q=this.iToken;break;case 1073741984:E="insideOut";x.append(" insideout");break;case 1073741988:case 1073741986:case 1073742100:x.append(" ").appendO(this.theToken.value);E="pocket";B=1073742100==
this.theTok?Boolean.TRUE:Boolean.FALSE;break;case 1073742002:E="lobe";B=this.getPoint4f(++q);q=this.iToken;x.append(" lobe ").append(J.util.Escape.eP4(B));g=!0;break;case 1073742004:case 1073742006:E="lp";B=this.getPoint4f(++q);q=this.iToken;x.append(" lp ").append(J.util.Escape.eP4(B));g=!0;break;case 1052700:(j||this.slen==q+1)&&this.error(22);j=!0;if((p||r||n)&&!g)g=!0,this.addShapeProperty(F,"bsSolvent",r||n?new J.util.BS:this.lookupIdentifierValue("solvent")),this.addShapeProperty(F,"sasurface",
Float.$valueOf(0));0==x.length()?(oa=this.getShapeProperty(24,"plane"),null==oa?null!=this.getShapeProperty(24,"contours")&&this.addShapeProperty(F,"nocontour",null):(this.addShapeProperty(F,"plane",oa),x.append("plane ").append(J.util.Escape.eP4(oa)),h=!0,oa=null)):!g&&!h&&this.error(22);x.append("; isosurface map");this.addShapeProperty(F,"map",g?Boolean.TRUE:Boolean.FALSE);break;case 1073742014:E="maxset";B=Integer.$valueOf(this.intParameter(++q));x.append(" maxSet ").appendO(B);break;case 1073742020:E=
"minset";B=Integer.$valueOf(this.intParameter(++q));x.append(" minSet ").appendO(B);break;case 1073742112:g=!0;E="rad";B=this.getPoint4f(++q);q=this.iToken;x.append(" radical ").append(J.util.Escape.eP4(B));break;case 1073742028:E="fixed";B=Boolean.FALSE;x.append(" modelBased");break;case 1073742029:case 1073742136:case 1613758488:var pa=this.theToken.value,Ba;1073742029==this.theTok?(E="molecular",x.append(" molecular"),Ba=1.4):(this.addShapeProperty(F,"bsSolvent",this.lookupIdentifierValue("solvent")),
E=1073742136==this.theTok?"sasurface":"solvent",x.append(" ").appendO(this.theToken.value),Ba=this.isFloatParameter(q+1)?this.floatParameter(++q):this.viewer.getFloat(570425394),x.append(" ").appendF(Ba));B=Float.$valueOf(Ba);1073741961==this.tokAt(q+1)&&(this.addShapeProperty(F,"doFullMolecular",null),x.append(" full"),q++);g=!0;break;case 1073742033:this.addShapeProperty(F,"fileType","Mrc");x.append(" mrc");continue;case 1073742064:case 1073742062:this.addShapeProperty(F,"fileType","Obj");x.append(" obj");
continue;case 1073742034:this.addShapeProperty(F,"fileType","Msms");x.append(" msms");continue;case 1073742094:g&&this.error(22);E="phase";m=!0;B=4==this.tokAt(q+1)?this.stringParameter(++q):"_orb";x.append(" phase ").append(J.util.Escape.eS(B));break;case 1073742104:case 1073742122:E="resolution";B=Float.$valueOf(this.floatParameter(++q));x.append(" resolution ").appendO(B);break;case 1073742124:E="reverseColor";B=Boolean.TRUE;x.append(" reversecolor");break;case 1073742146:E="sigma";B=Float.$valueOf(P=
this.floatParameter(++q));x.append(" sigma ").appendO(B);break;case 1113198597:E="geodesic";B=Float.$valueOf(this.floatParameter(++q));x.append(" geosurface ").appendO(B);g=!0;break;case 1073742154:E="sphere";B=Float.$valueOf(this.floatParameter(++q));x.append(" sphere ").appendO(B);g=!0;break;case 1073742156:E="squareData";B=Boolean.TRUE;x.append(" squared");break;case 1073741983:E=!g&&!h&&!j?"readFile":"mapColor";X=this.stringParameter(++q);null==X&&this.error(22);d&&(X=J.util.TextFormat.replaceAllCharacter(X,
"{,}|"," "));this.logMessages&&J.util.Logger.debug("pmesh inline data:\n"+X);B=this.chk?null:X;this.addShapeProperty(F,"fileName","");x.append(" INLINE ").append(J.util.Escape.eS(X));g=!0;break;case 4:var Ca=!g&&!h,E=Ca&&!j?"readFile":"mapColor",T=this.parameterAsString(q);if(T.startsWith("=")&&1<T.length){var sb=this.viewer.setLoadFormat(T,"_",!1),T=sb[0],tb=!Ca||!Float.isNaN(N)?null:sb[1];null!=tb&&!this.chk&&(N=J.script.SV.fValue(J.script.SV.getVariable(this.viewer.evaluateExpression(tb))),0<N&&
(Float.isNaN(P)||(N*=P,P=NaN,this.addShapeProperty(F,"sigma",Float.$valueOf(P))),this.addShapeProperty(F,"cutoff",Float.$valueOf(N)),x.append(" cutoff ").appendF(N)));0==R&&(pa="=xxxx",0>O&&(O=this.viewer.getCurrentModelIndex()),L=this.viewer.getModelUndeletedAtomsBitSet(O),this.getWithinDistanceVector(F,2,null,L,!1),x.append(" within 2.0 ").append(J.util.Escape.eBS(L)));Ca&&(bb=!0)}Ca&&(this.viewer.getParameter("_fileType").equals("Pdb")&&Float.isNaN(P)&&Float.isNaN(N))&&(this.addShapeProperty(F,
"sigma",Float.$valueOf(-1)),x.append(" sigma -1.0"));0==T.length&&(0>O&&(O=this.viewer.getCurrentModelIndex()),T=this.getFullPathName(),B=this.viewer.getModelAuxiliaryInfoValue(O,"jmolSurfaceInfo"));var Va=-1;null==B&&2==this.tokAt(q+1)&&this.addShapeProperty(F,"fileIndex",Integer.$valueOf(Va=this.intParameter(++q)));var Da=4==this.tokAt(q+1)?this.stringParameter(++q):null,g=!0;if(this.chk)break;var na,fa=null;null==B&&(0<=this.fullCommand.indexOf("# FILE0=")?(T=J.util.Parser.getQuotedAttribute(this.fullCommand,
"# FILE0"),1073741848==this.tokAt(q+1)&&(q+=2)):1073741848==this.tokAt(q+1)&&(fa=this.viewer.getFilePath(this.stringParameter(this.iToken=q+=2),!1),na=this.viewer.getFullPathNameOrError(fa),fa=na[0],""!==this.viewer.getPathForAllFiles()?(T=fa,fa=null):(this.addShapeProperty(F,"localName",fa),this.viewer.setPrivateKeyForShape(a))));T.startsWith("cache://")||(na=this.viewer.getFullPathNameOrError(T),T=na[0],null!=na[1]&&this.errorStr(17,T+":"+na[1]));J.util.Logger.info("reading isosurface data from "+
T);null!=Da&&(B=this.viewer.cacheGet(T+"#jmolSurfaceInfo"),this.addShapeProperty(F,"calculationType",Da));null==B&&(this.addShapeProperty(F,"fileName",T),null!=fa&&(T=fa),0<=Va&&x.append(" ").appendI(Va));x.append(" /*file*/").append(J.util.Escape.eS(T));null!=Da&&x.append(" ").append(J.util.Escape.eS(Da));break;case 4106:E="connections";switch(this.tokAt(++q)){case 10:case 1048577:B=[this.atomExpressionAt(q).nextSetBit(0)];break;default:B=[Clazz.floatToInt(this.floatParameterSet(q,1,1)[0])]}q=this.iToken;
break;case 1073741999:E="link";x.append(" link");break;case 1073741994:24!=a&&this.error(22);I=this.getPoint3f(this.iToken+1,!1);q=this.iToken;if(0>=I.x||0>=I.y||0>=I.z)break;I.x=Clazz.floatToInt(I.x);I.y=Clazz.floatToInt(I.y);I.z=Clazz.floatToInt(I.z);x.append(" lattice ").append(J.util.Escape.eP(I));j?(E="mapLattice",B=I):Fa=I;break;default:1073741824==this.theTok&&(E="thisID",B=X);if(!this.setMeshDisplayProperty(a,0,this.theTok)){if(J.script.T.tokAttr(this.theTok,1073741824)&&!ea){this.setShapeId(a,
q,ea);q=this.iToken;break}this.error(22)}0==b&&(b=q);q=this.slen-1}ea=12291!=this.theTok;$a&&g&&this.error(22);null!=E&&this.addShapeProperty(F,E,B)}if(!this.chk){if((p||r)&&!g)g=!0,this.addShapeProperty(F,"bsSolvent",r?new J.util.BS:this.lookupIdentifierValue("solvent")),this.addShapeProperty(F,"sasurface",Float.$valueOf(0));h&&(!g&&!j)&&(this.addShapeProperty(F,"nomap",Float.$valueOf(0)),g=!0);0<=t&&this.addShapeProperty(F,"getSurfaceSets",Integer.$valueOf(t-1));if(null!=qa)this.addShapeProperty(F,
"colorDiscrete",qa);else if("sets".equals(Z))this.addShapeProperty(F,"setColorScheme",null);else if(null!=Z){var Ea=this.viewer.getColorEncoder(Z);null!=Ea&&(Ea.isTranslucent=ab,Ea.hi=3.4028235E38,this.addShapeProperty(F,"remapColor",Ea))}if(g&&!f&&0!=x.indexOf(";")){F.add(0,["newObject",null]);var ub=null==D;ub&&(D=J.util.BSUtil.copy(this.viewer.getSelectionSet(!1)));0>O&&(O=this.viewer.getCurrentModelIndex());D.and(this.viewer.getModelUndeletedAtomsBitSet(O));null!=pa&&(1!=this.viewer.getModelBitSet(D,
!1).cardinality()&&this.errorStr(30,"ISOSURFACE "+pa),ub&&(F.add(0,["select",D]),0==x.indexOf("; isosurface map")&&(x=(new J.util.SB).append("; isosurface map select ").append(J.util.Escape.eBS(D)).append(x.substring(16)))))}n&&!z&&(g||this.addShapeProperty(F,"sasurface",Float.$valueOf(0)),j||(this.addShapeProperty(F,"map",Boolean.TRUE),this.addShapeProperty(F,"select",L),this.addShapeProperty(F,"sasurface",Float.$valueOf(0))),this.addShapeProperty(F,"slab",this.getCapSlabObject(-100,!1)));this.setShapeProperty(a,
"setProperties",F);bb&&(this.setShapeProperty(a,"token",Integer.$valueOf(1073742018)),this.setShapeProperty(a,"token",Integer.$valueOf(1073742046)),this.setShapeProperty(a,"token",Integer.$valueOf(1073741960)),x.append(" mesh nofill frontOnly"))}null!=Fa&&this.setShapeProperty(24,"lattice",Fa);0<b&&(this.setMeshDisplayProperty(a,b,0)||this.error(22));if(!this.chk){var ka=null,la=null;l&&(ka=this.getShapeProperty(a,"area"),Clazz.instanceOf(ka,Float)?this.viewer.setFloatProperty("isosurfaceArea",ka.floatValue()):
this.viewer.setUserVariable("isosurfaceArea",J.script.SV.getVariableAD(ka)));s&&(la=s?this.getShapeProperty(a,"volume"):null,Clazz.instanceOf(la,Float)?this.viewer.setFloatProperty("isosurfaceVolume",la.floatValue()):this.viewer.setUserVariable("isosurfaceVolume",J.script.SV.getVariableAD(la)));if(!f){var Q=null;if(j&&!g)this.setShapeProperty(a,"finalize",x.toString());else if(g&&(u=x.toString(),this.setShapeProperty(a,"finalize",(0==u.indexOf("; isosurface map")?"":" select "+J.util.Escape.eBS(D)+
" ")+u),Q=this.getShapeProperty(a,"ID"),null!=Q&&!this.tQuiet)){N=this.getShapeProperty(a,"cutoff").floatValue();Float.isNaN(N)&&!Float.isNaN(P)&&J.util.Logger.error("sigma not supported");Q+=" created";c&&(Q+=" with cutoff="+N);var Wa=this.getShapeProperty(a,"minMaxInfo");3.4028235E38!=Wa[0]&&(Q+=" min="+Wa[0]+" max="+Wa[1]);Q+="; "+J.viewer.JC.shapeClassBases[a].toLowerCase()+" count: "+this.getShapeProperty(a,"count");Q+=this.getIsosurfaceDataRange(a,"\n")}var Xa,Ya;if(l||s)Xa=l?"isosurfaceArea = "+
(Clazz.instanceOf(ka,Float)?""+ka:J.util.Escape.eAD(ka)):null,Ya=s?"isosurfaceVolume = "+(Clazz.instanceOf(la,Float)?""+la:J.util.Escape.eAD(la)):null,null==Q?(l&&this.showString(Xa),s&&this.showString(Ya)):(l&&(Q+="\n"+Xa),s&&(Q+="\n"+Ya));null!=Q&&this.showString(Q)}null!=Ha&&this.setShapeProperty(a,"translucency",Ha);this.setShapeProperty(a,"clear",null);if(v){var Za=this.getShapeProperty(a,"ID");this.viewer.cachePut("cache://isosurface_"+Za,this.getShapeProperty(a,"jvxlDataXml"));this.runScript('isosurface ID "'+
Za+'" delete;isosurface ID "'+Za+'"'+(0<=O?" model "+O:"")+' "cache://isosurface_'+this.getShapeProperty(a,"ID")+'"')}}}},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"setColorOptions",($fz=function(a,b,c,d){this.getToken(b);var e="opaque";if(1073742180==this.theTok)if(e="translucent",0>d){var f=this.isFloatParameter(b+1)?this.floatParameter(++b):3.4028235E38;this.setShapeTranslucency(c,null,"translucent",f,null);null!=a&&(a.append(" translucent"),3.4028235E38!=f&&a.append(" ").appendF(f))}else this.setMeshDisplayProperty(c,
b,this.theTok);else 1073742074==this.theTok?0<=d&&this.setMeshDisplayProperty(c,b,this.theTok):this.iToken--;d=Math.abs(d);for(f=0;f<d;f++)if(this.isColorParam(this.iToken+1)){var g=this.getArgbParam(++this.iToken);this.setShapeProperty(c,"colorRGB",Integer.$valueOf(g));null!=a&&a.append(" ").append(J.util.Escape.escapeColor(g))}else if(this.iToken<b)this.error(22);else break;return e},$fz.isPrivate=!0,$fz),"J.util.SB,~N,~N,~N");$_M(c$,"getColorRange",($fz=function(a){a=this.getArgbParam(a);1074790746!=
this.tokAt(++this.iToken)&&this.error(22);var b=this.getArgbParam(++this.iToken),c=2==this.tokAt(this.iToken+1)?this.intParameter(++this.iToken):0;return J.util.ColorEncoder.getColorSchemeList(J.util.ColorEncoder.getPaletteAtoB(a,b,c))},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getIsosurfaceDataRange",($fz=function(a,b){var c=this.getShapeProperty(a,"dataRange");return null!=c&&3.4028235E38!=c[0]&&c[0]!=c[1]?b+"isosurface full data range "+c[0]+" to "+c[1]+" with color scheme spanning "+c[2]+" to "+c[3]:
""},$fz.isPrivate=!0,$fz),"~N,~S");$_M(c$,"getWithinDistanceVector",($fz=function(a,b,c,d,e){var f=new J.util.JmolList,g=Array(2);if(null==d){var h=J.util.P3.new3(b,b,b),j=J.util.P3.newP(c);j.sub(h);h.add(c);g[0]=j;g[1]=h;f.addLast(c)}else c=this.viewer.getBoxInfo(d,-Math.abs(b)),g[0]=c.getBboxVertices()[0],g[1]=c.getBboxVertices()[7],1==d.cardinality()&&f.addLast(this.viewer.getAtomPoint3f(d.nextSetBit(0)));1==f.size()&&!e&&(this.addShapeProperty(a,"withinDistance",Float.$valueOf(b)),this.addShapeProperty(a,
"withinPoint",f.get(0)));this.addShapeProperty(a,e?"displayWithin":"withinPoints",[Float.$valueOf(b),g,d,f])},$fz.isPrivate=!0,$fz),"J.util.JmolList,~N,J.util.P3,J.util.BS,~B");$_M(c$,"setMeshDisplayProperty",($fz=function(a,b,c){var d=null,e=null,f=25==a,g=0==b;g||(c=this.getToken(b).tok);switch(c){case 1766856708:if(f)this.iToken++;else break;case 1073742074:case 1073742180:return g||this.colorShape(a,this.iToken,!1),!0;case 0:case 12291:case 1048589:case 1048588:case 12294:case 3145770:case 1610625028:case 3145768:1==
this.iToken&&(0<=a&&0==this.tokAt(2))&&this.setShapeProperty(a,"thisID",null);if(0==c)return 1==this.iToken;if(g)return!0;switch(c){case 12291:return this.setShapeProperty(a,"delete",null),!0;case 3145770:case 12294:c=1048588;break;case 3145768:c=1048589;break;case 1610625028:b+1==this.slen&&(c=1048589);break}case 1073741958:case 1073741862:case 1073741964:case 1073741898:case 1073742039:case 1113198595:case 1073742042:case 1073742018:case 1073742052:case 1073741938:case 1073742046:case 1073742182:case 1073742060:case 1073741960:case 1073742058:d=
"token",e=Integer.$valueOf(c)}if(null==d)return!1;if(g)return!0;this.setShapeProperty(a,d,e);0!=this.tokAt(this.iToken+1)&&(this.setMeshDisplayProperty(a,++this.iToken,0)||--this.iToken);return!0},$fz.isPrivate=!0,$fz),"~N,~N,~N");$_M(c$,"bind",($fz=function(){var a=this.stringParameter(1),b=this.parameterAsString(2);this.checkLength(3);this.chk||this.viewer.bindAction(a,b,null,null)},$fz.isPrivate=!0,$fz));$_M(c$,"unbind",($fz=function(){1!=this.slen&&this.checkLength23();var a=this.optParameterAsString(1),
b=this.optParameterAsString(2);if(0==a.length||1048579==this.tokAt(1))a=null;if(0==b.length||1048579==this.tokAt(2))b=null;null==b&&(null!=a&&0<=J.viewer.ActionManager.getActionFromName(a))&&(b=a,a=null);this.chk||this.viewer.unBindAction(a,b)},$fz.isPrivate=!0,$fz));$_M(c$,"undoRedoMove",($fz=function(){var a=1,b=2;switch(this.tokAt(1)){case 0:b=1;break;case 1048579:a=0;break;case 2:a=this.intParameter(1);break;default:this.error(22)}this.checkLength(b);this.chk||this.viewer.undoMoveAction(this.tokAt(0),
a)},$fz.isPrivate=!0,$fz));$_M(c$,"getAtomsNearSurface",function(a,b){var c=[b,null,null];if(this.chk)return new J.util.BS;if(this.getShapePropertyData(24,"getVertices",c))return this.viewer.getAtomsNearPts(a,c[1],c[2]);c[1]=Integer.$valueOf(0);c[2]=Integer.$valueOf(-1);return this.getShapePropertyData(22,"getCenter",c)?this.viewer.getAtomsNearPt(a,c[2]):new J.util.BS},"~N,~S");c$.getFloatEncodedInt=$_M(c$,"getFloatEncodedInt",function(a){var b=a.indexOf(".");if(1>b||"-"==a.charAt(0)||a.endsWith(".")||
a.contains(".0"))return 2147483647;var c=0,d=0;if(0<b)try{c=Integer.parseInt(a.substring(0,b)),0>c&&(c=-c)}catch(e){if(Clazz.exceptionOf(e,NumberFormatException))c=-1;else throw e;}if(b<a.length-1)try{d=Integer.parseInt(a.substring(b+1))}catch(f){if(!Clazz.exceptionOf(f,NumberFormatException))throw f;}c=1E6*c+d;return 0>c?2147483647:c},"~S");c$.getPartialBondOrderFromFloatEncodedInt=$_M(c$,"getPartialBondOrderFromFloatEncodedInt",function(a){return(Clazz.doubleToInt(a/1E6)%6<<5)+(a%1E6&31)},"~N");
c$.getBondOrderFromString=$_M(c$,"getBondOrderFromString",function(a){return 0>a.indexOf(" ")?J.util.JmolEdge.getBondOrderFromString(a):0==a.toLowerCase().indexOf("partial ")?J.script.ScriptEvaluator.getPartialBondOrderFromString(a.substring(8).trim()):131071},"~S");c$.getPartialBondOrderFromString=$_M(c$,"getPartialBondOrderFromString",($fz=function(a){return J.script.ScriptEvaluator.getPartialBondOrderFromFloatEncodedInt(J.script.ScriptEvaluator.getFloatEncodedInt(a))},$fz.isPrivate=!0,$fz),"~S");
Clazz.overrideMethod(c$,"addHydrogensInline",function(a,b,c){var d=this.viewer.getAtomModelIndex(a.nextSetBit(0));if(d!=this.viewer.modelSet.modelCount-1)return new J.util.BS;a=this.viewer.getModelUndeletedAtomsBitSet(d);this.viewer.setAppendNew(!1);for(var e=this.viewer.modelSet.getAtomCount(),f=this.viewer.modelSet.getAtomCountInModel(d),g=new J.util.SB,h=0;h<b.size();h++){var j=b.get(h);g.append(";  connect 0 100 ").append("({"+e++ +"}) ").append("({"+j.index+"}) group;")}b=new J.util.SB;b.appendI(c.length).append("\n").append("Viewer.AddHydrogens").append("#noautobond").append("\n");
for(h=0;h<c.length;h++)b.append("H ").appendF(c[h].x).append(" ").appendF(c[h].y).append(" ").appendF(c[h].z).append(" - - - - ").appendI(++f).appendC("\n");this.viewer.loadInlineScript(b.toString(),"\n",!0,null);this.runScriptBuffer(g.toString(),null);c=this.viewer.getModelUndeletedAtomsBitSet(d);c.andNot(a);return c},"J.util.BS,J.util.JmolList,~A");Clazz.defineStatics(c$,"EXPRESSION_KEY","e_x_p_r_e_s_s_i_o_n","scriptLevelMax",100,"tryPt",0,"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,"iProcess",0)});Clazz.declarePackage("J.api");Clazz.declareInterface(J.api,"JmolScriptEvaluator");Clazz.declarePackage("J.script");
Clazz.load(["J.script.ScriptCompilationTokenParser","J.util.JmolList"],"J.script.ScriptCompiler","java.lang.Boolean $.Character $.Float java.util.Hashtable J.api.Interface J.i18n.GT J.io.JmolBinary J.modelset.Bond $.Group J.script.ContextToken $.SV $.ScriptContext $.ScriptEvaluator $.ScriptFlowContext $.ScriptFunction $.T J.util.ArrayUtil $.BS $.Escape $.Logger $.Parser $.SB $.TextFormat J.viewer.Viewer".split(" "),function(){c$=Clazz.decorateAsClass(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.isUserToken=this.isComment=this.isShowCommand=this.allowMissingEnd=!1;this.tokInitialPlusPlus=0;this.vPush=null;this.pushCount=0;this.chFirst="\x00";Clazz.instantialize(this,arguments)},J.script,"ScriptCompiler",J.script.ScriptCompilationTokenParser);Clazz.prepareFields(c$,function(){this.vPush=new J.util.JmolList});Clazz.makeConstructor(c$,function(a){Clazz.superConstructor(this,
J.script.ScriptCompiler,[]);this.viewer=a},"J.viewer.Viewer");$_M(c$,"compile",function(a,b,c,d,e,f){this.isCheckOnly=f;this.filename=a;this.isSilent=d;this.script=b;this.logMessages=!d&&!c&&e;this.preDefining="#predefine"===a;(a=this.compile0(!0))||this.handleError();c=new J.script.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.aatoken=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.contextVariables=this.contextVariables;return c},"~S,~S,~B,~B,~B,~B");$_M(c$,
"addContextVariable",($fz=function(a){this.theToken=J.script.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),J.script.ScriptCompiler.addContextVariable(this.contextVariables,a)):this.thisFunction.addVariable(a,!1)},$fz.isPrivate=!0,$fz),"~S");c$.addContextVariable=$_M(c$,"addContextVariable",function(a,b){a.put(b,J.script.SV.newVariable(4,
"").setName(b))},"java.util.Map,~S");$_M(c$,"isContextVariable",($fz=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)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"cleanScriptComments",($fz=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 J.io.JmolBinary.getEmbeddedScript(a)},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"addTokenToPrefix",($fz=function(a){this.logMessages&&J.util.Logger.info("addTokenToPrefix"+a);this.ltoken.addLast(a);0!=a.tok&&(this.lastToken=a)},$fz.isPrivate=
!0,$fz),"J.script.T");$_M(c$,"compile0",($fz=function(a){this.vFunctionStack=new J.util.JmolList;this.htUserFunctions=new java.util.Hashtable;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&&this.viewer.setStateScriptVersion(this.script.substring(this.ichToken+21,this.ptSemi).trim());this.cchScript=this.script.length;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=J.script.T.tokenOff;this.vBraces=new J.util.JmolList;this.vPush=new J.util.JmolList;this.parenCount=this.braceCount=this.iBrace=this.pushCount=0;this.ptSemi=-10;this.cchToken=
0;this.lnLength=8;this.lineNumbers=Clazz.newShortArray(this.lnLength,0);this.lineIndices=Clazz.newIntArray(this.lnLength,2,0);this.isNewSet=this.isSetBrace=!1;this.ptNewSetModifier=1;this.checkImpliedScriptCmd=this.iHaveQuotedString=this.isShowScriptOutput=!1;this.lltoken=new J.util.JmolList;this.ltoken=new J.util.JmolList;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.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.lookingAtEndOfStatement()}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;this.setAaTokenCompiled();return null==this.flowContext||this.errorStr(11,J.script.T.nameOf(this.flowContext.token.tok))}if(0<
this.nTokens)switch(this.checkSpecialParameterSyntax()){case 2:continue;case 4:return!1}if(this.lookingAtLookupToken(this.ichToken)){var c=this.getPrefixToken();switch(this.parseKnownToken(c)){case 2:continue;case 4:return!1}switch(this.parseCommandParameter(c)){case 2:continue;case 4:return!1}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(J.script.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))}}}},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"setAaTokenCompiled",($fz=function(){this.aatokenCompiled=this.lltoken.toArray(Array(this.lltoken.size()))},$fz.isPrivate=!0,$fz));$_M(c$,"lookingAtLeadingWhitespace",($fz=function(){for(var a=this.ichToken;a<this.cchScript&&J.script.ScriptCompiler.isSpaceOrTab(this.script.charAt(a));)++a;
this.isLineContinuation(a,!0)&&(a+=1+this.nCharNewLine(a+1));this.cchToken=a-this.ichToken;return 0<this.cchToken},$fz.isPrivate=!0,$fz));$_M(c$,"isLineContinuation",($fz=function(a,b){var c=a+2<this.cchScript&&"\\"==this.script.charAt(a)&&0<this.nCharNewLine(a+1)||b&&this.lookingAtMathContinuation(a);c&&this.lineCurrent++;return c},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"lookingAtMathContinuation",($fz=function(a){var b;if(a>=this.cchScript||0==(b=this.nCharNewLine(a))||1048586==this.lastToken.tok)return!1;
if(0<this.parenCount||0<this.bracketCount)return!0;if((1085443!=this.tokCommand||!this.isNewSet)&&36865!=this.tokCommand&&36869!=this.tokCommand)return!1;if(this.lastToken.tok==this.tokLastMath)return!0;for(a+=b;a<this.cchScript&&J.script.ScriptCompiler.isSpaceOrTab(this.script.charAt(a));)++a;return this.lookingAtLookupToken(a)&&1==this.tokLastMath},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"lookingAtEndOfLine",($fz=function(){var a=this.ichEnd=this.ichToken;if(this.ichToken>=this.cchScript)return this.ichEnd=
this.cchScript,!0;a=this.nCharNewLine(a);if(0==a)return!1;this.ichEnd=this.ichToken;this.cchToken=a;return!0},$fz.isPrivate=!0,$fz));$_M(c$,"nCharNewLine",($fz=function(a){var b;return a>=this.cchScript?0:"\r"!=(b=this.script.charAt(a))?"\n"==b?1:0:++a<this.cchScript&&"\n"==this.script.charAt(a)?2:1},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"lookingAtEndOfStatement",($fz=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},$fz.isPrivate=!0,$fz));$_M(c$,"lookingAtComment",($fz=function(){var a=this.script.charAt(this.ichToken),b=this.ichToken,c=-1;if(this.ichToken==this.ichCurrentCommand&&"$"==a){for(this.isShowCommand=this.isShowScriptOutput=!0;"]"!=a&&b<this.cchScript&&!this.eol(a=this.script.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=++b<this.cchScript&&"*"==(a=this.script.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 d=0>c;if(d&&!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(!d&&";"==a)continue;break}0<=c||"#"==a&&(c=b)}if(0>c)return 0;this.ichComment=c;if(d&&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(d&&this.cchScript>this.ichToken+3&&"j"==this.script.charAt(this.ichToken+1)&&"x"==this.script.charAt(this.ichToken+2)&&J.script.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},$fz.isPrivate=!0,$fz));$_M(c$,"processTokenList",($fz=function(a,b){if(0<this.nTokens||null!=this.comment){if(0==this.nTokens)this.ichCurrentCommand=this.ichToken,null!=this.comment&&(this.isComment=!0,this.addTokenToPrefix(J.script.T.o(0,this.comment)));else if(0<this.setBraceCount&&this.endOfLine&&this.ichToken<this.cchScript)return 2;if(135271429==this.tokCommand&&this.checkImpliedScriptCmd){var c=2==this.nTokens?
this.lastToken.value.toString().toUpperCase():null;if(2<this.nTokens&&!(269484048==this.tokAt(2)&&this.ltoken.get(1).value.toString().endsWith(".spt"))||null!=c&&(c.endsWith(".SORT")||c.endsWith(".REVERSE")||0<=c.indexOf(".SORT(")||0<=c.indexOf(".REVERSE(")))return this.ichToken=this.ichCurrentCommand,this.nTokens=0,this.ltoken.clear(),this.tokCommand=this.cchToken=0,2}this.isNewSet&&2<this.nTokens&&1048584==this.tokAt(2)&&(1276117010==this.tokAt(3)||1141899269==this.tokAt(3))?(this.ltoken.set(0,
J.script.T.tokenSet),this.ltoken.add(1,this.ltoken.get(1))):0!=this.tokInitialPlusPlus&&(this.isNewSet||this.checkNewSetCommand(),this.tokenizePlusPlus(this.tokInitialPlusPlus,!0));this.iCommand=this.lltoken.size();null!=this.thisFunction&&0>this.thisFunction.cmdpt0&&(this.thisFunction.cmdpt0=this.iCommand);1==this.nTokens&&1==this.braceCount&&(null==this.lastFlowCommand?(this.parenCount=this.setBraceCount=this.braceCount=0,this.ltoken.remove(0),this.iBrace++,c=J.script.ContextToken.newContext(!0),
this.addTokenToPrefix(this.setCommand(c)),this.pushCount++,this.vPush.addLast(c),this.vBraces.addLast(this.tokenCommand)):(this.parenCount=this.setBraceCount=0,this.setCommand(this.lastFlowCommand),102439!=this.lastFlowCommand.tok&&1048586==this.tokAt(0)&&this.ltoken.remove(0),this.lastFlowCommand=null));if(0<this.bracketCount||0<this.setBraceCount||0<this.parenCount||1==this.braceCount&&!this.checkFlowStartBrace(!0))return this.error(1==this.nTokens?2:4),4;this.needRightParen&&(this.addTokenToPrefix(J.script.T.tokenRightParen),
this.needRightParen=!1);if(0<this.ltoken.size()){if(b&&!this.compileCommand())return 4;this.logMessages&&J.util.Logger.debug("-------------------------------------");c=!0;switch(this.tokCommand){case 364558:case 102436:case 135368713:case 1150985:c=0<this.atokenInfix.length&&2147483647!=this.atokenInfix[0].intValue}c&&(this.iCommand==this.lnLength&&(this.lineNumbers=J.util.ArrayUtil.doubleLengthShort(this.lineNumbers),c=Clazz.newIntArray(2*this.lnLength,2,0),System.arraycopy(this.lineIndices,0,c,
0,this.lnLength),this.lineIndices=c,this.lnLength*=2),this.lineNumbers[this.iCommand]=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());1085443==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}if(this.endOfLine){if(null!=this.flowContext&&this.flowContext.checkForceEndIf())return this.isComment||this.forceFlowEnd(this.flowContext.token),this.isEndOfCommand=!0,this.cchToken=0,this.ichCurrentCommand=this.ichToken,this.lineCurrent--,2;this.isShowCommand=this.isComment=!1;
++this.lineCurrent}if(this.ichToken>=this.cchScript){this.setCommand(J.script.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},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"compileCommand",($fz=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(J.script.T.tokenScript);this.addTokenToPrefix(J.script.T.o(4,a));this.isNewSet=!1}}this.setCommand(this.tokenAt(0));a=this.ltoken.size();1==a&&J.script.T.tokAttr(this.tokCommand,524288)&&this.addTokenToPrefix(J.script.T.tokenOn);if(null!=this.tokenAndEquals){for(var b,c=0,c=1;c<a&&269484242!=this.tokAt(c);c++);a=c;c++;if(this.ltoken.size()<c)J.util.Logger.error("COMPILER ERROR! - andEquals ");else{for(b=1;b<a;b++,c++)this.ltoken.add(c,
this.tokenAt(b));this.ltoken.set(a,J.script.T.tokenEquals);this.ltoken.add(c,this.tokenAndEquals);this.ltoken.add(++c,J.script.T.tokenLeftParen);this.addTokenToPrefix(J.script.T.tokenRightParen)}}this.atokenInfix=this.ltoken.toArray(Array(this.ltoken.size()));if(this.logMessages){J.util.Logger.debug("token list:");for(c=0;c<this.atokenInfix.length;c++)J.util.Logger.debug(c+": "+this.atokenInfix[c]);J.util.Logger.debug("vBraces list:");for(c=0;c<this.vBraces.size();c++)J.util.Logger.debug(c+": "+this.vBraces.get(c));
J.util.Logger.debug("-------------------------------------")}return this.compileExpressions()},$fz.isPrivate=!0,$fz));$_M(c$,"tokenAt",($fz=function(a){return this.ltoken.get(a)},$fz.isPrivate=!0,$fz),"~N");Clazz.overrideMethod(c$,"tokAt",function(a){return a<this.ltoken.size()?this.tokenAt(a).tok:0},"~N");$_M(c$,"setCommand",($fz=function(a){this.tokenCommand=a;null==a?this.tokCommand=0:(this.tokCommand=this.tokenCommand.tok,this.isMathExpressionCommand=1073741824==this.tokCommand||J.script.T.tokAttr(this.tokCommand,
36864),this.isSetOrDefine=1085443==this.tokCommand||1060866==this.tokCommand,this.isCommaAsOrAllowed=J.script.T.tokAttr(this.tokCommand,12288));return a},$fz.isPrivate=!0,$fz),"J.script.T");$_M(c$,"replaceCommand",($fz=function(a){this.ltoken.remove(0);this.ltoken.add(0,this.setCommand(a))},$fz.isPrivate=!0,$fz),"J.script.T");$_M(c$,"getPrefixToken",($fz=function(){var a=this.script.substring(this.ichToken,this.ichToken+this.cchToken),b=a.toLowerCase(),c=this.isContextVariable(b);0==this.nTokens&&
(this.isUserToken=c);if(1==this.nTokens&&(135368713==this.tokCommand||102436==this.tokCommand||36868==this.tokCommand)||0!=this.nTokens&&c||this.isUserFunction(b)&&(null==this.thisFunction||!this.thisFunction.name.equals(b)))a=b,this.theToken=null;else if(1==a.length){if(null==(this.theToken=J.script.T.getTokenFromName(a))&&null!=(this.theToken=J.script.T.getTokenFromName(b)))this.theToken=J.script.T.tv(this.theToken.tok,this.theToken.intValue,a)}else a=b,this.theToken=J.script.T.getTokenFromName(a);
null==this.theToken&&(this.theToken=0==a.indexOf("property_")?J.script.T.o(1716520973,a):J.script.T.o(1073741824,a));this.theTok=this.theToken.tok;return a},$fz.isPrivate=!0,$fz));$_M(c$,"checkSpecialParameterSyntax",($fz=function(){var a;if(this.nTokens==this.ptNewSetModifier){a=this.script.charAt(this.ichToken);var b=0<="+-\\*/&|=".indexOf(a),c=b||"."==a||"["==a,d=this.ichToken+1>=this.cchScript?0:this.script.charAt(this.ichToken+1);if(!this.isNewSet&&this.isUserToken&&c&&("="==a||d==a||"="==d))this.isNewSet=
!0;if(this.isNewSet||1085443==this.tokCommand||J.script.T.tokAttr(this.tokCommand,536870912))if("="==a&&(this.setEqualPt=this.ichToken),J.script.T.tokAttr(this.tokCommand,536870912)&&"="==a||(this.isNewSet||this.isSetBrace)&&c)switch(this.setCommand(b?J.script.T.tokenSet:"["==a&&!this.isSetBrace?J.script.T.tokenSetArray:J.script.T.tokenSetProperty),this.ltoken.add(0,this.tokenCommand),this.cchToken=1,a){case "[":return this.addTokenToPrefix(J.script.T.o(269484096,"[")),this.bracketCount++,2;case ".":return this.addTokenToPrefix(J.script.T.o(1048584,
".")),2;case "-":case "+":case "*":case "/":case "\\":case "&":case "|":if(0==d.charCodeAt(0))return this.ERROR(4);if(d!=a&&"="!=d)return this.ERROR(1,'"'+a+'"');break;default:return this.lastToken=J.script.T.tokenMinus,2}}if(this.lookingAtString(!J.script.T.tokAttr(this.tokCommand,20480))){if(0>this.cchToken)return this.ERROR(4);(1085443==this.tokCommand&&2==this.nTokens&&545259546==this.lastToken.tok||135271426==this.tokCommand||1610616835==this.tokCommand||135271429==this.tokCommand)&&!this.iHaveQuotedString?
1073741983==this.lastToken.tok?a=this.getUnescapedStringLiteral():(a=this.script.substring(this.ichToken+1,this.ichToken+this.cchToken-1),0<=a.indexOf("\\u")&&(a=J.util.Escape.unescapeUnicode(a))):a=this.getUnescapedStringLiteral();this.iHaveQuotedString=!0;if(135271426==this.tokCommand&&135270407==this.lastToken.tok||135270407==this.tokCommand&&0>a.indexOf("@")){if(!this.getData(a))return this.ERROR(11,"data")}else this.addTokenToPrefix(J.script.T.o(4,a)),J.script.T.tokAttr(this.tokCommand,20480)&&
(this.isEndOfCommand=!0);return 2}if(4156==this.tokCommand&&1==this.nTokens&&this.charToken()){var e=this.script.substring(this.ichToken,this.ichToken+this.cchToken),f=J.util.Parser.parseInt(e);-2147483648==f||1E3>Math.abs(f)?this.addTokenToPrefix(J.script.T.o(1073741824,e)):this.addTokenToPrefix(J.script.T.i(f));return 2}switch(this.tokCommand){case 135271426:case 135271429:case 135270410:if("@"==this.script.charAt(this.ichToken))return this.iHaveQuotedString=!0,0;if(135271426==this.tokCommand){if((1==
this.nTokens||2==this.nTokens&&1073741839==this.tokAt(1))&&this.lookingAtLoadFormat()){e=this.script.substring(this.ichToken,this.ichToken+this.cchToken);f=J.script.T.getTokenFromName(e.toLowerCase());switch(null==f?0:f.tok){case 1073742015:case 1073741839:if(1!=this.nTokens)return 4;case 135270407:case 1229984263:case 1073741983:case 1095766028:case 135267336:case 536870926:case 4156:this.addTokenToPrefix(f);break;default:f=0==e.indexOf("=")||0==e.indexOf("$")?4:J.util.Parser.isOneOf(e=e.toLowerCase(),
"xyz;vxyz;vibration;temperature;occupancy;partialcharge")?1073741824:0,0!=f&&(this.addTokenToPrefix(J.script.T.o(f,e)),this.iHaveQuotedString=4==f)}return 2}if("{"==this.script.charAt(this.ichToken)||0<this.parenCount)break;if(null!=(a=this.lookingAtBitset()))return this.addTokenToPrefix(J.script.T.o(10,a)),2}if(!this.iHaveQuotedString&&this.lookingAtImpliedString(!1,135271426==this.tokCommand,1<this.nTokens||135271429!=this.tokCommand))return a=this.script.substring(this.ichToken,this.ichToken+this.cchToken),
135271429==this.tokCommand&&a.startsWith("javascript:")&&(this.lookingAtImpliedString(!0,!0,!0),a=this.script.substring(this.ichToken,this.ichToken+this.cchToken)),this.addTokenToPrefix(J.script.T.o(4,a)),this.iHaveQuotedString=!0,2;break;case 135270421: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)){b=this.cchToken;a=this.script.substring(this.ichToken,
this.ichToken+this.cchToken);if(0>a.indexOf(" "))return this.addTokenToPrefix(J.script.T.o(4,a)),this.iHaveQuotedString=!0,2;this.cchToken=b}}}if(J.script.T.tokAttr(this.tokCommand,20480)&&!(135271429==this.tokCommand&&this.iHaveQuotedString)&&this.lookingAtImpliedString(!0,!0,!0))return a=this.script.substring(this.ichToken,this.ichToken+this.cchToken),1826248715==this.tokCommand&&J.util.Parser.isOneOf(a.toLowerCase(),"on;off;hide;display")?this.addTokenToPrefix(J.script.T.getTokenFromName(a.toLowerCase())):
this.addTokenToPrefix(J.script.T.o(4,a)),2;if(!Float.isNaN(a=this.lookingAtExponential()))return this.addTokenToPrefix(J.script.T.o(3,Float.$valueOf(a))),2;if(this.lookingAtObjectID(1==this.nTokens))return this.addTokenToPrefix(J.script.T.getTokenFromName("$")),this.addTokenToPrefix(J.script.T.o(1073741824,this.script.substring(this.ichToken,this.ichToken+this.cchToken))),2;if(this.lookingAtDecimal())return a=J.util.Parser.fVal(this.script.substring(this.ichToken,this.ichToken+this.cchToken)),e=J.script.ScriptEvaluator.getFloatEncodedInt(this.script.substring(this.ichToken,
this.ichToken+this.cchToken)),this.addTokenToPrefix(J.script.T.tv(3,e,Float.$valueOf(a))),2;if(this.lookingAtSeqcode()){a=this.script.charAt(this.ichToken);try{e="*"==a||"^"==a?2147483647:Integer.parseInt(this.script.substring(this.ichToken,this.ichToken+this.cchToken-2));f=this.script.charAt(this.ichToken+this.cchToken-1);"^"==f&&(f=" ");0>e&&(e=-e,this.addTokenToPrefix(J.script.T.tokenMinus));var g=J.modelset.Group.getSeqcodeFor(e,f);this.addTokenToPrefix(J.script.T.tv(5,g,"seqcode"));return 2}catch(h){if(Clazz.exceptionOf(h,
NumberFormatException))return this.ERROR(9,""+a);throw h;}}e=this.lookingAtInteger();if(2147483647!=e){f=this.script.substring(this.ichToken,this.ichToken+this.cchToken);if(102407==this.tokCommand||102408==this.tokCommand){if(1!=this.nTokens)return this.ERROR(0);g=null==this.flowContext?null:this.flowContext.getBreakableContext(e=Math.abs(e));if(null==g)return this.ERROR(1,this.tokenCommand.value);this.tokenAt(0).intValue=g.pt0}0==e&&f.equals("-0")&&this.addTokenToPrefix(J.script.T.tokenMinus);this.addTokenToPrefix(J.script.T.tv(2,
e,f));return 2}if(!this.isMathExpressionCommand&&0==this.parenCount||1073741824!=this.lastToken.tok&&!J.script.ScriptCompilationTokenParser.tokenAttr(this.lastToken,135266304))if(e="["==this.script.charAt(this.ichToken),a=this.lookingAtBitset(),null==a){if(e&&(e=this.lookingAtMatrix(),Clazz.instanceOf(e,J.util.Matrix3f)||Clazz.instanceOf(e,J.util.Matrix4f)))return this.addTokenToPrefix(J.script.T.o(Clazz.instanceOf(e,J.util.Matrix3f)?11:12,e)),2}else return e?this.addTokenToPrefix(J.script.T.o(10,
new J.modelset.Bond.BondSet(a))):this.addTokenToPrefix(J.script.T.o(10,a)),2;return 0},$fz.isPrivate=!0,$fz));$_M(c$,"lookingAtMatrix",($fz=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=J.util.Escape.unescapeMatrix(this.script.substring(this.ichToken,a+2))))return null;this.cchToken=a+2-this.ichToken;return b},$fz.isPrivate=!0,$fz));$_M(c$,"parseKnownToken",
($fz=function(a){var b;0!=this.tokLastMath&&(this.tokLastMath=this.theTok);if(null!=this.flowContext&&102410==this.flowContext.token.tok&&null!=this.flowContext.$var&&102411!=this.theTok&&102413!=this.theTok&&102410!=this.lastToken.tok)return this.ERROR(1,a);switch(this.theTok){case 1073741824:if(0==this.nTokens&&!this.checkImpliedScriptCmd){if("'"==a.charAt(0))return this.addTokenToPrefix(this.setCommand(J.script.T.tokenScript)),this.cchToken=0,2;if(this.ichToken+this.cchToken<this.cchScript&&"."==
this.script.charAt(this.ichToken+this.cchToken))return this.addTokenToPrefix(this.setCommand(J.script.T.tokenScript)),this.nTokens=1,this.cchToken=0,this.checkImpliedScriptCmd=!0,2}break;case 269484242:if(this.nSemiSkip==this.forPoint3&&this.nTokens==this.ptSemi+2)return b=this.lastToken,this.addTokenToPrefix(J.script.T.tokenEquals),this.addTokenToPrefix(b),b=J.script.T.getTokenFromName(a.substring(0,1)),this.addTokenToPrefix(b),this.addTokenToPrefix(J.script.T.tokenLeftParen),this.needRightParen=
!0,2;this.checkNewSetCommand();if(1085443==this.tokCommand){this.tokenAndEquals=J.script.T.getTokenFromName(a.substring(0,1));this.setEqualPt=this.ichToken;break}if(554176565==this.tokCommand||554176526==this.tokCommand){this.addTokenToPrefix(this.tokenCommand);this.replaceCommand(J.script.T.tokenSet);this.tokenAndEquals=J.script.T.getTokenFromName(a.substring(0,1));this.setEqualPt=this.ichToken;break}return 2;case 1150985: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 135369224:if(0<this.bracketCount)break;case 102411:case 102413:case 102402:case 135369225:case 102410:case 102406:case 102412:if(1<this.nTokens&&1085443!=this.tokCommand)return this.isEndOfCommand=!0,null!=this.flowContext&&(this.flowContext.forceEndIf=!0),this.cchToken=0,2;break;case 269484225:case 269484226:!this.isNewSet&&1==this.nTokens&&this.checkNewSetCommand();if(this.isNewSet&&0==this.parenCount&&0==this.bracketCount&&
this.ichToken<=this.setEqualPt)return this.tokenizePlusPlus(this.theTok,!1),2;if(this.nSemiSkip==this.forPoint3&&this.nTokens==this.ptSemi+2)return b=this.lastToken,this.addTokenToPrefix(J.script.T.tokenEquals),this.addTokenToPrefix(b),this.addTokenToPrefix(269484225==this.theTok?J.script.T.tokenMinus:J.script.T.tokenPlus),this.addTokenToPrefix(J.script.T.i(1)),2;break;case 269484436:0==this.parenCount&&0==this.bracketCount&&(this.setEqualPt=this.ichToken);break;case 1048584:1085443==this.tokCommand&&
(0==this.parenCount&&0==this.bracketCount&&this.ichToken<this.setEqualPt)&&(this.ltoken.add(1,J.script.T.tokenExpressionBegin),this.addTokenToPrefix(J.script.T.tokenExpressionEnd),this.ltoken.set(0,J.script.T.tokenSetProperty),this.setEqualPt=0);break;case 1048586:if(this.braceCount++,1==this.braceCount&&0==this.parenCount&&this.checkFlowStartBrace(!1))return this.isEndOfCommand=!0,null!=this.flowContext&&(this.flowContext.forceEndIf=!1),2;case 269484048:this.parenCount++;if(1<this.nTokens&&(135280132==
this.lastToken.tok||135369224==this.lastToken.tok||135369225==this.lastToken.tok))this.nSemiSkip+=2;break;case 1048590: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.braceCount=this.parenCount=this.nSemiSkip=0,102411!=this.theToken.tok&&102413!=this.theToken.tok&&this.vBraces.addLast(this.theToken),this.iBrace++,this.isEndOfCommand=!0,this.ichEnd=this.ichToken,2;this.braceCount--;case 269484049:this.parenCount--;
if(0>this.parenCount)return this.ERROR(16,a);0==this.parenCount&&(this.nSemiSkip=0);this.needRightParen&&(this.addTokenToPrefix(J.script.T.tokenRightParen),this.needRightParen=!1);break;case 269484096:0<this.ichToken&&Character.isWhitespace(this.script.charAt(this.ichToken-1))&&this.addTokenToPrefix(J.script.T.tokenSpaceBeforeSquare);this.bracketCount++;break;case 269484097:if(this.bracketCount--,0>this.bracketCount)return this.ERROR(16,"]")}return 0},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"tokenizePlusPlus",
($fz=function(a,b){b&&(this.setCommand(J.script.T.tokenSet),this.ltoken.add(0,this.tokenCommand));this.nTokens=this.ltoken.size();this.addTokenToPrefix(J.script.T.tokenEquals);this.setEqualPt=0;for(var c=1;c<this.nTokens;c++)this.addTokenToPrefix(this.ltoken.get(c));this.addTokenToPrefix(269484225==a?J.script.T.tokenMinus:J.script.T.tokenPlus);this.addTokenToPrefix(J.script.T.i(1))},$fz.isPrivate=!0,$fz),"~N,~B");$_M(c$,"checkNewSetCommand",($fz=function(){var a=this.ltoken.get(0).value.toString();
if(!this.isContextVariable(a.toLowerCase()))return!1;a=this.setNewSetCommand(!1,a);this.setCommand(J.script.T.tokenSet);this.ltoken.add(0,this.tokenCommand);this.ltoken.set(1,a);return!0},$fz.isPrivate=!0,$fz));$_M(c$,"parseCommandParameter",($fz=function(a){this.nTokens=this.ltoken.size();switch(this.tokCommand){case 0:this.lastToken=J.script.T.tokenOff;this.ichCurrentCommand=this.ichEnd=this.ichToken;this.setCommand(this.theToken);J.script.T.tokAttr(this.tokCommand,102400)&&(this.lastFlowCommand=
this.tokenCommand);var b=this.checkFlowEndBrace();if(4==b)return 4;if(2==b)return this.isEndOfCommand=!0,this.cchToken=0,2;if(J.script.T.tokAttr(this.tokCommand,102400)){if(!this.checkFlowCommand(this.tokenCommand.value))return 4;this.theToken=this.tokenCommand;102411==this.theTok&&(this.addTokenToPrefix(this.tokenCommand),this.theToken=J.script.T.tokenLeftParen);break}if(269484066==this.theTok){this.braceCount++;this.isEndOfCommand=!0;break}if(1048590==this.theTok)return this.vBraces.addLast(this.tokenCommand),
this.iBrace++,this.tokCommand=0,2;1048586!=this.theTok&&(this.lastFlowCommand=null);if(J.script.T.tokAttr(this.tokCommand,4096))break;if(this.isSetBrace=1048586==this.theTok)this.lookingAtBraceSyntax()||(this.isEndOfCommand=!0,null!=this.flowContext&&(this.flowContext.forceEndIf=!1));else switch(this.theTok){case 269484226:case 269484225:return this.tokInitialPlusPlus=this.theTok,this.tokCommand=0,2;case 1073741824:case 36868:case 1060866:case 269484048:break;default:if(!J.script.T.tokAttr(this.theTok,
1073741824)&&!J.script.T.tokAttr(this.theTok,536870912)&&!this.isContextVariable(a))return this.commandExpected(),4}this.theToken=this.setNewSetCommand(this.isSetBrace,a);break;case 102412:switch(this.nTokens){case 1:if(269484048!=this.theTok)return this.ERROR(15,"(");break;case 2:269484049!=this.theTok&&(this.tokenCommand.name0=a);this.addContextVariable(a);break;case 3:if(269484049!=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 135368713:if(0==this.tokenCommand.intValue){if(1!=this.nTokens)break;this.tokenCommand.value=a;return 2}if(1==this.nTokens){null!=this.thisFunction&&this.vFunctionStack.add(0,this.thisFunction);this.thisFunction=102436==this.tokCommand?J.script.ScriptCompiler.newScriptParallelProcessor(a,this.tokCommand):new J.script.ScriptFunction(a,this.tokCommand);this.htUserFunctions.put(a,Boolean.TRUE);this.flowContext.setFunction(this.thisFunction);break}if(2==
this.nTokens){if(269484048!=this.theTok)return this.ERROR(15,"(");break}if(3==this.nTokens&&269484049==this.theTok)break;if(0==this.nTokens%2){if(269484080!=this.theTok&&269484049!=this.theTok)return this.ERROR(15,")");break}this.thisFunction.addVariable(a,!0);break;case 102411:if(1<this.nTokens&&0==this.parenCount&&0==this.braceCount&&269484066==this.theTok)return this.addTokenToPrefix(J.script.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&&135369225!=this.theTok)return this.isEndOfCommand=!0,this.cchToken=0,2;if(1!=this.nTokens||135369225!=this.theTok&&1048586!=this.theTok)return this.ERROR(0);this.replaceCommand(this.flowContext.token=J.script.ContextToken.newCmd(102402,"elseif"));this.tokCommand=102402;return 2;case 36868:if(1!=this.nTokens)break;this.addContextVariable(a);this.replaceCommand(J.script.T.tokenSetVar);this.tokCommand=1085443;break;case 1150985:if(1!=
this.nTokens)return this.ERROR(0);if(!this.checkFlowEnd(this.theTok,a,this.ichCurrentCommand))return 4;if(135368713==this.theTok||102436==this.theTok)return 2;break;case 102410:case 102406:2<this.nTokens&&(0==this.braceCount&&0==this.parenCount)&&(this.isEndOfCommand=!0,this.ichEnd=this.ichToken+1,this.flowContext.setLine());break;case 102402:case 135369225:2<this.nTokens&&(0==this.braceCount&&0==this.parenCount)&&(this.isEndOfCommand=!0,this.ichEnd=this.ichToken+1,this.flowContext.setLine());break;
case 102439:this.isEndOfCommand=!0;this.ichEnd=this.ichToken+1;this.flowContext.setLine();break;case 135369224:if(1==this.nTokens){if(269484048!=this.theTok)return this.ERROR(19,a);this.forPoint3=this.nSemiSkip=0;this.nSemiSkip+=2}else 3==this.nTokens&&36868==this.tokAt(2)?this.addContextVariable(a):(3==this.nTokens||4==this.nTokens)&&1073741980==this.theTok?(this.nSemiSkip-=2,this.forPoint3=2,this.addTokenToPrefix(this.theToken),this.theToken=J.script.T.tokenLeftParen):0==this.braceCount&&0==this.parenCount&&
(this.isEndOfCommand=!0,this.ichEnd=this.ichToken+1,this.flowContext.setLine());break;case 1085443:1048586==this.theTok?this.setBraceCount++:1048590==this.theTok&&(this.setBraceCount--,this.isSetBrace&&(0==this.setBraceCount&&2147483647==this.ptNewSetModifier)&&(this.ptNewSetModifier=this.nTokens+1));if(this.nTokens==this.ptNewSetModifier){b=this.tokenAt(0);if(269484048==this.theTok||this.isUserFunction(b.value.toString())){this.ltoken.set(0,this.setCommand(J.script.T.tv(1073741824,0,b.value)));this.setBraceCount=
0;break}if(1073741824!=this.theTok&&269484242!=this.theTok&&1060866!=this.theTok&&!J.script.T.tokAttr(this.theTok,536870912))return this.isNewSet?this.commandExpected():this.errorIntStr2(18,"SET",": "+a),4;if(1==this.nTokens&&(269484226==this.lastToken.tok||269484225==this.lastToken.tok)){this.replaceCommand(J.script.T.tokenSet);this.addTokenToPrefix(this.lastToken);break}}break;case 135271426:if(1060866==this.theTok&&(1==this.nTokens||1073741940==this.lastToken.tok||1073742152==this.lastToken.tok))return this.addTokenToPrefix(J.script.T.tokenDefineString),
2;1073741848==this.theTok&&(this.iHaveQuotedString=!1);break;case 1610625028:case 12294:case 12295:case 135280132:case 12291:case 1060866:if(1060866==this.tokCommand){if(1==this.nTokens){if(1073741824!=this.theTok)if(this.preDefining){if(!J.script.T.tokAttr(this.theTok,3145728))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: "+a,null),4}else J.script.T.tokAttr(this.theTok,3145728)?
J.util.Logger.warn("WARNING: predefined term '"+a+"' has been redefined by the user until the next file load."):!this.isCheckOnly&&1<a.length&&(J.util.Logger.warn("WARNING: redefining "+a+"; was "+this.theToken+"not all commands may continue to be functional for the life of the applet!"),this.theTok=this.theToken.tok=1073741824,J.script.T.addToken(a,this.theToken));this.addTokenToPrefix(this.theToken);this.lastToken=J.script.T.tokenComma;return 2}if(2==this.nTokens&&269484436==this.theTok)return this.ltoken.add(0,
J.script.T.tokenSet),2}if(0==this.bracketCount&&1073741824!=this.theTok&&!J.script.T.tokAttr(this.theTok,1048576)&&!J.script.T.tokAttr(this.theTok,1073741824)&&(this.theTok&480)!=this.theTok)return this.ERROR(9,a);break;case 12289:if(1073741824!=this.theTok&&1048583!=this.theTok&&!J.script.T.tokAttr(this.theTok,1048576))return this.ERROR(9,a);break;case 135190:case 135188:case 135180:b=this.nextChar(),0==this.parenCount&&(0==this.bracketCount&&0<=".:/\\+-!?".indexOf(b)&&!("-"==b&&a.equals("=")))&&
this.checkUnquotedFileName()}return 0},$fz.isPrivate=!0,$fz),"~S");c$.newScriptParallelProcessor=$_M(c$,"newScriptParallelProcessor",($fz=function(a,b){var c=J.api.Interface.getOptionInterface("parallel.ScriptParallelProcessor");c.set(a,b);return c},$fz.isPrivate=!0,$fz),"~S,~N");$_M(c$,"setNewSetCommand",($fz=function(a,b){this.tokCommand=1085443;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||269484226==this.theToken.tok||269484225==this.theToken.tok?this.theToken:J.script.T.o(1073741824,b)},$fz.isPrivate=!0,$fz),"~B,~S");$_M(c$,"nextChar",($fz=function(){var a=this.ichToken+this.cchToken;return a>=this.cchScript?" ":this.script.charAt(a)},$fz.isPrivate=!0,$fz));$_M(c$,"checkUnquotedFileName",($fz=function(){for(var a=this.ichToken,b;++a<this.cchScript&&!Character.isWhitespace(b=this.script.charAt(a))&&"#"!=b&&";"!=b&&"}"!=b;);b=this.script.substring(this.ichToken,
a).$replace("\\","/");this.cchToken=a-this.ichToken;this.theToken=J.script.T.o(4,b)},$fz.isPrivate=!0,$fz));$_M(c$,"checkFlowStartBrace",($fz=function(a){if(!J.script.T.tokAttr(this.tokCommand,102400)||102407==this.tokCommand||102408==this.tokCommand)return!1;a&&(102411!=this.tokenCommand.tok&&102413!=this.tokenCommand.tok&&(this.iBrace++,this.vBraces.addLast(this.tokenCommand),this.lastFlowCommand=null),this.parenCount=this.braceCount=0);return!0},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"checkFlowEndBrace",
($fz=function(){if(0>=this.iBrace||1048590!=this.vBraces.get(this.iBrace-1).tok)return 0;this.vBraces.remove(--this.iBrace);var a=this.vBraces.remove(--this.iBrace);1048586==this.theTok&&(this.braceCount--,this.parenCount--);if(266280==a.tok)return this.vPush.remove(--this.pushCount),this.addTokenToPrefix(this.setCommand(J.script.ContextToken.newContext(!0))),this.isEndOfCommand=!0,2;switch(null==this.flowContext?0:this.flowContext.token.tok){case 135369225: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)},$fz.isPrivate=!0,$fz));$_M(c$,"forceFlowEnd",($fz=function(a){var b=this.tokenCommand;this.setCommand(J.script.T.o(1150985,"end"));if(!this.checkFlowCommand("end"))return 0;this.addTokenToPrefix(this.tokenCommand);switch(a.tok){case 135369225:case 364547:case 102402:a=J.script.T.tokenIf;break;case 102413:case 102411:a=J.script.T.tokenSwitch;
break;default:a=J.script.T.getTokenFromName(a.value)}if(!this.checkFlowEnd(a.tok,a.value,this.ichBrace))return 4;135368713!=a.tok&&(102436!=a.tok&&364558!=a.tok)&&this.addTokenToPrefix(a);this.setCommand(b);return 2},$fz.isPrivate=!0,$fz),"J.script.T");c$.isBreakableContext=$_M(c$,"isBreakableContext",function(a){return 135369224==a||102439==a||102406==a||102411==a||102413==a},"~N");$_M(c$,"checkFlowCommand",($fz=function(a){var b=this.lltoken.size(),c=!1,d=!0;switch(this.tokCommand){case 135368713:case 102436:if(null!=
this.flowContext)return this.errorStr(1,J.script.T.nameOf(this.tokCommand));break;case 1150985:if(null==this.flowContext)return this.errorStr(1,a);c=!0;135368713!=this.flowContext.token.tok&&(102436!=this.flowContext.token.tok&&364558!=this.flowContext.token.tok)&&this.setCommand(J.script.T.tv(this.tokCommand,0<this.flowContext.ptDefault?this.flowContext.ptDefault:-this.flowContext.pt0,a));break;case 364548:c=!0;if(null==this.flowContext||135369225!=this.flowContext.token.tok&&102439!=this.flowContext.token.tok&&
364547!=this.flowContext.token.tok&&102402!=this.flowContext.token.tok)return this.errorStr(1,a);break;case 364547:if(null==this.flowContext||135369225!=this.flowContext.token.tok&&102402!=this.flowContext.token.tok)return this.errorStr(1,a);this.flowContext.token.intValue=this.flowContext.setPt0(b,!1);break;case 102407:case 102408:var d=!1,e=null==this.flowContext?null:this.flowContext.getBreakableContext(0);if(102408==this.tokCommand)for(;null!=e&&135369224!=e.token.tok&&102406!=e.token.tok;)e=
e.getParent();if(null==e)return this.errorStr(1,a);this.setCommand(J.script.T.tv(this.tokCommand,e.pt0,a));break;case 102413:if(null==this.flowContext||102410!=this.flowContext.token.tok&&102411!=this.flowContext.token.tok&&0<this.flowContext.ptDefault)return this.errorStr(1,a);this.flowContext.token.intValue=this.flowContext.setPt0(b,!0);break;case 102411:if(null==this.flowContext||102410!=this.flowContext.token.tok&&102411!=this.flowContext.token.tok&&102413!=this.flowContext.token.tok)return this.errorStr(1,
a);this.flowContext.token.intValue=this.flowContext.setPt0(b,!1);break;case 102402:if(null==this.flowContext||135369225!=this.flowContext.token.tok&&102402!=this.flowContext.token.tok&&364547!=this.flowContext.token.tok)return this.errorStr(1,"elseif");this.flowContext.token.intValue=this.flowContext.setPt0(b,!1)}if(c)this.flowContext.token.intValue=102412==this.tokCommand?-b:b,364548==this.tokCommand&&(this.flowContext=this.flowContext.getParent());else if(d)switch(a=J.script.ContextToken.newCmd(this.tokCommand,
this.tokenCommand.value),102410==this.tokCommand&&a.addName("_var"),this.setCommand(a),this.tokCommand){case 364558:this.flowContext=new J.script.ScriptFlowContext(this,a,b,this.flowContext);null!=this.thisFunction&&this.vFunctionStack.add(0,this.thisFunction);this.thisFunction=J.script.ScriptCompiler.newScriptParallelProcessor("",this.tokCommand);this.flowContext.setFunction(this.thisFunction);this.pushCount++;this.vPush.addLast(a);break;case 364547:case 102402:this.flowContext.token=a;break;case 102411:case 102413:a.contextVariables=
this.flowContext.token.contextVariables;this.flowContext.token=a;break;case 102439:case 135369224:case 102406:case 102412:this.pushCount++,this.vPush.addLast(a);default:this.flowContext=new J.script.ScriptFlowContext(this,a,b,this.flowContext)}return!0},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"checkFlowEnd",($fz=function(a,b,c){if(null==this.flowContext||this.flowContext.token.tok!=a){var d=!0;switch(a){case 135369225:d=364547==this.flowContext.token.tok||102402==this.flowContext.token.tok;break;case 102410:d=
102411==this.flowContext.token.tok||102413==this.flowContext.token.tok;break;default:d=!1}if(!d)return this.errorStr(1,"end "+b)}switch(a){case 135369225:case 102410:break;case 102412:case 135369224:case 102439:case 102406:this.vPush.remove(--this.pushCount);break;case 102436:case 135368713:case 364558:this.isCheckOnly||(this.addTokenToPrefix(J.script.T.o(a,this.thisFunction)),J.script.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.remove(0);this.tokenCommand.intValue=0;364558==a&&this.vPush.remove(--this.pushCount);break;default:return this.errorStr(19,"end "+b)}this.flowContext=this.flowContext.getParent();return!0},$fz.isPrivate=!0,$fz),"~N,~S,~N");$_M(c$,"getData",($fz=function(a){this.addTokenToPrefix(J.script.T.o(4,a));this.ichToken+=a.length+2;this.script.length>this.ichToken&&"\r"==this.script.charAt(this.ichToken)&&(this.lineCurrent++,
this.ichToken++);this.script.length>this.ichToken&&"\n"==this.script.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(J.script.T.o(135270407,c));this.addTokenToPrefix(J.script.T.o(1073741824,"end"));this.addTokenToPrefix(J.script.T.o(4,a));this.cchToken=
b-this.ichToken+a.length+6;return!0},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"incrementLineCount",($fz=function(a){var b,c=a.indexOf("\r"),d=a.indexOf("\n");if(0>c&&0>d)return 0;var e=this.lineCurrent;if(0>c||d<c)c=d;for(d=a.length;--d>=c;)("\n"==(b=a.charAt(d))||"\r"==b)&&this.lineCurrent++;return this.lineCurrent-e},$fz.isPrivate=!0,$fz),"~S");c$.isSpaceOrTab=$_M(c$,"isSpaceOrTab",($fz=function(a){return" "==a||"\t"==a},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"eol",($fz=function(a){return"\r"==a||"\n"==a||
";"==a&&0>=this.nSemiSkip},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"lookingAtBraceSyntax",($fz=function(){for(var a=this.ichToken,b=1;++a<this.cchScript&&0<b;)switch(this.script.charAt(a)){case "{":b++;break;case "}":b--}if(a<this.cchScript&&"["==this.script.charAt(a)&&1==++b)for(;++a<this.cchScript&&0<b;)switch(this.script.charAt(a)){case "[":b++;break;case "]":b--}return a<this.cchScript&&"."==this.script.charAt(a)&&0==b?!0:!1},$fz.isPrivate=!0,$fz));$_M(c$,"lookingAtString",($fz=function(a){if(this.ichToken==
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},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"getUnescapedStringLiteral",function(){if(2>this.cchToken)return"";for(var a=J.util.SB.newN(this.cchToken-2),b=this.ichToken+
this.cchToken-1,c=this.ichToken+1;c<b;){var d=this.script.charAt(c++);if("\\"==d&&c<b)switch(d=this.script.charAt(c++),d){case "b":d="\b";break;case "n":d="\n";break;case "t":d="\t";break;case "r":d="\r";case '"':case "\\":case "'":break;case "x":case "u":var e="x"==d?2:4;if(c<b){for(d=0;0<=--e&&c<b;){var f=this.script.charAt(c),f=J.util.Escape.getHexitValue(f);if(0>f)break;d<<=4;d+=f;++c}d=String.fromCharCode(d)}}a.appendC(d)}return a.toString()});$_M(c$,"lookingAtLoadFormat",($fz=function(){for(var a=
this.ichToken,b="\x00",c=a<this.cchScript&&J.viewer.Viewer.isDatabaseCode(b=this.script.charAt(a));a<this.cchScript&&(Character.isLetterOrDigit(b=this.script.charAt(a))&&(c||Character.isLetter(b))||c&&!this.eol(b)&&!Character.isWhitespace(b));)++a;if(!c&&a==this.ichToken||!J.script.ScriptCompiler.isSpaceOrTab(b))return!1;this.cchToken=a-this.ichToken;return!0},$fz.isPrivate=!0,$fz));$_M(c$,"lookingAtImpliedString",($fz=function(a,b,c){var d=this.ichToken,e=this.script.charAt(d),f=!(J.script.T.tokAttr(this.tokCommand,
20480)||0==(this.tokCommand&1)),g="@"==e;if(g&&(d+3<this.cchScript&&"{"==this.script.charAt(d+1))&&f)return d=J.util.TextFormat.ichMathTerminator(this.script,this.ichToken+1,this.cchScript),d!=this.cchScript&&0<(this.cchToken=d+1-this.ichToken);for(var h=f=-1,j=!0,k=0;j&&d<this.cchScript&&!this.eol(e=this.script.charAt(d));){switch(e){case "(":if(!c&&5<=d&&(this.script.substring(d-4,d).equals(".spt")||this.script.substring(d-4,d).equals(".png")||this.script.substring(d-5,d).equals(".pngj"))){j=!1;
continue}break;case "=":if(!b){j=!1;continue}break;case "{":k++;break;case "}":k--;if(0>k&&(0<this.braceCount||0<this.iBrace)){j=!1;continue}break;default:Character.isWhitespace(e)?0>f&&(f=d):h=d}Character.isWhitespace(e)?0>f&&(f=d):h=d;++d}a?d=h+1:0<f&&(d=f);return g&&0>f&&0>=k&&1<d-this.ichToken?!1:0<(this.cchToken=d-this.ichToken)},$fz.isPrivate=!0,$fz),"~B,~B,~B");$_M(c$,"lookingAtExponential",($fz=function(){if(this.ichToken==this.cchScript)return NaN;var a=this.ichToken,b=a;"-"==this.script.charAt(a)&&
++a;for(var c=!1,d="X";a<this.cchScript&&Character.isDigit(d=this.script.charAt(a));)++a,c=!0;for(a<this.cchScript&&"."==d&&++a;a<this.cchScript&&Character.isDigit(d=this.script.charAt(a));)++a,c=!0;if(a==this.cchScript||!c||(c="E"!=d&&"e"!=d)||++a==this.cchScript)return NaN;d=this.script.charAt(a);for(("-"==d||"+"==d)&&a++;a<this.cchScript&&Character.isDigit(this.script.charAt(a));)a++,c=!0;if(!c)return NaN;this.cchToken=a-this.ichToken;return J.util.Parser.dVal(this.script.substring(b,a))},$fz.isPrivate=
!0,$fz));$_M(c$,"lookingAtDecimal",($fz=function(){if(this.ichToken==this.cchScript)return!1;var a=this.ichToken;"-"==this.script.charAt(a)&&++a;for(var b=!1,c="X";a<this.cchScript&&Character.isDigit(c=this.script.charAt(a++));)b=!0;if("."!=c)return!1;var d;if(a<this.cchScript&&!this.eol(d=this.script.charAt(a)))if(Character.isLetter(d)||("?"==d||"*"==d)||a+1<this.cchScript&&(Character.isLetter(d=this.script.charAt(a+1))||"?"==d))return!1;for(;a<this.cchScript&&Character.isDigit(this.script.charAt(a));)++a,
b=!0;this.cchToken=a-this.ichToken;return b},$fz.isPrivate=!0,$fz));$_M(c$,"lookingAtSeqcode",($fz=function(){var a=this.ichToken,b=" ";if(a+1<this.cchScript&&"*"==this.script.charAt(a)&&"^"==this.script.charAt(a+1))b="^",++a;else for("-"==this.script.charAt(a)&&++a;a<this.cchScript&&Character.isDigit(b=this.script.charAt(a));)++a;if("^"!=b)return!1;a++;b=a==this.cchScript?" ":this.script.charAt(a++);if(" "!=b&&"*"!=b&&"?"!=b&&!Character.isLetter(b))return!1;this.cchToken=a-this.ichToken;return!0},
$fz.isPrivate=!0,$fz));$_M(c$,"lookingAtInteger",($fz=function(){if(this.ichToken==this.cchScript)return 2147483647;var a=this.ichToken;"-"==this.script.charAt(this.ichToken)&&++a;for(var b=a;a<this.cchScript&&Character.isDigit(this.script.charAt(a));)++a;if(b==a)return 2147483647;this.cchToken=a-this.ichToken;try{return Integer.parseInt(this.script.substring(this.ichToken,a))}catch(c){if(!Clazz.exceptionOf(c,NumberFormatException))throw c;}return 2147483647},$fz.isPrivate=!0,$fz));$_M(c$,"lookingAtBitset",
function(){if(this.script.indexOf("({null})",this.ichToken)==this.ichToken)return this.cchToken=8,new J.util.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=J.util.Escape.uB(this.script.substring(this.ichToken,a+2));null!=b&&(this.cchToken=a+2-this.ichToken);return b});$_M(c$,"lookingAtObjectID",($fz=function(a){var b=this.ichToken;if(b==this.cchScript||"$"!=this.script.charAt(b)||
++b!=this.cchScript&&'"'==this.script.charAt(b))return!1;for(;b<this.cchScript;){var c;if(Character.isWhitespace(c=this.script.charAt(b))){if(b==this.ichToken+1)return!1;break}if(!Character.isLetterOrDigit(c))switch(c){default:return!1;case "*":if(!a)return!1;case "~":case "_":}b++}this.cchToken=b-++this.ichToken;return!0},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"lookingAtLookupToken",($fz=function(a){if(a==this.cchScript)return!1;var b=a;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&&(a<this.cchScript&&this.script.charAt(a)==c)&&++a}else"="==this.script.charAt(a)&&++a;this.tokLastMath=1;break;case "/":if(a<this.cchScript&&"/"==this.script.charAt(a))break;case "\\":case "!":a<this.cchScript&&"="==this.script.charAt(a)&&++a;this.tokLastMath=1;break;case ")":case "]":case "}":case ".":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 ">":a<this.cchScript&&("<"==(c=this.script.charAt(a))||"="==c||">"==c)&&++a;this.tokLastMath=1;break;default:if(!Character.isLetter(c))return!1;case "~":case "_":case "'":case "?":"?"==c&&(this.tokLastMath=1);for(;a<this.cchScript&&(Character.isLetterOrDigit(c=this.script.charAt(a))||"_"==c||"?"==c||"~"==c||"'"==c)||"^"==c&&a>b&&Character.isDigit(this.script.charAt(a-1))||"\\"==c&&a+1<this.cchScript&&"?"==this.script.charAt(a+1);)++a}this.cchToken=a-b;return!0},$fz.isPrivate=
!0,$fz),"~N");$_M(c$,"charToken",($fz=function(){var a;if(this.ichToken==this.cchScript||'"'==(a=this.script.charAt(this.ichToken))||"@"==a)return!1;for(var b=this.ichToken;b<this.cchScript&&!J.script.ScriptCompiler.isSpaceOrTab(a=this.script.charAt(b))&&"#"!=a&&"}"!=a&&!this.eol(a);)++b;this.cchToken=b-this.ichToken;return!0},$fz.isPrivate=!0,$fz));$_M(c$,"ERROR",($fz=function(a){this.errorIntStr2(a,null,null);return 4},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"ERROR",($fz=function(a,b){this.errorStr(a,
b);return 4},$fz.isPrivate=!0,$fz),"~N,~S");$_M(c$,"handleError",($fz=function(){this.errorType=this.errorMessage;this.errorLine=this.script.substring(this.ichCurrentCommand,this.ichEnd<=this.ichCurrentCommand?this.ichToken: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+
J.script.ScriptEvaluator.setErrorLineMessage(null,this.filename,this.lineCurrent,this.iCommand,a);if(!this.isSilent){for(this.ichToken=Math.max(this.ichEnd,this.ichToken);!this.lookingAtEndOfLine()&&!this.lookingAtEndOfStatement();)this.ichToken++;this.errorLine=this.script.substring(this.ichCurrentCommand,this.ichToken);this.viewer.addCommand(this.errorLine+"#??");J.util.Logger.error(this.errorMessage)}return!1},$fz.isPrivate=!0,$fz));Clazz.defineStatics(c$,"OK",0,"OK2",1,"CONTINUE",2,"EOL",3,"$ERROR",
4)});Clazz.declarePackage("J.script");
Clazz.load(null,"J.script.ScriptCompilationTokenParser","java.lang.Float J.i18n.GT J.script.ScriptEvaluator $.T J.util.JmolList $.Logger $.P3 $.TextFormat J.viewer.JC".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.script=this.viewer=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.logMessages=this.isNewSet=!1;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;Clazz.instantialize(this,arguments)},J.script,"ScriptCompilationTokenParser");$_M(c$,
"compileExpressions",function(){var a=135271429==this.tokCommand&&269484048==this.tokAt(2);this.isEmbeddedExpression=a||0!=this.tokCommand&&(135368713!=this.tokCommand&&102436!=this.tokCommand&&364558!=this.tokCommand&&102412!=this.tokCommand||2147483647!=this.tokenCommand.intValue)&&1150985!=this.tokCommand&&!J.script.T.tokAttrOr(this.tokCommand,12288,20480);this.isMathExpressionCommand=1073741824==this.tokCommand||a||J.script.T.tokAttr(this.tokCommand,36864);a=this.isEmbeddedExpression||J.script.T.tokAttr(this.tokCommand,
12288);1048583==this.tokAt(1)&&J.script.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++)1060866==this.tokAt(c)&&b++;a-=b;this.isNewSet&&1==a&&(this.atokenInfix[0]=J.script.T.tv(135368713,0,this.atokenInfix[0].value),this.isNewSet=!1);return(this.isNewSet||this.isSetBrace)&&a<this.ptNewSetModifier+2?this.commandExpected():1==a||!J.script.T.tokAttr(this.tokCommand,262144)?!0:this.error(0)});$_M(c$,"compileExpression",
function(){var a=this.isSetOrDefine&&!this.isSetBrace?2:1;this.ltokenPostfix=new J.util.JmolList;this.itokenInfix=0;var b=null,c=this.tokAt(1);switch(this.tokCommand){case 1060866:2==this.tokAt(1)&&(1048584==this.tokAt(2)&&269484436==this.tokAt(4))&&(this.tokCommand=1085443,this.isSetBrace=!0,this.ptNewSetModifier=4,this.isEmbeddedExpression=this.isMathExpressionCommand=!0,this.addTokenToPostfixToken(J.script.T.tokenSetProperty),this.addTokenToPostfixToken(J.script.T.tokenExpressionBegin),this.addNextToken(),
this.addNextToken(),this.addTokenToPostfixToken(J.script.T.tokenExpressionEnd),a=0);break;case 12295:1678770178==c&&(a=2);break;case 12294:case 1610625028:case 135280132:switch(c){case 1276118017:case 1073742119:a=2,c=this.tokAt(2)}1087373318==c&&a++}for(c=0;c<a&&this.addNextToken();c++);for(;this.moreTokens();){if(this.isEmbeddedExpression){for(;!this.isExpressionNext();){if(this.tokPeekIs(1073741824)&&!(135271426==this.tokCommand&&1==this.itokenInfix)&&(a=this.atokenInfix[this.itokenInfix].value,
c=J.script.T.getTokenFromName(a),null!=c&&(!this.isMathExpressionCommand&&1060866!=this.lastToken.tok||(1048584==this.lastToken.tok||269484048==this.tokAt(this.itokenInfix+1))&&!this.isUserFunction(a))))this.atokenInfix[this.itokenInfix]=c;if(!this.addNextToken())break}if(!this.moreTokens())break}if(1060866==this.lastToken.tok){if(!this.clauseDefine(!0,!1))return!1}else{this.isMathExpressionCommand||this.addTokenToPostfixToken(b=J.script.T.o(1048577,"implicitExpressionBegin"));if(!this.clauseOr(this.isCommaAsOrAllowed||
!this.isMathExpressionCommand&&this.tokPeekIs(269484048)))return!1;!this.isMathExpressionCommand&&!(this.isEmbeddedExpression&&this.lastToken===J.script.T.tokenCoordinateEnd)&&this.addTokenToPostfixToken(J.script.T.tokenExpressionEnd);if(this.moreTokens()){if(135280132!=this.tokCommand&&!this.isEmbeddedExpression)return this.error(5);135280132==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});$_M(c$,"isUserFunction",function(a){return!this.isStateScript&&(this.viewer.isFunction(a)||this.htUserFunctions.containsKey(a))},"~S");$_M(c$,"isExpressionNext",($fz=function(){return this.tokPeekIs(1048586)&&!(4==this.tokAt(this.itokenInfix+1)&&269484066==this.tokAt(this.itokenInfix+2))||!this.isMathExpressionCommand&&this.tokPeekIs(269484048)},$fz.isPrivate=!0,$fz));c$.tokenAttr=$_M(c$,"tokenAttr",function(a,b){return null!=a&&J.script.T.tokAttr(a.tok,b)},"J.script.T,~N");$_M(c$,"moreTokens",
($fz=function(){return this.itokenInfix<this.atokenInfix.length},$fz.isPrivate=!0,$fz));$_M(c$,"tokAt",function(a){return a<this.atokenInfix.length?this.atokenInfix[a].tok:0},"~N");$_M(c$,"tokPeek",($fz=function(){return this.itokenInfix>=this.atokenInfix.length?0:this.atokenInfix[this.itokenInfix].tok},$fz.isPrivate=!0,$fz));$_M(c$,"tokPeekIs",($fz=function(a){return this.tokAt(this.itokenInfix)==a},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"intPeek",($fz=function(){return this.itokenInfix>=this.atokenInfix.length?
2147483647:this.atokenInfix[this.itokenInfix].intValue},$fz.isPrivate=!0,$fz));$_M(c$,"valuePeek",($fz=function(){return this.moreTokens()?this.atokenInfix[this.itokenInfix].value:""},$fz.isPrivate=!0,$fz));$_M(c$,"tokenNext",($fz=function(){return this.itokenInfix>=this.atokenInfix.length?null:this.atokenInfix[this.itokenInfix++]},$fz.isPrivate=!0,$fz));$_M(c$,"tokenNextTok",($fz=function(a){var b=this.tokenNext();return null!=b&&b.tok==a},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"returnToken",($fz=function(){this.itokenInfix--;
return!1},$fz.isPrivate=!0,$fz));$_M(c$,"getToken",($fz=function(){this.theValue=null==(this.theToken=this.tokenNext())?null:this.theToken.value;return this.theToken},$fz.isPrivate=!0,$fz));$_M(c$,"isToken",($fz=function(a){return null!=this.theToken&&this.theToken.tok==a},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"getNumericalToken",($fz=function(){return null!=this.getToken()&&(this.isToken(2)||this.isToken(3))},$fz.isPrivate=!0,$fz));$_M(c$,"floatValue",($fz=function(){switch(this.theToken.tok){case 2:return this.theToken.intValue;
case 3:return this.theValue.floatValue()}return 0},$fz.isPrivate=!0,$fz));$_M(c$,"addTokenToPostfix",($fz=function(a,b){return this.addTokenToPostfixToken(J.script.T.o(a,b))},$fz.isPrivate=!0,$fz),"~N,~O");$_M(c$,"addTokenToPostfixInt",($fz=function(a,b,c){return this.addTokenToPostfixToken(J.script.T.tv(a,b,c))},$fz.isPrivate=!0,$fz),"~N,~N,~O");$_M(c$,"addTokenToPostfixToken",($fz=function(a){if(null==a)return!1;this.logMessages&&J.util.Logger.info("addTokenToPostfix"+a);this.ltokenPostfix.addLast(a);
this.lastToken=a;return!0},$fz.isPrivate=!0,$fz),"J.script.T");$_M(c$,"addNextToken",($fz=function(){return this.addTokenToPostfixToken(this.tokenNext())},$fz.isPrivate=!0,$fz));$_M(c$,"addNextTokenIf",($fz=function(a){return this.tokPeekIs(a)&&this.addNextToken()},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"addSubstituteTokenIf",($fz=function(a,b){if(!this.tokPeekIs(a))return!1;this.itokenInfix++;return this.addTokenToPostfixToken(b)},$fz.isPrivate=!0,$fz),"~N,J.script.T");$_M(c$,"clauseOr",($fz=function(a){this.haveString=
!1;if(!this.clauseAnd())return!1;if(this.isEmbeddedExpression&&1048578==this.lastToken.tok)return!0;for(var b;269484112==(b=this.tokPeek())||269484113==b||269484114==b||a&&269484080==b;){269484080==b&&!this.haveString?this.addSubstituteTokenIf(269484080,J.script.T.tokenOr):this.addNextToken();if(!this.clauseAnd())return!1;if(a&&(1048590==this.lastToken.tok||10==this.lastToken.tok))this.haveString=!0}return!0},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"clauseAnd",($fz=function(){if(!this.clauseNot())return!1;
if(this.isEmbeddedExpression&&1048578==this.lastToken.tok)return!0;for(;this.tokPeekIs(269484128);)if(this.addNextToken(),!this.clauseNot())return!1;return!0},$fz.isPrivate=!0,$fz));$_M(c$,"clauseNot",($fz=function(){return this.tokPeekIs(269484144)?(this.addNextToken(),this.clauseNot()):this.clausePrimitive()},$fz.isPrivate=!0,$fz));$_M(c$,"clausePrimitive",($fz=function(){var a=this.tokPeek();switch(a){case 1073742195:return this.itokenInfix++,this.clausePrimitive();case 0:return this.error(4);
case 1048579:case 10:case 269484208:case 137363468:case 3145736:case 3145735:case 3145738:case 1048585:case 1048587:case 3145760:return this.addNextToken();case 4:return this.haveString=!0,this.addNextToken();case 3:return this.addTokenToPostfixInt(1048611,this.fixModelSpec(this.getToken()),this.theValue);case 1095761925:return this.clauseCell();case 135266310:return this.clauseConnected();case 135267335:case 135267336:return this.clauseSubstructure();case 135266324:case 135402505:return this.clauseWithin(135266324==
a);case 1060866:return this.clauseDefine(!1,!1);case 1678770178:case 1746538509:this.addNextToken();if(this.tokPeekIs(10))this.addNextToken();else if(this.tokPeekIs(1060866))return this.clauseDefine(!1,!1);return!0;case 269484048:return this.addNextToken(),!this.clauseOr(!0)?!1:!this.addNextTokenIf(269484049)?this.errorStr(15,")"):this.checkForItemSelector(!0);case 1048586:return this.checkForCoordinate(this.isMathExpressionCommand);default:if(this.clauseResidueSpec())return!0;if(this.isError())return!1;
if(J.script.T.tokAttr(a,1078984704)){var b=this.itokenInfix,c=this.clauseComparator(!0);if(c||this.itokenInfix!=b)return c;if(1238369286==a)return this.clauseSubstructure()}return this.addNextToken()}},$fz.isPrivate=!0,$fz));$_M(c$,"checkForCoordinate",($fz=function(a){var b=!1,c=this.ltokenPostfix.size();a?(this.addTokenToPostfixToken(J.script.T.tokenExpressionBegin),this.tokenNext()):this.isEmbeddedExpression?(this.tokenNext(),c--):this.addNextToken();var d=this.tokPeekIs(4);if(d){a=!1;this.returnToken();
this.ltokenPostfix.remove(this.ltokenPostfix.size()-1);this.addNextToken();for(var e=1;0!=e;){if(this.tokPeekIs(1048586))if(this.isExpressionNext()){this.addTokenToPostfixToken(J.script.T.o(1048577,"implicitExpressionBegin"));if(!this.clauseOr(!0))return!1;this.lastToken!==J.script.T.tokenCoordinateEnd&&this.addTokenToPostfixToken(J.script.T.tokenExpressionEnd)}else e++;this.tokPeekIs(1048590)&&e--;this.addNextToken()}}else{if(!this.tokPeekIs(1048590)&&!this.clauseOr(!1))return!1;for(b=1;!this.tokPeekIs(1048590);){e=
this.addNextTokenIf(269484080);if(!this.clauseOr(!1))return e||3>b?!1:this.errorStr(15,"}");b++}b=2<=b}b&&(a||this.isEmbeddedExpression)?(this.ltokenPostfix.set(c,J.script.T.tokenCoordinateBegin),this.addTokenToPostfixToken(J.script.T.tokenCoordinateEnd),this.tokenNext()):a?(this.addTokenToPostfixToken(J.script.T.tokenExpressionEnd),this.tokenNext()):this.isEmbeddedExpression&&!d?this.tokenNext():this.addNextToken();return this.checkForItemSelector(!d)},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"checkForItemSelector",
($fz=function(a){var b;if(269484096==(b=this.tokAt(this.itokenInfix+1))||a&&1048586==b)return!0;for(;this.addNextTokenIf(269484096);){if(!this.clauseItemSelector())return!1;if(!this.addNextTokenIf(269484097))return this.errorStr(15,"]")}return!0},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"clauseWithin",($fz=function(a){this.addNextToken();if(!this.addNextTokenIf(269484048)||null==this.getToken())return!1;var b=3.4028235E38,c=null,d=a,e,f=this.theToken.tok;if(!a){e=-1;for(var g=this.itokenInfix;0!=e;g++)switch(e=
this.tokAt(g)){case 269484080:e=0;break;case 1048586:case 269484048:case 269484049:b=100,this.returnToken(),f=e=0}}switch(f){case 269484192: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 1060866:this.addTokenToPostfixToken(this.theToken);if(!this.clauseDefine(!0,!1))return!1;c="";d=!1}if(a&&3.4028235E38==b)switch(f){case 1060866:break;case 135267335:case 135267336:case 1238369286:this.addTokenToPostfix(4,
this.theValue);if(!this.addNextTokenIf(269484080))return!1;d=!1;e=this.tokPeek();switch(e){case 0:return!1;case 4:this.addNextToken();c="";break;case 1060866:if(!this.clauseDefine(!1,!0))return!1;c="";break;default:return!1}break;case 1048580:d=!1;case 1087375361:case 1087375362:case 1073741864:case 1679429641:case 1087373316:case 1048582:case 1087375365:case 1087373318:case 137363468:case 1095766028:case 1095761934:case 135266319:case 135267841:case 1095761935:case 1087373320:case 3145760:case 1095761938:case 1641025539:case 4:case 1649412112:c=
this.theValue;break;case 1073741824:c=this.theValue.toLowerCase();break;default:return this.errorIntStr2(18,"WITHIN",": "+this.theToken.value)}null==c?this.addTokenToPostfix(3,Float.$valueOf(b)):0<c.length&&this.addTokenToPostfix(4,c);for(g=!1;!g&&(0==f||this.addNextTokenIf(269484080));){0==f&&(f=135402505);var h=!1;e=this.tokPeek();if(a){switch(f){case 2:case 3:if(1048589==e||1048588==e){this.addTokenToPostfixToken(this.getToken());if(!this.addNextTokenIf(269484080))break;e=this.tokPeek()}}if(null==
c){switch(e){case 135267841:case 1048582:case 135266319:h=!0;this.addNextToken();break;case 1048583:this.getToken();this.getToken();this.addTokenToPostfix(4,"$"+this.theValue);g=!0;break;case 1087373318:case 1649412112:this.getToken();this.addTokenToPostfix(4,J.script.T.nameOf(e));break;case 1048586:this.returnToken(),h=!0,this.addTokenToPostfixToken(J.script.T.getTokenFromName(3.4028235E38==b?"plane":"coord"))}g||this.addNextTokenIf(269484080)}}this.tokPeek();if(g)break;if(h)for(;!this.tokPeekIs(269484049);)switch(this.tokPeek()){case 0:return this.error(4);
case 269484048:this.addTokenToPostfixToken(J.script.T.tokenExpressionBegin);this.addNextToken();if(!this.clauseOr(!1))return this.errorIntStr2(18,"WITHIN",": ?");if(!this.addNextTokenIf(269484049))return this.errorStr(15,", / )");this.addTokenToPostfixToken(J.script.T.tokenExpressionEnd);break;case 1060866:if(!this.clauseDefine(!1,!1))return!1;break;default:this.addTokenToPostfixToken(this.getToken())}else this.clauseOr(d)}return!this.addNextTokenIf(269484049)?this.errorStr(15,")"):!0},$fz.isPrivate=
!0,$fz),"~B");$_M(c$,"clauseConnected",($fz=function(){this.addNextToken();if(!this.addNextTokenIf(269484048))return this.addTokenToPostfixToken(J.script.T.tokenLeftParen),this.addTokenToPostfixToken(J.script.T.tokenRightParen),!0;for(;(!this.addNextTokenIf(2)||this.addNextTokenIf(269484080))&&(!this.addNextTokenIf(2)||this.addNextTokenIf(269484080))&&(!this.addNextTokenIf(3)||this.addNextTokenIf(269484080))&&(!this.addNextTokenIf(3)||this.addNextTokenIf(269484080));){var a=this.getToken().value;
if(131071==J.script.ScriptEvaluator.getBondOrderFromString(a))this.returnToken();else if(this.addTokenToPostfix(4,a),!this.addNextTokenIf(269484080))break;if(this.addNextTokenIf(269484049))return!0;if(!this.clauseOr(this.tokPeekIs(269484048)))return!1;if(this.addNextTokenIf(269484049))return!0;if(!this.addNextTokenIf(269484080)||!this.clauseOr(this.tokPeekIs(269484048)))return!1;break}return!this.addNextTokenIf(269484049)?this.errorStr(15,")"):!0},$fz.isPrivate=!0,$fz));$_M(c$,"clauseSubstructure",
($fz=function(){this.addNextToken();if(!this.addNextTokenIf(269484048))return!1;if(this.tokPeekIs(1060866)){if(!this.clauseDefine(!1,!0))return!1}else if(!this.addNextTokenIf(4))return this.errorStr(15,'"..."');return this.addNextTokenIf(269484080)&&!this.clauseOr(this.tokPeekIs(269484048))?!1:!this.addNextTokenIf(269484049)?this.errorStr(15,")"):!0},$fz.isPrivate=!0,$fz));$_M(c$,"clauseItemSelector",($fz=function(){for(var a,b=0;0!=(a=this.tokPeek())&&269484097!=a;)this.addNextToken(),269484096==
a&&b++,269484097==this.tokPeek()&&0<b--&&this.addNextToken();return!0},$fz.isPrivate=!0,$fz));$_M(c$,"clauseComparator",($fz=function(a){var b=this.tokenNext(),c=this.tokenNext();if(!J.script.ScriptCompilationTokenParser.tokenAttr(c,269484288)){if(!a)return this.errorStr(15,"== != < > <= >=");null!=c&&this.returnToken();this.returnToken();return!1}if(J.script.ScriptCompilationTokenParser.tokenAttr(b,1087373312)&&269484436!=c.tok&&269484438!=c.tok)return this.errorStr(15,"== !=");if(null==this.getToken())return this.errorStr(17,
""+this.valuePeek());if((a=this.isToken(269484192))&&null==this.getToken())return this.error(12);switch(this.theToken.tok){case 2:case 3:case 1073741824:case 4:case 1048586:case 1060866:break;default:if(!J.script.T.tokAttr(this.theToken.tok,1073741824))return this.error(13)}this.addTokenToPostfixInt(c.tok,b.tok,c.value+(a?" -":""));1716520973==b.tok&&this.addTokenToPostfixToken(b);if(this.isToken(1048586))return this.returnToken(),this.clausePrimitive();this.addTokenToPostfixToken(this.theToken);
return 1060866==this.theToken.tok?this.clauseDefine(!0,!1):!0},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"clauseCell",($fz=function(){var a=new J.util.P3;this.tokenNext();if(!this.tokenNextTok(269484436))return this.errorStr(15,"=");if(null==this.getToken())return this.error(3);if(this.isToken(2)){var b=this.theToken.intValue;a.x=Clazz.doubleToInt(b/100)-4;a.y=Clazz.doubleToInt(b%100/10)-4;a.z=b%10-4;return this.addTokenToPostfix(1095761925,a)}if(!this.isToken(1048586)||!this.getNumericalToken())return this.error(3);
a.x=this.floatValue();this.tokPeekIs(269484080)&&this.tokenNext();if(!this.getNumericalToken())return this.error(3);a.y=this.floatValue();this.tokPeekIs(269484080)&&this.tokenNext();if(!this.getNumericalToken()||!this.tokenNextTok(1048590))return this.error(3);a.z=this.floatValue();return this.addTokenToPostfix(1095761925,a)},$fz.isPrivate=!0,$fz));$_M(c$,"clauseDefine",($fz=function(a,b){if(!a){var c=this.tokenNext();b&&(c=J.script.T.tokenDefineString);this.addTokenToPostfixToken(c)}if(0==this.tokPeek())return this.error(4);
if(!this.addSubstituteTokenIf(1048586,J.script.T.tokenExpressionBegin))return this.addNextToken()&&this.checkForItemSelector(!0);for(;this.moreTokens()&&!this.tokPeekIs(1048590);)if(this.tokPeekIs(1048586)){if(!this.checkForCoordinate(!0))return!1}else this.addNextToken();return this.addSubstituteTokenIf(1048590,J.script.T.tokenExpressionEnd)&&this.checkForItemSelector(!0)},$fz.isPrivate=!0,$fz),"~B,~B");$_M(c$,"generateResidueSpecCode",($fz=function(a){this.residueSpecCodeGenerated&&this.addTokenToPostfixToken(J.script.T.tokenAND);
this.addTokenToPostfixToken(a);return this.residueSpecCodeGenerated=!0},$fz.isPrivate=!0,$fz),"J.script.T");$_M(c$,"clauseResidueSpec",($fz=function(){var a=this.tokPeek(),b=this.residueSpecCodeGenerated=!1;switch(a){case 0:case 3145732:case 3145750:return!1;case 269484066:case 2:case 269484210:case 5:break;case 269484209:case 269484096:case 1073741824:b=!0;break;default:if(J.script.T.tokAttr(a,269484288))return!1;var c=""+this.valuePeek(),b=2==c.length||3==c.length;if(!b)return!1}c=!1;if(b){if(!this.clauseResNameSpec())return!1;
c=!0;a=this.tokPeek();if(J.script.T.tokAttr(a,269484288))return this.returnToken(),this.ltokenPostfix.remove(this.ltokenPostfix.size()-1),!1}b=!1;if(269484209==a||2==a||5==a){b=2==a;if(this.tokPeekIs(269484209))this.getToken();else if(!this.clauseSequenceSpec())return!1;c=!0;a=this.tokPeek()}if(269484066==a||269484209==a||1073741824==a||1112541205==a||1112541206==a||1112541207==a||1141899280==a||2==a&&!b){if(!this.clauseChainSpec(a))return!1;c=!0;a=this.tokPeek()}if(1048584==a){if(!this.clauseAtomSpec())return!1;
c=!0;a=this.tokPeek()}if(269484210==a){if(!this.clauseAlternateSpec())return!1;c=!0;a=this.tokPeek()}if(269484066==a||269484208==a){if(!this.clauseModelSpec())return!1;c=!0;this.tokPeek()}if(!c)return this.error(14);this.residueSpecCodeGenerated||this.addTokenToPostfixToken(J.script.T.tokenAll);return!0},$fz.isPrivate=!0,$fz));$_M(c$,"clauseResNameSpec",($fz=function(){this.getToken();switch(this.theToken.tok){case 269484209:return!0;case 269484096:for(var a="";null!=this.getToken()&&!this.isToken(269484097);)a+=
this.theValue;if(!this.isToken(269484097))return!1;if(""===a)return!0;var b;if(0<a.length&&0<=(b=a.indexOf("*"))&&b!=a.length-1)return this.error(14);a=a.toUpperCase();return this.generateResidueSpecCode(J.script.T.o(1048612,a));default:return a=this.theValue,this.tokPeekIs(269484209)&&(a=this.theValue+"*",this.getToken()),this.generateResidueSpecCode(J.script.T.o(1073741824,a))}},$fz.isPrivate=!0,$fz));$_M(c$,"clauseSequenceSpec",($fz=function(){var a=this.getSequenceCode(!1);if(null==a)return!1;
var b=this.tokPeek();return 269484192==b||2==b&&0>this.intPeek()?(269484192==b?this.tokenNext():(b=-this.intPeek(),this.tokenNext().intValue=b,this.returnToken()),a.tok=1048615,this.generateResidueSpecCode(a),this.addTokenToPostfixToken(this.getSequenceCode(!0))):this.generateResidueSpecCode(a)},$fz.isPrivate=!0,$fz));$_M(c$,"getSequenceCode",($fz=function(a){var b=2147483647,c=2147483647,d=this.tokPeek();if(5==d)b=this.tokenNext().intValue;else if(2==d)c=this.tokenNext().intValue;else if(!a)return null;
return J.script.T.tv(1048614,c,Integer.$valueOf(b))},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"clauseChainSpec",($fz=function(a){if(269484066==a&&(this.tokenNext(),a=this.tokPeek(),this.isSpecTerminator(a)))return this.generateResidueSpecCode(J.script.T.tv(1048609,0,"spec_chain"));switch(a){case 269484209:return null!=this.getToken();case 2:this.getToken();a=this.theToken.intValue;if(0>a||9<a)return this.error(8);a=String.fromCharCode(48+a);break;default:a=""+this.getToken().value;if(1!=a.length)return this.error(8);
a=a.charAt(0);if("?"==a)return!0}return this.generateResidueSpecCode(J.script.T.tv(1048609,a.charCodeAt(0),"spec_chain"))},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"isSpecTerminator",($fz=function(a){switch(a){case 0:case 269484208:case 269484128:case 269484112:case 269484144:case 269484080:case 269484210:case 269484049:case 1048590:return!0}return!1},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"clauseAlternateSpec",($fz=function(){this.tokenNext();var a=this.tokPeek();if(this.isSpecTerminator(a))return this.generateResidueSpecCode(J.script.T.o(1048607,
null));a=this.getToken().value;switch(this.theToken.tok){case 269484209:case 4:case 2:case 1073741824:break;default:return this.error(10)}return this.generateResidueSpecCode(J.script.T.o(1048607,a))},$fz.isPrivate=!0,$fz));$_M(c$,"clauseModelSpec",($fz=function(){this.getToken();if(this.tokPeekIs(269484209))return this.getToken(),!0;switch(this.tokPeek()){case 2:return this.generateResidueSpecCode(J.script.T.o(1048610,Integer.$valueOf(this.getToken().intValue)));case 3:return this.generateResidueSpecCode(J.script.T.tv(1048610,
this.fixModelSpec(this.getToken()),this.theValue));case 269484080:case 1048590:case 0:return this.generateResidueSpecCode(J.script.T.o(1048610,Integer.$valueOf(1)))}return this.error(10)},$fz.isPrivate=!0,$fz));$_M(c$,"fixModelSpec",($fz=function(a){a=a.intValue;if(2147483647==a){var b=this.theValue.floatValue();b==Clazz.floatToInt(b)&&(a=1E6*Clazz.floatToInt(b));0>a&&(a=2147483647)}return a},$fz.isPrivate=!0,$fz),"J.script.T");$_M(c$,"clauseAtomSpec",($fz=function(){if(!this.tokenNextTok(1048584))return this.error(7);
if(null==this.getToken())return!0;var a="";if(this.isToken(2)&&(a+=""+this.theToken.intValue,null==this.getToken()))return this.error(7);switch(this.theToken.tok){case 269484209:return!0}a+=""+this.theToken.value;this.tokPeekIs(269484209)&&(this.tokenNext(),a+="'");var b=J.viewer.JC.lookupSpecialAtomID(a.toUpperCase());return this.generateResidueSpecCode(J.script.T.tv(1048608,b,a))},$fz.isPrivate=!0,$fz));c$.errorString=$_M(c$,"errorString",function(a,b,c,d){var e=!1;!d&&!0==(e=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=J.util.TextFormat.simpleReplace(a,"{0}",b),0<=a.indexOf("{1}")?a=J.util.TextFormat.simpleReplace(a,"{1}",c):null!=c&&(a+=": "+c));d||J.i18n.GT.setDoTranslate(e);return a},"~N,~S,~S,~B");$_M(c$,"commandExpected",function(){this.ichToken=
this.ichCurrentCommand;return this.error(2)});$_M(c$,"error",function(a){return this.errorIntStr2(a,null,null)},"~N");$_M(c$,"errorStr",function(a,b){return this.errorIntStr2(a,b,null)},"~N,~S");$_M(c$,"errorIntStr2",function(a,b,c){var d=J.script.ScriptCompilationTokenParser.errorString(a,b,c,!0);a=J.i18n.GT.getDoTranslate()?J.script.ScriptCompilationTokenParser.errorString(a,b,c,!1):null;return this.errorStr2(d,a)},"~N,~S,~S");$_M(c$,"isError",($fz=function(){return null!=this.errorMessage},$fz.isPrivate=
!0,$fz));$_M(c$,"errorStr2",function(a,b){this.errorMessage=a;this.errorMessageUntranslated=b;return!1},"~S,~S");Clazz.defineStatics(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.declarePackage("J.script");
Clazz.load(null,"J.script.ScriptFlowContext",["J.script.ScriptCompiler"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.script,"ScriptFlowContext");Clazz.makeConstructor(c$,function(a,b,c,d){this.compiler=a;this.token=b;this.ident=b.value;this.pt0=c;this.parent=d;this.lineStart=
this.ptLine=this.compiler.lineCurrent;this.commandStart=this.ptCommand=this.compiler.iCommand},"J.script.ScriptCompiler,J.script.ContextToken,~N,J.script.ScriptFlowContext");$_M(c$,"getBreakableContext",function(a){for(var b=this;null!=b&&(!J.script.ScriptCompiler.isBreakableContext(b.token.tok)||0<a--);)b=b.getParent();return b},"~N");$_M(c$,"checkForceEndIf",function(){var a=this.forceEndIf&&this.ptCommand<this.compiler.iCommand&&this.ptLine==this.compiler.lineCurrent;a&&(this.forceEndIf=!1);return a});
$_M(c$,"setPt0",function(a,b){this.pt0=a;b&&(this.ptDefault=a);this.setLine();return a},"~N,~B");$_M(c$,"setLine",function(){this.ptLine=this.compiler.lineCurrent;this.ptCommand=this.compiler.iCommand+1});Clazz.overrideMethod(c$,"toString",function(){return"ident "+this.ident+" line "+this.lineStart+" command "+this.commandStart});$_M(c$,"getParent",function(){return this.parent});$_M(c$,"path",function(){for(var a="",b=this;null!=b;)a=b.ident+"-"+a,b=b.parent;return"["+a+"]"});$_M(c$,"setFunction",
function(a){this.$function=a},"J.script.ScriptFunction")});Clazz.declarePackage("J.script");
Clazz.load(["J.api.JmolScriptFunction","java.util.Hashtable","J.util.JmolList"],"J.script.ScriptFunction",["J.script.SV","$.T","J.util.ArrayUtil","$.SB"],function(){c$=Clazz.decorateAsClass(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;Clazz.instantialize(this,arguments)},J.script,"ScriptFunction",null,J.api.JmolScriptFunction);
Clazz.prepareFields(c$,function(){this.names=new J.util.JmolList;this.variables=new java.util.Hashtable});$_M(c$,"isVariable",function(a){return this.variables.containsKey(a)},"~S");Clazz.makeConstructor(c$,function(){});Clazz.makeConstructor(c$,function(a,b){this.set(a,b);this.typeName=J.script.T.nameOf(b)},"~S,~N");$_M(c$,"set",function(a,b){this.name=a;this.tok=b},"~S,~N");$_M(c$,"setVariables",function(a,b){for(var c=null==b?0:b.size(),d=this.names.size();0<=--d;){var e=this.names.get(d).toLowerCase(),
f=d<this.nParameters&&d<c?b.get(d):null;null!=f&&7!=f.tok&&(f=J.script.SV.newScriptVariableToken(f));a.put(e,null==f?J.script.SV.newVariable(4,"").setName(e):f)}a.put("_retval",J.script.SV.newScriptVariableInt(364558==this.tok?2147483647:0))},"java.util.Map,J.util.JmolList");$_M(c$,"unsetVariables",function(a,b){var c=null==b?0:b.size(),d=this.names.size();if(!(0==c||0==d))for(var e=0;e<d&&e<c;e++){var f=b.get(e);if(7==f.tok){var g=a.get(this.names.get(e).toLowerCase());7==g.tok&&(f.value=g.value)}}},
"java.util.Map,J.util.JmolList");$_M(c$,"addVariable",function(a,b){this.variables.put(a,a);this.names.addLast(a);b&&this.nParameters++},"~S,~B");c$.setFunction=$_M(c$,"setFunction",function(a,b,c,d,e,f,g){var h=a.cmdpt0,j=a.chpt0,k=d-h;a.setScript(b.substring(j,c));b=a.aatoken=Array(k);a.lineIndices=J.util.ArrayUtil.newInt2(k);a.lineNumbers=Clazz.newShortArray(k,0);c=e[h]-1;for(var m=0;m<k;m++)if(a.lineNumbers[m]=e[h+m]-c,a.lineIndices[m]=[f[h+m][0]-j,f[h+m][1]-j],b[m]=g.get(h+m),0<b[m].length){var l=
b[m][0];J.script.T.tokAttr(l.tok,102400)&&(l.intValue-=0>l.intValue?-h:h)}for(m=d;--m>=h;)g.remove(m),f[m][0]=f[m][1]=0},"J.script.ScriptFunction,~S,~N,~N,~A,~A,J.util.JmolList");$_M(c$,"setScript",($fz=function(a){this.script=a;null!=this.script&&(""!==this.script&&!this.script.endsWith("\n"))&&(this.script+="\n")},$fz.isPrivate=!0,$fz),"~S");Clazz.overrideMethod(c$,"toString",function(){var a=(new J.util.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()});Clazz.overrideMethod(c$,"getSignature",function(){for(var a=(new J.util.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()});Clazz.overrideMethod(c$,"geTokens",function(){return this.aatoken});Clazz.overrideMethod(c$,"getName",function(){return this.name});Clazz.overrideMethod(c$,"getTok",function(){return this.tok})});
Clazz.declarePackage("J.api");Clazz.declareInterface(J.api,"JmolScriptFunction");Clazz.declarePackage("J.script");
Clazz.load(["J.script.ScriptException"],"J.script.ScriptInterruption",null,function(){c$=Clazz.decorateAsClass(function(){this.willResume=!1;Clazz.instantialize(this,arguments)},J.script,"ScriptInterruption",J.script.ScriptException);Clazz.makeConstructor(c$,function(a,b,c){Clazz.superConstructor(this,J.script.ScriptInterruption,[a,b,"!",a.viewer.autoExit]);this.willResume=2147483647!=c;b.equals("delay")&&a.viewer.delayScript(a,c)},"J.script.ScriptEvaluator,~S,~N")});Clazz.declarePackage("J.script");
Clazz.load(null,"J.script.ScriptMathProcessor","java.lang.Float java.util.Arrays $.Date $.Hashtable java.util.regex.Pattern J.atomdata.RadiusData J.constant.EnumVdw J.modelset.Bond $.MeasurementData J.script.SV $.ScriptEvaluator $.T J.util.ArrayUtil $.AxisAngle4f $.BS $.BSUtil $.ColorEncoder $.ColorUtil $.Escape $.JmolList $.JmolMolecule $.Logger $.Matrix3f $.Matrix4f $.Measure $.P3 $.P4 $.Parser $.Point3fi $.Quaternion $.SB $.TextFormat $.V3".split(" "),function(){c$=Clazz.decorateAsClass(function(){this.logMessages=
this.wasSyntaxCheck=this.isSyntaxCheck=!1;this.ifStack=this.xStack=this.oStack=this.viewer=this.eval=null;this.xPt=this.oPt=this.ifPt=-1;this.braceCount=this.squareCount=this.parenCount=0;this.wasX=!1;this.incrementX=0;this.asBitSet=this.asVector=this.isArrayItem=!1;this.ptid=0;this.ptx=2147483647;this.haveSpaceBeforeSquare=this.skipping=!1;this.equalCount=0;Clazz.instantialize(this,arguments)},J.script,"ScriptMathProcessor");Clazz.prepareFields(c$,function(){this.oStack=Array(8);this.xStack=Array(8);
this.ifStack=Clazz.newCharArray(8,"\x00")});Clazz.makeConstructor(c$,function(a,b,c,d){this.eval=a;this.viewer=a.viewer;this.logMessages=a.logMessages;this.isSyntaxCheck=this.wasSyntaxCheck=a.chk;this.isArrayItem=b;this.asVector=c||b;this.asBitSet=d;this.wasX=b;this.logMessages&&J.util.Logger.info("initialize RPN")},"J.script.ScriptEvaluator,~B,~B,~B");$_M(c$,"getResult",function(a){for(var b=!0;b&&0<=this.oPt;)b=this.operate();if(b){if(this.asVector){a=new J.util.JmolList;for(b=0;b<=this.xPt;b++)a.addLast(J.script.SV.selectItemVar(this.xStack[b]));
return J.script.SV.newVariable(135198,a)}if(0==this.xPt){a=this.xStack[0];if(10==a.tok||7==a.tok||4==a.tok||11==a.tok||12==a.tok)a=J.script.SV.selectItemVar(a);this.asBitSet&&7==a.tok&&(a=J.script.SV.newVariable(10,J.script.SV.unEscapeBitSetArray(a.value,!1)));return a}}!a&&(0<=this.xPt||0<=this.oPt)&&this.eval.error(22);return null},"~B");$_M(c$,"putX",($fz=function(a){this.skipping||(++this.xPt==this.xStack.length&&(this.xStack=J.util.ArrayUtil.doubleLength(this.xStack)),this.logMessages&&J.util.Logger.info("\nputX: "+
a),this.xStack[this.xPt]=a,this.ptx=++this.ptid)},$fz.isPrivate=!0,$fz),"J.script.SV");$_M(c$,"putOp",($fz=function(a){++this.oPt>=this.oStack.length&&(this.oStack=J.util.ArrayUtil.doubleLength(this.oStack));this.oStack[this.oPt]=a;this.ptid++},$fz.isPrivate=!0,$fz),"J.script.T");$_M(c$,"putIf",($fz=function(a){++this.ifPt>=this.ifStack.length&&(this.ifStack=J.util.ArrayUtil.doubleLength(this.ifStack));this.ifStack[this.ifPt]=a},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"addXVar",function(a){this.putX(a);
return this.wasX=!0},"J.script.SV");$_M(c$,"addXObj",function(a){a=J.script.SV.getVariable(a);if(null==a)return!1;this.putX(a);return this.wasX=!0},"~O");$_M(c$,"addXStr",function(a){this.putX(J.script.SV.newVariable(4,a));return this.wasX=!0},"~S");$_M(c$,"addXBool",($fz=function(a){this.putX(J.script.SV.getBoolean(a));return this.wasX=!0},$fz.isPrivate=!0,$fz),"~B");$_M(c$,"addXInt",($fz=function(a){this.putX(J.script.SV.newScriptVariableInt(a));return this.wasX=!0},$fz.isPrivate=!0,$fz),"~N");
$_M(c$,"addXList",($fz=function(a){this.putX(J.script.SV.getVariableList(a));return this.wasX=!0},$fz.isPrivate=!0,$fz),"J.util.JmolList");$_M(c$,"addXMap",($fz=function(a){this.putX(J.script.SV.getVariableMap(a));return this.wasX=!0},$fz.isPrivate=!0,$fz),"java.util.Map");$_M(c$,"addXM3",($fz=function(a){this.putX(J.script.SV.newVariable(11,a));return this.wasX=!0},$fz.isPrivate=!0,$fz),"J.util.Matrix3f");$_M(c$,"addXM4",($fz=function(a){this.putX(J.script.SV.newVariable(12,a));return this.wasX=
!0},$fz.isPrivate=!0,$fz),"J.util.Matrix4f");$_M(c$,"addXFloat",($fz=function(a){if(Float.isNaN(a))return this.addXStr("NaN");this.putX(J.script.SV.newVariable(3,Float.$valueOf(a)));return this.wasX=!0},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"addXBs",function(a){this.putX(J.script.SV.newVariable(10,a));return this.wasX=!0},"J.util.BS");$_M(c$,"addXPt",function(a){this.putX(J.script.SV.newVariable(8,a));return this.wasX=!0},"J.util.P3");$_M(c$,"addXPt4",function(a){this.putX(J.script.SV.newVariable(9,
a));return this.wasX=!0},"J.util.P4");$_M(c$,"addXNum",function(a){if(this.wasX)switch(a.tok){case 2:0>a.intValue&&(this.addOp(J.script.T.tokenMinus),a=J.script.SV.newScriptVariableInt(-a.intValue));break;case 3:var b=a.value.floatValue();if(0>b||0==b&&-Infinity==1/b)this.addOp(J.script.T.tokenMinus),a=J.script.SV.newVariable(3,Float.$valueOf(-b))}this.putX(a);return this.wasX=!0},"J.script.SV");$_M(c$,"addXAV",function(a){this.putX(J.script.SV.getVariableAV(a));return this.wasX=!0},"~A");$_M(c$,
"addXAD",function(a){this.putX(J.script.SV.getVariableAD(a));return this.wasX=!0},"~A");$_M(c$,"addXAS",function(a){this.putX(J.script.SV.getVariableAS(a));return this.wasX=!0},"~A");$_M(c$,"addXAI",function(a){this.putX(J.script.SV.getVariableAI(a));return this.wasX=!0},"~A");$_M(c$,"addXAII",function(a){this.putX(J.script.SV.getVariableAII(a));return this.wasX=!0},"~A");$_M(c$,"addXAF",function(a){this.putX(J.script.SV.getVariableAF(a));return this.wasX=!0},"~A");$_M(c$,"addXAFF",function(a){this.putX(J.script.SV.getVariableAFF(a));
return this.wasX=!0},"~A");c$.isOpFunc=$_M(c$,"isOpFunc",($fz=function(a){return J.script.T.tokAttr(a.tok,135266304)&&a!==J.script.T.tokenArraySquare||269484241==a.tok&&J.script.T.tokAttr(a.intValue,135266304)},$fz.isPrivate=!0,$fz),"J.script.T");$_M(c$,"addOp",function(a){return this.addOpAllowMath(a,!0)},"J.script.T");$_M(c$,"addOpAllowMath",function(a,b){this.logMessages&&J.util.Logger.info("addOp entry\naddOp: "+a);var c=0<=this.oPt?this.oStack[this.oPt].tok:0;if(this.skipping=0<=this.ifPt&&("F"==
this.ifStack[this.ifPt]||"X"==this.ifStack[this.ifPt]))switch(a.tok){case 269484048:return this.putOp(a),!0;case 269484066:if(269484066!=c||"X"==this.ifStack[this.ifPt])return!0;this.ifStack[this.ifPt]="T";this.skipping=this.wasX=!1;return!0;case 269484049:if(269484048==c)return this.oPt--,!0;if(269484066!=c)return this.putOp(a),!0;this.wasX=!0;this.ifPt--;this.oPt-=2;this.skipping=!1;return!0;default:return!0}var d=null,e=!1,f=269484241==a.tok;if(f&&!this.wasX)return!1;var g=b&&J.script.ScriptMathProcessor.isOpFunc(a);
1<=this.oPt&&(269484048!=a.tok&&135266319==c)&&(c=this.oStack[--this.oPt].tok);var h=1<=this.oPt&&269484048==c;switch(a.tok){case 1073742195:return this.haveSpaceBeforeSquare=!0;case 269484080:if(!this.wasX)return!1;break;case 32:case 64:case 96:case 128:case 160:case 192:case 480:c=0>this.oPt?0:c;if(!this.wasX||!(269484241==c||1678770178==c||1141899265==c))return!1;this.oStack[this.oPt].intValue|=a.tok;return!0;case 269484096:e=!0;if(!this.wasX||this.haveSpaceBeforeSquare)this.squareCount++,a=d=
J.script.T.tokenArraySquare,this.haveSpaceBeforeSquare=!1;break;case 269484097:break;case 269484225:case 269484226:this.incrementX=269484226==a.tok?1:-1;if(this.ptid==this.ptx){if(this.isSyntaxCheck)return!0;c=this.xStack[this.xPt];this.xStack[this.xPt]=J.script.SV.newVariable(4,"").setv(c,!1);return c.increment(this.incrementX)}break;case 269484192:if(this.wasX)break;this.addXInt(0);a=J.script.SV.newVariable(269484224,"-");break;case 269484049:if(!this.wasX&&1<=this.oPt&&269484048==c&&!J.script.ScriptMathProcessor.isOpFunc(this.oStack[this.oPt-
1]))return!1;break;case 269484144:case 269484048:e=!0;default:if(g){if(!f&&this.wasX&&!h)return!1;d=a;e=!0;break}if(this.wasX==e&&269484241!=c)return!1}for(;0<=this.oPt&&269484066!=c&&(!e||269484241==c&&(269484241==a.tok||269484096==a.tok))&&J.script.T.getPrecedence(c)>=J.script.T.getPrecedence(a.tok);){this.logMessages&&(J.util.Logger.info("\noperating, oPt="+this.oPt+" isLeftOp="+e+" oStack[oPt]="+J.script.T.nameOf(c)+"        prec="+J.script.T.getPrecedence(c)+' pending op="'+J.script.T.nameOf(a.tok)+
'" prec='+J.script.T.getPrecedence(a.tok)),this.dumpStacks("operating"));if(269484049==a.tok&&269484048==c){0<=this.xPt&&(this.xStack[this.xPt]=J.script.SV.selectItemVar(this.xStack[this.xPt]));break}if(269484097==a.tok&&135266306==c)break;if(269484097==a.tok&&269484096==c){if(this.isArrayItem&&1==this.squareCount&&0==this.equalCount){this.addXVar(J.script.SV.newScriptVariableToken(J.script.T.tokenArraySelector));break}if(!this.doBitsetSelect())return!1;break}if(!this.operate())return!1;c=0<=this.oPt?
this.oStack[this.oPt].tok:0}null!=d&&this.addXVar(J.script.SV.newVariable(269484436,d));switch(a.tok){case 269484048:this.parenCount++;this.wasX=!1;break;case 806354977:return d=this.getX().asBoolean(),269484066==c?this.ifPt--:this.putOp(J.script.T.tokenColon),this.putIf(d?"T":"F"),this.skipping=!d,this.wasX=!1,!0;case 269484066:if(269484066!=c||0>this.ifPt)return!1;this.ifStack[this.ifPt]="X";this.wasX=!1;return this.skipping=!0;case 269484049:this.wasX=!0;if(0>=this.parenCount--)return!1;269484066==
c&&(this.ifPt--,this.oPt--);this.oPt--;if(0>this.oPt)return!0;if(J.script.ScriptMathProcessor.isOpFunc(this.oStack[this.oPt])&&!this.evaluateFunction(0))return!1;this.skipping=0<=this.ifPt&&"X"==this.ifStack[this.ifPt];return!0;case 269484080:return this.wasX=!1,!0;case 269484096:this.squareCount++;this.wasX=!1;break;case 269484097:this.wasX=!0;if(0>=this.squareCount--||0>this.oPt)return!1;if(135266306==this.oStack[this.oPt].tok)return this.evaluateFunction(269484096);this.oPt--;return!0;case 269484241:this.wasX=
!b||!J.script.T.tokAttr(a.intValue,135266304);break;case 1048586:this.braceCount++;this.wasX=!1;break;case 1048590:if(0>=this.braceCount--)return!1;this.wasX=!1;break;case 269484128:case 269484112:if(!this.wasSyntaxCheck&&0>this.xPt)return!1;!this.wasSyntaxCheck&&(10!=this.xStack[this.xPt].tok&&7!=this.xStack[this.xPt].tok)&&(c=this.getX().asBoolean(),this.addXVar(J.script.SV.getBoolean(c)),c==(269484112==a.tok)&&(this.isSyntaxCheck=!0,a=269484112==a.tok?J.script.T.tokenOrTRUE:J.script.T.tokenAndFALSE));
this.wasX=!1;break;case 269484436:0==this.squareCount&&this.equalCount++;this.wasX=!1;break;default:this.wasX=!1}this.putOp(a);return 269484241==a.tok&&135368713==(a.intValue&-481)&&135368713!=a.intValue?this.evaluateFunction(0):!0},"J.script.T,~B");$_M(c$,"doBitsetSelect",($fz=function(){if(0>this.xPt||0==this.xPt&&!this.isArrayItem)return!1;var a=this.xStack[this.xPt--],b=this.xStack[this.xPt];7==b.tok&&(4==a.tok&&2147483647!=b.intValue)&&(b=J.script.SV.selectItemVar2(b,-2147483648));if(6==b.tok)return b=
b.mapValue(J.script.SV.sValue(a)),this.xStack[this.xPt]=null==b?J.script.SV.newVariable(4,""):b,!0;a=a.asInt();switch(b.tok){default:b=J.script.SV.newVariable(4,J.script.SV.sValue(b));case 10:case 7:case 4:case 11:case 12:this.xStack[this.xPt]=J.script.SV.selectItemVar2(b,a)}return!0},$fz.isPrivate=!0,$fz));$_M(c$,"dumpStacks",function(a){J.util.Logger.info("\n\n------------------\nRPN stacks: "+a+"\n");for(a=0;a<=this.xPt;a++)J.util.Logger.info("x["+a+"]: "+this.xStack[a]);J.util.Logger.info("\n");
for(a=0;a<=this.oPt;a++)J.util.Logger.info("o["+a+"]: "+this.oStack[a]+" prec="+J.script.T.getPrecedence(this.oStack[a].tok));J.util.Logger.info(" ifStack = "+String.instantialize(this.ifStack).substring(0,this.ifPt+1))},"~S");$_M(c$,"getX",($fz=function(){0>this.xPt&&this.eval.error(13);var a=J.script.SV.selectItemVar(this.xStack[this.xPt]);this.xStack[this.xPt--]=null;return a},$fz.isPrivate=!0,$fz));$_M(c$,"evaluateFunction",($fz=function(a){var b=this.oStack[this.oPt--];0==a&&(a=269484241==b.tok?
b.intValue&-481:b.tok);for(var c=J.script.T.getMaxMathParams(a),d=0,e=this.xPt;0<=e&&this.xStack[e--].value!==b;)d++;if(0<c&&d>c)return!1;for(c=Array(d);0<=--d;)c[d]=this.getX();this.xPt--;if(this.isSyntaxCheck)return 269484241==b.tok?!0:this.addXBool(!0);switch(a){case 135266826:case 135266819:case 135266821:case 135266318:case 135266820:case 135266822:return this.evaluateMath(c,a);case 1276118017:case 1276117504:case 1276117507:case 1276117509:return this.evaluateList(b.intValue,c);case 135266306:case 269484096:return this.evaluateArray(c,
269484096==a);case 135266307:case 135270417:return this.evaluateQuaternion(c,a);case 1276118529:return this.evaluateBin(c);case 1276117512:case 1276117513:return this.evaluateRowCol(c,a);case 1766856708:return this.evaluateColor(c);case 135270405:return this.evaluateCompare(c);case 135266310:return this.evaluateConnected(c);case 135267329:return this.evaluateCross(c);case 135270407:return this.evaluateData(c);case 135266305:case 1276118018:case 1276117505:case 1746538509:return(1276118018==a||1276117505==
a)&&269484241==b.tok?this.evaluateDot(c,a):this.evaluateMeasure(c,b.tok);case 1229984263:case 135271426:return this.evaluateLoad(c,a);case 1276118532:return this.evaluateFind(c);case 135368713:return this.evaluateUserFunction(b.value,c,b.intValue,269484241==b.tok);case 1288701960:case 1826248715:return this.evaluateLabel(b.intValue,c);case 135270410:return this.evaluateGetProperty(c);case 137363468:return this.evaluateHelix(c);case 135267841:case 135266319:case 135267842:return this.evaluatePlane(c,
a);case 135287308:case 135271429:return this.evaluateScript(c,a);case 1276117506:case 1276117508:case 1276117510:return this.evaluateString(b.intValue,c);case 135266320:return this.evaluatePoint(c);case 135304707:return this.evaluatePrompt(c);case 135267332:return this.evaluateRandom(c);case 1276118019:return this.evaluateReplace(c);case 135267335:case 135267336:case 1238369286:return this.evaluateSubstructure(c,a);case 135270422:return this.evaluateCache(c);case 1276117010:case 1276117011:return this.evaluateSort(c,
a);case 1297090050:return this.evaluateSymop(c,269484241==b.tok);case 135266324:return this.evaluateWithin(c);case 135402505:return this.evaluateContact(c);case 135270421:return this.evaluateWrite(c)}return!1},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"evaluateCache",($fz=function(a){return 0<a.length?!1:this.addXMap(this.viewer.cacheList())},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateCompare",($fz=function(a){if(2>a.length||5<a.length)return!1;var b;b=J.script.SV.sValue(a[a.length-1]);var c=b.equalsIgnoreCase("stddev"),
d=b.equalsIgnoreCase("ISOMER"),e=!d&&a.length>(c?3:2),f=10==a[0].tok?a[0].value:null,g=10==a[1].tok?a[1].value:null,h=null==f?J.script.SV.sValue(a[0]):"",j=null==g?J.script.SV.sValue(a[1]):"",k=new J.util.Matrix4f;b=NaN;if(e&&(null==f||null==g))return!1;if(d){if(3!=a.length)return!1;if(null==f&&null==g)return this.addXStr(this.viewer.getSmilesMatcher().getRelationship(h,j).toUpperCase());a=null==f?this.viewer.getSmilesMatcher().getMolecularFormula(h,!1):J.util.JmolMolecule.getMolecularFormula(this.viewer.getModelSet().atoms,
f,!1);c=null==g?this.viewer.getSmilesMatcher().getMolecularFormula(j,!1):J.util.JmolMolecule.getMolecularFormula(this.viewer.getModelSet().atoms,g,!1);if(!a.equals(c))return this.addXStr("NONE");null!=f&&(h=this.eval.getSmilesMatches("",null,f,null,!1,!0));a=null==g?0<this.viewer.getSmilesMatcher().areEqual(j,h):0<=this.eval.getSmilesMatches(h,null,g,null,!1,!0).nextSetBit(0);if(!a){f=h+j;if(0<=f.indexOf("/")||0<=f.indexOf("\\")||0<=f.indexOf("@")){if(0<=h.indexOf("@")&&(null!=g||0<=j.indexOf("@")))if(h=
this.viewer.getSmilesMatcher().reverseChirality(h),a=null==g?0<this.viewer.getSmilesMatcher().areEqual(h,j):0<=this.eval.getSmilesMatches(h,null,g,null,!1,!0).nextSetBit(0))return this.addXStr("ENANTIOMERS");null==g?a=0<this.viewer.getSmilesMatcher().areEqual("/nostereo/"+j,h):(g=this.eval.getSmilesMatches("/nostereo/"+h,null,g,null,!1,!0),a=0<=g.nextSetBit(0));if(a)return this.addXStr("DIASTERIOMERS")}return this.addXStr("CONSTITUTIONAL ISOMERS")}if(null==f||null==g)return this.addXStr("IDENTICAL");
b=this.eval.getSmilesCorrelation(f,g,h,null,null,null,null,!1,!1);return this.addXStr(0.2>b?"IDENTICAL":"IDENTICAL or CONFORMATIONAL ISOMERS (RMSD="+b+")")}if(e){h=new J.util.JmolList;j=new J.util.JmolList;b=J.script.SV.sValue(a[2]);var d=b.equalsIgnoreCase("MAP"),e=b.equalsIgnoreCase("SMILES"),m=d||b.equalsIgnoreCase("SMARTS");if(e||m)b=3<a.length?J.script.SV.sValue(a[3]):null;if(null==b)return!1;b=this.eval.getSmilesCorrelation(f,g,b,h,j,k,null,!e,d);if(d){f=h.size();if(0==f)return this.addXStr("");
a=Clazz.doubleToInt(j.size()/f);g=new J.util.JmolList;for(e=c=0;c<a;c++){k=J.util.ArrayUtil.newInt2(f);g.addLast(k);for(b=0;b<f;b++,e++)k[b]=[h.get(b).index,j.get(e).index]}return this.addXList(g)}}else h=this.eval.getPointVector(a[0],0),j=this.eval.getPointVector(a[1],0),null!=h&&null!=j&&(b=J.util.Measure.getTransformMatrix4(h,j,k,null));return c||Float.isNaN(b)?this.addXFloat(b):this.addXM4(k)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateSort",($fz=function(a,b){if(1<a.length)return!1;if(1276117010==
b){var c=0==a.length?0:a[0].asInt();return this.addXVar(this.getX().sortOrReverse(c))}var d=this.getX(),e=0==a.length?null:a[0];if(4==d.tok){var c=0,f=J.script.SV.sValue(d);if(null==e)return this.addXInt(0);e=J.script.SV.sValue(e);for(d=0;d<f.length;d++){d=f.indexOf(e,d);if(0>d)break;c++}return this.addXInt(c)}var c=new J.util.JmolList,g=f=null,h=J.script.SV.getVariable(d.value).sortOrReverse(0).getList();if(null==h)return null==e?this.addXStr(""):this.addXInt(0);for(var d=0,j=h.size();d<=j;d++){var k=
d==j?null:h.get(d);if(!(null!=e&&null!=k&&!J.script.SV.areEqual(k,e)))if(J.script.SV.areEqual(k,f))g.intValue++;else{if(null!=f){var m=new J.util.JmolList;m.addLast(f);m.addLast(g);c.addLast(J.script.SV.getVariableList(m))}g=J.script.SV.newScriptVariableInt(1);f=k}}return null==e?this.addXVar(J.script.SV.getVariableList(c)):c.isEmpty()?this.addXInt(0):this.addXVar(c.get(0).getList().get(1))},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"evaluateSymop",($fz=function(a,b){if(0==a.length)return!1;var c=b?this.getX():
null;if(null!=c&&10!=c.tok)return!1;var c=null!=c?c.value:2<a.length&&10==a[1].tok?a[1].value:this.viewer.getModelUndeletedAtomsBitSet(-1),d;switch(a[0].tok){case 4:d=J.script.SV.sValue(a[0]);break;case 12:d=a[0].escape();break;default:d=null}var e=null==d?a[0].asInt():0,f=1<a.length?this.ptValue(a[1],!0):null;if(2==a.length&&!Float.isNaN(f.x))return this.addXObj(this.viewer.getSymmetryInfo(c,d,e,f,null,null,135266320));var g=(1==a.length?"":J.script.SV.sValue(a[a.length-1])).toLowerCase(),h=135176;
1==a.length||g.equalsIgnoreCase("matrix")?h=12:g.equalsIgnoreCase("array")||g.equalsIgnoreCase("list")?h=1073742001:g.equalsIgnoreCase("description")?h=1826248715:g.equalsIgnoreCase("xyz")?h=1073741982:g.equalsIgnoreCase("translation")?h=1073742178:g.equalsIgnoreCase("axis")?h=1073741854:g.equalsIgnoreCase("plane")?h=135266319:g.equalsIgnoreCase("angle")?h=135266305:g.equalsIgnoreCase("axispoint")?h=135266320:g.equalsIgnoreCase("center")&&(h=12289);return this.addXObj(this.viewer.getSymmetryInfo(c,
d,e,f,null,g,h))},$fz.isPrivate=!0,$fz),"~A,~B");$_M(c$,"evaluateBin",($fz=function(a){if(3!=a.length)return!1;var b=this.getX(),c=13==b.tok;if(!c&&7!=b.tok)return this.addXVar(b);var d=J.script.SV.fValue(a[0]),e=J.script.SV.fValue(a[1]);a=J.script.SV.fValue(a[2]);if(c)b=b.value;else for(var f=b.getList(),b=Clazz.newFloatArray(f.size(),0),c=f.size();0<=--c;)b[c]=J.script.SV.fValue(f.get(c));for(var e=Clazz.doubleToInt(Math.floor((e-d)/a+0.01)),f=Clazz.newIntArray(e,0),g=b.length,c=0;c<g;c++){var h=
Clazz.doubleToInt(Math.floor((b[c]-d)/a));0>h?h=0:h>=e&&(h=e-1);f[h]++}return this.addXAI(f)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateHelix",($fz=function(a){if(1>a.length||5<a.length)return!1;var b=2<a.length?3:1,c=b>=a.length?"array":J.script.SV.sValue(a[b]),b=J.script.T.getTokFromName(c);if(2<a.length){var d=this.ptValue(a[0],!0),e=this.ptValue(a[1],!0);if(9!=a[2].tok)return!1;a=J.util.Quaternion.newP4(a[2].value);switch(b){case 0:break;case 135266320:case 1073741854:case 1666189314:case 135266305:case 1746538509:return this.addXObj(J.util.Measure.computeHelicalAxis(null,
b,d,e,a));case 135266306:b=J.util.Measure.computeHelicalAxis(null,1073742001,d,e,a);if(null==b)break;return this.addXAS(b);default:return this.addXObj(J.util.Measure.computeHelicalAxis(c,135176,d,e,a))}}else switch(a=Clazz.instanceOf(a[0].value,J.util.BS)?a[0].value:this.eval.compareInt(1095761937,269484436,a[0].asInt()),b){case 135266320:return this.addXObj(this.viewer.getHelixData(a,135266320));case 1073741854:return this.addXObj(this.viewer.getHelixData(a,1073741854));case 1666189314:return this.addXObj(this.viewer.getHelixData(a,
1666189314));case 135266305:return this.addXFloat(this.viewer.getHelixData(a,135266305).floatValue());case 135176:case 1746538509:return this.addXObj(this.viewer.getHelixData(a,b));case 135266306:b=this.viewer.getHelixData(a,1073742001);if(null==b)break;return this.addXAS(b)}return!1},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateDot",($fz=function(a,b){if(1!=a.length)return!1;var c=this.getX(),d=a[0],e=this.ptValue(d,!0),d=this.planeValue(d);if(10==c.tok&&1276117505!=b)return this.addXObj(this.eval.getBitsetProperty(J.script.SV.bsSelectVar(c),
1276118018,e,d,c.value,null,!1,c.index,!1));var f=this.ptValue(c,!0),c=this.planeValue(c);if(1276117505==b){if(null!=c&&null!=d)return this.addXFloat(c.x*d.x+c.y*d.y+c.z*d.z+c.w*d.w);null!=c&&(f=J.util.P3.new3(c.x,c.y,c.z));null!=d&&(e=J.util.P3.new3(d.x,d.y,d.z));return this.addXFloat(f.x*e.x+f.y*e.y+f.z*e.z)}return null==c?this.addXFloat(null==d?e.distance(f):J.util.Measure.distanceToPlane(d,f)):this.addXFloat(J.util.Measure.distanceToPlane(c,e))},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"ptValue",
function(a,b){var c;if(this.isSyntaxCheck)return new J.util.P3;switch(a.tok){case 8:return a.value;case 10:return this.eval.getBitsetProperty(J.script.SV.bsSelectVar(a),1146095626,null,null,a.value,null,!1,2147483647,!1);case 4:c=J.util.Escape.uP(J.script.SV.sValue(a));if(Clazz.instanceOf(c,J.util.P3))return c;break;case 7:if(c=J.util.Escape.uP("{"+J.script.SV.sValue(a)+"}"),Clazz.instanceOf(c,J.util.P3))return c}if(!b)return null;c=J.script.SV.fValue(a);return J.util.P3.new3(c,c,c)},"J.script.SV,~B");
$_M(c$,"planeValue",($fz=function(a){if(this.isSyntaxCheck)return new J.util.P4;switch(a.tok){case 9:return a.value;case 7:case 4:return a=J.util.Escape.uP(J.script.SV.sValue(a)),Clazz.instanceOf(a,J.util.P4)?a:null}return null},$fz.isPrivate=!0,$fz),"J.script.T");$_M(c$,"evaluateMeasure",($fz=function(a,b){var c=0;switch(b){case 1746538509:for(var d=new J.util.JmolList,e=[3.4028235E38,3.4028235E38],f=null,g=null,h=!1,j=!1,k=0,m=!1,l=null,s=0,p=3.4028235E38,r=!1,l=0;l<a.length;l++)switch(a[l].tok){case 10:var v=
a[l].value;0==v.length()&&(m=!0);d.addLast(v);c++;s++;break;case 8:v=new J.util.Point3fi;v.setT(a[l].value);d.addLast(v);c++;break;case 2:case 3:e[k++%2]=J.script.SV.fValue(a[l]);break;case 4:v=J.script.SV.sValue(a[l]);v.equalsIgnoreCase("vdw")||v.equalsIgnoreCase("vanderwaals")?p=(l+1<a.length&&2==a[l+1].tok?a[++l].asInt():100)/100:v.equalsIgnoreCase("notConnected")?j=!0:v.equalsIgnoreCase("connected")?h=!0:v.equalsIgnoreCase("minArray")?r=1<=s:J.util.Parser.isOneOf(v.toLowerCase(),"nm;nanometers;pm;picometers;angstroms;ang;au")?
g=v.toLowerCase():f=c+":"+v;break;default:return!1}if(2>c||4<c||2<k||j&&h)return!1;if(m||3.4028235E38!=p&&(2!=s||2!=c))return this.addXStr("");l=3.4028235E38==p?new J.atomdata.RadiusData(e,0,null,null):new J.atomdata.RadiusData(null,p,J.atomdata.RadiusData.EnumType.FACTOR,J.constant.EnumVdw.AUTO);return this.addXObj((new J.modelset.MeasurementData(this.viewer,d)).set(0,l,f,g,null,h,j,null,!0).getMeasurements(r));case 135266305:if(3!=(c=a.length)&&4!=c)return!1;break;default:if(2!=(c=a.length))return!1}d=
Array(c);for(l=0;l<c;l++)d[l]=this.ptValue(a[l],!0);switch(c){case 2:return this.addXFloat(d[0].distance(d[1]));case 3:return this.addXFloat(J.util.Measure.computeAngleABC(d[0],d[1],d[2],!0));case 4:return this.addXFloat(J.util.Measure.computeTorsion(d[0],d[1],d[2],d[3],!0))}return!1},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"evaluateUserFunction",($fz=function(a,b,c,d){var e=null;if(d&&(e=this.getX(),10!=e.tok))return!1;this.wasX=!1;for(var f=new J.util.JmolList,g=0;g<b.length;g++)f.addLast(b[g]);if(d)return this.addXObj(this.eval.getBitsetProperty(J.script.SV.bsSelectVar(e),
c,null,null,e.value,[a,f],!1,e.index,!1));a=this.eval.runFunctionRet(null,a,f,null,!0,!0,!1);return null==a?!1:this.addXVar(a)},$fz.isPrivate=!0,$fz),"~S,~A,~N,~B");$_M(c$,"evaluateFind",($fz=function(a){if(0==a.length)return!1;var b=this.getX(),c=J.script.SV.sValue(a[0]),d=1<a.length&&1048589!=a[1].tok&&1048588!=a[1].tok?J.script.SV.sValue(a[1]):"",e=c.equalsIgnoreCase("SEQUENCE"),f=c.equalsIgnoreCase("SMILES"),g=c.equalsIgnoreCase("SMARTS"),h=c.equalsIgnoreCase("MF");if(f||g||10==b.tok){var j=f||
g?2:1,j=j<a.length&&10==a[j].tok?a[j++].value:null;a=1048589==a[a.length-1].tok;var k=null;switch(b.tok){case 4:c=J.script.SV.sValue(b);if(null!=j)return!1;d.equalsIgnoreCase("mf")?(k=this.viewer.getSmilesMatcher().getMolecularFormula(c,g),null==k&&this.eval.evalError(this.viewer.getSmilesMatcher().getLastException(),null)):k=this.eval.getSmilesMatches(d,c,null,null,g,!a);break;case 10:if(h)return this.addXStr(J.util.JmolMolecule.getMolecularFormula(this.viewer.getModelSet().atoms,b.value,!1));if(e)return this.addXStr(this.viewer.getSmiles(-1,
-1,b.value,!0,a,a,!1));if(f||g)c=d;k=this.eval.getSmilesMatches(c,null,b.value,j,!f,!a)}null==k&&this.eval.error(22);return this.addXObj(k)}g=0<=d.indexOf("v");f=0<=d.indexOf("i");d=0<=d.indexOf("m");e=7==b.tok;a=2==a.length;if(e||a){a=null;try{a=java.util.regex.Pattern.compile(c,f?2:0)}catch(m){if(Clazz.exceptionOf(m,Exception))this.eval.evalError(m.toString(),null);else throw m;}b=J.script.SV.listValue(b);J.util.Logger.debugging&&J.util.Logger.debug("finding "+c);for(var c=new J.util.BS,f=k=0,l=
null,h=d?new J.util.JmolList:null,j=0;j<b.length;j++){var s=b[j],l=a.matcher(s),p=l.find();if(d&&p||!d&&p==!g)f++,k=j,c.set(j),d&&h.addLast(g?s.substring(0,l.start())+s.substring(l.end()):l.group())}if(!e)return d?this.addXStr(1==h.size()?h.get(0):""):g?this.addXBool(1==f):d?this.addXStr(0==f?"":l.group()):this.addXInt(0==f?0:l.start()+1);if(1==f)return this.addXStr(d?h.get(0):b[k]);g=Array(f);if(0<f)for(j=b.length;0<=--j;)c.get(j)&&(--f,g[f]=d?h.get(f):b[j]);return this.addXAS(g)}return this.addXInt(J.script.SV.sValue(b).indexOf(c)+
1)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateGetProperty",($fz=function(a){var b=0,c=a.length>b?J.script.SV.sValue(a[b++]).toLowerCase():"";c.startsWith("$");var d;if(c.equalsIgnoreCase("fileContents")&&2<a.length){b=J.script.SV.sValue(a[1]);for(d=2;d<a.length;d++)b+="|"+J.script.SV.sValue(a[d]);d=b;b=a.length}else d=a.length>b&&10==a[b].tok?J.script.SV.bsSelectVar(a[b++]):a.length>b&&4==a[b].tok&&this.viewer.checkPropertyParameter(c)?a[b++].value:"";d=this.viewer.getProperty(null,c,d);b<a.length&&
(d=this.viewer.extractProperty(d,a,b));return this.addXObj(J.script.SV.isVariableType(d)?d:J.util.Escape.toReadable(c,d))},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluatePlane",($fz=function(a,b){if(135267841==b&&3!=a.length||135267842==b&&2!=a.length&&3!=a.length||0==a.length||4<a.length)return!1;var c,d,e,f,g,h;switch(a.length){case 1:if(10==a[0].tok&&(g=J.script.SV.getBitSet(a[0],!1),3==g.cardinality())){g=this.viewer.getAtomPointVector(g);d=new J.util.V3;h=new J.util.V3;var j=new J.util.V3;f=new J.util.P4;
J.util.Measure.getPlaneThroughPoints(g.get(0),g.get(1),g.get(2),d,h,j,f);return this.addXPt4(f)}g=J.util.Escape.uP(J.script.SV.sValue(a[0]));return Clazz.instanceOf(g,J.util.P4)?this.addXPt4(g):this.addXStr(""+g);case 2:if(135267842==b){if(9!=a[1].tok)return!1;e=new J.util.P3;g=new J.util.V3;h=new J.util.V3;f=a[1].value;if(9==a[0].tok)return g=J.util.Measure.getIntersectionPP(a[0].value,f),null==g?this.addXStr(""):this.addXList(g);d=this.ptValue(a[0],!1);return null==d?this.addXStr(""):this.addXPt(J.util.Measure.getIntersection(d,
null,f,e,g,h))}case 3:case 4:switch(b){case 135267841:return this.addXPt4(this.eval.getHklPlane(J.util.P3.new3(J.script.SV.fValue(a[0]),J.script.SV.fValue(a[1]),J.script.SV.fValue(a[2]))));case 135267842:c=this.ptValue(a[0],!1);d=this.ptValue(a[1],!1);if(null==c||null==d)return this.addXStr("");d=J.util.V3.newV(d);d.normalize();if(9==a[2].tok)return e=new J.util.P3,g=new J.util.V3,h=new J.util.V3,c=J.util.Measure.getIntersection(c,d,a[2].value,e,g,h),null==c?this.addXStr(""):this.addXPt(c);e=this.ptValue(a[2],
!1);if(null==e)return this.addXStr("");g=new J.util.V3;J.util.Measure.projectOntoAxis(e,c,d,g);return this.addXPt(e)}switch(a[0].tok){case 2:case 3:if(3==a.length)return c=J.script.SV.fValue(a[0]),e=J.script.SV.fValue(a[1]),f=J.script.SV.fValue(a[2]),g=J.util.V3.new3(0,0,1),d=J.util.P3.new3(0,1,0),f=J.util.Quaternion.newVA(d,f),f.getMatrix().transform(g),d.set(0,0,1),f=J.util.Quaternion.newVA(d,e),f.getMatrix().transform(g),d.setT(g),d.scale(c),f=new J.util.P4,J.util.Measure.getPlaneThroughPoint(d,
g,f),this.addXPt4(f);break;case 10:case 8:c=this.ptValue(a[0],!1);d=this.ptValue(a[1],!1);if(null==d)return!1;e=2<a.length&&(10==a[2].tok||8==a[2].tok)?this.ptValue(a[2],!1):null;g=J.util.V3.newV(d);if(null==e)return f=new J.util.P4,2==a.length||!a[2].asBoolean()?(e=J.util.P3.newP(c),e.add(d),e.scale(0.5),g.sub(c),g.normalize()):e=c,J.util.Measure.getPlaneThroughPoint(e,g,f),this.addXPt4(f);h=new J.util.V3;j=new J.util.V3;d=J.util.Measure.getDirectedNormalThroughPoints(c,d,e,4==a.length?this.ptValue(a[3],
!0):null,g,h,j);return this.addXPt4(J.util.P4.new4(g.x,g.y,g.z,d))}}if(4!=a.length)return!1;g=J.script.SV.fValue(a[0]);d=J.script.SV.fValue(a[1]);c=J.script.SV.fValue(a[2]);e=J.script.SV.fValue(a[3]);return this.addXPt4(J.util.P4.new4(g,d,c,e))},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"evaluatePoint",($fz=function(a){if(1!=a.length&&3!=a.length&&4!=a.length)return!1;switch(a.length){case 1:if(3==a[0].tok||2==a[0].tok)return this.addXInt(a[0].asInt());var b=J.script.SV.sValue(a[0]);7==a[0].tok&&(b="{"+
b+"}");a=J.util.Escape.uP(b);return Clazz.instanceOf(a,J.util.P3)?this.addXPt(a):this.addXStr(""+a);case 3:return this.addXPt(J.util.P3.new3(a[0].asFloat(),a[1].asFloat(),a[2].asFloat()));case 4:return this.addXPt4(J.util.P4.new4(a[0].asFloat(),a[1].asFloat(),a[2].asFloat(),a[3].asFloat()))}return!1},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluatePrompt",($fz=function(a){if(1!=a.length&&2!=a.length&&3!=a.length)return!1;var b=J.script.SV.sValue(a[0]),c=1<a.length&&7==a[1].tok?J.script.SV.listValue(a[1]):
null,d=null!=c||1==a.length||3==a.length&&a[2].asBoolean();a=null!=c?null:2<=a.length?J.script.SV.sValue(a[1]):"OK";b=this.viewer.prompt(b,a,c,d);return d&&null!=c?this.addXInt(Integer.parseInt(b)+1):this.addXStr(b)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateReplace",($fz=function(a){if(2!=a.length)return!1;var b=this.getX(),c=J.script.SV.sValue(a[0]);a=J.script.SV.sValue(a[1]);var d=7==b.tok?null:J.script.SV.sValue(b);if(null!=d)return this.addXStr(J.util.TextFormat.simpleReplace(d,c,a));b=J.script.SV.listValue(b);
for(d=b.length;0<=--d;)b[d]=J.util.TextFormat.simpleReplace(b[d],c,a);return this.addXAS(b)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateString",($fz=function(a,b){if(1<b.length)return!1;var c=this.getX(),d=1276117508==a&&10==c.tok||1276117510==a&&7==c.tok?null:J.script.SV.sValue(c),e=1==b.length?J.script.SV.sValue(b[0]):1276117510==a?"":"\n";switch(a){case 1276117508:if(10==c.tok)for(var f=J.script.SV.bsSelectVar(c),e="\n",g=this.viewer.getModelCount(),d="",c=0;c<g;c++){var d=d+(0==c?"":"\n"),h=
this.viewer.getModelUndeletedAtomsBitSet(c);h.and(f);d+=J.util.Escape.eBS(h)}return this.addXAS(J.util.TextFormat.splitChars(d,e));case 1276117506:return 0<d.length&&"\n"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1)),this.addXStr(J.util.TextFormat.simpleReplace(d,"\n",e));case 1276117510:if(null!=d)return this.addXStr(J.util.TextFormat.trim(d,e));d=J.script.SV.listValue(c);for(c=d.length;0<=--c;)d[c]=J.util.TextFormat.trim(d[c],e);return this.addXAS(d)}return this.addXStr("")},$fz.isPrivate=
!0,$fz),"~N,~A");$_M(c$,"evaluateList",($fz=function(a,b){if(1!=b.length&&!(1276118017==a&&(0==b.length||2==b.length)))return!1;var c=this.getX(),d,e,f=null,g=null;d=null;if(2==b.length){e=4==b[0].tok?0:1;var h=J.script.SV.sValue(b[e]),f=7==c.tok?J.script.SV.listValue(c):J.util.TextFormat.split(J.script.SV.sValue(c),"\n");d=b[1-e];g=7==d.tok?J.script.SV.listValue(d):J.util.TextFormat.split(J.script.SV.sValue(d),"\n");d=Array(e=Math.max(f.length,g.length));for(var j=0;j<e;j++)d[j]=(j>=f.length?"":
f[j])+h+(j>=g.length?"":g[j]);return this.addXAS(d)}d=0==b.length?J.script.SV.newVariable(1048579,"all"):b[0];j=1048579==d.tok;if(7!=c.tok&&4!=c.tok){this.wasX=!1;this.addOp(J.script.T.tokenLeftParen);this.addXVar(c);switch(a){case 1276118017:this.addOp(J.script.T.tokenPlus);break;case 1276117509:this.addOp(J.script.T.tokenMinus);break;case 1276117507:this.addOp(J.script.T.tokenTimes);break;case 1276117504:this.addOp(J.script.T.tokenDivide)}this.addXVar(d);return this.addOp(J.script.T.tokenRightParen)}var k=
7!=d.tok&&0>J.script.SV.sValue(d).indexOf("\n"),m=h=null,l=c.getList(),s=d.getList();7==c.tok?e=l.size():(f=J.util.TextFormat.splitChars(c.value,"\n"),h=Clazz.newFloatArray(e=f.length,0),J.util.Parser.parseFloatArrayData(f,h));if(j){f=0;if(7==c.tok)for(j=e;0<=--j;)f+=J.script.SV.fValue(l.get(j));else for(j=e;0<=--j;)f+=h[j];return this.addXFloat(f)}var p=null;k?p=d:7==d.tok?e=Math.min(e,s.size()):(g=J.util.TextFormat.splitChars(d.value,"\n"),m=Clazz.newFloatArray(g.length,0),J.util.Parser.parseFloatArrayData(g,
m),e=Math.min(h.length,m.length));var r=null;switch(a){case 1276118017:r=J.script.T.tokenPlus;break;case 1276117509:r=J.script.T.tokenMinus;break;case 1276117507:r=J.script.T.tokenTimes;break;case 1276117504:r=J.script.T.tokenDivide}for(var v=Array(e),j=0;j<e;j++){7==c.tok?this.addXVar(l.get(j)):Float.isNaN(h[j])?this.addXObj(J.script.SV.unescapePointOrBitsetAsVariable(f[j])):this.addXFloat(h[j]);k?this.addXVar(p):7==d.tok?this.addXVar(s.get(j)):Float.isNaN(m[j])?this.addXObj(J.script.SV.unescapePointOrBitsetAsVariable(g[j])):
this.addXFloat(m[j]);if(!this.addOp(r)||!this.operate())return!1;v[j]=this.xStack[this.xPt--]}return this.addXAV(v)},$fz.isPrivate=!0,$fz),"~N,~A");$_M(c$,"evaluateRowCol",($fz=function(a,b){if(1!=a.length)return!1;var c=a[0].asInt()-1,d=this.getX();switch(d.tok){case 11:if(0>c||2<c)break;var e=d.value;switch(b){case 1276117513:return d=Clazz.newFloatArray(3,0),e.getRow(c,d),this.addXAF(d);default:return d=Clazz.newFloatArray(3,0),e.getColumn(c,d),this.addXAF(d)}case 12:if(0>c||2<c)break;e=d.value;
switch(b){case 1276117513:return d=Clazz.newFloatArray(4,0),e.getRow(c,d),this.addXAF(d);default:return d=Clazz.newFloatArray(4,0),e.getColumn(c,d),this.addXAF(d)}}return!1},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"evaluateArray",($fz=function(a,b){var c=a.length;if(b&&(4==c||3==c)){for(var d=!0,e=0;e<c&&d;e++)d=7==a[e].tok&&a[e].getList().size()==c;if(d){for(var f=Clazz.newFloatArray(c*c,0),g=0,e=0;e<c&&d;e++)for(var h=a[e].getList(),j=0;j<c;j++){var k=J.script.SV.fValue(h.get(j));if(Float.isNaN(k)){d=
!1;break}f[g++]=k}if(d)return 3==c?this.addXM3(J.util.Matrix3f.newA(f)):this.addXM4(J.util.Matrix4f.newA(f))}}c=Array(a.length);for(e=c.length;0<=--e;)c[e]=J.script.SV.newScriptVariableToken(a[e]);return this.addXAV(c)},$fz.isPrivate=!0,$fz),"~A,~B");$_M(c$,"evaluateMath",($fz=function(a,b){if(135266318==b)return 1==a.length&&4==a[0].tok?this.addXStr(new java.util.Date+"\t"+J.script.SV.sValue(a[0])):this.addXInt((System.currentTimeMillis()&2147483647)-(0==a.length?0:a[0].asInt()));if(1!=a.length)return!1;
if(135266826==b)return 2==a[0].tok?this.addXInt(Math.abs(a[0].asInt())):this.addXFloat(Math.abs(a[0].asFloat()));var c=J.script.SV.fValue(a[0]);switch(b){case 135266819:return this.addXFloat(180*Math.acos(c)/3.141592653589793);case 135266821:return this.addXFloat(Math.cos(3.141592653589793*c/180));case 135266820:return this.addXFloat(Math.sin(3.141592653589793*c/180));case 135266822:return this.addXFloat(Math.sqrt(c))}return!1},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"evaluateQuaternion",($fz=function(a,
b){var c=null,d=a.length,e=2147483647,f=!1;135270417==b&&(1<d&&(4==a[d-1].tok&&a[d-1].value.equalsIgnoreCase("relative"))&&(d--,f=!0),1<d&&(2==a[d-1].tok&&10==a[0].tok)&&(e=a[d-1].asInt(),0>=e&&(e=2147483646),d--));switch(d){case 0:case 1:case 4:break;case 2:if(135270417==b){if(7==a[0].tok&&7==a[1].tok)break;if(10==a[0].tok&&(2==a[1].tok||10==a[1].tok))break}if(null==(c=this.ptValue(a[0],!1))||135270417!=b&&8==a[1].tok)return!1;break;case 3:if(135270417!=b)return!1;if(9==a[0].tok){if(8!=a[2].tok&&
10!=a[2].tok)return!1;break}for(var g=0;3>g;g++)if(8!=a[g].tok&&10!=a[g].tok)return!1;break;default:return!1}var h=g=null,j=null;switch(d){case 0:return this.addXPt4(J.util.Quaternion.newQ(this.viewer.getRotationQuaternion()).toPoint4f());default:if(135270417==b&&7==a[0].tok){c=J.script.ScriptMathProcessor.getQuaternionArray(a[0].getList(),1073742001);f=J.util.Quaternion.sphereMean(c,null,1E-4);g=Clazz.instanceOf(f,J.util.Quaternion)?f:null;break}else if(135270417==b&&10==a[0].tok)h=this.viewer.getAtomGroupQuaternions(a[0].value,
e);else if(11==a[0].tok)g=J.util.Quaternion.newM(a[0].value);else if(9==a[0].tok)j=a[0].value;else if(j=J.util.Escape.uP(J.script.SV.sValue(a[0])),!Clazz.instanceOf(j,J.util.P4))return!1;135266307==b&&(g=J.util.Quaternion.newVA(J.util.P3.new3(j.x,j.y,j.z),j.w));break;case 2:if(135270417==b){if(7==a[0].tok&&7==a[1].tok){c=J.script.ScriptMathProcessor.getQuaternionArray(a[0].getList(),1073742001);h=J.script.ScriptMathProcessor.getQuaternionArray(a[1].getList(),1073742001);h=J.util.Quaternion.div(h,
c,e,f);break}if(10==a[0].tok&&10==a[1].tok){c=this.viewer.getAtomGroupQuaternions(a[0].value,2147483647);h=this.viewer.getAtomGroupQuaternions(a[1].value,2147483647);h=J.util.Quaternion.div(h,c,e,f);break}}f=this.ptValue(a[1],!1);j=this.planeValue(a[0]);g=null!=f?J.util.Quaternion.getQuaternionFrame(J.util.P3.new3(0,0,0),c,f):J.util.Quaternion.newVA(c,J.script.SV.fValue(a[1]));break;case 3:if(9==a[0].tok)return e=8==a[2].tok?a[2].value:this.viewer.getAtomSetCenter(a[2].value),this.addXStr(J.util.Quaternion.newP4(a[0].value).draw("q",
J.script.SV.sValue(a[1]),e,1));f=Array(3);for(g=0;3>g;g++)f[g]=8==a[g].tok?a[g].value:this.viewer.getAtomSetCenter(a[g].value);g=J.util.Quaternion.getQuaternionFrame(f[0],f[1],f[2]);break;case 4:135270417==b?j=J.util.P4.new4(J.script.SV.fValue(a[1]),J.script.SV.fValue(a[2]),J.script.SV.fValue(a[3]),J.script.SV.fValue(a[0])):g=J.util.Quaternion.newVA(J.util.P3.new3(J.script.SV.fValue(a[0]),J.script.SV.fValue(a[1]),J.script.SV.fValue(a[2])),J.script.SV.fValue(a[3]))}if(null!=h){if(2147483647!=e){e=
new J.util.JmolList;for(g=0;g<h.length;g++)e.addLast(h[g].toPoint4f());return this.addXList(e)}g=0<h.length?h[0]:null}return this.addXPt4((null==g?J.util.Quaternion.newP4(j):g).toPoint4f())},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"evaluateRandom",($fz=function(a){if(2<a.length)return!1;var b=2>a.length?0:J.script.SV.fValue(a[0]);a=0==a.length?1:J.script.SV.fValue(a[a.length-1]);return this.addXFloat(Math.random()*(a-b)+b)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateCross",($fz=function(a){if(2!=a.length)return!1;
var b=a[0];a=a[1];if(8!=b.tok||8!=a.tok)return!1;b=J.util.V3.newV(b.value);a=J.util.V3.newV(a.value);b.cross(b,a);return this.addXPt(J.util.P3.newP(b))},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateLoad",($fz=function(a,b){if(2<a.length||1>a.length)return!1;var c=J.script.SV.sValue(a[0]),d=2==a.length?a[1].asInt():2147483647;return this.addXStr(135271426==b?this.viewer.getFileAsString4(c,d,!1,!1):this.viewer.getFilePath(c,!1))},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"evaluateWrite",($fz=function(a){return 0==
a.length?!1:this.addXStr(this.eval.write(a))},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateScript",($fz=function(a,b){if(135287308==b&&1!=a.length||0==a.length||2<a.length)return!1;var c=J.script.SV.sValue(a[0]),d=new J.util.SB;switch(b){case 135271429:var e=2==a.length?J.script.SV.sValue(a[1]):".";e.equals(".")||d.append(this.viewer.jsEval(e+"\u0001"+c));(e.equals(".")||e.equals("*"))&&this.eval.runScriptBuffer(c,d);break;case 135287308:d.append(this.viewer.jsEval(c))}var c=d.toString(),f;return Float.isNaN(f=
J.util.Parser.parseFloatStrict(c))?this.addXStr(c):0<=c.indexOf(".")?this.addXFloat(f):this.addXInt(J.util.Parser.parseInt(c))},$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"evaluateData",($fz=function(a){if(1!=a.length&&2!=a.length&&4!=a.length)return!1;var b=J.script.SV.sValue(a[0]),c=2==a.length?J.script.SV.sValue(a[1]):"";if(4==a.length){var c=a[1].asInt(),d=a[2].asInt();a=a[3].asInt();a=J.util.Parser.extractData(b,c,d,a);return this.addXStr(J.util.Escape.escapeFloatA(a,!1))}if(0==b.indexOf("data2d_"))return b=
this.viewer.getDataFloat2D(b),null==b?this.addXStr(""):2==a.length&&2==a[1].tok?(a=a[1].intValue,0>a&&(a+=b.length),0<=a&&a<b.length?this.addXStr(J.util.Escape.escapeFloatA(b[a],!1)):this.addXStr("")):this.addXStr(J.util.Escape.escapeFloatAA(b,!1));if(0==b.indexOf("property_")){b=this.viewer.getDataFloat(b);if(null==b)return this.addXStr("");a=0==c.indexOf("property_")?this.viewer.getDataFloat(c):null;if(null!=a){b=J.util.ArrayUtil.arrayCopyF(b,-1);for(c=Math.min(b.length,a.length);0<=--c;)b[c]+=
a[c]}return this.addXStr(J.util.Escape.escapeFloatA(b,!1))}return 1==a.length?(a=this.viewer.getData(b),this.addXStr(null==a?"":""+a[1])):this.addXStr(this.viewer.getData(b,c))},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateLabel",($fz=function(a,b){var c=2>b.length?this.getX():null,d=0==b.length?"%U":J.script.SV.sValue(b[0]),e=J.script.T.tokAttr(a,480);if(null==c)return this.addXStr(J.script.SV.sprintfArray(b));var f=J.script.SV.getBitSet(c,!0);return null==f?this.addXObj(J.script.SV.sprintf(J.util.TextFormat.formatCheck(d),
c)):this.addXObj(this.eval.getBitsetIdent(f,d,c.value,!0,c.index,e))},$fz.isPrivate=!0,$fz),"~N,~A");$_M(c$,"evaluateWithin",($fz=function(a){if(1>a.length||5<a.length)return!1;var b=a.length,c=0,d=a[0].value,e=""+d,f=a[0].tok;4==f&&(f=J.script.T.getTokFromName(e));var g=1649412112==f;g&&(c=100,d=null);var h=!1,j=!1,k=g||3==f||2==f,m=null;switch(f){case 1048580:return 3!=b||!Clazz.instanceOf(a[1].value,J.util.BS)||!Clazz.instanceOf(a[2].value,J.util.BS)?!1:this.addXBs(this.viewer.getBranchBitSet(a[2].value.nextSetBit(0),
a[1].value.nextSetBit(0)));case 135267336:case 1238369286:case 135267335:c=null;e=!0;switch(b){case 2:break;case 3:if(e=10==a[2].tok)c=a[2].value;break;default:e=!1}e||this.eval.error(22);return this.addXObj(this.eval.getSmilesMatches(J.script.SV.sValue(a[1]),null,c,null,135267335==f,this.asBitSet))}if(Clazz.instanceOf(d,String)){if(0==f){f=1048614;if(2<b)return!1;b=2}}else if(k){g||(c=J.script.SV.fValue(a[0]));if(2>b)return!1;switch(f=a[1].tok){case 1048589:case 1048588:h=a[1].asBoolean();b=0;break;
case 4:f=J.script.SV.sValue(a[1]);if(f.startsWith("$"))return this.addXBs(this.eval.getAtomsNearSurface(c,f.substring(1)));j=f.equalsIgnoreCase("group");f=(g=f.equalsIgnoreCase("vanderwaals"))?1649412112:1087373318}}else return!1;var l=d=null;switch(b){case 1:switch(f){case 137363468:case 3145760:case 1679429641:return this.addXBs(this.viewer.getAtomBits(f,null));case 1073741864:return this.addXBs(this.viewer.getAtomBits(f,""));case 1048614:return this.addXBs(this.viewer.getAtomBits(1087373320,e))}return!1;
case 2:switch(f){case 1048614:f=1087373320;break;case 1087375362:case 1087375361:case 1073741864:case 1087373320:return this.addXBs(this.viewer.getAtomBits(f,J.script.SV.sValue(a[a.length-1])))}break;case 3:switch(f){case 1048589:case 1048588:case 1087373318:case 1649412112:case 135266319:case 135267841:case 1048582:break;case 1087373320:e=J.script.SV.sValue(a[2]);break;default:return!1}}b=a.length-1;Clazz.instanceOf(a[b].value,J.util.P4)?l=a[b].value:Clazz.instanceOf(a[b].value,J.util.P3)&&(d=a[b].value,
J.script.SV.sValue(a[1]).equalsIgnoreCase("hkl")&&(l=this.eval.getHklPlane(d)));if(0<b&&null==l&&null==d&&!Clazz.instanceOf(a[b].value,J.util.BS))return!1;if(null!=l)return this.addXBs(this.viewer.getAtomsNearPlane(c,l));if(null!=d)return this.addXBs(this.viewer.getAtomsNearPt(c,d));a=10==a[b].tok?J.script.SV.bsSelectVar(a[b]):null;if(1087373320==f)return this.addXBs(this.viewer.getSequenceBits(e,a));null==a&&(a=new J.util.BS);if(!k)return this.addXBs(this.viewer.getAtomBits(f,a));if(j)return this.addXBs(this.viewer.getGroupsWithin(Clazz.floatToInt(c),
a));g&&(m=new J.atomdata.RadiusData(null,10<c?c/100:c,10<c?J.atomdata.RadiusData.EnumType.FACTOR:J.atomdata.RadiusData.EnumType.OFFSET,J.constant.EnumVdw.AUTO));return this.addXBs(this.viewer.getAtomsWithinRadius(c,a,h,m))},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateContact",($fz=function(a){if(1>a.length||3<a.length)return!1;var b=0,c=100;switch(a[0].tok){case 3:case 2:c=J.script.SV.fValue(a[b++]);break;case 10:break;default:return!1}if(b==a.length||!Clazz.instanceOf(a[b].value,J.util.BS))return!1;
var d=J.util.BSUtil.copy(J.script.SV.bsSelectVar(a[b++]));if(this.isSyntaxCheck)return this.addXBs(new J.util.BS);a=b<a.length?J.util.BSUtil.copy(J.script.SV.bsSelectVar(a[b])):null;c=new J.atomdata.RadiusData(null,10<c?c/100:c,10<c?J.atomdata.RadiusData.EnumType.FACTOR:J.atomdata.RadiusData.EnumType.OFFSET,J.constant.EnumVdw.AUTO);a=this.eval.setContactBitSets(d,a,!0,NaN,c,!1);a.or(d);return this.addXBs(a)},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateColor",($fz=function(a){var b=0<a.length?J.script.SV.sValue(a[0]):
"";if(b.equalsIgnoreCase("hsl")&&2==a.length){var c=J.util.P3.newP(J.script.SV.ptValue(a[1])),d=Clazz.newFloatArray(3,0);J.util.ColorEncoder.RGBtoHSL(c.x,c.y,c.z,d);c.set(360*d[0],100*d[1],100*d[2]);return this.addXPt(c)}var e=b.startsWith("$"),d=e?null:this.viewer.getColorEncoder(b);if(!e&&null==d)return this.addXStr("");var c=1<a.length?J.script.SV.fValue(a[1]):3.4028235E38,f=2<a.length?J.script.SV.fValue(a[2]):3.4028235E38;a=3<a.length?J.script.SV.fValue(a[3]):3.4028235E38;var g=3.4028235E38!=
a||3.4028235E38!=c&&3.4028235E38==f;3.4028235E38==f&&0==b.length&&(a=c,f=this.viewer.getCurrentColorRange(),c=f[0],f=f[1]);if(e){d=[b.substring(1),null];if(!this.viewer.getShapePropertyData(24,"colorEncoder",d))return this.addXStr("");d=d[1]}else d.setRange(c,f,c>f);b=d.getColorKey();return g?this.addXPt(J.util.ColorUtil.colorPointFromInt2(d.getArgb(3.4028235E38==f?c:a))):this.addXVar(J.script.SV.getVariableMap(b))},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateConnected",($fz=function(a){if(5<a.length)return!1;
for(var b=-2147483648,c=2147483647,d=0,e=3.4028235E38,f=65535,g=null,h=null,j=!1,k=!1,m=0;m<a.length;m++){var l=a[m];switch(l.tok){case 10:if((k=Clazz.instanceOf(l.value,J.modelset.Bond.BondSet))&&null!=g)return!1;if(null==g)g=J.script.SV.bsSelectVar(l);else if(null==h)h=J.script.SV.bsSelectVar(l);else return!1;break;case 4:f=J.script.SV.sValue(l);f=f.equalsIgnoreCase("hbond")?30720:J.script.ScriptEvaluator.getBondOrderFromString(f);if(131071==f)return!1;break;case 3:j=!0;default:var s=l.asInt(),
l=l.asFloat();if(2147483647!=c)return!1;-2147483648==b?(b=Math.max(s,0),d=l):(c=s,e=l)}}-2147483648==b?(b=1,c=100,d=0.1,e=1E8):2147483647==c&&(c=b,e=d,d=0.1);null==g&&(g=this.viewer.getModelUndeletedAtomsBitSet(-1));j&&null==h&&(h=g);return null!=h?(a=new J.util.BS,this.viewer.makeConnections(d,e,f,1087373321,g,h,a,k,!1,0),this.addXVar(J.script.SV.newVariable(10,new J.modelset.Bond.BondSet(a,this.viewer.getAtomIndices(this.viewer.getAtomBits(1678770178,a)))))):this.addXBs(this.viewer.getAtomsConnected(b,
c,f,g))},$fz.isPrivate=!0,$fz),"~A");$_M(c$,"evaluateSubstructure",($fz=function(a,b){if(0==a.length)return!1;var c=new J.util.BS,d=J.script.SV.sValue(a[0]);if(0<d.length)try{var e=2==a.length&&10==a[1].tok?J.script.SV.bsSelectVar(a[1]):null,c=this.viewer.getSmilesMatcher().getSubstructureSet(d,this.viewer.getModelSet().atoms,this.viewer.getAtomCount(),e,135267336!=b&&1238369286!=b,!1)}catch(f){if(Clazz.exceptionOf(f,Exception))this.eval.evalError(f.toString(),null);else throw f;}return this.addXBs(c)},
$fz.isPrivate=!0,$fz),"~A,~N");$_M(c$,"operate",($fz=function(){var a=this.oStack[this.oPt--],b,c;this.logMessages&&this.dumpStacks("operate: "+a);if(this.isArrayItem&&0==this.squareCount&&1==this.equalCount&&0>this.oPt&&269484436==a.tok)return!0;var d=this.getX();if(d===J.script.T.tokenArraySelector)return!1;if(7==d.tok||11==d.tok||12==d.tok)d=J.script.SV.selectItemVar(d);if(269484225==a.tok||269484226==a.tok){if(!this.isSyntaxCheck&&!d.increment(this.incrementX))return!1;this.wasX=!0;this.putX(d);
return!0}if(269484144==a.tok){if(this.isSyntaxCheck)return this.addXBool(!0);switch(d.tok){case 9:return this.addXPt4(J.util.Quaternion.newP4(d.value).inv().toPoint4f());case 11:return c=J.util.Matrix3f.newM(d.value),c.invert(),this.addXM3(c);case 12:return c=J.util.Matrix4f.newM(d.value),c.invert(),this.addXM4(c);case 10:return this.addXBs(J.util.BSUtil.copyInvert(J.script.SV.bsSelectVar(d),Clazz.instanceOf(d.value,J.modelset.Bond.BondSet)?this.viewer.getBondCount():this.viewer.getAtomCount()));
default:return this.addXBool(!d.asBoolean())}}c=a.intValue&-481;if(269484241==a.tok){switch(c){case 1073741824:return this.getAllProperties(d,a.value);case 1141899267:case 1276117011:case 1141899270:if(1141899267==c&&Clazz.instanceOf(d.value,J.modelset.Bond.BondSet))break;return this.addXInt(J.script.SV.sizeOf(d));case 1141899272:return this.addXStr(J.script.ScriptMathProcessor.typeOf(d));case 1141899281:if(6!=d.tok)return this.addXStr("");d=d.value.keySet();d=d.toArray(Array(d.size()));java.util.Arrays.sort(d);
return this.addXAS(d);case 1141899268:switch(d.tok){case 11:case 12:b=J.script.SV.sValue(d);b=J.util.TextFormat.simpleReplace(b.substring(1,b.length-1),"],[","]\n[");break;case 4:b=d.value;break;default:b=J.script.SV.sValue(d)}b=J.util.TextFormat.simpleReplace(b,"\n\r","\n").$replace("\r","\n");return this.addXAS(J.util.TextFormat.split(b,"\n"));case 1766856708:switch(d.tok){case 4:case 7:return b=J.script.SV.sValue(d),a=new J.util.P3,this.addXPt(J.util.ColorUtil.colorPointFromString(b,a));case 2:case 3:return this.addXPt(this.viewer.getColorPointForPropertyValue(J.script.SV.fValue(d)));
case 8:return this.addXStr(J.util.Escape.escapeColor(J.util.ColorUtil.colorPtToInt(d.value)))}break;case 1679429641:return this.isSyntaxCheck?this.addXStr("x"):this.getBoundBox(d)}if(this.isSyntaxCheck)return this.addXStr(J.script.SV.sValue(d));if(4==d.tok&&(d=J.script.SV.unescapePointOrBitsetAsVariable(J.script.SV.sValue(d)),!Clazz.instanceOf(d,J.script.SV)))return!1;a.tok==d.tok&&(d=this.getX());return this.getPointOrBitsetOperation(a,d)}c=this.getX();if(this.isSyntaxCheck){if(a===J.script.T.tokenAndFALSE||
a===J.script.T.tokenOrTRUE)this.isSyntaxCheck=!1;return this.addXVar(J.script.SV.newScriptVariableToken(c))}switch(a.tok){case 269484160:case 269484128:switch(c.tok){case 10:switch(a=J.script.SV.bsSelectVar(c),d.tok){case 10:return a=J.util.BSUtil.copy(a),a.and(J.script.SV.bsSelectVar(d)),this.addXBs(a);case 2:var e=d.asInt();return this.addXBool(0>e?!1:a.get(e))}}return this.addXBool(c.asBoolean()&&d.asBoolean());case 269484112:switch(c.tok){case 10:a=J.util.BSUtil.copy(J.script.SV.bsSelectVar(c));
switch(d.tok){case 10:return a.or(J.script.SV.bsSelectVar(d)),this.addXBs(a);case 2:e=d.asInt();if(0>e)break;a.set(e);return this.addXBs(a);case 7:e=d.value;for(d=e.size();0<=--d;)c=e.get(d).asInt(),0<=c&&a.set(c);return this.addXBs(a)}break;case 7:return this.addXVar(J.script.SV.concatList(c,d,!1))}return this.addXBool(c.asBoolean()||d.asBoolean());case 269484113:if(10==c.tok&&10==d.tok)return a=J.util.BSUtil.copy(J.script.SV.bsSelectVar(c)),a.xor(J.script.SV.bsSelectVar(d)),this.addXBs(a);a=c.asBoolean();
c=d.asBoolean();return this.addXBool(a&&!c||c&&!a);case 269484114:return 10!=c.tok||10!=d.tok?!1:this.addXBs(J.util.BSUtil.toggleInPlace(J.util.BSUtil.copy(J.script.SV.bsSelectVar(c)),J.script.SV.bsSelectVar(d)));case 269484434:return this.addXBool(c.asFloat()<=d.asFloat());case 269484433:return this.addXBool(c.asFloat()>=d.asFloat());case 269484432:return this.addXBool(c.asFloat()>d.asFloat());case 269484435:return this.addXBool(c.asFloat()<d.asFloat());case 269484436:return this.addXBool(J.script.SV.areEqual(c,
d));case 269484438:return this.addXBool(!J.script.SV.areEqual(c,d));case 269484193:switch(c.tok){default:return this.addXFloat(c.asFloat()+d.asFloat());case 7:return this.addXVar(J.script.SV.concatList(c,d,!0));case 2:switch(d.tok){case 4:if(0>(b=J.script.SV.sValue(d).trim()).indexOf(".")&&0>=b.indexOf("+")&&0>=b.lastIndexOf("-"))break;break;case 3:return this.addXFloat(c.intValue+d.asFloat())}return this.addXInt(c.intValue+d.asInt());case 4:return this.addXVar(J.script.SV.newVariable(4,J.script.SV.sValue(c)+
J.script.SV.sValue(d)));case 9:switch(c=J.util.Quaternion.newP4(c.value),d.tok){default:return this.addXPt4(c.add(d.asFloat()).toPoint4f());case 9:return this.addXPt4(c.mulQ(J.util.Quaternion.newP4(d.value)).toPoint4f())}case 8:switch(a=J.util.P3.newP(c.value),d.tok){case 8:return a.add(d.value),this.addXPt(a);case 9:return b=d.value,a.add(J.util.P3.new3(b.x,b.y,b.z)),this.addXPt(a);default:return b=d.asFloat(),this.addXPt(J.util.P3.new3(a.x+b,a.y+b,a.z+b))}case 11:switch(d.tok){default:return this.addXFloat(c.asFloat()+
d.asFloat());case 11:return c=J.util.Matrix3f.newM(c.value),c.add(d.value),this.addXM3(c);case 8:return this.addXM4(J.script.ScriptMathProcessor.getMatrix4f(c.value,d.value))}}case 269484192:if(2==c.tok)if(4==d.tok){if(0>(b=J.script.SV.sValue(d).trim()).indexOf(".")&&0>=b.indexOf("+")&&0>=b.lastIndexOf("-"))return this.addXInt(c.intValue-d.asInt())}else if(3!=d.tok)return this.addXInt(c.intValue-d.asInt());if(4==c.tok&&2==d.tok&&0>(b=J.script.SV.sValue(c).trim()).indexOf(".")&&0>=b.indexOf("+")&&
0>=b.lastIndexOf("-"))return this.addXInt(c.asInt()-d.intValue);switch(c.tok){default:return this.addXFloat(c.asFloat()-d.asFloat());case 6:return c=new java.util.Hashtable(c.value),c.remove(J.script.SV.sValue(d)),this.addXVar(J.script.SV.getVariableMap(c));case 11:switch(d.tok){default:return this.addXFloat(c.asFloat()-d.asFloat());case 11:return c=J.util.Matrix3f.newM(c.value),c.sub(d.value),this.addXM3(c)}case 12:switch(d.tok){default:return this.addXFloat(c.asFloat()-d.asFloat());case 12:return c=
J.util.Matrix4f.newM(c.value),c.sub(d.value),this.addXM4(c)}case 8:switch(a=J.util.P3.newP(c.value),d.tok){default:return b=d.asFloat(),this.addXPt(J.util.P3.new3(a.x-b,a.y-b,a.z-b));case 8:return a.sub(d.value),this.addXPt(a);case 9:return b=d.value,a.sub(J.util.P3.new3(b.x,b.y,b.z)),this.addXPt(a)}case 9:switch(c=J.util.Quaternion.newP4(c.value),d.tok){default:return this.addXPt4(c.add(-d.asFloat()).toPoint4f());case 9:return d=J.util.Quaternion.newP4(d.value),this.addXPt4(d.mulQ(c.inv()).toPoint4f())}}case 269484224:switch(d.tok){default:return this.addXFloat(-d.asFloat());
case 2:return this.addXInt(-d.asInt());case 8:return a=J.util.P3.newP(d.value),a.scale(-1),this.addXPt(a);case 9:return b=J.util.P4.newPt(d.value),b.scale(-1),this.addXPt4(b);case 11:return c=J.util.Matrix3f.newM(d.value),c.transpose(),this.addXM3(c);case 12:return c=J.util.Matrix4f.newM(d.value),c.transpose(),this.addXM4(c);case 10:return this.addXBs(J.util.BSUtil.copyInvert(J.script.SV.bsSelectVar(d),Clazz.instanceOf(d.value,J.modelset.Bond.BondSet)?this.viewer.getBondCount():this.viewer.getAtomCount()))}case 269484209:if(2==
c.tok&&3!=d.tok)return this.addXInt(c.intValue*d.asInt());a=11==c.tok?this.ptValue(d,!1):11==d.tok?this.ptValue(c,!1):null;b=12==c.tok?this.planeValue(d):12==d.tok?this.planeValue(c):null;switch(d.tok){case 11:if(null!=a)return d=J.util.Matrix3f.newM(d.value),d.transpose(),d.transform(a),7==c.tok?this.addXVar(J.script.SV.getVariableAF([a.x,a.y,a.z])):this.addXPt(a);if(null!=b)return this.addXPt4(J.util.Quaternion.newP4(b).mulQ(J.util.Quaternion.newM(d.value)).toPoint4f());break;case 12:if(null!=b)return d=
J.util.Matrix4f.newM(d.value),d.transpose(),d.transform4(b),7==c.tok?this.addXVar(J.script.SV.getVariableAF([b.x,b.y,b.z,b.w])):this.addXPt4(b)}switch(c.tok){default:return this.addXFloat(c.asFloat()*d.asFloat());case 11:e=c.value;if(null!=a)return e.transform(a),7==d.tok?this.addXVar(J.script.SV.getVariableAF([a.x,a.y,a.z])):this.addXPt(a);switch(d.tok){case 11:return c=J.util.Matrix3f.newM(d.value),c.mul2(e,c),this.addXM3(c);case 9:return this.addXM3(J.util.Quaternion.newM(e).mulQ(J.util.Quaternion.newP4(d.value)).getMatrix());
default:return b=d.asFloat(),d=new J.util.AxisAngle4f,d.setM(e),d.angle*=b,c=new J.util.Matrix3f,c.setAA(d),this.addXM3(c)}case 12:c=c.value;if(null!=a)return c.transform(a),7==d.tok?this.addXVar(J.script.SV.getVariableAF([a.x,a.y,a.z])):this.addXPt(a);if(null!=b)return c.transform4(b),7==d.tok?this.addXVar(J.script.SV.getVariableAF([b.x,b.y,b.z,b.w])):this.addXPt4(b);switch(d.tok){case 12:return d=J.util.Matrix4f.newM(d.value),d.mul2(c,d),this.addXM4(d);default:return this.addXStr("NaN")}case 8:switch(a=
J.util.P3.newP(c.value),d.tok){case 8:return d=d.value,this.addXFloat(a.x*d.x+a.y*d.y+a.z*d.z);default:return b=d.asFloat(),this.addXPt(J.util.P3.new3(a.x*b,a.y*b,a.z*b))}case 9:switch(d.tok){case 9:return this.addXPt4(J.util.Quaternion.newP4(c.value).mulQ(J.util.Quaternion.newP4(d.value)).toPoint4f())}return this.addXPt4(J.util.Quaternion.newP4(c.value).mul(d.asFloat()).toPoint4f())}case 269484210:switch(b=null,e=d.asInt(),c.tok){default:return 0==e?this.addXInt(0):this.addXInt(c.asInt()%e);case 3:b=
c.asFloat();if(0==e)return this.addXInt(Math.round(b));b=J.util.TextFormat.formatDecimal(b,e);return this.addXStr(b);case 4:return b=c.value,0==e?this.addXStr(J.util.TextFormat.trim(b,"\n\t ")):9999==e?this.addXStr(b.toUpperCase()):-9999==e?this.addXStr(b.toLowerCase()):0<e?this.addXStr(J.util.TextFormat.formatS(b,e,e,!1,!1)):this.addXStr(J.util.TextFormat.formatS(b,e,e-1,!0,!1));case 7:c=J.script.SV.listValue(c);for(d=0;d<c.length;d++)c[d]=0==e?c[d].trim():0<e?J.util.TextFormat.formatS(c[d],e,e,
!0,!1):J.util.TextFormat.formatS(b,-e,e,!1,!1);return this.addXAS(c);case 8:return a=J.util.P3.newP(c.value),this.viewer.toUnitCell(a,J.util.P3.new3(e,e,e)),this.addXPt(a);case 9:b=c.value;if(8==d.tok)return this.addXPt(J.util.Quaternion.newP4(b).transformPt(d.value));if(9==d.tok)return d=J.util.P4.newPt(d.value),J.util.Quaternion.newP4(b).getThetaDirected(d),this.addXPt4(d);switch(e){case 0:return this.addXFloat(b.w);case 1:return this.addXFloat(b.x);case 2:return this.addXFloat(b.y);case 3:return this.addXFloat(b.z);
case 4:return this.addXPt(J.util.P3.newP(J.util.Quaternion.newP4(b).getNormal()));case -1:return this.addXPt(J.util.P3.newP(J.util.Quaternion.newP4(b).getVector(-1)));case -2:return this.addXFloat(J.util.Quaternion.newP4(b).getTheta());case -3:return this.addXPt(J.util.P3.newP(J.util.Quaternion.newP4(b).getVector(0)));case -4:return this.addXPt(J.util.P3.newP(J.util.Quaternion.newP4(b).getVector(1)));case -5:return this.addXPt(J.util.P3.newP(J.util.Quaternion.newP4(b).getVector(2)));case -6:return d=
J.util.Quaternion.newP4(b).toAxisAngle4f(),this.addXPt4(J.util.P4.new4(d.x,d.y,d.z,180*d.angle/3.141592653589793));case -9:return this.addXM3(J.util.Quaternion.newP4(b).getMatrix());default:return this.addXPt4(b)}case 12:switch(c=c.value,e){case 1:return e=new J.util.Matrix3f,c.getRotationScale(e),this.addXM3(e);case 2:return d=new J.util.V3,c.get(d),this.addXPt(J.util.P3.newP(d));default:return!1}case 10:return this.addXBs(J.script.SV.bsSelectRange(c,e))}case 269484208:if(2==c.tok&&2==d.tok&&0!=
d.intValue)return this.addXInt(Clazz.doubleToInt(c.intValue/d.intValue));e=d.asFloat();switch(c.tok){default:return d=c.asFloat(),this.addXFloat(d/e);case 8:return a=J.util.P3.newP(c.value),0==e?this.addXPt(J.util.P3.new3(NaN,NaN,NaN)):this.addXPt(J.util.P3.new3(a.x/e,a.y/e,a.z/e));case 9:return 9==d.tok?this.addXPt4(J.util.Quaternion.newP4(c.value).div(J.util.Quaternion.newP4(d.value)).toPoint4f()):0==e?this.addXPt4(J.util.P4.new4(NaN,NaN,NaN,NaN)):this.addXPt4(J.util.Quaternion.newP4(c.value).mul(1/
e).toPoint4f())}case 269484211:switch(b=d.asFloat(),c.tok){default:return this.addXInt(0==b?0:Clazz.doubleToInt(Math.floor(c.asFloat()/d.asFloat())));case 9:return 0==b?this.addXPt4(J.util.P4.new4(NaN,NaN,NaN,NaN)):9==d.tok?this.addXPt4(J.util.Quaternion.newP4(c.value).divLeft(J.util.Quaternion.newP4(d.value)).toPoint4f()):this.addXPt4(J.util.Quaternion.newP4(c.value).mul(1/b).toPoint4f())}case 269484227:return b=Math.pow(c.asFloat(),d.asFloat()),2==c.tok&&2==d.tok?this.addXInt(Clazz.floatToInt(b)):
this.addXFloat(b)}return!0},$fz.isPrivate=!0,$fz));c$.typeOf=$_M(c$,"typeOf",($fz=function(a){var b=null==a?0:a.tok;switch(b){case 1048589:case 1048588:return"boolean";case 10:return Clazz.instanceOf(a.value,J.modelset.Bond.BondSet)?"bondset":"bitset";case 2:case 3:case 8:case 9:case 4:case 7:case 6:case 11:case 12:return J.script.T.astrType[b]}return"?"},$fz.isPrivate=!0,$fz),"J.script.SV");$_M(c$,"getAllProperties",($fz=function(a,b){if(10!=a.tok)return!1;if(this.isSyntaxCheck)return this.addXStr("");
var c=J.script.SV.bsSelectVar(a),d,e=c.cardinality();if(0==e||null==(d=J.script.T.getAtomPropertiesLike(b.substring(0,b.length-1))))return this.addXStr("");for(var f=new java.util.Hashtable,e=1==e?c.nextSetBit(0):2147483647,g=d.size();0<=--g;){var h=d.get(g),j=h.tok;switch(j){case 1095766022:case 1095761925:continue;default:2147483647==e&&(j|=480),f.put(h.value,J.script.SV.getVariable(this.eval.getBitsetProperty(c,j,null,null,null,null,!1,e,!0)))}}return this.addXMap(f)},$fz.isPrivate=!0,$fz),"J.script.SV,~S");
c$.getMatrix4f=$_M(c$,"getMatrix4f",function(a,b){return J.util.Matrix4f.newMV(a,null==b?new J.util.V3:J.util.V3.newV(b))},"J.util.Matrix3f,J.util.Tuple3f");$_M(c$,"getBoundBox",($fz=function(a){if(10!=a.tok)return!1;if(this.isSyntaxCheck)return this.addXStr("");a=this.viewer.getBoxInfo(J.script.SV.bsSelectVar(a),1).getBoundBoxPoints(!0);for(var b=new J.util.JmolList,c=0;4>c;c++)b.addLast(a[c]);return this.addXList(b)},$fz.isPrivate=!0,$fz),"J.script.SV");$_M(c$,"getPointOrBitsetOperation",($fz=function(a,
b){switch(b.tok){case 7:switch(a.intValue){case 32:case 64:case 96:case 192:case 128:case 160:return this.addXObj(J.script.ScriptMathProcessor.getMinMax(b.getList(),a.intValue));case 1276117010:case 1141899269:return this.addXVar(b.sortOrReverse(1141899269==a.intValue?-2147483648:1))}for(var c=Array(b.getList().size()),d=0;d<c.length;d++){var e=J.script.SV.unescapePointOrBitsetAsVariable(b.getList().get(d));if(!Clazz.instanceOf(e,J.script.SV)||!this.getPointOrBitsetOperation(a,e))return!1;c[d]=this.xStack[this.xPt--]}return this.addXAV(c);
case 8:switch(a.intValue){case 1112541185:case 1112541205:return this.addXFloat(b.value.x);case 1112541186:case 1112541206:return this.addXFloat(b.value.y);case 1112541187:case 1112541207:return this.addXFloat(b.value.z);case 1146095626:return c=J.util.P3.newP(b.value),this.viewer.toCartesian(c,!0),this.addXPt(c);case 1112541188:case 1112541189:case 1112541190:case 1146095627:return c=J.util.P3.newP(b.value),this.viewer.toFractional(c,!0),1146095627==a.intValue?this.addXPt(c):this.addXFloat(1112541188==
a.intValue?c.x:1112541189==a.intValue?c.y:c.z);case 1112541191:case 1112541192:case 1112541193:case 1146095629:return c=J.util.P3.newP(b.value),this.viewer.toFractional(c,!1),1146095627==a.intValue?this.addXPt(c):this.addXFloat(1112541191==a.intValue?c.x:1112541192==a.intValue?c.y:c.z);case 1112539151:case 1112539152:case 1112539153:case 1146093582:return c=J.util.P3.newP(b.value),this.viewer.toUnitCell(c,null),this.viewer.toFractional(c,!1),1146093582==a.intValue?this.addXPt(c):this.addXFloat(1112539151==
a.intValue?c.x:1112539152==a.intValue?c.y:c.z)}break;case 9:switch(a.intValue){case 1112541185:case 1112541205:return this.addXFloat(b.value.x);case 1112541186:case 1112541206:return this.addXFloat(b.value.y);case 1112541187:case 1112541207:return this.addXFloat(b.value.z);case 1141899280:return this.addXFloat(b.value.w)}break;case 10:if(1678770178==a.intValue&&Clazz.instanceOf(b.value,J.modelset.Bond.BondSet))return this.addXVar(b);c=J.script.SV.bsSelectVar(b);1==c.cardinality()&&0==(a.intValue&
480)&&(a.intValue|=32);d=this.eval.getBitsetProperty(c,a.intValue,null,null,b.value,a.value,!1,b.index,!0);return 1678770178!=a.intValue?this.addXObj(d):this.addXVar(J.script.SV.newVariable(10,new J.modelset.Bond.BondSet(d,this.viewer.getAtomIndices(c))))}return!1},$fz.isPrivate=!0,$fz),"J.script.T,J.script.SV");c$.getMinMax=$_M(c$,"getMinMax",($fz=function(a,b){for(var c=null,d=null,e=0;;){if(J.util.Escape.isAF(a)){if(c=a,e=c.length,0==e)break}else if(Clazz.instanceOf(a,J.util.JmolList)){d=a;e=d.size();
if(0==e)break;var f=d.get(0);if(4==f.tok&&f.value.startsWith("{")){c=J.script.SV.ptValue(f);if(Clazz.instanceOf(c,J.util.P3))return J.script.ScriptMathProcessor.getMinMaxPoint(d,b);if(Clazz.instanceOf(c,J.util.P4))return J.script.ScriptMathProcessor.getMinMaxQuaternion(d,b);break}}else break;switch(b){case 32:f=3.4028235E38;break;case 64:f=-3.4028235E38;break;default:f=0}for(var g=0,h=0;0<=--e;){var j=null==c?J.script.SV.fValue(d.get(e)):c[e];if(!Float.isNaN(j))switch(h++,b){case 160:case 192:g+=
j*j;case 128:case 96:f+=j;break;case 32:j<f&&(f=j);break;case 64:j>f&&(f=j)}}if(0==h)break;switch(b){case 96:f/=h;break;case 192:if(1==h)break;f=Math.sqrt((g-f*f/h)/(h-1));break;case 160:f=g}return Float.$valueOf(f)}return"NaN"},$fz.isPrivate=!0,$fz),"~O,~N");c$.getMinMaxPoint=$_M(c$,"getMinMaxPoint",($fz=function(a,b){var c=null,d=null,e=0;Clazz.instanceOf(a,Array)?(c=a,e=c.length):Clazz.instanceOf(a,J.util.JmolList)&&(d=a,e=d.size());if(null!=d||null!=c){for(var f=new J.util.P3,g=Clazz.newFloatArray(e,
0),h=!0,j=0;3>j&&h;j++){for(var k=0;k<e;k++){var m=null==c?J.script.SV.ptValue(d.get(k)):c[k];if(null==m){h=!1;break}switch(j){case 0:g[k]=m.x;break;case 1:g[k]=m.y;break;case 2:g[k]=m.z}}if(!h)break;k=J.script.ScriptMathProcessor.getMinMax(g,b);if(Clazz.instanceOf(k,Float))switch(k=k.floatValue(),j){case 0:f.x=k;break;case 1:f.y=k;break;case 2:f.z=k}else break}return f}return"NaN"},$fz.isPrivate=!0,$fz),"~O,~N");c$.getMinMaxQuaternion=$_M(c$,"getMinMaxQuaternion",($fz=function(a,b){var c;switch(b){case 32:case 64:case 128:case 160:return"NaN"}for(;;){c=
J.script.ScriptMathProcessor.getQuaternionArray(a,1073742001);if(null==c)break;var d=Clazz.newFloatArray(1,0);c=J.util.Quaternion.sphereMean(c,d,1E-4);switch(b){case 96:return c;case 192:return Float.$valueOf(d[0])}break}return"NaN"},$fz.isPrivate=!0,$fz),"J.util.JmolList,~N");c$.getQuaternionArray=$_M(c$,"getQuaternionArray",function(a,b){var c;switch(b){case 135270417:c=a;break;case 9:c=Array(a.length);for(var d=0;d<a.length;d++)c[d]=J.util.Quaternion.newP4(a[d]);break;case 1073742001:c=Array(a.size());
for(d=0;d<a.size();d++){var e=J.script.SV.pt4Value(a.get(d));if(null==e)return null;c[d]=J.util.Quaternion.newP4(e)}break;default:return null}return c},"~O,~N")});$_J("java.util.regex");
$_L(null,"java.util.regex.Pattern",["java.lang.IllegalArgumentException","$.StringBuffer","java.util.regex.Matcher"],function(){c$=$_C(function(){this.$flags=0;this.regexp=null;$_Z(this,arguments)},java.util.regex,"Pattern",null,java.io.Serializable);$_M(c$,"matcher",function(a){return new java.util.regex.Matcher(this,a)},"CharSequence");$_M(c$,"split",function(a,b){var c=[],d=this.matcher(a),e=0,f=0;if(0==a.length())return[""];for(;d.find()&&(e+1<b||0>=b);)c[c.length]=a.subSequence(f,d.start()).toString(),
f=d.end(),e++;c[c.length]=a.subSequence(f,a.length()).toString();e++;if(0==b)for(;0<=--e&&0==c[e].toString().length;)c.length--;return c},"CharSequence,~N");$_M(c$,"split",function(a){return this.split(a,0)},"CharSequence");$_M(c$,"pattern",function(){return this.regexp.source});$_M(c$,"toString",function(){return this.pattern()});$_M(c$,"flags",function(){return this.$flags});c$.compile=$_M(c$,"compile",function(a,b){if(0!=b&&239!=(b|239))throw new IllegalArgumentException("Illegal flags");var c=
"g";0!=(b&8)&&(c+="m");0!=(b&2)&&(c+="i");var d=new java.util.regex.Pattern;d.regexp=RegExp(a,c);return d},"~S,~N");c$.compile=$_M(c$,"compile",function(a){return java.util.regex.Pattern.compile(a,0)},"~S");c$.matches=$_M(c$,"matches",function(a,b){return java.util.regex.Pattern.compile(a).matcher(b).matches()},"~S,CharSequence");c$.quote=$_M(c$,"quote",function(a){for(var b=(new StringBuffer).append("\\Q"),c=0,d;0<=(d=a.indexOf("\\E",c));)b.append(a.substring(c,d+2)).append("\\\\E\\Q"),c=d+2;return b.append(a.substring(c)).append("\\E").toString()},
"~S");$_K(c$,($fz=function(){},$fz.isPrivate=!0,$fz));$_S(c$,"UNIX_LINES",1,"CASE_INSENSITIVE",2,"COMMENTS",4,"MULTILINE",8,"LITERAL",16,"DOTALL",32,"UNICODE_CASE",64,"CANON_EQ",128,"flagsBitMask",239)});$_J("java.util.regex");
$_L(["java.util.regex.MatchResult"],"java.util.regex.Matcher",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.NullPointerException","$.StringBuffer"],function(){c$=$_C(function(){this.string=this.pat=null;this.rightBound=this.leftBound=-1;this.appendPos=0;this.results=this.replacementParts=this.processedRepl=this.replacement=null;$_Z(this,arguments)},java.util.regex,"Matcher",null,java.util.regex.MatchResult);$_M(c$,"appendReplacement",function(a,b){this.processedRepl=this.processReplacement(b);
a.append(this.string.subSequence(this.appendPos,this.start()));a.append(this.processedRepl);this.appendPos=this.end();return this},"StringBuffer,~S");$_M(c$,"processReplacement",($fz=function(a){if(null!=this.replacement&&this.replacement.equals(a)){if(null==this.replacementParts)return this.processedRepl;for(var b=new StringBuffer,c=0;c<this.replacementParts.length;c++)b.append(this.replacementParts[c]);return b.toString()}this.replacement=a;a=a.toCharArray();var d=new StringBuffer;this.replacementParts=
null;for(var e=0,f=0,g=!1;e<a.length;){92==a[e].charCodeAt(0)&&!g&&(g=!0,e++);if(g)d.append(a[e]),g=!1;else if(36==a[e].charCodeAt(0)){null==this.replacementParts&&(this.replacementParts=[]);try{b=Integer.parseInt(String.instantialize(a,++e,1)),f!=d.length()&&(this.replacementParts[this.replacementParts.length]=d.subSequence(f,d.length()),f=d.length()),this.replacementParts[this.replacementParts.length]=($_D("java.util.regex.Matcher$1")?0:java.util.regex.Matcher.$Matcher$1$(),$_N(java.util.regex.Matcher$1,
this,null)),c=this.group(b),f+=c.length,d.append(c)}catch(h){if($_O(h,IndexOutOfBoundsException))throw h;if($_O(h,Exception))throw new IllegalArgumentException("Illegal regular expression format");throw h;}}else d.append(a[e]);e++}null!=this.replacementParts&&f!=d.length()&&(this.replacementParts[this.replacementParts.length]=d.subSequence(f,d.length()));return d.toString()},$fz.isPrivate=!0,$fz),"~S");$_M(c$,"reset",function(a){if(null==a)throw new NullPointerException("Empty new sequence!");this.string=
a;return this.reset()},"CharSequence");$_M(c$,"reset",function(){this.leftBound=0;this.rightBound=this.string.length();this.appendPos=0;this.replacement=null;this.pat.regexp=RegExp(this.pat.regexp.source,""+(this.pat.regexp.ignoreCase?"i":"")+(this.pat.regexp.global?"g":"")+(this.pat.regexp.multiline?"m":""));return this});$_M(c$,"region",function(a,b){if(a>b||0>a||0>b||a>this.string.length()||b>this.string.length())throw new IndexOutOfBoundsException(a+" is out of bound of "+b);this.leftBound=a;
this.rightBound=b;this.results=null;this.appendPos=0;this.replacement=null;return this},"~N,~N");$_M(c$,"appendTail",function(a){return a.append(this.string.subSequence(this.appendPos,this.string.length()))},"StringBuffer");$_M(c$,"replaceFirst",function(a){this.reset();if(this.find()){var b=new StringBuffer;this.appendReplacement(b,a);return this.appendTail(b).toString()}return this.string.toString()},"~S");$_M(c$,"replaceAll",function(a){var b=new StringBuffer;for(this.reset();this.find();)this.appendReplacement(b,
a);return this.appendTail(b).toString()},"~S");$_M(c$,"pattern",function(){return this.pat});$_M(c$,"group",function(a){return null==this.results||0>a||a>this.results.length?null:this.results[a]},"~N");$_M(c$,"group",function(){return this.group(0)});$_M(c$,"find",function(a){var b=this.string.length();if(0>a||a>b)throw new IndexOutOfBoundsException("Out of bound "+a);this.findAt(a);return!1},"~N");$_M(c$,"findAt",($fz=function(){return-1},$fz.isPrivate=!0,$fz),"~N");$_M(c$,"find",function(){this.results=
this.pat.regexp.exec(this.string.subSequence(this.leftBound,this.rightBound));return null!=this.results});$_M(c$,"start",function(){var a=0,a=this.pat.regexp.lastIndex;return a-=this.results[0].length},"~N");$_M(c$,"end",function(){return this.pat.regexp.lastIndex},"~N");$_M(c$,"matches",function(){return this.find()});c$.quoteReplacement=$_M(c$,"quoteReplacement",function(a){if(0>a.indexOf("\\")&&0>a.indexOf("$"))return a;for(var b=new StringBuffer(2*a.length),c,d=a.length,e=0;e<d;e++)switch(c=a.charAt(e)){case "$":b.append("\\");
b.append("$");break;case "\\":b.append("\\");b.append("\\");break;default:b.append(c)}return b.toString()},"~S");$_M(c$,"lookingAt",function(){return!1});$_M(c$,"start",function(){return this.start(0)});$_V(c$,"groupCount",function(){return null==this.results?0:this.results.length});$_M(c$,"end",function(){return this.end(0)});$_M(c$,"toMatchResult",function(){return this});$_M(c$,"useAnchoringBounds",function(){return this},"~B");$_M(c$,"hasAnchoringBounds",function(){return!1});$_M(c$,"useTransparentBounds",
function(){return this},"~B");$_M(c$,"hasTransparentBounds",function(){return!1});$_M(c$,"regionStart",function(){return this.leftBound});$_M(c$,"regionEnd",function(){return this.rightBound});$_M(c$,"requireEnd",function(){return!1});$_M(c$,"hitEnd",function(){return!1});$_M(c$,"usePattern",function(a){if(null==a)throw new IllegalArgumentException("Empty pattern!");this.pat=a;this.results=null;return this},"java.util.regex.Pattern");$_K(c$,function(a,b){this.pat=a;this.string=b;this.leftBound=0;
this.rightBound=this.string.toString().length},"java.util.regex.Pattern,CharSequence");c$.$Matcher$1$=function(){$_H();c$=$_C(function(){$_B(this,arguments);this.grN=0;$_Z(this,arguments)},java.util.regex,"Matcher$1");$_Y(c$,function(){this.grN=gr});$_V(c$,"toString",function(){return this.b$["java.util.regex.Matcher"].group(this.grN)});c$=$_P()};$_S(c$,"MODE_FIND",1,"MODE_MATCH",2)});$_J("java.util.regex");$_I(java.util.regex,"MatchResult");
