File: /www/server/panel/BTPanel/static/js/controller-legacy.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(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",u=r.toStringTag||"@@toStringTag";function c(r,n,o,u){var c=n&&n.prototype instanceof f?n:f,l=Object.create(c.prototype);return i(l,"_invoke",function(r,n,o){var i,u,c,f=0,l=o||[],s=!1,p={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(e,r){return i=e,u=0,c=t,p.n=r,a}};function v(r,n){for(u=r,c=n,e=0;!s&&f&&!o&&e<l.length;e++){var o,i=l[e],v=p.p,y=i[2];r>3?(o=y===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=v&&((o=r<2&&v<i[1])?(u=0,p.v=n,p.n=i[1]):v<y&&(o=r<3||i[0]>n||n>y)&&(i[4]=r,i[5]=n,p.n=y,u=0))}if(o||r>1)return a;throw s=!0,n}return function(o,l,y){if(f>1)throw TypeError("Generator is already running");for(s&&1===l&&v(l,y),u=l,c=y;(e=u<2?t:c)||!s;){i||(u?u<3?(u>1&&(p.n=-1),v(u,c)):p.n=c:p.v=c);try{if(f=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(s=p.n<0)?c:r.call(n,p))!==a)break}catch(e){i=t,u=1,c=e}finally{f=1}}return{value:e,done:s}}}(r,o,u),!0),l}var a={};function f(){}function l(){}function s(){}e=Object.getPrototypeOf;var p=[][n]?e(e([][n]())):(i(e={},n,function(){return this}),e),v=s.prototype=f.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,i(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t}return l.prototype=s,i(v,"constructor",s),i(s,"constructor",l),l.displayName="GeneratorFunction",i(s,u,"GeneratorFunction"),i(v),i(v,u,"Generator"),i(v,n,function(){return this}),i(v,"toString",function(){return"[object Generator]"}),(o=function(){return{w:c,m:y}})()}function i(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}i=function(t,e,r,n){function u(e,r){i(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(u("next",0),u("throw",1),u("return",2))},i(t,e,r,n)}function u(t,e,r,n,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void r(t)}c.done?e(a):Promise.resolve(a).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function c(t){u(i,n,o,c,a,"next",t)}function a(t){u(i,n,o,c,a,"throw",t)}c(void 0)})}}System.register(["./utils-lib-legacy.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./useStore-legacy.js?v=1777008528"],function(t,e){"use strict";var n,i,u,a,f,l,s,p,v,y;return{setters:[function(t){n=t.c,i=t.M,u=t.k,a=t.cq,f=t.cr,l=t.cs,s=t.ct,p=t.m},function(t){v=t.r},function(t){y=t.g}],execute:function(){var e=n().isRefreshMenu,h=t("m",v([])),b=(t("h",function(){var t=c(o().m(function t(r){var n,c,f,l;return o().w(function(t){for(;;)switch(t.p=t.n){case 0:if(t.p=0,n={hide_list:JSON.stringify([r.id])},!r.parentId){t.n=1;break}if(n.site_menu=1,!(c=h.value.find(function(t){return t.id===r.parentId})).children){t.n=1;break}if(0!==c.children.filter(function(t){return t.show}).length||!c.show){t.n=1;break}return i.error("子项至少保留一个显示"),e.value=!0,t.a(2);case 1:if("memuAsite"!==r.id){t.n=2;break}if(f=h.value.find(function(t){return"memuAsite"===t.id}),0!==f.children.filter(function(t){return t.show}).length||!f.show){t.n=2;break}return i.error("请先开启任意一项网站子栏目"),e.value=!0,t.a(2);case 2:return t.n=3,u({request:a(n),message:!0,success:function(){e.value=!0;var t=y().refs.panelConfig,n=t.value.menuHide.indexOf(r.title);t.value.menuHide=n>-1?t.value.menuHide.split("、").filter(function(t){return t!==r.title}).join("、"):t.value.menuHide?"".concat(t.value.menuHide,"、").concat(r.title):r.title}});case 3:t.n=5;break;case 4:t.p=4,l=t.v,console.log(l);case 5:return t.a(2)}},t,null,[[0,4]])}));return function(e){return t.apply(this,arguments)}}()),function(t){return t.map(function(t){var e=t.id,r=t.title,n=t.show,o=t.children,i=s(e);return o=!(!o||!p(o))&&o.map(function(t){var r=t.id,n=t.title;return"proxy"===r&&(r="nginx"),{show:t.show,parentId:e,id:r,title:n}}),{name:i,title:r,show:n,id:e,children:o}})}),d=function(t,e){return t.map(function(t,n){var o,i=e[n];if(!i)return t;var u=null!==(o=t.children)&&void 0!==o&&o.length?t.children.map(function(t,e){return Array.isArray(i.children)&&i.children[e]?r(r({},t),{},{show:i.children[e].show}):t}):[];return r(r({},t),{},{show:i.show,children:u})})};t("u",c(o().m(function t(){var e,r;return o().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,u({request:f(),data:Array});case 1:return e=t.v,r=b(e),l.value=d(l.value,r),h.value=r,t.a(2,{data:r,total:r.length,other:{}});case 2:return t.p=2,t.v,h.value=[],t.a(2,{data:[],total:0,other:{}})}},t,null,[[0,2]])})))}}})}();