HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/panel/BTPanel/static/js/useController-legacy2.js
!function(){function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.toStringTag||"@@toStringTag";function c(e,a,o,i){var c=a&&a.prototype instanceof l?a:l,s=Object.create(c.prototype);return t(s,"_invoke",function(e,t,a){var o,i,c,l=0,s=a||[],f=!1,h={p:0,n:0,v:n,a:d,f:d.bind(n,4),d:function(e,t){return o=e,i=0,c=n,h.n=t,u}};function d(e,t){for(i=e,c=t,r=0;!f&&l&&!a&&r<s.length;r++){var a,o=s[r],d=h.p,p=o[2];e>3?(a=p===t)&&(c=o[(i=o[4])?5:(i=3,3)],o[4]=o[5]=n):o[0]<=d&&((a=e<2&&d<o[1])?(i=0,h.v=t,h.n=o[1]):d<p&&(a=e<3||o[0]>t||t>p)&&(o[4]=e,o[5]=t,h.n=p,i=0))}if(a||e>1)return u;throw f=!0,t}return function(a,s,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&d(s,p),i=s,c=p;(r=i<2?n:c)||!f;){o||(i?i<3?(i>1&&(h.n=-1),d(i,c)):h.n=c:h.v=c);try{if(l=2,o){if(i||(a="next"),r=o[a]){if(!(r=r.call(o,c)))throw TypeError("iterator result is not an object");if(!r.done)return r;c=r.value,i<2&&(i=0)}else 1===i&&(r=o.return)&&r.call(o),i<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),i=1);o=n}else if((r=(f=h.n<0)?c:e.call(t,h))!==u)break}catch(r){o=n,i=1,c=r}finally{l=1}}return{value:r,done:f}}}(e,o,i),!0),s}var u={};function l(){}function s(){}function f(){}r=Object.getPrototypeOf;var h=[][o]?r(r([][o]())):(t(r={},o,function(){return this}),r),d=f.prototype=l.prototype=Object.create(h);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,t(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=f,t(d,"constructor",f),t(f,"constructor",s),s.displayName="GeneratorFunction",t(f,i,"GeneratorFunction"),t(d),t(d,i,"Generator"),t(d,o,function(){return this}),t(d,"toString",function(){return"[object Generator]"}),(e=function(){return{w:c,m:p}})()}function t(e,n,r,a){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}t=function(e,n,r,a){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?o?o(e,n,{value:r,enumerable:!a,configurable:!a,writable:!a}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},t(e,n,r,a)}function n(e,t,n,r,a,o,i){try{var c=e[o](i),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,a)}function r(e){return function(){var t=this,r=arguments;return new Promise(function(a,o){var i=e.apply(t,r);function c(e){n(i,a,o,c,u,"next",e)}function u(e){n(i,a,o,c,u,"throw",e)}c(void 0)})}}System.register(["./base-lib-legacy.js?v=1777008528","./utils-lib-legacy.js?v=1777008528","./config-legacy.js?v=1777008528","./useStore-legacy.js?v=1777008528"],function(t,n){"use strict";var a,o,i,c,u,l,s,f,h,d,p,v,g,y,m,w,b,_,C,k,x,S;return{setters:[function(e){a=e.a7,o=e.r,i=e.g,c=e.aD},function(e){u=e.c,l=e.p,s=e.q,f=e.T,h=e.t,d=e.v,p=e.w,v=e.x,g=e.D,y=e.y,m=e.z,w=e.A,b=e.f,_=e.C},function(e){C=e.e,k=e.v,x=e.i},function(e){S=e.g}],execute:function(){t("u",function(){var t=S(),n=t.savaPanelTheme,O=t.getPanelTheme,I=u().globalTheme,T=b(),j=a(),A=o(!1),P=o(!1),z=o(l()),B=i(function(){return j.value?"dark":"light"}),E=c(function(){n()},500),G=function(e){_(I.value,e)},L=function(){var e,t,n,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(null===(e=I.value.interface)||void 0===e?void 0:e.bg_image)||"",o=I.value,i=null===(t=o.theme)||void 0===t?void 0:t.view,c=["/static/images/bg-default.png","/static/images/bg-main.png","/static/images/bg-main-dark.png"],u=null!==(n=null===(r=o.interface)||void 0===r?void 0:r.is_show_bg)&&void 0!==n&&n,l=!1;c.includes(a)&&("aapanel"===i&&a!==c[j.value?2:1]&&(a=c[j.value?2:1],u=!0,l=!0),"default"===i&&(a=c[0],u=!j.value,l=!0),l&&G({interface:{bg_image:a,is_show_bg:u}}),f.updateInterfaceBackgroundImage(a,u))},D=function(e,t){s(t,function(){try{var t,r=d(null===(t=I.value.theme)||void 0===t?void 0:t.color);["auto","light"].includes(e)&&"gold"===r&&(G({theme:{color:g.theme.color}}),T.warn("自动模式/亮色下不支持暗金色主题,已自动切换为默认颜色")),G({theme:{preset:e}}),f.updateThemePreset(e),j.value="auto"===e?"dark"===l():"dark"===e,L(),n()}catch(a){}},!0)},F=function(){var t=r(e().m(function t(n){var r;return e().w(function(e){for(;;)switch(e.n){case 0:try{V(n),r=n.url||"",L(r)}catch(t){}case 1:return e.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),N=i(function(){var e,t;return[{value:"default",label:"卡片模式",active:"default"===(null===(e=I.value.home)||void 0===e?void 0:e.overview_view),icon:'<rect x="2" y="2" width="9" height="7" rx="1" fill="currentColor" opacity="0.3" /><rect x="3" y="6" width="7" height="1.5" rx="0.5" fill="currentColor" /><rect x="13" y="2" width="9" height="7" rx="1" fill="currentColor" opacity="0.3" /><rect x="14" y="6" width="7" height="1.5" rx="0.5" fill="currentColor" /><rect x="2" y="13" width="9" height="7" rx="1" fill="currentColor" opacity="0.3" /><rect x="3" y="17" width="7" height="1.5" rx="0.5" fill="currentColor" /><rect x="13" y="13" width="9" height="7" rx="1" fill="currentColor" opacity="0.3" /><rect x="14" y="17" width="7" height="1.5" rx="0.5" fill="currentColor" />'},{value:"tile",label:"经典模式",active:"tile"===(null===(t=I.value.home)||void 0===t?void 0:t.overview_view),icon:'<circle cx="6" cy="6" r="4" fill="none" stroke="currentColor" stroke-width="1" opacity="0.3" /><path d="M 6 2 A 4 4 0 0 1 9.464 4.464" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" /><circle cx="18" cy="6" r="4" fill="none" stroke="currentColor" stroke-width="1" opacity="0.3" /><path d="M 18 2 A 4 4 0 1 1 14.536 7.464" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" /><circle cx="6" cy="18" r="4" fill="none" stroke="currentColor" stroke-width="1" opacity="0.3" /><path d="M 6 14 A 4 4 0 1 1 2.536 19.464" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" /><circle cx="18" cy="18" r="4" fill="none" stroke="currentColor" stroke-width="1" opacity="0.3" /><path d="M 18 14 A 4 4 0 0 1 21.464 16.464" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" />'}]}),R=function(){var t=r(e().m(function t(r,a){var o,i;return e().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,o=a?"恢复【".concat(a,"】默认配置,是否继续?"):"恢复所有默认配置,是否继续?",e.n=1,p({title:"恢复【"+(a||"所有")+"】默认配置",content:o});case 1:i=r?v(r):g,G(i),r||f.init(i),r&&"interface.bg_image"!==r||L(),n(!r),e.n=3;break;case 2:e.p=2,e.v;case 3:return e.a(2)}},t,null,[[0,2]])}));return function(e,n){return t.apply(this,arguments)}}(),M=function(){var t=r(e().m(function t(){var r;return e().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,p({content:"确认要恢复所有默认设置吗?此操作不可撤销。"});case 1:return r=JSON.parse(JSON.stringify(g)),Object.assign(I.value,r),G(r),e.n=2,n();case 2:e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},t,null,[[0,3]])}));return function(){return t.apply(this,arguments)}}(),V=function(e){if(e&&e.status){var t=e.url||"",r=y(e.type,t);G(r),n()}else T.error(e&&e.msg||"上传失败")},H=function(){var t=r(e().m(function t(){var n,r,a,o;return e().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!P.value){e.n=1;break}return e.a(2,T.success("正在导出配置,请稍候..."));case 1:return e.p=1,P.value=!0,T.success("正在准备导出配置..."),e.n=2,C();case 2:(n=e.v).status?(r=n.data.data).export_path?(T.success("正在下载配置文件..."),(a=document.createElement("a")).href="/download?filename=".concat(encodeURIComponent(r.export_path)),document.body.appendChild(a),a.click(),document.body.removeChild(a),T.success("配置导出成功!")):T.error("导出失败:无法获取导出文件路径"):(o=n.msg||"导出配置失败",T.error("导出失败:".concat(o))),e.n=4;break;case 3:e.p=3,e.v,T.error("导出配置失败");case 4:return e.p=4,P.value=!1,e.f(4);case 5:return e.a(2)}},t,null,[[1,3,4,5]])}));return function(){return t.apply(this,arguments)}}();return{importLoading:A,exportLoading:P,isDark:j,systemTheme:z,overviewViewOptions:N,handleImportConfig:function(t){if(A.value)return T.success("正在导入配置,请稍候...");try{var n=document.createElement("input");n.type="file",n.accept=".gz,.json",n.onchange=function(){var n=r(e().m(function n(r){var a,o,i,c,u,l,s,h,d,v;return e().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a=r.target.files[0]){e.n=1;break}return e.a(2);case 1:if(e.p=1,A.value=!0,T.success("正在处理文件..."),m(a,[".tar.gz"])){e.n=2;break}return e.a(2,T.error("只支持 .tar.gz 格式的文件"));case 2:return e.n=3,w(a,{path:"/tmp",name:a.name,useChunked:a.size>10485760,onProgress:function(e){return T.success("上传进度: ".concat(e,"%"))},onError:function(){T.error("文件上传失败")}});case 3:return e.n=4,k({file_path:"/tmp/".concat(a.name)});case 4:if((o=e.v).status){e.n=5;break}return T.error(o.msg||"文件验证失败"),e.a(2);case 5:return i=o.data,c="确定要导入此配置吗?这将覆盖当前的界面设置。\n\n",i.file_info&&(c+="文件信息:\n",c+="- 总文件数:".concat(i.file_info.total_files,"\n"),c+="- 配置文件:".concat(i.file_info.config_files,"\n"),c+="- 资源文件:".concat(i.file_info.resource_files,"\n")),e.n=6,p({title:"导入配置",content:c});case 6:return e.n=7,x({file_path:"/tmp/".concat(a.name),backup_existing:!0});case 7:if(!(u=e.v).status){e.n=9;break}return e.n=8,O();case 8:l=e.v,s=l.data,I.value=s.data,f.init(I.value),null!=t&&t.onSuccess&&t.onSuccess(),h=u.data,d="配置导入成功",null!=h&&h.import_info&&(d+=",已导入 ".concat(h.import_info.total_files," 个文件")),T.success(d),e.n=10;break;case 9:T.error(u.msg||"导入配置失败");case 10:e.n=13;break;case 11:if(e.p=11,!(v=e.v).message||!v.message.includes("用户取消")){e.n=12;break}return e.a(2);case 12:T.error("导入配置失败:"+(v.message||"文件处理错误"));case 13:return e.p=13,A.value=!1,e.f(13);case 14:return e.a(2)}},n,null,[[1,11,13,14]])}));return function(e){return n.apply(this,arguments)}}(),n.click()}catch(a){T.error("创建文件选择器失败"),A.value=!1}},handleExportConfig:H,handleRestoreDefault:R,handleRestoreAllDefaultsConfig:M,handleUploadImage:V,handleThemePresetChange:D,handleThemeViewChange:function(e){try{G("aapanel"===e?{sidebar:{opacity:80},interface:{content_opacity:80,bg_image_opacity:80,rounded:"large"},home:{overview_view:"tile"}}:{sidebar:{opacity:100},interface:{content_opacity:90,bg_image_opacity:20,rounded:"smaller"},home:{overview_view:"default"}}),G({theme:{view:e}}),f.updateThemeView(e),L(),n()}catch(t){}},handleThemeColorChange:function(e){try{var t,n=h(e),r=d(n);if(!n)return;if(G({theme:{color:n}}),["auto","light"].includes(null===(t=I.value.theme)||void 0===t?void 0:t.preset)&&"gold"===r)return D("dark"),void T.warn("自动模式/亮色下不支持暗金色主题,已自动切换为深色模式");f.updateThemeColor(n,B.value),E()}catch(a){}},handleSidebarColorChange:function(e){try{var t=h(e);if(!t)return;G({sidebar:{color:t}}),f.updateSidebarColor(t,B.value),E()}catch(n){}},handleSidebarOpacityChange:function(e){try{G({sidebar:{opacity:e}}),f.updateSidebarOpacity(e),E()}catch(t){}},handleInterfaceRadiusChange:function(e){try{G({interface:{rounded:e}}),f.updateInterfaceRadius(e,B.value),n()}catch(t){}},handleInterfaceBgShowChange:function(e){try{G({interface:{is_show_bg:e}}),L(),n()}catch(t){}},handleInterfaceBgImageChange:F,handleInterfaceBgImageOpacityChange:function(e){try{G({interface:{bg_image_opacity:e}}),f.updateInterfaceBgImageOpacity(e),E()}catch(t){}},handleInterfaceContentOpacityChange:function(e){try{G({interface:{content_opacity:e}}),f.updateInterfaceContentOpacity(e),E()}catch(t){}},handleInterfaceShadowColorChange:function(e){try{if(!e)return;G({interface:{shadow_color:e}}),f.updateInterfaceShadowColor(e),E()}catch(t){}},handleInterfaceShadowOpacityChange:function(e){try{var t=Array.isArray(e)?e[0]:e;G({interface:{shadow_opacity:t}}),f.updateInterfaceShadowOpacity(t),E()}catch(n){}},handleContainerWidthChange:function(e){try{G({interface:{container_width:e}}),n()}catch(t){}},handleOverviewViewChange:function(e){G({home:{overview_view:e}}),n()},handleHomeFontSizeChange:function(e){var t=Array.isArray(e)?e[0]:e;G({home:{overview_size:Number(t)}}),f.updateHomeFontSize(Number(t)),n()},handleLogoShowChange:function(){G({login:{is_show_logo:I.value.login.is_show_logo}}),n()},handleLoginBgShowChange:function(){G({login:{is_show_bg:I.value.login.is_show_bg}}),n()},handleLoginBgImageOpacityChange:function(e){var t=Array.isArray(e)?e[0]:e;G({login:{bg_image_opacity:t}}),E()},handleLoginContentOpacityChange:function(e){var t=Array.isArray(e)?e[0]:e;G({login:{content_opacity:t}}),E()},updateInterfaceShadowColor:function(e){f.updateInterfaceShadowColor(e)},updateThemeColor:function(e){e&&f.updateThemeColor(e,B.value)}}})}}})}();