← Back
Editing: index-legacy402.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 o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(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 o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return r};var e,r={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.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 p(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new B(n||[]);return a(i,"_invoke",{value:P(t,r,u)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var v="suspendedStart",d="suspendedYield",y="executing",m="completed",g={};function b(){}function w(){}function x(){}var j={};f(j,c,(function(){return this}));var O=Object.getPrototypeOf,k=O&&O(O(N([])));k&&k!==n&&i.call(k,c)&&(j=k);var _=x.prototype=b.prototype=Object.create(j);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(e,r){function n(o,a,u,c){var s=h(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,c)}))}c(s.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 P(t,r,n){var o=v;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=h(t,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.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=h(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 C(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];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 w.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},r.awrap=function(t){return{__await:t}},L(E.prototype),f(E.prototype,s,(function(){return this})),r.AsyncIterator=E,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new E(p(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(_),f(_,l,"Generator"),f(_,c,(function(){return this})),f(_,"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,B.prototype={constructor:B,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(T),!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 u.type="throw",u.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],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)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),T(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;T(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 i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).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 u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)}))}}System.register(["./index-legacy103.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./utils-lib-legacy.js?v=VERSION_NUMBER","./useMethod-legacy5.js?v=VERSION_NUMBER","./form-item-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./index-legacy482.js?v=VERSION_NUMBER"],(function(t,e){"use strict";var n,i,u,c,s,l,f,p,h,v,d,y,m,g,b,w,x,j,O,k,_,L,E,P,S,C,T,B,N,R,q,F,G,D,z,I,A,M,V,Y;return{setters:[function(t){n=t._},function(t){i=t.j,u=t.k,c=t.r,s=t.s,l=t.e,f=t.B,p=t.g,h=t.al,v=t.a5,d=t.c,y=t.q,m=t.v,g=t.A,b=t.x,w=t.D},function(t){x=t.n,j=t.L,O=t.p,k=t.K,_=t.M,L=t.u,E=t.a6,P=t.cu,S=t.a7},function(t){C=t.p,T=t.q,B=t.r,N=t.t,R=t.v,q=t.w,F=t.x,G=t.y,D=t.z,z=t.A},function(t){I=t.b},function(t){A=t.u,M=t.a},function(t){V=t._},function(t){Y=t.B}],execute:function(){var H=t("u",i("WP-SETS-STORE",(function(){var t=u({name:""}),e=u({id:0,type:1}),r=u({p:1,p_size:999,keyword:"",set_id:0}),n=c(!1),o=c(!1),i=c(!1);return{createFormData:t,wpSetsPluginOrTheme:e,pluginOrThemePamra:r,isRefreshInstallList:n,isRefreshPluginOrThemeList:o,isRefreshSetsList:i,resetCreateFormData:function(){t.name=""}}}))),J=s(H()),K=J.wpSetsPluginOrTheme,U=J.pluginOrThemePamra,W=(J.isRefreshInstallList,J.isRefreshPluginOrThemeList),Q=J.isRefreshSetsList,X=function(){var t=a(o().mark((function t(e){var r,n,i,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,C({keyword:e.search,p_size:e.limit,p:e.p});case 3:return r=t.sent,n=r.data,i=n.list,a=n.total,t.abrupt("return",{data:i,total:a});case 10:return t.prev=10,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0,other:{search_history:[]}});case 14:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e){return t.apply(this,arguments)}}(),Z=function(){return[{label:"名称",isCustom:!0,prop:"name",render:function(t){return l("span",null,[t.name])}},{label:"插件",isCustom:!0,prop:"plugins",render:function(t){return l("span",{class:"bt-link",onClick:function(){tt(t,1)}},["".concat(t.plugins.length," 条(添加插件)")])}},{label:"主题",isCustom:!0,prop:"themes",render:function(t){return l("span",{class:"bt-link",onClick:function(){tt(t,2)}},["".concat(t.themes.length," 条(添加主题)")])}},A((function(t){return[{render:function(t){return l("div",{class:"inline-block"},[0===t.plugins.length&&0===t.themes.length?l("span",{class:"text-[#999]",style:"cursor:not-allowed"},[f("安装")]):l("span",{class:"bt-link",onClick:function(){K.value.id=t.id,x({title:"选择网站",area:45,btn:!0,confirmText:"安装",component:function(){return j((function(){return e.import("./install-set-legacy.js?v=VERSION_NUMBER")}),void 0,e.meta.url)}})}},[f("安装")]),l(V,null,null)])}},{render:function(t){return l("span",{class:"bt-link",onClick:function(){var e;O({title:"删除【".concat(t.name,"】"),content:"您确定要删除此组吗?",onConfirm:(e=a(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k({request:T({set_id:t.id}),loading:"正在删除中...",message:!0,success:function(){Q.value=!0}});case 2:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}},[f("删除")])}}]}))]},$=function(){x({title:"创建集合包",area:48,btn:!0,component:function(){return j((function(){return e.import("./created-set-legacy.js?v=VERSION_NUMBER")}),void 0,e.meta.url)}})},tt=(t("b",(function(t){var e={class:"!w-[280px]",clearable:!0};return p((function(){return[I("名称","name",{attrs:r(r({},e),{},{placeholder:"请输入集合名称"}),rules:[{required:!0,message:"集合名称不能为空",trigger:"blur"}]})]}))})),function(t,r){K.value={id:t.id,type:r},x({title:"".concat(1===r?"添加插件":"添加主题","-【请先搜索后勾选需要的").concat(1===r?"插件":"主题","】"),area:60,component:function(){return j((function(){return e.import("./edit-set-legacy.js?v=VERSION_NUMBER")}),void 0,e.meta.url)}})}),et=(t("d",function(){var t=a(o().mark((function t(e){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,B({set_id:K.value.id,type:K.value.type});case 3:return r=t.sent,n=r.data.msg,t.abrupt("return",{data:n,total:0});case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0,other:{search_history:[]}});case 12:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}()),t("e",(function(){return[{label:"名称",isCustom:!0,prop:"title"},{label:"状态",prop:"state",width:80,render:function(t){return l(h,{modelValue:t.state,"onUpdate:modelValue":function(e){return t.state=e},size:"small","active-value":1,"inactive-value":0,onChange:function(e){k({request:N({item_ids:t.id,state:e?1:0,type:K.value.type}),loading:"正在设置中...",message:!0,success:function(){W.value=!0}})}},null)}},A([{title:"删除",onClick:(t=a(o().mark((function t(e){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k({request:R({item_ids:e.id,type:K.value.type}),loading:"正在删除中...",message:!0,success:function(){W.value=!0,Q.value=!0}});case 1:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}])];var t})),t("h",(function(){return[M({key:"name"}),{label:"名称",isCustom:!0,prop:"name"},{label:"等级",isCustom:!0,prop:"title",render:function(t){return l(Y,{modelValue:Number((t.rating/20).toFixed(0)),disabled:!0,"allow-half":!0,class:"!text-[2rem]"},null)}}]})),t("f",function(){var t=a(o().mark((function t(e){var r,n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e.search){t.next=3;break}return t.abrupt("return");case 3:if(r=_.load("正在加载..."),U.value.keyword=e.search,U.value.set_id=K.value.id,1!==K.value.type){t.next=12;break}return t.next=9,q(v(U.value));case 9:t.t0=t.sent,t.next=15;break;case 12:return t.next=14,F(v(U.value));case 14:t.t0=t.sent;case 15:return n=t.t0,i=n.data.msg.list,t.abrupt("return",{data:i,total:0});case 20:return t.prev=20,t.t1=t.catch(0),t.abrupt("return",{data:[],total:0});case 24:return t.prev=24,r&&r.close(),t.finish(24);case 27:case"end":return t.stop()}}),t,null,[[0,20,24,27]])})));return function(e){return t.apply(this,arguments)}}()),t("o",function(){var t=a(o().mark((function t(e){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(U.value.keyword&&null!=e&&e.length){t.next=4;break}return _.error("请选一个主题或插件以添加"),t.abrupt("return");case 4:return r=e.map((function(t){return{slug:t.slug,title:t.name,description:1===K.value.type?t.short_description:t.description}})),t.next=7,G({set_id:K.value.id,items:JSON.stringify(r),type:K.value.type});case 7:W.value=!0,Q.value=!0;case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t("g",function(){var t=a(o().mark((function t(e){var r,n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,D();case 3:return r=t.sent,n=r.data.msg,t.abrupt("return",{data:n,total:0});case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0});case 12:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}()),t("a",(function(){return[M(),{label:"名称",isCustom:!0,prop:"name"}]})),t("c",function(){var t=a(o().mark((function t(e,r){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=e.map((function(t){return t.id})).join(","),t.next=4,k({loading:"正在安装,请稍后...",message:!0,request:z({set_id:K.value.id,site_ids:n}),success:function(t){t.status&&r&&r()}});case 4:t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",!1);case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(e,r){return t.apply(this,arguments)}}()),{class:"p-[2rem]"}),rt=d({__name:"index",setup:function(t){var e=L().mainHeight,r=s(H()).isRefreshSetsList,o=E({request:function(t){return X(t)},columns:Z(),extension:[P("search",{name:"wp-sets",list:[]}),S(r)]}),i=o.BtTable,a=o.BtPage,u=(o.BtRecommendSearch,o.BtRefresh,o.BtColumn,o.BtBatch),c=(o.BtTableCategory,o.BtErrorMask,o.tableRef,o.classList,o.refresh,o.BtSearch);return function(t,r){var o=w,s=n;return y(),m("div",et,[l(s,null,{"header-left":g((function(){return[l(o,{type:"primary",size:"default",onClick:b($)},{default:g((function(){return r[0]||(r[0]=[f("创建集合包")])})),_:1},8,["onClick"])]})),"header-right":g((function(){return[l(b(c),{type:"wp-sets",placeholder:"搜索",class:"!w-[270px] mr-[10px]"})]})),content:g((function(){return[l(b(i),{"min-height":b(e)},null,8,["min-height"])]})),"footer-left":g((function(){return[l(b(u))]})),"footer-right":g((function(){return[l(b(a))]})),_:1})])}}}),nt=Object.freeze(Object.defineProperty({__proto__:null,default:rt},Symbol.toStringTag,{value:"Module"}));t("i",nt)}}}))}();
Save File
Cancel