Clazz.declarePackage("JSV.js2d");
Clazz.load(["JSV.api.JSVFileHelper"], "JSV.js2d.JsFileHelper", ["JU.PT", "JSV.common.JSViewer", "JSV.js2d.JsFile"], function(){
var c$ = Clazz.decorateAsClass(function(){
this.vwr = null;
Clazz.instantialize(this, arguments);}, JSV.js2d, "JsFileHelper", null, JSV.api.JSVFileHelper);
/*LV!1824 unnec constructor*/Clazz.overrideMethod(c$, "set", 
function(viewer){
this.vwr = viewer;
return this;
}, "JSV.common.JSViewer");
Clazz.overrideMethod(c$, "getFile", 
function(fileName, panelOrFrame, isSave){
var f = null;
fileName = JU.PT.rep(fileName, "=", "_");
{
f = prompt("Enter a file name:", fileName);
}return (f == null ? null :  new JSV.js2d.JsFile(f));
}, "~S,~O,~B");
Clazz.overrideMethod(c$, "setDirLastExported", 
function(name){
return name;
}, "~S");
Clazz.overrideMethod(c$, "setFileChooser", 
function(pdf){
}, "JSV.common.ExportType");
Clazz.overrideMethod(c$, "showFileOpenDialog", 
function(panelOrFrame, userData){
JSV.common.JSViewer.jmolObject.loadFileAsynchronously(this, this.vwr.html5Applet, "?", userData);
return null;
}, "~O,~A");
Clazz.defineMethod(c$, "setData", 
function(fileName, data, userInfo){
if (fileName == null) return;
if (data == null) {
this.vwr.selectedPanel.showMessage(fileName, "File Open Error");
return;
}var script = (userInfo == null ? null : "");
var isAppend = false;
{
isAppend = userInfo[0];
script = userInfo[1];
}this.vwr.si.siOpenDataOrFile( String.instantialize(data), "cache://" + fileName, null, null, -1, -1, isAppend, null, null);
if (script != null) this.vwr.runScript(script);
}, "~S,~O,~A");
Clazz.overrideMethod(c$, "getUrlFromDialog", 
function(info, msg){
{
return prompt(info, msg);
}}, "~S,~S");
});
;//5.0.1-v2 Tue Jul 23 17:25:20 CDT 2024
