- `).appendTo(o.default.sel.runtime)}getId(){return this._taskId}getTypeName(){return this._typeName}getClassLabel(){return this._classLabel}getParmsObj(){return this._parmsObj}setTitle(){n.default.setTitle(this.getTitle())}getTitle(){return`${this.getClassLabel()} 任务ID:${this.getId()}`}setOriginalTitle(){n.default.setTitle("")}show(){o.default.show(this.getId())}hide(){o.default.hide()}showInfo(){a.default.Dialog.open("任务信息",`ID:${this.getId()}
`+`标题:${this.getTitle()}
`+`调用类标签:${this.getClassLabel()}
`+`调用类名:${this.getTypeName()}
`+`执行开始时间:${new Date(parseInt(this.getId()))}
`+`参数:${JSON.stringify(this.getParmsObj())}`)}log(e,i){let s=t('
'),o={I:"消息",S:"成功",W:"警告",E:"错误"},n="";o[i]&&(s.attr("data-level",i),n+=`
[${o[i]}] `),n+=(t=>t.replace(/\n/g,"
"))(e),s.html(n),s.appendTo(this._taskLogTableSel),s.css("display",""),this.scrollToBottom()}scrollToBottom(){t(o.default.sel.runtime).scrollTop(t(o.default.sel.runtime)[0].scrollHeight)}remove(){this.getIsInProgress()?a.default.Dialog.open("删除任务",`任务 “${this.getTitle()}” 正在执行中...`,["中止并删除任务",()=>{try{l.abortTask(this.getId()).then(t=>{t?this._remove():a.default.Notify.error("任务中止失败")})}catch(t){throw a.default.Notify.error("任务中止失败"),t}}],["取消",()=>{}]):this._remove()}_remove(){o.default.getCurrent()&&o.default.getCurrent().getId()===this.getId()&&this.hide(),delete o.default.list[this.getId()],o.default.taskManagerLayer.removeItem(this.getId()),a.default.Notify.success("任务删除成功")}taskIsEnd(){this.isInProgress=!1}getIsInProgress(){return this.isInProgress}getSel(){return this._taskItemSel}getLogTableSel(){return this._taskLogTableSel}}}).call(this,i("EVdn"))},ItTz:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("N1+O"),o=i("n0eM");e.default=class{constructor(e){this._elem=t(`
`).appendTo(o.default.sel.navBtns),this._groupName=e,this._btnList={}}setMostLeft(){return this._elem.insertBefore(t(s.default.BtnBox.sel.navBtns+" .btn-group:first-child")),this}setMostRight(){return this._elem.insertAfter(t(s.default.BtnBox.sel.navBtns+" .btn-group:last-child")),this}getElem(){return this._elem}getGroupName(){return this._groupName}show(){return this._elem.show(),this}hide(){return this._elem.hide(),this}getBtnList(){return this._btnList}addBtn(t,e){return this._btnList[t]=e,e.getElem().appendTo(this._elem),e}getBtn(t){return this._btnList[t]?this._btnList[t]:null}}}).call(this,i("EVdn"))},K897:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("6yn5");e.default=class{static success(t){this.show(t,"s")}static error(t){this.show(t,"e")}static show(e,i,o){o="number"==typeof o?o:2e3;let n=t(".notify-layer");n.length||(n=t('
').appendTo("body"));let a,l=t(s.html`
+ `).appendTo(n.default.sel.runtime)}getId(){return this._taskId}getTypeName(){return this._typeName}getClassLabel(){return this._classLabel}getParmsObj(){return this._parmsObj}setTitle(){o.default.setTitle(this.getTitle())}getTitle(){return`${this.getClassLabel()} 任务ID:${this.getId()}`}setOriginalTitle(){o.default.setTitle("")}show(){n.default.show(this.getId())}hide(){n.default.hide()}showInfo(){a.default.Dialog.open("任务信息",`ID:${this.getId()}
`+`标题:${this.getTitle()}
`+`调用类标签:${this.getClassLabel()}
`+`调用类名:${this.getTypeName()}
`+`执行开始时间:${new Date(parseInt(this.getId()))}
`+`参数:${JSON.stringify(this.getParmsObj())}`)}log(e,i){let s=t('
'),n={I:"消息",S:"成功",W:"警告",E:"错误"},o="";n[i]&&(s.attr("data-level",i),o+=`
[${n[i]}] `),o+=(t=>t.replace(/\n/g,"
"))(e),s.html(o),s.appendTo(this._taskLogTableSel),s.css("display",""),this.scrollToBottom()}scrollToBottom(){t(n.default.sel.runtime).scrollTop(t(n.default.sel.runtime)[0].scrollHeight)}remove(){this.getIsInProgress()?a.default.Dialog.open("删除任务",`任务 “${this.getTitle()}” 正在执行中...`,["中止并删除任务",()=>{try{l.abortTask(this.getId()).then(t=>{t?this._remove():a.default.Notify.error("任务中止失败")})}catch(t){throw a.default.Notify.error("任务中止失败"),t}}],["取消",()=>{}]):this._remove()}_remove(){n.default.getCurrent()&&n.default.getCurrent().getId()===this.getId()&&this.hide(),delete n.default.list[this.getId()],n.default.taskManagerLayer.removeItem(this.getId()),a.default.Notify.success("任务删除成功")}taskIsEnd(){this.isInProgress=!1}getIsInProgress(){return this.isInProgress}getSel(){return this._taskItemSel}getLogTableSel(){return this._taskLogTableSel}}}).call(this,i("EVdn"))},ItTz:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("N1+O"),n=i("n0eM");e.default=class{constructor(e){this._elem=t(`
`).appendTo(n.default.sel.navBtns),this._groupName=e,this._btnList={}}setMostLeft(){return this._elem.insertBefore(t(s.default.BtnBox.sel.navBtns+" .btn-group:first-child")),this}setMostRight(){return this._elem.insertAfter(t(s.default.BtnBox.sel.navBtns+" .btn-group:last-child")),this}getElem(){return this._elem}getGroupName(){return this._groupName}show(){return this._elem.show(),this}hide(){return this._elem.hide(),this}getBtnList(){return this._btnList}addBtn(t,e){return this._btnList[t]=e,e.getElem().appendTo(this._elem),e}getBtn(t){return this._btnList[t]?this._btnList[t]:null}}}).call(this,i("EVdn"))},K897:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("6yn5");e.default=class{static success(t){this.show(t,"s")}static error(t){this.show(t,"e")}static show(e,i,n){n="number"==typeof n?n:2e3;let o=t(".notify-layer");o.length||(o=t('
').appendTo("body"));let a,l=t(s.html`
- `).prependTo(n),r=()=>{l.addClass("anim-fade-out"),setTimeout(()=>{l.remove()},200)};o>0&&(a=setTimeout(()=>{r()},o)),l.click(()=>{r(),clearTimeout(a)})}}}).call(this,i("EVdn"))},"N1+O":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("1eT2"),o=i("n0eM"),n=i("J66h"),a=i("6yn5"),l=i("qjsi");class r{static init(){t(a.html`
+ `).prependTo(o),r=()=>{l.addClass("anim-fade-out"),setTimeout(()=>{l.remove()},200)};n>0&&(a=setTimeout(()=>{r()},n)),l.click(()=>{r(),clearTimeout(a)})}}}).call(this,i("EVdn"))},"N1+O":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("1eT2"),n=i("n0eM"),o=i("J66h"),a=i("6yn5"),l=i("qjsi");class r{static init(){t(a.html`
- `).appendTo(this.sel.nav),l.default()}static setTitle(e,i){"boolean"==typeof i&&!0===i&&(e=n.Base64.decode(e));let s=this.sel.navTitle;t(s).addClass("changing"),setTimeout(()=>{t(s).text(e).removeClass("changing")},100)}static getTitle(){return t(this.sel.navTitle).text()}}r.sel={nav:".top-nav-bar",navTitle:".top-nav-bar .nav-title"},r.BtnBox=o.default,r.Panel=s.Panel,e.default=r}).call(this,i("EVdn"))},QSQ6:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("6yn5");e.default=class{static open(e,i,o,n){0!==t(".dialog-layer").length&&t(".dialog-layer").remove();let a=t('
').appendTo("body"),l=()=>{a.addClass("anim-fade-out"),setTimeout(()=>{a.hide()},200)},r=t(s.html`
+ `).appendTo(this.sel.nav),l.default()}static setTitle(e,i){"boolean"==typeof i&&!0===i&&(e=o.Base64.decode(e));let s=this.sel.navTitle;t(s).addClass("changing"),setTimeout(()=>{t(s).text(e).removeClass("changing")},100)}static getTitle(){return t(this.sel.navTitle).text()}}r.sel={nav:".top-nav-bar",navTitle:".top-nav-bar .nav-title"},r.BtnBox=n.default,r.Panel=s.Panel,e.default=r}).call(this,i("EVdn"))},QSQ6:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("6yn5");e.default=class{static open(e,i,n,o){0!==t(".dialog-layer").length&&t(".dialog-layer").remove();let a=t('
').appendTo("body"),l=()=>{a.addClass("anim-fade-out"),setTimeout(()=>{a.hide()},200)},r=t(s.html`
- `).appendTo(a);r.find(".dialog-content").append(i);let d=(e,i)=>{let s=t(".dialog-bottom");s.length||(s=t('
').appendTo(r));let o=t('
');o.text(e),o.click(()=>{l(),"function"==typeof i&&i()}),o.appendTo(s)};if(o&&d(o[0]||"确定",o[1]),n&&d(n[0]||"取消",n[1]),!o&&!n){let e=t('
');e.appendTo(r.find(".dialog-title")),e.click(()=>{l()})}return r}}}).call(this,i("EVdn"))},QTFu:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("4+HR"),o=i("6yn5"),n=i("hhHO");class a{static init(){this.dropdownDom=t(o.html`
+ `).appendTo(a);r.find(".dialog-content").append(i);let d=(e,i)=>{let s=t(".dialog-bottom");s.length||(s=t('
').appendTo(r));let n=t('
');n.text(e),n.click(()=>{l(),"function"==typeof i&&i()}),n.appendTo(s)};if(n&&d(n[0]||"确定",n[1]),o&&d(o[0]||"取消",o[1]),!n&&!o){let e=t('
');e.appendTo(r.find(".dialog-title")),e.click(()=>{l()})}return r}}}).call(this,i("EVdn"))},QTFu:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("4+HR"),n=i("6yn5"),o=i("hhHO");class a{static init(){this.dropdownDom=t(n.html`
- `).appendTo(this.sel.formToggle),this.dropdownSelectedDom=this.dropdownDom.find(".dropdown-selected"),this.dropdownOptionDom=this.dropdownDom.find(".dropdown-option"),this.dropdownBtnsDom=t('
').appendTo(this.sel.formToggle),this.dropdownSelectedDom.click(()=>{this.dropdownOptionShow()})}static dropdownOptionShow(){this.dropdownOptionDom.addClass("show"),setTimeout(()=>{t(document).bind("click.dropdown-option",e=>{t(e.target).is(".dropdown-option")||t(e.target).closest(".dropdown-option").length||this.dropdownOptionHide()})},20)}static dropdownOptionHide(){t(document).unbind("click.dropdown-option"),this.dropdownOptionDom.removeClass("show")}static newSpiderType(t,e){this.spiderList[t]={_NamespaceInfo:{label:e}}}static newSpider(t,e,i,s){if(!this.spiderList[t])throw Error("找不到该 Spider 类型:"+t);this.spiderList[t][e]={label:i,genForm:s}}static loadSpiderList(){for(let[e,i]of Object.entries(this.spiderList)){let s=t(`
${i._NamespaceInfo.label} `);s.appendTo(this.dropdownOptionDom),s.click(()=>{this.dropdownBtnsDom.html("");for(let[s,o]of Object.entries(i)){if("_"===s.substr(0,1))continue;let i=e+"."+s,n=t(`
${o.label} `).appendTo(this.dropdownBtnsDom);a.current.typeName&&a.current.typeName===i&&(this.dropdownBtnsDom.find("a").removeClass("active"),t(n).addClass("active")),n.click(()=>{a.formLoad(i),this.dropdownBtnsDom.find("a").removeClass("active"),n.addClass("active")})}this.dropdownSelectedDom.text(s.text()),this.dropdownSelectedDom.attr("data-namespace",e),this.dropdownOptionDom.find("li").removeClass("selected"),s.addClass("selected"),this.dropdownOptionHide()})}this.dropdownOptionDom.find("li:first-child").click(),this.dropdownBtnsDom.find("a:first-child").click()}static spiderListGet(t){let e=t.split(".")||null;if(!e||!e[0]||!e[1])return null;let i=e[0],s=e[1];return this.spiderList.hasOwnProperty(i)&&this.spiderList[i].hasOwnProperty(s)?this.spiderList[i][s]:null}static formLoad(e){if(!this.spiderListGet(e))throw Error("this.spiderList 中没有 "+e+",无法创建表单!");let i=this.spiderListGet(e),l=t(this.sel.form);l.html(""),this.current.typeName=null,this.current.inputs={},this.current.typeName=e,i.genForm(new n.default),t(o.html`
执行任务
`).appendTo(l).click(()=>!!a.formCheck()&&(s.default.createTask(e,i.label,l.find(":input").serializeArray()),!1))}static formCheck(){let e=!0;for(let[i,s]of Object.entries(a.current.inputs)){if(!s.inputSel||0===t(s.inputSel).length)throw Error(`表单输入元素 ${i} 的 Selector 无效`);let o=s.inputSel,n=t(o),a=t.trim(n.val().toString());if(""===a)return n.focus(),e=!1,!1;if(s.validator&&!s.validator(a))return n.addClass("has-error").focus(),n.bind("input propertychange",e=>{s.validator(t.trim(n.val().toString()))&&n.unbind("input propertychange").removeClass("has-error")}),e=!1,!1}return e}}a.sel={form:".taskgen-form",formToggle:".taskgen-form-toggle",formToggleDropdown:".taskgen-form-toggle .namespace-dropdown",formToggleBtns:".taskgen-form-toggle .classname-btns"},a.spiderList={},a.current={typeName:null,inputs:{}},e.default=a}).call(this,i("EVdn"))},SQQ2:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("d6E4"),o=i("4+HR"),n=i("6yn5");e.default=class{static init(){let t=s.default.Sidebar.register("taskManager");t.setTitle("任务列表","#4265c7"),t.setWidth(450),t.setInner('
')}static getItemSel(t){return'[data-taskmanager-taskid="'+t+'"]'}static addItem(e){if(!o.default.get(e))throw Error("未找到此任务 "+e);let i=o.default.get(e),s=t(n.html`
+ `).appendTo(this.sel.formToggle),this.dropdownSelectedDom=this.dropdownDom.find(".dropdown-selected"),this.dropdownOptionDom=this.dropdownDom.find(".dropdown-option"),this.dropdownBtnsDom=t('
').appendTo(this.sel.formToggle),this.dropdownSelectedDom.click(()=>{this.dropdownOptionShow()})}static dropdownOptionShow(){this.dropdownOptionDom.addClass("show"),setTimeout(()=>{t(document).bind("click.dropdown-option",e=>{t(e.target).is(".dropdown-option")||t(e.target).closest(".dropdown-option").length||this.dropdownOptionHide()})},20)}static dropdownOptionHide(){t(document).unbind("click.dropdown-option"),this.dropdownOptionDom.removeClass("show")}static newSpiderType(t,e){this.spiderList[t]={_NamespaceInfo:{label:e}}}static newSpider(t,e,i,s){if(!this.spiderList[t])throw Error("找不到该 Spider 类型:"+t);this.spiderList[t][e]={label:i,genForm:s}}static loadSpiderList(){for(let[e,i]of Object.entries(this.spiderList)){let s=t(`
${i._NamespaceInfo.label} `);s.appendTo(this.dropdownOptionDom),s.click(()=>{this.dropdownBtnsDom.html("");for(let[s,n]of Object.entries(i)){if("_"===s.substr(0,1))continue;let i=e+"."+s,o=t(`
${n.label} `).appendTo(this.dropdownBtnsDom);a.current.typeName&&a.current.typeName===i&&(this.dropdownBtnsDom.find("a").removeClass("active"),t(o).addClass("active")),o.click(()=>{a.formLoad(i),this.dropdownBtnsDom.find("a").removeClass("active"),o.addClass("active")})}this.dropdownSelectedDom.text(s.text()),this.dropdownSelectedDom.attr("data-namespace",e),this.dropdownOptionDom.find("li").removeClass("selected"),s.addClass("selected"),this.dropdownOptionHide()})}this.dropdownOptionDom.find("li:first-child").click(),this.dropdownBtnsDom.find("a:first-child").click()}static spiderListGet(t){let e=t.split(".")||null;if(!e||!e[0]||!e[1])return null;let i=e[0],s=e[1];return this.spiderList.hasOwnProperty(i)&&this.spiderList[i].hasOwnProperty(s)?this.spiderList[i][s]:null}static formLoad(e){if(!this.spiderListGet(e))throw Error("this.spiderList 中没有 "+e+",无法创建表单!");let i=this.spiderListGet(e),l=t(this.sel.form);l.html(""),this.current.typeName=null,this.current.inputs={},this.current.typeName=e,i.genForm(new o.default),t(n.html`
执行任务
`).appendTo(l).click(()=>!!a.formCheck()&&(s.default.createTask(e,i.label,l.find(":input").serializeArray()),!1))}static formCheck(){let e=!0;for(let[i,s]of Object.entries(a.current.inputs)){if(!s.inputSel||0===t(s.inputSel).length)throw Error(`表单输入元素 ${i} 的 Selector 无效`);let n=s.inputSel,o=t(n),a=t.trim(o.val().toString());if(""===a)return o.focus(),e=!1,!1;if(s.validator&&!s.validator(a))return o.addClass("has-error").focus(),o.bind("input propertychange",e=>{s.validator(t.trim(o.val().toString()))&&o.unbind("input propertychange").removeClass("has-error")}),e=!1,!1}return e}}a.sel={form:".taskgen-form",formToggle:".taskgen-form-toggle",formToggleDropdown:".taskgen-form-toggle .namespace-dropdown",formToggleBtns:".taskgen-form-toggle .classname-btns"},a.spiderList={},a.current={typeName:null,inputs:{}},e.default=a}).call(this,i("EVdn"))},SQQ2:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const s=i("d6E4"),n=i("4+HR"),o=i("6yn5");e.default=class{static init(){let t=s.default.Sidebar.register("taskManager");t.setTitle("任务列表","#4265c7"),t.setWidth(450),t.setInner('
')}static getItemSel(t){return'[data-taskmanager-taskid="'+t+'"]'}static addItem(e){if(!n.default.get(e))throw Error("未找到此任务 "+e);let i=n.default.get(e),s=t(o.html`
-
`);s.find('[data-toggle="task-show"]').click(()=>{o.default.show(e)}),s.find('[data-toggle="task-remove"]').click(()=>{o.default.get(e).remove()}),s.prependTo(this.getLayer().getElem().find(".task-manager"))}static removeItem(e){if(0===t(this.getItemSel(e)).length)throw Error(`未找到此任务 ${e}`);setTimeout(()=>{t(this.getItemSel(e)).remove()},20)}static toggleLayer(){this.getLayer().toggle()}static getLayer(){return s.default.Sidebar.get("taskManager")}}}).call(this,i("EVdn"))},TN56:function(t,e,i){(function(t){!function(t){var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};e.VERSION="3.3.7",e.TRANSITION_DURATION=150,e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'