System.register(["./index-legacy102.js?v=1753954525509","./index-legacy101.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./public-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509"],(function(e,a){"use strict";var l,c,n,s,o,t,u,d,r,i,m,p,_,g,v,x,f,b,k,y,D,L,I,h,w,j,$,C,U,R;return{setters:[e=>{l=e._},e=>{c=e._},e=>{n=e._},e=>{s=e.k,o=e.P,t=e.e,u=e.r,d=e.c,r=e.U,i=e.V,m=e.Q,p=e.a2,_=e.W,g=e.X,v=e.at,x=e.j,f=e.a3,b=e.ah},e=>{k=e.bg,y=e.f,D=e.m,L=e.bL,I=e.w,h=e.fr},e=>{w=e.z},e=>{j=e.cG,$=e.cA,C=e.aq,U=e.ay,R=e.av},null,null],execute:function(){const a={class:"pt-4px"},E={class:"w-440px"},M={class:"w-440px"},q={class:"px-2px py-4px"},z={class:"h-420px"},A=s({__name:"index",setup(e){const{t:l}=o(),s=k(),b=t({name:null,image:""}),h={name:{trigger:"change",validator:()=>null!==b.name||new Error(l("Docker.LocalImage.pull.index_8"))},image:{trigger:["input","blur"],validator:()=>""!==b.image||new Error(l("Docker.LocalImage.pull.index_9"))}},A=u(null),G=u(l("Docker.LocalImage.pull.index_10")),H=u(!1),K=u([]),P=async()=>{await(A.value?.validate()),G.value="",Q.value=!0,V(),B()},Q=u(!1),S=d((()=>Q.value)),{open:V,send:W,close:X}=w("/ws_model",{immediate:!1,onMessage:(e,a)=>{const{data:c}=a;if(y(c)&&(G.value+=a.data,c.includes("successful")||c.includes("failed"))){Q.value=!1;const e={status:c.includes("successful"),msg:c.includes("successful")?l("Docker.Container.create.command_7"):l("Docker.Container.create.command_6")};e.status?(D.success(e.msg),s.setRefresh(!0)):D.error(e.msg),X()}}}),B=()=>{W({model_index:"btdocker",mod_name:"image",def_name:"pull_from_some_registry",ws_callback:111,name:b.name,image:b.image})};return(async()=>{try{H.value=!0;const{message:e}=await L();I(e)&&e.length>0&&(K.value=e.map((e=>({label:e.name,value:e.name}))),b.name=e[0].name)}finally{H.value=!1}})(),(e,l)=>{const s=j,o=$,t=C,u=U,d=R,k=n,y=c;return r(),i("div",a,[m(k,{ref_key:"formRef",ref:A,model:g(b),rules:h},{default:p((()=>[m(o,{label:e.$t("Docker.LocalImage.pull.index_3"),path:"name"},{default:p((()=>[_("div",E,[m(s,{value:g(b).name,"onUpdate:value":l[0]||(l[0]=e=>g(b).name=e),loading:g(H),disabled:g(S),options:g(K)},null,8,["value","loading","disabled","options"])])])),_:1},8,["label"]),m(o,{label:e.$t("Docker.LocalImage.pull.index_4"),path:"image"},{default:p((()=>[_("div",M,[m(d,null,{default:p((()=>[m(t,{value:g(b).image,"onUpdate:value":l[1]||(l[1]=e=>g(b).image=e),disabled:g(S),placeholder:e.$t("Docker.LocalImage.pull.index_5"),onKeyup:v(P,["enter"])},null,8,["value","disabled","placeholder"]),m(u,{type:"primary",disabled:g(S),onClick:P},{default:p((()=>[x(f(e.$t("Docker.LocalImage.pull.index_6")),1)])),_:1},8,["disabled"])])),_:1})])])),_:1},8,["label"])])),_:1},8,["model"]),_("div",q,f(e.$t("Docker.LocalImage.pull.index_7")),1),_("div",z,[m(y,{log:g(G)},null,8,["log"])])])}}}),G={class:"pt-4px"},H={class:"px-2px py-4px"},K={class:"h-456px"},P=s({__name:"index",setup(e){const{t:a}=o(),l=k(),n=t({cmd:""}),s=u(a("Docker.LocalImage.pull.index_10")),v=u(!1),b=d((()=>v.value)),L=async()=>{if(""!==n.cmd.trim())try{v.value=!0,s.value=a("Docker.Container.create.command_8"),await h({cmd:n.cmd}),I(),E()}catch(e){v.value=!1,console.error(e)}else D.error(a("Docker.LocalImage.pull.index_13"))},{open:I,send:j,close:$}=w("/ws_model",{immediate:!1,onMessage:(e,c)=>{const{data:n}=c;if(y(n)&&(s.value+=c.data,n.includes("bt_successful")||n.includes("bt_failed"))){v.value=!1;const e={status:n.includes("bt_successful"),msg:n.includes("bt_successful")?a("Docker.Container.create.command_7"):a("Docker.Container.create.command_6")};e.status?(D.success(e.msg),l.setRefresh(!0)):D.error(e.msg),$()}}}),E=()=>{j({model_index:"btdocker",mod_name:"image",def_name:"get_cmd_log",ws_callback:111,name:"",image:""})};return(e,a)=>{const l=C,o=U,t=R,u=c;return r(),i("div",G,[m(t,{class:"mb-16px"},{default:p((()=>[m(l,{value:g(n).cmd,"onUpdate:value":a[0]||(a[0]=e=>g(n).cmd=e),disabled:g(b),placeholder:e.$t("Docker.LocalImage.pull.index_11")},null,8,["value","disabled","placeholder"]),m(o,{type:"primary",disabled:g(b),onClick:L},{default:p((()=>[x(f(e.$t("Docker.LocalImage.pull.index_12")),1)])),_:1},8,["disabled"])])),_:1}),_("div",H,f(e.$t("Docker.LocalImage.pull.index_7")),1),_("div",K,[m(u,{log:g(s)},null,8,["log"])])])}}}),Q={class:"p-16px"};e("default",s({__name:"index",setup(e){const{t:a}=o(),c=u("normal"),n=[{key:"normal",label:a("Docker.LocalImage.pull.index_1"),component:A},{key:"command",label:a("Docker.LocalImage.pull.index_2"),component:P}];return(e,a)=>{const s=l;return r(),i("div",Q,[m(s,{value:g(c),"onUpdate:value":a[0]||(a[0]=e=>b(c)?c.value=e:null),options:n},null,8,["value"])])}}}))}}}));
