System.register(["./index-legacy172.js?v=1753954525509","./index-legacy102.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./public-legacy.js?v=1753954525509","./index-legacy29.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy6.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy2.js?v=1753954525509","./index-legacy96.js?v=1753954525509","./index-legacy100.js?v=1753954525509"],(function(e,l){"use strict";var a,n,s,t,u,c,i,_,o,p,r,v,g,d,y,m,j;return{setters:[e=>{a=e._},e=>{n=e._},e=>{s=e.c},e=>{t=e.c,u=e.z},e=>{c=e.g,i=e.a},e=>{_=e.k,o=e.t,p=e.P,r=e.c,v=e.r,g=e.U,d=e.V,y=e.Q,m=e.X,j=e.ah},null,null,null,null,null,null,null,null],execute:function(){const l={class:"p-20px"};e("default",_({__name:"index",props:{app:{}},setup(e){const _=o(e,"app"),{t:x}=p(),f=r((()=>"initializing"===_.value.status)),k=v(f.value?"install":"run"),b=[{key:"run",show:!f.value,label:x("Docker.App.index_5")},{key:"install",label:x("Docker.App.index_6")}],h=v(""),{loading:w,setLoading:z}=t(),A=()=>{D(k.value)},D=e=>{switch(e){case"run":(async()=>{try{z(!0),h.value="";const{message:e}=await c({service_name:_.value.service_name,app_name:_.value.appname});s(e)&&(h.value=e.result)}finally{z(!1)}})();break;case"install":f.value?H():(async()=>{try{z(!0),h.value="";const{message:e}=await i({service_name:_.value.service_name});s(e)&&(h.value=e.result)}finally{z(!1)}})()}},{open:U,send:V,close:C}=u("/sock_shell",{immediate:!1,onMessage:(e,l)=>{const{data:a}=l;h.value+=l.data,(a.includes("bt_successful")||a.includes("bt_failed"))&&C()}}),H=()=>{const e=_.value.appinfo.filter((e=>"installed_log"===e.fieldKey));e.length>0&&(h.value="",C(),U(),V(`tail -f ${e[0].fieldValue}`))};return A(),(e,s)=>{const t=n,u=a;return g(),d("div",l,[y(t,{value:m(k),"onUpdate:value":[s[0]||(s[0]=e=>j(k)?k.value=e:null),D],options:b,onClick:A},null,8,["value"]),y(u,{class:"h-468px",lang:"log","font-size":12,loading:m(w),content:m(h)},null,8,["loading","content"])])}}}))}}}));
