File: /www/server/panel/BTPanel/static/js/index-legacy287.js
!function(){function e(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||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(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,n,o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function u(t,o,l,a){var u=o&&o.prototype instanceof i?o:i,s=Object.create(u.prototype);return r(s,"_invoke",function(t,r,o){var l,a,u,i=0,s=o||[],p=!1,m={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(n,t){return l=n,a=0,u=e,m.n=t,c}};function f(t,r){for(a=t,u=r,n=0;!p&&i&&!o&&n<s.length;n++){var o,l=s[n],f=m.p,d=l[2];t>3?(o=d===r)&&(u=l[(a=l[4])?5:(a=3,3)],l[4]=l[5]=e):l[0]<=f&&((o=t<2&&f<l[1])?(a=0,m.v=r,m.n=l[1]):f<d&&(o=t<3||l[0]>r||r>d)&&(l[4]=t,l[5]=r,m.n=d,a=0))}if(o||t>1)return c;throw p=!0,r}return function(o,s,d){if(i>1)throw TypeError("Generator is already running");for(p&&1===s&&f(s,d),a=s,u=d;(n=a<2?e:u)||!p;){l||(a?a<3?(a>1&&(m.n=-1),f(a,u)):m.n=u:m.v=u);try{if(i=2,l){if(a||(o="next"),n=l[o]){if(!(n=n.call(l,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,a<2&&(a=0)}else 1===a&&(n=l.return)&&n.call(l),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);l=e}else if((n=(p=m.n<0)?u:t.call(r,m))!==c)break}catch(n){l=e,a=1,u=n}finally{i=1}}return{value:n,done:p}}}(t,l,a),!0),s}var c={};function i(){}function s(){}function p(){}n=Object.getPrototypeOf;var m=[][l]?n(n([][l]())):(r(n={},l,function(){return this}),n),f=p.prototype=i.prototype=Object.create(m);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,r(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=p,r(f,"constructor",p),r(p,"constructor",s),s.displayName="GeneratorFunction",r(p,a,"GeneratorFunction"),r(f),r(f,a,"Generator"),r(f,l,function(){return this}),r(f,"toString",function(){return"[object Generator]"}),(t=function(){return{w:u,m:d}})()}function r(e,n,t,o){var l=Object.defineProperty;try{l({},"",{})}catch(e){l=0}r=function(e,n,t,o){function a(n,t){r(e,n,function(e){return this._invoke(n,t,e)})}n?l?l(e,n,{value:t,enumerable:!o,configurable:!o,writable:!o}):e[n]=t:(a("next",0),a("throw",1),a("return",2))},r(e,n,t,o)}function o(e,n,t,r,o,l,a){try{var u=e[l](a),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,o)}function l(e){return function(){var n=this,t=arguments;return new Promise(function(r,l){var a=e.apply(n,t);function u(e){o(a,r,l,u,c,"next",e)}function c(e){o(a,r,l,u,c,"throw",e)}u(void 0)})}}System.register(["./utils-lib-legacy.js?v=1777008528","./index-legacy206.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./index-legacy116.js?v=1777008528","./index-legacy175.js?v=1777008528","./site-legacy.js?v=1777008528","./useStore-legacy2.js?v=1777008528","./index-legacy3.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528","./index-legacy119.js?v=1777008528","./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang-legacy.js?v=1777008528"],function(n,r){"use strict";var o,a,u,c,i,s,p,m,f,d,v,h,y,_,b,g,w,j,k,V,x,C,P,O,H,S,U,I,A,G,T,q,F,E,B,M,N,R,z,K;return{setters:[function(e){o=e.k,a=e.w,u=e.cO,c=e.c7,i=e.K,s=e.f},function(e){p=e._},function(e){m=e.c,f=e.r,d=e.H,v=e.w,h=e.o,y=e.aH,_=e.j,b=e.k,g=e.p,w=e.C,j=e.v,k=e.x,V=e.y,x=e.q,C=e.e,P=e.F,O=e.B,H=e.s,S=e.Q,U=e.am,I=e.an,A=e.ad,G=e.z,T=e.G,q=e.ab},function(e){F=e._},function(e){E=e._},function(e){B=e.getComposerVersion,M=e.deleteComposerFile,N=e.execComposer,R=e.getComposerLine},function(e){z=e.u},function(e){K=e.w},null,null,null],execute:function(){var r={class:"p-1rem"},L={class:"flex items-center"},Q={key:0,class:"text-danger"},$={key:1,class:"text-danger text-small"},D={class:"mt-[8px] leading-8 text-small list-disc ml-[20px]"},J={key:0},W={class:"p-2rem h-50rem flex flex-col"},X={class:"mb-1rem"},Y={class:"flex-1 overflow-auto"};n("default",m({__name:"index",setup:function(n){var m,Z=z().siteInfo,ee=null===(m=Z.value)||void 0===m?void 0:m.project_type,ne=s(),te=f(!1),re=f(!1),oe=d({path:Z.value.path,user:"phpasync"!==ee?"www":"root",php:["静态","其它"].includes(Z.value.php_version)?"auto":"PHP-"+Z.value.php_version.replace(".",""),otherCommand:"",mirror:"https://mirrors.aliyun.com/composer/",command:"install",composerVersion:"install",version:"2.7.3",help_tips:"",comp_json:"",comp_lock:"",phpVersion:[],commandOptions:[{label:"install",value:"install"},{label:"update",value:"update"},{label:"require",value:"require"},{label:"create-project",value:"create-project"},{label:"自定义",value:""}]}),le=f("正在执行..."),ae=f(!1),ue=f(),ce=f(!1);v(function(){return Z.value},function(e){oe.php=["静态","其它"].includes(e.php_version)?"auto":"PHP-"+e.php_version.replace(".","")},{immediate:!0});var ie=function(){var e=l(t().m(function e(n){var r;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:return te.value=!0,e.p=1,e.n=2,B({path:n||Z.value.path});case 2:(r=e.v).data.status?(re.value=!1,oe.phpVersion=r.data.php_versions.filter(function(e){return"00"!==e.version}),oe.phpVersion.unshift({name:"自动选择",version:"auto"}),oe.comp_json=!1,oe.comp_lock=!1,"string"==typeof r.data.comp_json&&(oe.comp_json=r.data.comp_json),"string"==typeof r.data.comp_lock&&(oe.comp_lock=r.data.comp_lock)):(re.value=!0,ne.request(r)),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.p=4,te.value=!1,e.f(4);case 5:return e.a(2)}},e,null,[[1,3,4,5]])}));return function(n){return e.apply(this,arguments)}}(),se=function(){K({type:"dir",path:oe.path,change:function(e){oe.path=e,ie(oe.path)}})},pe=function(){var e=l(t().m(function e(){return t().w(function(e){for(;;)switch(e.n){case 0:o({loading:"正在删除,请稍后...",request:M({path:oe.path+"/composer.lock"}),message:!0,success:function(e){e.status&&ie(oe.path)}});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),me=function(){var e=l(t().m(function e(){return t().w(function(e){for(;;)switch(e.n){case 0:ue.value=setInterval(l(t().m(function e(){return t().w(function(e){for(;;)switch(e.n){case 0:try{de()}catch(n){clearInterval(ue.value)}case 1:return e.a(2)}},e)})),2e3);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=l(t().m(function e(){var n,r;return t().w(function(e){for(;;)switch(e.n){case 0:return r={php_version:null===(n=oe.php)||void 0===n?void 0:n.replace("PHP-",""),composer_args:oe.command,composer_cmd:oe.otherCommand,repo:oe.mirror,path:oe.path,user:oe.user,composer_version:oe.version,siteName:Z.value.name},e.n=1,a({title:"执行composer命令",content:"即将执行设定的composer命令,继续吗?",icon:"warning-filled"});case 1:o({loading:"正在执行,请稍后...",request:N(r),message:!0,success:function(e){e.status&&(ae.value=!0,me())}});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),de=function(){var e=l(t().m(function e(){var n,r,o=arguments;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=o.length>0&&void 0!==o[0]&&o[0],e.p=1,e.n=2,R({filename:"/tmp/composer_".concat(Z.value.name,".log"),num:100});case 2:r=e.v,le.value=r.data.msg,n&&ne.success("刷新成功"),e.n=4;break;case 3:e.p=3,e.v;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}(),ve=function(){ce.value=!0,de()},he=function(){clearInterval(ue.value),ae.value=!1,ce.value=!1,le.value=""};return h(function(){ie()}),y(function(){clearInterval(ue.value)}),function(n,t){var o=E,l=U,a=I,s=A,m=u,f=F,d=c,v=G,h=T,y=q,B=p,M=i;return _(),b("div",null,[g(re)?(_(),w(o,{key:0},{content:j(function(){return e(t[11]||(t[11]=[k(" 没有找到可用的composer版本 ",-1)]))}),_:1})):V("",!0),x("div",r,[C(y,{model:g(oe)},{default:j(function(){return[C(s,{label:"Composer版本"},{default:j(function(){return[x("div",L,[C(a,{modelValue:g(oe).version,"onUpdate:modelValue":t[0]||(t[0]=function(e){return g(oe).version=e}),class:"!w-[24rem]"},{default:j(function(){return[C(l,{label:"2.7.3",value:"2.7.3"}),C(l,{label:"1.10.27",value:"1.10.27"})]}),_:1},8,["modelValue"])])]}),_:1}),C(s,{label:"PHP版本"},{default:j(function(){return["phpasync"!==g(ee)?(_(),w(a,{key:0,class:"!w-[24rem]",modelValue:g(oe).php,"onUpdate:modelValue":t[1]||(t[1]=function(e){return g(oe).php=e})},{default:j(function(){return[(_(!0),b(P,null,O(g(oe).phpVersion,function(e,n){return _(),w(l,{key:n,label:e.name,value:e.version},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"])):(_(),w(m,{key:1,modelValue:g(oe).php,"onUpdate:modelValue":t[2]||(t[2]=function(e){return g(oe).php=e}),disabled:"",width:"24rem"},null,8,["modelValue"]))]}),_:1}),C(s,{label:"执行参数"},{default:j(function(){return[C(a,{class:"!w-[24rem]","empty-values":[null,void 0],modelValue:g(oe).command,"onUpdate:modelValue":t[3]||(t[3]=function(e){return g(oe).command=e})},{default:j(function(){return[(_(!0),b(P,null,O(g(oe).commandOptions,function(e,n){return _(),w(l,{key:n,label:e.label,value:e.value},null,8,["label","value"])}),128))]}),_:1},8,["modelValue"])]}),_:1}),C(s,{label:"补充命令"},{default:j(function(){return[C(m,{modelValue:g(oe).otherCommand,"onUpdate:modelValue":t[4]||(t[4]=function(e){return g(oe).otherCommand=e}),placeholder:"请输入补充命令",width:"24rem"},null,8,["modelValue"])]}),_:1}),C(s,{label:"镜像源"},{default:j(function(){return[C(a,{modelValue:g(oe).mirror,"onUpdate:modelValue":t[5]||(t[5]=function(e){return g(oe).mirror=e}),filterable:"","allow-create":"","default-first-option":"",class:"!w-[24rem]"},{default:j(function(){return[C(l,{label:"阿里云(mirrors.aliyun.com)",value:"https://mirrors.aliyun.com/composer/"}),C(l,{label:"官方源(packagist.org)",value:"repos.packagist"}),C(l,{label:"中国全量镜像(packagist.phpcomposer.com)",value:"https://packagist.phpcomposer.com"}),C(l,{label:"Packagist Mirror(packagist.mirrors.sjtug.sjtu.edu.cn)",value:"https://packagist.mirrors.sjtug.sjtu.edu.cn"}),C(l,{label:"腾讯源(mirrors.tencent.com)",value:"https://mirrors.tencent.com/composer/"}),C(l,{label:"华为云(mirrors.huaweicloud.com)",value:"https://mirrors.huaweicloud.com/repository/php/"})]}),_:1},8,["modelValue"])]}),_:1}),"phpasync"!==g(ee)?(_(),w(s,{key:0,label:"执行用户",prop:"command"},{default:j(function(){return[C(a,{modelValue:g(oe).user,"onUpdate:modelValue":t[6]||(t[6]=function(e){return g(oe).user=e}),class:"!w-24rem"},{default:j(function(){return[C(l,{label:"www(推荐)",value:"www"}),C(l,{label:"root(不推荐)",value:"root"})]}),_:1},8,["modelValue"])]}),_:1})):V("",!0),C(s,{label:"执行目录",prop:"composerVersion"},{default:j(function(){return[C(f,{modelValue:g(oe).path,"onUpdate:modelValue":t[7]||(t[7]=function(e){return g(oe).path=e}),icon:"el-folder-opened",onIconClick:se,width:"32rem"},null,8,["modelValue"])]}),_:1}),C(s,{label:" ",prop:"composerVersion"},{default:j(function(){return[x("div",null,[g(oe).comp_lock?(_(),b("span",Q,[k(H(g(oe).comp_lock)+" ",1),C(d,{onClick:pe},{default:j(function(){return e(t[12]||(t[12]=[k("[点击删除]",-1)]))}),_:1})])):V("",!0),g(oe).comp_json?(_(),b("span",$,H(g(oe).comp_json),1)):V("",!0)])]}),_:1}),C(s,{label:" "},{default:j(function(){return[C(v,{type:"primary",disabled:!!("boolean"!=typeof g(oe).comp_json&&g(oe).comp_json||"boolean"!=typeof g(oe).comp_lock&&g(oe).comp_lock),onClick:fe},{default:j(function(){return e(t[13]||(t[13]=[k("执行",-1)]))}),_:1},8,["disabled"]),C(h,{direction:"vertical",class:"!h-1rem !mx-2rem"}),C(v,{onClick:ve},{default:j(function(){return e(t[14]||(t[14]=[k("查看日志",-1)]))}),_:1})]}),_:1})]}),_:1},8,["model"]),x("ul",D,[t[15]||(t[15]=x("li",null,"Composer是PHP主流依赖包管理器,若您的项目使用Composer管理依赖包,可在此处对依赖进行升级或安装",-1)),t[16]||(t[16]=x("li",null,"Composer版本:当前安装的Composer版本,可点击右侧的【升级Composer】将Composer升级到最新稳定版",-1)),t[17]||(t[17]=x("li",null,"PHP版本:用于执行composer的PHP版本,无特殊要求,默认即可,如安装出错,可尝试选择其它PHP版本",-1)),t[18]||(t[18]=x("li",null,"执行参数:按需选择执行参数,可配合补充命令使用",-1)),t[19]||(t[19]=x("li",null,"补充命令:若此处为空,则按composer.json中的配置执行,此处支持填写完整composer命令",-1)),t[20]||(t[20]=x("li",null,"镜像源:提供【阿里源】和【官方源】,建议国内服务器使用【阿里源】,海外服务器使用【官方源】",-1)),"phpasync"!==g(ee)?(_(),b("li",J,"执行用户:默认为www用户,除非您的网站以root权限运行,否则不建议使用root用户执行composer")):V("",!0),t[21]||(t[21]=x("li",null,"执行目录:默认为当前网站根目录",-1))])]),C(M,{title:"请执行完毕确认结果无误后关闭此窗口",onCancel:he,modelValue:g(ae),"onUpdate:modelValue":t[8]||(t[8]=function(e){return S(ae)?ae.value=e:null}),area:[50,42]},{default:j(function(){return[C(B,{class:"h-full",title:"全屏查看composer执行日志",content:g(le),isHtml:!0,isRefreshBtn:!1,isAuto:!0},null,8,["content"])]}),_:1},8,["modelValue"]),C(M,{title:"composer执行日志",onCancel:he,modelValue:g(ce),"onUpdate:modelValue":t[10]||(t[10]=function(e){return S(ce)?ce.value=e:null}),area:60},{default:j(function(){return[x("div",W,[x("div",X,[C(v,{type:"primary",onClick:t[9]||(t[9]=function(e){return de(!0)})},{default:j(function(){return e(t[22]||(t[22]=[k("刷新日志",-1)]))}),_:1})]),x("div",Y,[C(B,{class:"h-full",title:"全屏查看composer执行日志",content:g(le),isHtml:!0,isRefreshBtn:!1},null,8,["content"])])])]}),_:1},8,["modelValue"])])}}}))}}})}();