import{_ as U}from"./AppBar.vue_vue_type_script_setup_true_lang-Bn5ANuqq.js";import{_ as H}from"./View.vue_vue_type_script_setup_true_lang-MwElHLwc.js";import F from"./AppDrawer-CA3AAnpP.js";import{d as D,u as A,c as j,o as q,n as z,a as B,b as g,e,w as t,f as c,g as p,h as s,i as C,j as N,r as h,k as G,l as K,m as V,t as O,v as y,p as k,q as W,s as Z,x as J,y as Q,z as X,A as Y,B as ee}from"./index-BrhME0Dw.js";import{D as oe}from"./DialogTitle-Cs_RafDF.js";import{V as M,a as T,b as te}from"./VCard-DgPOJonh.js";import{V as E}from"./VDivider-CRnuQWb1.js";import{V as $}from"./VSpacer-Cyb0OpTp.js";import{V as d}from"./VBtn-W2di21BR.js";import{V as L}from"./VDialog-B4tiv73S.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as se}from"./ConfigStore-CbbrHyuM.js";import{o as b}from"./common-CvoIC5ir.js";import{m as ae}from"./markdown-BS2QN_WF.js";import{_ as le}from"./telegram-CMZE59Yh.js";import{m as S,a as ne}from"./mdi-CAFVvJZe.js";import{V as ie}from"./index-W86lZ1ks.js";import{V as re}from"./VMenu-qoiHRwtH.js";import{u as de,m as pe}from"./dimensions-g-Hg75km.js";import{c as me,m as ue}from"./layout-DbCDuti4.js";import"./index-CHUUO2Gl.js";import"./ssrBoot-CnxmaXlH.js";import"./yuzu-DV0cs55e.js";import"./ryujinx-BlyGcj1a.js";import"./suyu-CF4zabco.js";import"./scopeId-Bb-xzR7W.js";import"./VAvatar-BvBVx7K7.js";import"./VList-BcMyXGiT.js";import"./VProgressCircular-jw_3a1Fn.js";import"./resizeObserver-BLxqKstE.js";import"./forwardRefs-YZME3Z-4.js";const fe={class:"text-center"},ce={style:{"padding-left":"10px","padding-right":"10px","padding-top":"10px"},class:"flex-grow-0"},_e=["value"],ge=D({__name:"ConsoleDialog",setup(u){const o=A();function a(){o.dialogFlag=!1}function r(){window.eel.stop_download()(i=>{console.log(i)})}function _(){window.eel.pause_download()(i=>{console.log(i)})}let m=j(()=>{let i="";for(let n of o.consoleMessages)i+=n+`
`;return i});return q(()=>{z(()=>{let i=document.getElementById("consoleBox");i&&(i.scrollTop=i.scrollHeight)})}),(i,n)=>(g(),B("div",fe,[e(L,{modelValue:s(o).dialogFlag,"onUpdate:modelValue":n[0]||(n[0]=v=>s(o).dialogFlag=v),"max-width":"900",persistent:s(o).persistentConsoleDialog},{default:t(()=>[e(M,null,{default:t(()=>[e(oe,null,{default:t(()=>n[1]||(n[1]=[p(" 控制台日志 ")])),_:1}),c("div",ce,[c("textarea",{id:"consoleBox",value:s(m),readonly:"",rows:"12"},null,8,_e)]),e(E),e(T,null,{default:t(()=>[e($),s(o).persistentConsoleDialog?(g(),C(d,{key:0,color:"primary",variant:"text",onClick:_},{default:t(()=>n[2]||(n[2]=[p(" 暂停下载任务 ")])),_:1})):N("",!0),s(o).persistentConsoleDialog?(g(),C(d,{key:1,color:"primary",variant:"text",onClick:r},{default:t(()=>n[3]||(n[3]=[p(" 中断并删除下载任务 ")])),_:1})):N("",!0),e(d,{color:"primary",variant:"text",onClick:a,disabled:s(o).persistentConsoleDialog},{default:t(()=>n[4]||(n[4]=[p(" 关闭 ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue","persistent"])]))}}),ve=R(ge,[["__scopeId","data-v-5fc1100f"]]),we={class:"text-center"},xe={style:{padding:"15px"}},Ve={class:"text-h6 text--primary"},ye=["innerHTML"],Ce=D({__name:"NewVersionDialog",setup(u){let o=h(!1);const a=se();let r=h(""),_=h("");const m=A(),i=K();G(()=>{i.on("showNewVersionDialog",n)});function n(f){o.value=!0,r.value=f.latestVersion,a.hasNewVersion&&w()}function v(){o.value=!1,a.hasNewVersion&&b("https://github.com/triwinds/ns-emu-tools/releases")}function w(){window.eel.load_change_log()(f=>{if(f.code===0){let l=f.data.replace(`# Change Log

