@deepseekcode/cli 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1364 -1271
- package/package.json +1 -1
- package/web/dist/assets/AutomationView-CpFBgFvV.js +1 -0
- package/web/dist/assets/ChannelConfigView-DGK82bWj.js +8 -0
- package/web/dist/assets/{ConnectorsView-Dadj20jv.js → ConnectorsView-5kzDUnd8.js} +1 -1
- package/web/dist/assets/{FileTreeView-DLRQZmLP.js → FileTreeView-BQfRRAXr.js} +1 -1
- package/web/dist/assets/{HookConfigView-DE0NCrV9.js → HookConfigView-CdQVgzog.js} +1 -1
- package/web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/web/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/web/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/web/dist/assets/ModelsView-Dpwx3f-Q.js +1 -0
- package/web/dist/assets/{PluginsView-DBF_BvKL.js → PluginsView-bQipmAy8.js} +1 -1
- package/web/dist/assets/SessionGrid-DFVjPnhc.js +39 -0
- package/web/dist/assets/SettingsPanel-CpmNWZmn.js +4 -0
- package/web/dist/assets/{SkillsView-BAorWQAI.js → SkillsView-DLGgMIsT.js} +1 -1
- package/web/dist/assets/{TemplatesTab-DEblm2pS.js → TemplatesTab-4085BhAx.js} +1 -1
- package/web/dist/assets/{TerminalView-Cnnipr8e.js → TerminalView-BVZAuLTB.js} +1 -1
- package/web/dist/assets/{ThreeScene-5Zi32o_j.js → ThreeScene-CukEnQe-.js} +1 -1
- package/web/dist/assets/{ToolsView-lOHdaw4V.js → ToolsView-DeCt1EIB.js} +1 -1
- package/web/dist/assets/abap-BdImnpbu.js +1 -0
- package/web/dist/assets/actionscript-3-B3316cI-.js +1 -0
- package/web/dist/assets/ada-bCR0ucgS.js +1 -0
- package/web/dist/assets/ahk-CsyLZFj1.js +1 -0
- package/web/dist/assets/ahk2-8Zs4aa1G.js +1 -0
- package/web/dist/assets/andromeeda-C4gqWexZ.js +1 -0
- package/web/dist/assets/angular-html-DA-rfuFy.js +1 -0
- package/web/dist/assets/angular-ts-BrjP3tb8.js +1 -0
- package/web/dist/assets/apache-Pmp26Uib.js +1 -0
- package/web/dist/assets/apex-DhZFqWV2.js +1 -0
- package/web/dist/assets/apl-CORt7UWP.js +1 -0
- package/web/dist/assets/applescript-Co6uUVPk.js +1 -0
- package/web/dist/assets/ara-BRHolxvo.js +1 -0
- package/web/dist/assets/asciidoc-CSVQ5wI8.js +1 -0
- package/web/dist/assets/asm-D_Q5rh1f.js +1 -0
- package/web/dist/assets/astro-HNnZUWAn.js +1 -0
- package/web/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/web/dist/assets/awk-DMzUqQB5.js +1 -0
- package/web/dist/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/web/dist/assets/ayu-light-BA47KaF1.js +1 -0
- package/web/dist/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/web/dist/assets/ballerina-BFfxhgS-.js +1 -0
- package/web/dist/assets/bat-CickPsom.js +1 -0
- package/web/dist/assets/beancount-k_qm7-4y.js +1 -0
- package/web/dist/assets/berry-uYugtg8r.js +1 -0
- package/web/dist/assets/bibtex-CHM0blh-.js +1 -0
- package/web/dist/assets/bicep-Bmn6On1c.js +1 -0
- package/web/dist/assets/bird2-Bx8U0n9b.js +1 -0
- package/web/dist/assets/blade-2xfisSek.js +1 -0
- package/web/dist/assets/bsl-DlhNcFeZ.js +1 -0
- package/web/dist/assets/c-BIGW1oBm.js +1 -0
- package/web/dist/assets/c3-Dp5svz6Z.js +1 -0
- package/web/dist/assets/cadence-Bv_4Rxtq.js +1 -0
- package/web/dist/assets/cairo-KRGpt6FW.js +1 -0
- package/web/dist/assets/catppuccin-frappe-CZL1YF0i.js +1 -0
- package/web/dist/assets/catppuccin-latte-DH-8KZSZ.js +1 -0
- package/web/dist/assets/catppuccin-macchiato-B7yYVSCf.js +1 -0
- package/web/dist/assets/catppuccin-mocha-Ct7hS0mc.js +1 -0
- package/web/dist/assets/chapel-DTp_pixX.js +1 -0
- package/web/dist/assets/clarity-Dn5IMItf.js +1 -0
- package/web/dist/assets/clojure-P80f7IUj.js +1 -0
- package/web/dist/assets/cmake-D1j8_8rp.js +1 -0
- package/web/dist/assets/cobol-nBiQ_Alo.js +1 -0
- package/web/dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/web/dist/assets/codeql-DsOJ9woJ.js +1 -0
- package/web/dist/assets/coffee-Ch7k5sss.js +1 -0
- package/web/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/web/dist/assets/coq-C7JzOVbR.js +1 -0
- package/web/dist/assets/cpp-BMRokrvK.js +1 -0
- package/web/dist/assets/crystal-DGywbUpC.js +1 -0
- package/web/dist/assets/csharp-DSvCPggb.js +1 -0
- package/web/dist/assets/css-CLj8gQPS.js +1 -0
- package/web/dist/assets/csv-fuZLfV_i.js +1 -0
- package/web/dist/assets/cue-D82EKSYY.js +1 -0
- package/web/dist/assets/cypher-COkxafJQ.js +1 -0
- package/web/dist/assets/d-85-TOEBH.js +1 -0
- package/web/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/web/dist/assets/dart-bE4Kk8sk.js +1 -0
- package/web/dist/assets/dax-CEL-wOlO.js +1 -0
- package/web/dist/assets/desktop-BmXAJ9_W.js +1 -0
- package/web/dist/assets/diff-D97Zzqfu.js +1 -0
- package/web/dist/assets/docker-BcOcwvcX.js +1 -0
- package/web/dist/assets/dotenv-Da5cRb03.js +1 -0
- package/web/dist/assets/dracula-BzJJZx-M.js +1 -0
- package/web/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/web/dist/assets/dream-maker-BtqSS_iP.js +1 -0
- package/web/dist/assets/edge-FbVlp4U3.js +1 -0
- package/web/dist/assets/elixir-CkH2-t6x.js +1 -0
- package/web/dist/assets/elm-DbKCFpqz.js +1 -0
- package/web/dist/assets/emacs-lisp-C_m_b--Z.js +1 -0
- package/web/dist/assets/erb-DXfck5VN.js +1 -0
- package/web/dist/assets/erlang-DsQrWhSR.js +1 -0
- package/web/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/web/dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/web/dist/assets/fennel-BYunw83y.js +1 -0
- package/web/dist/assets/fish-BvzEVeQv.js +1 -0
- package/web/dist/assets/fluent-C4IJs8-o.js +1 -0
- package/web/dist/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/web/dist/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/web/dist/assets/fsharp-CXgrBDvD.js +1 -0
- package/web/dist/assets/gdresource-TyuKm33G.js +1 -0
- package/web/dist/assets/gdscript-DqcFQ5yU.js +1 -0
- package/web/dist/assets/gdshader-DkwncUOv.js +1 -0
- package/web/dist/assets/genie-D0YGMca9.js +1 -0
- package/web/dist/assets/gherkin-DyxjwDmM.js +1 -0
- package/web/dist/assets/git-commit-F4YmCXRG.js +1 -0
- package/web/dist/assets/git-rebase-r7XF79zn.js +1 -0
- package/web/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/web/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/web/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/web/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/web/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/web/dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/web/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/web/dist/assets/gleam-BspZqrRM.js +1 -0
- package/web/dist/assets/glimmer-js-ByusRIyA.js +1 -0
- package/web/dist/assets/glimmer-ts-BfAWNZQY.js +1 -0
- package/web/dist/assets/glsl-DplSGwfg.js +1 -0
- package/web/dist/assets/gn-n2N0HUVH.js +1 -0
- package/web/dist/assets/gnuplot-DdkO51Og.js +1 -0
- package/web/dist/assets/go-C27-OAKa.js +1 -0
- package/web/dist/assets/graphql-ChdNCCLP.js +1 -0
- package/web/dist/assets/groovy-gcz8RCvz.js +1 -0
- package/web/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/web/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/web/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/web/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/web/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/web/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/web/dist/assets/hack-BWmVpMyf.js +1 -0
- package/web/dist/assets/haml-D5jkg6IW.js +1 -0
- package/web/dist/assets/handlebars-BpdQsYii.js +1 -0
- package/web/dist/assets/haskell-Df6bDoY_.js +1 -0
- package/web/dist/assets/haxe-CfZj7gIn.js +1 -0
- package/web/dist/assets/hcl-BWvSN4gD.js +1 -0
- package/web/dist/assets/hjson-D5-asLiD.js +1 -0
- package/web/dist/assets/hlsl-D3lLCCz7.js +1 -0
- package/web/dist/assets/horizon-BUw7H-hv.js +1 -0
- package/web/dist/assets/horizon-bright-CUuTKBJd.js +1 -0
- package/web/dist/assets/houston-DnULxvSX.js +1 -0
- package/web/dist/assets/html-derivative-DlHx6ybY.js +1 -0
- package/web/dist/assets/html-pp8916En.js +1 -0
- package/web/dist/assets/http-jrhK8wxY.js +1 -0
- package/web/dist/assets/hurl-irOxFIW8.js +1 -0
- package/web/dist/assets/hxml-2-FPmUDs.js +1 -0
- package/web/dist/assets/hy-DFXneXwc.js +1 -0
- package/web/dist/assets/{icons-DLsYqrD5.js → icons-Cu8fYt4q.js} +1 -1
- package/web/dist/assets/imba-DGztddWO.js +1 -0
- package/web/dist/assets/index-Bg6EQpr3.js +484 -0
- package/web/dist/assets/index-CYAcRfnc.css +1 -0
- package/web/dist/assets/ini-BEwlwnbL.js +1 -0
- package/web/dist/assets/java-CylS5w8V.js +1 -0
- package/web/dist/assets/javascript-wDzz0qaB.js +1 -0
- package/web/dist/assets/jinja-f2NsQr07.js +1 -0
- package/web/dist/assets/jison-wvAkD_A8.js +1 -0
- package/web/dist/assets/json-Cp-IABpG.js +1 -0
- package/web/dist/assets/json5-C9tS-k6U.js +1 -0
- package/web/dist/assets/jsonc-Des-eS-w.js +1 -0
- package/web/dist/assets/jsonl-DcaNXYhu.js +1 -0
- package/web/dist/assets/jsonnet-DFQXde-d.js +1 -0
- package/web/dist/assets/jssm-C2t-YnRu.js +1 -0
- package/web/dist/assets/jsx-g9-lgVsj.js +1 -0
- package/web/dist/assets/julia-5Bft2YPA.js +1 -0
- package/web/dist/assets/just-Cwhn7H3k.js +1 -0
- package/web/dist/assets/kanagawa-dragon-BuwD2xS4.js +1 -0
- package/web/dist/assets/kanagawa-lotus-C3DzagqV.js +1 -0
- package/web/dist/assets/kanagawa-wave-DFGoQZhC.js +1 -0
- package/web/dist/assets/kdl-DV7GczEv.js +1 -0
- package/web/dist/assets/kotlin-BdnUsdx6.js +1 -0
- package/web/dist/assets/kusto-wEQ09or8.js +1 -0
- package/web/dist/assets/laserwave-DUszq2jm.js +1 -0
- package/web/dist/assets/latex-D5pSuvFb.js +1 -0
- package/web/dist/assets/lean-BZvkOJ9d.js +1 -0
- package/web/dist/assets/less-B1dDrJ26.js +1 -0
- package/web/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/web/dist/assets/liquid-C0sCDyMI.js +1 -0
- package/web/dist/assets/llvm-BZoOZj88.js +1 -0
- package/web/dist/assets/log-2UxHyX5q.js +1 -0
- package/web/dist/assets/logo-BtOb2qkB.js +1 -0
- package/web/dist/assets/lua-BaeVxFsk.js +1 -0
- package/web/dist/assets/luau-BnpPk5vE.js +1 -0
- package/web/dist/assets/make-CHLpvVh8.js +1 -0
- package/web/dist/assets/{markdown-tZ6sw2sR.js → markdown-Bym7wmT0.js} +8 -8
- package/web/dist/assets/markdown-Cvjx9yec.js +1 -0
- package/web/dist/assets/marko-DjSrsDqO.js +1 -0
- package/web/dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/web/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/web/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/web/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/web/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/web/dist/assets/matlab-D7o27uSR.js +1 -0
- package/web/dist/assets/mdc-D1_yUvq7.js +1 -0
- package/web/dist/assets/mdx-Cmh6b_Ma.js +1 -0
- package/web/dist/assets/mermaid-CQcHuHx7.js +1 -0
- package/web/dist/assets/min-dark-CafNBF8u.js +1 -0
- package/web/dist/assets/min-light-CTRr51gU.js +1 -0
- package/web/dist/assets/mipsasm-CKIfxQSi.js +1 -0
- package/web/dist/assets/mojo-DJz3ZmWd.js +1 -0
- package/web/dist/assets/monokai-BRVnQi9A.js +1 -0
- package/web/dist/assets/moonbit-CHtswR0a.js +1 -0
- package/web/dist/assets/move-el3G9tDJ.js +1 -0
- package/web/dist/assets/narrat-DRg8JJMk.js +1 -0
- package/web/dist/assets/nextflow-C-mBbutL.js +1 -0
- package/web/dist/assets/nextflow-groovy-vE_lwT2v.js +1 -0
- package/web/dist/assets/nginx-BpAMiNFr.js +1 -0
- package/web/dist/assets/night-owl-C39BiMTA.js +1 -0
- package/web/dist/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/web/dist/assets/nim-BIad80T-.js +1 -0
- package/web/dist/assets/nix-CwoSXNpI.js +1 -0
- package/web/dist/assets/nord-Ddv68eIx.js +1 -0
- package/web/dist/assets/nsis-BlV79W_Q.js +1 -0
- package/web/dist/assets/nushell-D3jzshHO.js +1 -0
- package/web/dist/assets/objective-c-DXmwc3jG.js +1 -0
- package/web/dist/assets/objective-cpp-CLxacb5B.js +1 -0
- package/web/dist/assets/ocaml-C0hk2d4L.js +1 -0
- package/web/dist/assets/odin-BBf5iR-q.js +1 -0
- package/web/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/web/dist/assets/one-light-C3Wv6jpd.js +1 -0
- package/web/dist/assets/openscad-C4EeE6gA.js +1 -0
- package/web/dist/assets/org-DM6o9KBp.js +1 -0
- package/web/dist/assets/{panels-wDJMsvra.js → panels-BEKHl5l-.js} +1 -1
- package/web/dist/assets/pascal-D93ZcfNL.js +1 -0
- package/web/dist/assets/perl-B9cMNwum.js +1 -0
- package/web/dist/assets/php-Csjmro_R.js +1 -0
- package/web/dist/assets/pkl-u5AG7uiY.js +1 -0
- package/web/dist/assets/plastic-3e1v2bzS.js +1 -0
- package/web/dist/assets/plsql-ChMvpjG-.js +1 -0
- package/web/dist/assets/po-BTJTHyun.js +1 -0
- package/web/dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/web/dist/assets/polar-C0HS_06l.js +1 -0
- package/web/dist/assets/postcss-CXtECtnM.js +1 -0
- package/web/dist/assets/powerquery-CEu0bR-o.js +1 -0
- package/web/dist/assets/powershell-BmBUJMz7.js +1 -0
- package/web/dist/assets/prisma-Vru482bI.js +1 -0
- package/web/dist/assets/prolog-CbFg5uaA.js +1 -0
- package/web/dist/assets/proto-C7zT0LnQ.js +1 -0
- package/web/dist/assets/pug-DKIMFp6K.js +1 -0
- package/web/dist/assets/puppet-BMWR74SV.js +1 -0
- package/web/dist/assets/purescript-CklMAg4u.js +1 -0
- package/web/dist/assets/python-B6aJPvgy.js +1 -0
- package/web/dist/assets/qml-3beO22l8.js +1 -0
- package/web/dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/web/dist/assets/qss-IeuSbFQv.js +1 -0
- package/web/dist/assets/r-Cf5RLm7j.js +1 -0
- package/web/dist/assets/racket-BqYA7rlc.js +1 -0
- package/web/dist/assets/raku-DXvB9xmW.js +1 -0
- package/web/dist/assets/razor-BjBPvh-w.js +1 -0
- package/web/dist/assets/rbs-CpoqiR4B.js +1 -0
- package/web/dist/assets/{react-vendor-BRkWBfPR.js → react-vendor-D76F8wnc.js} +1 -1
- package/web/dist/assets/red-hvxz__6c.js +1 -0
- package/web/dist/assets/reg-C-SQnVFl.js +1 -0
- package/web/dist/assets/regexp-CDVJQ6XC.js +1 -0
- package/web/dist/assets/rel-C3B-1QV4.js +1 -0
- package/web/dist/assets/riscv-BM1_JUlF.js +1 -0
- package/web/dist/assets/ron-D8l8udqQ.js +1 -0
- package/web/dist/assets/rose-pine-5qJOZa0Y.js +1 -0
- package/web/dist/assets/rose-pine-dawn-zx0QlTCp.js +1 -0
- package/web/dist/assets/rose-pine-moon-C9pEdX9L.js +1 -0
- package/web/dist/assets/rosmsg-BJDFO7_C.js +1 -0
- package/web/dist/assets/rst-bs7f0vWN.js +1 -0
- package/web/dist/assets/ruby-C0TQ7zu5.js +1 -0
- package/web/dist/assets/rust-B1yitclQ.js +1 -0
- package/web/dist/assets/sas-DEy46yEz.js +1 -0
- package/web/dist/assets/sass-Cj5Yp3dK.js +1 -0
- package/web/dist/assets/scala-CqE71os6.js +1 -0
- package/web/dist/assets/scheme-C98Dy4si.js +1 -0
- package/web/dist/assets/scss-D5BDwBP9.js +1 -0
- package/web/dist/assets/sdbl-DVxCFoDh.js +1 -0
- package/web/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/web/dist/assets/shellscript-Yzrsuije.js +1 -0
- package/web/dist/assets/shellsession-BADoaaVG.js +1 -0
- package/web/dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/web/dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/web/dist/assets/smalltalk-BOQMe2GC.js +1 -0
- package/web/dist/assets/smithy-cds9vsN8.js +1 -0
- package/web/dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/web/dist/assets/solarized-dark-CpvCGNkr.js +1 -0
- package/web/dist/assets/solarized-light-Dlz6yCKv.js +1 -0
- package/web/dist/assets/solidity-DijEV5ha.js +1 -0
- package/web/dist/assets/soy-8wufbnw4.js +1 -0
- package/web/dist/assets/sparql-rVzFXLq3.js +1 -0
- package/web/dist/assets/splunk-BtCnVYZw.js +1 -0
- package/web/dist/assets/sql-CRqJ_cUM.js +1 -0
- package/web/dist/assets/ssh-config-_ykCGR6B.js +1 -0
- package/web/dist/assets/stata-DI20mbqo.js +1 -0
- package/web/dist/assets/{state-B80cA8v4.js → state-CZakZ3-m.js} +1 -1
- package/web/dist/assets/sttLanguages-BNRptAQA.js +1 -0
- package/web/dist/assets/stylus-BEDo0Tqx.js +1 -0
- package/web/dist/assets/surrealql-Cjom0U5J.js +1 -0
- package/web/dist/assets/svelte-Cy7k_4gC.js +1 -0
- package/web/dist/assets/swift-C2oV4EkX.js +1 -0
- package/web/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/web/dist/assets/system-verilog-0hqHdDBg.js +1 -0
- package/web/dist/assets/systemd-4A_iFExJ.js +1 -0
- package/web/dist/assets/talonscript-CkByrt1z.js +1 -0
- package/web/dist/assets/tasl-QIJgUcNo.js +1 -0
- package/web/dist/assets/tcl-dwOrl1Do.js +1 -0
- package/web/dist/assets/templ-DhtptRzy.js +1 -0
- package/web/dist/assets/terraform-BETggiCN.js +1 -0
- package/web/dist/assets/tex-D96PA37w.js +1 -0
- package/web/dist/assets/tokyo-night-hegEt444.js +1 -0
- package/web/dist/assets/toml-vGWfd6FD.js +1 -0
- package/web/dist/assets/ts-tags-D351s5mN.js +1 -0
- package/web/dist/assets/tsv-B_m7g4N7.js +1 -0
- package/web/dist/assets/tsx-COt5Ahok.js +1 -0
- package/web/dist/assets/turtle-BsS91CYL.js +1 -0
- package/web/dist/assets/twig-27uCiNez.js +1 -0
- package/web/dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/web/dist/assets/typespec-CAFt9gP4.js +1 -0
- package/web/dist/assets/typst-BUadGCkm.js +1 -0
- package/web/dist/assets/v-BGw2Nkan.js +1 -0
- package/web/dist/assets/vala-CsfeWuGM.js +1 -0
- package/web/dist/assets/vb-Cu-pLBUe.js +1 -0
- package/web/dist/assets/verilog-nZwndyjY.js +1 -0
- package/web/dist/assets/vesper-DRje8inN.js +1 -0
- package/web/dist/assets/vhdl-CeAyd5Ju.js +1 -0
- package/web/dist/assets/viml-CJc9bBzg.js +1 -0
- package/web/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/web/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/web/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/web/dist/assets/vue-BqiEGhQt.js +1 -0
- package/web/dist/assets/vue-html-AaS7Mt5G.js +1 -0
- package/web/dist/assets/vue-vine-BoDAl6tE.js +1 -0
- package/web/dist/assets/vyper-CDx5xZoG.js +1 -0
- package/web/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/web/dist/assets/wasm-MzD3tlZU.js +1 -0
- package/web/dist/assets/wenyan-BV7otONQ.js +1 -0
- package/web/dist/assets/wgsl-Dx-B1_4e.js +1 -0
- package/web/dist/assets/wikitext-BhOHFoWU.js +1 -0
- package/web/dist/assets/wit-5i3qLPDT.js +1 -0
- package/web/dist/assets/wolfram-lXgVvXCa.js +1 -0
- package/web/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/web/dist/assets/xsl-CtQFsRM5.js +1 -0
- package/web/dist/assets/yaml-Buea-lGh.js +1 -0
- package/web/dist/assets/zenscript-DVFEvuxE.js +1 -0
- package/web/dist/assets/zig-VOosw3JB.js +1 -0
- package/web/dist/index.html +7 -7
- package/web/dist/assets/AutomationView-ClGqJM46.js +0 -1
- package/web/dist/assets/ChannelConfigView-BcGUdK94.js +0 -8
- package/web/dist/assets/ModelsView-DVTuTql9.js +0 -1
- package/web/dist/assets/SessionGrid-ByIAFTc2.js +0 -38
- package/web/dist/assets/SettingsPanel-CHRy0Xqj.js +0 -4
- package/web/dist/assets/index-Bht_ARrv.css +0 -1
- package/web/dist/assets/index-DEninW1j.js +0 -70
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ThreeScene-CukEnQe-.js","assets/markdown-Bym7wmT0.js","assets/icons-Cu8fYt4q.js","assets/ThreeScene-DvOrMIoG.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as e,r as ys}from"./markdown-Bym7wmT0.js";import{a as i,g as ws,af as Nn,aQ as vs,O as nt,F as et,T as Ns,aO as js,_ as jn,ak as Se,d as be,K as we,ae as Ss,a1 as At,aA as ve,X as Ce,aR as wt,E as Sn,$ as Ee,l as vt,L as Fe,u as Ct,aS as Nt,aH as Es,D as As,k as Cs,aT as En,aw as Ts,aU as Ht,aV as Rs,h as qe,al as Is,i as An,aW as _s,aX as Ms,aY as Ds,b as Ls,aq as $s,aZ as Os,aG as Fs,a_ as Ps,a0 as Ut,B as zs,ap as Bs,a$ as Hs,n as Cn,aN as Tt,aM as Us,a6 as Tn,ab as Gs,a2 as Rn,b0 as qs,b1 as Ws,ag as Ks,b2 as Js,f as Xs,S as Vs,t as Ys,b3 as $e,y as Zs,b4 as Qs,m as er,b5 as tr,p as nr,q as sr,j as rr}from"./icons-Cu8fYt4q.js";import{D as ar,d as re,u as q,h as Ke,i as In,o as _n,j as We,k as Mn,w as ce,l as jt,b as je,R as Dn,a as xe,t as le,m as ir,s as or,r as lr,f as tt,n as fe,p as cr,q as dr,_ as ur,W as pr,v as xr,x as St,c as Ze,y as Ue,z as mr,A as hr,E as fr,F as gr,M as br,G as kr,H as yr,J as Ln,K as wr,L as vr,N as Nr,O as Ve,Q as jr,S as $n}from"./index-Bg6EQpr3.js";import{r as Sr}from"./react-vendor-D76F8wnc.js";import{n as Gt,s as Er,S as Ar}from"./sttLanguages-BNRptAQA.js";import"./state-CZakZ3-m.js";import"./panels-BEKHl5l-.js";class Cr extends ar{tokenize(t){return t.slice()}join(t){return t}removeEmpty(t){return t}}const Tr=new Cr;function Rr(s,t,n){return Tr.diff(s,t,n)}function qt({value:s,max:t=100,size:n="md",variant:r="default",showLabel:a=!1,className:o}){const d=Math.min(Math.max(s/t*100,0),100),u={sm:"h-1",md:"h-2",lg:"h-3"},c={default:"bg-accent-blue",success:"bg-accent-green",warning:"bg-accent-yellow",error:"bg-accent-red"};return e.jsxs("div",{className:re("w-full",o),children:[e.jsx("div",{className:re("w-full bg-dark-border rounded-full overflow-hidden",u[n]),children:e.jsx("div",{className:re("h-full rounded-full transition-all duration-300",c[r]),style:{width:`${d}%`}})}),a&&e.jsxs("span",{className:"text-xs text-dark-muted mt-1",children:[Math.round(d),"%"]})]})}function On(s){const t=i.useRef(null),n=i.useRef(0);return i.useEffect(()=>{if(!s){n.current=0;return}n.current=Date.now();const r=t.current;if(!r)return;const a=()=>{const d=Math.floor((Date.now()-n.current)/1e3),u=d>=60?`${Math.floor(d/60)}m ${d%60}s`:`${d}s`;r.textContent=u};a();const o=setInterval(a,1e3);return()=>clearInterval(o)},[s]),t}var Ir=ys();const Wt=ws(Ir);Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(s){s.type==="entity"&&(s.attributes.title=s.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};a["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",o)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(s,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+s+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;var Kt={},Jt;function _r(){return Jt||(Jt=1,(function(s){s.languages.typescript=s.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),s.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete s.languages.typescript.parameter,delete s.languages.typescript["literal-property"];var t=s.languages.extend("typescript",{});delete t["class-name"],s.languages.typescript["class-name"].inside=t,s.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),s.languages.ts=s.languages.typescript})(Prism)),Kt}_r();(function(s){var t=s.util.clone(s.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(c,l){return c=c.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return a}),RegExp(c,l)}a=o(a).source,s.languages.jsx=s.languages.extend("markup",t),s.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),s.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,s.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,s.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,s.languages.jsx.tag.inside.comment=t.comment,s.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:s.languages.jsx}},s.languages.jsx.tag),s.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:s.languages.jsx}}},s.languages.jsx.tag);var d=function(c){return c?typeof c=="string"?c:typeof c.content=="string"?c.content:c.content.map(d).join(""):""},u=function(c){for(var l=[],p=0;p<c.length;p++){var x=c[p],f=!1;if(typeof x!="string"&&(x.type==="tag"&&x.content[0]&&x.content[0].type==="tag"?x.content[0].content[0].content==="</"?l.length>0&&l[l.length-1].tagName===d(x.content[0].content[1])&&l.pop():x.content[x.content.length-1].content==="/>"||l.push({tagName:d(x.content[0].content[1]),openedBraces:0}):l.length>0&&x.type==="punctuation"&&x.content==="{"?l[l.length-1].openedBraces++:l.length>0&&l[l.length-1].openedBraces>0&&x.type==="punctuation"&&x.content==="}"?l[l.length-1].openedBraces--:f=!0),(f||typeof x=="string")&&l.length>0&&l[l.length-1].openedBraces===0){var g=d(x);p<c.length-1&&(typeof c[p+1]=="string"||c[p+1].type==="plain-text")&&(g+=d(c[p+1]),c.splice(p+1,1)),p>0&&(typeof c[p-1]=="string"||c[p-1].type==="plain-text")&&(g=d(c[p-1])+g,c.splice(p-1,1),p--),c[p]=new s.Token("plain-text",g,null,g)}x.content&&typeof x.content!="string"&&u(x.content)}};s.hooks.add("after-tokenize",function(c){c.language!=="jsx"&&c.language!=="tsx"||u(c.tokens)})})(Prism);(function(s){var t=s.util.clone(s.languages.typescript);s.languages.tsx=s.languages.extend("jsx",t),delete s.languages.tsx.parameter,delete s.languages.tsx["literal-property"];var n=s.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(Prism);(function(s){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var n=s.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(s){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};s.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=s.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,d=0;d<a.length;d++)o[a[d]]=s.languages.bash[a[d]];s.languages.sh=s.languages.bash,s.languages.shell=s.languages.bash})(Prism);var Xt={},Vt;function Mr(){return Vt||(Vt=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Xt}Mr();(function(s){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(p){return p=p.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:s.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(p){["url","bold","italic","strike","code-snippet"].forEach(function(x){p!==x&&(s.languages.markdown[p].inside.content.inside[x]=s.languages.markdown[x])})}),s.hooks.add("after-tokenize",function(p){if(p.language!=="markdown"&&p.language!=="md")return;function x(f){if(!(!f||typeof f=="string"))for(var g=0,b=f.length;g<b;g++){var y=f[g];if(y.type!=="code"){x(y.content);continue}var w=y.content[1],h=y.content[3];if(w&&h&&w.type==="code-language"&&h.type==="code-block"&&typeof w.content=="string"){var A=w.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");A=(/[a-z][\w-]*/i.exec(A)||[""])[0].toLowerCase();var P="language-"+A;h.alias?typeof h.alias=="string"?h.alias=[h.alias,P]:h.alias.push(P):h.alias=[P]}}}x(p.tokens)}),s.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var x="",f=0,g=p.classes.length;f<g;f++){var b=p.classes[f],y=/language-(.+)/.exec(b);if(y){x=y[1];break}}var w=s.languages[x];if(w)p.content=s.highlight(l(p.content),w,x);else if(x&&x!=="none"&&s.plugins.autoloader){var h="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);p.attributes.id=h,s.plugins.autoloader.loadLanguages(x,function(){var A=document.getElementById(h);A&&(A.innerHTML=s.highlight(A.textContent,s.languages[x],x))})}}});var d=RegExp(s.languages.markup.tag.pattern.source,"gi"),u={amp:"&",lt:"<",gt:">",quot:'"'},c=String.fromCodePoint||String.fromCharCode;function l(p){var x=p.replace(d,"");return x=x.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,g){if(g=g.toLowerCase(),g[0]==="#"){var b;return g[1]==="x"?b=parseInt(g.slice(2),16):b=Number(g.slice(1)),c(b)}else{var y=u[g];return y||f}}),x}s.languages.md=s.languages.markdown})(Prism);(function(s){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function d(u,c){c=(c||"").replace(/m/g,"")+"m";var l=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return u});return RegExp(l,c)}s.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:d(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:d(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:d(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:d(o),lookbehind:!0,greedy:!0},number:{pattern:d(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},s.languages.yml=s.languages.yaml})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];var Yt={},Zt;function Dr(){return Zt||(Zt=1,(function(s){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),s.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},s.languages.rust["closure-params"].inside.rest=s.languages.rust,s.languages.rust.attribute.inside.string=s.languages.rust.string})(Prism)),Yt}Dr();var Qt={},en;function Lr(){return en||(en=1,(function(s){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};s.languages.java=s.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[s.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),s.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),s.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),Qt}Lr();Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;var tn={},nn;function $r(){return nn||(nn=1,(function(s){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});s.languages.cpp=s.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),s.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),s.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s.languages.cpp}}}}),s.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),s.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:s.languages.extend("cpp",{})}}),s.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},s.languages.cpp["base-clause"])})(Prism)),tn}$r();(function(s){function t(n,r){return"___"+n.toUpperCase()+r+"___"}Object.defineProperties(s.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var d=n.tokenStack=[];n.code=n.code.replace(a,function(u){if(typeof o=="function"&&!o(u))return u;for(var c=d.length,l;n.code.indexOf(l=t(r,c))!==-1;)++c;return d[c]=u,l}),n.grammar=s.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language!==r||!n.tokenStack)return;n.grammar=s.languages[r];var a=0,o=Object.keys(n.tokenStack);function d(u){for(var c=0;c<u.length&&!(a>=o.length);c++){var l=u[c];if(typeof l=="string"||l.content&&typeof l.content=="string"){var p=o[a],x=n.tokenStack[p],f=typeof l=="string"?l:l.content,g=t(r,p),b=f.indexOf(g);if(b>-1){++a;var y=f.substring(0,b),w=new s.Token(r,s.tokenize(x,n.grammar),"language-"+r,x),h=f.substring(b+g.length),A=[];y&&A.push.apply(A,d([y])),A.push(w),h&&A.push.apply(A,d([h])),typeof l=="string"?u.splice.apply(u,[c,1].concat(A)):l.content=A}}else l.content&&d(l.content)}return u}d(n.tokens)}}})})(Prism);var sn={},rn;function Or(){return rn||(rn=1,(function(s){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,a=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;s.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:a,punctuation:o};var d={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:s.languages.php},u=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:d}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:d}}];s.languages.insertBefore("php","variable",{string:u,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:u,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:a,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),s.hooks.add("before-tokenize",function(c){if(/<\?/.test(c.code)){var l=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;s.languages["markup-templating"].buildPlaceholders(c,"php",l)}}),s.hooks.add("after-tokenize",function(c){s.languages["markup-templating"].tokenizePlaceholders(c,"php")})})(Prism)),sn}Or();var an={},on;function Fr(){return on||(on=1,(function(s){s.languages.ruby=s.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),s.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:s.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete s.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;s.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),s.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete s.languages.ruby.string,s.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),s.languages.rb=s.languages.ruby})(Prism)),an}Fr();const Pr=.4;function ln(s){const t=[];let n=0;for(;n<s.length;){const r=s[n];if(/[\p{L}\p{N}_]/u.test(r)){let a=n+1;for(;a<s.length&&/[\p{L}\p{N}_]/u.test(s[a]);)a++;t.push(s.slice(n,a)),n=a}else if(/\s/.test(r)){let a=n+1;for(;a<s.length&&/\s/.test(s[a]);)a++;t.push(s.slice(n,a)),n=a}else{const o=s.codePointAt(n)>65535?2:1;t.push(s.slice(n,n+o)),n+=o}}return t}function zr(s,t){const n=Rr(ln(s),ln(t)),r=s.length+t.length;let a=0;const o=[],d=[];let u=0,c=0;for(const l of n){const p=l.value.reduce((x,f)=>x+f.length,0);l.removed?(a+=p,o.push({start:u,end:u+p}),u+=p):l.added?(a+=p,d.push({start:c,end:c+p}),c+=p):(u+=p,c+=p)}return r>0&&a/r>Pr?[[],[]]:[o,d]}function Fn(s){const t=[];let n=null;for(const r of s.split(`
|
|
3
|
+
`)){if(r.startsWith("---")||r.startsWith("+++")||r.startsWith("index ")||r.startsWith("diff --git")||r.startsWith("==="))continue;const a=r.match(/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);if(a){n&&t.push(n),n={oldStart:parseInt(a[1],10),oldLines:parseInt(a[2]??"1",10),newStart:parseInt(a[3],10),newLines:parseInt(a[4]??"1",10),lines:[]};continue}if(!r.startsWith("\\")){if(n&&(r.startsWith("+")||r.startsWith("-")||r.startsWith(" ")||r==="")){n.lines.push(r);continue}n&&r&&(t.push(n),n=null)}}return n&&t.push(n),t}function Pn(s){let t=s.oldStart,n=s.newStart;const r=[];for(const a of s.lines){const o=a[0]==="+"||a[0]==="-"?a[0]:" ",d=a.slice(1);let u=null,c=null;o==="-"?u=t++:(o==="+"||(u=t++),c=n++),r.push({marker:o,code:d,oldLine:u,newLine:c})}return r}const Br=i.memo(function({filePath:t,content:n,language:r}){if(!n&&!t)return null;const[a,o]=i.useState("unified"),[d,u]=i.useState(!1),c=Hr(t,r),l=(n==null?void 0:n.includes("@@"))||(n==null?void 0:n.includes("+++"))||(n==null?void 0:n.includes("---")),p=l?Ur(n||""):null;return e.jsxs("div",{className:"mt-2 border border-dark-border rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-dark-surface border-b border-dark-border",children:[e.jsx("span",{className:"text-accent-purple text-xs",children:"📝"}),e.jsx("span",{className:"text-xs font-mono text-dark-fg truncate",children:t||"file"}),p&&e.jsxs("span",{className:"text-xs ml-2 flex gap-2",children:[e.jsxs("span",{className:"text-green-400",children:["+",p.additions]}),e.jsxs("span",{className:"text-red-400",children:["-",p.deletions]})]}),e.jsx("span",{className:"text-xs text-dark-muted ml-auto",children:c}),l&&e.jsxs("div",{className:"flex gap-0.5 ml-2",children:[e.jsx("button",{onClick:()=>o("unified"),className:`text-xs px-1.5 py-0.5 rounded ${a==="unified"?"bg-accent-blue/20 text-accent-blue":"text-dark-muted hover:text-dark-fg"}`,title:"Unified view",children:"Unified"}),e.jsx("button",{onClick:()=>o("side-by-side"),className:`text-xs px-1.5 py-0.5 rounded ${a==="side-by-side"?"bg-accent-blue/20 text-accent-blue":"text-dark-muted hover:text-dark-fg"}`,title:"Side-by-side view",children:"Side"})]}),e.jsx("button",{onClick:()=>u(!d),className:"text-xs text-dark-muted hover:text-dark-fg ml-1",children:d?"▶":"▼"})]}),!d&&e.jsxs("div",{className:"bg-dark-bg overflow-x-auto max-h-96 overflow-y-auto custom-scrollbar",children:[l?a==="unified"?Kr(n||"",c):Jr(n||"",c):e.jsx("pre",{className:"text-xs font-mono p-2 text-dark-fg whitespace-pre-wrap",children:n||"(no content)"}),p&&e.jsxs("div",{className:"sticky bottom-0 bg-dark-surface border-t border-dark-border px-3 py-1 flex gap-4 text-xs text-dark-muted",children:[e.jsxs("span",{className:"text-green-400",children:["+",p.additions," additions"]}),e.jsxs("span",{className:"text-red-400",children:["-",p.deletions," deletions"]}),e.jsxs("span",{children:[p.hunks," hunks"]})]})]})]})});function Hr(s,t){var a;if(t)return t;if(!s)return"plaintext";const n=(a=s.split(".").pop())==null?void 0:a.toLowerCase();return{ts:"typescript",tsx:"typescript",mts:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",py:"python",go:"go",rs:"rust",cpp:"cpp",cxx:"cpp",hpp:"cpp",cc:"cpp",c:"cpp",h:"cpp",css:"css",scss:"css",html:"markup",htm:"markup",svg:"markup",xml:"xml",json:"json",yml:"yaml",yaml:"yaml",md:"markdown",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",php:"php",rb:"ruby"}[n||""]||"plaintext"}function Ur(s){const t=s.split(`
|
|
4
|
+
`);let n=0,r=0,a=0;for(const o of t)o.startsWith("@@")?a++:o.startsWith("+")&&!o.startsWith("+++")?n++:o.startsWith("-")&&!o.startsWith("---")&&r++;return{additions:n,deletions:r,hunks:a,filesChanged:1}}function Gr(s){const t=[],n=(a,o)=>{if(!o)return;const d=t[t.length-1];d&&d.type===a?d.text+=o:t.push({type:a,text:o})},r=(a,o)=>{if(typeof a=="string"){n(o,a);return}const d=a.type||o;if(typeof a.content=="string"){n(d,a.content);return}for(const u of a.content)r(u,d)};for(const a of s)r(a,"");return t}function zn(s,t){const n=Wt.languages[t];if(!n)return[{type:"",text:s}];try{return Gr(Wt.tokenize(s,n))}catch{return[{type:"",text:s}]}}function qr(s,t){if(t.length===0)return s.map(a=>({...a,word:!1}));const n=[];let r=0;for(const a of s){const o=r,d=r+a.text.length;let u=0;for(const c of t){const l=Math.max(0,c.start-o),p=Math.min(a.text.length,c.end-o);p<=0||l>=a.text.length||(l>u&&n.push({type:a.type,text:a.text.slice(u,l),word:!1}),n.push({type:a.type,text:a.text.slice(l,p),word:!0}),u=p)}u<a.text.length&&n.push({type:a.type,text:a.text.slice(u),word:!1}),r=d}return n}function Wr({code:s,marker:t,lang:n,ranges:r}){const a=t==="-"?[{type:"",text:s}]:zn(s,n),o=qr(a,r),d=t==="+"?"bg-green-900/30":t==="-"?"bg-red-900/30":"",u=t==="+"?"bg-green-700/60":"bg-red-700/60";return e.jsx("span",{className:`flex-1 whitespace-pre-wrap px-2 ${d}`,children:o.length===0?" ":o.map((c,l)=>e.jsx("span",{className:[c.type?`token ${c.type}`:"",c.word&&t!==" "?u:""].join(" "),children:c.text},l))})}function Kr(s,t){const n=Fn(s);if(n.length===0)return e.jsx("pre",{className:"text-xs font-mono p-2 text-dark-fg whitespace-pre-wrap",children:s});const r=[];let a=0;for(const o of n){const d=Pn(o);r.push(e.jsxs("div",{className:"flex text-xs font-mono leading-snug bg-accent-blue/5 text-accent-blue font-bold px-2",style:{minHeight:"1.25rem"},children:[e.jsx("span",{className:"select-none shrink-0 text-right pr-1",children:"@"}),e.jsxs("span",{className:"flex-1 whitespace-pre-wrap",children:["@@ -",o.oldStart,",",o.oldLines," +",o.newStart,",",o.newLines," @@"]})]},a++));const u=new Map;for(let c=0;c<d.length;){if(d[c].marker!=="-"){c++;continue}const l=c;for(;c<d.length&&d[c].marker==="-";)c++;const p=c;for(;c<d.length&&d[c].marker==="+";)c++;const x=Math.min(p-l,c-p);for(let f=0;f<x;f++){const[g,b]=zr(d[l+f].code,d[p+f].code);u.set(l+f,g),u.set(p+f,b)}}for(let c=0;c<d.length;c++){const l=d[c],p=l.marker==="+",x=l.marker==="-",f=p?"bg-green-900/30":x?"bg-red-900/30":"",g=l.marker==="-"?l.oldLine:l.newLine;r.push(e.jsxs("div",{className:"flex text-xs font-mono leading-snug",style:{minHeight:"1.25rem"},children:[e.jsxs("span",{className:`select-none shrink-0 w-9 text-right pr-1 ${f} ${p?"text-green-400":x?"text-red-400":"text-dark-muted"}`,children:[l.marker===" "?"":l.marker,g??""]}),e.jsx(Wr,{code:l.code,marker:l.marker,lang:t,ranges:u.get(c)??[]})]},a++))}}return e.jsx("div",{children:r})}function cn({code:s,lang:t,kind:n}){if(s==="")return e.jsx("span",{className:"flex-1 px-2 border-r border-dark-border/30 font-mono text-xs leading-snug",style:{minHeight:"1.25rem"},children:" "});const r=n==="remove"?[{type:"",text:s}]:zn(s,t),a=n==="add"?"bg-green-900/30":n==="remove"?"bg-red-900/30":"";return e.jsx("span",{className:`flex-1 px-2 border-r border-dark-border/30 font-mono text-xs leading-snug ${a}`,children:r.map((o,d)=>e.jsx("span",{className:o.type?`token ${o.type}`:"",children:o.text},d))})}function Jr(s,t){const n=Fn(s);if(n.length===0)return e.jsx("pre",{className:"text-xs font-mono p-2 text-dark-fg whitespace-pre-wrap",children:s});const r=[];for(const a of n){const o=Pn(a);r.push({left:`@@ -${a.oldStart},${a.oldLines} +${a.newStart},${a.newLines} @@`,right:"",type:"header"});let d=[],u=[];const c=()=>{(d.length>0||u.length>0)&&(Xr(r,d,u),d=[],u=[])};for(const l of o)l.marker==="-"?d.push(l.code):l.marker==="+"?u.push(l.code):(c(),r.push({left:l.code,right:l.code,type:"context"}));c()}return e.jsxs("div",{children:[e.jsxs("div",{className:"flex border-b border-dark-border text-xs font-bold text-dark-muted",children:[e.jsx("div",{className:"flex-1 px-2 py-0.5 border-r border-dark-border",children:"Old"}),e.jsx("div",{className:"flex-1 px-2 py-0.5",children:"New"})]}),r.map((a,o)=>a.type==="header"?e.jsx("div",{className:"bg-accent-blue/5 text-accent-blue font-bold font-mono text-xs leading-snug px-2",children:a.left},o):e.jsxs("div",{className:"flex",style:{minHeight:"1.25rem"},children:[e.jsx(cn,{code:a.type==="replace"||a.type==="delete"?"- "+a.left:a.left,lang:t,kind:a.type==="replace"||a.type==="delete"?"remove":"context"}),e.jsx(cn,{code:a.type==="replace"||a.type==="add"?"+ "+a.right:a.right,lang:t,kind:a.type==="replace"||a.type==="add"?"add":"context"})]},o))]})}function Xr(s,t,n){const r=Math.max(t.length,n.length);for(let a=0;a<r;a++){const o=a<t.length?t[a]??"":"",d=a<n.length?n[a]??"":"";s.push({left:o,right:d,type:a<t.length&&a<n.length?"replace":a<t.length?"delete":"add"})}}function Oe(s,t){let n=null;if(typeof s=="string")try{const r=JSON.parse(s);r&&typeof r=="object"&&!Array.isArray(r)&&(n=r)}catch{return""}else s&&typeof s=="object"&&!Array.isArray(s)&&(n=s);if(!n)return"";for(const r of t){const a=n[r];if(typeof a=="string"&&a)return a}return""}function Te(s){return typeof s=="string"?s:s&&typeof s=="object"?JSON.stringify(s,null,2):String(s??"")}function Vr(s){for(const t of s.split(`
|
|
5
|
+
`)){const n=t.trim();if(n)return n}return""}function Ae({label:s,tone:t="text-dark-muted",children:n}){return e.jsxs("div",{className:"px-2 py-1",children:[e.jsx("div",{className:`mb-0.5 text-[10px] ${t}`,children:s}),e.jsx("div",{className:"max-h-56 overflow-y-auto custom-scrollbar rounded border border-dark-border bg-dark-bg",children:n})]})}function Yr({toolCall:s}){const{t}=q(),n=Oe(s.args,["command","cmd","script"]),r=s.status==="error",a=Te(s.result);return e.jsxs("div",{className:"space-y-0.5 py-0.5",children:[n&&e.jsx(Ae,{label:t("step.params"),children:e.jsxs("pre",{className:"tv-pre",children:[e.jsx("span",{className:"select-none text-accent-green",children:"$ "}),n]})}),s.result!==void 0&&s.result!==null&&e.jsx(Ae,{label:t(r?"step.error":"step.result"),tone:r?"text-accent-red":"text-accent-green",children:e.jsx("pre",{className:`tv-pre ${r?"text-accent-red":""}`,children:a})})]})}function Zr({toolCall:s}){const t=Ke(s.args),n=Te(s.result),r=s.diff||(n&&(n.includes("@@")||n.includes("+++")||n.includes("---"))?n:void 0);return!r&&!n?e.jsx(Bn,{toolCall:s}):e.jsx("div",{className:"px-2 py-1",children:e.jsx(Br,{filePath:t,content:r||n})})}function Qr({toolCall:s}){const{t}=q(),n=Ke(s.args),r=s.status==="error",a=Te(s.result);return e.jsxs("div",{className:"space-y-0.5 py-0.5",children:[n&&e.jsx("div",{className:"flex items-center gap-1.5 px-2 pt-1 font-mono text-[10.5px] text-accent-blue",title:n,children:e.jsx("span",{className:"truncate",children:n})}),s.result!==void 0&&s.result!==null&&e.jsx(Ae,{label:t(r?"step.error":"step.result"),tone:r?"text-accent-red":"text-accent-green",children:e.jsx("pre",{className:`tv-pre ${r?"text-accent-red":""}`,children:a})})]})}const dn=20,ea=/\b(grep|search_contents)\b/i;function ta(s){return s===""?0:s.split(`
|
|
6
|
+
`).length}function na({toolCall:s}){const{t}=q(),n=Oe(s.args,["pattern","query","regex"]),r=s.status==="error",a=s.result!==void 0&&s.result!==null,o=a?Te(s.result):"",d=a?ta(o):0,u=ea.test(s.name),c=s.noTruncate!==!0&&u&&a&&!r&&d>dn,[l,p]=i.useState(!1),x=c&&!l?o.split(`
|
|
7
|
+
`).slice(0,dn).join(`
|
|
8
|
+
`)+`
|
|
9
|
+
${t("toolCall.linesTotal",{n:d})}`:o;return e.jsxs("div",{className:"space-y-0.5 py-0.5",children:[n&&e.jsx("div",{className:"flex items-center gap-1.5 px-2 pt-1 text-[10.5px] text-dark-muted",children:e.jsx("span",{className:"font-mono text-accent-blue",children:n})}),a&&e.jsx(Ae,{label:t(r?"step.error":"step.result"),tone:r?"text-accent-red":"text-accent-green",children:e.jsx("pre",{className:`tv-pre ${r?"text-accent-red":""}`,children:x})}),c&&e.jsx("div",{className:"px-2 pb-1",children:e.jsx("button",{type:"button","data-testid":"grep-result-toggle",onClick:()=>p(f=>!f),className:"text-[10px] text-accent-blue hover:underline",children:l?t("toolCall.collapse"):t("toolCall.expandAll",{n:d})})})]})}function sa({toolCall:s}){const{t}=q(),n=Oe(s.args,["url","query"]),r=s.status==="error",a=Te(s.result);return e.jsxs("div",{className:"space-y-0.5 py-0.5",children:[n&&e.jsx("div",{className:"truncate px-2 pt-1 font-mono text-[10.5px] text-accent-blue",title:n,children:n}),s.result!==void 0&&s.result!==null&&e.jsx(Ae,{label:t(r?"step.error":"step.result"),tone:r?"text-accent-red":"text-accent-green",children:e.jsx("pre",{className:`tv-pre ${r?"text-accent-red":""}`,children:a})})]})}function Bn({toolCall:s}){const{t}=q(),n=s.status==="error",r=s.result!==void 0&&s.result!==null;return e.jsxs("div",{className:"space-y-0.5 py-0.5",children:[e.jsx(Ae,{label:t("step.params"),children:e.jsx("pre",{className:"tv-pre",children:typeof s.args=="string"?s.args:JSON.stringify(s.args,null,2)})}),r&&e.jsx(Ae,{label:t(n?"step.error":"step.result"),tone:n?"text-accent-red":"text-accent-green",children:e.jsx("pre",{className:`tv-pre ${n?"text-accent-red":""}`,children:Te(s.result)})})]})}const ra=/(?:^|[_\W])(bash|powershell|pwsh|cmd|command|shell|exec|terminal)(?:[_\W]|$)/i,aa=/(?:^|[_\W])(read|cat|view|open)(?:[_\W]|$)/i,ia=/(?:^|[_\W])(grep|glob|search|find|list)(?:[_\W]|$)/i,oa=/(?:^|[_\W])(webfetch|websearch|fetch|web|http|curl|url)(?:[_\W]|$)/i;function Rt(s){return In(s)?"diff":ra.test(s)?"terminal":oa.test(s)?"web":ia.test(s)?"search":aa.test(s)?"read":"generic"}function la(s,t){const n=Rt(s);let r="";switch(n){case"terminal":r=Oe(t,["command","cmd","script"]);break;case"diff":case"read":r=Ke(t)??"";break;case"search":r=Oe(t,["pattern","query","regex","glob"]);break;case"web":r=Oe(t,["url","query"]);break;default:try{const o=typeof t=="string"?JSON.parse(t):t;r=o&&typeof o=="object"?JSON.stringify(o):String(t??"")}catch{r=typeof t=="string"?t:""}}const a=r.replace(/\s+/g," ").trim();return a.length>64?`${a.slice(0,63)}…`:a}function ca({toolCall:s}){switch(Rt(s.name)){case"terminal":return e.jsx(Yr,{toolCall:s});case"diff":return e.jsx(Zr,{toolCall:s});case"read":return e.jsx(Qr,{toolCall:s});case"search":return e.jsx(na,{toolCall:s});case"web":return e.jsx(sa,{toolCall:s});default:return e.jsx(Bn,{toolCall:s})}}const da={terminal:js,diff:Ns,read:et,search:nt,web:vs,generic:Nn},un=i.memo(function({toolCall:t,defaultCollapsed:n=!0}){const r=t.status==="running",a=On(r),o=t.result!==void 0&&t.result!==null,d=t.status==="error",u=In(t.name),c=o?Te(t.result):"",l=Ke(t.args),p=la(t.name,t.args),x=d&&o?Vr(c):"",[f,g]=i.useState(n),b=t.duration??0,y=b>0?b>=60?`${Math.floor(b/60)}m ${b%60}s`:`${b}s`:"",w=r?"bg-accent-blue":d?"bg-accent-red":"bg-accent-green",h=r?"running":d?"error":"success",A=da[Rt(t.name)];return e.jsxs("div",{className:"tl-row group rounded-lg transition-colors hover:bg-dark-surface/40","data-testid":"toolcall-row",children:[e.jsx("span",{className:"tl-line","aria-hidden":"true"}),e.jsxs("div",{className:"relative flex items-center gap-2 px-2 py-1 cursor-pointer select-none",onClick:()=>g(!f),"data-testid":"toolcall-row-header",children:[e.jsx("span",{className:"flex h-3 w-3 shrink-0 items-center justify-center",children:r?e.jsx("span",{className:"inline-block h-3 w-3 rounded-full border-2 border-accent-blue border-r-transparent animate-spin"}):e.jsx("span",{className:`tl-node ${w}`,"data-status":h})}),e.jsx("span",{className:`shrink-0 ${d?"text-accent-red":"text-dark-muted"}`,children:e.jsx(A,{size:12,"aria-hidden":"true"})}),e.jsx("span",{className:`font-medium text-[13px] shrink-0 truncate ${r?"text-shimmer":"text-dark-text"}`,children:t.name}),d&&x?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"shrink-0 text-dark-muted/50",children:"·"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] text-accent-red",title:c,children:x})]}):p?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"shrink-0 text-dark-muted/50",children:"·"}),e.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-dark-muted",title:p,children:p})]}):e.jsx("span",{className:"min-w-0 flex-1"}),u&&l&&!d&&e.jsxs("button",{type:"button",onClick:P=>{P.stopPropagation(),_n(l)},className:`flex max-w-[16rem] shrink-0 items-center gap-1 truncate rounded-full border border-dark-border/70 px-2 py-0.5 text-[11px] font-mono text-accent-blue
|
|
10
|
+
transition-colors hover:border-accent-blue/40 hover:bg-dark-hover`,title:l,children:[e.jsx(jn,{size:10,className:"shrink-0"}),e.jsx("span",{className:"truncate",children:l})]}),r&&e.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[11px] tabular-nums text-accent-blue",children:[e.jsx(Se,{size:10}),e.jsx("span",{ref:a,children:"0s"})]}),!r&&y&&e.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-[10px] tabular-nums text-dark-muted",children:[e.jsx(Se,{size:10}),e.jsx("span",{children:y})]}),e.jsx("span",{className:`ml-auto shrink-0 text-dark-muted/60 transition-transform ${f?"opacity-0 group-hover:opacity-100":"rotate-180"}`,children:e.jsx(be,{size:13})})]}),!f&&e.jsx("div",{className:"relative ml-[15px] pb-1 pl-3 border-l border-dark-border/25",children:e.jsx(ca,{toolCall:t})})]})}),It=i.memo(function({toolCalls:t,label:n,defaultCollapsed:r=!0}){const{t:a}=q(),[o,d]=i.useState(r),u=i.useMemo(()=>{const y=new Map;for(const w of t)y.set(w.name,(y.get(w.name)??0)+1);return[...y.entries()].sort((w,h)=>h[1]-w[1])},[t]),c=i.useMemo(()=>t.some(y=>y.status==="running")?"running":t.some(y=>y.status==="error")?"error":"completed",[t]);if(t.length===0)return null;if(t.length===1){const y=t[0];return e.jsx(un,{toolCall:y})}const p=u.slice(0,3),x=u.length-p.length,f=t.reduce((y,w)=>y+(w.duration??0),0),g=f>=60?`${Math.floor(f/60)}m ${f%60}s`:f>=1?`${f}s`:"",b=c==="running"?"bg-accent-blue":c==="error"?"bg-accent-red":"bg-accent-green";return e.jsxs("div",{className:"tl-row group rounded-lg transition-colors hover:bg-dark-surface/40","data-testid":"toolcall-group",children:[e.jsx("span",{className:"tl-line","aria-hidden":"true"}),e.jsxs("div",{className:"relative flex items-center gap-2 px-2 py-1 cursor-pointer select-none",onClick:()=>d(!o),"data-testid":"toolcall-group-toggle",children:[e.jsx("span",{className:"flex h-3 w-3 shrink-0 items-center justify-center",children:c==="running"?e.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-accent-blue border-r-transparent animate-spin"}):e.jsx("span",{className:`tl-node ${b}`,"data-status":c==="error"?"error":"success"})}),e.jsx("span",{className:"text-dark-muted shrink-0",children:e.jsx(Nn,{size:12,"aria-hidden":"true"})}),e.jsx("span",{className:"font-medium text-[13px] text-dark-text shrink-0","data-testid":"toolcall-group-count",children:a("activity.toolCallCount",{count:t.length})}),p.map(([y,w])=>e.jsxs("span",{className:"shrink-0 rounded-full bg-dark-muted/10 px-1.5 py-px text-[10.5px] font-mono text-dark-muted",children:[y," ×",w]},y)),x>0&&e.jsx("span",{className:"shrink-0 text-[10.5px] text-dark-muted",children:a("activity.toolNamesMore",{count:x})}),g&&e.jsx("span",{className:"shrink-0 text-[10px] text-dark-muted tabular-nums",children:g}),e.jsx("span",{className:`ml-auto shrink-0 text-dark-muted/60 transition-transform ${o?"opacity-0 group-hover:opacity-100":"rotate-180"}`,children:e.jsx(be,{size:13})})]}),!o&&e.jsxs("div",{className:"relative ml-[15px] pb-1 pl-3 border-l border-dark-border/25 space-y-0.5",children:[e.jsx("div",{className:"px-2 pt-0.5 text-[10px] uppercase tracking-wide text-dark-muted/60",children:n??a("activity.evidence")}),t.map(y=>e.jsx(un,{toolCall:y},y.id))]})]})}),ua=i.memo(function({text:t,maxLength:n=300,preformatted:r=!1}){const{t:a}=q(),[o,d]=i.useState(!1);return t.length>n?e.jsxs("div",{children:[r?e.jsx("pre",{className:"text-xs font-mono bg-dark-bg p-1.5 rounded overflow-x-auto custom-scrollbar mt-1 text-accent-green",children:o?t:t.slice(0,n)+"..."}):e.jsx("div",{className:"text-dark-text leading-snug",children:o?t:t.slice(0,n)+"..."}),e.jsx("button",{onClick:c=>{c.stopPropagation(),d(!o)},className:"mt-1 text-[10px] px-2 py-0.5 rounded bg-dark-hover text-accent-blue hover:bg-dark-border transition-colors",children:a(o?"common.collapse_short":"common.expand")})]}):r?e.jsx("pre",{className:"text-xs font-mono bg-dark-bg p-1.5 rounded overflow-x-auto custom-scrollbar mt-1 text-accent-green",children:t}):e.jsx("div",{className:"text-dark-text leading-snug",children:t})}),pa=i.memo(function({step:t,defaultCollapsed:n=!0}){const{t:r}=q(),[a,o]=i.useState(n),[d,u]=i.useState(!0),c=t.status==="running",l=On(c),p=t.description||t.thought||t.result||t.action||t.toolCalls&&t.toolCalls.length>0,x=t.duration??0,f=x>0?x>=60?`${Math.floor(x/60)}m ${x%60}s`:`${x}s`:"";return e.jsxs("div",{className:"tl-row rounded-lg transition-colors hover:bg-dark-surface/40","data-testid":"step-row",children:[e.jsx("span",{className:"tl-line","aria-hidden":"true"}),e.jsxs("div",{className:"relative flex items-center gap-2 px-2 py-1 cursor-pointer select-none",onClick:()=>p&&o(!a),children:[e.jsx("span",{className:"flex h-3 w-3 shrink-0 items-center justify-center",children:e.jsx("span",{className:"tl-node","data-status":t.status})}),e.jsx("span",{className:`text-[13px] truncate ${c?"text-shimmer":"text-dark-text"}`,children:t.title}),c&&e.jsxs("span",{className:"text-[11px] text-accent-blue shrink-0 flex items-center gap-1 tabular-nums",children:[e.jsx(Se,{size:10}),e.jsx("span",{ref:l,children:"0s"})]}),!c&&f&&e.jsxs("span",{className:"text-[10px] text-dark-muted shrink-0 flex items-center gap-1 tabular-nums",children:[e.jsx(Se,{size:10}),e.jsx("span",{children:f})]}),p&&e.jsx("span",{className:`ml-auto shrink-0 text-dark-muted/60 transition-transform ${a?"":"rotate-180"}`,children:e.jsx(be,{size:13})})]}),!a&&p&&e.jsxs("div",{className:"relative ml-[15px] pb-1 pl-3 border-l border-dark-border/25 space-y-1",children:[t.description&&e.jsx("div",{className:"text-dark-muted py-0.5 px-2 text-xs",children:t.description}),t.thought&&e.jsxs("div",{className:"py-0.5 px-2 text-xs border-l-2 border-accent-purple/40 bg-accent-purple/5 rounded-r",children:[e.jsxs("div",{className:"flex items-center gap-1 text-accent-purple cursor-pointer hover:opacity-80 select-none",onClick:()=>u(!d),children:[d?e.jsx(we,{size:12}):e.jsx(be,{size:12}),e.jsx(Ss,{size:12,"aria-hidden":"true"}),e.jsx("span",{children:r("step.thinking")}),d&&e.jsxs("span",{className:"text-[10px] text-dark-muted truncate max-w-[200px]",children:[t.thought.slice(0,80).replace(/\n/g," "),"..."]})]}),!d&&e.jsx("div",{className:"text-dark-muted italic whitespace-pre-wrap leading-snug mt-1",children:t.thought.replace(/\n\s*\n+/g,`
|
|
11
|
+
`)})]}),t.action&&e.jsxs("div",{className:"py-0.5 px-2 text-xs border-l-2 border-accent-yellow/40 bg-accent-yellow/5 rounded-r",children:[e.jsxs("div",{className:"flex items-center gap-1 text-accent-yellow mb-0.5",children:[e.jsx(At,{size:12,"aria-hidden":"true"}),e.jsx("span",{children:r("step.action")})]}),e.jsx("div",{className:"text-dark-text leading-snug font-mono text-[11px]",children:t.action})]}),t.toolCalls&&t.toolCalls.length>0&&e.jsx("div",{className:"px-1 py-0.5",children:e.jsx(It,{toolCalls:t.toolCalls})}),t.result&&e.jsxs("div",{className:"py-0.5 px-2 text-xs border-l-2 border-accent-green/40 bg-accent-green/5 rounded-r",children:[e.jsxs("div",{className:"flex items-center gap-1 text-accent-green mb-0.5",children:[e.jsx(ve,{size:12,"aria-hidden":"true"}),e.jsx("span",{children:r("step.result")})]}),e.jsx(ua,{text:t.result,maxLength:500})]})]})]})}),xa=i.memo(function({steps:t,isGenerating:n}){const{t:r}=q(),[a,o]=i.useState(n),d=i.useRef(n);i.useEffect(()=>{d.current&&!n&&o(!1),d.current=n},[n]);const u=t.length,c=n||t.some(g=>g.status==="running"),l=[...t].reverse().find(g=>g.status==="running"),p=t[t.length-1],x=(l==null?void 0:l.title)||(p==null?void 0:p.title)||"",f=`${u} ${r(u===1?"chat.stepCount":"chat.stepCountPlural")}`;return e.jsxs("div",{className:"mb-1 rounded-lg border border-dark-border/50 transition-colors","data-testid":"turn-group",children:[e.jsxs("button",{className:"flex w-full items-center gap-2 px-2 py-1 text-left cursor-pointer select-none hover:bg-dark-surface/40",onClick:()=>o(!a),"data-testid":"turn-group-toggle",children:[e.jsx("span",{className:"shrink-0 text-dark-muted/60 transition-transform",children:a?e.jsx(be,{size:13}):e.jsx(we,{size:13})}),c?e.jsx("span",{className:"flex h-3 w-3 shrink-0 items-center justify-center",children:e.jsx("span",{className:"tl-node bg-accent-blue","data-status":"running"})}):e.jsx("span",{className:"w-2 h-2 shrink-0 rounded-full bg-accent-green"}),e.jsx("span",{className:`text-xs ${c?"text-shimmer":"text-dark-muted"}`,children:c?`${r("chat.runningSteps")} ${f}…`:f}),c&&x&&e.jsxs("span",{className:"min-w-0 flex-1 truncate pl-1 text-xs text-dark-muted/70",children:["· ",x]})]}),a&&e.jsx("div",{className:"ml-[15px] pb-1 pl-3 border-l border-dark-border/25 space-y-0.5",children:t.map(g=>e.jsx(pa,{step:g},g.id))})]})});function Hn(s){const t=s??"";let n=t,r=null,a=null;try{const o=JSON.parse(t);if(o&&typeof o=="object")if("payload"in o){a=typeof o.toolName=="string"?o.toolName:null;const d=o.payload;typeof d=="string"?n=d:d&&typeof d=="object"?(r=d,n=JSON.stringify(d,null,2)):n=""}else Array.isArray(o)||(r=o)}catch{n=t}if(!r&&n.length>0&&/^[\s]*[{[]/.test(n))try{const o=JSON.parse(n);o&&typeof o=="object"&&!Array.isArray(o)&&(r=o)}catch{}return{toolName:a,payloadText:n,args:r}}const _t=/\b(bash|shell|exec|cmd|powershell|terminal)\b/i,Un=/write_file|write|save|create|upload|deploy|publish/i,Gn=/edit_file|edit|patch|apply|update|replace/i,qn=/read_file|read|view|cat|open|list|dir\b/i,ma=/file_delete|delete|remove|unlink|\brm\b|\bdel\b/i,ha=/\b(glob|find|locate)\b/i,fa=/\b(grep|rg|search_contents)\b/i,ga=/web_search|search_web|browse/i,Wn=/web_fetch|fetch|http|curl|wget|download|request|api/i,ba=/git|commit|merge|rebase|push|checkout/i,ka=/install|uninstall|npm|pnpm|yarn|pip|cargo|gem|apt|brew|choco/i,Mt=/send_message|send_file|message|notify|post/i;function Kn(s){const t=s.toLowerCase();return _t.test(t)?"verbRunCommand":ga.test(t)?"verbSearchWeb":Un.test(t)?"verbWriteFile":Gn.test(t)?"verbEditFile":ma.test(t)?"verbDeleteFile":qn.test(t)?"verbReadFile":fa.test(t)?"verbSearchContents":ha.test(t)?"verbFindFiles":Wn.test(t)?"verbFetchUrl":ba.test(t)?"verbGit":ka.test(t)?"verbInstall":Mt.test(t)?"verbSendMessage":"verbRunTool"}function dt(s,t){const n=(s??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function ya(s){if(!s)return null;for(const t of["file_path","filePath","path","file","target"]){const n=s[t];if(typeof n=="string"&&n.length>0)return n}return null}function Jn(s,t){const{payloadText:n,args:r}=Hn(t),a=s.toLowerCase();if(_t.test(a))return"";const o=ya(r);if(o)return o;const d=n.match(/(?:file_path|path|file)["\s:=]+([^\s",}]+)/i);if(d!=null&&d[1])return d[1];if(Wn.test(a)&&typeof(r==null?void 0:r.url)=="string"&&r.url)return dt(r.url,48);if(Mt.test(a)){const u=typeof(r==null?void 0:r.text)=="string"?r.text:typeof(r==null?void 0:r.message)=="string"?r.message:n;return dt(u,48)}return dt(n,48)}function Xn(s,t){const{payloadText:n,args:r}=Hn(t),a=s.toLowerCase();if(_t.test(a)){const o=typeof(r==null?void 0:r.command)=="string"?r.command:n;return o?{text:o,mono:!0}:null}if(Un.test(a)||Gn.test(a)){const o=typeof(r==null?void 0:r.content)=="string"?r.content:typeof(r==null?void 0:r.data)=="string"?r.data:"";if(o)return{text:o,mono:!0};if(r){const d=pn(r);if(d)return{text:d,mono:!0}}return n?{text:n,mono:!0}:null}if(Mt.test(a)){const o=typeof(r==null?void 0:r.text)=="string"?r.text:typeof(r==null?void 0:r.message)=="string"?r.message:n;return o?{text:o,mono:!1}:null}if(qn.test(a))return null;if(r){const o=pn(r);if(o)return{text:o,mono:!0}}return n?{text:n,mono:!0}:null}function pn(s){return s?Object.entries(s).filter(([,t])=>t!=null).map(([t,n])=>{let r=typeof n=="string"?n:JSON.stringify(n);return r.length>96&&(r=`${r.slice(0,95)}…`),`${t}=${r.replace(/\n/g," ")}`}).join(" "):""}function Vn(s,t){const n=We(t);return n?{path:n,external:!0}:{key:"scopeLocal",external:!1}}function Yn({pre:s,obj:t}){return e.jsxs("span",{className:"min-w-0 text-sm text-dark-muted",children:[e.jsx("span",{children:s}),t&&e.jsx("b",{className:"font-semibold text-dark-text",children:t})]})}const ut=5,pt=420;function Et({text:s,mono:t=!0}){const{t:n}=q("hook"),[r,a]=i.useState(!1),o=s.split(`
|
|
12
|
+
`),d=o.length>ut||s.length>pt;let u=s;!r&&d&&(u=o.slice(0,ut).join(`
|
|
13
|
+
`),u.length>pt&&(u=`${u.slice(0,pt).trimEnd()}…`));const c=r?n("showLess"):o.length>ut?n("showAllLines",{n:o.length}):n("showAll");return e.jsxs("div",{className:`rounded-lg border border-dark-border bg-dark-surface p-2.5 text-xs leading-relaxed break-all whitespace-pre-wrap ${t?"font-mono":""} text-dark-text`,children:[u,d&&e.jsx("button",{type:"button",onClick:()=>a(l=>!l),className:"mt-1 block text-[11px] text-accent-blue hover:underline",children:c})]})}const xt=15,wa=i.memo(function({approval:t,onResolved:n}){const{t:r}=q("hook"),[a,o]=i.useState(!1),[d,u]=i.useState(xt),c=i.useRef(null),l=t.status==="pending",{level:p,reasonKey:x}=Mn(t.toolName,t.askPayload),f=Dn[p],g=Xn(t.toolName,t.askPayload),b=Vn(t.toolName,t.askPayload),y=We(t.askPayload)!==null;i.useEffect(()=>{if(l)return u(xt),c.current=setInterval(()=>{u(S=>S<=1?(c.current&&clearInterval(c.current),0):S-1)},1e3),()=>{c.current&&clearInterval(c.current)}},[l,t.approvalId]),i.useEffect(()=>{const S=(t.timeoutMs??15e3)>0;d===0&&l&&!a&&S&&w()},[d]);const w=i.useCallback(()=>{!l||a||(o(!0),c.current&&clearInterval(c.current),ce.send({type:"hook_allow",data:JSON.stringify({approvalId:t.approvalId})}),n==null||n(t.approvalId,"approved"))},[l,a,t.approvalId,n]),h=i.useCallback(()=>{!l||a||(o(!0),c.current&&clearInterval(c.current),ce.send({type:"hook_deny",data:JSON.stringify({approvalId:t.approvalId})}),n==null||n(t.approvalId,"denied"))},[l,a,t.approvalId,n]),A=i.useCallback(()=>{if(!l||a)return;o(!0),c.current&&clearInterval(c.current);const S=jt.getState(),$=We(t.askPayload);$?(S.addToSessionAllowList(t.toolName,$),ce.send({type:"hook_allow",data:JSON.stringify({approvalId:t.approvalId,sessionAllow:!0})})):(S.addToSessionAllowList(t.toolName),ce.send({type:"hook_allow",data:JSON.stringify({approvalId:t.approvalId})})),n==null||n(t.approvalId,"approved")},[l,a,t.approvalId,t.toolName,t.askPayload,n]),P=i.useCallback(()=>{!l||a||(o(!0),c.current&&clearInterval(c.current),jt.getState().setAutoMode(!0),je.getState().setAuto(!0),ce.send({type:"hook_allow",data:JSON.stringify({approvalId:t.approvalId})}),n==null||n(t.approvalId,"approved"))},[l,a,t.approvalId,n]);if(!l){const S=t.status==="approved";return e.jsx("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-xs ${S?"bg-accent-green/10 border border-accent-green/30 text-accent-green":"bg-accent-red/10 border border-accent-red/30 text-accent-red"}`,children:S?e.jsxs(e.Fragment,{children:[e.jsx(ve,{size:14}),e.jsxs("span",{children:[r("alreadyAllowed"),t.toolName]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ce,{size:14}),e.jsxs("span",{children:[r("alreadyDenied"),t.toolName]})]})})}const R=d/xt*100,I=d<=5,L=[{id:"allow",index:1,label:r("optionAllow"),hint:r("optionAllowHint"),action:w,kind:"primary"},{id:"allow_session",index:3,label:r("optionAllowAlways"),hint:y?r("optionAllowPathHint"):r("optionAllowAlwaysHint",{tool:t.toolName}),action:A,kind:"secondary"},{id:"auto_mode",index:4,label:r("optionAutoMode"),hint:r("optionAutoModeHint"),action:P,kind:"secondary"},{id:"deny",index:2,label:r("optionDeny"),hint:r("optionDenyHint"),action:h,kind:"danger"}],j={primary:"bg-accent-blue text-white hover:opacity-90 shadow-sm",secondary:"border border-dark-border bg-dark-bg text-dark-text hover:bg-dark-hover",danger:"text-dark-muted hover:bg-red-500/10 hover:text-red-400"};return e.jsxs("div",{className:`bg-dark-bg border rounded-xl overflow-hidden ${b.external?"border-amber-500/40":f.border}`,children:[e.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 border-b ${f.bg} ${b.external?"border-amber-500/30":f.border}`,children:[e.jsxs("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-bold border shrink-0 ${rc.badge}",children:[f.icon," ",p]}),e.jsx("span",{className:"flex-none w-6 h-6 rounded-md bg-accent-blue/10 text-accent-blue inline-flex items-center justify-center",children:e.jsx(wt,{size:13})}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(Yn,{pre:r(Kn(t.toolName)),obj:Jn(t.toolName,t.askPayload)})}),b.external&&b.path?e.jsxs("span",{className:"flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-400 border border-amber-500/30 shrink-0",title:b.path,children:[e.jsx(Sn,{size:10}),b.path.length>32?`${b.path.slice(0,31)}…`:b.path]}):e.jsx("span",{className:"text-[10px] text-dark-muted/60 shrink-0",children:r("scopeLocal")}),e.jsxs("div",{className:"flex items-center gap-1.5 ml-1 shrink-0",children:[e.jsx(Se,{size:11,className:I?"text-accent-red":"text-dark-muted"}),e.jsxs("span",{className:`text-[11px] font-mono ${I?"text-accent-red animate-pulse":"text-dark-muted"}`,children:[d,"s"]}),e.jsx("div",{className:"w-10 h-1 bg-dark-border rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-1000 ${I?"bg-accent-red":d<=8?"bg-accent-yellow":"bg-accent-green"}`,style:{width:`${R}%`}})})]})]}),e.jsxs("div",{className:"px-3 py-2.5 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-dark-muted shrink-0",children:r("tool")}),e.jsx("code",{className:"text-accent-blue font-mono text-xs bg-dark-surface px-1.5 py-0.5 rounded",children:t.toolName}),e.jsx("span",{className:"text-[10px] text-dark-muted/50",children:r(x)})]}),g&&e.jsx(Et,{text:g.text,mono:g.mono}),(p==="CRITICAL"||p==="HIGH")&&e.jsxs("div",{className:`flex items-center gap-1.5 text-[11px] px-2 py-1 rounded ${f.bg} ${f.text}`,children:[e.jsx(Ee,{size:12}),e.jsx("span",{children:r(p==="CRITICAL"?"highRiskWarning":"mediumRiskConfirm")})]}),e.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pt-1",children:L.map(S=>e.jsxs("button",{onClick:S.action,disabled:a,className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs transition-colors disabled:opacity-50 ${j[S.kind]}`,children:[e.jsx("span",{className:`text-[9px] font-mono rounded px-0.5 ${S.kind==="primary"?"bg-white/20":"bg-dark-surface text-dark-muted"}`,children:S.index}),e.jsx("span",{children:S.label}),e.jsx("span",{className:`text-[10px] ${S.kind==="primary"?"text-white/70":"text-dark-muted/60"} hidden sm:inline`,children:S.hint})]},S.id))}),e.jsx("div",{className:"text-[10px] text-dark-muted/50 pt-0.5 border-t border-dark-border/50",children:r("clickToSelect")})]})]})}),Ye={xlsx:{icon:Nt},xls:{icon:Nt},csv:{icon:et},docx:{icon:et},text:{icon:Ct}};function xn(s){return!s&&s!==0?"—":s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(2)} MB`}const va=i.memo(function({job:t}){var f,g;const{t:n}=q(),{stage:r}=t,a=i.useCallback(b=>{switch(b){case"xlsx":case"xls":return"Excel";case"csv":return"CSV";case"docx":return"Word";default:return n("fileJob.kindText")}},[n]),o=i.useCallback(b=>{xe.files.download(b).then(y=>{y.success||le.error(y.error||n("fileJob.downloadFailed"))})},[n]),d=i.useMemo(()=>t.attachments||[],[t.attachments]),u=i.useMemo(()=>t.parsedFiles||[],[t.parsedFiles]),c=i.useMemo(()=>t.mapping||[],[t.mapping]),l=i.useMemo(()=>t.result||[],[t.result]),p=t.renderProgress??(r==="rendering"?0:100),x=t.parseProgress??(r==="parsing"?0:100);return e.jsxs("div",{className:"mt-2 rounded-xl border border-dark-border bg-dark-surface/60 overflow-hidden max-w-2xl",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-2.5 border-b border-dark-border/60 bg-dark-surface",children:[r==="complete"?e.jsx(vt,{size:15,className:"text-accent-green shrink-0"}):r==="error"?e.jsx(Ee,{size:15,className:"text-accent-red shrink-0"}):e.jsx(Fe,{size:15,className:"text-accent-blue animate-spin shrink-0"}),e.jsx("span",{className:"text-[13px] font-medium text-dark-text",children:Na(r,n)}),e.jsx("div",{className:"flex-1"}),e.jsx("span",{className:"text-[10px] font-mono text-dark-muted/60",children:t.jobId})]}),e.jsxs("div",{className:"px-3.5 py-3 space-y-3",children:[d.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:d.map((b,y)=>{const h=(Ye[b.kind]||Ye.text).icon;return e.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-dark-border bg-dark-bg px-2.5 py-1.5",children:[e.jsx(h,{size:14,className:"text-accent-blue shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs text-dark-text truncate max-w-[160px]",children:b.fileName}),e.jsxs("div",{className:"text-[10px] text-dark-muted",children:[xn(b.size)," · ",a(b.kind),b.role&&b.role!=="unknown"&&e.jsxs("span",{className:re("ml-1",b.role==="data"?"text-accent-green":"text-accent-purple"),children:["· ",b.role==="data"?n("fileJob.roleData"):n("fileJob.roleTemplate")]})]})]})]},`${b.fileName}-${y}`)})}),r==="parsing"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-xs text-dark-muted",children:n("fileJob.parsing",{file:((f=d[0])==null?void 0:f.fileName)||((g=u[0])==null?void 0:g.fileName)||""})}),e.jsx(qt,{value:x,size:"sm",showLabel:!0})]}),u.length>0&&r!=="error"&&e.jsxs("div",{className:"space-y-1.5",children:[u.map(b=>e.jsxs("div",{className:"flex items-center gap-2 text-xs text-dark-muted",children:[e.jsx(vt,{size:13,className:"text-accent-green shrink-0"}),e.jsx("span",{className:"truncate",children:b.fileName}),e.jsx("span",{className:"text-[10px] text-dark-muted/70",children:n("fileJob.parsedSummary",{rows:b.rowCount,fields:b.fields.length})})]},b.fileName)),u[0]&&e.jsxs("div",{className:"flex flex-wrap gap-1 pt-1",children:[u[0].fields.slice(0,12).map(b=>e.jsx("span",{className:"rounded bg-dark-bg border border-dark-border/60 px-1.5 py-0.5 text-[10px] font-mono text-dark-muted",children:b},b)),u[0].fields.length>12&&e.jsxs("span",{className:"text-[10px] text-dark-muted/60",children:["+",u[0].fields.length-12]})]})]}),c.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"text-[11px] text-dark-muted",children:n("fileJob.mappingTitle")}),e.jsx("div",{className:"overflow-hidden rounded-lg border border-dark-border",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-dark-bg text-dark-muted",children:[e.jsx("th",{className:"text-left px-2.5 py-1.5 font-medium",children:n("fileJob.templatePlaceholder")}),e.jsx("th",{className:"px-2 py-1.5"}),e.jsx("th",{className:"text-left px-2.5 py-1.5 font-medium",children:n("fileJob.dataField")})]})}),e.jsx("tbody",{children:c.slice(0,8).map(b=>e.jsxs("tr",{className:"border-t border-dark-border/50",children:[e.jsx("td",{className:"px-2.5 py-1.5 font-mono text-accent-purple",children:"{{"+b.placeholder+"}}"}),e.jsx("td",{className:"px-2 py-1.5 text-dark-muted",children:e.jsx(Es,{size:11})}),e.jsx("td",{className:"px-2.5 py-1.5 font-mono text-accent-blue",children:b.field})]},b.placeholder))})]})}),c.length>8&&e.jsx("div",{className:"text-[10px] text-dark-muted/60",children:n("fileJob.mappingMore",{n:c.length-8})})]}),r==="rendering"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-xs text-dark-muted",children:n("fileJob.rendering",{current:t.currentRow||0,total:t.totalRows||0})}),e.jsx(qt,{value:p,size:"sm",variant:"warning",showLabel:!0})]}),l.length>0&&r==="complete"&&e.jsx("div",{className:"space-y-1.5",children:l.map(b=>{const w=(Ye[b.format]||Ye.text).icon,h=b.failedRows.length>0;return e.jsxs("div",{className:"rounded-lg border border-dark-border bg-dark-bg px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{size:15,className:"text-accent-green shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-xs text-dark-text truncate",children:b.fileName}),e.jsxs("div",{className:"text-[10px] text-dark-muted",children:[xn(b.size)," · ",n("fileJob.rowsDone",{done:b.successCount,total:b.rowCount}),h&&e.jsxs("span",{className:"text-accent-red",children:[" · ",n("fileJob.rowsFailed",{n:b.failedRows.length})]})]})]}),e.jsxs("button",{onClick:()=>_n(b.path),className:"flex items-center gap-1 rounded-md bg-dark-surface border border-dark-border text-dark-muted px-2 py-1 text-[11px] hover:bg-dark-hover hover:text-dark-text transition-colors",title:n("chat.previewInPanel"),children:[e.jsx(jn,{size:12}),n("chat.previewInPanel")]}),e.jsxs("button",{onClick:()=>o(b.path),className:"flex items-center gap-1 rounded-md bg-accent-blue/10 text-accent-blue px-2 py-1 text-[11px] hover:bg-accent-blue/20 transition-colors",title:n("fileJob.download"),children:[e.jsx(As,{size:12}),n("fileJob.download")]})]}),h&&e.jsxs("div",{className:"mt-1.5 space-y-0.5 border-t border-dark-border/50 pt-1.5",children:[b.failedRows.slice(0,3).map(A=>e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-accent-red",children:[e.jsx(Cs,{size:10,className:"shrink-0"}),e.jsxs("span",{children:["#",A.index+1]}),e.jsx("span",{className:"truncate",children:A.error})]},A.index)),b.failedRows.length>3&&e.jsx("div",{className:"text-[10px] text-dark-muted/70",children:n("fileJob.moreRows",{n:b.failedRows.length-3})})]})]},b.path)})}),r==="error"&&e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-accent-red/30 bg-accent-red/5 px-3 py-2.5",children:[e.jsx(Ee,{size:15,className:"text-accent-red shrink-0 mt-0.5"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-xs font-medium text-accent-red",children:t.error||n("fileJob.error")}),t.errorDetail&&e.jsx("div",{className:"mt-0.5 text-[11px] text-dark-muted break-words",children:t.errorDetail})]})]})]})]})});function Na(s,t){switch(s){case"uploaded":return t("fileJob.stageUploaded");case"parsing":return t("fileJob.stageParsing");case"mapping":return t("fileJob.stageMapping");case"rendering":return t("fileJob.stageRendering");case"complete":return t("fileJob.stageComplete");case"error":return t("fileJob.stageError");default:return t("fileJob.stageUploaded")}}const mn={auth:{icon:Rs,color:"text-accent-red"},rate_limit:{icon:Ht,color:"text-accent-yellow"},timeout:{icon:Ht,color:"text-accent-yellow"},network:{icon:Ts,color:"text-accent-yellow"},model:{icon:En,color:"text-accent-red"},tool:{icon:Ee,color:"text-accent-yellow"},unknown:{icon:Ee,color:"text-accent-red"}},ja=i.memo(function({error:t,onRetry:n}){const{t:r}=q(),[a,o]=i.useState(!1),d=mn[t.category]||mn.unknown,u=d.icon,c=()=>{window.dispatchEvent(new CustomEvent("switch-tab",{detail:"models"}))};return e.jsxs("div",{className:"mt-2 max-w-2xl overflow-hidden rounded-xl border border-accent-red/30 bg-dark-surface",children:[e.jsxs("div",{className:"flex items-start gap-3 px-3.5 py-3",children:[e.jsx(u,{size:18,className:re("shrink-0 mt-0.5",d.color)}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-[13px] font-medium text-dark-text",children:t.summary}),t.detail&&t.detail!==t.summary&&e.jsx("div",{className:"mt-0.5 text-[11px] text-dark-muted/80 break-words",children:t.detail.slice(0,160)}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[t.retryable&&n&&e.jsxs("button",{onClick:n,className:"flex items-center gap-1 rounded-md bg-accent-blue/10 text-accent-blue px-2 py-1 text-[11px] hover:bg-accent-blue/20 transition-colors",children:[e.jsx(qe,{size:11}),r("errorCard.retry")]}),t.category==="auth"&&e.jsxs("button",{onClick:c,className:"flex items-center gap-1 rounded-md bg-dark-hover text-dark-text px-2 py-1 text-[11px] hover:bg-dark-border transition-colors",children:[e.jsx(Is,{size:11}),r("errorCard.modelSettings")]}),t.detail&&e.jsxs("button",{onClick:()=>o(l=>!l),className:"flex items-center gap-0.5 text-[11px] text-dark-muted hover:text-dark-text transition-colors",children:[e.jsx(be,{size:11,className:re("transition-transform",a&&"rotate-180")}),r("errorCard.details")]})]})]})]}),a&&t.detail&&e.jsx("div",{className:"border-t border-dark-border/60 bg-dark-bg px-3.5 py-2.5 text-[11px] font-mono text-dark-muted break-words max-h-40 overflow-y-auto custom-scrollbar",children:t.detail})]})});function Sa(s){const t=s.replace(/\\/g,"/");return t.slice(t.lastIndexOf("/")+1)||s}function Ea({status:s}){switch(s){case"completed":return e.jsx(ve,{size:13,className:"shrink-0 text-accent-green","data-testid":"activity-status-completed"});case"failed":return e.jsx(Ce,{size:13,className:"shrink-0 text-accent-red","data-testid":"activity-status-failed"});case"running":return e.jsx("span",{className:"tl-node bg-accent-blue","data-status":"running","data-testid":"activity-status-running"});case"waiting_user":return e.jsx(Ms,{size:13,className:"shrink-0 text-accent-yellow","data-testid":"activity-status-waiting"});case"blocked":return e.jsx(_s,{size:13,className:"shrink-0 text-accent-red","data-testid":"activity-status-blocked"});case"paused":return e.jsx(An,{size:13,className:"shrink-0 text-dark-300","data-testid":"activity-status-paused"});default:return e.jsx("span",{className:"inline-block w-2 h-2 shrink-0 rounded-full bg-dark-border"})}}const Aa=i.memo(function({activity:t,toolCalls:n,onAnswer:r}){const{t:a}=q(),[o,d]=i.useState(t.status==="running"),u=i.useRef(t.status);i.useEffect(()=>{(u.current==="running"||u.current==="waiting_user"||u.current==="paused")&&(t.status==="completed"||t.status==="failed")&&d(!1),u.current=t.status},[t.status]);const c=i.useMemo(()=>{for(const b of n){const y=Ke(b.args);if(y)return y}},[n]),l=t.endedAt?t.endedAt-t.startedAt:Date.now()-t.startedAt,p=l>=6e4?`${Math.round(l/6e4)}m`:l>=1500?`${Math.round(l/1e3)}s`:"",x=t.status==="waiting_user",f=t.status==="blocked",g=t.status==="paused";return e.jsxs("div",{className:`tl-row rounded-lg transition-colors ${x?"border border-accent-yellow/25 bg-accent-yellow/5":f?"border border-accent-red/25 bg-accent-red/5":"hover:bg-dark-surface/40"}`,"data-testid":"activity-row",children:[!x&&!f&&e.jsx("span",{className:"tl-line","aria-hidden":"true"}),e.jsxs("div",{className:"relative flex items-center gap-2 px-2 py-1 cursor-pointer select-none",onClick:()=>d(b=>!b),"data-testid":"activity-row-toggle",children:[e.jsx("span",{className:"flex h-3 w-3 shrink-0 items-center justify-center",children:e.jsx(Ea,{status:t.status})}),e.jsx("span",{className:`min-w-0 text-[13px] font-medium truncate ${t.status==="running"?"text-shimmer":"text-dark-text"}`,children:t.title}),t.phase!=="analysis"&&e.jsx("span",{className:"status-pill","data-tone":"neutral","data-testid":"activity-phase",children:a(`activity.phase.${t.phase}`)}),c&&e.jsx("span",{className:"shrink-0 max-w-[14rem] truncate rounded-full border border-dark-border/70 px-2 py-0.5 font-mono text-[10.5px] text-accent-blue",children:Sa(c)}),n.length>1&&e.jsx("span",{className:"shrink-0 text-[10.5px] text-dark-muted",children:a("activity.evidenceMore",{count:n.length-1})}),p&&e.jsx("span",{className:"shrink-0 text-[10.5px] text-dark-muted",children:p}),x&&e.jsx("span",{className:"ml-auto shrink-0 text-[11px] text-accent-yellow",children:a("activity.waitingUser")}),f&&e.jsx("span",{className:"ml-auto shrink-0 text-[11px] text-accent-red",title:t.blockedReason?a("activity.blocked",{reason:t.blockedReason}):void 0,children:a("activity.blocked",{reason:t.blockedReason??""})}),g&&e.jsx("span",{className:"ml-auto shrink-0 text-[11px] text-dark-300",children:a("activity.paused")}),x&&r&&e.jsx("button",{type:"button",onClick:b=>{b.stopPropagation(),r(t.id)},className:"shrink-0 rounded border border-accent-yellow/40 px-1.5 py-0.5 text-[10.5px] text-accent-yellow hover:bg-accent-yellow/10",children:a("activity.viewAndAnswer")}),!x&&n.length>0&&e.jsx(be,{size:12,className:`ml-auto shrink-0 text-dark-muted transition-transform ${o?"rotate-180":""}`})]}),o&&n.length>0&&e.jsx("div",{className:"relative ml-[15px] pb-1 pl-3 border-l border-dark-border/25",children:e.jsx(It,{toolCalls:n})})]})});function Ca(s){for(const t of s.split(`
|
|
14
|
+
`)){const n=t.trim();if(n)return n}return""}function Ta(s){var n;const t=s.split(`
|
|
15
|
+
`);for(let r=t.length-1;r>=0;r--){const a=(n=t[r])==null?void 0:n.trim();if(a)return a}return""}function Zn({index:s,text:t,isStreaming:n,collapsed:r,onToggle:a}){const{t:o}=q(),d=r?n?Ta(t):Ca(t):"";return e.jsxs("div",{children:[e.jsxs("button",{className:"flex w-full cursor-pointer select-none items-center gap-1.5 py-0.5 text-left text-xs",onClick:()=>a(s),"data-testid":"thinking-toggle",children:[e.jsx(we,{size:12,className:`shrink-0 text-dark-muted transition-transform ${r?"":"rotate-90"}`}),e.jsx("span",{className:`shrink-0 ${n?"text-shimmer":"text-dark-muted"}`,children:n?`${o("chat.thinking")}…`:o("chat.thoughtProcess")}),d&&e.jsx("span",{"data-testid":"thinking-summary",className:"min-w-0 flex-1 truncate text-dark-muted/60",title:d,children:d})]}),!r&&e.jsx("div",{"data-testid":"thinking-body",className:"mt-1 whitespace-pre-wrap break-words border-l border-dark-border/25 pl-3 text-xs text-dark-muted",children:t.replace(/\n{3,}/g,`
|
|
16
|
+
|
|
17
|
+
`)})]})}const Ra=i.memo(function({message:t,sessionId:n,isGenerating:r,onAnswer:a}){const o=ir(w=>or(w,n,t.id)),d=i.useMemo(()=>o.length>0?o:!t.toolCalls||t.toolCalls.length===0?[]:lr(n??"",t),[o,t,n]),u=i.useMemo(()=>t.thinkingBlocks&&t.thinkingBlocks.length>0?t.thinkingBlocks:t.thinking?[{index:Number.MIN_SAFE_INTEGER,text:t.thinking}]:[],[t.thinkingBlocks,t.thinking]),[c,l]=i.useState({}),p=!r||!!t.content;i.useEffect(()=>{p&&l(w=>{const h={...w};for(const A of u)h[A.index]=!0;return h})},[p,u]);const x=i.useMemo(()=>{let w=Number.MIN_SAFE_INTEGER;for(const h of u)w=Math.max(w,h.index);for(const h of t.toolCalls??[])w=Math.max(w,h.index??Number.MIN_SAFE_INTEGER);return w},[u,t.toolCalls]),f=w=>r&&!t.content&&w===x,g=w=>{const h=c[w]??(!!t.content||!r);l(A=>({...A,[w]:!h}))},b=i.useMemo(()=>{const w=[];for(const h of u)w.push({key:`thinking-${h.index}`,index:h.index,kind:"thinking",block:h});for(const h of d)w.push({key:`activity-${h.id}`,index:h.blockRange[0],kind:"activity",activity:h});return w.sort((h,A)=>h.index-A.index),w},[u,d]),y=i.useMemo(()=>{const w={},h=t.toolCalls??[];for(const A of d)w[A.id]=A.toolCallIds.map(P=>h.find(R=>R.id===P)).filter(P=>!!P);return w},[d,t.toolCalls]);return b.length===0?null:e.jsx("div",{className:"mb-1 space-y-0.5","data-testid":"agent-activity-feed",children:b.map(w=>w.kind==="thinking"&&w.block?e.jsx(Zn,{index:w.block.index,text:w.block.text,isStreaming:f(w.block.index),collapsed:c[w.block.index]??(!!t.content||!r),onToggle:g},w.key):w.activity?e.jsx(Aa,{activity:w.activity,toolCalls:y[w.activity.id]??[],onAnswer:a},w.key):null)})}),Qn=5,Ia=30,_a=["让我","我先","我现在","我发现","我注意到","我决定","我重新","我重试","我继续","我现在要","让我现在","let me","let's","i should","i need","i will","i'll","i am","i notice","i see","i try","i retry","i think","i continue","i re-","now i","first i","first, i"];function Ma(s){const t=s.charCodeAt(0);return t>=19968&&t<=40959}function Da(s){let t="",n=!1;for(const r of s)r===" "||r===" "||r===" "?(n||(t+=" "),n=!0):(t+=r,n=!1);return t}function La(s){return s>=97&&s<=122||s>=48&&s<=57||s===95}function es(s){const t=Da(s.trimStart().toLowerCase());return _a.some(n=>{if(!t.startsWith(n))return!1;const r=t[n.length];return r===void 0||Ma(n)||n==="i re-"?!0:!La(r.charCodeAt(0))})}function $a(s){if(!s)return!1;const t=s.split(/\r?\n/).slice(0,Ia);let n=0;for(const r of t)if(r.trim())if(es(r)){if(n++,n>=Qn)return!0}else return!1;return!1}function Oa(s,t){if(!s)return{body:s||"",absorbed:""};if(!$a(s))return{body:s,absorbed:""};const n=s.split(/\r?\n/);let r=0,a=0;for(const d of n){if(!d.trim()){a++;continue}if(es(d)){r++,a++;continue}break}if(r<Qn)return{body:s,absorbed:""};let o=0;for(const d of n.slice(0,a)){if(o+=d.length,o>=s.length)break;s.startsWith(`\r
|
|
18
|
+
`,o)?o+=2:(s[o]===`
|
|
19
|
+
`||s[o]==="\r")&&(o+=1)}return{body:s.slice(o),absorbed:s.slice(0,o)}}function mt({onClick:s,title:t,children:n,danger:r=!1}){return e.jsx("button",{onClick:s,title:t,"aria-label":t,className:`inline-flex items-center justify-center rounded p-1 transition-colors ${r?"text-dark-muted hover:text-accent-red hover:bg-accent-red/10":"text-dark-muted hover:text-dark-text hover:bg-dark-hover"}`,children:n})}function hn({message:s,sessionId:t,onRegenerate:n,onDeleteMessage:r}){const{t:a}=q(),[o,d]=i.useState(!1),u=i.useRef(null);i.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const c=i.useCallback(async()=>{try{await navigator.clipboard.writeText(s.content||s.thinking||""),d(!0),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>d(!1),2e3)}catch(l){console.error("Failed to copy message:",l)}},[s.content,s.thinking]);return t?e.jsxs(e.Fragment,{children:[e.jsx(mt,{onClick:c,title:a("chat.copyMessage"),children:o?e.jsx(ve,{size:12,className:"text-accent-green"}):e.jsx(Ls,{size:12})}),s.type==="assistant"&&n&&e.jsx(mt,{onClick:()=>n(s.id),title:a("chat.regenerate"),children:e.jsx(qe,{size:12})}),r&&e.jsx(mt,{onClick:()=>r(s.id),title:a("chat.deleteMessage"),danger:!0,children:e.jsx($s,{size:12})})]}):null}function fn({ts:s,children:t}){const{i18n:n}=q(),r=n.language==="en"?"en-US":"zh-CN";return e.jsxs("div",{className:"absolute bottom-2 left-3 select-none z-10 flex items-center gap-0.5 text-[10.5px] leading-none whitespace-nowrap opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity duration-150",children:[e.jsx("span",{className:"pr-1 text-[10px] text-dark-muted/50",children:new Date(s).toLocaleTimeString(r,{hour:"2-digit",minute:"2-digit"})}),t]})}function Fa(s,t){const n=[];for(const r of s)n.push({key:`thinking-${r.index}`,index:r.index,kind:"thinking",block:r});for(const r of t??[])n.push({key:`tool-${r.id}`,index:r.index??Number.MAX_SAFE_INTEGER,kind:"tool",toolCall:r});return n.sort((r,a)=>r.index-a.index),n}const Pa=i.memo(function({message:t,sessionId:n,onRegenerate:r,onDeleteMessage:a}){var R,I,L;const{t:o}=q(),d=tt(j=>j.developerView),u=fe(j=>{var $;if(!n||!j.generatingSessions.includes(n))return!1;const S=j.messagesBySession[n];return S?(($=S[S.length-1])==null?void 0:$.id)===t.id:!1}),c=i.useMemo(()=>t.thinkingBlocks&&t.thinkingBlocks.length>0?t.thinkingBlocks:t.thinking?[{index:Number.MIN_SAFE_INTEGER,text:t.thinking}]:[],[t.thinkingBlocks,t.thinking]),[l,p]=i.useState({}),x=!u||!!t.content;i.useEffect(()=>{x&&p(j=>{const S={...j};for(const $ of c)S[$.index]=!0;return S})},[x,c]);const f=i.useMemo(()=>Fa(c,t.toolCalls),[c,t.toolCalls]),g=i.useMemo(()=>{var $;if(!t.content)return"";if(!(!!t.thinking||((($=t.thinkingBlocks)==null?void 0:$.length)??0)>0))return t.content;const{body:S}=Oa(t.content);return S||t.content},[t.content,t.thinking,t.thinkingBlocks]),b=i.useMemo(()=>{const j=[];for(const S of f)if(S.kind==="thinking"&&S.block)j.push({key:S.key,kind:"thinking",block:S.block});else if(S.kind==="tool"&&S.toolCall){const $=j[j.length-1];$&&$.kind==="tools"?$.toolCalls.push(S.toolCall):j.push({key:`tools-${S.key}`,kind:"tools",toolCalls:[S.toolCall]})}return j},[f]),y=i.useMemo(()=>{let j=Number.MIN_SAFE_INTEGER;for(const S of c)j=Math.max(j,S.index);for(const S of t.toolCalls??[])j=Math.max(j,S.index??Number.MIN_SAFE_INTEGER);return j},[c,t.toolCalls]),w=i.useCallback(j=>{const S=l[j]??(!!t.content||!u);p($=>({...$,[j]:!S}))},[u,t.content,l]),h=t.type==="user",A=t.type==="system",P=i.useCallback((j,S)=>{if(!n)return;const C=fe.getState().getMessages(n),O=C.findIndex(J=>J.id===t.id);if(O===-1)return;const W=C[O];if(!W)return;const K={...W,hookApproval:W.hookApproval?{...W.hookApproval,status:S}:void 0},B=[...C];B[O]=K,fe.setState({messagesBySession:{...fe.getState().messagesBySession,[n]:B}})},[n,t.id]);return t.deleted?null:h?e.jsxs("div",{className:"chat-msg","data-role":"user",children:[e.jsx("div",{className:"chat-avatar","aria-hidden":!0,children:e.jsx(Ds,{size:14,strokeWidth:2.4})}),e.jsx("div",{className:"max-w-[78%] flex flex-col",children:e.jsxs("div",{className:"group relative inline-block self-end rounded-2xl border border-dark-border/40 bg-dark-surface px-4 py-2.5 text-dark-text shadow-sm",style:{borderBottomRightRadius:"0.375rem"},children:[e.jsx(fn,{ts:t.timestamp,children:e.jsx(hn,{message:t,sessionId:n,onRegenerate:r,onDeleteMessage:a})}),e.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-[14.5px]",children:(R=t.content)==null?void 0:R.replace(/\n{3,}/g,`
|
|
20
|
+
|
|
21
|
+
`)})]})})]}):A?e.jsx("div",{className:"chat-msg","data-role":"system",children:e.jsx("div",{className:"text-[11px] text-dark-muted bg-dark-surface border border-dark-border/60 rounded-full px-3.5 py-1 max-w-[90%] text-center",children:t.content})}):e.jsxs("div",{className:"chat-msg","data-role":"assistant",children:[e.jsx("div",{className:"chat-avatar","aria-hidden":!0,children:e.jsx(En,{size:14,strokeWidth:2.4})}),e.jsxs("div",{className:"chat-card group",children:[e.jsx(fn,{ts:t.timestamp,children:e.jsx(hn,{message:t,sessionId:n,onRegenerate:r,onDeleteMessage:a})}),t.steps&&t.steps.length>0&&!t.hookApproval?e.jsx(xa,{steps:t.steps,isGenerating:u}):d?e.jsx(e.Fragment,{children:b.length>0&&!t.hookApproval&&e.jsx("div",{className:"mb-2 space-y-1",children:b.map(j=>j.kind==="thinking"?e.jsx(Zn,{index:j.block.index,text:j.block.text,isStreaming:u&&!t.content&&j.block.index===y,collapsed:l[j.block.index]??(!!t.content||!u),onToggle:w},j.key):e.jsx(It,{toolCalls:j.toolCalls},j.key))})}):e.jsx(Ra,{message:t,sessionId:n,isGenerating:u}),t.content?e.jsx("div",{className:"leading-relaxed",children:e.jsx(cr,{content:g.replace(/\n{3,}/g,`
|
|
22
|
+
|
|
23
|
+
`)})}):c.length===0&&!t.hookApproval&&((I=t.steps)!=null&&I.length)?null:c.length===0&&!t.hookApproval&&!((L=t.steps)!=null&&L.length)&&u?e.jsxs("div",{className:"flex items-center gap-2 py-1 text-xs text-dark-muted","data-testid":"thinking-typing",children:[e.jsxs("span",{className:"chat-typing-dots",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]}),e.jsxs("span",{children:[o("chat.thinking"),"…"]})]}):null,t.summary&&!u&&e.jsx("div",{className:"mt-1.5 text-[11px] text-dark-muted/70","data-testid":"turn-summary",children:dr(t.summary)}),t.fileJob&&e.jsx("div",{className:"mt-3",children:e.jsx(va,{job:t.fileJob})}),t.errorCard&&e.jsx("div",{className:"mt-3",children:e.jsx(ja,{error:t.errorCard,onRetry:n&&r?()=>r(t.id):void 0})}),t.hookApproval&&e.jsx("div",{className:"mt-3 border-l-2 border-accent-yellow/50 pl-3",children:e.jsx(wa,{approval:t.hookApproval,onResolved:P})})]})]})});function za(s,t=28){const n=s.replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t)}…`:n}const Ba="cubic-bezier(0.34, 1.56, 0.64, 1)",Ha=i.memo(function({items:t,activeId:n,onJump:r}){const{t:a}=q(),[o,d]=i.useState(!1),u=i.useRef(null),c=i.useCallback(()=>{u.current&&window.clearTimeout(u.current),d(!0)},[]),l=i.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>d(!1),180)},[]);return t.length===0?null:e.jsx("div",{role:"list","aria-label":a("chat.messageRail"),className:"pointer-events-none absolute right-4 top-1/2 z-30 hidden -translate-y-1/2 md:block",children:e.jsxs("div",{onMouseEnter:c,onMouseLeave:l,"data-testid":"rail-trigger",className:"pointer-events-auto relative flex items-center py-3",children:[e.jsxs("div",{"aria-hidden":!o,inert:!o,"data-testid":"rail-panel",className:`absolute right-full top-1/2 flex w-72 -translate-y-1/2 origin-right flex-col overflow-hidden rounded-xl border border-dark-border/70 bg-dark-bg/90 shadow-xl shadow-black/10 backdrop-blur-xl transition-all duration-300 ${o?"translate-x-0 scale-100 opacity-100":"pointer-events-none translate-x-4 scale-95 opacity-0"}`,style:{transitionTimingFunction:o?Ba:"ease"},children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-dark-border/60 px-3 py-2",children:[e.jsxs("span",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-dark-muted",children:[e.jsx(Os,{size:12,className:"text-accent-blue","aria-hidden":"true"}),a("chat.messageIndex")]}),e.jsx("span",{className:"rounded-full bg-dark-hover px-1.5 py-0.5 text-[10px] font-medium tabular-nums text-dark-muted",children:t.length})]}),e.jsx("div",{className:"max-h-[55vh] overflow-y-auto p-1.5 custom-scrollbar",children:t.map((p,x)=>{const f=p.id===n;return e.jsxs("button",{type:"button",role:"listitem",onClick:()=>r(p.id),title:p.content,"aria-current":f?"true":void 0,tabIndex:o?0:-1,className:`group/item flex w-full items-start gap-2 rounded-lg px-2 py-1.5 text-left transition-all duration-200 ${o?"translate-x-0 opacity-100":"translate-x-2 opacity-0"} ${f?"bg-accent-blue/10":"hover:bg-dark-hover"}`,style:{transitionDelay:o?`${Math.min(x*24,264)}ms`:"0ms"},children:[e.jsx("span",{className:`mt-px flex h-4 w-4 shrink-0 items-center justify-center rounded text-[10px] font-semibold tabular-nums transition-colors duration-200 ${f?"bg-accent-blue text-white":"bg-dark-hover text-dark-muted group-hover/item:bg-dark-border/80 group-hover/item:text-dark-text"}`,children:x+1}),e.jsx("span",{className:"min-w-0 flex-1",children:e.jsx("span",{"data-testid":"rail-entry-content",className:`block break-words text-xs leading-snug line-clamp-2 group-hover/item:line-clamp-none transition-colors duration-200 ${f?"font-medium text-accent-blue":"text-dark-text/90"}`,children:p.content})}),e.jsx(we,{size:12,"aria-hidden":"true",className:"mt-0.5 shrink-0 -translate-x-1 text-dark-muted/50 opacity-0 transition-all duration-200 group-hover/item:translate-x-0 group-hover/item:opacity-100"})]},p.id)})})]}),e.jsx("div",{"data-testid":"rail-dots",className:"flex flex-col items-end gap-1",children:t.map((p,x)=>{const f=za(p.content),g=p.id===n;return e.jsx("button",{type:"button",role:"listitem",onClick:()=>r(p.id),title:p.content,"aria-label":`${x+1}. ${f}`,"aria-current":g?"true":void 0,className:"group/dot pointer-events-auto flex h-6 w-5 items-center justify-center rounded-full transition-colors duration-200 hover:bg-dark-surface/80",children:e.jsx("span",{className:g?"h-2 w-2 rounded-full bg-accent-blue ring-2 ring-accent-blue/25 transition-all duration-300 ease-out group-hover/dot:scale-125":"h-1.5 w-1.5 rounded-full bg-dark-muted/35 transition-all duration-300 ease-out group-hover/dot:scale-150 group-hover/dot:bg-dark-muted"})},p.id)})})]})})}),Ua=i.lazy(()=>ur(()=>import("./ThreeScene-CukEnQe-.js"),__vite__mapDeps([0,1,2,3])));function Ga(){try{const s=document.createElement("canvas");return!!(s.getContext("webgl2")??s.getContext("webgl"))}catch{return!1}}function qa(){return i.useMemo(Ga,[])?e.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 overflow-hidden [&_.threeui-background]:bg-transparent",children:[e.jsx(i.Suspense,{fallback:null,children:e.jsx(Ua,{})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/30 via-transparent to-black/40"})]}):null}const ht=24;function Wa({label:s}){const t=i.useRef(Date.now()),n=i.useRef(null),[r,a]=i.useState(!1);return i.useEffect(()=>{const o=window.setTimeout(()=>a(!0),15e3);return()=>window.clearTimeout(o)},[]),i.useEffect(()=>{if(!r)return;const o=()=>{const u=n.current;if(!u)return;const c=Math.floor((Date.now()-t.current)/1e3);u.textContent=c>=60?`${Math.floor(c/60)}m ${c%60}s`:`${c}s`};o();const d=window.setInterval(o,1e3);return()=>window.clearInterval(d)},[r]),e.jsxs("div",{className:"mx-auto flex max-w-[46rem] items-center gap-2 px-4 py-3 text-xs text-dark-muted sm:px-6",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent-blue animate-blink"}),e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent-blue animate-blink",style:{animationDelay:"0.2s"}}),e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-accent-blue animate-blink",style:{animationDelay:"0.4s"}})]}),e.jsx("span",{className:"text-shimmer",children:s}),r&&e.jsxs("span",{className:"flex items-center gap-1 tabular-nums text-dark-muted/70",children:[e.jsx(Se,{size:10}),e.jsx("span",{ref:n,children:"15s"})]})]})}const Ka=i.memo(function({messages:t,isGenerating:n,sessionId:r,onSendSuggestion:a,onRegenerate:o,onDeleteMessage:d}){const{t:u}=q(),c=i.useRef(null),l=i.useRef(new Map),[p,x]=i.useState(!0),[f,g]=i.useState(null),[b,y]=i.useState(null),[w,h]=i.useState(0),A=i.useRef(null),P=i.useRef(!1),R=i.useRef(null),I=i.useRef(n);I.current=n;const L=i.useMemo(()=>t.filter(N=>!N.deleted),[t]),j=i.useMemo(()=>{if(!n)return!1;const N=L[L.length-1];return!(!N||N.type!=="assistant"||N.content||N.steps&&N.steps.length>0)},[n,L]),S=i.useMemo(()=>L.filter(N=>N.type==="user").map(N=>({id:N.id,content:N.content})),[L]),$=i.useMemo(()=>S.map(N=>N.id),[S]),C=i.useCallback(N=>{if(N){const F=N.dataset.mid;F&&l.current.set(F,N)}},[]);i.useEffect(()=>{const N=new Set($);for(const F of l.current.keys())N.has(F)||l.current.delete(F)},[$]);const O=i.useCallback(()=>{const N=c.current;if(!N||$.length===0){g(null);return}const F=N.getBoundingClientRect(),Y=F.top+F.height*.35;let Z=$[0]??null;for(const ie of $){const X=l.current.get(ie);if(!(!X||!X.isConnected))if(X.getBoundingClientRect().top<=Y)Z=ie;else break}N.scrollHeight-N.scrollTop-N.clientHeight<ht&&(Z=$[$.length-1]??Z),g(Z)},[$]),W=i.useCallback(()=>{const N=c.current;if(!N)return;const F=N.scrollHeight-N.scrollTop-N.clientHeight;P.current?F>=ht&&(P.current=!1):x(F<ht),O()},[O]);i.useEffect(()=>{O()},[t,O]);const K=i.useCallback(N=>{const F=c.current,Y=l.current.get(N);if(!F||!Y||!Y.isConnected)return;x(!1),y(N),h(he=>he+1),A.current&&window.clearTimeout(A.current),A.current=window.setTimeout(()=>y(null),1600);const Z=F.getBoundingClientRect(),ie=Y.getBoundingClientRect(),X=F.scrollTop+(ie.top-Z.top)-F.clientHeight/2+ie.height/2;R.current&&window.clearTimeout(R.current),P.current=!0,F.scrollTo({top:Math.max(0,X),behavior:"smooth"});const me=()=>{P.current=!1};"onscrollend"in F&&F.addEventListener("scrollend",me,{once:!0}),R.current=window.setTimeout(()=>{P.current=!1},1500)},[]);i.useEffect(()=>()=>{A.current&&window.clearTimeout(A.current),R.current&&window.clearTimeout(R.current)},[]);const B=i.useCallback(()=>{R.current&&window.clearTimeout(R.current),P.current=!1;const N=c.current;N&&(N.scrollTop=N.scrollHeight)},[]),J=i.useCallback(()=>{R.current&&window.clearTimeout(R.current),P.current=!1,x(!0);const N=c.current;N&&N.scrollTo({top:N.scrollHeight,behavior:"smooth"})},[]);i.useEffect(()=>{n&&(x(!0),B())},[n,B]);const oe=i.useMemo(()=>{var F,Y,Z;const N=L[L.length-1];return`${L.length}:${(N==null?void 0:N.id)??""}:${((F=N==null?void 0:N.content)==null?void 0:F.length)??0}:${((Y=N==null?void 0:N.toolCalls)==null?void 0:Y.length)??0}:${((Z=N==null?void 0:N.thinkingBlocks)==null?void 0:Z.length)??0}`},[L]),Q=i.useRef(oe);i.useEffect(()=>{if(!p){Q.current=oe;return}oe!==Q.current&&(Q.current=oe,B())},[oe,p,B]);const pe=i.useMemo(()=>[{icon:Fs,label:u("chat.suggestionCode"),prompt:u("chat.suggestionCodePrompt")},{icon:nt,label:u("chat.suggestionAnalyze"),prompt:u("chat.suggestionAnalyzePrompt")},{icon:At,label:u("chat.suggestionAutomate"),prompt:u("chat.suggestionAutomatePrompt")}],[u]);return e.jsxs("div",{className:"relative flex-1 min-h-0",children:[e.jsxs("div",{ref:c,onScroll:W,className:"h-full overflow-y-auto custom-scrollbar",children:[L.length===0?e.jsxs("div",{className:"relative flex min-h-[55vh] items-center justify-center px-4 py-10 sm:px-6",children:[e.jsx(qa,{}),e.jsxs("div",{className:"relative w-full max-w-2xl px-1 text-center",children:[e.jsx("div",{className:"chat-empty-orb",children:e.jsx("img",{src:"/logo.svg",alt:"deepseekcode",className:"relative h-10 w-10"})}),e.jsx("h2",{className:"text-xl font-semibold tracking-tight mb-2",children:u("chat.welcome")}),e.jsx("p",{className:"text-dark-muted text-sm mb-8",children:u("chat.welcomeDesc")}),a&&e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2.5 text-left",children:pe.map(N=>e.jsxs("button",{onClick:()=>a(N.prompt),className:"ui-card-interactive group w-full px-4 py-3.5 text-left",children:[e.jsx(N.icon,{size:16,"aria-hidden":"true",className:"text-accent-blue mb-2"}),e.jsx("div",{className:"text-[13px] font-medium text-dark-text",children:N.label}),e.jsx("div",{className:"mt-0.5 text-[11px] leading-snug text-dark-muted line-clamp-2",children:N.prompt})]},N.label))})]})]}):e.jsx("div",{className:"chat-stack flex flex-col pb-8 pt-5",children:L.map((N,F)=>{const Y=L[F-1],Z=Y?Y.type===N.type?"mt-2":"mt-5":"";return e.jsxs("div",{"data-mid":N.id,ref:C,className:`relative w-full ${Z}`,children:[b===N.id&&e.jsx("div",{className:"animate-rail-flash pointer-events-none absolute inset-0"},w),e.jsx(Pa,{message:N,sessionId:r,onRegenerate:o,onDeleteMessage:d})]},N.id)})}),n&&!j&&e.jsx(Wa,{label:u("chat.thinkingEllipsis")},r)]}),S.length>0&&e.jsx(Ha,{items:S,activeId:f,onJump:K}),!p&&L.length>0&&e.jsx("button",{type:"button",onClick:J,title:u("chat.backToBottom"),"aria-label":u("chat.backToBottom"),className:"absolute bottom-5 right-5 z-20 flex h-8 w-8 animate-fade-in-up items-center justify-center rounded-full border border-dark-border/70 bg-dark-surface/90 text-dark-muted shadow-lg backdrop-blur transition-all duration-200 hover:scale-110 hover:text-dark-text hover:shadow-xl",children:e.jsx(be,{size:15})})]})}),Ja={plan:"border-accent-blue/30 text-accent-blue bg-accent-blue/10","auto-plan":"border-accent-cyan/30 text-accent-cyan bg-accent-cyan/10",act:"border-accent-green/30 text-accent-green bg-accent-green/10","auto-act":"border-accent-yellow/30 text-accent-yellow bg-accent-yellow/10",goal:"border-accent-purple/30 text-accent-purple bg-accent-purple/10","auto-goal":"border-accent-red/30 text-accent-red bg-accent-red/10",normal:"border-accent-green/30 text-accent-green"},Xa=i.memo(function(){const{t}=q(),n=je(c=>c.mode),r=je(c=>c.setBaseMode),a=je(c=>c.toggleAuto),o=n==="normal"?"act":n,d=Ze(o),u=St(o);return e.jsxs("div",{className:"flex items-center gap-1",children:[pr.map(c=>{const l=d===c,p=xr[c],x=n!=="normal"&&l?Ja[n]??"border-dark-border text-dark-muted":"border-dark-border text-dark-muted hover:bg-dark-hover";return e.jsx("button",{type:"button",onClick:()=>r(c),className:re("px-2 py-0.5 rounded-full border text-xs whitespace-nowrap transition-colors cursor-pointer",x),title:t("chat.clickToSwitchMode"),"aria-pressed":l,children:p.label},c)}),e.jsxs("button",{type:"button",role:"switch","aria-checked":u,onClick:()=>a(),className:re("flex items-center gap-1 px-2 py-0.5 rounded-full border text-xs whitespace-nowrap transition-colors cursor-pointer",u?"border-accent-yellow/40 text-accent-yellow bg-accent-yellow/10":"border-dark-border text-dark-muted hover:bg-dark-hover"),title:t("plan.autoApprove"),children:[e.jsx(qe,{size:11,className:re(u?"text-accent-yellow":"text-dark-muted")}),e.jsx("span",{children:t("plan.autoApprove")})]})]})}),gn={off:{labelKey:"chat.effortOff",color:"text-dark-muted"},low:{labelKey:"chat.effortLow",color:"text-accent-green"},medium:{labelKey:"chat.effortMedium",color:"text-accent-yellow"},high:{labelKey:"chat.effortHigh",color:"text-accent-red"},extra_high:{labelKey:"chat.effortExtraHigh",color:"text-accent-purple"},max:{labelKey:"chat.effortMax",color:"text-accent-blue"}},Va=i.memo(function(){const{t}=q(),n=Ue(v=>v.model),r=Ue(v=>v.modelRef),a=Ue(v=>v.setModel),o=Ue(v=>v.setModelRef),d=je(v=>v.mode),u=tt(v=>v.effort),c=tt(v=>v.setEffort),[l,p]=i.useState([]),[x,f]=i.useState(!1),g=i.useRef(null),[b,y]=i.useState(!1),[w,h]=i.useState(""),[A,P]=i.useState(""),[R,I]=i.useState([]),[L,j]=i.useState(new Set),[S,$]=i.useState("none"),[C,O]=i.useState(!1),[W,K]=i.useState(null),[B,J]=i.useState(null),oe=i.useMemo(()=>Array.from(new Set(l.map(v=>v.provider))),[l]),Q=i.useCallback(async()=>{try{const v=await xe.models.list();v.success&&v.data&&Array.isArray(v.data.models)&&p(v.data.models.filter(H=>H.enabled!==!1))}catch{}},[]),pe=i.useCallback(()=>{var H,D;const v=mr(r)||((H=l.find(ne=>ne.isGlobalDefault))==null?void 0:H.provider)||((D=l[0])==null?void 0:D.provider)||"";h(v),P(""),K(null),y(!0)},[r,l]),N=i.useCallback(()=>{y(!1),I([]),K(null)},[]),F=i.useCallback(async(v,H)=>{if(v){O(!0),K(null);try{const D=await xe.models.byProvider(v,H||void 0);D.success&&D.data?(I(D.data.models||[]),j(new Set(D.data.existing||[])),$(D.data.source)):(I([]),j(new Set),K(D.error||t("chat.loadModelsFailed")))}catch{I([]),j(new Set),K(t("chat.loadModelsFailed"))}finally{O(!1)}}},[t]);i.useEffect(()=>{if(!b)return;const v=setTimeout(()=>{F(w,A)},A?300:0);return()=>clearTimeout(v)},[b,w,A,F]),i.useEffect(()=>{Q()},[Q]),i.useEffect(()=>{const v=()=>{Q()};return window.addEventListener("models-updated",v),()=>window.removeEventListener("models-updated",v)},[Q]);const Y=i.useCallback(()=>f(!1),[]);i.useEffect(()=>{if(!x)return;const v=D=>{g.current&&!g.current.contains(D.target)&&Y()},H=D=>{D.key==="Escape"&&Y()};return document.addEventListener("mousedown",v),document.addEventListener("keydown",H),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("keydown",H)}},[x,Y]);const Z=async v=>{Y();const H=Ze(d==="normal"?"act":d),D=`${v.provider}:${v.id}`,ne=H==="plan"?{plan:D}:H==="goal"?{goal:D}:{global:D,act:D};try{(await xe.models.setDefaults(ne)).success&&(a(v.id),o(`${v.provider}:${v.id}`),await Q())}catch{}},ie=async v=>{const H=L.has(v.id),D=`${w}:${v.id}`;J(v.id);try{if(!H){const Re=await xe.models.create({provider:w,model:{id:v.id,name:v.name||v.id}});if(!Re.success){K(Re.error||t("chat.addModelFailed"));return}}const ne=Ze(d==="normal"?"act":d),ue=ne==="plan"?{plan:D}:ne==="goal"?{goal:D}:{global:D,act:D},Ne=await xe.models.setDefaults(ue);Ne.success?(a(v.id),o(D),N(),await Q()):K(Ne.error||t("chat.switchModelFailed"))}catch{K(t("chat.addModelFailed"))}finally{J(null)}},X=Ze(d==="normal"?"act":d),me=X==="plan"?"isPlanDefault":X==="goal"?"isGoalDefault":"isActDefault",he=v=>{const H=`${v.provider}:${v.id}`;if(r)return r===H;if(n===H)return!0;if(n!==v.id)return!1;const D=l.filter(ue=>ue.id===v.id);return D.length<=1?!0:(D.find(ue=>ue[me]===!0)??D.find(ue=>ue.isGlobalDefault)??D[0])===v},ke=l.some(v=>v[me]===!0),de=l.find(v=>v.isGlobalDefault),E=async()=>{Y();const v=X==="plan"?{plan:null}:X==="goal"?{goal:null}:{act:null};try{(await xe.models.setDefaults(v)).success&&(de?(a(de.id),o(`${de.provider}:${de.id}`)):(a(""),o("")),await Q())}catch{}},M=i.useMemo(()=>hr(l),[l]),G=fr(n,r),ae=gn[u];return e.jsxs("div",{className:"relative",ref:g,children:[e.jsxs("button",{type:"button",onClick:()=>f(v=>!v),className:"flex items-center gap-1 px-2 py-0.5 rounded-full border border-dark-border text-dark-muted whitespace-nowrap transition-colors hover:bg-dark-hover cursor-pointer",title:G||t("chat.clickToSelectModel"),"aria-haspopup":"listbox","aria-expanded":x,children:[e.jsx(Ps,{size:12,className:"shrink-0"}),e.jsx("span",{className:"font-medium max-w-[8rem] truncate",children:G||t("chat.selectModel")}),e.jsx("span",{className:"h-3 w-px bg-dark-border shrink-0","aria-hidden":"true"}),e.jsx(Ut,{size:12,className:`shrink-0 ${ae.color}`}),e.jsx("span",{className:`text-xs font-medium ${ae.color}`,children:t(ae.labelKey)}),e.jsx(be,{size:12,className:re("transition-transform",x&&"rotate-180")})]}),x&&e.jsxs("div",{role:"listbox","aria-label":t("chat.selectModel"),className:"absolute bottom-full left-0 mb-1 z-50 min-w-[260px] bg-dark-surface border border-dark-border rounded-lg shadow-xl overflow-hidden",children:[e.jsx("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wide text-dark-muted border-b border-dark-border",children:t("chat.selectModel")}),b?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"px-2 py-1.5 border-b border-dark-border flex items-center gap-1.5",children:[e.jsx("button",{type:"button",onClick:N,title:t("chat.backToModels"),"aria-label":t("chat.backToModels"),className:"p-1 rounded hover:bg-dark-hover text-dark-muted hover:text-dark-text shrink-0",children:e.jsx(zs,{size:12})}),oe.length>1?e.jsx("select",{value:w,onChange:v=>h(v.target.value),"aria-label":t("chat.selectProvider"),className:"max-w-[9rem] min-w-0 bg-dark-surface text-dark-text text-xs px-1.5 py-1 rounded border border-dark-border focus:outline-none focus:border-accent-blue",children:oe.map(v=>e.jsx("option",{value:v,children:v},v))}):e.jsx("span",{className:"flex-1 min-w-0 text-xs font-medium text-dark-text truncate",children:w||t("chat.noConfiguredProviders")}),e.jsx("input",{value:A,onChange:v=>P(v.target.value),placeholder:t("chat.searchModels"),"aria-label":t("chat.searchModels"),className:"flex-1 min-w-0 bg-dark-bg text-dark-text text-xs px-2 py-1 rounded border border-dark-border placeholder-dark-muted/60 focus:outline-none focus:border-accent-blue"})]}),e.jsx("div",{className:"py-1 max-h-[32vh] overflow-y-auto custom-scrollbar",children:C?e.jsxs("div",{className:"px-3 py-2 text-xs text-dark-muted flex items-center gap-1.5",children:[e.jsx(Bs,{size:11,className:"animate-spin"}),t("chat.loadingModels")]}):W?e.jsx("div",{className:"px-3 py-2 text-xs text-accent-red",children:W}):w?R.length===0?e.jsx("div",{className:"px-3 py-2 text-xs text-dark-muted",children:t(A?"chat.noModelsFound":"chat.noProviderModels")}):e.jsxs(e.Fragment,{children:[S!=="none"&&e.jsx("div",{className:"px-3 pt-1.5 pb-0.5 text-[10px] text-dark-muted/70",children:t(S==="provider-api"?"chat.modelsSourceProviderApi":"chat.modelsSourceCatalog")}),R.map(v=>{const H=L.has(v.id),D=r===`${w}:${v.id}`;return e.jsxs("button",{type:"button",role:"option","aria-selected":D,onClick:()=>ie(v),className:"w-full flex items-center gap-2 px-3 py-1.5 text-left transition-colors hover:bg-dark-hover",children:[e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs font-medium text-dark-text truncate",children:v.name||v.id}),D&&e.jsx("span",{className:"text-[10px] px-1 rounded bg-accent-green/20 text-accent-green shrink-0",children:t("chat.currentModel")})]}),e.jsx("span",{className:"block text-[10px] text-dark-muted truncate mt-0.5",children:v.id})]}),H?e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-accent-green/20 text-accent-green shrink-0",children:t("chat.alreadyAdded")}):e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-accent-blue/20 text-accent-blue shrink-0 whitespace-nowrap",children:B===v.id?t("chat.addingModel"):t("chat.addAndSwitch")})]},v.id)})]}):e.jsx("div",{className:"px-3 py-2 text-xs text-dark-muted",children:t("chat.noConfiguredProviders")})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"py-1 max-h-[32vh] overflow-y-auto custom-scrollbar",children:[ke&&e.jsx("button",{type:"button",role:"option","aria-selected":!1,onClick:E,title:t("chat.followGlobalDefaultHint"),className:"w-full flex items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-dark-hover border-b border-dark-border/60",children:e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsxs("span",{className:"text-xs font-semibold text-accent-green flex items-center gap-1.5",children:[e.jsx(Hs,{size:11}),t("chat.followGlobalDefault")]}),e.jsx("span",{className:"block text-[10px] text-dark-muted mt-0.5 truncate",children:de?de.name||de.id:t("chat.noGlobalDefault")})]})}),M.map(([v,H])=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-dark-border/60 bg-dark-bg/40",children:[e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-dark-muted truncate",children:v}),e.jsx("span",{className:"text-[10px] text-dark-muted/70",children:H.length})]}),H.map(D=>{const ne=he(D);return e.jsx("button",{type:"button",role:"option","aria-selected":ne,onClick:()=>Z(D),className:re("w-full flex items-center gap-2 px-3 py-2 text-left transition-colors",ne?"bg-dark-hover":"hover:bg-dark-hover"),children:e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsxs("span",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:re("flex h-4 w-4 items-center justify-center rounded border transition-colors shrink-0",ne?"border-accent-green bg-accent-green/20 text-accent-green":"border-dark-border text-transparent"),children:e.jsx(ve,{size:11,strokeWidth:3})}),e.jsx("span",{className:"text-xs font-semibold text-dark-text truncate",children:D.name||D.id})]}),e.jsxs("span",{className:"flex items-center gap-1 mt-0.5 flex-wrap",children:[e.jsx("span",{className:"text-[10px] text-dark-muted truncate",children:D.id}),D.isGlobalDefault&&e.jsx("span",{className:"text-[10px] px-1 rounded bg-accent-green/20 text-accent-green",children:t("chat.globalDefault")}),D.isPlanDefault&&e.jsx("span",{className:"text-[10px] px-1 rounded bg-accent-blue/20 text-accent-blue",children:t("chat.planDefault")}),D.isActDefault&&e.jsx("span",{className:"text-[10px] px-1 rounded bg-accent-yellow/20 text-accent-yellow",children:t("chat.actDefault")}),D.isGoalDefault&&e.jsx("span",{className:"text-[10px] px-1 rounded bg-accent-purple/20 text-accent-purple",children:t("chat.goalDefault")})]})]})},`${D.provider}:${D.id}`)})]},v)),l.length===0&&e.jsx("div",{className:"px-3 py-2 text-xs text-dark-muted",children:t("chat.noEnabledModels")})]}),e.jsxs("button",{type:"button",onClick:pe,className:"w-full flex items-center gap-2 px-3 py-2 text-left border-t border-dark-border/60 text-[11px] font-medium text-accent-blue transition-colors hover:bg-dark-hover",children:[e.jsx(nt,{size:11}),t("chat.browseMoreModels")]})]}),e.jsx("div",{className:"border-t border-dark-border","aria-hidden":"true"}),e.jsxs("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wide text-dark-muted border-b border-dark-border flex items-center gap-1",children:[e.jsx(Ut,{size:11}),t("chat.effort")]}),e.jsx("div",{className:"py-1",children:gr.map(v=>{const H=gn[v],D=v===u;return e.jsxs("button",{type:"button",role:"option","aria-selected":D,onClick:()=>{c(v),Y()},className:re("w-full flex items-center gap-2 px-3 py-1.5 text-left transition-colors",D?"bg-dark-hover":"hover:bg-dark-hover"),children:[e.jsx("span",{className:re("flex h-4 w-4 items-center justify-center rounded border transition-colors shrink-0",D?"border-accent-green bg-accent-green/20 text-accent-green":"border-dark-border text-transparent"),children:e.jsx(ve,{size:11,strokeWidth:3})}),e.jsx("span",{className:`text-xs font-medium ${D?H.color:"text-dark-text"}`,children:t(H.labelKey)})]},v)})})]})]})});var Ya=Sr();function Za(s,t){if(!s)return t;const n=s.includes("\\")?"\\":"/";return s.endsWith(n)?s+t:s+n+t}function Qa(s){const t=s.replace(/[\\/]+$/,""),n=Math.max(t.lastIndexOf("\\"),t.lastIndexOf("/"));return n===-1?t:t.slice(n+1)}function ei({initial:s,onClose:t,onConfirm:n}){const{t:r}=q(),[a,o]=i.useState(s),[d,u]=i.useState(null),[c,l]=i.useState([]),[p,x]=i.useState(!1),[f,g]=i.useState(""),[b,y]=i.useState(s),w=i.useRef(null),h=i.useCallback(async R=>{x(!0),g("");try{const I=await xe.dirs.list(R);if(!I.success||!I.data){g(I.error||r("chat.dirPickerLoadError"));return}o(I.data.path),u(I.data.parent),l(I.data.dirs||[]),y(I.data.path)}catch(I){g(I instanceof Error?I.message:r("chat.dirPickerLoadError"))}finally{x(!1)}},[r]);i.useEffect(()=>{h(s)},[s,h]),i.useEffect(()=>{var R;(R=w.current)==null||R.focus()},[]),i.useEffect(()=>{const R=I=>{I.key==="Escape"&&(I.preventDefault(),I.stopPropagation(),t())};return document.addEventListener("keydown",R),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",R),document.body.style.overflow=""}},[t]);const A=i.useCallback(()=>{const R=b.trim();R&&h(R)},[b,h]),P=i.useCallback(()=>{d&&h(d)},[d,h]);return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-hidden p-4",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:t}),e.jsxs("div",{className:"relative w-full max-w-lg mx-4 bg-dark-surface border border-dark-border rounded-xl shadow-2xl animate-fade-in flex flex-col max-h-[70vh]",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-dark-border shrink-0",children:[e.jsxs("span",{className:"flex items-center gap-2 text-[13px] font-semibold text-dark-text",children:[e.jsx(Cn,{size:15,className:"text-accent-blue","aria-hidden":"true"}),r("chat.dirPickerTitle")]}),e.jsx("button",{type:"button",onClick:t,className:"rounded p-1 text-dark-muted hover:bg-dark-hover hover:text-dark-text transition-colors","aria-label":r("a11y.close"),children:e.jsx(Ce,{size:15,"aria-hidden":"true"})})]}),e.jsxs("div",{className:"p-4 flex flex-col gap-3 min-h-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Us,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-dark-muted/60","aria-hidden":"true"}),e.jsx("input",{ref:w,value:b,onChange:R=>y(R.target.value),onKeyDown:R=>{R.key==="Enter"&&A()},placeholder:r("chat.dirPickerEnterPath"),spellCheck:!1,className:`w-full rounded-lg border border-dark-border bg-dark-bg pl-8 pr-2.5 py-1.5 text-xs font-mono text-dark-text
|
|
24
|
+
placeholder-dark-muted/50 focus:outline-none focus:border-accent-blue/50 focus:ring-2 focus:ring-accent-blue/10`})]}),e.jsx("button",{type:"button",onClick:A,disabled:p||!b.trim(),className:`shrink-0 rounded-lg border border-dark-border px-2.5 py-1.5 text-xs text-dark-muted
|
|
25
|
+
hover:bg-dark-hover hover:text-dark-text disabled:opacity-40 transition-colors`,children:r("chat.dirPickerGo")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"flex-1 truncate font-mono text-[11px] text-dark-muted bg-dark-bg rounded-md px-2 py-1 border border-dark-border",title:a,children:a||r("chat.noWorkspaceDir")}),e.jsxs("button",{type:"button",onClick:()=>void P(),disabled:p||!a,className:`shrink-0 flex items-center gap-1 rounded-md border border-dark-border px-2 py-1 text-[11px] text-dark-muted
|
|
26
|
+
hover:bg-dark-hover hover:text-dark-text disabled:opacity-40 transition-colors`,children:[e.jsx(Tn,{size:12,"aria-hidden":"true"}),r("chat.dirPickerUp")]})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto custom-scrollbar rounded-lg border border-dark-border bg-dark-bg divide-y divide-dark-border/60",children:p?e.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-xs text-dark-muted",children:[e.jsx(Fe,{size:14,className:"animate-spin","aria-hidden":"true"}),r("chat.loading")]}):f?e.jsx("div",{className:"px-3 py-4 text-xs text-accent-red",children:f}):c.length===0?e.jsx("div",{className:"px-3 py-4 text-xs text-dark-muted/60 text-center",children:r("chat.dirPickerNoDirs")}):c.map(R=>{const I=Za(a,R);return e.jsxs("button",{type:"button",onClick:()=>void h(I),className:`w-full flex items-center gap-2 px-3 py-1.5 text-left text-xs text-dark-text
|
|
27
|
+
hover:bg-dark-hover transition-colors group`,children:[e.jsx(Tt,{size:13,className:"shrink-0 text-accent-yellow/80 group-hover:text-accent-yellow","aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:R}),e.jsx(we,{size:12,className:"shrink-0 ml-auto text-dark-muted/40","aria-hidden":"true"})]},R)})}),e.jsx("button",{type:"button",onClick:()=>n(a),disabled:!a||p,className:`w-full rounded-lg bg-accent-blue/90 text-white text-xs font-medium py-2
|
|
28
|
+
hover:bg-accent-blue disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:r("chat.dirPickerConfirm")})]})]})]})}const ti=i.memo(function({workspaceDir:t,onSelect:n}){const{t:r}=q(),a=tt(x=>x.recentDirs),[o,d]=i.useState(!1),[u,c]=i.useState(!1),l=i.useRef(null);i.useEffect(()=>{if(!o)return;const x=g=>{l.current&&!l.current.contains(g.target)&&d(!1)},f=g=>{g.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",x),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",f)}},[o]);const p=i.useCallback(x=>{var g;const f=((g=x==null?void 0:x.trim)==null?void 0:g.call(x))||"";f&&(d(!1),c(!1),n(f))},[n]);return e.jsxs("div",{className:"relative shrink-0",ref:l,children:[e.jsxs("button",{type:"button",onClick:()=>d(x=>!x),className:re("flex items-center gap-1 max-w-[180px] px-2 py-0.5 rounded-full border text-xs whitespace-nowrap transition-colors cursor-pointer",o?"border-accent-blue/40 text-accent-blue bg-accent-blue/10":"border-dark-border text-dark-muted hover:bg-dark-hover hover:text-dark-text"),title:r("chat.clickToSwitchDir"),"aria-label":r("chat.clickToSwitchDir"),"aria-expanded":o,"aria-haspopup":"menu",children:[e.jsx(Cn,{size:12,className:"shrink-0 text-accent-blue/80","aria-hidden":"true"}),e.jsx("span",{className:"truncate font-mono text-[11px]",children:t?Qa(t):r("chat.noWorkspaceDir")}),e.jsx(be,{size:11,className:re("shrink-0 transition-transform",o&&"rotate-180"),"aria-hidden":"true"})]}),o&&e.jsxs("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 w-72 max-w-[calc(100vw-1.5rem)] rounded-xl border border-dark-border bg-dark-surface shadow-2xl z-40 overflow-hidden animate-fade-in",children:[e.jsx("div",{className:"px-3 pt-2.5 pb-1 text-[10px] font-semibold uppercase tracking-wide text-dark-muted/50 select-none",children:r("chat.recentDirs")}),a.length===0?e.jsx("div",{className:"px-3 pb-2 text-[11px] text-dark-muted/50 select-none",children:r("chat.noRecentDirs")}):e.jsx("div",{className:"max-h-56 overflow-y-auto custom-scrollbar",children:a.map(x=>{const f=x===t;return e.jsxs("button",{type:"button",role:"menuitem",onClick:()=>p(x),className:re("w-full flex items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors group",f?"text-accent-blue bg-accent-blue/5":"text-dark-text hover:bg-dark-hover"),title:x,children:[e.jsx(Tt,{size:12,className:re("shrink-0",f?"text-accent-blue":"text-accent-yellow/80 group-hover:text-accent-yellow"),"aria-hidden":"true"}),e.jsx("span",{className:"truncate font-mono text-[11px]",children:x}),f&&e.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-accent-blue",children:"✓"})]},x)})}),e.jsx("div",{className:"border-t border-dark-border"}),e.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{d(!1),c(!0)},className:"w-full flex items-center gap-2 px-3 py-2 text-left text-xs text-accent-blue hover:bg-dark-hover transition-colors",children:[e.jsx(we,{size:13,"aria-hidden":"true"}),r("chat.chooseOtherDir")]})]}),u&&Ya.createPortal(e.jsx(ei,{initial:t||"",onClose:()=>c(!1),onConfirm:p}),document.body)]})});function ni({isOpen:s,files:t,selectedIndex:n,query:r,isSearching:a,onSelect:o,onHover:d,selectedCount:u=0,onFinish:c}){const{t:l}=q();return s?e.jsxs("div",{className:"absolute bottom-full left-0 right-0 mb-2 bg-dark-surface border border-dark-border rounded-lg shadow-xl overflow-hidden z-50",children:[e.jsxs("div",{className:"max-h-60 overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 text-[11px] text-dark-muted border-b border-dark-border bg-dark-bg",children:[e.jsx("span",{className:"font-medium text-dark-text",children:r?`@${r}`:"@ file"}),e.jsxs("span",{className:"opacity-70 flex items-center gap-2",children:[u>0&&e.jsx("span",{className:"px-1.5 py-0.5 rounded-full bg-accent-blue/20 text-accent-blue font-medium",children:l("chat.selectedCountShort",{n:u})}),e.jsx("span",{children:l("chat.fileMentionHelpMulti")})]})]}),t.length===0?e.jsx("div",{className:"px-3 py-6 text-center text-dark-muted text-xs flex flex-col items-center gap-1",children:a?e.jsxs(e.Fragment,{children:[e.jsx(Fe,{size:16,className:"animate-spin"}),e.jsx("span",{children:l("chat.searchingFiles")})]}):e.jsx("span",{children:l("chat.noMatchingFiles")})}):t.map((p,x)=>e.jsxs("button",{onClick:()=>o(p),onMouseEnter:()=>d(x),className:`w-full px-3 py-1.5 flex items-center gap-2 text-left text-xs transition-colors border-l-2 ${x===n?"bg-accent-blue/20 text-accent-blue border-accent-blue":"hover:bg-dark-hover text-dark-text border-transparent"}`,children:[p.type==="directory"?e.jsx(Tt,{size:12,className:"text-accent-yellow shrink-0"}):e.jsx(Ct,{size:12,className:"text-dark-muted shrink-0"}),e.jsx("span",{className:"truncate",children:p.name}),e.jsx("span",{className:"text-[10px] text-dark-muted truncate ml-auto",children:p.path})]},p.id||p.path))]}),c&&e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-t border-dark-border bg-dark-bg",children:[e.jsx("span",{className:"text-[10px] text-dark-muted",children:u>0?l("chat.selectedFilesCount",{n:u}):l("chat.enterInsertMulti")}),e.jsx("button",{onClick:c,className:"px-3 py-1 text-[11px] rounded bg-accent-blue text-white hover:opacity-90 transition-opacity",children:l("chat.finishMention")})]})]}):null}function si({open:s,onClose:t,onSelect:n}){const{t:r}=q(),[a,o]=i.useState([]),[d,u]=i.useState(!1),[c,l]=i.useState("");i.useEffect(()=>{s&&(l(""),u(!0),xe.skills.list().then(x=>{const f=Array.isArray(x.data)?x.data:[];o(f.filter(g=>g.enabled!==!1))}).catch(()=>o([])).finally(()=>u(!1)))},[s]);const p=i.useMemo(()=>{const x=c.trim().toLowerCase();return x?a.filter(f=>[f.id,f.name,f.description,f.category,...f.tags||[]].join(" ").toLowerCase().includes(x)):a},[a,c]);return e.jsx(br,{isOpen:s,onClose:t,title:r("skills.pickTitle"),size:"lg",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-dark-bg border border-dark-border focus-within:border-accent-blue",children:[e.jsx(nt,{size:14,className:"text-dark-muted shrink-0"}),e.jsx("input",{value:c,onChange:x=>l(x.target.value),placeholder:r("skills.pickPlaceholder"),autoFocus:!0,className:"flex-1 bg-transparent outline-none text-sm placeholder-dark-muted/60"}),d&&e.jsx(qe,{size:13,className:"animate-spin text-dark-muted"})]}),d?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(qe,{size:20,className:"animate-spin text-accent-blue"})}):p.length===0?e.jsx("div",{className:"text-center py-12 text-sm text-dark-muted",children:r("skills.pickEmpty")}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:p.map(x=>e.jsxs("button",{onClick:()=>n(x),className:"text-left rounded-lg border border-dark-border p-3 flex flex-col gap-1 transition-colors hover:border-accent-blue/50 hover:bg-dark-hover",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 min-w-0",children:[e.jsxs("span",{className:"font-medium text-sm truncate",children:[x.icon||"⭐"," ",x.name]}),e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-dark-bg border border-dark-border text-dark-muted shrink-0",children:x.injection||"lazy"})]}),e.jsxs("div",{className:"text-xs text-dark-muted truncate font-mono",children:["$",x.id]}),x.description&&e.jsx("div",{className:"text-xs text-dark-muted line-clamp-2",children:x.description}),e.jsxs("div",{className:"flex items-center justify-between gap-2 mt-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-dark-bg border border-dark-border text-dark-muted truncate",children:x.category||"—"}),e.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-accent-blue shrink-0",children:[e.jsx(At,{size:11}),r("skills.pickUse")]})]})]},x.id))})]})})}const ri=800,Ge=/\[Pasted text #(\d+)(?:\s*\+\d+ lines?)?\]/g;let ai=0;const st=new Map;function ii(s){const t=++ai;return st.set(t,s),t}function oi(s){st.delete(s)}function li(s){return s.length>ri||ts(s)>0}function ts(s){return(s.match(/\r\n|\r|\n/g)||[]).length}function ci(s){const t=ii(s),n=ts(s);return n===0?{id:t,label:`[Pasted text #${t}]`}:{id:t,label:`[Pasted text #${t} +${n} lines]`}}function di(s){return Ge.lastIndex=0,s.replace(Ge,(t,n)=>{const r=parseInt(n,10),a=st.get(r);return a!==void 0?a:t})}function ui(s){Ge.lastIndex=0;const t=[];let n;for(;(n=Ge.exec(s))!==null;){const r=n[1];r!==void 0&&t.push(parseInt(r,10))}return Ge.lastIndex=0,t}function pi(s){for(const t of s)st.delete(t)}function xi(s){const t=s.match(/\[Pasted text #\d+(?:\s*\+\d+ lines?)?\]$/);return t?t[0]??null:null}function mi(s){const t=s.match(/^\[Pasted text #\d+(?:\s*\+\d+ lines?)?\]/);return t?t[0]??null:null}function bn(s){const t=s.match(/#(\d+)/);t&&oi(parseInt(t[1]??"",10))}const Qe=16e3;function ft(){const s=["audio/webm;codecs=opus","audio/webm","audio/mp4"];if(typeof MediaRecorder>"u")return"";for(const t of s)if(MediaRecorder.isTypeSupported(t))return t;return""}async function hi(s){if(s.sampleRate===Qe&&s.numberOfChannels===1)return s.getChannelData(0);const t=Math.max(1,Math.ceil(s.length*Qe/s.sampleRate)),n=new OfflineAudioContext(1,t,Qe),r=n.createBufferSource();return r.buffer=s,r.connect(n.destination),r.start(0),(await n.startRendering()).getChannelData(0)}function fi(s,t){const n=new ArrayBuffer(44+s.length*2),r=new DataView(n),a=(d,u)=>{for(let c=0;c<u.length;c++)r.setUint8(d+c,u.charCodeAt(c))};a(0,"RIFF"),r.setUint32(4,36+s.length*2,!0),a(8,"WAVE"),a(12,"fmt "),r.setUint32(16,16,!0),r.setUint16(20,1,!0),r.setUint16(22,1,!0),r.setUint32(24,t,!0),r.setUint32(28,t*2,!0),r.setUint16(32,2,!0),r.setUint16(34,16,!0),a(36,"data"),r.setUint32(40,s.length*2,!0);let o=44;for(let d=0;d<s.length;d++){const u=Math.max(-1,Math.min(1,s[d]??0));r.setInt16(o,u<0?u*32768:u*32767,!0),o+=2}return n}function gi(s){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const a=String(r.result||""),o=a.indexOf(",");t(o>=0?a.slice(o+1):a)},r.onerror=()=>n(r.error),r.readAsDataURL(s)})}function bi(s){const[t,n]=i.useState("idle"),[r,a]=i.useState(0),o=i.useRef(null),d=i.useRef(null),u=i.useRef([]),c=i.useRef(null),l=i.useRef(0),p=i.useCallback(()=>{var y;(y=d.current)==null||y.getTracks().forEach(w=>w.stop()),d.current=null},[]),x=i.useCallback(()=>{c.current&&(clearInterval(c.current),c.current=null)},[]);i.useEffect(()=>()=>{x(),o.current&&o.current.state!=="inactive"&&o.current.stop(),p()},[x,p]);const f=i.useCallback(async()=>{if(t!=="idle")return;if(typeof MediaRecorder>"u")throw new Error("当前浏览器不支持语音输入(需要 MediaRecorder)。请使用 Chrome/Edge/Firefox 或桌面版。");let y;try{y=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0}})}catch(h){throw h instanceof DOMException&&h.name==="NotAllowedError"?new Error("麦克风权限被拒绝。请在浏览器地址栏允许麦克风权限后重试。"):new Error("无法访问麦克风:"+(h instanceof Error?h.message:String(h)))}d.current=y,u.current=[];const w=new MediaRecorder(y,ft()?{mimeType:ft()}:void 0);w.ondataavailable=h=>{h.data&&h.data.size>0&&u.current.push(h.data)},o.current=w,w.start(),l.current=Date.now(),a(0),n("recording"),c.current=setInterval(()=>a(Date.now()-l.current),100)},[t]),g=i.useCallback(async()=>{var h;const y=o.current;if(!y||y.state==="inactive")throw new Error("当前没有进行中的录音。");const w=new Promise(A=>{y.onstop=()=>A()});y.stop(),await w,x(),p(),o.current=null,n("transcribing");try{const A=new Blob(u.current,{type:ft()||"audio/webm"});u.current=[];const P=await A.arrayBuffer(),R=new AudioContext;let I;try{I=await R.decodeAudioData(P)}finally{R.close()}if(I.duration<.25)return n("idle"),"";const j=await hi(I),S=fi(j,Qe),$=await gi(new Blob([S],{type:"audio/wav"})),C=await xe.stt.transcribe(s,$,"wav");if(!C.success)throw new Error(C.error||"语音转写失败");return((h=C.data)==null?void 0:h.text)??""}finally{n("idle")}},[s,x,p]),b=i.useCallback(()=>{const y=o.current;y&&y.state!=="inactive"&&y.stop(),o.current=null,u.current=[],x(),p(),n("idle")},[x,p]);return{state:t,elapsedMs:r,start:f,stop:g,cancel:b}}const ki=({isOpen:s,commands:t,selectedIndex:n,filter:r,onSelect:a,onHover:o,containerRef:d})=>{const{t:u}=q();return!s||t.length===0?null:e.jsxs("div",{ref:d,className:"absolute bottom-full left-0 right-0 mb-2 bg-dark-surface border border-dark-border rounded-lg shadow-xl overflow-hidden z-50 max-h-72 overflow-y-auto custom-scrollbar",children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 text-[11px] text-dark-muted border-b border-dark-border bg-dark-bg",children:[e.jsx("span",{className:"font-medium text-dark-text",children:r?`/${r}`:u("slashCommands.quickCommands")}),e.jsx("span",{className:"opacity-70",children:u("slashCommands.help")})]}),t.map((c,l)=>e.jsxs("button",{"data-index":l,onClick:()=>a(c),onMouseEnter:()=>o(l),className:`w-full px-3 py-2 flex items-start gap-3 text-left transition-colors border-l-2 ${l===n?"bg-accent-blue/10 border-accent-blue":"border-transparent hover:bg-dark-hover"}`,children:[e.jsx("span",{className:"text-lg leading-none shrink-0","aria-hidden":"true",children:c.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm font-medium text-dark-text",children:["/",c.name]}),c.args&&e.jsx("span",{className:"text-xs text-dark-muted",children:c.args}),!c.local&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-accent-blue/20 text-accent-blue shrink-0",children:u("slashCommands.backend")})]}),e.jsx("div",{className:"text-xs text-dark-muted truncate",children:c.description})]}),l===n&&e.jsx(Gs,{size:14,className:"text-dark-muted shrink-0 mt-0.5","aria-hidden":"true"})]},c.id))]})},ns=["xlsx","xls","csv","docx","txt","md","mdx","rst","adoc","ts","tsx","js","jsx","mjs","cjs","mts","cts","json","jsonc","yaml","yml","toml","xml","html","css","scss","less","py","rb","go","rs","java","kt","swift","c","h","cpp","hpp","cc","cs","sh","bash","zsh","ps1","bat","cmd","sql","graphql","proto","vue","svelte","astro","env","gitignore","gitattributes","editorconfig"],yi=new RegExp(`(?:\\.(${ns.join("|")})|dockerfile|makefile)$`,"i"),ss=["png","jpg","jpeg","webp","gif","bmp","svg"],wi=new RegExp(`\\.(${ss.join("|")})$`,"i"),vi=10*1024*1024,Ni=ns.map(s=>`.${s}`).join(",")+",.Dockerfile,.Makefile,"+ss.map(s=>`.${s}`).join(","),ji=".deepseekcode/attachments",Si=50*1024*1024,gt=10,Ei=s=>/\.xlsx?$/i.test(s)?Nt:/\.(csv|docx|txt|md|mdx|rst|adoc|json|jsonc|yaml|yml|toml|xml|html|css|scss|less|env|gitignore|gitattributes|editorconfig)$/i.test(s)?et:/\.(ts|tsx|js|jsx|mjs|cjs|mts|cts|py|rb|go|rs|java|kt|swift|c|h|cpp|hpp|cc|cs|sh|bash|zsh|ps1|bat|cmd|sql|graphql|proto|vue|svelte|astro|dockerfile|makefile)$/i.test(s)?Ys:Ct,bt=3e3,kn=5,kt=50;function Ai(s,t){const n=s.slice(0,t),r=n.lastIndexOf("@");if(r===-1)return{active:!1,query:"",start:-1};const a=n.slice(r+1);return/^[\p{L}\p{N}_\-./]*$/u.test(a)?{active:!0,query:a,start:r}:{active:!1,query:"",start:-1}}function Ci(s,t){const n=s.lastIndexOf(`
|
|
29
|
+
`,t-1)+1,r=s.slice(n,t);return r.startsWith("/")?/\s/.test(r)?{active:!1,query:""}:{active:!0,query:r.slice(1)}:{active:!1,query:""}}const Ti=i.memo(function({sessionId:t,onSend:n,onStop:r,onPause:a,onResume:o,slashOptions:d,workspaceDir:u,onWorkspaceSelect:c}){const{t:l}=q(),p=fe(m=>{var k;return((k=m.sessionInputs)==null?void 0:k[t])??""}),x=fe(m=>m.setSessionInput),f=fe(m=>{var k;return((k=m.generatingSessions)==null?void 0:k.includes(t))??!1}),g=fe(m=>{var k;return((k=m.pausedSessions)==null?void 0:k.includes(t))??!1}),b=i.useRef(null),y=i.useRef(null),w=i.useRef(!1),[h,A]=i.useState([]),[P,R]=i.useState(!1),[I,L]=i.useState(!1),j=i.useCallback(m=>{x(t,m)},[t,x]),[S,$]=i.useState(()=>{try{return Gt(localStorage.getItem("dsc.stt.lang"))}catch{return"en"}}),[C,O]=i.useState(!1),W=i.useRef(null),K=i.useCallback(m=>{$(m);try{localStorage.setItem("dsc.stt.lang",m)}catch{}O(!1)},[]);i.useEffect(()=>{if(!C)return;const m=T=>{W.current&&!W.current.contains(T.target)&&O(!1)},k=T=>{T.key==="Escape"&&O(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",k)}},[C]);const B=bi(S),J=i.useRef(null),oe=i.useCallback(async()=>{var m;try{if(!J.current){const _=await xe.stt.status();_.success&&_.data&&(J.current=_.data)}const k=J.current;if(!k)return!0;if(k.service!=="ok"&&k.service!=="stopped")return le.warning(l("stt.backendMissing")),window.dispatchEvent(new CustomEvent("switch-tab",{detail:{tab:"settings",section:"stt"}})),!1;const T=(m=k.backends)==null?void 0:m[S];return T&&!T.installed?(le.warning(l("stt.backendMissing")),window.dispatchEvent(new CustomEvent("switch-tab",{detail:{tab:"settings",section:"stt"}})),!1):!0}catch{return!0}},[l,S]);i.useEffect(()=>{const m=()=>{J.current=null};return window.addEventListener("stt-backends-changed",m),()=>window.removeEventListener("stt-backends-changed",m)},[]),i.useEffect(()=>{const m=k=>{var _;const T=Gt((_=k.detail)==null?void 0:_.lang);$(T)};return window.addEventListener("stt-lang-changed",m),()=>window.removeEventListener("stt-lang-changed",m)},[]);const Q=i.useCallback(m=>{const k=b.current,T=(k==null?void 0:k.selectionStart)??p.length,_=p.slice(0,T)+m+p.slice(T);j(_),requestAnimationFrame(()=>{k==null||k.focus();const U=T+m.length;k&&(k.selectionStart=k.selectionEnd=U)})},[p,j]),pe=i.useCallback(async()=>{if(B.state==="recording"){try{const k=await B.stop();k?Q(k):le.info(l("stt.noSpeech"))}catch(k){le.error(k instanceof Error?k.message:String(k))}return}if(!(B.state!=="idle"||!await oe()))try{await B.start()}catch(k){le.error(k instanceof Error?k.message:String(k))}},[B,Q,oe,l]),N=kr(d),{isOpen:F,filter:Y,filteredCommands:Z,selectedIndex:ie,setSelectedIndex:X,selectNext:me,selectPrev:he,executeCommand:ke,openMenu:de,closeMenu:E,setFilter:M,allCommands:G,containerRef:ae}=N,[v,H]=i.useState(!1),[D,ne]=i.useState(""),[ue,Ne]=i.useState([]),[Re,Ie]=i.useState(0),[as,Dt]=i.useState(!1),[is,Pe]=i.useState(0),_e=i.useRef(-1),Me=i.useRef(new Set),ze=i.useRef(null),Je=i.useRef(null),rt=i.useRef([]),ye=i.useRef(!1);i.useEffect(()=>{Me.current=new Set,ye.current=!1,H(!1),ne(""),Ne([]),Pe(0),E()},[t,E]);const Lt=i.useDeferredValue(p),$t=Ue(m=>m.estimateTokens),at=i.useMemo(()=>$t(Lt),[Lt,$t]),Ot=i.useCallback(()=>{const m=b.current;m&&(m.style.height="auto",m.style.height=Math.min(m.scrollHeight,200)+"px")},[]);i.useEffect(()=>{Ot()},[p,h.length,Ot]);const it=i.useCallback(()=>{if(ze.current)return Promise.resolve(ze.current);if(Je.current)return Je.current;Dt(!0);const m=(async()=>{try{const k=await xe.files.list(),T=k.success&&k.data?k.data[0]:void 0;if(!T)return ze.current=[],[];const _=[],U=new Set,z=async(V,se)=>{if(se>kn||_.length>=bt)return;const te=[];for(const ee of V||[]){if(_.length>=bt)return;const Le=ee.path.replace(/\\/g,"/");U.has(Le)||(U.add(Le),ee.type==="file"?_.push({...ee,path:Le}):ee.children&&ee.children.length>0?await z(ee.children,se+1):se<kn&&te.push(ee))}if(te.length===0)return;const ge=await Promise.all(te.map(async ee=>{var Le;try{const ct=await xe.files.list(ee.path.replace(/\\/g,"/"));return ct.success&&ct.data?((Le=ct.data[0])==null?void 0:Le.children)||[]:[]}catch{return[]}}));for(const ee of ge){if(_.length>=bt)return;await z(ee,se+1)}};return await z(T.children,1),ze.current=_,_}catch{return ze.current=[],[]}finally{Je.current=null,Dt(!1)}})();return Je.current=m,m},[]),Ft=i.useCallback(async(m,k)=>{if(ye.current){const V=_e.current;if(V<0||k<V){ye.current=!1,H(!1);return}const se=m.slice(V,k);if(/\s/.test(se)){ye.current=!1,H(!1);return}_e.current=V,ne(se),H(!0),Ie(0);const te=await it();rt.current=te;const ge=se.toLowerCase();Ne(te.filter(ee=>!ge||ee.path.toLowerCase().includes(ge)).slice(0,kt));return}const T=Ai(m,k);if(!T.active){v&&H(!1);return}_e.current=T.start,ne(T.query),H(!0),Ie(0);const _=await it();rt.current=_;const U=T.query.toLowerCase(),z=_.filter(V=>!U||V.path.toLowerCase().includes(U)).slice(0,kt);Ne(z)},[v,it]),os=i.useCallback(m=>{const k=m.target.value,T=m.target.selectionStart??k.length;j(k),Ft(k,T);const _=Ci(k,T);_.active?(F||de(),M(_.query),X(0)):F&&E()},[j,Ft,F,de,M,X,E]),ot=i.useCallback(m=>{const k=b.current,T=p,_=_e.current>=0?_e.current:(k==null?void 0:k.selectionStart)??T.length,U=Math.min(T.length,_+1+D.length),z=`@${m.path} `,V=T.slice(0,_)+z+T.slice(U);Me.current.add(m.path),j(V),H(!0),ne(""),Ne(rt.current.slice(0,kt)),Ie(0),Pe(Me.current.size),_e.current=_+z.length,ye.current=!0,requestAnimationFrame(()=>{k==null||k.focus(),k&&(k.selectionStart=k.selectionEnd=_+z.length)})},[p,D,j]),Be=i.useCallback(()=>{ye.current=!1,H(!1),ne(""),Pe(0)},[]),lt=i.useCallback(m=>{if(!m.args){const z=ke(m,"");z!=null&&z.message&&(z.success?le.success(z.message):le.error(z.message)),j("");return}const k=b.current,T=(k==null?void 0:k.selectionStart)??p.length,_=p.lastIndexOf(`
|
|
30
|
+
`,T-1)+1,U=p.slice(0,_)+`/${m.name} `+p.slice(T);j(U),E(),requestAnimationFrame(()=>{k==null||k.focus();const z=_+m.name.length+2;k&&(k.selectionStart=k.selectionEnd=z)})},[p,j,ke,E]),ls=i.useCallback(m=>{const k=b.current,T=(k==null?void 0:k.selectionStart)??p.length,_=`$${m.id} `,U=p.slice(0,T)+_+p.slice(T);j(U),L(!1),ye.current=!1,H(!1),ne(""),requestAnimationFrame(()=>{k==null||k.focus();const z=T+_.length;k&&(k.selectionStart=k.selectionEnd=z)})},[p,j]),Pt=i.useCallback(m=>new Promise((k,T)=>{const _=new FileReader;_.onload=()=>k(String(_.result??"")),_.onerror=()=>T(new Error("Failed to read image")),_.readAsDataURL(m)}),[]),De=i.useCallback(m=>{const k=Array.from(m);A(T=>{const _=gt-T.length,U=T.slice();for(const z of k.slice(0,_)){const V=wi.test(z.name);if(!V&&!yi.test(z.name)){le.warning(l("fileJob.unsupportedType",{name:z.name}));continue}if(z.size>(V?vi:Si)){le.error(l("fileJob.fileTooLarge",{name:z.name}));continue}if(U.some(te=>te.name===z.name)){le.warning(l("fileJob.duplicateFile",{name:z.name}));continue}const se={id:`att-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,file:z,name:z.name,size:z.size,uploading:!1};V&&Pt(z).then(te=>{A(ge=>ge.map(ee=>ee.id===se.id?{...ee,imageDataUri:te}:ee))}).catch(()=>{A(te=>te.filter(ge=>ge.id!==se.id)),le.error(l("fileJob.uploadFailed",{name:z.name}))}),U.push(se)}return U.length>=gt&&le.warning(l("fileJob.maxAttachments",{n:gt})),U})},[l,Pt]),cs=i.useCallback(m=>{m.target.files&&m.target.files.length>0&&(De(m.target.files),m.target.value="")},[De]),ds=i.useCallback(()=>{var m;(m=y.current)==null||m.click()},[]),us=i.useCallback(m=>{A(k=>k.filter(T=>T.id!==m))},[]),ps=i.useCallback(m=>{m.preventDefault(),R(!0)},[]),xs=i.useCallback(m=>{m.preventDefault(),R(!1)},[]),ms=i.useCallback(m=>{m.preventDefault(),R(!1),m.dataTransfer.files&&m.dataTransfer.files.length>0&&De(m.dataTransfer.files)},[De]),zt=i.useCallback(async()=>{var k;if(h.length===0)return"";const m=[];for(const T of h){if(T.imageDataUri)continue;if(T.path){m.push(`<attachment path="${T.path}" />`);continue}if(!T.file)continue;A(z=>z.map(V=>V.id===T.id?{...V,uploading:!0,error:void 0}:V));const _=`${ji}/${T.name}`,U=await xe.files.upload(T.file,_);if(U.success&&((k=U.data)!=null&&k.path)){const z=U.data.path.replace(/\\/g,"/");A(V=>V.map(se=>se.id===T.id?{...se,uploading:!1,path:z}:se)),m.push(`<attachment path="${z}" />`)}else A(z=>z.map(V=>V.id===T.id?{...V,uploading:!1,error:U.error||l("fileJob.uploadFailed")}:V)),le.error(`${T.name}: ${U.error||l("fileJob.uploadFailed")}`)}return m.length>0?`${m.join(`
|
|
31
|
+
`)}
|
|
32
|
+
|
|
33
|
+
`:""},[h,l]),hs=i.useCallback(m=>{const k=m.clipboardData.getData("text/plain");if(m.clipboardData.files&&m.clipboardData.files.length>0){m.preventDefault(),De(m.clipboardData.files);return}if(!k||!li(k))return;m.preventDefault();const{label:T}=ci(k),_=b.current;if(!_)return;const U=_.selectionStart,z=_.selectionEnd,V=_.value,se=V.slice(0,U)+T+V.slice(z);j(se),requestAnimationFrame(()=>{_.selectionStart=_.selectionEnd=U+T.length})},[j,De]),Xe=i.useCallback(async()=>{const m=di(p);pi(ui(m)),ye.current=!1,H(!1),E();const k=m.trim(),T=h.length>0;if(!k&&!T)return;const _=m.trim();if(_.startsWith("/")&&!T){const te=yr(_);if(te){const ge=G.find(ee=>ee.name===te.command);if(ge){const ee=ke(ge,te.args);ee!=null&&ee.message&&(ee.success?le.success(ee.message):le.error(ee.message)),j(""),A([]),Me.current=new Set,Pe(0);return}le.error(l("slashCommands.unknownCommand",{cmd:`/${te.command}`}));return}}const U=Array.from(Me.current).filter(te=>m.includes(`@${te}`));let z="";if(T){if(h.some(te=>te.uploading)){le.warning(l("fileJob.stillUploading"));return}z=await zt()}const V=(z+m).trim();if(!V&&!T)return;const se=h.filter(te=>te.imageDataUri).map(te=>te.imageDataUri);n(V||z.trim(),U.length>0?U:void 0,se.length>0?se:void 0),j(""),A([]),Me.current=new Set,Pe(0)},[p,h,n,j,zt,l,E,G,ke]),fs=i.useCallback(m=>{if(!m.nativeEvent.isComposing){if((m.key==="Backspace"||m.key==="Delete")&&!m.ctrlKey&&!m.metaKey&&!m.altKey&&!m.shiftKey){const k=b.current;if(k&&k.selectionStart===k.selectionEnd){const T=k.selectionStart,_=k.value;if(m.key==="Backspace"&&T>0){const U=xi(_.slice(0,T));if(U){m.preventDefault(),j(_.slice(0,T-U.length)+_.slice(T)),bn(U),requestAnimationFrame(()=>{k.focus();const z=T-U.length;k.selectionStart=k.selectionEnd=z});return}}else if(m.key==="Delete"&&T<_.length){const U=mi(_.slice(T));if(U){m.preventDefault(),j(_.slice(0,T)+_.slice(T+U.length)),bn(U),requestAnimationFrame(()=>{k.focus(),k.selectionStart=k.selectionEnd=T});return}}}}if(v&&ue.length>0){if(m.key==="ArrowDown"){m.preventDefault(),Ie(k=>(k+1)%ue.length);return}if(m.key==="ArrowUp"){m.preventDefault(),Ie(k=>(k-1+ue.length)%ue.length);return}if(m.key==="Enter"&&!m.shiftKey&&!m.ctrlKey&&!m.metaKey){const k=ue[Re];k&&(m.preventDefault(),ot(k));return}if(m.key==="Escape"){m.preventDefault(),Be();return}}else if(v&&m.key==="Escape"){m.preventDefault(),Be();return}if(F&&Z.length>0){if(m.key==="ArrowDown"){m.preventDefault(),me();return}if(m.key==="ArrowUp"){m.preventDefault(),he();return}if(m.key==="Enter"&&!m.shiftKey&&!m.ctrlKey&&!m.metaKey){const k=Z[ie];k&&(m.preventDefault(),lt(k));return}if(m.key==="Escape"){m.preventDefault(),E();return}}else if(F&&m.key==="Escape"){m.preventDefault(),E();return}if(m.key==="Escape"&&f){m.preventDefault(),g?o():a();return}if(m.key==="Enter"&&(m.ctrlKey||m.metaKey)){m.preventDefault(),Xe();return}m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),Xe())}},[f,g,Xe,a,o,v,ue,Re,ot,Be,F,Z,ie,me,he,lt,E,j]),gs=i.useCallback(()=>{w.current=!0},[]),bs=i.useCallback(()=>{w.current=!1},[]),Bt=at>8e3,ks=p.trim().length>0||h.length>0;return e.jsxs("div",{className:"chat-composer-shell shrink-0 px-3 pb-3 pt-2 sm:px-4",onDragOver:ps,onDragLeave:xs,onDrop:ms,children:[h.length>0&&e.jsx("div",{className:"mb-2 flex flex-wrap gap-1.5",children:h.map(m=>{const k=Ei(m.name);return e.jsxs("div",{className:re("flex items-center gap-1.5 rounded-lg border px-2 py-1 text-xs transition-colors",m.error?"border-accent-red/40 bg-accent-red/5 text-accent-red":m.uploading?"border-accent-blue/40 bg-accent-blue/5 text-accent-blue":"border-dark-border bg-dark-surface text-dark-text"),children:[m.imageDataUri?e.jsx("img",{src:m.imageDataUri,alt:m.name,className:"h-6 w-6 rounded object-cover",title:l("fileJob.imagePreview")}):m.uploading?e.jsx(Fe,{size:13,className:"animate-spin"}):e.jsx(k,{size:13}),e.jsx("span",{className:"max-w-[140px] truncate",children:m.name}),e.jsx("span",{className:"text-[10px] text-dark-muted",children:m.size>1024*1024?`${(m.size/1024/1024).toFixed(1)} MB`:`${Math.max(1,Math.round(m.size/1024))} KB`}),!m.uploading&&e.jsx("button",{onClick:()=>us(m.id),className:"rounded p-0.5 text-dark-muted hover:text-accent-red hover:bg-accent-red/10 transition-colors","aria-label":l("a11y.close"),children:e.jsx(Ce,{size:11})})]},m.id)})}),P&&e.jsx("div",{className:"mb-2 rounded-xl border-2 border-dashed border-accent-blue/50 bg-accent-blue/5 py-3 text-center text-xs text-accent-blue",children:l("fileJob.dropHint")}),e.jsxs("div",{className:"chat-composer-card relative rounded-xl border transition-all duration-150",children:[v&&e.jsx("div",{onMouseDown:m=>m.preventDefault(),"aria-hidden":!v,children:e.jsx(ni,{isOpen:v,files:ue,selectedIndex:Re,query:D,isSearching:as,onSelect:ot,onHover:Ie,selectedCount:is,onFinish:Be})}),F&&e.jsx("div",{onMouseDown:m=>m.preventDefault(),"aria-hidden":!F,children:e.jsx(ki,{isOpen:F,commands:Z,selectedIndex:ie,filter:Y,onSelect:lt,onHover:X,containerRef:ae})}),e.jsx("textarea",{ref:b,value:p,onChange:os,onKeyDown:fs,onPaste:hs,onBlur:()=>{v&&Be(),E()},onCompositionStart:gs,onCompositionEnd:bs,placeholder:l(f?"chat.generatingPlaceholder":"chat.inputPlaceholder"),rows:1,disabled:f&&!g,"aria-label":"Message input",className:`w-full bg-transparent px-4 pt-3.5 pb-2 text-sm text-dark-text placeholder-dark-muted/60
|
|
34
|
+
resize-none focus:outline-none min-h-[44px] max-h-[40vh] leading-relaxed
|
|
35
|
+
disabled:opacity-50 disabled:cursor-not-allowed`}),e.jsxs("div",{className:"flex items-center gap-2 px-2.5 pb-2.5",children:[c&&e.jsx(ti,{workspaceDir:u,onSelect:c}),e.jsx(Xa,{}),e.jsx("span",{className:"hidden sm:block",children:e.jsx(Va,{})}),e.jsx("div",{className:"flex-1"}),at>0&&p.length>0&&e.jsxs("span",{className:`text-[10px] tabular-nums ${Bt?"text-accent-red font-medium":"text-dark-muted/60"}`,children:["~",at," tokens",Bt?` · ${l("chat.nearLimit")}`:""]}),!f&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("div",{ref:W,className:"relative",children:[e.jsxs("button",{onClick:()=>O(m=>!m),disabled:B.state!=="idle",className:`flex h-8 items-center justify-center gap-0.5 rounded-full px-2 text-[11px] font-semibold text-dark-muted transition-colors
|
|
36
|
+
hover:bg-dark-hover hover:text-dark-text disabled:opacity-40`,title:l("stt.langToggle"),"aria-label":l("stt.langToggle"),"aria-haspopup":"listbox","aria-expanded":C,children:[Er(S).short,e.jsx(Rn,{size:11,"aria-hidden":"true"})]}),C&&e.jsxs("div",{role:"listbox","aria-label":l("stt.langToggle"),className:"absolute bottom-full right-0 mb-2 z-50 w-44 rounded-lg border border-dark-border bg-dark-surface shadow-lg py-1 max-h-72 overflow-auto custom-scrollbar",children:[Ar.map(m=>e.jsxs("button",{role:"option","aria-selected":m.code===S,onClick:()=>K(m.code),className:re("flex w-full items-center justify-between gap-2 px-3 py-1.5 text-xs transition-colors",m.code===S?"text-accent-blue bg-accent-blue/10":"text-dark-text hover:bg-dark-hover"),children:[e.jsx("span",{className:"font-medium",children:m.label}),e.jsxs("span",{className:"flex items-center gap-1.5 text-[10px] text-dark-muted",children:[m.code==="zh"?"FunASR":"Whisper",m.code===S&&e.jsx(ve,{size:12,"aria-hidden":"true"})]})]},m.code)),e.jsx("div",{className:"mt-1 border-t border-dark-border px-3 pt-1.5 pb-0.5 text-[10px] leading-relaxed text-dark-muted/70",children:l("stt.multiHint")})]})]}),e.jsx("button",{onClick:()=>void pe(),disabled:B.state==="transcribing",className:re("flex h-8 w-8 items-center justify-center rounded-full text-dark-muted transition-colors",B.state==="recording"?"bg-accent-red/15 text-accent-red animate-pulse":"hover:bg-dark-hover hover:text-dark-text","disabled:opacity-40 disabled:cursor-not-allowed"),title:B.state==="recording"?l("stt.stopTitle"):l("stt.title"),"aria-label":B.state==="recording"?l("stt.stopTitle"):l("stt.title"),children:B.state==="transcribing"?e.jsx(Fe,{size:15,className:"animate-spin","aria-hidden":"true"}):B.state==="recording"?e.jsx(qs,{size:15,"aria-hidden":"true"}):e.jsx(Ws,{size:15,"aria-hidden":"true"})}),B.state==="recording"&&e.jsxs("span",{className:"text-[10px] tabular-nums text-accent-red","aria-hidden":"true",children:[(B.elapsedMs/1e3).toFixed(0),"s"]})]}),!f&&e.jsx("button",{onClick:()=>L(!0),className:"flex h-8 w-8 items-center justify-center rounded-full text-dark-muted transition-colors hover:bg-dark-hover hover:text-dark-text",title:l("skills.pickTitle"),"aria-label":l("skills.pickTitle"),children:e.jsx(Ks,{size:15,"aria-hidden":"true"})}),!f&&e.jsx("button",{onClick:()=>void ds(),className:"flex h-8 w-8 items-center justify-center rounded-full text-dark-muted transition-colors hover:bg-dark-hover hover:text-dark-text",title:l("fileJob.attach"),"aria-label":l("fileJob.attach"),children:e.jsx(Js,{size:15,"aria-hidden":"true"})}),e.jsx("input",{ref:y,type:"file",multiple:!0,accept:Ni,className:"hidden",onChange:cs}),f?e.jsxs("div",{className:"flex items-center gap-1.5",children:[g?e.jsx("button",{onClick:o,className:"flex h-8 w-8 items-center justify-center rounded-full bg-accent-green text-white transition-all hover:opacity-85 active:scale-95",title:l("chat.resumeGen"),"aria-label":l("chat.resumeGen"),children:e.jsx(Xs,{size:14,"aria-hidden":"true"})}):e.jsx("button",{onClick:a,className:"flex h-8 w-8 items-center justify-center rounded-full bg-accent-yellow text-white transition-all hover:opacity-85 active:scale-95",title:l("chat.pauseGen"),"aria-label":l("chat.pauseGen"),children:e.jsx(An,{size:14,"aria-hidden":"true"})}),e.jsx("button",{onClick:r,className:"flex h-8 w-8 items-center justify-center rounded-full bg-accent-red text-white transition-all hover:opacity-85 active:scale-95",title:l("chat.stopGen"),"aria-label":l("chat.stopGen"),children:e.jsx(Vs,{size:13,"aria-hidden":"true"})})]}):e.jsx("button",{onClick:()=>void Xe(),disabled:!ks,className:`flex h-8 w-8 items-center justify-center rounded-full bg-dark-text text-dark-bg transition-all
|
|
37
|
+
hover:opacity-80 active:scale-95 disabled:opacity-25 disabled:cursor-not-allowed`,title:l("chat.sendBtn"),"aria-label":l("chat.sendBtn"),children:e.jsx(Tn,{size:15,"aria-hidden":"true"})})]})]}),e.jsxs("div",{className:"mt-1.5 hidden select-none items-center justify-center gap-3 text-[10px] text-dark-muted/55 sm:flex",children:[e.jsx("span",{children:l("chat.shiftEnter")}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("span",{children:l("chat.escHint")})]}),e.jsx(si,{open:I,onClose:()=>L(!1),onSelect:ls})]})}),Ri=15e3,Ii=300;function rs(s){const{t}=q();return i.useMemo(()=>{const n=t("chat.askOtherLabel"),r=t("chat.askProceedLabel"),a=s.options||[],o=a.some(p=>p.label===n),d=a.some(p=>p.label===r),u=[...a];d||u.push({label:r,description:t("chat.askProceedDesc")}),o||u.push({label:n,description:t("chat.askCustomDesc")});const c=o?u.findIndex(p=>p.label===n):u.length-1,l=d?u.findIndex(p=>p.label===r):u.length-(o?1:2);return{allItems:u,otherIdx:c,proceedIdx:l,displayItems:u}},[s,t])}function yn({item:s,answered:t,selectedIdx:n,multiSelected:r,customInput:a,showCustomInput:o,onSelect:d,onToggleMulti:u,onProceed:c,onEnterCustom:l,onCancelCustom:p,onSubmitCustom:x,onCustomChange:f,inputRef:g}){const{t:b}=q(),{otherIdx:y,proceedIdx:w,displayItems:h}=rs(s),A=!!s.multiSelect,P=R=>{if(R===w){c();return}if(R===y){l();return}if(A){u(R);return}d(R)};return e.jsxs("div",{className:"flex flex-col gap-2 max-h-64 overflow-y-auto",children:[h.map((R,I)=>{const L=n===I,j=r.has(I),S=I===y;return e.jsxs("div",{children:[e.jsxs("button",{type:"button",className:`w-full text-left px-3 py-2 rounded-md text-sm transition-colors ${L?"bg-blue-50 dark:bg-blue-900/20 border border-blue-300 dark:border-blue-700":"bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-750"}`,onClick:()=>P(I),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[A&&e.jsx("span",{className:`w-4 h-4 rounded border flex items-center justify-center text-[10px] ${j?"bg-blue-600 border-blue-600 text-white":"border-gray-400 dark:border-gray-500"}`,children:j&&e.jsx(ve,{size:10})}),e.jsxs("span",{className:`font-medium ${L?"text-blue-700 dark:text-blue-300":"text-gray-800 dark:text-gray-200"}`,children:[A?"":`${I+1}. `,R.label]}),I===w&&e.jsx("span",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:b("chat.askDirectTag")}),S&&e.jsx("span",{className:"text-xs text-gray-400",children:b("chat.askCustomTag")})]}),R.description&&e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 ml-6",children:R.description})]}),S&&L&&o&&e.jsxs("div",{className:"mt-2 ml-4",children:[e.jsx("textarea",{ref:g,className:"w-full px-3 py-2 text-sm border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",rows:3,value:a,onChange:$=>f($.target.value),onKeyDown:$=>{$.key==="Enter"&&!$.shiftKey&&($.preventDefault(),x()),$.key==="Escape"&&p()},placeholder:b("chat.askAnswerPlaceholder"),autoFocus:!0}),e.jsxs("div",{className:"flex gap-2 mt-1",children:[e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 px-3 py-1 text-xs font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700",onClick:x,children:[e.jsx($e,{size:12}),b("chat.askSubmit")]}),e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 px-3 py-1 text-xs font-medium text-gray-600 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600",onClick:p,children:[e.jsx(Ce,{size:12}),b("common.cancel")]})]})]})]},`opt-${I}`)}),t&&e.jsx("div",{className:"text-xs text-emerald-600 dark:text-emerald-400 font-medium",children:b("chat.askAnswered")})]})}function _i({isOpen:s,onClose:t}){const{t:n}=q(),[r,a]=i.useState(null),[o,d]=i.useState(-1),[u,c]=i.useState(new Set),[l,p]=i.useState(""),[x,f]=i.useState(!1),[g,b]=i.useState(!1),[y,w]=i.useState(0),[h,A]=i.useState([]),[P,R]=i.useState(!1),I=i.useRef(null),L=i.useRef(null),j=i.useMemo(()=>r?r.questions&&r.questions.length>0?r.questions:[{question:r.question,header:r.header,options:r.options,multiSelect:r.multiSelect}]:[],[r]),S=j.length>1,$=i.useCallback(E=>{a(E),d(E.multiSelect?-1:0),c(new Set),p(""),f(!1),b(!1),w(0),R(!1);const M=E.questions&&E.questions.length>0?E.questions:[E];A(M.map(()=>null))},[]);i.useEffect(()=>{L.current=r}),i.useEffect(()=>{if(s){const E=window.__pendingQuestion;E&&$(E)}},[s,$]),i.useEffect(()=>{const E=M=>{var H;const G=M.detail,ae=((H=L.current)==null?void 0:H.questionId)??null;if(G&&ae&&G!==ae)return;const v=ae;b(!0),setTimeout(()=>{var ne;const D=((ne=L.current)==null?void 0:ne.questionId)??null;v&&D&&D!==v||(t(),a(null),b(!1))},Ii)};return window.addEventListener("ask-question-dismiss",E),()=>window.removeEventListener("ask-question-dismiss",E)},[t]),i.useEffect(()=>{if(!g)return;const E=setTimeout(()=>b(!1),Ri);return()=>clearTimeout(E)},[g]),i.useEffect(()=>{const E=()=>{const M=window.__pendingQuestion;M&&$(M)};return window.addEventListener("ask-question-required",E),()=>window.removeEventListener("ask-question-required",E)},[$]),i.useEffect(()=>{d(0),c(new Set),p(""),f(!1)},[y,P,r]);const C=j[y]||null,{allItems:O,otherIdx:W}=rs(C||{question:""}),K=i.useCallback((E,M)=>{g||!r||(b(!0),ce.send({type:"question_answer",sessionId:ce.getSessionId()??void 0,data:JSON.stringify({questionId:r.questionId,answer:E,selectedOptions:M})}))},[g,r]),B=i.useCallback(()=>{g||!r||(b(!0),ce.send({type:"question_answer",sessionId:ce.getSessionId()??void 0,data:JSON.stringify({questionId:r.questionId,answers:j.map((E,M)=>h[M]||{answer:n("chat.askUnansweredValue")})})}))},[g,r,j,h,n]),J=i.useCallback((E,M,G)=>{A(ae=>{const v=ae.slice();return v[E]={answer:M,selectedOptions:G},v}),E<j.length-1?w(E+1):R(!0)},[j.length]),oe=i.useCallback(E=>{if(g||!r)return;const M=O[E];M&&(d(E),K(M.label,[M.label]))},[g,r,O,K]),Q=i.useCallback(()=>{if(g||!r||o<0)return;const E=O[o];E&&K(E.label,[E.label])},[g,r,o,O,K]),pe=i.useCallback(()=>{if(g||o<0)return;const E=O[o];E&&J(y,E.label,[E.label])},[g,o,O,J,y]),N=i.useCallback(E=>{if(g)return;const M=O[E];M&&J(y,M.label,[M.label])},[g,O,J,y]),F=i.useCallback(E=>{g||c(M=>{const G=new Set(M);return G.has(E)?G.delete(E):G.add(E),G})},[g]),Y=i.useCallback(()=>{if(g)return;const E=[...u].map(M=>{var G;return((G=O[M])==null?void 0:G.label)||""});S?J(y,E.join(", "),E):K(E.join(", "),E)},[g,u,O,S,J,y,K]),Z=i.useCallback(()=>{if(g)return;const E=n("chat.askProceedLabel");S?J(y,E,[E]):K(E,[E])},[g,S,J,y,K,n]),ie=i.useCallback(()=>{g||(d(W),f(!0),setTimeout(()=>{var E;return(E=I.current)==null?void 0:E.focus()},100))},[g,W]),X=i.useCallback(()=>{f(!1),p("")},[]),me=i.useCallback(()=>{if(g)return;const E=l||n("chat.askEmptyInputValue");S?J(y,E):K(E)},[g,l,S,J,y,K,n]),he=i.useCallback(()=>{g||!r||(b(!0),ce.send({type:"question_answer",sessionId:ce.getSessionId()??void 0,data:JSON.stringify({questionId:r.questionId,answers:j.map(()=>({answer:"(cancelled)"}))})}))},[g,r,j]),ke=i.useCallback(()=>{if(!g){if(S){if(x){f(!1),p("");return}if(P){R(!1),w(j.length-1);return}he();return}if(x){f(!1),p("");return}K("(cancelled)")}},[g,S,x,P,j.length,he,K]);if(!s||!r)return null;const de=h.filter(E=>!E).length;return e.jsx(Ln,{isOpen:s,onClose:ke,title:r.header||n(S?"chat.askBatchTitle":"chat.askSingleTitle"),badge:e.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-accent-blue shrink-0",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent-blue animate-pulse"}),n("chat.askPendingBadge"),S?` · ${h.filter(Boolean).length}/${j.length}`:""]}),collapsedSummary:e.jsx("span",{className:"truncate",children:(C==null?void 0:C.question)||r.question}),maxHeight:"50vh",children:S?e.jsxs("div",{className:"flex flex-col gap-4",children:[r.autoResolutionMs&&r.autoResolutionMs>0&&e.jsx("div",{className:"flex items-center gap-2 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-md px-3 py-1.5",children:n("chat.askAutoContinue",{seconds:Math.max(1,Math.round(r.autoResolutionMs/1e3))})}),e.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[j.map((E,M)=>{const G=!!h[M],ae=!P&&y===M;return e.jsxs("button",{type:"button",onClick:()=>{w(M),R(!1)},className:`px-2 py-1 rounded-md text-xs font-medium transition-colors ${ae?"bg-blue-600 text-white":G?"bg-emerald-50 dark:bg-emerald-900/20 text-emerald-700 dark:text-emerald-300":"bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,children:["Q",M+1," ",G?"✓":""]},`nav-${M}`)}),e.jsx("button",{type:"button",onClick:()=>R(!0),className:`px-2 py-1 rounded-md text-xs font-medium transition-colors ${P?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,children:n("chat.askSubmit")})]}),P?e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("div",{className:"text-sm font-medium text-gray-800 dark:text-gray-200",children:n("chat.askReviewTitle")}),j.map((E,M)=>{const G=h[M];return e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300 leading-relaxed min-w-0",children:[e.jsxs("span",{className:"font-medium",children:[M+1,". "]}),E.question]}),e.jsx("div",{className:`text-xs shrink-0 max-w-[45%] text-right break-words ${G?"text-emerald-600 dark:text-emerald-400":"text-amber-600 dark:text-amber-400"}`,children:G?G.answer:n("chat.askNotAnswered")})]},`rev-${M}`)}),de>0&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-md px-3 py-2",children:[e.jsx(Ee,{size:14}),n("chat.askUnansweredWarning",{count:de})]}),e.jsxs("div",{className:"flex gap-2 mt-1",children:[e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",onClick:B,disabled:g,children:[e.jsx($e,{size:14}),n("chat.askSubmitAll")]}),e.jsx("button",{type:"button",className:"inline-flex items-center gap-1 px-4 py-2 text-sm font-medium text-gray-600 dark:text-gray-400 bg-gray-100 dark:bg-gray-700 rounded-md hover:bg-gray-200 dark:hover:bg-gray-600",onClick:()=>{R(!1),w(j.length-1)},disabled:g,children:n("chat.askBackToEdit")})]})]}):C?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("div",{className:"text-sm text-gray-700 dark:text-gray-300 leading-relaxed min-w-0",children:C.question}),e.jsxs("div",{className:"flex gap-1 shrink-0",children:[e.jsxs("button",{type:"button",className:"inline-flex items-center gap-0.5 px-2 py-1 text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 rounded-md hover:bg-gray-200 dark:hover:bg-gray-700 disabled:opacity-40",onClick:()=>{w(E=>Math.max(0,E-1)),R(!1)},disabled:y===0,children:[e.jsx(Zs,{size:12}),n("chat.askPrevQuestion")]}),y<j.length-1?e.jsxs("button",{type:"button",className:"inline-flex items-center gap-0.5 px-2 py-1 text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 rounded-md hover:bg-gray-200 dark:hover:bg-gray-700",onClick:()=>{w(E=>Math.min(j.length-1,E+1)),R(!1)},children:[n("chat.askNextQuestion"),e.jsx(we,{size:12})]}):e.jsxs("button",{type:"button",className:"inline-flex items-center gap-0.5 px-2 py-1 text-xs font-medium text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20 rounded-md hover:bg-blue-100 dark:hover:bg-blue-900/30",onClick:()=>R(!0),children:[n("chat.askViewSubmit"),e.jsx(we,{size:12})]})]})]}),e.jsx(yn,{item:C,answered:!!h[y],selectedIdx:o,multiSelected:u,customInput:l,showCustomInput:x,onSelect:N,onToggleMulti:F,onProceed:Z,onEnterCustom:ie,onCancelCustom:X,onSubmitCustom:me,onCustomChange:p,inputRef:I}),!x&&e.jsx("div",{className:"flex items-center gap-2",children:C.multiSelect?e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",onClick:Y,disabled:g||u.size===0,children:[e.jsx($e,{size:14}),n("chat.askFinishQuestion",{count:u.size})]}):e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",onClick:pe,disabled:g||o<0,children:[e.jsx($e,{size:14}),n("chat.askConfirmQuestion")]})}),e.jsx("div",{className:"text-xs text-gray-400 dark:text-gray-500",children:x?e.jsx("span",{children:n("chat.askEnterHint")}):C.multiSelect?e.jsx("span",{children:n("chat.askMultiHintBatch")}):e.jsx("span",{children:n("chat.askSingleHintBatch")})})]}):null]}):e.jsxs("div",{className:"flex flex-col gap-4",children:[r.autoResolutionMs&&r.autoResolutionMs>0&&e.jsx("div",{className:"flex items-center gap-2 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-700 rounded-md px-3 py-1.5",children:n("chat.askAutoContinue",{seconds:Math.max(1,Math.round(r.autoResolutionMs/1e3))})}),e.jsx("div",{className:"text-sm text-gray-700 dark:text-gray-300 leading-relaxed",children:r.question}),e.jsx(yn,{item:j[0],answered:!1,selectedIdx:o,multiSelected:u,customInput:l,showCustomInput:x,onSelect:oe,onToggleMulti:F,onProceed:Z,onEnterCustom:ie,onCancelCustom:X,onSubmitCustom:me,onCustomChange:p,inputRef:I}),!x&&e.jsx("div",{className:"flex items-center gap-2",children:r.multiSelect?e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",onClick:Y,disabled:g||u.size===0,children:[e.jsx($e,{size:14}),n("chat.askSubmitSelected",{count:u.size})]}):e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",onClick:Q,disabled:g||o<0,children:[e.jsx($e,{size:14}),n("chat.askSubmit")]})}),e.jsx("div",{className:"text-xs text-gray-400 dark:text-gray-500",children:g?e.jsx("span",{children:n("chat.askSubmitting")}):x?e.jsx("span",{children:n("chat.askEnterHint")}):r.multiSelect?e.jsx("span",{children:n("chat.askMultiHintSingle")}):e.jsx("span",{children:n("chat.askSingleHintSingle")})})]})})}const He=15;function Mi({isOpen:s,onCloseModal:t}){const{t:n}=q("hook"),r=jt(),a=r.pendingApprovals,o=r.autoMode,d=r.setAutoMode,[u,c]=i.useState(0),[l,p]=i.useState(!1),[x,f]=i.useState(He),[g,b]=i.useState(!0),y=i.useRef(null),w=i.useRef(!1);i.useEffect(()=>{if(a.length!==0){if(o){a.forEach(M=>{ce.send({type:"hook_allow",data:JSON.stringify({approvalId:M.approvalId})})}),r.clearApprovals();return}c(M=>Math.min(M,a.length-1))}},[a.length,o]);const h=a[u]??null,A=a.length>0&&h!==null,P=a.length,R=A?P-u-1:0;i.useEffect(()=>{if(!(!A||l||!s||!h))return f(He),y.current=setInterval(()=>{f(M=>M<=1?(y.current&&clearInterval(y.current),0):M-1)},1e3),()=>{y.current&&clearInterval(y.current)}},[A,l,s,h==null?void 0:h.approvalId]);const I=h?Mn(h.toolName,h.askPayload):{level:"MEDIUM",reasonKey:"risk_default"},L=Dn[I.level],j=wr[I.level==="CRITICAL"?"critical":I.level==="HIGH"?"high":I.level==="LOW"?"low":"medium"],S=h?Xn(h.toolName,h.askPayload):null,$=h?vr(h.toolName,h.askPayload):null,C=h?{verb:Kn(h.toolName),target:Jn(h.toolName,h.askPayload)}:null,O=h?We(h.askPayload)!==null:!1,W=h?Vn(h.toolName,h.askPayload):null,K=x/He*100,B=x<=5,J=jr(He-x),oe=i.useCallback((M,G)=>{const ae=Nr.getState().activeSessionId;ae&&fe.getState().updateHookApprovalStatus(ae,M,G)},[]),Q=i.useCallback(M=>{h&&(M&&oe(h.approvalId,M),p(!0),setTimeout(()=>{r.removeApproval(h.approvalId),c(0),p(!1),w.current=!1,f(He)},200))},[h==null?void 0:h.approvalId,r,oe]),pe=i.useCallback(()=>{!h||l||w.current||(w.current=!0,y.current&&clearInterval(y.current),ce.send({type:"hook_allow",data:JSON.stringify({approvalId:h.approvalId})}),Q("approved"))},[h,Q,l]),N=i.useCallback(()=>{!h||l||w.current||(w.current=!0,y.current&&clearInterval(y.current),ce.send({type:"hook_deny",data:JSON.stringify({approvalId:h.approvalId})}),Q("denied"))},[h,Q,l]),F=i.useCallback(()=>{if(!h||l||w.current)return;w.current=!0,y.current&&clearInterval(y.current);const M=We(h.askPayload);M?(r.addToSessionAllowList(h.toolName,M),ce.send({type:"hook_allow",data:JSON.stringify({approvalId:h.approvalId,sessionAllow:!0})})):(r.addToSessionAllowList(h.toolName),ce.send({type:"hook_allow",data:JSON.stringify({approvalId:h.approvalId})})),Q("approved")},[h,Q,r,l]),Y=i.useCallback(()=>{!h||l||w.current||(w.current=!0,y.current&&clearInterval(y.current),d(!0),je.getState().setAuto(!0),ce.send({type:"hook_allow",data:JSON.stringify({approvalId:h.approvalId})}),Q("approved"))},[h,Q,l,d]),Z=((h==null?void 0:h.timeoutMs)??15e3)>0,ie=(h==null?void 0:h.timeoutAction)==="deny"?N:pe;if(i.useEffect(()=>{x===0&&s&&!l&&h&&Z&&ie()},[x,s,l,h,ie,Z]),i.useEffect(()=>{if(!s||!g)return;const M=G=>{const ae=G.target;ae&&typeof ae.closest=="function"&&ae.closest('input, textarea, select, [contenteditable="true"]')||(G.key==="Escape"?(G.preventDefault(),G.stopPropagation(),N()):G.key==="Enter"?(G.preventDefault(),pe()):G.key==="1"?pe():G.key==="2"?N():G.key==="3"?F():G.key==="4"&&Y())};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[s,g,pe,N,F,Y]),!A||!h)return null;const X=n("optionAllowHint"),me=n("optionDenyHint"),he=O?n("optionAllowPathHint"):n("optionAllowAlwaysHint",{tool:h.toolName}),ke=n("optionAutoModeHint"),de=(S==null?void 0:S.text)??$??null,E=de?e.jsxs("span",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx("code",{className:"font-mono text-[11px] bg-dark-surface text-accent-blue px-1 py-0.5 rounded shrink-0",children:h.toolName}),e.jsx("span",{className:"truncate",children:de})]}):null;return e.jsx(Ln,{isOpen:s,onClose:()=>t==null?void 0:t(),title:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(wt,{className:"w-4 h-4 text-yellow-400"}),e.jsx("span",{children:n("hookApproval")}),e.jsxs("span",{className:"text-xs text-dark-muted",children:["(",u+1,"/",P,")"]})]}),badge:e.jsxs("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-bold border shrink-0 ${L.badge}`,children:[L.icon," ",I.level]}),collapsedSummary:E,onExpandedChange:b,maxHeight:"50vh",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg ${L.bg} border ${L.border}`,children:[e.jsxs("span",{className:`px-1.5 py-0.5 rounded text-xs font-bold border ${L.badge}`,children:[L.icon," ",I.level]}),e.jsx("span",{className:"text-xs text-dark-muted truncate",children:n(I.reasonKey)}),e.jsxs("div",{className:"flex items-center gap-1.5 ml-auto shrink-0",children:[e.jsx(Se,{size:12,className:B?"text-accent-red":"text-dark-muted"}),e.jsx("span",{className:`text-xs font-mono ${B?"text-accent-red animate-pulse":"text-dark-muted"}`,children:Z?`${x}s`:"∞"}),e.jsx("div",{className:"w-12 h-1.5 bg-dark-border rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-700 ${B?"bg-accent-red":x<=8?"bg-accent-yellow":"bg-accent-green"}`,style:{width:`${K}%`}})})]})]}),e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[e.jsx("span",{className:"flex-none w-7 h-7 rounded-lg bg-accent-blue/10 text-accent-blue inline-flex items-center justify-center",children:e.jsx(wt,{size:15})}),C&&e.jsx(Yn,{pre:n(C.verb),obj:C.target})]}),W&&(W.external&&W.path?e.jsxs("span",{className:"flex items-center gap-1 text-[11px] px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-400 border border-amber-500/30 shrink-0",title:W.path,children:[e.jsx(Sn,{size:10}),n("scopeExternal"),": ",W.path.length>48?`${W.path.slice(0,47)}…`:W.path]}):e.jsx("span",{className:"text-[11px] text-dark-muted/60 shrink-0",children:n("scopeLocal")}))]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-dark-muted shrink-0",children:n("tool")}),e.jsx("code",{className:"text-accent-blue font-mono text-xs bg-dark-surface px-1.5 py-0.5 rounded truncate",children:h.toolName}),e.jsx("span",{className:"text-dark-muted/50",children:J}),e.jsx("span",{className:"text-dark-muted/50",children:j.label}),h.timeoutAction&&e.jsxs("span",{className:`text-xs ${h.timeoutAction==="deny"?"text-accent-red":"text-accent-green"}`,children:["timeout: ",Z?`${h.timeoutAction==="allow"?"auto-allow":"auto-deny"}${h.timeoutMs?` (${(h.timeoutMs/1e3).toFixed(0)}s)`:""}`:n("timeoutWaitUser")]})]}),S?e.jsx(Et,{text:S.text,mono:S.mono}):$?e.jsx(Et,{text:$}):null,(I.level==="CRITICAL"||I.level==="HIGH")&&e.jsxs("div",{className:`flex items-center gap-1.5 text-xs px-2 py-1.5 rounded ${L.bg} ${L.text}`,children:[e.jsx(Ee,{size:13}),e.jsx("span",{children:I.level==="CRITICAL"?n("highRiskWarning"):n("mediumRiskConfirm")})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{onClick:pe,disabled:l,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-accent-blue text-white text-sm font-medium hover:opacity-90 shadow-sm transition-all disabled:opacity-50",children:[e.jsx("span",{className:"text-[10px] font-mono bg-white/20 rounded px-1",children:"1"}),e.jsx("span",{children:Ve.allow.label}),e.jsx("span",{className:"text-[11px] text-white/70 hidden sm:inline",children:X})]}),e.jsxs("button",{onClick:F,disabled:l,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-dark-border bg-dark-bg text-dark-text hover:bg-dark-hover text-sm transition-colors disabled:opacity-50",children:[e.jsx("span",{className:"text-[10px] font-mono text-dark-muted bg-dark-surface rounded px-1",children:"3"}),e.jsx("span",{children:Ve.allow_session.label}),e.jsx("span",{className:"text-[11px] text-dark-muted/60 hidden sm:inline",children:he})]}),e.jsxs("button",{onClick:Y,disabled:l,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-dark-border bg-dark-bg text-dark-text hover:bg-dark-hover text-sm transition-colors disabled:opacity-50",children:[e.jsx("span",{className:"text-[10px] font-mono text-dark-muted bg-dark-surface rounded px-1",children:"4"}),e.jsx("span",{children:Ve.auto.label}),e.jsx("span",{className:"text-[11px] text-dark-muted/60 hidden sm:inline",children:ke})]}),e.jsx("span",{className:"flex-1"}),e.jsxs("button",{onClick:N,disabled:l,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-dark-muted hover:bg-red-500/10 hover:text-red-400 text-sm transition-colors disabled:opacity-50",children:[e.jsx("span",{className:"text-[10px] font-mono text-dark-muted/60 rounded px-1",children:"2"}),e.jsx("span",{children:Ve.deny.label}),e.jsx("span",{className:"text-[11px] text-dark-muted/60 hidden sm:inline",children:me})]})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-dark-muted/60",children:[e.jsx("span",{children:n("shortcutHint")}),e.jsx("span",{children:R>0?n("morePending",{n:R}):n("lastItem")})]})]})})}const yt="dsc-auto-access-banner-dismissed",Di=i.memo(function(){const{t}=q(),n=je(u=>u.mode),[r,a]=i.useState(()=>localStorage.getItem(yt)==="1");i.useEffect(()=>{St(n==="normal"?"act":n)||localStorage.getItem(yt)==="1"&&a(!1)},[n]);const o=i.useCallback(u=>{u&&localStorage.setItem(yt,"1"),a(!0)},[]);return!(n!=="normal"&&St(n))||r?null:e.jsxs("div",{className:"flex items-center gap-1.5 px-4 py-1 text-[10.5px] leading-snug text-accent-yellow/75 bg-accent-yellow/[0.05] border-b border-accent-yellow/10 select-none",role:"note",title:t("autoAccess.desc"),children:[e.jsx(Qs,{size:11,className:"shrink-0 text-accent-yellow/70"}),e.jsxs("div",{className:"min-w-0 flex-1 truncate",children:[e.jsx("span",{className:"font-medium",children:t("autoAccess.title")}),e.jsxs("span",{className:"text-accent-yellow/60",children:[" · ",t("autoAccess.desc")]})]}),e.jsx("button",{onClick:()=>o(!1),className:"shrink-0 rounded p-0.5 text-accent-yellow/50 hover:text-accent-yellow hover:bg-accent-yellow/10 transition-colors",title:t("autoAccess.dismiss"),"aria-label":t("autoAccess.dismiss"),children:e.jsx(Ce,{size:11})}),e.jsx("button",{onClick:()=>o(!0),className:"shrink-0 rounded px-1 py-px text-[9.5px] text-accent-yellow/50 hover:text-accent-yellow hover:bg-accent-yellow/10 transition-colors whitespace-nowrap",children:t("autoAccess.neverShow")})]})}),wn=24,vn=240,Li={pending:{color:"text-gray-400",bg:"bg-gray-500/10",label:"Pending"},running:{color:"text-blue-400",bg:"bg-blue-500/10",label:"Running"},completed:{color:"text-green-400",bg:"bg-green-500/10",label:"Done"},failed:{color:"text-red-400",bg:"bg-red-500/10",label:"Failed"},skipped:{color:"text-gray-500",bg:"bg-gray-500/5",label:"Skipped"}},$i=({status:s})=>s==="running"?e.jsx(Fe,{size:12,className:"animate-spin text-accent-blue"}):s==="completed"?e.jsx(vt,{size:12,className:"text-accent-green"}):s==="failed"?e.jsx(nr,{size:12,className:"text-accent-red"}):s==="skipped"?e.jsx(sr,{size:12,className:"text-dark-muted"}):e.jsx(rr,{size:12,className:"text-dark-muted"}),Oi=i.memo(function({sessionId:t,defaultExpanded:n,onClose:r}){const{t:a}=q(),[o,d]=i.useState(n??!1),[u,c]=i.useState(null),l=$n(C=>C.getTasksForSession(t)),[p,x]=i.useState(null),f=i.useRef(null),g=i.useRef(!1),b=i.useRef(null),y=i.useCallback(C=>{var O;C.button===0&&(C.target.closest("[data-taskboard-close]")||(g.current=!1,f.current={y:C.clientY,expanded:o,bodyHeight:((O=b.current)==null?void 0:O.offsetHeight)??0},C.currentTarget.setPointerCapture(C.pointerId)))},[o]),w=i.useCallback(C=>{const O=f.current;O&&(Math.abs(C.clientY-O.y)>4&&(g.current=!0),x(C.clientY-O.y))},[]),h=i.useCallback(C=>{const O=f.current;if(!O)return;const W=C.clientY-O.y;O.expanded&&W<-wn?d(!1):!O.expanded&&W>wn&&d(!0),f.current=null,x(null),setTimeout(()=>{g.current=!1},0)},[]),A=i.useCallback(()=>{if(g.current){g.current=!1;return}d(C=>!C)},[]),P=i.useCallback(C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),d(O=>!O))},[]),R=p!==null,I=i.useMemo(()=>{const C=f.current;return p===null||!C?null:C.expanded?Math.min(vn,Math.max(0,C.bodyHeight+p)):Math.min(vn,Math.max(0,p))},[p]),L=i.useMemo(()=>{const C=l.length,O=l.filter(J=>J.status==="completed").length,W=l.filter(J=>J.status==="running").length,K=l.filter(J=>J.status==="failed").length,B=C>0?Math.round(O/C*100):0;return{total:C,completed:O,running:W,failed:K,progress:B}},[l]),j=i.useMemo(()=>{const C={pending:[],running:[],completed:[],failed:[]};return l.forEach(O=>{const W=O.status==="skipped"?"pending":O.status;C[W].push(O)}),C},[l]),S=[...j.running,...j.failed,...j.pending.slice(0,5),...j.completed.slice(-3)],$=o||R;return l.length===0?null:e.jsxs("div",{className:"w-full shrink-0 mb-2 border border-dark-border rounded-lg bg-dark-bg/70 overflow-hidden",children:[e.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":o,onClick:A,onKeyDown:P,onPointerDown:y,onPointerMove:w,onPointerUp:h,onPointerCancel:h,onLostPointerCapture:h,className:"w-full flex items-center justify-between px-2.5 py-1.5 hover:bg-dark-hover transition-colors cursor-pointer select-none touch-none",title:a("chat.taskBoardDragHint"),children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(er,{size:14,className:"text-accent-blue shrink-0"}),e.jsx("span",{className:"text-xs font-medium text-dark-text",children:"Task Board"}),e.jsxs("span",{className:"text-[10px] text-dark-muted shrink-0",children:[L.completed,"/",L.total]}),L.total>0&&e.jsx("div",{className:"w-16 h-1.5 bg-dark-surface rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${L.running>0?"bg-accent-blue":L.failed>0?"bg-accent-red":"bg-accent-green"}`,style:{width:`${L.progress}%`}})}),L.running>0&&e.jsx("span",{className:"w-1.5 h-1.5 bg-accent-blue rounded-full animate-pulse shrink-0"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[r&&e.jsx("span",{role:"button",tabIndex:0,"data-taskboard-close":!0,onClick:C=>{C.stopPropagation(),r()},onKeyDown:C=>{C.key==="Enter"&&(C.stopPropagation(),r())},className:"p-0.5 rounded hover:bg-dark-hover transition-colors cursor-pointer",title:"Hide task drawer",children:e.jsx(Ce,{size:12,className:"text-dark-muted"})}),e.jsx(tr,{size:12,className:"text-dark-muted/40 shrink-0","aria-hidden":"true"}),o?e.jsx(Rn,{size:14,className:"text-dark-muted"}):e.jsx(be,{size:14,className:"text-dark-muted"})]})]}),$&&e.jsx("div",{ref:b,className:"border-t border-dark-border",style:I!==null?{height:I,overflow:"hidden"}:void 0,children:l.length===0?e.jsx("div",{className:"text-xs text-dark-muted py-4 text-center",children:a("chat.noTasks")}):e.jsxs("div",{className:"px-2.5 py-2 max-h-[240px] overflow-y-auto custom-scrollbar space-y-1.5",children:[S.map(C=>e.jsx(Pi,{task:C,isSelected:C.id===u,onClick:()=>c(u===C.id?null:C.id)},C.id)),j.pending.length>5&&e.jsxs("div",{className:"text-[10px] text-dark-muted text-center",children:[j.pending.length-5," more pending tasks"]}),j.completed.length>3&&e.jsxs("div",{className:"text-[10px] text-dark-muted text-center",children:[j.completed.length-3," more completed tasks"]})]})})]})}),Fi=(s,t)=>{if(!s)return"";const n=(t||Date.now())-s;return n<1e3?`${n}ms`:`${(n/1e3).toFixed(1)}s`},Pi=i.memo(function({task:t,isSelected:n,onClick:r}){const a=Li[t.status];return e.jsxs("div",{onClick:r,className:`rounded border p-2 cursor-pointer transition-all ${a.bg} border-dark-border
|
|
38
|
+
${n?"ring-1 ring-accent-blue":"hover:border-dark-muted/40"}
|
|
39
|
+
${t.status==="running"?"border-l-2 border-l-accent-blue":"border-l-2 border-l-transparent"}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($i,{status:t.status}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-dark-text truncate",children:t.title}),e.jsx("span",{className:`text-[10px] ${a.color} shrink-0`,children:a.label})]}),e.jsxs("div",{className:"flex items-center gap-2 text-[10px] text-dark-muted",children:[e.jsx("span",{children:t.agentType||t.source}),t.startedAt&&e.jsx("span",{children:Fi(t.startedAt,t.completedAt)})]})]})]}),t.status==="running"&&t.progress!==void 0&&e.jsx("div",{className:"mt-1.5",children:e.jsx("div",{className:"w-full h-1 bg-dark-bg rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-accent-blue rounded-full transition-all duration-500",style:{width:`${t.progress}%`}})})}),n&&e.jsxs("div",{className:"mt-2 pt-2 border-t border-dark-border space-y-1",children:[t.description&&e.jsx("p",{className:"text-[10px] text-dark-muted",children:t.description}),t.error&&e.jsx("p",{className:"text-[10px] text-red-400",children:t.error}),t.result&&e.jsx("p",{className:"text-[10px] text-green-400",children:t.result}),t.dependencies&&t.dependencies.length>0&&e.jsxs("p",{className:"text-[10px] text-dark-muted",children:[t.dependencies.length," dependencies"]})]})]})}),Ki=i.memo(function({tabs:t,activeSessionId:n,onSend:r,onStop:a,onPause:o,onResume:d,activeTab:u,setActiveTab:c,createNewSession:l,clearMessages:p,setTheme:x,setThemePreset:f,toggleTerminal:g,setLogs:b,setUnreadLogs:y,showTaskBoard:w=!0,onToggleTaskBoard:h,onRegenerate:A,onDeleteMessage:P,hookDrawerOpen:R,onCloseHookDrawer:I,questionDrawerOpen:L,onCloseQuestionDrawer:j,workspaceDir:S,onWorkspaceSelect:$}){const C=i.useMemo(()=>({setActiveTab:c,createNewSession:l,clearMessages:p,setTheme:x,setThemePreset:f,toggleTerminal:g,setLogs:b,setUnreadLogs:y}),[c,l,p,x,f,g,b,y]),O=fe(N=>n?N.messagesBySession[n]||[]:[]),W=fe(N=>n?N.generatingSessions.includes(n):!1),K=fe(N=>n?N.pausedSessions.includes(n):!1),B=t.find(N=>N.id===n)||null;i.useEffect(()=>{if(!n)return;let N=!1;return xe.tasks.list(n).then(F=>{if(N||!F.success||!Array.isArray(F.data))return;const Y={PENDING:"pending",RUNNING:"running",COMPLETED:"completed",FAILED:"failed",CANCELLED:"skipped"},Z=Date.now(),ie=F.data.filter(X=>X.sessionId===n).map(X=>{const me=new Date(X.createdAt).getTime()||Z,he=new Date(X.updatedAt).getTime()||Z;return{id:X.id,sessionId:n,title:X.title,status:Y[X.status]||"pending",source:"task",description:X.description,progress:X.progress,createdAt:me,updatedAt:he,raw:X}});$n.getState().setTasks(n,ie,"task")}).catch(()=>{}),()=>{N=!0}},[n]);const J=i.useCallback((N,F)=>{n&&r(n,N,F)},[r,n]),oe=i.useCallback(N=>{n&&r(n,N)},[r,n]),Q=i.useCallback(N=>{n&&A&&A(n,N)},[A,n]),pe=i.useCallback(N=>{n&&P&&P(n,N)},[P,n]);return e.jsx("div",{className:"flex-1 flex min-h-0",children:e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 min-h-0",children:[e.jsx(Di,{}),B&&e.jsxs(e.Fragment,{children:[e.jsx(Ka,{messages:O,isGenerating:W,isPaused:K,sessionId:B.id,onSendSuggestion:oe,onRegenerate:A?Q:void 0,onDeleteMessage:P?pe:void 0}),e.jsx(Mi,{isOpen:!!R,onCloseModal:I}),e.jsx(_i,{isOpen:!!L,onClose:j??(()=>{})}),w&&e.jsx(Oi,{sessionId:B.id,defaultExpanded:!1,onClose:h},B.id),e.jsx(Ti,{sessionId:B.id,onSend:J,onStop:()=>a(B.id),onPause:()=>o(B.id),onResume:()=>d(B.id),slashOptions:C,workspaceDir:S,onWorkspaceSelect:$})]})]})})});export{Ki as SessionGrid};
|