System.register(["./admin-storage-legacy.9d4d7743.js","./sortable.esm-legacy.a574004a.js","./useCommon-legacy.ff7c2bc7.js","./index-legacy.492b6ebd.js","./storage-copy-legacy.05703ca0.js","./index-legacy.021508e8.js","./request-legacy.01567c6f.js"],(function(e){"use strict";var a,n,t,c,o,r,s,i,u,l,d,f,g;return{setters:[function(e){a=e.d,n=e.s,t=e.a,c=e.b,o=e.l,r=e.c},function(e){s=e.S},function(e){i=e.u},function(e){u=e.r,l=e.c},function(e){d=e.u},function(e){f=e.E},function(e){g=e.E}],execute:function(){e("u",(function(e){var i=function(a){e.push("/admin/storage-edit/"+a.id)},u=function(e){f.confirm("是否确认删除？","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",callback:function(n){"confirm"===n&&a(e.id).then((function(e){g.success("删除成功"),L()}))}})},d=function(a){e.push("/admin/storage-filter/"+a.id)},x=function(a){e.push("/admin/storage-readme/"+a.id)},C=function(a){e.push("/admin/storage-password/"+a.id)},k=function(e){f.confirm("是否确认".concat(e.enable?"停止":"启用","存储源。"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",callback:function(a){if("confirm"===a){var t=e.enable?"disable":"enable";n(e.id,t).then((function(){g.success((e.enable?"停止":"启用")+"成功"),e.enable=!e.enable}))}}})},S=function(e){m.value=e.id,b.value=!0},L=function(){v.value=!0,o().then((function(e){var a;p.value=e.data,a=document.querySelector(".storage-container"),s.create(a,{draggable:".storage-item",filter:".add-storage-btn",delay:h.value?300:0,onEnd:function(e){if(e.oldIndex!==e.newIndex){var a=p.value.splice(e.oldIndex,1)[0];p.value.splice(e.newIndex,0,a),r(p.value).then((function(){g.success("调整排序成功")}))}}}),v.value=!1}))},M=l((function(){return""===w.value?p.value:p.value.filter((function(e){return!!(e.name&&-1!==e.name.toLowerCase().indexOf(w.value.toLowerCase())||e.remark&&-1!==e.remark.toLowerCase().indexOf(w.value.toLowerCase())||e.type&&-1!==e.type.description.toLowerCase().indexOf(w.value.toLowerCase())||e.type&&-1!==e.type.key.toLowerCase().indexOf(w.value.toLowerCase()))}))}));return{init:L,loading:v,searchKey:w,storageListSearchResult:M,handleOperator:function(e){switch(e.operator){case"edit":i(e.storage);break;case"enable":k(e.storage);break;case"readmeManager":x(e.storage);break;case"cacheManager":S(e.storage);break;case"filterManager":d(e.storage);break;case"pwdManager":C(e.storage);break;case"delete":u(e.storage);break;case"copy":y(e.storage)}},addStorage:function(){e.push("/admin/storage-edit")},editStorage:i,deleteStorage:u,handleClose:function(e){f.confirm("是否确认关闭？关闭后填写的数据不会保留。",{type:"warning"}).then((function(a){e()})).catch((function(e){}))},showFilterPage:d,showReadmePage:x,showPasswordPage:C,switchEnableStatus:k,cacheManageVisible:b,currentCacheManageId:m,switchCacheEnableStatus:function(e){var a=e.enableCache?"enable":"disable";t(e.id,a).then((function(){g.success("修改成功")}))},switchCacheAutoRefreshStatus:function(e){var a=e.autoRefreshCache?"start":"stop";c(e.id,a).then((function(){g.success("修改成功")}))},cacheManage:S}}));var h=i().isMobile,b=u(!1),m=u(),v=u(!1),p=u([]),w=u(""),y=d().openDialog}}}));
