'),o.propertyControlParent?o.propertyControlParent.append(r):o.appendIndex?o.appendIndex>0?r.insertAfter(this.$contentsArea.children().eq(o.appendIndex-1)):this.$contentsArea.prepend(r):this.$contentsArea.append(r)):this.$contentsArea.append(r),r.jqxExpander({theme:e.VA.Env.Theme,arrowPosition:"left",initContent:function initContent(){"function"==typeof i&&i.call(n,r.find(".brtc-va-editors-sheet-controls-propertycontrol-contents"),o);}}),r.jqxExpander("setHeaderContent",t),r;},o.prototype.addPropertyInTableControl=function(t,i,o){var n=this,r=$('
');return o?(o.mandatory&&(t="
"+e.VA.Core.Utils.WidgetUtils.convertHTMLSpecialChar(t)+'
*
'),o.propertyControlParent?o.propertyControlParent.append(r):this.$contentsArea.append(r)):this.$contentsArea.append(r),r.jqxExpander({theme:e.VA.Env.Theme,arrowPosition:"left",initContent:function initContent(){"function"==typeof i&&i.call(n,r.find(".brtc-va-editors-sheet-controls-property-in-table-control-contents"),o);}}),r.jqxExpander("setHeaderContent",t),r;},o.prototype.addGlobalVariableControl=function(t,i,o,n,r){var a=this,s=$('
');s.css(i),r&&r.type&&s.attr("type",r.type),s.click(function(t){var i=$(this).closest(".brtc-va-editors-sheet-controls-propertycontrol-label");i&&i.closest(".jqx-expander").jqxExpander("disable");new e.VA.Core.Dialogs.SettingVariableDialog($(this),{close:function close(t){t.OK&&a.executeCommand(t.command),i&&i.closest(".jqx-expander").jqxExpander("enable");},remove:function remove(t){a.executeCommand(t.command);},fnUnit:a.options.fnUnit,param:{key:o,label:n,type:r&&r.type?r.type:"string",index:a.globalVariableFnUnitIndex[o]}});}),t.append(s),this.globalVariableControls=this.globalVariableControls||{},this.globalVariableFnUnitIndex=this.globalVariableFnUnitIndex||{},this.globalVariableControls[o]=s,this.globalVariableFnUnitIndex[o]=r&&r.index>-1?r.index:-1,this.refreshGlobalVariableControl(o,r&&r.index>-1?r.index:-1);},o.prototype.refreshGlobalVariableControl=function(t,e){var i=this.options.modelEditor.getModel(),o=i.getVariable(this.options.fnUnit.fid,t);e>-1&&(o=i.getVariable(this.options.fnUnit.param.functions[e].fid,t)),o?this.globalVariableControls[t].addClass("set"):this.globalVariableControls[t].removeClass("set");},o.prototype.executeCommand=function(t){var i=e.VA.Core.Utils.WidgetUtils.getModelEditorRef(this.$mainControl);["kmeans2","kmeans2model","kmeansmodelpy","testftn1","testftn2","testftn3"].indexOf(this.options.fnUnit.func)>-1?i.getCommandManager().execute(t):i&&this.options.isRendered&&i.getCommandManager().execute(t);},o.prototype.createCommandOptions=function(){return{};},o.prototype.createSetFnUnitCommand=function(t){var i={fnUnit:this.options.fnUnit,ref:{}};for(var o in t){i.ref[o]=t[o];}return new e.VA.Core.Editors.Diagram.Commands.SetFnUnitCommand(this,i);},o.prototype.createSetParameterValueCommand=function(t,i,o){if(o===void 0){o=!0;}if(!o&&this.getParam(t)===i)return null;var n={fnUnit:this.options.fnUnit,ref:{param:{}}};return 0===i||i||"boolean"==typeof i||(i=""),n.ref.param[t]=i,new e.VA.Core.Editors.Diagram.Commands.SetFnUnitParameterValueCommand(this,n);},o.prototype.getColumnsOfInTable=function(t,e){var i=[];return this.dataMap&&this.FnUnitUtils.getInTable(this.options.fnUnit)[t]&&this.FnUnitUtils.getInTable(this.options.fnUnit)[t]&&(i=this.dataMap[this.FnUnitUtils.getInTable(this.options.fnUnit)[t]].columns),e&&e.length>0&&(i=$.grep(i,function(t){return e.indexOf(t.type)>-1||e.indexOf(t.internalType)>-1;})),i;},o.prototype.wrapControl=function(t){var e=$('
');t.wrap(e);},o.prototype.addClassToWrapper=function(t,e){if(e){var i=t.parent(".brtc-va-editors-sheet-controls-wrapper");i&&i.addClass(e);}},o.prototype.addCssToWrapper=function(t,e){if(e){var i=t.parent(".brtc-va-editors-sheet-controls-wrapper");i&&i.css(e);}},o.prototype.createComboBox=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme,width:"100%",height:"25px",closeDelay:0,openDelay:0};i&&$.extend(a,i),t.jqxComboBox(a);var s=t.val();t.find("input").focus(function(){s=t.val();}),$("svg").on("mousedown",function(){t.val()!==s&&t.find("input").is(":focus")&&t.trigger("change");}),this.registerScrollEventListener("ps-scroll-y",function(){t.jqxComboBox("close");});},o.prototype.createInput=function(i,o,n,r){this.wrapControl(i);var a="";n&&(a=a.concat(" ",n)),i.attr("type")||i.attr("type","text"),i.attr("maxlength")||i.attr("maxlength","100"),this.addClassToWrapper(i,a),this.addCssToWrapper(i,r);var s={theme:e.VA.Env.Theme,height:"25px",placeHolder:"Enter value"};o&&$.extend(s,o),i.jqxInput(s);var l=i.val();i.focus(function(){l=i.val();}),$("svg").on("mousedown",function(){i.val()!==l&&i.is(":focus")&&i.trigger("change");});var c=this;return i.on("keydown",function(t){clearTimeout(c.keydownTimeout),c.keydownTimeout=setTimeout(function(){i.is(":focus")&&(i.blur(),i.focus());},1e3);}),t.Brightics.VA.Core.Utils.InputValidator.appendValidationCondition(i),i;},o.prototype.createNumberInput=function(t,i,o,n){this.wrapControl(t);var r="";return o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n),new e.VA.Core.Editors.Sheet.Controls.NumericInput(t,i,o);},o.prototype.createDropDownList=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme,enableBrowserBoundsDetection:!0,animationType:"none",width:"100%",height:"25px",openDelay:0};return i&&(i.source&&i.source.length>7?(a.autoDropDownHeight=!1,a.dropDownHeight=120):a.autoDropDownHeight=!0,$.extend(a,i)),t.jqxDropDownList(a),this.registerScrollEventListener("ps-scroll-y",function(){t.jqxDropDownList("close");}),t;},o.prototype.createGrid=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme,width:"100%",rowsheight:25};return i&&$.extend(a,i),t.jqxGrid(a),t;},o.prototype.createCheckBox=function(t,i,o,n){this.wrapControl(t);var r="brtc-va-editors-sheet-controls-checkbox-default";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme};return i&&$.extend(a,i),t.jqxCheckBox(a),t;},o.prototype.createRadioButton=function(t,i,o,n){this.wrapControl(t);var r="brtc-va-editors-sheet-controls-radiobutton-default";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme};return i&&$.extend(a,i,{groupName:(i.groupName||"")+this.panelId}),t.jqxRadioButton(a),t;},o.prototype.createButton=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme};return i&&$.extend(a,i),t.jqxButton(a),t;},o.prototype.createSwitchButton=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme,width:"100%",height:"23px"};return i&&$.extend(a,i),t.jqxSwitchButton(a),t;},o.prototype.createButtonGroup=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme};return i&&$.extend(a,i),t.jqxButtonGroup(a),t;},o.prototype.onInputsChange=function(t){if(this.FnUnitUtils.hasMeta(this.options.fnUnit)){if(!this.isInputsChanged(t))return;var i={fnUnit:this.options.fnUnit,ref:{inputs:t}},o=new e.VA.Core.CompoundCommand(this),n=new e.VA.Core.Editors.Diagram.Commands.ChangeInputsCommand(this,i);o.add(n);}else{var r=[];for(var a in t){_.isEmpty(t[a])||r.push(t[a]);}if(_.isEqual(this.FnUnitUtils.getInTable(this.options.fnUnit),r))return;i={fnUnit:this.options.fnUnit,ref:r},o=new e.VA.Core.CompoundCommand(this);var s=new e.VA.Core.Editors.Diagram.Commands.ChangeIntableCommand(this,i);o.add(s);}this.executeCommand(o);},o.prototype.onInputsError=function(t){this.options.modelEditor.notification("error",t);},o.prototype.createInputsList=function(t,e,i,o){var n="";i&&(n=n.concat(" ",i)),this.addClassToWrapper(t,n),this.addCssToWrapper(t,o);var r={appendTo:t,fnUnit:this.options.fnUnit,emptyLabel:"Empty",onClick:this.openInputSelector.bind(this),readOnly:!0};e&&$.extend(r,e),this.inputsList=this.FnUnitInputs.render(r);},o.prototype.openInputSelector=function(){this.inputSelector=new e.VA.Core.Editors.Sheet.Controls.InputSelector(this.$mainControl,{fnUnit:this.options.fnUnit,onChange:this.onInputsChange.bind(this),onClose:this.onInputsChange.bind(this),onError:this.onInputsError.bind(this)});},o.prototype.isInputsChanged=function(t){return!_.isEqual(this.FnUnitUtils.getInputs(this.options.fnUnit),t);},o.prototype.addFnUnitCommandToCompoundCommand=function(t,o){var n=!1,r={fnUnit:this.options.fnUnit,ref:{param:{}}},a=Object.keys(this.options.fnUnit.param);for(var s in a){var l=a[s];i.indexOf(l)>-1&&(n=!0,r.ref.param[l]=o);}if(n){var c=new e.VA.Core.Editors.Diagram.Commands.SetFnUnitCommand(this,r);t.add(c);}},o.prototype.createColumnList=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={multiple:!0,rowCount:1,maxRowCount:5,expand:!1,sort:"none",sortBy:"name",showOpener:"button",removable:!0,defaultType:"-",changed:function changed(t,e){},added:function added(){},removed:function removed(){}};return i&&$.extend(a,i),new e.VA.Core.Editors.Sheet.Controls.ColumnList(t,a);},o.prototype.createTableList=function(t,i,o,n){this.wrapControl(t);var r="";return o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n),new e.VA.Core.Editors.Sheet.Controls.TableList(t,i);},o.prototype.createDateTimeInput=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme,width:"100%",height:"25px"};return i&&$.extend(a,i),t.jqxDateTimeInput(a),t;},o.prototype.createTextArea=function(t,i,o,n){this.wrapControl(t);var r="";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme,width:"100%",height:"60px"};return i&&$.extend(a,i),t.jqxTextArea(a),t;},o.prototype.createNumericInput=function(t,i,o,n){this.wrapControl(t);var r="";return o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n),new e.VA.Core.Editors.Sheet.Controls.NumericInput(t,i);},o.prototype.createArrayInput=function(t,i,o,n){this.wrapControl(t);var r="";return o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n),new e.VA.Core.Editors.Sheet.Controls.ArrayInput(t,i);},o.prototype.getPreviousFnUnit=function(t){return this.options.modelEditor.getModel().getFnUnitById(t);},o.prototype.createResizableTextArea=function(t,e,i,o){this.wrapControl(t);var n="brtc-va-editors-sheet-controls-resizable-textarea-default";i&&(n=n.concat(" ",i)),t.addClass(n),o&&$.extend(e,o),t.css(e);},o.prototype.createTextAreaControl=function(t,i,o,n){this.wrapControl(t);var r="brtc-va-editors-sheet-controls-textareacontrol";return o&&(r=r.concat(" ",o)),t.addClass(r),n&&t.css(n),new e.VA.Core.Editors.Sheet.Controls.TextAreaControl(t,i);},o.prototype.createItemList=function(t,i,o,n){this.wrapControl(t);var r="";return o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n),new e.VA.Core.Widget.Controls.ItemList(t,i);},o.prototype.createDateTimePickerControl=function(t,i,o,n){this.wrapControl(t);var r="brtc-va-editors-sheet-controls-datetime-picker";o&&(r=r.concat(" ",o)),this.addClassToWrapper(t,r),this.addCssToWrapper(t,n);var a={theme:e.VA.Env.Theme,width:"100%",height:"23px",formatString:"yyyy/MM/dd HH:mm:ss",textAlign:"center"};i&&$.extend(a,i),t.jqxDateTimeInput(a);},o.prototype.createTildeControl=function(t,e,i){this.wrapControl(t),this.addClassToWrapper(t,e),this.addCssToWrapper(t,i);},o.prototype.handleSetUDFFnUnitCommand=function(t){this.options.fnUnit.fid!=t.options.fnUnit.fid||"UNDO"!==t.event.type&&"REDO"!==t.event.type?t.event.source!==this&&(t.event.source instanceof e.VA.Core.Editors.Sheet.Controls.DataSelector?this.retrieveTableInfo(t.options.fnUnit[IN_DATA]):(this.renderUDFValues(t),this.fillControlValues())):this.renderUDFValues(t);},o.prototype.createSetUDFParameterValueCommand=function(t,i){var o={fnUnit:this.options.fnUnit,ref:{param:{"input-variables":$.extend(!0,[],this.options.fnUnit.param["input-variables"])}}};for(var n in this.options.fnUnit.param["input-variables"]){this.options.fnUnit.param["input-variables"][n][0]===t&&(o.ref.param["input-variables"][n][2]=i);}return new e.VA.Core.Editors.Diagram.Commands.SetUDFFnUnitParameterValueCommand(this,o);},o.prototype.renderUDFValues=function(t){if(t&&t.options.renderParams)for(var e in t.options.renderParams){this.render[t.options.renderParams[e]].bind(this)();}else if(t)for(var i in t.options.ref.param["input-variables"]){this.render[t.options.ref.param["input-variables"][i][0]].bind(this)();}else for(var i in this.render){this.render[i].bind(this)();}},o.prototype.isInputValueChanged=function(t,e){var i=this.options.fnUnit.param[t],o=e;return!(_.isArray(i)&&_.isEmpty(i[0])&&_.isEmpty(o))&&(_.isUndefined(i)||!_.isEqual(i,o));},o.prototype.createBarButton=function(t,e,i,o){var n={width:"100%",height:25};return e&&$.extend(n,e),this.createButton(t,n,i,o);},o.prototype.getFnUnit=function(){return this.options.fnUnit;},o.prototype.getModel=function(){return this.FnUnitUtils.getParent(this.getFnUnit());},o.prototype.getEditor=function(){return this.options.modelEditor;},o.prototype.configureOptions=function(){},o.prototype.refresh=function(){},o.prototype.getParam=function(t){return t?this.getFnUnit().param[t]:this.getFnUnit().param;},o.prototype.hideInTableControl=function(){this.$mainControl.find(".brtc-va-editors-sheet-controls-property-in-table-control").hide();},o.prototype.updateScroll=function(){this.$contentsArea.perfectScrollbar("update");},o.prototype.createDropEvent=function(t){},o.prototype.isBlockCommandListener=function(){return!!this.options.blockCommandListener;},o.prototype.createReturnDataCommand=function(t,i){var o=_.clone(Studio.getActiveEditor().getActiveModel().outData),n=(this.FnUnitUtils.getOutputs(this.options.fnUnit),this.FnUnitUtils.getMeta(this.options.fnUnit)),r=[];if(_.forEach(i.outputs,function(t,e){var o=i.meta[e].type,a=n[e]?n[e].type:"";_.isEqual("table",a)&&!_.isEqual("table",o)&&r.push(t);}),!_.isEmpty(r)){var a=_.intersection(o,r);_.remove(o,function(t){return _.indexOf(a,t)>=0;}),t.add(new e.VA.Core.Editors.Diagram.Commands.ReturnDataCommand(this,{outData:o}));}},e.VA.Core.Editors.Sheet.Panels.PropertiesPanel=o;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Sheet.Panels.PropertiesPanel.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Sheet.Panels.PropertiesPanel.prototype),e.prototype.constructor=e,e.prototype.createPersistButton=function(){this.$mainControl.find(".brtc-va-editors-sheet-panels-propertiespanel-header > .brtc-va-editors-sheet-panels-basepanel-header-title").addClass("no-content");},e.prototype.renderPersistButton=function(){},e.prototype.renderValues=function(t){for(var e in t?t.options.ref["dex-param"]:this.render){this.render[e].bind(this)();}},e.prototype.createSetParameterValueCommand=function(e,i){var o={fnUnit:this.options.fnUnit,ref:{"dex-param":{}}};return o.ref["dex-param"][e]=i,new t.VA.Core.Editors.Diagram.Commands.SetFnUnitDexParameterValueCommand(this,o);},e.prototype.handleCommand=function(e){t.VA.Core.Editors.Sheet.Panels.PropertiesPanel.prototype.handleCommand.call(this,e),e instanceof t.VA.Core.Editors.Diagram.Commands.SetFnUnitDexParameterValueCommand&&this.handleSetFnUnitParameterValueCommand(e);},t.VA.Core.Editors.Sheet.Panels.DexPropertiesPanel=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(t,e){this.$parent=t,this.options=e,this.createControls();}e.prototype.createControls=function(){this.$parent.addClass("brtc-style-flex-1");var t=$('
');this.$parent.append(t),t.append("
"+this.options.label+"
'),this.$parent.append(this.$mainControl),this.createTopArea(),this.createContentsArea(),this.createBottomArea(),this.$topArea&&this.createTopAreaControls(this.$topArea),this.$bottomArea&&this.createBottomAreaControls(this.$bottomArea),this.$contentsArea&&(this.createContentsAreaControls(this.$contentsArea),this.$contentsArea.hasClass("brtc-va-editors-sheet-panels-propertiespanel-contents-area")&&this.$contentsArea.perfectScrollbar());},e.prototype.createContentsAreaControls=function(t){t.addClass("brtc-style-flex-1"),this.$contentsArea.addClass("brtc-style-padding-right-20").addClass("brtc-style-padding-right-20").addClass("rtc-style-width-minus-40");this.options.dataProxy.requestDataForce("html",function(e){t.append(e);},function(){t.append("
There is No Model
");});},t.VA.Core.Editors.Sheet.Panels.HtmlPanel=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Sheet.Panels.BasePanel.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Sheet.Panels.BasePanel.prototype),e.prototype.constructor=e,e.prototype.createControls=function(){this.$mainControl=$('
'),this.$parent.append(this.$mainControl),this.createTopArea(),this.createContentsArea(),this.createBottomArea(),this.$topArea&&this.createTopAreaControls(this.$topArea),this.$bottomArea&&this.createBottomAreaControls(this.$bottomArea),this.$contentsArea&&(this.createContentsAreaControls(this.$contentsArea),this.$contentsArea.hasClass("brtc-va-editors-sheet-panels-propertiespanel-contents-area")&&this.$contentsArea.perfectScrollbar());},e.prototype.createTopAreaControls=function(t){this.createTopAreaHeaderTitle(t),this.createTopAreaHeaderToolbar();},e.prototype.createTopAreaHeaderToolbar=function(t){var e=$('
');this.$header.append(e),this.createPopupToolItem(e),this.createMinMaxToolItem(e);},e.prototype.createPopupToolItem=function(e){var i=this,o=$('');e.append(o),o.click(function(){var e=t.VA.Core.Utils.WidgetUtils.getModelEditorRef(i.$mainControl),o={user:t.VA.Env.Session.userId,pid:e.options.editorInput.getProjectId(),mid:i.options.fnUnit.parent().mid,fid:i.options.fnUnit.fid,tids:i.FnUnitUtils.getImage(i.options.fnUnit,i.options.panelType),offsetArr:[0],limitArr:[1e3]},n=$.map(o,function(t,e){return e+"="+t;}).join("&");window.open("popupimage?"+n,"popupImage");});},e.prototype.render=function(e,i){t.VA.Core.Utils.RenderUtils.image(e,i);},e.prototype.createContentsAreaControls=function(t){var e=this;t.addClass("brtc-style-flex-1");var i=this.FnUnitUtils.getImage(this.options.fnUnit,this.options.panelType);this.options.dataProxy.requestDataForce(i,function(i){var o=$('
');t.append(o),e.render(o,i);},function(){e.renderFail(e.$contentsArea,"No Image");});},t.VA.Core.Editors.Sheet.Panels.ImagePanel=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Sheet.Panels.PropertiesPanel.call(this,e,i),this.innerType="";}e.prototype=Object.create(t.VA.Core.Editors.Sheet.Panels.PropertiesPanel.prototype),e.prototype.constructor=e,e.prototype.handleOperationCommand=function(e){t.VA.Core.Editors.Sheet.Panels.PropertiesPanel.prototype.handleOperationCommand.call(this,e),Studio.getInstance().doValidate(this.getModel());},e.prototype.createControls=function(){var t=this;this.$mainControl=$('
'),this.$parent.append(this.$mainControl),this.createTopArea(),this.createStepArea(),this.createContentsArea(),this.createBottomArea(),this.$contentsArea.perfectScrollbar("update"),this.$topArea&&this.createTopAreaControls(this.$topArea),this.$bottomArea&&this.createBottomAreaControls(this.$bottomArea),this.$contentsArea&&(this.createContentsAreaControls(this.$contentsArea),this.$contentsArea.hasClass("brtc-va-editors-sheet-panels-propertiespanel-contents-area")&&this.$contentsArea.perfectScrollbar());var e=this.$topArea.find(".brtc-va-editors-sheet-panels-basepanel-header-tooltip");e.click(function(){"auto"===e.attr("persist-mode")?(e.attr("persist-mode","true"),t.options.fnUnit["persist-mode"]="true"):"true"===e.attr("persist-mode")?(e.attr("persist-mode","false"),t.options.fnUnit["persist-mode"]="false"):(e.attr("persist-mode","auto"),t.options.fnUnit["persist-mode"]="auto");var i={"persist-mode":t.options.fnUnit["persist-mode"]},o=t.createSetFnUnitCommand(i);t.executeCommand(o);});},e.prototype.createContentsArea=function(){t.VA.Core.Editors.Sheet.Panels.BasePanel.prototype.createContentsArea.call(this),this.$contentsArea.addClass("brtc-va-editors-sheet-panels-propertiespanel-contents-area"),this.$contentsArea.addClass("inner");},e.prototype.createStepArea=function(){this.$stepArea=$('
'),this.$mainControl.append(this.$stepArea),this.$stepArea.addClass("brtc-style-padding-left-20").addClass("brtc-style-padding-right-20"),this.createStepIntoControl(),this.createStepOutControl();},e.prototype.createStepIntoControl=function(){var e=this;this.$stepIntoControl=$('
'),this.$stepArea.append(this.$stepIntoControl),this.$stepIntoButton=$('
'),this.$stepIntoControl.append(this.$stepIntoButton),this.$stepIntoButton.jqxButton({theme:t.VA.Env.Theme,width:"100%",height:"30px"}),this.$stepIntoButton.click(function(){e.stepInto();});},e.prototype.createStepOutControl=function(){var e=this;this.$stepOutControl=$('
'),this.$stepArea.append(this.$stepOutControl),this.$stepOutButton=$('
'),this.$stepOutControl.append(this.$stepOutButton),this.$stepOutButton.jqxButton({theme:t.VA.Env.Theme,width:"100%",height:"30px"}),this.$stepOutButton.click(function(){e.stepOut();});},e.prototype.stepInto=function(){this.options.modelEditor.getDiagramEditorPageArea().trigger("fnUnit:dbclick",[[this.options.fnUnit.fid]]);},e.prototype.stepOut=function(){var t=this.options.modelEditor.getModelLayoutManager(),e=this.options.modelEditor.getEditorInput(),i=this.options.modelEditor.getToolbar().navigator.getPath(),o=1===i.length?{mid:e.getFileId()}:i[i.length-2];t.openActivity(o.mid,o.fnUnit);},e.prototype.setType=function(t){this.$mainControl.find(".brtc-va-editors-sheet-controls-property-step-control").addClass(t);},e.prototype.setHeight=function(t){this.$contentsArea.height(t);},t.VA.Core.Editors.Sheet.Panels.InnerPropertiesPanel=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Sheet.Panels.BasePanel.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Sheet.Panels.BasePanel.prototype),e.prototype.constructor=e,e.prototype.init=function(){this.$mainControl.attr("type",this.options.type),this.model={};},e.prototype.createTopAreaControls=function(t){return this.$header=$(''),this.$selector=this.$header.find(".brtc-va-editors-sheet-worksheet-selector"),t.append(this.$header),this.createTopAreaHeaderToolbar(),this.$header;},e.prototype.createSelector=function(e){var i=this;this.$selector.jqxDropDownList({theme:t.VA.Env.Theme,source:e._repr_brtc_?["MODEL","JSON"]:["JSON"],width:120,autoDropDownHeight:!0,dropDownWidth:120,selectedIndex:0}),this.$selector.on("change",function(t){"JSON"===$(this).val()?(i.showJson(),i.renderJson()):(i.showModel(),i.renderModel()),i.$contentsArea.perfectScrollbar("update");});},e.prototype.createControls=function(){this.$mainControl=$('
'),this.$parent.append(this.$mainControl),this.createTopArea(),this.createContentsArea(),this.createBottomArea(),this.$topArea&&this.createTopAreaControls(this.$topArea),this.$bottomArea&&this.createBottomAreaControls(this.$bottomArea),this.$contentsArea&&(this.createContentsAreaControls(this.$contentsArea),this.$contentsArea.hasClass("brtc-va-editors-sheet-panels-propertiespanel-contents-area")&&this.$contentsArea.perfectScrollbar());},e.prototype.createTopAreaHeaderToolbar=function(t){var e=$('
');this.$header.append(e),this.createPopupToolItem(e),this.createMinMaxToolItem(e);},e.prototype.createPopupToolItem=function(e){var i=this,o=$('');e.append(o),o.click(function(){var e=t.VA.Core.Utils.WidgetUtils.getModelEditorRef(i.$mainControl),o={user:t.VA.Env.Session.userId,pid:e.options.editorInput.getProjectId(),mid:i.options.fnUnit.parent().mid,fid:i.options.fnUnit.fid,tids:i.FnUnitUtils.getModel(i.options.fnUnit,i.options.panelType),offsetArr:[0],limitArr:[1e3]},n=$.map(o,function(t,e){return e+"="+t;}).join("&");window.open("popupmodel?"+n,"popupModel");});},e.prototype.registerCommandListener=function(){var e=this;this.commandListener=function(i){i instanceof t.VA.Core.Editors.Diagram.Commands.DisconnectFnUnitCommand||i instanceof t.VA.Core.Editors.Diagram.Commands.ConnectFnUnitCommand?e.options.fnUnit.fid===i.options[TARGET_FID]&&e.handleConnectionCommand(i):i instanceof t.VA.Core.Editors.Diagram.Commands.ReconnectFnUnitCommand?e.options.fnUnit.fid!==i.options[TARGET_FID]&&e.options.fnUnit.fid!==i.old[TARGET_FID]||e.handleConnectionCommand(i):i instanceof t.VA.Core.Editors.Diagram.Commands.ChangeOutTableCommand?e.options.fnUnit.fid===i.options.fnUnit.fid&&e.handleOutTableCommand(i):i instanceof t.VA.Core.Editors.Diagram.Commands.NewOutTableCommand?e.options.fnUnit.fid===i.options.fnUnit.fid&&e.handleNewOutTableCommand(i):i instanceof t.VA.Core.CompoundCommand&&$.each(i.commandList,function(i,o){o instanceof t.VA.Core.Editors.Diagram.Commands.DisconnectFnUnitCommand||o instanceof t.VA.Core.Editors.Diagram.Commands.ConnectFnUnitCommand?e.options.fnUnit.fid===o.options[TARGET_FID]&&e.handleConnectionCommand(o):o instanceof t.VA.Core.Editors.Diagram.Commands.ReconnectFnUnitCommand?e.options.fnUnit.fid!==o.options[TARGET_FID]&&e.options.fnUnit.fid!==o.old[TARGET_FID]||e.handleConnectionCommand(o):o instanceof t.VA.Core.Editors.Diagram.Commands.ChangeOutTableCommand?e.options.fnUnit.fid===o.options.fnUnit.fid&&e.handleOutTableCommand(o):o instanceof t.VA.Core.Editors.Diagram.Commands.ChangeIntableCommand?e.options.fnUnit.fid===o.options.fnUnit.fid&&e.handleConnectionCommand(o):o instanceof t.VA.Core.Editors.Diagram.Commands.NewOutTableCommand&&e.options.fnUnit.fid===o.options.fnUnit.fid&&e.handleNewOutTableCommand(o);});},this.options.modelEditor.addCommandListener(this.commandListener);},e.prototype.handleNewOutTableCommand=function(t){},e.prototype.handleConnectionCommand=function(t){},e.prototype.handleOutTableCommand=function(t){},e.prototype.createContentsAreaControls=function(t){var e=this;t.addClass("brtc-style-flex-1"),this.createLayout(t);var i=this.FnUnitUtils.getModel(this.options.fnUnit,this.options.panelType);this.options.dataProxy.requestDataForce(i,function(t){e.model=t,e.createSelector(e.model),e.reset(),e.render();},function(){e.showFail(),e.renderFail("No Model");});},e.prototype.createLayout=function(t){this.$jsonContainer=$('
'),this.$modelContainer=$('
'),this.$failContainer=$('
'),t.append(this.$jsonContainer).append(this.$modelContainer).append(this.$failContainer),this.$contentsArea.perfectScrollbar();},e.prototype.getRenderType=function(){return this.$selector.val();},e.prototype.reset=function(){this.renderedJson=!1,this.renderedModel=!1;},e.prototype.showJson=function(){this.$jsonContainer.show(),this.$modelContainer.hide(),this.$failContainer.hide();},e.prototype.showModel=function(){this.$jsonContainer.hide(),this.$modelContainer.show(),this.$failContainer.hide();},e.prototype.showFail=function(){this.$jsonContainer.hide(),this.$modelContainer.hide(),this.$failContainer.show();},e.prototype.render=function(){"JSON"===this.getRenderType()?(this.showJson(),this.renderJson()):(this.showModel(),this.renderModel());},e.prototype.destroy=function(){this.$selector.jqxDropDownList("destroy"),t.VA.Core.Editors.Sheet.Panels.BasePanel.prototype.destroy.call(this);},e.prototype.renderJson=function(){this.renderedJson||(this.$jsonWrapper=$('
'),this.$jsonContainer.append(this.$jsonWrapper),this.$jsonWrapper.find("pre").val(this.model),this.$jsonWrapper.find("pre").jsonViewer(this.model),this.$contentsArea.perfectScrollbar("update"),this.renderedJson=!0);},e.prototype.renderModel=function(){if(!this.renderedModel&&void 0!==this.model._repr_brtc_){for(var t in this._repr_brtc_=this.model._repr_brtc_,this.resources=this._repr_brtc_.resources,this.$modelWrapper=$('
'),this.$modelContainer.append(this.$modelWrapper),this._repr_brtc_.contents){var e=this._repr_brtc_.contents[t];this.addContents(this.$modelWrapper,e);}this.$contentsArea.perfectScrollbar("update"),this.renderedModel=!0;}},e.prototype.addContents=function(e,i){var o=i.type;if("md"===o){var n="",r=i.text.split("\n");for(var a in r){var s=r[a].trim();_.isEmpty(s)&&(s="\n"),n+=s+"\n";}var l=t.VA.Core.Utils.RenderUtils[o](e,n);this.makeChart(l);}else{l=t.VA.Core.Utils.RenderUtils[o](e,i.text);this.makeChart(l);}},e.prototype.makeChart=function(e){if(this.resources&&this.resources.chart){var i=e.find(".brightics-chart");for(var o in i){var n=$(i[o]),r=n.attr("id"),a=this.getChartOption(r);t.VA.Core.Utils.RenderUtils.chart(n,a);}}},e.prototype.getChartOption=function(t){var e={};for(var i in this.resources.charts){if(this.resources.charts[i].id===t)return(e=this.resources.charts[i].options).source={},e.source.dataType="local",e.source.localData=[{dataType:"rawdata",columns:this.resources.charts[i].dataSource.columns,data:this.resources.charts[i].dataSource.data}],e;}},e.prototype.renderFail=function(t){var e=$('
');this.$failContainer.append(e),e.addClass("brtc-style-full").addClass("brtc-style-flex-center"),e.find("h3").text(t);},t.VA.Core.Editors.Sheet.Panels.ModelPanel=e;}.call(this),function(){"use strict";var t=this.Brightics,e="brtc-style-emphasis";function i(t,e){this.options=e,this.editorInput=this.options.editor.options.editorInput,this.editor=this.options.editor,this.activityList=[],this.path=[],this.retrieveParent(t),this.createControls(),this.init();}i.prototype.retrieveParent=function(t){this.$parent=t;},i.prototype.createControls=function(){var t=$('
');this.$parent.append(t),this.$mainControl=t.find(".brtc-va-editors-model-info-toolbar-title.brtc-style-editors-model-info-toolitem");},i.prototype.init=function(){this.$mainControl.html("Home"),this.addProject(),this.addFile();},i.prototype._getConditionType=function(t,e){return e[0]===t?"if":e[e.length-1]===t?"else":"else if";},i.prototype.dfs=function(t,e,i){if(_.isUndefined(t))return!1;if(t.mid===e)return!0;for(var o=function o(t){return t.display.label;},n=0;n
2&&this.addDotDotDot(),_.forEach(_.dropRight(_.takeRight(this.path,2)),_.partial(this.addActivity,_,!0),this),_.isEmpty(this.path)?this.$fileUnit.removeClass(e):(this.addActivity(_.last(this.path)),this.$fileUnit.addClass(e)));},i.prototype.addProject=function(){var t=this.editorInput.getProjectId(),e=Studio.getResourceManager().getProject(t).getLabel(),i=this.createUnit(t),o=$('');o.text(e).attr("title",e),i.append(o);},i.prototype.addFile=function(){var t=this,e=this.createUnit(this.editorInput.getFileId()),i=this.editorInput.getLabel(),o=$('');o.text(i).attr("title",i),e.append(o),this.$fileUnit=e,o.click(function(){if(t.isClickable(e)){var i=t.editor.modelLayoutManager;i&&i.openActivity&&"function"==typeof i.openActivity&&i.openActivity(t.editorInput.getFileId());}});},i.prototype.addDotDotDot=function(){var t=this,e=this.options.editor.modelLayoutManager,i=this.createUnit("---"),o=$('');o.text("...").attr("title","..."),this.addEmphasis(i),i.append(o),o.addClass("brtc-va-editors-modelinfo-toolbar-dotdotdot"),o.click(function(i){var o=$(i.target).offset(),n={x:o.left-402+26,y:o.top-10+40};t.openNavigatorDialog(n,_.dropRight(t.path,2),{getNavigatorData:function getNavigatorData(){return _.dropRight(t.path,2);},navigate:function navigate(t,i){e.openActivity(t,i);}});});},i.prototype.addActivity=function(t,e){var i=this,o=t.mid||t.fnUnit.fid,n=this.createUnit(o),r=t.label,a=$('');return a.text(r).attr("title",r),n.append(a),e&&(this.addEmphasis(n),a.click(function(){i.handleActivitySelected(o);})),this.addToActivityList({id:o,view:n,fnUnit:t.fnUnit}),a;},i.prototype.addToActivityList=function(t){this.activityList.push(t);},i.prototype.createUnit=function(t){this.activityList.push(t);var e=$('');return e.attr("id",t),this.addArrow(e),this.$mainControl.append(e),e;},i.prototype.addArrow=function(t){var e=$('');t.append(e);},i.prototype.getActivity=function(t){for(var e in this.activityList){if(this.activityList[e].id===t)return this.activityList[e].index=e,this.activityList[e];}return{};},i.prototype.handleActivitySelected=function(t){var e=this.getActivity(t),i=this.options.editor.modelLayoutManager;i&&i.openActivity&&"function"==typeof i.openActivity&&i.openActivity(e.id,e.fnUnit);},i.prototype._getModelByMid=function(t){return this.editor.getModelByMid(t);},i.prototype._getFunctionByFid=function(t){return this.editor.getFunctionByFid(t);},i.prototype.addEmphasis=function(t){t.addClass(e);},i.prototype.removeEmphasis=function(t){t.removeClass(e);},i.prototype.isClickable=function(t){return t.hasClass(e);},i.prototype.registerOpenNavigatorDialog=function(t){this.openNavigatorDialog=t;},i.prototype.getPath=function(){return this.path;},t.VA.Core.Editors.Navigator=i;}.call(this),function(){"use strict";var t=this.Brightics,e=window.__module__.DataStructures.TreeNode;function i(t,i){this.__root=new e(t,i);}i.prototype.getRoot=function(){return this.__root;},i.prototype.addChild=function(t,e){return this.getRoot().addChild(t,e);},i.prototype.getChild=function(t){return this.getRoot().getChild(t);},i.prototype.deleteChild=function(t){this.getRoot().deleteChild(t);},t.VA.Core.Editors.NavigatorTree=i;}.call(this),function(){"use strict";var t=this.Brightics;function e(t,e){this.options=e,this.editor=e.editor||null,this.items={},this.retrieveParent(t),this.createControls(),this.registerItems();}e.prototype.retrieveParent=function(t){this.$parent=t;},e.prototype.createControls=function(){this.$mainControl=$(''),this.$parent.append(this.$mainControl),this.createNavigator(this.$mainControl);},e.prototype.createNavigator=function(e){this.navigator=new t.VA.Core.Editors.Navigator(e,this.options);},e.prototype.registerItems=function(){console.error("registerItems must be implemented");},e.prototype.addItem=function(e){var i=new(e.class&&"function"==typeof e.class?e.class:t.VA.Core.Editors.Toolbar.Item)(this.$mainControl,e);this.items[i.getItemType()]=i;},e.prototype.getHeight=function(){return this.$mainControl.outerHeight();},e.prototype.showItem=function(t){this.items[t].show();},e.prototype.hideItem=function(t){this.items[t].hide();},e.prototype.getItem=function(t){return this.items[t];},t.VA.Core.Editors.Toolbar=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(t,e){this.options=e||{},this.options.attribute=this.options.attribute||{},this.options.action=this.options.action||{},this.retrieveParent(t),this.createControls(),this.initOptions(),this.applyOptions();}e.prototype.retrieveParent=function(t){this.$parent=t;},e.prototype.createControls=function(){this.$mainControl=$(''),this.$parent.append(this.$mainControl);},e.prototype.initOptions=function(){},e.prototype.applyOptions=function(){this.applyAttribute(),this.applyAction(),this.applyVisible(),this.applySeparator();},e.prototype.applyAttribute=function(){for(var t in this.options.attribute){this.$mainControl.attr(t,this.options.attribute[t]);}},e.prototype.applyAction=function(){for(var t in this.options.action){"function"==typeof this.options.action[t]&&this.$mainControl.on(t,this.options.action[t].bind(this));}},e.prototype.applyVisible=function(){!1===this.options.visible&&this.$mainControl.hide();},e.prototype.applySeparator=function(){if(!0===this.options.separator){var t=$('');this.$parent.append(t);}},e.prototype.setOptions=function(t){this.options=$.extend(this.options,t);},e.prototype.getOptions=function(){return this.options;},e.prototype.getTitle=function(){return this.options.attribute.title;},e.prototype.getItemType=function(){return this.options.attribute["item-type"];},e.prototype.show=function(){this.$mainControl.show();},e.prototype.hide=function(){this.$mainControl.hide();},e.prototype.setEnable=function(){this.$mainControl.removeClass("status-disabled");},e.prototype.setDisable=function(){this.$mainControl.addClass("status-disabled");},e.prototype.handleOnSelectionChanged=function(){},t.VA.Core.Editors.Toolbar.Item=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Function Clipboard","item-type":"clipboard"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){Studio.getClipboardManager().openClipboardDialog(!0);},t.VA.Core.Editors.Toolbar.ClipboardItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Datasource Management","item-type":"datasource"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(e){new t.VA.Core.Dialogs.DatasourceManagementDialog(this.$parent);},t.VA.Core.Editors.Toolbar.DatasourceItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Function Reference","item-type":"functionhelp"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){},t.VA.Core.Editors.Toolbar.FunctionhelpItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"History","item-type":"history"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){this.closeHistoryDialog(),this.openHistoryDialog(t);},e.prototype.closeHistoryDialog=function(){this.historySelector&&this.historySelector.close(),this.historySelector=null;},e.prototype.openHistoryDialog=function(e){var i,o=Studio.getEditorContainer().getActiveModelEditor(),n=o.getCommandManager(),r=n.getStacks(),a=[];for(var s in r){i=r[s].option&&r[s].option.fnUnit?r[s].getLabel()+" - "+r[s].options.fnUnit.display.label:r[s].getLabel(),a.push({name:r[s].getLabel(),description:i});}this.historySelector=new t.VA.Core.Dialogs.HistorySelector(o.$mainControl,{selectHistory:function selectHistory(t){t.OK&&n.go(t.goHistory);},stackIndex:n.index,source:a,editor:o});},t.VA.Core.Editors.Toolbar.HistoryItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Index","item-type":"index"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){this.closeIndexDialog(),this.openIndexDialog();},e.prototype.closeIndexDialog=function(t){var e=Studio.getEditorContainer().getActiveModelEditor().indexDialog;e&&e.close(),e=null;},e.prototype.openIndexDialog=function(e){var i=Studio.getEditorContainer().getActiveModelEditor();i.indexDialog=new t.VA.Core.Dialogs.IndexDialog(i.$mainControl,{editor:i,appendTo:i.$mainControl});},t.VA.Core.Editors.Toolbar.IndexItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Model Information","item-type":"model-info"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){this.closeInfoDialog(),this.openInfoDialog(t);},e.prototype.closeInfoDialog=function(){this.infoDialog&&this.infoDialog.close(),this.infoDialog=null;},e.prototype.openInfoDialog=function(e){var i=Studio.getEditorContainer().getActiveModelEditor(),o=i.getEditorInput(),n=Studio.getResourceManager().getProject(o.getProjectId());this.infoDialog=new t.VA.Core.Dialogs.InfoDialog(i.getMainArea(),{project:n,model:o,position:{my:"left top",at:"left bottom",of:e.target},appendTo:i.getMainArea(),modal:!1,title:"Model Information"});},t.VA.Core.Editors.Toolbar.ModelInfoItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i),this.isSelected=!1;}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Move Mode","item-type":"move-mode"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){var e=Studio.getEditorContainer().getActiveModelEditor();this.isSelected?(e.setEditorState("move-mode-enabled",!1),this.$mainControl.removeClass("status-selected")):(e.setEditorState("move-mode-enabled",!0),this.$mainControl.addClass("status-selected")),this.isSelected=!this.isSelected;},t.VA.Core.Editors.Toolbar.MoveModeItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i),this.refresh(),this.addCommandListener(),this.addGoHistoryListener();}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Redo","item-type":"redo"},action:{click:this.handleOnClick}});},e.prototype.refresh=function(){this.refreshEnable(),this.refreshTitle();},e.prototype.refreshEnable=function(){Studio.getEditorContainer().getActiveModelEditor().getCommandManager().canRedo()?this.$mainControl.removeClass("status-disabled"):this.$mainControl.addClass("status-disabled");},e.prototype.refreshTitle=function(){var t=Studio.getEditorContainer().getActiveModelEditor().getCommandManager(),e=t.stack,i=t.index,o=e[i+1]?e[i+1].getLabel():"";this.$mainControl.attr("title","Redo "+o);},e.prototype.addCommandListener=function(){var t=this;Studio.getEditorContainer().getActiveModelEditor().addCommandListener(function(e){t.refresh();});},e.prototype.addGoHistoryListener=function(){var t=this;Studio.getEditorContainer().getActiveModelEditor().addGoHistoryListener(function(e){t.refresh();});},e.prototype.handleOnClick=function(t){Studio.getEditorContainer().getActiveModelEditor().getCommandManager().redo();},t.VA.Core.Editors.Toolbar.RedoItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Run","item-type":"run"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){},t.VA.Core.Editors.Toolbar.RunItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Schedule","item-type":"schedule"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(e){var i=Studio.getEditorContainer().getActiveModelEditor();new t.VA.Core.Dialogs.ScheduleManagementDialog(i.$mainControl,{editorInput:i.options.editorInput,appendTo:i.$parent,position:{my:"center top",at:"center top+15%",of:window},title:"Schedule list"});},t.VA.Core.Editors.Toolbar.ScheduleItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{"item-type":"separator"}});},t.VA.Core.Editors.Toolbar.Separator=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.TooltipItem=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Tooltip","item-type":"tooltip"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){var e=Studio.getEditorContainer().getActiveModelEditor();this.$mainControl.hasClass("status-selected")?(e.diagramEditorPage.changeTooltipEnabled(!1),this.$mainControl.removeClass("status-selected")):(e.diagramEditorPage.changeTooltipEnabled(!0),this.$mainControl.addClass("status-selected"));},t.VA.Core.Editors.Toolbar.TooltipItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i),this.refresh(),this.addCommandListener(),this.addGoHistoryListener();}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Undo","item-type":"undo"},action:{click:this.handleOnClick}});},e.prototype.refresh=function(){this.refreshEnable(),this.refreshTitle();},e.prototype.refreshEnable=function(){Studio.getEditorContainer().getActiveModelEditor().getCommandManager().canUndo()?this.$mainControl.removeClass("status-disabled"):this.$mainControl.addClass("status-disabled");},e.prototype.refreshTitle=function(){var t=Studio.getEditorContainer().getActiveModelEditor().getCommandManager(),e=t.stack,i=t.index,o=e[i]?e[i].getLabel():"";this.$mainControl.attr("title","Undo "+o);},e.prototype.addCommandListener=function(){var t=Studio.getEditorContainer().getActiveModelEditor(),e=this;t.addCommandListener(function(t){e.refresh();});},e.prototype.addGoHistoryListener=function(){var t=Studio.getEditorContainer().getActiveModelEditor(),e=this;t.addGoHistoryListener(function(t){e.refresh();});},e.prototype.handleOnClick=function(t){Studio.getEditorContainer().getActiveModelEditor().getCommandManager().undo();},t.VA.Core.Editors.Toolbar.UndoItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Upload","item-type":"upload"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){this.openRepositoryBrowserDialog();},e.prototype.openRepositoryBrowserDialog=function(e){var i=Studio.getEditorContainer().getActiveModelEditor();new t.VA.Core.Dialogs.RepositoryBrowserDialog(i.getMainArea(),{useButton:!1,filePath:"",open:function open(){$(".ui-dialog-titlebar.ui-widget-header",$(this).parent()).css("margin-left","30px !important");},resizable:!0,title:"Browse Repository"});},t.VA.Core.Editors.Toolbar.UploadItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Variables","item-type":"variable"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){Studio.getEditorContainer().getActiveModelEditor().getSideBarManager().expandStatusChange("variables",!0);},t.VA.Core.Editors.Toolbar.VariableItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i);}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Version Management","item-type":"version"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(e){var i=Studio.getEditorContainer().getActiveModelEditor(),o=i.getEditorInput(),n=o.getProjectId(),r=o.getFileId();new t.VA.Core.Dialogs.VersionManagementDialog(this.$mainControl,{projectId:n,fileId:r,position:{my:"center top",at:"center top+15%",of:window},editor:i});},t.VA.Core.Editors.Toolbar.VersionItem=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(e,i){t.VA.Core.Editors.Toolbar.Item.call(this,e,i),this.createZoomContextMenu();}e.prototype=Object.create(t.VA.Core.Editors.Toolbar.Item.prototype),e.prototype.constructor=e,e.prototype.createZoomContextMenu=function(){var e=this,i=Studio.getEditorContainer().getActiveModelEditor();this.$ctxMenu=$(''),this.$parent.append(this.$ctxMenu),this.$ctxMenu.jqxMenu({theme:t.VA.Env.Theme,width:"56px",height:"180px",autoOpenPopup:!1,mode:"popup",animationHideDuration:0,animationShowDuration:0}),i.options.lastSelectedScale=this.$ctxMenu.find('li[action="1.0"]'),this.$ctxMenu.on("itemclick",function(t){var e=$(t.args);i.options.lastSelectedScale&&i.options.lastSelectedScale.removeClass("selected"),i.options.lastSelectedScale=e,i.options.lastSelectedScale.addClass("selected"),i.diagramEditorPage.changeScale(1*e.attr("action"));}),this.$ctxMenu.find('li[action="1.0"]').addClass("selected"),this.ctxMenuCloseHandler=function(){e.$ctxMenu.jqxMenu("close");};},e.prototype.initOptions=function(){this.setOptions({attribute:{title:"Zoom","item-type":"zoom"},action:{click:this.handleOnClick}});},e.prototype.handleOnClick=function(t){var e=$(t.target).offset().left-16,i=$(t.target).offset().top+$(t.target).height()+4;this.$ctxMenu.jqxMenu("open",e,i),$(".brtc-va-editors-modeleditor-diagram").on("scroll",this.ctxMenuCloseHandler),$(window).on("resize",this.ctxMenuCloseHandler);},t.VA.Core.Editors.Toolbar.ZoomItem=e;}.call(this),function(){"use strict";this.Brightics.VA.Core.Editors.Toolbar.ItemsTemplate={};}.call(this),function(){"use strict";var t=this.Brightics;t.VA.Core.Utils;function e(t,e){this.parentId=t,this.options=e,this.retrieveParent(),this.createControls();}e.prototype.retrieveParent=function(){this.$parent=t.VA.Core.Utils.WidgetUtils.retrieveWidget(this.parentId);},e.prototype.createControls=function(){this.$mainControl=$(''),this.$parent.append(this.$mainControl),this.repositoryViewer=new t.VA.Core.Controls.RepositoryViewer(this.$mainControl.find(".brtc-va-views-dataexplorer-repostiory"));},e.prototype.destroy=function(){this.repositoryViewer.destroy();},e.prototype.render=function(){this.repositoryViewer.render();},t.VA.Core.Views.DataExplorer=e;}.call(this),function(t){var e=t.Brightics,i=function i(){var _e$VA$Core$Utils$Comm;return(_e$VA$Core$Utils$Comm=e.VA.Core.Utils.CommonUtils).dim.apply(_e$VA$Core$Utils$Comm,arguments);},o=brtc_require("crel"),n=e.VA.Env.Theme,_brtc_require$Datasou=brtc_require("Dao").DatasourceDao,r=_brtc_require$Datasou.DB,a=_brtc_require$Datasou.Cloud,s=r.getDatasources,l=r.addDatasource,c=r.updateDatasource,d=r.deleteDatasource,p=r.getDbTypes,u=a.getS3s,h=a.addS3,f=a.updateS3,m=a.deleteS3,g="Amazon S3",v=function v(t){return!1;};var b=[];var y=function y(t){return Promise.resolve($.ajax({type:"GET",url:"api/va/v2/rsa/publickey"})).then(function(_ref5){var t=_ref5.publicN,e=_ref5.publicE;var i=new RSAKey();return i.setPublic(t,e),i;}).then(function(e){return"RDB"===t.datasourceType?Object.assign({},t,{password:e.encrypt(t.password)}):Object.assign({},t,{secretAccessKey:e.encrypt(t.secretAccessKey)});});},C=function(){function t(t,i){var _this8=this;v(t,i),this.data=i.data,this.handler=i.handler,this.$control=$(o("div","datasource-management-view__tree")),this.$control.jqxTree({theme:e.VA.Env.Theme,source:this.getTreeSourceFromData(i.data),height:"100%",width:"100%",allowDrag:!1,allowDrop:!1}),this.$control.on("itemClick",function(t){v(t);var e=_this8.$control.jqxTree("getItem",t.args.element),i=_this8.getDataByItem(e);v(i,"selected"),_this8.handler.itemClick(i);}),t.append(this.$control);}return t.prototype.destroy=function(){this.$control.jqxTree("destroy");},t.prototype.getTreeSourceFromData=function(t){return t.map(function(_ref6,i){var t=_ref6.label,e=_ref6.items;return{html:"\n "+_.escape(t),expanded:!1,items:e.map(function(t,e){var i=t.datasourceName+" ("+(t.dbType||t.cloudType||g)+")";return{html:"\n "+_.escape(i)+"\n ",items:[]};})};});},t.prototype.render=function(t){this.setData(t),this.$control.jqxTree({theme:e.VA.Env.Theme,source:this.getTreeSourceFromData(this.data)}),this.$control.jqxTree("refresh");},t.prototype.select=function(_temp){var _ref7=_temp===void 0?{}:_temp,t=_ref7.datasourceName,e=_ref7.datasourceType;var i=this.getItemByLabelAndType(t,e);if(this.$control.jqxTree("selectItem",i),!i)return;var o=this.getItemByElement(i.parentElement);o&&this.$control.jqxTree("expandItem",o);},t.prototype.getItemByElement=function(t){var e=this.$control.jqxTree("getItems");for(var _iterator=e,_isArray=Array.isArray(_iterator),_i6=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref8;if(_isArray){if(_i6>=_iterator.length)break;_ref8=_iterator[_i6++];}else{_i6=_iterator.next();if(_i6.done)break;_ref8=_i6.value;}var _i7=_ref8;if(_i7.element===t)return _i7;}return null;},t.prototype.getItemByLabelAndType=function(t,e){var i=this.$control.jqxTree("getItems");for(var _iterator2=i,_isArray2=Array.isArray(_iterator2),_i8=0,_iterator2=_isArray2?_iterator2:_iterator2[Symbol.iterator]();;){var _ref9;if(_isArray2){if(_i8>=_iterator2.length)break;_ref9=_iterator2[_i8++];}else{_i8=_iterator2.next();if(_i8.done)break;_ref9=_i8.value;}var _o3=_ref9;var _i9=_o3.element.querySelector("span");if(_i9&&_i9.getAttribute("ds-name")===t&&_i9.getAttribute("ds-type")===e)return _o3;}return null;},t.prototype.setData=function(t){this.data=t;},t.prototype.deleteById=function(_ref10){var t=_ref10.datasourceName,_ref10$datasourceType=_ref10.datasourceType,e=_ref10$datasourceType===void 0?"Cloud":_ref10$datasourceType;var i=this.getItemByLabelAndType(t,e);i&&this.$control.jqxTree("removeItem",i.element);},t.prototype.getDataByItem=function(t){var e=t.element.querySelector("span");if(e){var _t5=e.getAttribute("ds-name"),_i10=e.getAttribute("ds-type");for(var _iterator3=this.data,_isArray3=Array.isArray(_iterator3),_i11=0,_iterator3=_isArray3?_iterator3:_iterator3[Symbol.iterator]();;){var _ref11;if(_isArray3){if(_i11>=_iterator3.length)break;_ref11=_iterator3[_i11++];}else{_i11=_iterator3.next();if(_i11.done)break;_ref11=_i11.value;}var _e2=_ref11;for(var _iterator4=_e2.items,_isArray4=Array.isArray(_iterator4),_i12=0,_iterator4=_isArray4?_iterator4:_iterator4[Symbol.iterator]();;){var _ref12;if(_isArray4){if(_i12>=_iterator4.length)break;_ref12=_iterator4[_i12++];}else{_i12=_iterator4.next();if(_i12.done)break;_ref12=_i12.value;}var _o4=_ref12;if(_o4.datasourceName===_t5&&(_o4.datasourceType||"Cloud")===_i10)return _o4;}}return null;}},t;}(),x=function(){function t(t,e){var i=e||{};this.options=i,this.handler=i.handler||{};var n=$(o("div",{class:"datasource-management-view__form"}));this.$control=n,t.append(n);}return t.prototype.getAllValidationMessage=function(){return this.view.map(function(_ref13){var t=_ref13.validate;return t();}).filter(function(t){return t;});},t.prototype.focusFirstInvalidInput=function(){var t=this.view.find(function(_ref14){var t=_ref14.validate;return t();});t&&t.focus();},t.prototype.validate=function(){return this.view.forEach(function(t){return t.validate();});},t.prototype.isDirty=function(){var _this9=this;return this.view.some(function(_ref15){var t=_ref15.getValue,e=_ref15.key;return v(t(),_this9.data[e]),t()!==_this9.data[e];});},t.prototype.getJSON=function(){var t=this.view.reduce(function(t,e){var _Object$assign;return Object.assign(t,(_Object$assign={},_Object$assign[e.key]=e.getValue(),_Object$assign));},{});return"RDB"===this.data.datasourceType?Object.assign({datasourceType:"RDB"},t):Object.assign({datasourceType:"Cloud"},t);},t.prototype.setData=function(t){this.data=t,t&&"RDB"!==t.datasourceType&&(this.data=Object.assign({cloudType:g},t));},t.prototype.render=function(t,e){var _this10=this;if(this.setData(t),this.$control.empty(),!t)return;var i=function i(t,e){return o("div",{class:"datasource-management-view__input-row"},o("div",{class:"datasource-management-view__input-wrapper"},o("div",{class:"datasource-management-view__label-wrapper"},o("label",t,o("span",{class:"datasource-management-view__required-star"},"*"))),e),o("div",{class:"datasource-management-view__validation-area"}));},r=function r(t){return 0===t.trim().length?"Required field":"";},a=function a(t,e,_a2,_temp2){var _ref16=_temp2===void 0?{}:_temp2,_ref16$validator=_ref16.validator,s=_ref16$validator===void 0?r:_ref16$validator,_ref16$option=_ref16.option,l=_ref16$option===void 0?{}:_ref16$option;var c=o("input",Object.assign({class:"datasource-management-view__input",value:_a2,maxlength:80,title:l.disabled?_a2:""},l)),d=$(i(e,c)),p=$(c).jqxInput({theme:n,value:_a2,disabled:l.disabled,height:"100%",width:"300px"}),u=d.find(".datasource-management-view__validation-area"),h=function h(){var t=p.jqxInput("val"),e=s?s(t):"";return d.toggleClass("datasource-management-view__input-row--error",!!e),u.html(e),e;};return p.on("keyup",function(){return _this10.handler.valueChange();}),p.on("focusout",function(){h();}),{$el:d,getValue:function getValue(){return p.jqxInput("val");},validate:h,focus:function focus(){return p.focus();},key:t};},s=function s(t,e,r,a,_s){var l=o("div",Object.assign({class:"datasource-management-view__dropdown"},_s)),c=Math.max(0,r.indexOf(a)),d=$(l).jqxDropDownList({theme:n,source:r,selectedIndex:c,height:"100%",width:"300px",dropDownHeight:function(t){return Math.min(25*t,150)+"px";}(r.length)});d.on("change",function(){return _this10.handler.handleValueChange();});return{$el:$(i(e,l)),getValue:function getValue(){return d.jqxDropDownList("val");},validate:function validate(){return"";},key:t};},l="RDB"===t.datasourceType?"RDB":"Cloud",c={RDB:[a("datasourceName","Name",t.datasourceName,{option:{disabled:e}}),a("ip","IP",t.ip),a("port","Port",t.port,{validator:function validator(t){if(r(t))return r(t);var e=t.length;for(var _i13=0;_i13 '),this.$parent.append(this.$mainControl),this.$filter=this.$mainControl.find(".brtc-va-views-palette-filter"),this.$navigator=this.$mainControl.find(".brtc-va-views-palette-navigator"),this.createFilterControl(),this.createNavigatorControl(),this.$mainControl.find(".brtc-va-views-palette-navigator-wrapper").perfectScrollbar();},e.prototype.createFilterControl=function(){var e=this,i=$('
');this.$filter.append(i),i.jqxInput({placeHolder:"Search Item",theme:t.VA.Env.Theme});var o=function o(i){var o=i.target.value.toLowerCase(),n=e.$mainControl.find(".brtc-va-views-palette-fnunit-list");$.each(n,function(t,i){e.$navigator.jqxNavigationBar("expandAt",t);});var r=t.VA.Implementation.DeepLearning.Functions.Library.getListByTags([o.trim()]),a=e.$mainControl.find(".brtc-va-views-palette-fnunit");$.each(a,function(e,i){var o=$(i).parent(),n=t.VA.Core.Utils.WidgetUtils.getData(o.find(".brtc-va-views-palette-fnunit"),"func");o.css("display",$.inArray(n,r)>-1?"block":"none");}),n=e.$mainControl.find(".brtc-va-views-palette-fnunit-list"),$.each(n,function(t,e){var i=$(e).find(".brtc-va-views-palette-fnunit-content").filter(function(){return"block"==$(this).css("display");});$(e).css("display",i.length>0?"block":"none"),$(e).prev().css("display",i.length>0?"block":"none");}),e.$mainControl.find(".brtc-va-views-palette-navigator-wrapper").perfectScrollbar("update");};i.keyup(function(t){o(t);}),i.on("search",function(){o(event);});},e.prototype.createNavigatorControl=function(){var e=this,i={url:"api/va/v2/studio/palette/"+this.options.modelType,type:"GET",contentType:"application/json; charset=utf-8",blocking:!1};$.ajax(i).done(function(i){if(e.options.additionalGroup&&i.push(e.options.additionalGroup),e.createFunctions(i),e.options.modelType===t.VA.Implementation.DataFlow.Clazz);else{e.options.draggable&&e.draggablePalette();var o={theme:t.VA.Env.Theme,expandMode:"multiple",expandedIndexes:[],width:"100%"};for(var n in i){o.expandedIndexes.push(n);}e.$navigator.jqxNavigationBar(o);}});},e.prototype.appendFunction=function(e){var i=this,o=$('
');$.each(e.functions,function(e,n){if(n.visible){var r=i.options.modelType;t.VA.Core.Utils.WidgetUtils.createPaletteItem(o,n.func,r);}}),i.$navigator.append('
"),i.$navigator.append(o);},e.prototype.createFunctions=function(t){var e=this;$.each(t,function(t,i){i.visible&&e.appendFunction(i);});},e.prototype.draggablePalette=function(){var t=this;this.$navigator.find(".brtc-va-views-palette-fnunit").each(function(){$(this).mouseover(function(){$(this).toggleClass("brtc-va-views-palette-fnunit-hover");}).mouseout(function(){$(this).toggleClass("brtc-va-views-palette-fnunit-hover");}),t._draggableFnUnit($(this));});},e.prototype._draggableFnUnit=function(e){var i=this;e.draggable({appendTo:"body",scroll:!1,cursor:"move",cursorAt:{left:5,top:5},helper:function helper(o){var n=$(this).clone();n.css({"z-index":5100});var r={functions:[{func:t.VA.Core.Utils.WidgetUtils.getData(e,"func")}],links:[]};return t.VA.Core.Utils.WidgetUtils.putData(n,"template",r),t.VA.Core.Utils.WidgetUtils.putData(n,"source",i),n;},start:function start(t,e){$(".brtc-va-studio").addClass("brtc-va-studio-dragging"),$(this).draggable("option","cursorAt",{left:Math.floor(e.helper.width()/2),top:Math.floor(e.helper.height()/2)});},drag:function drag(t,e){e.helper.trigger("feedback",[{clientX:t.clientX,clientY:t.clientY}]);},stop:function stop(t,e){$(".brtc-va-studio").removeClass("brtc-va-studio-dragging");}});},t.VA.Core.Views.DeepLearningPalette=e;}.call(this),function(){"use strict";var t=this.Brightics;function e(t,e){this.parentId=t,this.options=e||{},this.listeners={},this.opened=[],this.maxTabCount=this.options.maxTabCount||6,this.retrieveParent(),this.createControls();}e.prototype.retrieveParent=function(){this.$parent=t.VA.Core.Utils.WidgetUtils.retrieveWidget(this.parentId);},e.prototype.createControls=function(){this.$mainControl=$(''),this.$parent.append(this.$mainControl),this.createNewEditorButton(this.$mainControl.find(".brtc-va-tools-menubar-editor-tab.newmodel"));},e.prototype.createNewEditorButton=function(t){this.newEditorButton=t,t.on("click",this.handleNewEditorButtonClicked.bind(this));},e.prototype.showNewEditorButton=function(){this.newEditorButton.css("display","block");},e.prototype.hideNewEditorButton=function(){this.newEditorButton.css("display","none");},e.prototype.handleNewEditorButtonClicked=function(){Studio.getLayoutManager().showProjectViewerPopup();},e.prototype.openTab=function(t){var e=this.getIdFromEditorInput(t).pid,i=this.getIdFromEditorInput(t).fid,o=this.getTargetTabIndex(e,i);if(o>-1)this.selectTabIndex(o);else{if(this.isOverMaxTabCount())return this.showErrorMessage(),!1;this.createTab(t),this.selectTab(e,i);}return!0;},e.prototype.updateTab=function(t){var e=this.getIdFromEditorInput(t).pid,i=this.getIdFromEditorInput(t).fid,o=this.getTargetTabIndex(e,i);if(o>-1){var n=this.$mainControl.find("li:eq("+o+")");this.setTabTemplateData(n,t);}},e.prototype.closeTab=function(t){var e=this.getIdFromEditorInput(t).pid,i=this.getIdFromEditorInput(t).fid,o=this.getSelectedTabIndex(),n=this.getTargetTabIndex(e,i);if(n>-1&&(this.closeTabIndex(n),o===n&&this.getOpenedTabs().length)){var r=0===n?0:n-1;return this.selectTabIndex(r),this.getEditorInputByIndex(r);}},e.prototype.unselectAll=function(){this.$mainControl.find("li").removeClass("selected");},e.prototype.getSelectedTabIndex=function(){return this.$mainControl.find("li.selected").length?this.$mainControl.find("li.selected").prevAll().length:-1;},e.prototype.getOpenedTabs=function(){return this.opened;},e.prototype.getTargetTabIndex=function(t,e){for(var i=-1,o=0;o