System.register(["./index-legacy178.js?v=1763625242172","./index-legacy107.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172","./index-legacy29.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy8.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy2.js?v=1763625242172","./index-legacy98.js?v=1763625242172","./index-legacy99.js?v=1763625242172"],(function(e,l){"use strict";var a,n,s,t,u,i,c,_,o,p,r,v,g,d,y,j,m;return{setters:[e=>{a=e._},e=>{n=e._},e=>{s=e.c},e=>{t=e.d,u=e.C},e=>{i=e.g,c=e.a},e=>{_=e.k,o=e.t,p=e.P,r=e.c,v=e.r,g=e.R,d=e.S,y=e.X,j=e.V,m=e.aj},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=()=>{C(k.value)},C=e=>{switch(e){case"run":(async()=>{try{z(!0),h.value="";const{message:e}=await i({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 c({service_name:_.value.service_name});s(e)&&(h.value=e.result)}finally{z(!1)}})()}},{open:D,send:S,close:V}=u("/sock_shell",{immediate:!1,onMessage:(e,l)=>{const{data:a}=l;h.value+=l.data,(a.includes("bt_successful")||a.includes("bt_failed"))&&V()}}),H=()=>{const e=_.value.appinfo.filter((e=>"installed_log"===e.fieldKey));e.length>0&&(h.value="",V(),D(),S(`tail -f ${e[0].fieldValue}`))};return A(),(e,s)=>{const t=n,u=a;return g(),d("div",l,[y(t,{value:j(k),"onUpdate:value":[s[0]||(s[0]=e=>m(k)?k.value=e:null),C],options:b,onClick:A},null,8,["value"]),y(u,{class:"h-468px",lang:"log","font-size":12,loading:j(w),content:j(h)},null,8,["loading","content"])])}}}))}}}));
