import{k as Y,j as w,t as Q,h as U,m as b,n as a,p as t,f as E,i as P,v as N,A as $,x as X,s as Z,F as L,e as ee}from"./web.Os7kOAdY.js";import{c as te,d as le}from"./clipboard.BNxbz_oK.js";import{g as T,t as oe}from"./i18n-runtime._BAkvU05.js";var ne=$('<div class=panel style=display:flex;flex-direction:column;gap:14px><!$><!/><div class=tool-actions><button class="tool-btn is-ghost"></button><button class="tool-btn is-ghost"></button></div><div class=tool-field><span class=tool-label><!$><!/><!$><!/> <!$><!/></span><textarea class=tool-input rows=14 readonly style=font-family:ui-monospace,monospace;font-size:12px></textarea></div><div class=tool-actions><button class="tool-btn is-primary"></button><button class="tool-btn is-ghost"></button></div><p class=tool-hint>'),ie=$("<div><span class=tool-label></span><div style=display:flex;gap:6px;flex-wrap:wrap;margin-top:4px>"),se=$("<button>");const ae={Node:`# Node
node_modules/
dist/
build/
.env
.env.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
coverage/
.nyc_output/
`,Python:`# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
.venv/
*.egg-info/
dist/
build/
.eggs/
.mypy_cache/
.pytest_cache/
`,Java:`# Java
*.class
*.jar
*.war
*.ear
target/
.gradle/
build/
.idea/
*.iml
out/
`,Go:`# Go
bin/
pkg/
*.exe
*.test
*.out
vendor/
go.sum
`,Rust:`# Rust
/target
**/*.rs.bk
Cargo.lock
`,"C/C++":`# C/C++
*.o
*.obj
*.so
*.dylib
*.dll
*.a
*.lib
*.exe
build/
cmake-build-*/
.vscode/
`,Swift:`# Swift
.build/
DerivedData/
*.xcuserstate
*.xcworkspace
Pods/
Carthage/
.swiftpm/
`,Kotlin:`# Kotlin
*.class
*.jar
.gradle/
build/
.idea/
*.iml
out/
local.properties
`,Ruby:`# Ruby
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/tmp/
.bundle/
vendor/bundle
`,PHP:`# PHP
/vendor/
composer.lock
*.cache
.env
storage/
`,".NET":`# .NET
bin/
obj/
*.suo
*.user
*.vs/
packages/
*.nupkg
`,macOS:`# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
.Spotlight-V100
.Trashes
`,Windows:`# Windows
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.lnk
`,Linux:`# Linux
*~
.fuse_hidden*
.nfs*
`,IDE:`# IDE
.idea/
.vscode/
*.swp
*.swo
*~
.project
.classpath
.settings/
`},j={语言:["Node","Python","Java","Go","Rust","C/C++","Swift","Kotlin","Ruby","PHP",".NET"],系统:["macOS","Windows","Linux"],工具:["IDE"]};function ge(){const[R,v]=w(T(),{equals:!1}),l=e=>oe(e,R());Q(()=>{const e=o=>{const n=o.detail?.locale;n&&v(n)};window.addEventListener("taitan:locale-change",e),v(T()),Z(()=>window.removeEventListener("taitan:locale-change",e))});const[r,c]=w(["Node","macOS"]);function D(e){c(o=>o.includes(e)?o.filter(n=>n!==e):[...o,e])}const d=U(()=>r().map(e=>ae[e]||"").join(`
`));return(()=>{var e=b(ne),o=e.firstChild,[n,O]=a(o.nextSibling),_=n.nextSibling,g=_.firstChild,x=g.nextSibling,m=_.nextSibling,i=m.firstChild,I=i.firstChild,[f,G]=a(I.nextSibling),A=f.nextSibling,[h,F]=a(A.nextSibling),H=h.nextSibling,M=H.nextSibling,[J,K]=a(M.nextSibling),W=i.nextSibling,S=m.nextSibling,u=S.firstChild,y=u.nextSibling,q=S.nextSibling;return t(e,E(L,{get each(){return Object.entries(j)},children:([z,B])=>(()=>{var C=b(ie),k=C.firstChild,V=k.nextSibling;return t(k,z),t(V,E(L,{each:B,children:p=>(()=>{var s=b(se);return s.$$click=()=>D(p),t(s,p),P(()=>ee(s,`tool-btn ${r().includes(p)?"is-primary":"is-ghost"}`)),N(),s})()})),C})()}),n,O),g.$$click=()=>c(Object.values(j).flat()),t(g,()=>l("全选")),x.$$click=()=>c([]),t(x,()=>l("清空")),t(i,()=>l("生成的 .gitignore（已选"),f,G),t(i,()=>r().length,h,F),t(i,()=>l("项）"),J,K),u.$$click=()=>te(d()),t(u,()=>l("复制")),y.$$click=()=>le(d(),".gitignore","text/plain"),t(y,()=>l("下载 .gitignore")),t(q,()=>l("选择项目用到的语言/框架/系统，自动生成合并后的 .gitignore 文件。")),P(()=>X(W,"value",d())),N(),e})()}Y(["click"]);export{ge as default};
