← Back
Editing: advanced-legacy2.js
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function n(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */n=function(){return r};var e,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new G(n||[]);return a(i,"_invoke",{value:k(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var v="suspendedStart",d="suspendedYield",m="executing",y="completed",g={};function w(){}function b(){}function _(){}var x={};f(x,l,(function(){return this}));var j=Object.getPrototypeOf,O=j&&j(j(N([])));O&&O!==o&&i.call(O,l)&&(x=O);var L=_.prototype=w.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(e,r){function n(o,a,c,l){var u=p(e[o],e,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,l)}),(function(t){n("throw",t,c,l)})):r.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,l)}))}l(u.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=v;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=S(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=p(t,r,n);if("normal"===u.type){if(o=n.done?y:d,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function S(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function V(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(V,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=_,a(L,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:b,configurable:!0}),b.displayName=f(_,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},E(P.prototype),f(P.prototype,u,(function(){return this})),r.AsyncIterator=P,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new P(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(L),f(L,s,"Generator"),f(L,l,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}function o(e,r,n){return(r=function(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function i(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function c(t){i(a,n,o,c,l,"next",t)}function l(t){i(a,n,o,c,l,"throw",t)}c(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./site-legacy.js?v=VERSION_NUMBER","./useStore-legacy4.js?v=VERSION_NUMBER","./useController-legacy6.js?v=VERSION_NUMBER","./masker.vue_vue_type_script_setup_true_lang-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./index-legacy130.js?v=VERSION_NUMBER","./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang-legacy.js?v=VERSION_NUMBER"],(function(t,e){"use strict";var i,c,l,u,s,f,h,p,v,d,m,y,g,w,b,_,x,j,O,L,E,P,k,S,V,C,G,N,U,D,T,F,I;return{setters:[function(t){i=t.ai,c=t.K,l=t.at,u=t.al,s=t.W,f=t.e},function(t){h=t.c,p=t.r,v=t.k,d=t.e,m=t.p,y=t.G,g=t.H,w=t.x,b=t.q,_=t.v,x=t.M,j=t.C,O=t.P,L=t.y,E=t.B,P=t.z,k=t.J,S=t.F,V=t.a_,C=t.al,G=t.a$},function(t){N=t.modifyPathConfig,U=t.modifyPathConfigBatch,D=t.getTamperRuleByPath},function(t){T=t.u},function(t){F=t.t},function(t){I=t._},null,null,null,null,null,null],execute:function(){var R=""+new URL("../icons/icon-site-create.svg",e.meta.url).href,B=""+new URL("../icons/icon-site-edit.svg",e.meta.url).href,q=""+new URL("../icons/icon-site-delete.svg",e.meta.url).href,z={class:"overall-config overall-config-top"},A={class:"overall-config-item"},H={class:"overall-config-item"},Y={class:"overall-config-item"},J={class:"mt-2rem"},K={class:"flex items-center"},M={class:"ml-[1rem] text-[#20a53a] mr-[.4rem] select-none"},W={key:0,class:"overall-config-content"},$={class:"overall-config-content-left"},Q={class:"overall-config-content-right"},X={class:"mr-1rem"},Z=h({__name:"advanced",props:{compData:{default:{}}},setup:function(t){var e=T().siteInfo,f=p("forbid"),h=p(!1),Z=p(!1),tt=v({create:["create","mkdir","link"],edit:["rename","chown","chmod","modify"],delete:["unlink","rmdir"]}),et=p({}),rt=p({create:!1,edit:!1,delete:!1}),nt=v({create:"创建",edit:"编辑",delete:"删除"}),ot=p([{label:"禁止功能",name:"forbid",lazy:!0,render:function(){return d("span",null,null)}}]),it=function(){var t=a(n().mark((function t(e,r){var a,l;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=o({value:e?1:0,path_id:et.value.pid},i(r)?"key":"batch",r),l=i(r)?N:U,t.next=4,c({loading:"正在修改配置,请稍后...",request:l(a),message:!0});case 4:t.sent.status&&at();case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),at=function(){var t=a(n().mark((function t(){var r,o,i,a,c;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,h.value=!0,t.next=4,D({path:e.value.path});case 4:if(r=t.sent,o=r.data,i=[],o){for(a in o)-1!==a.indexOf("is_")?i[a]=!!o[a]:i[a]=o[a];for(c in et.value=i,tt)rt.value[c]=tt[c].some((function(t){return o["is_".concat(t)]}))}t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),l(t.t0);case 13:return t.prev=13,h.value=!1,t.finish(13);case 16:case"end":return t.stop()}}),t,null,[[0,10,13,16]])})));return function(){return t.apply(this,arguments)}}();return m((function(){at()})),function(t,e){var n,o=u,i=C,a=G,c=s,l=y("bt-loading");return g((b(),_("div",null,[null!==(n=w(et))&&void 0!==n&&n.path?j("",!0):(b(),x(I,{key:0,compData:r(r({},t.compData),{},{init:at})},null,8,["compData"])),d(o,{ref:"tamperRef",type:"",modelValue:w(f),"onUpdate:modelValue":e[0]||(e[0]=function(t){return O(f)?f.value=t:null}),options:w(ot)},null,8,["modelValue","options"]),L("div",z,[L("div",A,[e[8]||(e[8]=L("img",{class:"mr-[.6rem]",width:"16",src:R,alt:""},null,-1)),e[9]||(e[9]=L("span",{class:"mr-1rem"},"拦截创建",-1)),d(i,{modelValue:w(rt).create,"onUpdate:modelValue":e[1]||(e[1]=function(t){return w(rt).create=t}),onChange:e[2]||(e[2]=function(t){return it(w(rt).create,1)})},null,8,["modelValue"])]),d(a,{direction:"vertical",class:"!h-2rem !mx-1.6rem"}),L("div",H,[e[10]||(e[10]=L("img",{class:"mr-[.6rem]",width:"16",src:B,alt:""},null,-1)),e[11]||(e[11]=L("span",{class:"mr-1rem"},"拦截编辑",-1)),d(i,{modelValue:w(rt).edit,"onUpdate:modelValue":e[3]||(e[3]=function(t){return w(rt).edit=t}),onChange:e[4]||(e[4]=function(t){return it(w(rt).edit,2)})},null,8,["modelValue"])]),d(a,{direction:"vertical",class:"!h-2rem !mx-1.6rem"}),L("div",Y,[e[12]||(e[12]=L("img",{class:"mr-[.6rem]",width:"16",src:q,alt:""},null,-1)),e[13]||(e[13]=L("span",{class:"mr-1rem"},"拦截删除",-1)),d(i,{modelValue:w(rt).delete,"onUpdate:modelValue":e[5]||(e[5]=function(t){return w(rt).delete=t}),onChange:e[6]||(e[6]=function(t){return it(w(rt).delete,3)})},null,8,["modelValue"])])]),L("div",J,[L("div",K,[e[14]||(e[14]=E(" 开启高级设置 ")),L("div",{class:"more flex items-center cursor-pointer pl-[1rem]",onClick:e[7]||(e[7]=function(t){return Z.value=!w(Z)})},[L("div",M,P("".concat(w(Z)?"折叠":"详情")),1),L("i",{class:k(["text-[16px]",w(Z)?"svgtofont-el-arrow-up":"svgtofont-el-arrow-down"])},null,2)])]),w(Z)?(b(),_("div",W,[(b(!0),_(S,null,V(w(tt),(function(t,e){return b(),_("div",{class:"overall-config-content-item",key:e},[L("div",$,"拦截"+P(w(nt)[e]),1),L("div",Q,[(b(!0),_(S,null,V(t,(function(t,e){return b(),_("div",{class:"overall-config-item",key:e},[L("span",X,"拦截"+P(w(F)[t]),1),d(i,{modelValue:w(et)["is_".concat(t)],"onUpdate:modelValue":function(e){return w(et)["is_".concat(t)]=e},onChange:function(e){return it(w(et)["is_".concat(t)],"is_".concat(t))}},null,8,["modelValue","onUpdate:modelValue","onChange"])])})),128))])])})),128))])):j("",!0)]),d(c,{class:"mt-2rem",options:[{content:"提示:当前配置默认拦截以上规则,请根据当前项目需求设置和配置规则"}]})])),[[l,w(h)],[l,"正在获取站点防篡改信息,请稍侯","title"]])}}});t("default",f(Z,[["__scopeId","data-v-f8e2d238"]]))}}}))}();
Save File
Cancel