import{K as g,G as k,B as e,at as r,a1 as b,y as v,F as h,as as A,ah as T,$ as m,P as _,Q as N,W as w,au as y}from"./index-CNWvE5qA.js";import{P as z}from"./Progress-BJaYRES_.js";import p from"./IconBrandWindows-qq4DLQyD.js";import u from"./IconBrandApple-CUheGxMS.js";import j from"./IconBrandUbuntu-CLiCeUbb.js";import{T as x}from"./Tabs-COOf51zU.js";import{A as f}from"./Alert-DxRKER5q.js";import S from"./IconClock24-BAO3uI8J.js";import"./get-auto-contrast-value-Da6zqqWm.js";import"./create-scoped-keydown-handler-C7O3t3U_.js";const C="_hero_9s69e_1",D="_container_9s69e_8",I="_title_9s69e_24",M="_description_9s69e_41",L="_control_9s69e_51",i={hero:C,container:D,title:I,description:M,control:L},W=[{icon:e.jsx(p,{}),name:"Windows系统 (Windows 7/8/8.1/10/11)",arch:"x64",fileArch:"win-x64",ext:["exe","zip"]},{icon:e.jsx(p,{}),name:"Windows系统 (Windows 7/8/8.1/10/11) (ARM64版本)",arch:"arm64",fileArch:"win-arm64",ext:["exe","zip"]},{icon:e.jsx(u,{}),name:"MacOS 苹果系统 (Intel核芯版本)",arch:"x64",fileArch:"mac-x64",ext:["dmg","tar.gz"]},{icon:e.jsx(u,{}),name:"MacOS 苹果系统 (M1系列芯片/Apple Silicon)",arch:"arm64",fileArch:"mac-arm64",ext:["dmg","tar.gz"]},{icon:e.jsx(j,{}),name:"Linux 系统 (X64版本)",arch:"x64",fileArch:"linux-x64",ext:["deb","tar.gz","AppImage"],overwriteFn(a){return a==="AppImage"?"linux-x86_64":a==="deb"?"linux-amd64":null}},{icon:e.jsx(j,{}),name:"Linux 系统 (ARM64版本)",arch:"arm64",fileArch:"linux-arm64",ext:["dmg","tar.gz"]}];function P(){var t,d,o;let a="unknown";const c=g.useGetSysConfChangeLogQuery({checkType:"desktop2",currentVer:"desktop2-v1.4.53"},{pollingInterval:3e5});c.isSuccess&&(a=((o=k.first((d=(t=c.data)==null?void 0:t.data)==null?void 0:d.updates))==null?void 0:o.version)||"unknown");const l=W.map(s=>e.jsxs(r.Tr,{children:[e.jsxs(r.Td,{className:"flex space-x-2",children:[s.icon," ",e.jsx("span",{children:s.name})]}),e.jsx(r.Td,{className:s.arch=="arm64"?" bg-cyan-200 ":" bg-orange-200 ",children:s.arch}),e.jsx(r.Td,{className:"space-x-2",children:s.ext.map(n=>e.jsx(b,{component:"button",fz:"sm",children:e.jsx("a",{rel:"nofollow",target:"_blank",href:`https://dkstatic.mdgjx.com/${a.replace("desktop2","")}-release/MDGJX-desktop-${a.replace("desktop2-","")}-${s.overwriteFn&&s.overwriteFn(n)||s.fileArch}.${n}`,children:n})},n))}),e.jsx(r.Td,{children:a.replace("desktop2-","")})]},s.name+s.arch));return a=="unknown"?e.jsx(z,{color:"blue",size:"xl",value:0}):e.jsx(r.ScrollContainer,{minWidth:800,children:e.jsxs(r,{verticalSpacing:"xs",children:[e.jsx(r.Thead,{children:e.jsxs(r.Tr,{children:[e.jsx(r.Th,{children:"平台"}),e.jsx(r.Th,{children:"架构"}),e.jsx(r.Th,{children:"下载链接"}),e.jsx(r.Th,{children:"备注"})]})}),e.jsx(r.Tbody,{children:l})]})})}const Q=()=>{var s;const a=v(),[c,l]=h.useState(!1),[t,d]=h.useState(((s=A.parse(a.location.search))==null?void 0:s.type)||"desktop2"),o=e.jsxs(e.Fragment,{children:[e.jsx(x,{value:t+"",onChange:n=>{d(n+"")},children:e.jsxs(x.List,{children:[e.jsx(x.Tab,{value:"desktop2",children:"下载桌面端(Desktop)"}),e.jsx(x.Tab,{value:"docker",children:"应用自部署(Docker)"})]})}),t=="docker"?e.jsxs("p",{className:"p-2 mt-2",children:[e.jsx("div",{children:"🚀 Docker部署命令行:"}),e.jsx(f,{children:"docker run -e LAFREGION=CN -e APPLANG=zh_CN --name mymiaoda -v ~/.miaoda-docker:/root/.miaoda -d -p 0.0.0.0:39899:39899 codegentoolbox/laftools-linux-x64:latest"}),e.jsxs("div",{className:"mt-2",children:[e.jsx("a",{rel:"nofollow",href:"https://hub.docker.com/r/codegentoolbox/laftools-linux-x64",target:"_blank",className:"text-blue-500",children:"🔗 Docker Hub - laftools-linux-x64"}),e.jsx("a",{rel:"nofollow",href:"https://hub.docker.com/r/codegentoolbox/laftools-arm64-x64",target:"_blank",className:"text-blue-500",children:"🔗 Docker Hub - laftools-arm64-x64"})]}),e.jsx("div",{children:"注意:Docker版本目前为Beta版本,如果部署过程中存在问题,需要更多帮助请在GitHub上联系我们,谢谢!"})]}):e.jsxs("div",{children:[e.jsx("div",{className:"my-2",children:e.jsx(f,{p:5,variant:"light",color:"green",title:"本软件完全开源,无任何恶意代码,请信任并忽略报毒错误,我们也正在申请软件签名证书,敬请理解",icon:e.jsx(S,{})})}),e.jsx(P,{})]})]});return e.jsxs("div",{className:"m-[-10px]",children:[e.jsxs("div",{className:i.hero,children:[e.jsx(T,{gradient:"linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, .65) 40%)",opacity:1,zIndex:0}),e.jsxs(m,{className:i.container,size:"md",children:[e.jsx(_,{className:i.title,children:"秒达工具箱 - 下载页"}),e.jsx(N,{className:i.description,size:"xl",mt:"xl",children:"一步之遥,您将在本页面下载到最新版本的秒达工具箱!目前,秒达工具箱已支持Windows系统、Mac系统、Linux系统(涵盖AMD64与ARM64架构)。请放心,工具箱将在未来迭代中不断得到完善。"}),e.jsx("a",{href:"#detail",children:e.jsx(w,{variant:"gradient",size:"xl",radius:"xl",className:i.control,onClick:()=>{l(!0)},children:"立即下载"})})]})]}),e.jsx(m,{size:"lg",className:"mt-8 ",id:"detail",children:o}),e.jsx(y,{fullScreen:!0,opened:c,onClose:()=>{l(!1)},title:"下载详情",children:e.jsx("div",{className:"w-[80vw]",children:o})})]})};export{Q as default};