← Back
Editing: index-legacy439.js
!function(){function t(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function u(e,o,a,i){var u=o&&o.prototype instanceof l?o:l,f=Object.create(u.prototype);return r(f,"_invoke",function(e,r,o){var a,i,u,l=0,f=o||[],s=!1,p={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(n,e){return a=n,i=0,u=t,p.n=e,c}};function y(e,r){for(i=e,u=r,n=0;!s&&l&&!o&&n<f.length;n++){var o,a=f[n],y=p.p,h=a[2];e>3?(o=h===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=y&&((o=e<2&&y<a[1])?(i=0,p.v=r,p.n=a[1]):y<h&&(o=e<3||a[0]>r||r>h)&&(a[4]=e,a[5]=r,p.n=h,i=0))}if(o||e>1)return c;throw s=!0,r}return function(o,f,h){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&y(f,h),i=f,u=h;(n=i<2?t:u)||!s;){a||(i?i<3?(i>1&&(p.n=-1),y(i,u)):p.n=u:p.v=u);try{if(l=2,a){if(i||(o="next"),n=a[o]){if(!(n=n.call(a,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,i<2&&(i=0)}else 1===i&&(n=a.return)&&n.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((n=(s=p.n<0)?u:e.call(r,p))!==c)break}catch(n){a=t,i=1,u=n}finally{l=1}}return{value:n,done:s}}}(e,a,i),!0),f}var c={};function l(){}function f(){}function s(){}n=Object.getPrototypeOf;var p=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),y=s.prototype=l.prototype=Object.create(p);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,r(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t}return f.prototype=s,r(y,"constructor",s),r(s,"constructor",f),f.displayName="GeneratorFunction",r(s,i,"GeneratorFunction"),r(y),r(y,i,"Generator"),r(y,a,function(){return this}),r(y,"toString",function(){return"[object Generator]"}),(e=function(){return{w:u,m:h}})()}function r(t,n,e,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}r=function(t,n,e,o){function i(n,e){r(t,n,function(t){return this._invoke(n,e,t)})}n?a?a(t,n,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[n]=e:(i("next",0),i("throw",1),i("return",2))},r(t,n,e,o)}function o(t,n,e,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void e(t)}u.done?n(c):Promise.resolve(c).then(r,o)}function a(t){return function(){var n=this,e=arguments;return new Promise(function(r,a){var i=t.apply(n,e);function u(t){o(i,r,a,u,c,"next",t)}function c(t){o(i,r,a,u,c,"throw",t)}u(void 0)})}}System.register(["./utils-lib-legacy.js?v=1765440387","./index-legacy93.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./index-legacy91.js?v=1765440387","./firewall-legacy.js?v=1765440387","./column-legacy.js?v=1765440387","./validator-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387"],function(n,r){"use strict";var o,i,u,c,l,f,s,p,y,h,d,m,v,b,g,w,j,_,k,O,x,S,T,A,G,P,C,q;return{setters:[function(t){o=t.K,i=t.o,u=t.k,c=t.a0,l=t.W,f=t.b},function(t){s=t._},function(t){p=t.c,y=t.r,h=t.U,d=t.k,m=t.e,v=t.B,b=t.p,g=t.G,w=t.q,j=t.v,_=t.A,k=t.x,O=t.H,x=t.D},function(t){S=t._},function(t){T=t.bc,A=t.bd,G=t.be},function(t){P=t.a,C=t.c},function(t){q=t.f},null,null],execute:function(){var r={class:"p-[2rem]"};n("default",p({__name:"index",setup:function(n){var p=f(),E=y(),I=h([]),F=[{content:'注意:添加白名单目录要以"/"结尾'}],U=function(){var t=a(e().m(function t(n,r,o,i){var u,c,l;return e().w(function(t){for(;;)switch(t.n){case 0:return u=i.label,c=i.value,l=function(){var t=a(e().m(function t(n,r){var o,a,i;return e().w(function(t){for(;;)switch(t.n){case 0:o=n.path,a=n.type,i=c,t.n="delete"===i?1:3;break;case 1:return t.n=2,A({path:o,type:a});case 2:return t.a(2,t.v);case 3:return t.a(2)}},t)}));return function(n,e){return t.apply(this,arguments)}}(),t.n=1,n({title:"批量".concat(u,"白名单目录"),content:"批量".concat(u,"已选的白名单目录,是否继续操作!"),column:[{label:"路径",prop:"path"},C()],onConfirm:function(){var t=a(e().m(function t(){return e().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,r(l);case 1:return W(),t.a(2,!1)}},t)}));return function(){return t.apply(this,arguments)}}()});case 1:return t.a(2)}},t)}));return function(n,e,r,o){return t.apply(this,arguments)}}(),V=[{label:"删除",value:"delete",event:U}],H=d({path:"",type:"dir"}),W=function(){var n=a(e().m(function n(){return e().w(function(n){for(;;)switch(n.n){case 0:o({request:T(),success:function(n){Array.isArray(n.data)||(I.value=[].concat(t(n.data.dir.map(function(t){return{path:t,type:"dir",typeTitle:"目录"}})),t(n.data.file.map(function(t){return{path:t,type:"file",typeTitle:"文件"}}))))}});case 1:return n.a(2)}},n)}));return function(){return n.apply(this,arguments)}}(),B=function(){var t=a(e().m(function t(n){return e().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i({icon:"warning-filled",title:"删除白名单目录",width:"34rem",content:"删除白名单目录【"+n.path+"】,是否继续操作?"});case 1:o({request:A({path:n.path,type:n.type}),message:!0,loading:"正在删除白名单目录,请稍后...",success:W});case 2:return t.a(2)}},t)}));return function(n){return t.apply(this,arguments)}}(),D=function(){var t=a(e().m(function t(){return e().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,H.path){t.n=1;break}return p.error("请输入白名单目录"),t.a(2);case 1:return t.n=2,o({request:G({path:H.path}),message:!0,loading:"正在添加白名单目录,请稍后...",success:W});case 2:H.path="",t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},t,null,[[0,3]])}));return function(){return t.apply(this,arguments)}}(),K=[P(),{label:"路径",prop:"path",showOverflowTooltip:!0},{label:"类型",prop:"typeTitle"},{label:"操作",align:"right",fixed:"right",render:function(t){return m("span",{class:"bt-link",onClick:function(){return B(t)}},[v("删除")])}}];return b(function(){W()}),function(n,e){var o=S,a=x,i=u,f=c,p=s,y=l,h=g("bt-loading");return w(),j("div",r,[m(p,null,{"header-left":_(function(){return[m(o,{modelValue:k(H).path,"onUpdate:modelValue":e[0]||(e[0]=function(t){return k(H).path=t}),name:"path",placeholder:"选择目录/文件全路径",icon:"icon-file_mode",onIconClick:e[1]||(e[1]=function(t){q({type:"all",change:function(t,n){H.path=t,H.type=n,"dir"!==n||t.endsWith("/")||(H.path+="/")}})}),onChangePassive:e[2]||(e[2]=function(t){var n;H[n="path"]=H[n].replace(/\s+/g,"")}),width:"32rem"},null,8,["modelValue"]),m(a,{class:"!ml-[.8rem]",type:"primary",onClick:D},{default:_(function(){return t(e[3]||(e[3]=[v(" 添加 ",-1)]))}),_:1})]}),content:_(function(){return[O(m(i,{ref_key:"whiteList",ref:E,column:K,data:k(I),description:"白名单列表为空"},null,8,["data"]),[[h,"正在加载白名单列表,请稍后...","title"]])]}),"footer-left":_(function(){return[m(f,{"table-ref":k(E),options:V},null,8,["table-ref"])]}),_:1}),m(y,{options:F,class:"mx-[1.6rem] my-[0.6rem]"})])}}}))}}})}();
Save File
Cancel