`,"");_.value=ae.parse(l)}else _.value="<p>加载失败</p>"})}function I(){m.cleanAndShowConsoleDialog(),window.eel.download_net_by_tag(r.value)(f=>{f.code===0?m.appendConsoleMessage("NET 下载完成"):(m.appendConsoleMessage(f.msg),m.appendConsoleMessage("NET 下载失败"))})}async function P(){m.cleanAndShowConsoleDialog(),window.eel.update_net_by_tag(r.value)}return(f,l)=>(g(),B("div",we,[e(L,{modelValue:s(o),"onUpdate:modelValue":l[2]||(l[2]=x=>k(o)?o.value=x:o=x),width:"850"},{default:t(()=>[e(M,null,{default:t(()=>[e(te,{class:"text-h5 bg-primary text-white"},{default:t(()=>[p(O(s(a).hasNewVersion?"更新日志":"版本检测"),1)]),_:1}),c("div",xe,[V(c("p",Ve,"当前版本已经是最新版本",512),[[y,!s(a).hasNewVersion]]),V(c("div",null,[c("div",{innerHTML:s(_),class:"text--primary",style:{"max-height":"300px","overflow-y":"auto"}},null,8,ye)],512),[[y,s(a).hasNewVersion]])]),e(E),V(e(T,null,{default:t(()=>[e($),e(d,{color:"primary",variant:"text",onClick:l[0]||(l[0]=x=>k(o)?o.value=!1:o=!1)},{default:t(()=>l[3]||(l[3]=[p(" OK ")])),_:1})]),_:1},512),[[y,!s(a).hasNewVersion]]),V(e(T,null,{default:t(()=>[e($),e(d,{color:"primary",variant:"text",onClick:P},{default:t(()=>l[4]||(l[4]=[p(" 自动更新 ")])),_:1}),e(d,{color:"primary",variant:"text",onClick:I},{default:t(()=>l[5]||(l[5]=[p(" 下载最新版本 ")])),_:1}),e(d,{color:"primary",variant:"text",onClick:v},{default:t(()=>l[6]||(l[6]=[p(" 前往发布页 ")])),_:1}),e(d,{color:"primary",variant:"text",onClick:l[1]||(l[1]=x=>k(o)?o.value=!1:o=!1)},{default:t(()=>l[7]||(l[7]=[p(" 取消 ")])),_:1})]),_:1},512),[[y,s(a).hasNewVersion]])]),_:1})]),_:1},8,["modelValue"])]))}}),De={id:"speed-dial",class:"text-center"},he={class:"btn-item"},ke={class:"btn-item"},Ne=D({__name:"SpeedDial",setup(u){return(o,a)=>(g(),B("div",De,[e(re,{"open-delay":"0","close-delay":"100","open-on-hover":"",transition:"slide-y-reverse-transition"},{activator:t(({props:r})=>[e(d,W({color:"primary"},r,{icon:s(ne)}),null,16,["icon"])]),default:t(()=>[c("div",he,[e(d,{color:"grey-darken-3",icon:s(S),onClick:a[0]||(a[0]=r=>s(b)("https://github.com/triwinds/ns-emu-tools"))},null,8,["icon"])]),c("div",ke,[e(d,{color:"blue-darken-1",icon:s(S),onClick:a[1]||(a[1]=r=>s(b)("https://t.me/+mxI34BRClLUwZDcx"))},{default:t(()=>[e(ie,{src:le,height:"22",width:"22"})]),_:1},8,["icon"])])]),_:1})]))}}),Te=R(Ne,[["__scopeId","data-v-83a72ed2"]]),$e=J({...pe(),...ue({fullHeight:!0}),...Y()},"VApp"),be=Z()({name:"VApp",props:$e(),setup(u,o){let{slots:a}=o;const r=Q(u),{layoutClasses:_,getLayoutItem:m,items:i,layoutRef:n}=me(u),{rtlClasses:v}=X();return de(()=>{var w;return e("div",{ref:n,class:["v-application",r.themeClasses.value,_.value,v.value,u.class],style:[u.style]},[e("div",{class:"v-application__wrap"},[(w=a.default)==null?void 0:w.call(a)])])}),{getLayoutItem:m,items:i,theme:r}}}),io=D({__name:"default",setup(u){const o=ee();return(a,r)=>(g(),C(be,null,{default:t(()=>[e(F),e(U),e(H),e(ve),e(Ce),s(o).mdAndUp.value?(g(),C(Te,{key:0})):N("",!0)]),_:1}))}});export{io as default};
