context-lens 0.4.3 → 0.5.1

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.
Files changed (323) hide show
  1. package/README.md +22 -0
  2. package/dist/analysis/ingest.d.ts.map +1 -1
  3. package/dist/analysis/ingest.js +1 -1
  4. package/dist/analysis/ingest.js.map +1 -1
  5. package/dist/cli-utils.d.ts.map +1 -1
  6. package/dist/cli-utils.js +6 -0
  7. package/dist/cli-utils.js.map +1 -1
  8. package/dist/core/conversation.d.ts +1 -1
  9. package/dist/core/conversation.d.ts.map +1 -1
  10. package/dist/core/conversation.js +10 -1
  11. package/dist/core/conversation.js.map +1 -1
  12. package/dist/core/parse.d.ts.map +1 -1
  13. package/dist/core/parse.js +3 -1
  14. package/dist/core/parse.js.map +1 -1
  15. package/dist/core/routing.d.ts.map +1 -1
  16. package/dist/core/routing.js +22 -0
  17. package/dist/core/routing.js.map +1 -1
  18. package/dist/proxy/capture.d.ts +1 -0
  19. package/dist/proxy/capture.d.ts.map +1 -1
  20. package/dist/proxy/capture.js.map +1 -1
  21. package/dist/proxy/config.d.ts.map +1 -1
  22. package/dist/proxy/config.js +2 -0
  23. package/dist/proxy/config.js.map +1 -1
  24. package/dist/proxy/routing.d.ts +2 -1
  25. package/dist/proxy/routing.d.ts.map +1 -1
  26. package/dist/proxy/routing.js +19 -0
  27. package/dist/proxy/routing.js.map +1 -1
  28. package/dist/proxy/server.js +3 -0
  29. package/dist/proxy/server.js.map +1 -1
  30. package/dist/schemas.d.ts +2 -0
  31. package/dist/schemas.d.ts.map +1 -1
  32. package/dist/schemas.js +1 -0
  33. package/dist/schemas.js.map +1 -1
  34. package/dist/server/store.d.ts +2 -1
  35. package/dist/server/store.d.ts.map +1 -1
  36. package/dist/server/store.js +75 -28
  37. package/dist/server/store.js.map +1 -1
  38. package/dist/types.d.ts +2 -1
  39. package/dist/types.d.ts.map +1 -1
  40. package/dist/version.generated.d.ts +1 -1
  41. package/dist/version.generated.js +1 -1
  42. package/mitm_addon.py +6 -0
  43. package/package.json +1 -1
  44. package/ui/dist/assets/core-IjjuPsJe.js +12 -0
  45. package/ui/dist/assets/cpp-BRuaLJcg.js +1 -0
  46. package/ui/dist/assets/engine-oniguruma-KVl37NQr.js +1 -0
  47. package/ui/dist/assets/{index-ndnQ4AES.css → index-D1eb5Vsp.css} +1 -1
  48. package/ui/dist/assets/index-JtXLWNzT.js +35 -0
  49. package/ui/dist/assets/ruby-CkRbH_-r.js +1 -0
  50. package/ui/dist/index.html +2 -2
  51. package/ui/dist/assets/abap-BdImnpbu.js +0 -1
  52. package/ui/dist/assets/actionscript-3-CoDkCxhg.js +0 -1
  53. package/ui/dist/assets/ada-bCR0ucgS.js +0 -1
  54. package/ui/dist/assets/andromeeda-C4gqWexZ.js +0 -1
  55. package/ui/dist/assets/angular-html-CU67Zn6k.js +0 -1
  56. package/ui/dist/assets/angular-ts-BwZT4LLn.js +0 -1
  57. package/ui/dist/assets/apache-Pmp26Uib.js +0 -1
  58. package/ui/dist/assets/apex-D8_7TLub.js +0 -1
  59. package/ui/dist/assets/apl-dKokRX4l.js +0 -1
  60. package/ui/dist/assets/applescript-Co6uUVPk.js +0 -1
  61. package/ui/dist/assets/ara-BRHolxvo.js +0 -1
  62. package/ui/dist/assets/asciidoc-Dv7Oe6Be.js +0 -1
  63. package/ui/dist/assets/asm-D_Q5rh1f.js +0 -1
  64. package/ui/dist/assets/astro-CbQHKStN.js +0 -1
  65. package/ui/dist/assets/aurora-x-D-2ljcwZ.js +0 -1
  66. package/ui/dist/assets/awk-DMzUqQB5.js +0 -1
  67. package/ui/dist/assets/ayu-dark-CMjwMIkn.js +0 -1
  68. package/ui/dist/assets/ayu-light-C47S-Tmv.js +0 -1
  69. package/ui/dist/assets/ayu-mirage-CjoLj4QM.js +0 -1
  70. package/ui/dist/assets/ballerina-BFfxhgS-.js +0 -1
  71. package/ui/dist/assets/bat-BkioyH1T.js +0 -1
  72. package/ui/dist/assets/beancount-k_qm7-4y.js +0 -1
  73. package/ui/dist/assets/berry-uYugtg8r.js +0 -1
  74. package/ui/dist/assets/bibtex-CHM0blh-.js +0 -1
  75. package/ui/dist/assets/bicep-Bmn6On1c.js +0 -1
  76. package/ui/dist/assets/blade-D4QpJJKB.js +0 -1
  77. package/ui/dist/assets/bsl-BO_Y6i37.js +0 -1
  78. package/ui/dist/assets/c3-VCDPK7BO.js +0 -1
  79. package/ui/dist/assets/cadence-Bv_4Rxtq.js +0 -1
  80. package/ui/dist/assets/cairo-KRGpt6FW.js +0 -1
  81. package/ui/dist/assets/catppuccin-frappe-DFWUc33u.js +0 -1
  82. package/ui/dist/assets/catppuccin-latte-C9dUb6Cb.js +0 -1
  83. package/ui/dist/assets/catppuccin-macchiato-DQyhUUbL.js +0 -1
  84. package/ui/dist/assets/catppuccin-mocha-D87Tk5Gz.js +0 -1
  85. package/ui/dist/assets/clarity-D53aC0YG.js +0 -1
  86. package/ui/dist/assets/clojure-P80f7IUj.js +0 -1
  87. package/ui/dist/assets/cmake-D1j8_8rp.js +0 -1
  88. package/ui/dist/assets/cobol-nwyudZeR.js +0 -1
  89. package/ui/dist/assets/codeowners-Bp6g37R7.js +0 -1
  90. package/ui/dist/assets/codeql-DsOJ9woJ.js +0 -1
  91. package/ui/dist/assets/coffee-Ch7k5sss.js +0 -1
  92. package/ui/dist/assets/common-lisp-Cg-RD9OK.js +0 -1
  93. package/ui/dist/assets/coq-DkFqJrB1.js +0 -1
  94. package/ui/dist/assets/cpp-CofmeUqb.js +0 -1
  95. package/ui/dist/assets/crystal-tKQVLTB8.js +0 -1
  96. package/ui/dist/assets/csharp-COcwbKMJ.js +0 -1
  97. package/ui/dist/assets/csv-fuZLfV_i.js +0 -1
  98. package/ui/dist/assets/cue-D82EKSYY.js +0 -1
  99. package/ui/dist/assets/cypher-COkxafJQ.js +0 -1
  100. package/ui/dist/assets/d-85-TOEBH.js +0 -1
  101. package/ui/dist/assets/dark-plus-C3mMm8J8.js +0 -1
  102. package/ui/dist/assets/dart-CF10PKvl.js +0 -1
  103. package/ui/dist/assets/dax-CEL-wOlO.js +0 -1
  104. package/ui/dist/assets/desktop-BmXAJ9_W.js +0 -1
  105. package/ui/dist/assets/dotenv-Da5cRb03.js +0 -1
  106. package/ui/dist/assets/dracula-BzJJZx-M.js +0 -1
  107. package/ui/dist/assets/dracula-soft-BXkSAIEj.js +0 -1
  108. package/ui/dist/assets/dream-maker-BtqSS_iP.js +0 -1
  109. package/ui/dist/assets/edge-BkV0erSs.js +0 -1
  110. package/ui/dist/assets/elixir-CDX3lj18.js +0 -1
  111. package/ui/dist/assets/elm-DbKCFpqz.js +0 -1
  112. package/ui/dist/assets/emacs-lisp-C9XAeP06.js +0 -1
  113. package/ui/dist/assets/erb-CgJxNhIT.js +0 -1
  114. package/ui/dist/assets/erlang-DsQrWhSR.js +0 -1
  115. package/ui/dist/assets/everforest-dark-BgDCqdQA.js +0 -1
  116. package/ui/dist/assets/everforest-light-C8M2exoo.js +0 -1
  117. package/ui/dist/assets/fennel-BYunw83y.js +0 -1
  118. package/ui/dist/assets/fish-BvzEVeQv.js +0 -1
  119. package/ui/dist/assets/fluent-C4IJs8-o.js +0 -1
  120. package/ui/dist/assets/fortran-fixed-form-CkoXwp7k.js +0 -1
  121. package/ui/dist/assets/fortran-free-form-BxgE0vQu.js +0 -1
  122. package/ui/dist/assets/fsharp-CXgrBDvD.js +0 -1
  123. package/ui/dist/assets/gdresource-BOOCDP_w.js +0 -1
  124. package/ui/dist/assets/gdscript-C5YyOfLZ.js +0 -1
  125. package/ui/dist/assets/gdshader-DkwncUOv.js +0 -1
  126. package/ui/dist/assets/genie-D0YGMca9.js +0 -1
  127. package/ui/dist/assets/gherkin-DyxjwDmM.js +0 -1
  128. package/ui/dist/assets/git-commit-F4YmCXRG.js +0 -1
  129. package/ui/dist/assets/git-rebase-r7XF79zn.js +0 -1
  130. package/ui/dist/assets/github-dark-default-Cuk6v7N8.js +0 -1
  131. package/ui/dist/assets/github-dark-dimmed-DH5Ifo-i.js +0 -1
  132. package/ui/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +0 -1
  133. package/ui/dist/assets/github-light-DAi9KRSo.js +0 -1
  134. package/ui/dist/assets/github-light-default-D7oLnXFd.js +0 -1
  135. package/ui/dist/assets/github-light-high-contrast-BfjtVDDH.js +0 -1
  136. package/ui/dist/assets/gleam-BspZqrRM.js +0 -1
  137. package/ui/dist/assets/glimmer-js-Rg0-pVw9.js +0 -1
  138. package/ui/dist/assets/glimmer-ts-U6CK756n.js +0 -1
  139. package/ui/dist/assets/glsl-DplSGwfg.js +0 -1
  140. package/ui/dist/assets/gn-n2N0HUVH.js +0 -1
  141. package/ui/dist/assets/gnuplot-DdkO51Og.js +0 -1
  142. package/ui/dist/assets/groovy-gcz8RCvz.js +0 -1
  143. package/ui/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +0 -1
  144. package/ui/dist/assets/gruvbox-dark-medium-GsRaNv29.js +0 -1
  145. package/ui/dist/assets/gruvbox-dark-soft-CVdnzihN.js +0 -1
  146. package/ui/dist/assets/gruvbox-light-hard-CH1njM8p.js +0 -1
  147. package/ui/dist/assets/gruvbox-light-medium-DRw_LuNl.js +0 -1
  148. package/ui/dist/assets/gruvbox-light-soft-hJgmCMqR.js +0 -1
  149. package/ui/dist/assets/hack-CaT9iCJl.js +0 -1
  150. package/ui/dist/assets/haml-B8DHNrY2.js +0 -1
  151. package/ui/dist/assets/handlebars-BL8al0AC.js +0 -1
  152. package/ui/dist/assets/haskell-Df6bDoY_.js +0 -1
  153. package/ui/dist/assets/haxe-CzTSHFRz.js +0 -1
  154. package/ui/dist/assets/hcl-BWvSN4gD.js +0 -1
  155. package/ui/dist/assets/hjson-D5-asLiD.js +0 -1
  156. package/ui/dist/assets/hlsl-D3lLCCz7.js +0 -1
  157. package/ui/dist/assets/horizon-BUw7H-hv.js +0 -1
  158. package/ui/dist/assets/houston-DnULxvSX.js +0 -1
  159. package/ui/dist/assets/html-derivative-BFtXZ54Q.js +0 -1
  160. package/ui/dist/assets/http-jrhK8wxY.js +0 -1
  161. package/ui/dist/assets/hurl-irOxFIW8.js +0 -1
  162. package/ui/dist/assets/hxml-Bvhsp5Yf.js +0 -1
  163. package/ui/dist/assets/hy-DFXneXwc.js +0 -1
  164. package/ui/dist/assets/imba-DGztddWO.js +0 -1
  165. package/ui/dist/assets/index-BEayMkoF.js +0 -34
  166. package/ui/dist/assets/index-BxdAuPdU.js +0 -153
  167. package/ui/dist/assets/ini-BEwlwnbL.js +0 -1
  168. package/ui/dist/assets/jinja-4LBKfQ-Z.js +0 -1
  169. package/ui/dist/assets/jison-wvAkD_A8.js +0 -1
  170. package/ui/dist/assets/json5-C9tS-k6U.js +0 -1
  171. package/ui/dist/assets/jsonl-DcaNXYhu.js +0 -1
  172. package/ui/dist/assets/jsonnet-DFQXde-d.js +0 -1
  173. package/ui/dist/assets/jssm-C2t-YnRu.js +0 -1
  174. package/ui/dist/assets/julia-CxzCAyBv.js +0 -1
  175. package/ui/dist/assets/kanagawa-dragon-CkXjmgJE.js +0 -1
  176. package/ui/dist/assets/kanagawa-lotus-CfQXZHmo.js +0 -1
  177. package/ui/dist/assets/kanagawa-wave-DWedfzmr.js +0 -1
  178. package/ui/dist/assets/kdl-DV7GczEv.js +0 -1
  179. package/ui/dist/assets/kusto-DZf3V79B.js +0 -1
  180. package/ui/dist/assets/laserwave-DUszq2jm.js +0 -1
  181. package/ui/dist/assets/latex-DGMBWnxU.js +0 -1
  182. package/ui/dist/assets/lean-BZvkOJ9d.js +0 -1
  183. package/ui/dist/assets/less-B1dDrJ26.js +0 -1
  184. package/ui/dist/assets/light-plus-B7mTdjB0.js +0 -1
  185. package/ui/dist/assets/liquid-DYVedYrR.js +0 -1
  186. package/ui/dist/assets/llvm-BtvRca6l.js +0 -1
  187. package/ui/dist/assets/log-2UxHyX5q.js +0 -1
  188. package/ui/dist/assets/logo-BtOb2qkB.js +0 -1
  189. package/ui/dist/assets/lua-BaeVxFsk.js +0 -1
  190. package/ui/dist/assets/luau-C-HG3fhB.js +0 -1
  191. package/ui/dist/assets/make-CHLpvVh8.js +0 -1
  192. package/ui/dist/assets/marko-DZsq8hO1.js +0 -1
  193. package/ui/dist/assets/material-theme-D5KoaKCx.js +0 -1
  194. package/ui/dist/assets/material-theme-darker-BfHTSMKl.js +0 -1
  195. package/ui/dist/assets/material-theme-lighter-B0m2ddpp.js +0 -1
  196. package/ui/dist/assets/material-theme-ocean-CyktbL80.js +0 -1
  197. package/ui/dist/assets/material-theme-palenight-Csfq5Kiy.js +0 -1
  198. package/ui/dist/assets/matlab-D7o27uSR.js +0 -1
  199. package/ui/dist/assets/mdc-DUICxH0z.js +0 -1
  200. package/ui/dist/assets/mdx-Cmh6b_Ma.js +0 -1
  201. package/ui/dist/assets/mermaid-mWjccvbQ.js +0 -1
  202. package/ui/dist/assets/min-dark-CafNBF8u.js +0 -1
  203. package/ui/dist/assets/min-light-CTRr51gU.js +0 -1
  204. package/ui/dist/assets/mipsasm-CKIfxQSi.js +0 -1
  205. package/ui/dist/assets/mojo-B93PlW-d.js +0 -1
  206. package/ui/dist/assets/monokai-D4h5O-jR.js +0 -1
  207. package/ui/dist/assets/moonbit-Ba13S78F.js +0 -1
  208. package/ui/dist/assets/move-IF9eRakj.js +0 -1
  209. package/ui/dist/assets/narrat-DRg8JJMk.js +0 -1
  210. package/ui/dist/assets/nextflow-BrzmwbiE.js +0 -1
  211. package/ui/dist/assets/nginx-BpAMiNFr.js +0 -1
  212. package/ui/dist/assets/night-owl-C39BiMTA.js +0 -1
  213. package/ui/dist/assets/night-owl-light-CMTm3GFP.js +0 -1
  214. package/ui/dist/assets/nim-CVrawwO9.js +0 -1
  215. package/ui/dist/assets/nix-CwoSXNpI.js +0 -1
  216. package/ui/dist/assets/nord-Ddv68eIx.js +0 -1
  217. package/ui/dist/assets/nushell-C-sUppwS.js +0 -1
  218. package/ui/dist/assets/objective-c-DXmwc3jG.js +0 -1
  219. package/ui/dist/assets/objective-cpp-CLxacb5B.js +0 -1
  220. package/ui/dist/assets/ocaml-C0hk2d4L.js +0 -1
  221. package/ui/dist/assets/odin-BBf5iR-q.js +0 -1
  222. package/ui/dist/assets/one-dark-pro-DVMEJ2y_.js +0 -1
  223. package/ui/dist/assets/one-light-C3Wv6jpd.js +0 -1
  224. package/ui/dist/assets/openscad-C4EeE6gA.js +0 -1
  225. package/ui/dist/assets/pascal-D93ZcfNL.js +0 -1
  226. package/ui/dist/assets/perl-C0TMdlhV.js +0 -1
  227. package/ui/dist/assets/pkl-u5AG7uiY.js +0 -1
  228. package/ui/dist/assets/plastic-3e1v2bzS.js +0 -1
  229. package/ui/dist/assets/plsql-ChMvpjG-.js +0 -1
  230. package/ui/dist/assets/po-BTJTHyun.js +0 -1
  231. package/ui/dist/assets/poimandres-CS3Unz2-.js +0 -1
  232. package/ui/dist/assets/polar-C0HS_06l.js +0 -1
  233. package/ui/dist/assets/postcss-CXtECtnM.js +0 -1
  234. package/ui/dist/assets/powerquery-CEu0bR-o.js +0 -1
  235. package/ui/dist/assets/powershell-Dpen1YoG.js +0 -1
  236. package/ui/dist/assets/prisma-Dd19v3D-.js +0 -1
  237. package/ui/dist/assets/prolog-CbFg5uaA.js +0 -1
  238. package/ui/dist/assets/proto-C7zT0LnQ.js +0 -1
  239. package/ui/dist/assets/pug-CGlum2m_.js +0 -1
  240. package/ui/dist/assets/puppet-BMWR74SV.js +0 -1
  241. package/ui/dist/assets/purescript-CklMAg4u.js +0 -1
  242. package/ui/dist/assets/qml-3beO22l8.js +0 -1
  243. package/ui/dist/assets/qmldir-C8lEn-DE.js +0 -1
  244. package/ui/dist/assets/qss-IeuSbFQv.js +0 -1
  245. package/ui/dist/assets/r-Dspwwk_N.js +0 -1
  246. package/ui/dist/assets/racket-BqYA7rlc.js +0 -1
  247. package/ui/dist/assets/raku-DXvB9xmW.js +0 -1
  248. package/ui/dist/assets/razor-Uh8Bk_45.js +0 -1
  249. package/ui/dist/assets/red-bN70gL4F.js +0 -1
  250. package/ui/dist/assets/reg-C-SQnVFl.js +0 -1
  251. package/ui/dist/assets/regexp-CDVJQ6XC.js +0 -1
  252. package/ui/dist/assets/rel-C3B-1QV4.js +0 -1
  253. package/ui/dist/assets/riscv-BM1_JUlF.js +0 -1
  254. package/ui/dist/assets/ron-BhRPY-oY.js +0 -1
  255. package/ui/dist/assets/rose-pine-dawn-DHQR4-dF.js +0 -1
  256. package/ui/dist/assets/rose-pine-moon-D4_iv3hh.js +0 -1
  257. package/ui/dist/assets/rose-pine-qdsjHGoJ.js +0 -1
  258. package/ui/dist/assets/rosmsg-BJDFO7_C.js +0 -1
  259. package/ui/dist/assets/rst-D5oM4XIm.js +0 -1
  260. package/ui/dist/assets/ruby-Cw6WdidG.js +0 -1
  261. package/ui/dist/assets/sas-cz2c8ADy.js +0 -1
  262. package/ui/dist/assets/sass-Cj5Yp3dK.js +0 -1
  263. package/ui/dist/assets/scala-C151Ov-r.js +0 -1
  264. package/ui/dist/assets/scheme-C98Dy4si.js +0 -1
  265. package/ui/dist/assets/scss-OYdSNvt2.js +0 -1
  266. package/ui/dist/assets/sdbl-DVxCFoDh.js +0 -1
  267. package/ui/dist/assets/shaderlab-Dg9Lc6iA.js +0 -1
  268. package/ui/dist/assets/shellsession-BADoaaVG.js +0 -1
  269. package/ui/dist/assets/slack-dark-BthQWCQV.js +0 -1
  270. package/ui/dist/assets/slack-ochin-DqwNpetd.js +0 -1
  271. package/ui/dist/assets/smalltalk-BERRCDM3.js +0 -1
  272. package/ui/dist/assets/snazzy-light-Bw305WKR.js +0 -1
  273. package/ui/dist/assets/solarized-dark-DXbdFlpD.js +0 -1
  274. package/ui/dist/assets/solarized-light-L9t79GZl.js +0 -1
  275. package/ui/dist/assets/solidity-rGO070M0.js +0 -1
  276. package/ui/dist/assets/soy-Brmx7dQM.js +0 -1
  277. package/ui/dist/assets/sparql-rVzFXLq3.js +0 -1
  278. package/ui/dist/assets/splunk-BtCnVYZw.js +0 -1
  279. package/ui/dist/assets/ssh-config-_ykCGR6B.js +0 -1
  280. package/ui/dist/assets/stata-BH5u7GGu.js +0 -1
  281. package/ui/dist/assets/stylus-BEDo0Tqx.js +0 -1
  282. package/ui/dist/assets/surrealql-Bq5Q-fJD.js +0 -1
  283. package/ui/dist/assets/svelte-zxCyuUbr.js +0 -1
  284. package/ui/dist/assets/synthwave-84-CbfX1IO0.js +0 -1
  285. package/ui/dist/assets/system-verilog-CnnmHF94.js +0 -1
  286. package/ui/dist/assets/systemd-4A_iFExJ.js +0 -1
  287. package/ui/dist/assets/talonscript-CkByrt1z.js +0 -1
  288. package/ui/dist/assets/tasl-QIJgUcNo.js +0 -1
  289. package/ui/dist/assets/tcl-dwOrl1Do.js +0 -1
  290. package/ui/dist/assets/templ-P3uqSqPl.js +0 -1
  291. package/ui/dist/assets/terraform-BETggiCN.js +0 -1
  292. package/ui/dist/assets/tex-CvyZ59Mk.js +0 -1
  293. package/ui/dist/assets/tokyo-night-hegEt444.js +0 -1
  294. package/ui/dist/assets/ts-tags-zn1MmPIZ.js +0 -1
  295. package/ui/dist/assets/tsv-B_m7g4N7.js +0 -1
  296. package/ui/dist/assets/turtle-BsS91CYL.js +0 -1
  297. package/ui/dist/assets/twig-ChbOoGGc.js +0 -1
  298. package/ui/dist/assets/typespec-BGHnOYBU.js +0 -1
  299. package/ui/dist/assets/typst-DHCkPAjA.js +0 -1
  300. package/ui/dist/assets/v-BcVCzyr7.js +0 -1
  301. package/ui/dist/assets/vala-CsfeWuGM.js +0 -1
  302. package/ui/dist/assets/vb-D17OF-Vu.js +0 -1
  303. package/ui/dist/assets/verilog-BQ8w6xss.js +0 -1
  304. package/ui/dist/assets/vesper-DU1UobuO.js +0 -1
  305. package/ui/dist/assets/vhdl-CeAyd5Ju.js +0 -1
  306. package/ui/dist/assets/viml-CJc9bBzg.js +0 -1
  307. package/ui/dist/assets/vitesse-black-Bkuqu6BP.js +0 -1
  308. package/ui/dist/assets/vitesse-dark-D0r3Knsf.js +0 -1
  309. package/ui/dist/assets/vitesse-light-CVO1_9PV.js +0 -1
  310. package/ui/dist/assets/vue-DN_0RTcg.js +0 -1
  311. package/ui/dist/assets/vue-html-AaS7Mt5G.js +0 -1
  312. package/ui/dist/assets/vue-vine-CQOfvN7w.js +0 -1
  313. package/ui/dist/assets/vyper-CDx5xZoG.js +0 -1
  314. package/ui/dist/assets/wasm-MzD3tlZU.js +0 -1
  315. package/ui/dist/assets/wenyan-BV7otONQ.js +0 -1
  316. package/ui/dist/assets/wgsl-Dx-B1_4e.js +0 -1
  317. package/ui/dist/assets/wikitext-BhOHFoWU.js +0 -1
  318. package/ui/dist/assets/wit-5i3qLPDT.js +0 -1
  319. package/ui/dist/assets/wolfram-lXgVvXCa.js +0 -1
  320. package/ui/dist/assets/xsl-CtQFsRM5.js +0 -1
  321. package/ui/dist/assets/zenscript-DVFEvuxE.js +0 -1
  322. package/ui/dist/assets/zig-VOosw3JB.js +0 -1
  323. /package/ui/dist/assets/{docker-BcOcwvcX.js → dockerfile-BcOcwvcX.js} +0 -0
@@ -0,0 +1,35 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/cpp-BRuaLJcg.js","assets/c-BIGW1oBm.js","assets/sql-BLtJtn59.js","assets/ruby-CkRbH_-r.js","assets/graphql-ChdNCCLP.js","assets/typescript-BPQ3VLAy.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/shellscript-Yzrsuije.js","assets/yaml-Buea-lGh.js","assets/php-Dhbhpdrm.js","assets/json-Cp-IABpG.js"])))=>i.map(i=>d[i]);
2
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/**
3
+ * @vue/shared v3.5.28
4
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
5
+ * @license MIT
6
+ **/function mi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ve={},On=[],Ft=()=>{},ul=()=>!1,to=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),gi=e=>e.startsWith("onUpdate:"),Qe=Object.assign,yi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},uc=Object.prototype.hasOwnProperty,ze=(e,t)=>uc.call(e,t),Ee=Array.isArray,Rn=e=>Ts(e)==="[object Map]",dl=e=>Ts(e)==="[object Set]",Ui=e=>Ts(e)==="[object Date]",Pe=e=>typeof e=="function",qe=e=>typeof e=="string",Pt=e=>typeof e=="symbol",Be=e=>e!==null&&typeof e=="object",fl=e=>(Be(e)||Pe(e))&&Pe(e.then)&&Pe(e.catch),pl=Object.prototype.toString,Ts=e=>pl.call(e),dc=e=>Ts(e).slice(8,-1),hl=e=>Ts(e)==="[object Object]",no=e=>qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qn=mi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),so=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},fc=/-\w/g,xt=so(e=>e.replace(fc,t=>t.slice(1).toUpperCase())),pc=/\B([A-Z])/g,gn=so(e=>e.replace(pc,"-$1").toLowerCase()),oo=so(e=>e.charAt(0).toUpperCase()+e.slice(1)),So=so(e=>e?`on${oo(e)}`:""),dn=(e,t)=>!Object.is(e,t),To=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},vl=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},hc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},vc=e=>{const t=qe(e)?Number(e):NaN;return isNaN(t)?e:t};let Ki;const io=()=>Ki||(Ki=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Me(e){if(Ee(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=qe(s)?_c(s):Me(s);if(o)for(const i in o)t[i]=o[i]}return t}else if(qe(e)||Be(e))return e}const mc=/;(?![^(]*\))/g,gc=/:([^]+)/,yc=/\/\*[^]*?\*\//g;function _c(e){const t={};return e.replace(yc,"").split(mc).forEach(n=>{if(n){const s=n.split(gc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function he(e){let t="";if(qe(e))t=e;else if(Ee(e))for(let n=0;n<e.length;n++){const s=he(e[n]);s&&(t+=s+" ")}else if(Be(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function bc(e){if(!e)return null;let{class:t,style:n}=e;return t&&!qe(t)&&(e.class=he(t)),n&&(e.style=Me(n)),e}const wc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",kc=mi(wc);function ml(e){return!!e||e===""}function xc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=_i(e[s],t[s]);return n}function _i(e,t){if(e===t)return!0;let n=Ui(e),s=Ui(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Pt(e),s=Pt(t),n||s)return e===t;if(n=Ee(e),s=Ee(t),n||s)return n&&s?xc(e,t):!1;if(n=Be(e),s=Be(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,i=Object.keys(t).length;if(o!==i)return!1;for(const r in e){const l=e.hasOwnProperty(r),c=t.hasOwnProperty(r);if(l&&!c||!l&&c||!_i(e[r],t[r]))return!1}}return String(e)===String(t)}const gl=e=>!!(e&&e.__v_isRef===!0),M=e=>qe(e)?e:e==null?"":Ee(e)||Be(e)&&(e.toString===pl||!Pe(e.toString))?gl(e)?M(e.value):JSON.stringify(e,yl,2):String(e),yl=(e,t)=>gl(t)?yl(e,t.value):Rn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],i)=>(n[Co(s,i)+" =>"]=o,n),{})}:dl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Co(n))}:Pt(t)?Co(t):Be(t)&&!Ee(t)&&!hl(t)?String(t):t,Co=(e,t="")=>{var n;return Pt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
7
+ * @vue/reactivity v3.5.28
8
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
9
+ * @license MIT
10
+ **/let it;class _l{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=it,!t&&it&&(this.index=(it.scopes||(it.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=it;try{return it=this,t()}finally{it=n}}}on(){++this._on===1&&(this.prevScope=it,it=this)}off(){this._on>0&&--this._on===0&&(it=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function bl(e){return new _l(e)}function wl(){return it}function $c(e,t=!1){it&&it.cleanups.push(e)}let Ue;const Mo=new WeakSet;class kl{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,it&&it.active&&it.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Mo.has(this)&&(Mo.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||$l(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Wi(this),Sl(this);const t=Ue,n=Ct;Ue=this,Ct=!0;try{return this.fn()}finally{Tl(this),Ue=t,Ct=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ki(t);this.deps=this.depsTail=void 0,Wi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Mo.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Wo(this)&&this.run()}get dirty(){return Wo(this)}}let xl=0,es,ts;function $l(e,t=!1){if(e.flags|=8,t){e.next=ts,ts=e;return}e.next=es,es=e}function bi(){xl++}function wi(){if(--xl>0)return;if(ts){let t=ts;for(ts=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;es;){let t=es;for(es=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Sl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tl(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),ki(s),Sc(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Wo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Cl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Cl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===us)||(e.globalVersion=us,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Wo(e))))return;e.flags|=2;const t=e.dep,n=Ue,s=Ct;Ue=e,Ct=!0;try{Sl(e);const o=e.fn(e._value);(t.version===0||dn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ue=n,Ct=s,Tl(e),e.flags&=-3}}function ki(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)ki(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Sc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ct=!0;const Ml=[];function Zt(){Ml.push(Ct),Ct=!1}function Qt(){const e=Ml.pop();Ct=e===void 0?!0:e}function Wi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ue;Ue=void 0;try{t()}finally{Ue=n}}}let us=0;class Tc{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class xi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ue||!Ct||Ue===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ue)n=this.activeLink=new Tc(Ue,this),Ue.deps?(n.prevDep=Ue.depsTail,Ue.depsTail.nextDep=n,Ue.depsTail=n):Ue.deps=Ue.depsTail=n,El(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ue.depsTail,n.nextDep=void 0,Ue.depsTail.nextDep=n,Ue.depsTail=n,Ue.deps===n&&(Ue.deps=s)}return n}trigger(t){this.version++,us++,this.notify(t)}notify(t){bi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{wi()}}}function El(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)El(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Bs=new WeakMap,Cn=Symbol(""),qo=Symbol(""),ds=Symbol("");function rt(e,t,n){if(Ct&&Ue){let s=Bs.get(e);s||Bs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new xi),o.map=s,o.key=n),o.track()}}function qt(e,t,n,s,o,i){const r=Bs.get(e);if(!r){us++;return}const l=c=>{c&&c.trigger()};if(bi(),t==="clear")r.forEach(l);else{const c=Ee(e),p=c&&no(n);if(c&&n==="length"){const d=Number(s);r.forEach((m,v)=>{(v==="length"||v===ds||!Pt(v)&&v>=d)&&l(m)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),p&&l(r.get(ds)),t){case"add":c?p&&l(r.get("length")):(l(r.get(Cn)),Rn(e)&&l(r.get(qo)));break;case"delete":c||(l(r.get(Cn)),Rn(e)&&l(r.get(qo)));break;case"set":Rn(e)&&l(r.get(Cn));break}}wi()}function Cc(e,t){const n=Bs.get(e);return n&&n.get(t)}function In(e){const t=Oe(e);return t===e?t:(rt(t,"iterate",ds),_t(e)?t:t.map(It))}function ro(e){return rt(e=Oe(e),"iterate",ds),e}function cn(e,t){return en(e)?zn(Yt(e)?It(t):t):It(t)}const Mc={__proto__:null,[Symbol.iterator](){return Eo(this,Symbol.iterator,e=>cn(this,e))},concat(...e){return In(this).concat(...e.map(t=>Ee(t)?In(t):t))},entries(){return Eo(this,"entries",e=>(e[1]=cn(this,e[1]),e))},every(e,t){return Vt(this,"every",e,t,void 0,arguments)},filter(e,t){return Vt(this,"filter",e,t,n=>n.map(s=>cn(this,s)),arguments)},find(e,t){return Vt(this,"find",e,t,n=>cn(this,n),arguments)},findIndex(e,t){return Vt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Vt(this,"findLast",e,t,n=>cn(this,n),arguments)},findLastIndex(e,t){return Vt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Vt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Po(this,"includes",e)},indexOf(...e){return Po(this,"indexOf",e)},join(e){return In(this).join(e)},lastIndexOf(...e){return Po(this,"lastIndexOf",e)},map(e,t){return Vt(this,"map",e,t,void 0,arguments)},pop(){return Kn(this,"pop")},push(...e){return Kn(this,"push",e)},reduce(e,...t){return qi(this,"reduce",e,t)},reduceRight(e,...t){return qi(this,"reduceRight",e,t)},shift(){return Kn(this,"shift")},some(e,t){return Vt(this,"some",e,t,void 0,arguments)},splice(...e){return Kn(this,"splice",e)},toReversed(){return In(this).toReversed()},toSorted(e){return In(this).toSorted(e)},toSpliced(...e){return In(this).toSpliced(...e)},unshift(...e){return Kn(this,"unshift",e)},values(){return Eo(this,"values",e=>cn(this,e))}};function Eo(e,t,n){const s=ro(e),o=s[t]();return s!==e&&!_t(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=n(i.value)),i}),o}const Ec=Array.prototype;function Vt(e,t,n,s,o,i){const r=ro(e),l=r!==e&&!_t(e),c=r[t];if(c!==Ec[t]){const m=c.apply(e,i);return l?It(m):m}let p=n;r!==e&&(l?p=function(m,v){return n.call(this,cn(e,m),v,e)}:n.length>2&&(p=function(m,v){return n.call(this,m,v,e)}));const d=c.call(r,p,s);return l&&o?o(d):d}function qi(e,t,n,s){const o=ro(e);let i=n;return o!==e&&(_t(e)?n.length>3&&(i=function(r,l,c){return n.call(this,r,l,c,e)}):i=function(r,l,c){return n.call(this,r,cn(e,l),c,e)}),o[t](i,...s)}function Po(e,t,n){const s=Oe(e);rt(s,"iterate",ds);const o=s[t](...n);return(o===-1||o===!1)&&lo(n[0])?(n[0]=Oe(n[0]),s[t](...n)):o}function Kn(e,t,n=[]){Zt(),bi();const s=Oe(e)[t].apply(e,n);return wi(),Qt(),s}const Pc=mi("__proto__,__v_isRef,__isVue"),Pl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Pt));function Ic(e){Pt(e)||(e=String(e));const t=Oe(this);return rt(t,"has",e),t.hasOwnProperty(e)}class Il{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(o?i?Hc:Rl:i?Ol:Ll).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=Ee(t);if(!o){let c;if(r&&(c=Mc[n]))return c;if(n==="hasOwnProperty")return Ic}const l=Reflect.get(t,n,Ge(t)?t:s);if((Pt(n)?Pl.has(n):Pc(n))||(o||rt(t,"get",n),i))return l;if(Ge(l)){const c=r&&no(n)?l:l.value;return o&&Be(c)?Jo(c):c}return Be(l)?o?Jo(l):Cs(l):l}}class Al extends Il{constructor(t=!1){super(!1,t)}set(t,n,s,o){let i=t[n];const r=Ee(t)&&no(n);if(!this._isShallow){const p=en(i);if(!_t(s)&&!en(s)&&(i=Oe(i),s=Oe(s)),!r&&Ge(i)&&!Ge(s))return p||(i.value=s),!0}const l=r?Number(n)<t.length:ze(t,n),c=Reflect.set(t,n,s,Ge(t)?t:o);return t===Oe(o)&&(l?dn(s,i)&&qt(t,"set",n,s):qt(t,"add",n,s)),c}deleteProperty(t,n){const s=ze(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&qt(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!Pt(n)||!Pl.has(n))&&rt(t,"has",n),s}ownKeys(t){return rt(t,"iterate",Ee(t)?"length":Cn),Reflect.ownKeys(t)}}class Ac extends Il{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Lc=new Al,Oc=new Ac,Rc=new Al(!0);const Go=e=>e,Is=e=>Reflect.getPrototypeOf(e);function Dc(e,t,n){return function(...s){const o=this.__v_raw,i=Oe(o),r=Rn(i),l=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,p=o[e](...s),d=n?Go:t?zn:It;return!t&&rt(i,"iterate",c?qo:Cn),Qe(Object.create(p),{next(){const{value:m,done:v}=p.next();return v?{value:m,done:v}:{value:l?[d(m[0]),d(m[1])]:d(m),done:v}}})}}function As(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Nc(e,t){const n={get(o){const i=this.__v_raw,r=Oe(i),l=Oe(o);e||(dn(o,l)&&rt(r,"get",o),rt(r,"get",l));const{has:c}=Is(r),p=t?Go:e?zn:It;if(c.call(r,o))return p(i.get(o));if(c.call(r,l))return p(i.get(l));i!==r&&i.get(o)},get size(){const o=this.__v_raw;return!e&&rt(Oe(o),"iterate",Cn),o.size},has(o){const i=this.__v_raw,r=Oe(i),l=Oe(o);return e||(dn(o,l)&&rt(r,"has",o),rt(r,"has",l)),o===l?i.has(o):i.has(o)||i.has(l)},forEach(o,i){const r=this,l=r.__v_raw,c=Oe(l),p=t?Go:e?zn:It;return!e&&rt(c,"iterate",Cn),l.forEach((d,m)=>o.call(i,p(d),p(m),r))}};return Qe(n,e?{add:As("add"),set:As("set"),delete:As("delete"),clear:As("clear")}:{add(o){!t&&!_t(o)&&!en(o)&&(o=Oe(o));const i=Oe(this);return Is(i).has.call(i,o)||(i.add(o),qt(i,"add",o,o)),this},set(o,i){!t&&!_t(i)&&!en(i)&&(i=Oe(i));const r=Oe(this),{has:l,get:c}=Is(r);let p=l.call(r,o);p||(o=Oe(o),p=l.call(r,o));const d=c.call(r,o);return r.set(o,i),p?dn(i,d)&&qt(r,"set",o,i):qt(r,"add",o,i),this},delete(o){const i=Oe(this),{has:r,get:l}=Is(i);let c=r.call(i,o);c||(o=Oe(o),c=r.call(i,o)),l&&l.call(i,o);const p=i.delete(o);return c&&qt(i,"delete",o,void 0),p},clear(){const o=Oe(this),i=o.size!==0,r=o.clear();return i&&qt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Dc(o,e,t)}),n}function $i(e,t){const n=Nc(e,t);return(s,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(ze(n,o)&&o in s?n:s,o,i)}const Fc={get:$i(!1,!1)},zc={get:$i(!1,!0)},Bc={get:$i(!0,!1)};const Ll=new WeakMap,Ol=new WeakMap,Rl=new WeakMap,Hc=new WeakMap;function jc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Vc(e){return e.__v_skip||!Object.isExtensible(e)?0:jc(dc(e))}function Cs(e){return en(e)?e:Si(e,!1,Lc,Fc,Ll)}function Uc(e){return Si(e,!1,Rc,zc,Ol)}function Jo(e){return Si(e,!0,Oc,Bc,Rl)}function Si(e,t,n,s,o){if(!Be(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Vc(e);if(i===0)return e;const r=o.get(e);if(r)return r;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function Yt(e){return en(e)?Yt(e.__v_raw):!!(e&&e.__v_isReactive)}function en(e){return!!(e&&e.__v_isReadonly)}function _t(e){return!!(e&&e.__v_isShallow)}function lo(e){return e?!!e.__v_raw:!1}function Oe(e){const t=e&&e.__v_raw;return t?Oe(t):e}function Ti(e){return!ze(e,"__v_skip")&&Object.isExtensible(e)&&vl(e,"__v_skip",!0),e}const It=e=>Be(e)?Cs(e):e,zn=e=>Be(e)?Jo(e):e;function Ge(e){return e?e.__v_isRef===!0:!1}function me(e){return Kc(e,!1)}function Kc(e,t){return Ge(e)?e:new Wc(e,t)}class Wc{constructor(t,n){this.dep=new xi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Oe(t),this._value=n?t:It(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||_t(t)||en(t);t=s?t:Oe(t),dn(t,n)&&(this._rawValue=t,this._value=s?t:It(t),this.dep.trigger())}}function Y(e){return Ge(e)?e.value:e}const qc={get:(e,t,n)=>t==="__v_raw"?e:Y(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ge(o)&&!Ge(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Dl(e){return Yt(e)?e:new Proxy(e,qc)}function Gc(e){const t=Ee(e)?new Array(e.length):{};for(const n in e)t[n]=Yc(e,n);return t}class Jc{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=Oe(t);let o=!0,i=t;if(!Ee(t)||!no(String(n)))do o=!lo(i)||_t(i);while(o&&(i=i.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=Y(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ge(this._raw[this._key])){const n=this._object[this._key];if(Ge(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Cc(this._raw,this._key)}}function Yc(e,t,n){return new Jc(e,t,n)}class Xc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new xi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=us-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ue!==this)return $l(this,!0),!0}get value(){const t=this.dep.track();return Cl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Zc(e,t,n=!1){let s,o;return Pe(e)?s=e:(s=e.get,o=e.set),new Xc(s,o,n)}const Ls={},Hs=new WeakMap;let $n;function Qc(e,t=!1,n=$n){if(n){let s=Hs.get(n);s||Hs.set(n,s=[]),s.push(e)}}function eu(e,t,n=Ve){const{immediate:s,deep:o,once:i,scheduler:r,augmentJob:l,call:c}=n,p=V=>o?V:_t(V)||o===!1||o===0?Gt(V,1):Gt(V);let d,m,v,w,I=!1,S=!1;if(Ge(e)?(m=()=>e.value,I=_t(e)):Yt(e)?(m=()=>p(e),I=!0):Ee(e)?(S=!0,I=e.some(V=>Yt(V)||_t(V)),m=()=>e.map(V=>{if(Ge(V))return V.value;if(Yt(V))return p(V);if(Pe(V))return c?c(V,2):V()})):Pe(e)?t?m=c?()=>c(e,2):e:m=()=>{if(v){Zt();try{v()}finally{Qt()}}const V=$n;$n=d;try{return c?c(e,3,[w]):e(w)}finally{$n=V}}:m=Ft,t&&o){const V=m,Q=o===!0?1/0:o;m=()=>Gt(V(),Q)}const _=wl(),T=()=>{d.stop(),_&&_.active&&yi(_.effects,d)};if(i&&t){const V=t;t=(...Q)=>{V(...Q),T()}}let z=S?new Array(e.length).fill(Ls):Ls;const K=V=>{if(!(!(d.flags&1)||!d.dirty&&!V))if(t){const Q=d.run();if(o||I||(S?Q.some((D,ae)=>dn(D,z[ae])):dn(Q,z))){v&&v();const D=$n;$n=d;try{const ae=[Q,z===Ls?void 0:S&&z[0]===Ls?[]:z,w];z=Q,c?c(t,3,ae):t(...ae)}finally{$n=D}}}else d.run()};return l&&l(K),d=new kl(m),d.scheduler=r?()=>r(K,!1):K,w=V=>Qc(V,!1,d),v=d.onStop=()=>{const V=Hs.get(d);if(V){if(c)c(V,4);else for(const Q of V)Q();Hs.delete(d)}},t?s?K(!0):z=d.run():r?r(K.bind(null,!0),!0):d.run(),T.pause=d.pause.bind(d),T.resume=d.resume.bind(d),T.stop=T,T}function Gt(e,t=1/0,n){if(t<=0||!Be(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ge(e))Gt(e.value,t,n);else if(Ee(e))for(let s=0;s<e.length;s++)Gt(e[s],t,n);else if(dl(e)||Rn(e))e.forEach(s=>{Gt(s,t,n)});else if(hl(e)){for(const s in e)Gt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Gt(e[s],t,n)}return e}/**
11
+ * @vue/runtime-core v3.5.28
12
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
13
+ * @license MIT
14
+ **/function Ms(e,t,n,s){try{return s?e(...s):e()}catch(o){ao(o,t,n)}}function At(e,t,n,s){if(Pe(e)){const o=Ms(e,t,n,s);return o&&fl(o)&&o.catch(i=>{ao(i,t,n)}),o}if(Ee(e)){const o=[];for(let i=0;i<e.length;i++)o.push(At(e[i],t,n,s));return o}}function ao(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||Ve;if(t){let l=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const d=l.ec;if(d){for(let m=0;m<d.length;m++)if(d[m](e,c,p)===!1)return}l=l.parent}if(i){Zt(),Ms(i,null,10,[e,c,p]),Qt();return}}tu(e,n,o,s,r)}function tu(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const dt=[];let Rt=-1;const Dn=[];let un=null,Ln=0;const Nl=Promise.resolve();let js=null;function Ke(e){const t=js||Nl;return e?t.then(this?e.bind(this):e):t}function nu(e){let t=Rt+1,n=dt.length;for(;t<n;){const s=t+n>>>1,o=dt[s],i=fs(o);i<e||i===e&&o.flags&2?t=s+1:n=s}return t}function Ci(e){if(!(e.flags&1)){const t=fs(e),n=dt[dt.length-1];!n||!(e.flags&2)&&t>=fs(n)?dt.push(e):dt.splice(nu(t),0,e),e.flags|=1,Fl()}}function Fl(){js||(js=Nl.then(Bl))}function su(e){Ee(e)?Dn.push(...e):un&&e.id===-1?un.splice(Ln+1,0,e):e.flags&1||(Dn.push(e),e.flags|=1),Fl()}function Gi(e,t,n=Rt+1){for(;n<dt.length;n++){const s=dt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;dt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function zl(e){if(Dn.length){const t=[...new Set(Dn)].sort((n,s)=>fs(n)-fs(s));if(Dn.length=0,un){un.push(...t);return}for(un=t,Ln=0;Ln<un.length;Ln++){const n=un[Ln];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}un=null,Ln=0}}const fs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Bl(e){try{for(Rt=0;Rt<dt.length;Rt++){const t=dt[Rt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ms(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Rt<dt.length;Rt++){const t=dt[Rt];t&&(t.flags&=-2)}Rt=-1,dt.length=0,zl(),js=null,(dt.length||Dn.length)&&Bl()}}let st=null,co=null;function Vs(e){const t=st;return st=e,co=e&&e.type.__scopeId||null,t}function ou(e){co=e}function iu(){co=null}const ru=e=>pt;function pt(e,t=st,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Ws(-1);const i=Vs(t);let r;try{r=e(...o)}finally{Vs(i),s._d&&Ws(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function He(e,t){if(st===null)return e;const n=go(st),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[i,r,l,c=Ve]=t[o];i&&(Pe(i)&&(i={mounted:i,updated:i}),i.deep&&Gt(r),s.push({dir:i,instance:n,value:r,oldValue:void 0,arg:l,modifiers:c}))}return e}function _n(e,t,n,s){const o=e.dirs,i=t&&t.dirs;for(let r=0;r<o.length;r++){const l=o[r];i&&(l.oldValue=i[r].value);let c=l.dir[s];c&&(Zt(),At(c,n,8,[e.el,l,e,t]),Qt())}}function on(e,t){if(at){let n=at.provides;const s=at.parent&&at.parent.provides;s===n&&(n=at.provides=Object.create(s)),n[e]=t}}function $t(e,t,n=!1){const s=Es();if(s||Mn){let o=Mn?Mn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Pe(t)?t.call(s&&s.proxy):t}}function lu(){return!!(Es()||Mn)}const au=Symbol.for("v-scx"),cu=()=>$t(au);function uu(e,t){return Mi(e,null,t)}function We(e,t,n){return Mi(e,t,n)}function Mi(e,t,n=Ve){const{immediate:s,deep:o,flush:i,once:r}=n,l=Qe({},n),c=t&&s||!t&&i!=="post";let p;if(ys){if(i==="sync"){const w=cu();p=w.__watcherHandles||(w.__watcherHandles=[])}else if(!c){const w=()=>{};return w.stop=Ft,w.resume=Ft,w.pause=Ft,w}}const d=at;l.call=(w,I,S)=>At(w,d,I,S);let m=!1;i==="post"?l.scheduler=w=>{vt(w,d&&d.suspense)}:i!=="sync"&&(m=!0,l.scheduler=(w,I)=>{I?w():Ci(w)}),l.augmentJob=w=>{t&&(w.flags|=4),m&&(w.flags|=2,d&&(w.id=d.uid,w.i=d))};const v=eu(e,t,l);return ys&&(p?p.push(v):c&&v()),v}function du(e,t,n){const s=this.proxy,o=qe(e)?e.includes(".")?Hl(s,e):()=>s[e]:e.bind(s,s);let i;Pe(t)?i=t:(i=t.handler,n=t);const r=Ps(this),l=Mi(o,i.bind(s),n);return r(),l}function Hl(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o<n.length&&s;o++)s=s[n[o]];return s}}const fu=Symbol("_vte"),jl=e=>e.__isTeleport,Dt=Symbol("_leaveCb"),Wn=Symbol("_enterCb");function pu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return En(()=>{e.isMounted=!0}),po(()=>{e.isUnmounting=!0}),e}const wt=[Function,Array],Vl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:wt,onEnter:wt,onAfterEnter:wt,onEnterCancelled:wt,onBeforeLeave:wt,onLeave:wt,onAfterLeave:wt,onLeaveCancelled:wt,onBeforeAppear:wt,onAppear:wt,onAfterAppear:wt,onAppearCancelled:wt},Ul=e=>{const t=e.subTree;return t.component?Ul(t.component):t},hu={name:"BaseTransition",props:Vl,setup(e,{slots:t}){const n=Es(),s=pu();return()=>{const o=t.default&&ql(t.default(),!0);if(!o||!o.length)return;const i=Kl(o),r=Oe(e),{mode:l}=r;if(s.isLeaving)return Io(i);const c=Ji(i);if(!c)return Io(i);let p=Yo(c,r,s,n,m=>p=m);c.type!==lt&&ps(c,p);let d=n.subTree&&Ji(n.subTree);if(d&&d.type!==lt&&!Tn(d,c)&&Ul(n).type!==lt){let m=Yo(d,r,s,n);if(ps(d,m),l==="out-in"&&c.type!==lt)return s.isLeaving=!0,m.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete m.afterLeave,d=void 0},Io(i);l==="in-out"&&c.type!==lt?m.delayLeave=(v,w,I)=>{const S=Wl(s,d);S[String(d.key)]=d,v[Dt]=()=>{w(),v[Dt]=void 0,delete p.delayedLeave,d=void 0},p.delayedLeave=()=>{I(),delete p.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return i}}};function Kl(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==lt){t=n;break}}return t}const vu=hu;function Wl(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Yo(e,t,n,s,o){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:c,onEnter:p,onAfterEnter:d,onEnterCancelled:m,onBeforeLeave:v,onLeave:w,onAfterLeave:I,onLeaveCancelled:S,onBeforeAppear:_,onAppear:T,onAfterAppear:z,onAppearCancelled:K}=t,V=String(e.key),Q=Wl(n,e),D=(O,R)=>{O&&At(O,s,9,R)},ae=(O,R)=>{const de=R[1];D(O,R),Ee(O)?O.every(F=>F.length<=1)&&de():O.length<=1&&de()},ue={mode:r,persisted:l,beforeEnter(O){let R=c;if(!n.isMounted)if(i)R=_||c;else return;O[Dt]&&O[Dt](!0);const de=Q[V];de&&Tn(e,de)&&de.el[Dt]&&de.el[Dt](),D(R,[O])},enter(O){let R=p,de=d,F=m;if(!n.isMounted)if(i)R=T||p,de=z||d,F=K||m;else return;let te=!1;O[Wn]=B=>{te||(te=!0,B?D(F,[O]):D(de,[O]),ue.delayedLeave&&ue.delayedLeave(),O[Wn]=void 0)};const ce=O[Wn].bind(null,!1);R?ae(R,[O,ce]):ce()},leave(O,R){const de=String(e.key);if(O[Wn]&&O[Wn](!0),n.isUnmounting)return R();D(v,[O]);let F=!1;O[Dt]=ce=>{F||(F=!0,R(),ce?D(S,[O]):D(I,[O]),O[Dt]=void 0,Q[de]===e&&delete Q[de])};const te=O[Dt].bind(null,!1);Q[de]=e,w?ae(w,[O,te]):te()},clone(O){const R=Yo(O,t,n,s,o);return o&&o(R),R}};return ue}function Io(e){if(uo(e))return e=vn(e),e.children=null,e}function Ji(e){if(!uo(e))return jl(e.type)&&e.children?Kl(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Pe(n.default))return n.default()}}function ps(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ps(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ql(e,t=!1,n){let s=[],o=0;for(let i=0;i<e.length;i++){let r=e[i];const l=n==null?r.key:String(n)+String(r.key!=null?r.key:i);r.type===ve?(r.patchFlag&128&&o++,s=s.concat(ql(r.children,t,l))):(t||r.type!==lt)&&s.push(l!=null?vn(r,{key:l}):r)}if(o>1)for(let i=0;i<s.length;i++)s[i].patchFlag=-2;return s}function et(e,t){return Pe(e)?Qe({name:e.name},t,{setup:e}):e}function Gl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Yi(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Us=new WeakMap;function ns(e,t,n,s,o=!1){if(Ee(e)){e.forEach((S,_)=>ns(S,t&&(Ee(t)?t[_]:t),n,s,o));return}if(Nn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ns(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?go(s.component):s.el,r=o?null:i,{i:l,r:c}=e,p=t&&t.r,d=l.refs===Ve?l.refs={}:l.refs,m=l.setupState,v=Oe(m),w=m===Ve?ul:S=>Yi(d,S)?!1:ze(v,S),I=(S,_)=>!(_&&Yi(d,_));if(p!=null&&p!==c){if(Xi(t),qe(p))d[p]=null,w(p)&&(m[p]=null);else if(Ge(p)){const S=t;I(p,S.k)&&(p.value=null),S.k&&(d[S.k]=null)}}if(Pe(c))Ms(c,l,12,[r,d]);else{const S=qe(c),_=Ge(c);if(S||_){const T=()=>{if(e.f){const z=S?w(c)?m[c]:d[c]:I()||!e.k?c.value:d[e.k];if(o)Ee(z)&&yi(z,i);else if(Ee(z))z.includes(i)||z.push(i);else if(S)d[c]=[i],w(c)&&(m[c]=d[c]);else{const K=[i];I(c,e.k)&&(c.value=K),e.k&&(d[e.k]=K)}}else S?(d[c]=r,w(c)&&(m[c]=r)):_&&(I(c,e.k)&&(c.value=r),e.k&&(d[e.k]=r))};if(r){const z=()=>{T(),Us.delete(e)};z.id=-1,Us.set(e,z),vt(z,n)}else Xi(e),T()}}}function Xi(e){const t=Us.get(e);t&&(t.flags|=8,Us.delete(e))}io().requestIdleCallback;io().cancelIdleCallback;const Nn=e=>!!e.type.__asyncLoader,uo=e=>e.type.__isKeepAlive;function mu(e,t){Jl(e,"a",t)}function gu(e,t){Jl(e,"da",t)}function Jl(e,t,n=at){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(fo(t,s,n),n){let o=n.parent;for(;o&&o.parent;)uo(o.parent.vnode)&&yu(s,t,n,o),o=o.parent}}function yu(e,t,n,s){const o=fo(t,e,s,!0);ho(()=>{yi(s[t],o)},n)}function fo(e,t,n=at,s=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{Zt();const l=Ps(n),c=At(t,n,e,r);return l(),Qt(),c});return s?o.unshift(i):o.push(i),i}}const nn=e=>(t,n=at)=>{(!ys||e==="sp")&&fo(e,(...s)=>t(...s),n)},_u=nn("bm"),En=nn("m"),bu=nn("bu"),wu=nn("u"),po=nn("bum"),ho=nn("um"),ku=nn("sp"),xu=nn("rtg"),$u=nn("rtc");function Su(e,t=at){fo("ec",e,t)}const Ei="components",Tu="directives";function hs(e,t){return Pi(Ei,e,!0,t)||e}const Yl=Symbol.for("v-ndc");function Xl(e){return qe(e)?Pi(Ei,e,!1)||e:e||Yl}function yn(e){return Pi(Tu,e)}function Pi(e,t,n=!0,s=!1){const o=st||at;if(o){const i=o.type;if(e===Ei){const l=cd(i,!1);if(l&&(l===t||l===xt(t)||l===oo(xt(t))))return i}const r=Zi(o[e]||i[e],t)||Zi(o.appContext[e],t);return!r&&s?i:r}}function Zi(e,t){return e&&(e[t]||e[xt(t)]||e[oo(xt(t))])}function Ce(e,t,n,s){let o;const i=n,r=Ee(e);if(r||qe(e)){const l=r&&Yt(e);let c=!1,p=!1;l&&(c=!_t(e),p=en(e),e=ro(e)),o=new Array(e.length);for(let d=0,m=e.length;d<m;d++)o[d]=t(c?p?zn(It(e[d])):It(e[d]):e[d],d,void 0,i)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,i)}else if(Be(e))if(e[Symbol.iterator])o=Array.from(e,(l,c)=>t(l,c,void 0,i));else{const l=Object.keys(e);o=new Array(l.length);for(let c=0,p=l.length;c<p;c++){const d=l[c];o[c]=t(e[d],d,c,i)}}else o=[];return o}function vs(e,t,n={},s,o){if(st.ce||st.parent&&Nn(st.parent)&&st.parent.ce){const p=Object.keys(n).length>0;return t!=="default"&&(n.name=t),y(),ft(ve,null,[Re("slot",n,s)],p?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),y();const r=i&&Zl(i(n)),l=n.key||r&&r.key,c=ft(ve,{key:(l&&!Pt(l)?l:`_${t}`)+(!r&&s?"_fb":"")},r||[],r&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),i&&i._c&&(i._d=!0),c}function Zl(e){return e.some(t=>gs(t)?!(t.type===lt||t.type===ve&&!Zl(t.children)):!0)?e:null}const Xo=e=>e?ba(e)?go(e):Xo(e.parent):null,ss=Qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Xo(e.parent),$root:e=>Xo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ea(e),$forceUpdate:e=>e.f||(e.f=()=>{Ci(e.update)}),$nextTick:e=>e.n||(e.n=Ke.bind(e.proxy)),$watch:e=>du.bind(e)}),Ao=(e,t)=>e!==Ve&&!e.__isScriptSetup&&ze(e,t),Cu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:i,accessCache:r,type:l,appContext:c}=e;if(t[0]!=="$"){const v=r[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(Ao(s,t))return r[t]=1,s[t];if(o!==Ve&&ze(o,t))return r[t]=2,o[t];if(ze(i,t))return r[t]=3,i[t];if(n!==Ve&&ze(n,t))return r[t]=4,n[t];Zo&&(r[t]=0)}}const p=ss[t];let d,m;if(p)return t==="$attrs"&&rt(e.attrs,"get",""),p(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Ve&&ze(n,t))return r[t]=4,n[t];if(m=c.config.globalProperties,ze(m,t))return m[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:i}=e;return Ao(o,t)?(o[t]=n,!0):s!==Ve&&ze(s,t)?(s[t]=n,!0):ze(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:i,type:r}},l){let c;return!!(n[l]||e!==Ve&&l[0]!=="$"&&ze(e,l)||Ao(t,l)||ze(i,l)||ze(s,l)||ze(ss,l)||ze(o.config.globalProperties,l)||(c=r.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ze(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Mu(){return Eu().slots}function Eu(e){const t=Es();return t.setupContext||(t.setupContext=ka(t))}function Qi(e){return Ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Zo=!0;function Pu(e){const t=ea(e),n=e.proxy,s=e.ctx;Zo=!1,t.beforeCreate&&er(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:r,watch:l,provide:c,inject:p,created:d,beforeMount:m,mounted:v,beforeUpdate:w,updated:I,activated:S,deactivated:_,beforeDestroy:T,beforeUnmount:z,destroyed:K,unmounted:V,render:Q,renderTracked:D,renderTriggered:ae,errorCaptured:ue,serverPrefetch:O,expose:R,inheritAttrs:de,components:F,directives:te,filters:ce}=t;if(p&&Iu(p,s,null),r)for(const oe in r){const W=r[oe];Pe(W)&&(s[oe]=W.bind(n))}if(o){const oe=o.call(n,n);Be(oe)&&(e.data=Cs(oe))}if(Zo=!0,i)for(const oe in i){const W=i[oe],re=Pe(W)?W.bind(n,n):Pe(W.get)?W.get.bind(n,n):Ft,we=!Pe(W)&&Pe(W.set)?W.set.bind(n):Ft,H=A({get:re,set:we});Object.defineProperty(s,oe,{enumerable:!0,configurable:!0,get:()=>H.value,set:C=>H.value=C})}if(l)for(const oe in l)Ql(l[oe],s,n,oe);if(c){const oe=Pe(c)?c.call(n):c;Reflect.ownKeys(oe).forEach(W=>{on(W,oe[W])})}d&&er(d,e,"c");function se(oe,W){Ee(W)?W.forEach(re=>oe(re.bind(n))):W&&oe(W.bind(n))}if(se(_u,m),se(En,v),se(bu,w),se(wu,I),se(mu,S),se(gu,_),se(Su,ue),se($u,D),se(xu,ae),se(po,z),se(ho,V),se(ku,O),Ee(R))if(R.length){const oe=e.exposed||(e.exposed={});R.forEach(W=>{Object.defineProperty(oe,W,{get:()=>n[W],set:re=>n[W]=re,enumerable:!0})})}else e.exposed||(e.exposed={});Q&&e.render===Ft&&(e.render=Q),de!=null&&(e.inheritAttrs=de),F&&(e.components=F),te&&(e.directives=te),O&&Gl(e)}function Iu(e,t,n=Ft){Ee(e)&&(e=Qo(e));for(const s in e){const o=e[s];let i;Be(o)?"default"in o?i=$t(o.from||s,o.default,!0):i=$t(o.from||s):i=$t(o),Ge(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[s]=i}}function er(e,t,n){At(Ee(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ql(e,t,n,s){let o=s.includes(".")?Hl(n,s):()=>n[s];if(qe(e)){const i=t[e];Pe(i)&&We(o,i)}else if(Pe(e))We(o,e.bind(n));else if(Be(e))if(Ee(e))e.forEach(i=>Ql(i,t,n,s));else{const i=Pe(e.handler)?e.handler.bind(n):t[e.handler];Pe(i)&&We(o,i,e)}}function ea(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let c;return l?c=l:!o.length&&!n&&!s?c=t:(c={},o.length&&o.forEach(p=>Ks(c,p,r,!0)),Ks(c,t,r)),Be(t)&&i.set(t,c),c}function Ks(e,t,n,s=!1){const{mixins:o,extends:i}=t;i&&Ks(e,i,n,!0),o&&o.forEach(r=>Ks(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const l=Au[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Au={data:tr,props:nr,emits:nr,methods:Zn,computed:Zn,beforeCreate:ut,created:ut,beforeMount:ut,mounted:ut,beforeUpdate:ut,updated:ut,beforeDestroy:ut,beforeUnmount:ut,destroyed:ut,unmounted:ut,activated:ut,deactivated:ut,errorCaptured:ut,serverPrefetch:ut,components:Zn,directives:Zn,watch:Ou,provide:tr,inject:Lu};function tr(e,t){return t?e?function(){return Qe(Pe(e)?e.call(this,this):e,Pe(t)?t.call(this,this):t)}:t:e}function Lu(e,t){return Zn(Qo(e),Qo(t))}function Qo(e){if(Ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ut(e,t){return e?[...new Set([].concat(e,t))]:t}function Zn(e,t){return e?Qe(Object.create(null),e,t):t}function nr(e,t){return e?Ee(e)&&Ee(t)?[...new Set([...e,...t])]:Qe(Object.create(null),Qi(e),Qi(t??{})):t}function Ou(e,t){if(!e)return t;if(!t)return e;const n=Qe(Object.create(null),e);for(const s in t)n[s]=ut(e[s],t[s]);return n}function ta(){return{app:null,config:{isNativeTag:ul,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ru=0;function Du(e,t){return function(s,o=null){Pe(s)||(s=Qe({},s)),o!=null&&!Be(o)&&(o=null);const i=ta(),r=new WeakSet,l=[];let c=!1;const p=i.app={_uid:Ru++,_component:s,_props:o,_container:null,_context:i,_instance:null,version:dd,get config(){return i.config},set config(d){},use(d,...m){return r.has(d)||(d&&Pe(d.install)?(r.add(d),d.install(p,...m)):Pe(d)&&(r.add(d),d(p,...m))),p},mixin(d){return i.mixins.includes(d)||i.mixins.push(d),p},component(d,m){return m?(i.components[d]=m,p):i.components[d]},directive(d,m){return m?(i.directives[d]=m,p):i.directives[d]},mount(d,m,v){if(!c){const w=p._ceVNode||Re(s,o);return w.appContext=i,v===!0?v="svg":v===!1&&(v=void 0),e(w,d,v),c=!0,p._container=d,d.__vue_app__=p,go(w.component)}},onUnmount(d){l.push(d)},unmount(){c&&(At(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(d,m){return i.provides[d]=m,p},runWithContext(d){const m=Mn;Mn=p;try{return d()}finally{Mn=m}}};return p}}let Mn=null;const Nu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${xt(t)}Modifiers`]||e[`${gn(t)}Modifiers`];function Fu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Ve;let o=n;const i=t.startsWith("update:"),r=i&&Nu(s,t.slice(7));r&&(r.trim&&(o=n.map(d=>qe(d)?d.trim():d)),r.number&&(o=n.map(hc)));let l,c=s[l=So(t)]||s[l=So(xt(t))];!c&&i&&(c=s[l=So(gn(t))]),c&&At(c,e,6,o);const p=s[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,At(p,e,6,o)}}const zu=new WeakMap;function na(e,t,n=!1){const s=n?zu:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const i=e.emits;let r={},l=!1;if(!Pe(e)){const c=p=>{const d=na(p,t,!0);d&&(l=!0,Qe(r,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(Be(e)&&s.set(e,null),null):(Ee(i)?i.forEach(c=>r[c]=null):Qe(r,i),Be(e)&&s.set(e,r),r)}function vo(e,t){return!e||!to(t)?!1:(t=t.slice(2).replace(/Once$/,""),ze(e,t[0].toLowerCase()+t.slice(1))||ze(e,gn(t))||ze(e,t))}function sr(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[i],slots:r,attrs:l,emit:c,render:p,renderCache:d,props:m,data:v,setupState:w,ctx:I,inheritAttrs:S}=e,_=Vs(e);let T,z;try{if(n.shapeFlag&4){const V=o||s,Q=V;T=Nt(p.call(Q,V,d,m,w,v,I)),z=l}else{const V=t;T=Nt(V.length>1?V(m,{attrs:l,slots:r,emit:c}):V(m,null)),z=t.props?l:Bu(l)}}catch(V){os.length=0,ao(V,e,1),T=Re(lt)}let K=T;if(z&&S!==!1){const V=Object.keys(z),{shapeFlag:Q}=K;V.length&&Q&7&&(i&&V.some(gi)&&(z=Hu(z,i)),K=vn(K,z,!1,!0))}return n.dirs&&(K=vn(K,null,!1,!0),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition&&ps(K,n.transition),T=K,Vs(_),T}const Bu=e=>{let t;for(const n in e)(n==="class"||n==="style"||to(n))&&((t||(t={}))[n]=e[n]);return t},Hu=(e,t)=>{const n={};for(const s in e)(!gi(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function ju(e,t,n){const{props:s,children:o,component:i}=e,{props:r,children:l,patchFlag:c}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?or(s,r,p):!!r;if(c&8){const d=t.dynamicProps;for(let m=0;m<d.length;m++){const v=d[m];if(sa(r,s,v)&&!vo(p,v))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:s===r?!1:s?r?or(s,r,p):!0:!!r;return!1}function or(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const i=s[o];if(sa(t,e,i)&&!vo(n,i))return!0}return!1}function sa(e,t,n){const s=e[n],o=t[n];return n==="style"&&Be(s)&&Be(o)?!_i(s,o):s!==o}function Vu({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const oa={},ia=()=>Object.create(oa),ra=e=>Object.getPrototypeOf(e)===oa;function Uu(e,t,n,s=!1){const o={},i=ia();e.propsDefaults=Object.create(null),la(e,t,o,i);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);n?e.props=s?o:Uc(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Ku(e,t,n,s){const{props:o,attrs:i,vnode:{patchFlag:r}}=e,l=Oe(o),[c]=e.propsOptions;let p=!1;if((s||r>0)&&!(r&16)){if(r&8){const d=e.vnode.dynamicProps;for(let m=0;m<d.length;m++){let v=d[m];if(vo(e.emitsOptions,v))continue;const w=t[v];if(c)if(ze(i,v))w!==i[v]&&(i[v]=w,p=!0);else{const I=xt(v);o[I]=ei(c,l,I,w,e,!1)}else w!==i[v]&&(i[v]=w,p=!0)}}}else{la(e,t,o,i)&&(p=!0);let d;for(const m in l)(!t||!ze(t,m)&&((d=gn(m))===m||!ze(t,d)))&&(c?n&&(n[m]!==void 0||n[d]!==void 0)&&(o[m]=ei(c,l,m,void 0,e,!0)):delete o[m]);if(i!==l)for(const m in i)(!t||!ze(t,m))&&(delete i[m],p=!0)}p&&qt(e.attrs,"set","")}function la(e,t,n,s){const[o,i]=e.propsOptions;let r=!1,l;if(t)for(let c in t){if(Qn(c))continue;const p=t[c];let d;o&&ze(o,d=xt(c))?!i||!i.includes(d)?n[d]=p:(l||(l={}))[d]=p:vo(e.emitsOptions,c)||(!(c in s)||p!==s[c])&&(s[c]=p,r=!0)}if(i){const c=Oe(n),p=l||Ve;for(let d=0;d<i.length;d++){const m=i[d];n[m]=ei(o,c,m,p[m],e,!ze(p,m))}}return r}function ei(e,t,n,s,o,i){const r=e[n];if(r!=null){const l=ze(r,"default");if(l&&s===void 0){const c=r.default;if(r.type!==Function&&!r.skipFactory&&Pe(c)){const{propsDefaults:p}=o;if(n in p)s=p[n];else{const d=Ps(o);s=p[n]=c.call(null,t),d()}}else s=c;o.ce&&o.ce._setProp(n,s)}r[0]&&(i&&!l?s=!1:r[1]&&(s===""||s===gn(n))&&(s=!0))}return s}const Wu=new WeakMap;function aa(e,t,n=!1){const s=n?Wu:t.propsCache,o=s.get(e);if(o)return o;const i=e.props,r={},l=[];let c=!1;if(!Pe(e)){const d=m=>{c=!0;const[v,w]=aa(m,t,!0);Qe(r,v),w&&l.push(...w)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return Be(e)&&s.set(e,On),On;if(Ee(i))for(let d=0;d<i.length;d++){const m=xt(i[d]);ir(m)&&(r[m]=Ve)}else if(i)for(const d in i){const m=xt(d);if(ir(m)){const v=i[d],w=r[m]=Ee(v)||Pe(v)?{type:v}:Qe({},v),I=w.type;let S=!1,_=!0;if(Ee(I))for(let T=0;T<I.length;++T){const z=I[T],K=Pe(z)&&z.name;if(K==="Boolean"){S=!0;break}else K==="String"&&(_=!1)}else S=Pe(I)&&I.name==="Boolean";w[0]=S,w[1]=_,(S||ze(w,"default"))&&l.push(m)}}const p=[r,l];return Be(e)&&s.set(e,p),p}function ir(e){return e[0]!=="$"&&!Qn(e)}const Ii=e=>e==="_"||e==="_ctx"||e==="$stable",Ai=e=>Ee(e)?e.map(Nt):[Nt(e)],qu=(e,t,n)=>{if(t._n)return t;const s=pt((...o)=>Ai(t(...o)),n);return s._c=!1,s},ca=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Ii(o))continue;const i=e[o];if(Pe(i))t[o]=qu(o,i,s);else if(i!=null){const r=Ai(i);t[o]=()=>r}}},ua=(e,t)=>{const n=Ai(t);e.slots.default=()=>n},da=(e,t,n)=>{for(const s in t)(n||!Ii(s))&&(e[s]=t[s])},Gu=(e,t,n)=>{const s=e.slots=ia();if(e.vnode.shapeFlag&32){const o=t._;o?(da(s,t,n),n&&vl(s,"_",o,!0)):ca(t,s)}else t&&ua(e,t)},Ju=(e,t,n)=>{const{vnode:s,slots:o}=e;let i=!0,r=Ve;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:da(o,t,n):(i=!t.$stable,ca(t,o)),r=t}else t&&(ua(e,t),r={default:1});if(i)for(const l in o)!Ii(l)&&r[l]==null&&delete o[l]},vt=ed;function Yu(e){return Xu(e)}function Xu(e,t){const n=io();n.__VUE__=!0;const{insert:s,remove:o,patchProp:i,createElement:r,createText:l,createComment:c,setText:p,setElementText:d,parentNode:m,nextSibling:v,setScopeId:w=Ft,insertStaticContent:I}=e,S=(a,f,E,q=null,N=null,J=null,pe=void 0,fe=null,ie=!!f.dynamicChildren)=>{if(a===f)return;a&&!Tn(a,f)&&(q=L(a),C(a,N,J,!0),a=null),f.patchFlag===-2&&(ie=!1,f.dynamicChildren=null);const{type:Z,ref:ke,shapeFlag:ge}=f;switch(Z){case mo:_(a,f,E,q);break;case lt:T(a,f,E,q);break;case Ds:a==null&&z(f,E,q,pe);break;case ve:F(a,f,E,q,N,J,pe,fe,ie);break;default:ge&1?Q(a,f,E,q,N,J,pe,fe,ie):ge&6?te(a,f,E,q,N,J,pe,fe,ie):(ge&64||ge&128)&&Z.process(a,f,E,q,N,J,pe,fe,ie,g)}ke!=null&&N?ns(ke,a&&a.ref,J,f||a,!f):ke==null&&a&&a.ref!=null&&ns(a.ref,null,J,a,!0)},_=(a,f,E,q)=>{if(a==null)s(f.el=l(f.children),E,q);else{const N=f.el=a.el;f.children!==a.children&&p(N,f.children)}},T=(a,f,E,q)=>{a==null?s(f.el=c(f.children||""),E,q):f.el=a.el},z=(a,f,E,q)=>{[a.el,a.anchor]=I(a.children,f,E,q,a.el,a.anchor)},K=({el:a,anchor:f},E,q)=>{let N;for(;a&&a!==f;)N=v(a),s(a,E,q),a=N;s(f,E,q)},V=({el:a,anchor:f})=>{let E;for(;a&&a!==f;)E=v(a),o(a),a=E;o(f)},Q=(a,f,E,q,N,J,pe,fe,ie)=>{if(f.type==="svg"?pe="svg":f.type==="math"&&(pe="mathml"),a==null)D(f,E,q,N,J,pe,fe,ie);else{const Z=a.el&&a.el._isVueCE?a.el:null;try{Z&&Z._beginPatch(),O(a,f,N,J,pe,fe,ie)}finally{Z&&Z._endPatch()}}},D=(a,f,E,q,N,J,pe,fe)=>{let ie,Z;const{props:ke,shapeFlag:ge,transition:$e,dirs:Te}=a;if(ie=a.el=r(a.type,J,ke&&ke.is,ke),ge&8?d(ie,a.children):ge&16&&ue(a.children,ie,null,q,N,Lo(a,J),pe,fe),Te&&_n(a,null,q,"created"),ae(ie,a,a.scopeId,pe,q),ke){for(const Fe in ke)Fe!=="value"&&!Qn(Fe)&&i(ie,Fe,null,ke[Fe],J,q);"value"in ke&&i(ie,"value",null,ke.value,J),(Z=ke.onVnodeBeforeMount)&&Ot(Z,q,a)}Te&&_n(a,null,q,"beforeMount");const Ie=Zu(N,$e);Ie&&$e.beforeEnter(ie),s(ie,f,E),((Z=ke&&ke.onVnodeMounted)||Ie||Te)&&vt(()=>{Z&&Ot(Z,q,a),Ie&&$e.enter(ie),Te&&_n(a,null,q,"mounted")},N)},ae=(a,f,E,q,N)=>{if(E&&w(a,E),q)for(let J=0;J<q.length;J++)w(a,q[J]);if(N){let J=N.subTree;if(f===J||va(J.type)&&(J.ssContent===f||J.ssFallback===f)){const pe=N.vnode;ae(a,pe,pe.scopeId,pe.slotScopeIds,N.parent)}}},ue=(a,f,E,q,N,J,pe,fe,ie=0)=>{for(let Z=ie;Z<a.length;Z++){const ke=a[Z]=fe?Wt(a[Z]):Nt(a[Z]);S(null,ke,f,E,q,N,J,pe,fe)}},O=(a,f,E,q,N,J,pe)=>{const fe=f.el=a.el;let{patchFlag:ie,dynamicChildren:Z,dirs:ke}=f;ie|=a.patchFlag&16;const ge=a.props||Ve,$e=f.props||Ve;let Te;if(E&&bn(E,!1),(Te=$e.onVnodeBeforeUpdate)&&Ot(Te,E,f,a),ke&&_n(f,a,E,"beforeUpdate"),E&&bn(E,!0),(ge.innerHTML&&$e.innerHTML==null||ge.textContent&&$e.textContent==null)&&d(fe,""),Z?R(a.dynamicChildren,Z,fe,E,q,Lo(f,N),J):pe||W(a,f,fe,null,E,q,Lo(f,N),J,!1),ie>0){if(ie&16)de(fe,ge,$e,E,N);else if(ie&2&&ge.class!==$e.class&&i(fe,"class",null,$e.class,N),ie&4&&i(fe,"style",ge.style,$e.style,N),ie&8){const Ie=f.dynamicProps;for(let Fe=0;Fe<Ie.length;Fe++){const Ae=Ie[Fe],Ye=ge[Ae],tt=$e[Ae];(tt!==Ye||Ae==="value")&&i(fe,Ae,Ye,tt,N,E)}}ie&1&&a.children!==f.children&&d(fe,f.children)}else!pe&&Z==null&&de(fe,ge,$e,E,N);((Te=$e.onVnodeUpdated)||ke)&&vt(()=>{Te&&Ot(Te,E,f,a),ke&&_n(f,a,E,"updated")},q)},R=(a,f,E,q,N,J,pe)=>{for(let fe=0;fe<f.length;fe++){const ie=a[fe],Z=f[fe],ke=ie.el&&(ie.type===ve||!Tn(ie,Z)||ie.shapeFlag&198)?m(ie.el):E;S(ie,Z,ke,null,q,N,J,pe,!0)}},de=(a,f,E,q,N)=>{if(f!==E){if(f!==Ve)for(const J in f)!Qn(J)&&!(J in E)&&i(a,J,f[J],null,N,q);for(const J in E){if(Qn(J))continue;const pe=E[J],fe=f[J];pe!==fe&&J!=="value"&&i(a,J,fe,pe,N,q)}"value"in E&&i(a,"value",f.value,E.value,N)}},F=(a,f,E,q,N,J,pe,fe,ie)=>{const Z=f.el=a?a.el:l(""),ke=f.anchor=a?a.anchor:l("");let{patchFlag:ge,dynamicChildren:$e,slotScopeIds:Te}=f;Te&&(fe=fe?fe.concat(Te):Te),a==null?(s(Z,E,q),s(ke,E,q),ue(f.children||[],E,ke,N,J,pe,fe,ie)):ge>0&&ge&64&&$e&&a.dynamicChildren&&a.dynamicChildren.length===$e.length?(R(a.dynamicChildren,$e,E,N,J,pe,fe),(f.key!=null||N&&f===N.subTree)&&fa(a,f,!0)):W(a,f,E,ke,N,J,pe,fe,ie)},te=(a,f,E,q,N,J,pe,fe,ie)=>{f.slotScopeIds=fe,a==null?f.shapeFlag&512?N.ctx.activate(f,E,q,pe,ie):ce(f,E,q,N,J,pe,ie):B(a,f,ie)},ce=(a,f,E,q,N,J,pe)=>{const fe=a.component=id(a,q,N);if(uo(a)&&(fe.ctx.renderer=g),rd(fe,!1,pe),fe.asyncDep){if(N&&N.registerDep(fe,se,pe),!a.el){const ie=fe.subTree=Re(lt);T(null,ie,f,E),a.placeholder=ie.el}}else se(fe,a,f,E,N,J,pe)},B=(a,f,E)=>{const q=f.component=a.component;if(ju(a,f,E))if(q.asyncDep&&!q.asyncResolved){oe(q,f,E);return}else q.next=f,q.update();else f.el=a.el,q.vnode=f},se=(a,f,E,q,N,J,pe)=>{const fe=()=>{if(a.isMounted){let{next:ge,bu:$e,u:Te,parent:Ie,vnode:Fe}=a;{const U=pa(a);if(U){ge&&(ge.el=Fe.el,oe(a,ge,pe)),U.asyncDep.then(()=>{vt(()=>{a.isUnmounted||Z()},N)});return}}let Ae=ge,Ye;bn(a,!1),ge?(ge.el=Fe.el,oe(a,ge,pe)):ge=Fe,$e&&To($e),(Ye=ge.props&&ge.props.onVnodeBeforeUpdate)&&Ot(Ye,Ie,ge,Fe),bn(a,!0);const tt=sr(a),ht=a.subTree;a.subTree=tt,S(ht,tt,m(ht.el),L(ht),a,N,J),ge.el=tt.el,Ae===null&&Vu(a,tt.el),Te&&vt(Te,N),(Ye=ge.props&&ge.props.onVnodeUpdated)&&vt(()=>Ot(Ye,Ie,ge,Fe),N)}else{let ge;const{el:$e,props:Te}=f,{bm:Ie,m:Fe,parent:Ae,root:Ye,type:tt}=a,ht=Nn(f);bn(a,!1),Ie&&To(Ie),!ht&&(ge=Te&&Te.onVnodeBeforeMount)&&Ot(ge,Ae,f),bn(a,!0);{Ye.ce&&Ye.ce._hasShadowRoot()&&Ye.ce._injectChildStyle(tt);const U=a.subTree=sr(a);S(null,U,E,q,a,N,J),f.el=U.el}if(Fe&&vt(Fe,N),!ht&&(ge=Te&&Te.onVnodeMounted)){const U=f;vt(()=>Ot(ge,Ae,U),N)}(f.shapeFlag&256||Ae&&Nn(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&a.a&&vt(a.a,N),a.isMounted=!0,f=E=q=null}};a.scope.on();const ie=a.effect=new kl(fe);a.scope.off();const Z=a.update=ie.run.bind(ie),ke=a.job=ie.runIfDirty.bind(ie);ke.i=a,ke.id=a.uid,ie.scheduler=()=>Ci(ke),bn(a,!0),Z()},oe=(a,f,E)=>{f.component=a;const q=a.vnode.props;a.vnode=f,a.next=null,Ku(a,f.props,q,E),Ju(a,f.children,E),Zt(),Gi(a),Qt()},W=(a,f,E,q,N,J,pe,fe,ie=!1)=>{const Z=a&&a.children,ke=a?a.shapeFlag:0,ge=f.children,{patchFlag:$e,shapeFlag:Te}=f;if($e>0){if($e&128){we(Z,ge,E,q,N,J,pe,fe,ie);return}else if($e&256){re(Z,ge,E,q,N,J,pe,fe,ie);return}}Te&8?(ke&16&&$(Z,N,J),ge!==Z&&d(E,ge)):ke&16?Te&16?we(Z,ge,E,q,N,J,pe,fe,ie):$(Z,N,J,!0):(ke&8&&d(E,""),Te&16&&ue(ge,E,q,N,J,pe,fe,ie))},re=(a,f,E,q,N,J,pe,fe,ie)=>{a=a||On,f=f||On;const Z=a.length,ke=f.length,ge=Math.min(Z,ke);let $e;for($e=0;$e<ge;$e++){const Te=f[$e]=ie?Wt(f[$e]):Nt(f[$e]);S(a[$e],Te,E,null,N,J,pe,fe,ie)}Z>ke?$(a,N,J,!0,!1,ge):ue(f,E,q,N,J,pe,fe,ie,ge)},we=(a,f,E,q,N,J,pe,fe,ie)=>{let Z=0;const ke=f.length;let ge=a.length-1,$e=ke-1;for(;Z<=ge&&Z<=$e;){const Te=a[Z],Ie=f[Z]=ie?Wt(f[Z]):Nt(f[Z]);if(Tn(Te,Ie))S(Te,Ie,E,null,N,J,pe,fe,ie);else break;Z++}for(;Z<=ge&&Z<=$e;){const Te=a[ge],Ie=f[$e]=ie?Wt(f[$e]):Nt(f[$e]);if(Tn(Te,Ie))S(Te,Ie,E,null,N,J,pe,fe,ie);else break;ge--,$e--}if(Z>ge){if(Z<=$e){const Te=$e+1,Ie=Te<ke?f[Te].el:q;for(;Z<=$e;)S(null,f[Z]=ie?Wt(f[Z]):Nt(f[Z]),E,Ie,N,J,pe,fe,ie),Z++}}else if(Z>$e)for(;Z<=ge;)C(a[Z],N,J,!0),Z++;else{const Te=Z,Ie=Z,Fe=new Map;for(Z=Ie;Z<=$e;Z++){const x=f[Z]=ie?Wt(f[Z]):Nt(f[Z]);x.key!=null&&Fe.set(x.key,Z)}let Ae,Ye=0;const tt=$e-Ie+1;let ht=!1,U=0;const j=new Array(tt);for(Z=0;Z<tt;Z++)j[Z]=0;for(Z=Te;Z<=ge;Z++){const x=a[Z];if(Ye>=tt){C(x,N,J,!0);continue}let X;if(x.key!=null)X=Fe.get(x.key);else for(Ae=Ie;Ae<=$e;Ae++)if(j[Ae-Ie]===0&&Tn(x,f[Ae])){X=Ae;break}X===void 0?C(x,N,J,!0):(j[X-Ie]=Z+1,X>=U?U=X:ht=!0,S(x,f[X],E,null,N,J,pe,fe,ie),Ye++)}const ye=ht?Qu(j):On;for(Ae=ye.length-1,Z=tt-1;Z>=0;Z--){const x=Ie+Z,X=f[x],be=f[x+1],Se=x+1<ke?be.el||ha(be):q;j[Z]===0?S(null,X,E,Se,N,J,pe,fe,ie):ht&&(Ae<0||Z!==ye[Ae]?H(X,E,Se,2):Ae--)}}},H=(a,f,E,q,N=null)=>{const{el:J,type:pe,transition:fe,children:ie,shapeFlag:Z}=a;if(Z&6){H(a.component.subTree,f,E,q);return}if(Z&128){a.suspense.move(f,E,q);return}if(Z&64){pe.move(a,f,E,g);return}if(pe===ve){s(J,f,E);for(let ge=0;ge<ie.length;ge++)H(ie[ge],f,E,q);s(a.anchor,f,E);return}if(pe===Ds){K(a,f,E);return}if(q!==2&&Z&1&&fe)if(q===0)fe.beforeEnter(J),s(J,f,E),vt(()=>fe.enter(J),N);else{const{leave:ge,delayLeave:$e,afterLeave:Te}=fe,Ie=()=>{a.ctx.isUnmounted?o(J):s(J,f,E)},Fe=()=>{J._isLeaving&&J[Dt](!0),ge(J,()=>{Ie(),Te&&Te()})};$e?$e(J,Ie,Fe):Fe()}else s(J,f,E)},C=(a,f,E,q=!1,N=!1)=>{const{type:J,props:pe,ref:fe,children:ie,dynamicChildren:Z,shapeFlag:ke,patchFlag:ge,dirs:$e,cacheIndex:Te}=a;if(ge===-2&&(N=!1),fe!=null&&(Zt(),ns(fe,null,E,a,!0),Qt()),Te!=null&&(f.renderCache[Te]=void 0),ke&256){f.ctx.deactivate(a);return}const Ie=ke&1&&$e,Fe=!Nn(a);let Ae;if(Fe&&(Ae=pe&&pe.onVnodeBeforeUnmount)&&Ot(Ae,f,a),ke&6)ne(a.component,E,q);else{if(ke&128){a.suspense.unmount(E,q);return}Ie&&_n(a,null,f,"beforeUnmount"),ke&64?a.type.remove(a,f,E,g,q):Z&&!Z.hasOnce&&(J!==ve||ge>0&&ge&64)?$(Z,f,E,!1,!0):(J===ve&&ge&384||!N&&ke&16)&&$(ie,f,E),q&&P(a)}(Fe&&(Ae=pe&&pe.onVnodeUnmounted)||Ie)&&vt(()=>{Ae&&Ot(Ae,f,a),Ie&&_n(a,null,f,"unmounted")},E)},P=a=>{const{type:f,el:E,anchor:q,transition:N}=a;if(f===ve){ee(E,q);return}if(f===Ds){V(a);return}const J=()=>{o(E),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(a.shapeFlag&1&&N&&!N.persisted){const{leave:pe,delayLeave:fe}=N,ie=()=>pe(E,J);fe?fe(a.el,J,ie):ie()}else J()},ee=(a,f)=>{let E;for(;a!==f;)E=v(a),o(a),a=E;o(f)},ne=(a,f,E)=>{const{bum:q,scope:N,job:J,subTree:pe,um:fe,m:ie,a:Z}=a;rr(ie),rr(Z),q&&To(q),N.stop(),J&&(J.flags|=8,C(pe,a,f,E)),fe&&vt(fe,f),vt(()=>{a.isUnmounted=!0},f)},$=(a,f,E,q=!1,N=!1,J=0)=>{for(let pe=J;pe<a.length;pe++)C(a[pe],f,E,q,N)},L=a=>{if(a.shapeFlag&6)return L(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const f=v(a.anchor||a.el),E=f&&f[fu];return E?v(E):f};let G=!1;const k=(a,f,E)=>{let q;a==null?f._vnode&&(C(f._vnode,null,null,!0),q=f._vnode.component):S(f._vnode||null,a,f,null,null,null,E),f._vnode=a,G||(G=!0,Gi(q),zl(),G=!1)},g={p:S,um:C,m:H,r:P,mt:ce,mc:ue,pc:W,pbc:R,n:L,o:e};return{render:k,hydrate:void 0,createApp:Du(k)}}function Lo({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function bn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Zu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fa(e,t,n=!1){const s=e.children,o=t.children;if(Ee(s)&&Ee(o))for(let i=0;i<s.length;i++){const r=s[i];let l=o[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[i]=Wt(o[i]),l.el=r.el),!n&&l.patchFlag!==-2&&fa(r,l)),l.type===mo&&(l.patchFlag===-1&&(l=o[i]=Wt(l)),l.el=r.el),l.type===lt&&!l.el&&(l.el=r.el)}}function Qu(e){const t=e.slice(),n=[0];let s,o,i,r,l;const c=e.length;for(s=0;s<c;s++){const p=e[s];if(p!==0){if(o=n[n.length-1],e[o]<p){t[s]=o,n.push(s);continue}for(i=0,r=n.length-1;i<r;)l=i+r>>1,e[n[l]]<p?i=l+1:r=l;p<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function pa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pa(t)}function rr(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ha(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ha(t.subTree):null}const va=e=>e.__isSuspense;function ed(e,t){t&&t.pendingBranch?Ee(e)?t.effects.push(...e):t.effects.push(e):su(e)}const ve=Symbol.for("v-fgt"),mo=Symbol.for("v-txt"),lt=Symbol.for("v-cmt"),Ds=Symbol.for("v-stc"),os=[];let yt=null;function y(e=!1){os.push(yt=e?null:[])}function td(){os.pop(),yt=os[os.length-1]||null}let ms=1;function Ws(e,t=!1){ms+=e,e<0&&yt&&t&&(yt.hasOnce=!0)}function ma(e){return e.dynamicChildren=ms>0?yt||On:null,td(),ms>0&&yt&&yt.push(e),e}function b(e,t,n,s,o,i){return ma(u(e,t,n,s,o,i,!0))}function ft(e,t,n,s,o){return ma(Re(e,t,n,s,o,!0))}function gs(e){return e?e.__v_isVNode===!0:!1}function Tn(e,t){return e.type===t.type&&e.key===t.key}const ga=({key:e})=>e??null,Ns=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?qe(e)||Ge(e)||Pe(e)?{i:st,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,i=e===ve?0:1,r=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ga(t),ref:t&&Ns(t),scopeId:co,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:st};return l?(Li(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=qe(n)?8:16),ms>0&&!r&&yt&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&yt.push(c),c}const Re=nd;function nd(e,t=null,n=null,s=0,o=null,i=!1){if((!e||e===Yl)&&(e=lt),gs(e)){const l=vn(e,t,!0);return n&&Li(l,n),ms>0&&!i&&yt&&(l.shapeFlag&6?yt[yt.indexOf(e)]=l:yt.push(l)),l.patchFlag=-2,l}if(ud(e)&&(e=e.__vccOpts),t){t=ya(t);let{class:l,style:c}=t;l&&!qe(l)&&(t.class=he(l)),Be(c)&&(lo(c)&&!Ee(c)&&(c=Qe({},c)),t.style=Me(c))}const r=qe(e)?1:va(e)?128:jl(e)?64:Be(e)?4:Pe(e)?2:0;return u(e,t,n,s,o,r,i,!0)}function ya(e){return e?lo(e)||ra(e)?Qe({},e):e:null}function vn(e,t,n=!1,s=!1){const{props:o,ref:i,patchFlag:r,children:l,transition:c}=e,p=t?Oi(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&ga(p),ref:t&&t.ref?n&&i?Ee(i)?i.concat(Ns(t)):[i,Ns(t)]:Ns(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&vn(e.ssContent),ssFallback:e.ssFallback&&vn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&ps(d,c.clone(d)),d}function xe(e=" ",t=0){return Re(mo,null,e,t)}function _a(e,t){const n=Re(Ds,null,e);return n.staticCount=t,n}function le(e="",t=!1){return t?(y(),ft(lt,null,e)):Re(lt,null,e)}function Nt(e){return e==null||typeof e=="boolean"?Re(lt):Ee(e)?Re(ve,null,e.slice()):gs(e)?Wt(e):Re(mo,null,String(e))}function Wt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:vn(e)}function Li(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Ee(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Li(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ra(t)?t._ctx=st:o===3&&st&&(st.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Pe(t)?(t={default:t,_ctx:st},n=32):(t=String(t),s&64?(n=16,t=[xe(t)]):n=8);e.children=t,e.shapeFlag|=n}function Oi(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=he([t.class,s.class]));else if(o==="style")t.style=Me([t.style,s.style]);else if(to(o)){const i=t[o],r=s[o];r&&i!==r&&!(Ee(i)&&i.includes(r))&&(t[o]=i?[].concat(i,r):r)}else o!==""&&(t[o]=s[o])}return t}function Ot(e,t,n,s=null){At(e,t,7,[n,s])}const sd=ta();let od=0;function id(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||sd,i={uid:od++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new _l(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:aa(s,o),emitsOptions:na(s,o),emit:null,emitted:null,propsDefaults:Ve,inheritAttrs:s.inheritAttrs,ctx:Ve,data:Ve,props:Ve,attrs:Ve,slots:Ve,refs:Ve,setupState:Ve,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Fu.bind(null,i),e.ce&&e.ce(i),i}let at=null;const Es=()=>at||st;let qs,ti;{const e=io(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),i=>{o.length>1?o.forEach(r=>r(i)):o[0](i)}};qs=t("__VUE_INSTANCE_SETTERS__",n=>at=n),ti=t("__VUE_SSR_SETTERS__",n=>ys=n)}const Ps=e=>{const t=at;return qs(e),e.scope.on(),()=>{e.scope.off(),qs(t)}},lr=()=>{at&&at.scope.off(),qs(null)};function ba(e){return e.vnode.shapeFlag&4}let ys=!1;function rd(e,t=!1,n=!1){t&&ti(t);const{props:s,children:o}=e.vnode,i=ba(e);Uu(e,s,i,t),Gu(e,o,n||t);const r=i?ld(e,t):void 0;return t&&ti(!1),r}function ld(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cu);const{setup:s}=n;if(s){Zt();const o=e.setupContext=s.length>1?ka(e):null,i=Ps(e),r=Ms(s,e,0,[e.props,o]),l=fl(r);if(Qt(),i(),(l||e.sp)&&!Nn(e)&&Gl(e),l){if(r.then(lr,lr),t)return r.then(c=>{ar(e,c)}).catch(c=>{ao(c,e,0)});e.asyncDep=r}else ar(e,r)}else wa(e)}function ar(e,t,n){Pe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Be(t)&&(e.setupState=Dl(t)),wa(e)}function wa(e,t,n){const s=e.type;e.render||(e.render=s.render||Ft);{const o=Ps(e);Zt();try{Pu(e)}finally{Qt(),o()}}}const ad={get(e,t){return rt(e,"get",""),e[t]}};function ka(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ad),slots:e.slots,emit:e.emit,expose:t}}function go(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Dl(Ti(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ss)return ss[n](e)},has(t,n){return n in t||n in ss}})):e.proxy}function cd(e,t=!0){return Pe(e)?e.displayName||e.name:e.name||t&&e.__name}function ud(e){return Pe(e)&&"__vccOpts"in e}const A=(e,t)=>Zc(e,t,ys);function Ri(e,t,n){try{Ws(-1);const s=arguments.length;return s===2?Be(t)&&!Ee(t)?gs(t)?Re(e,null,[t]):Re(e,t):Re(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&gs(n)&&(n=[n]),Re(e,t,n))}finally{Ws(1)}}const dd="3.5.28";/**
15
+ * @vue/runtime-dom v3.5.28
16
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
17
+ * @license MIT
18
+ **/let ni;const cr=typeof window<"u"&&window.trustedTypes;if(cr)try{ni=cr.createPolicy("vue",{createHTML:e=>e})}catch{}const xa=ni?e=>ni.createHTML(e):e=>e,fd="http://www.w3.org/2000/svg",pd="http://www.w3.org/1998/Math/MathML",Kt=typeof document<"u"?document:null,ur=Kt&&Kt.createElement("template"),hd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?Kt.createElementNS(fd,e):t==="mathml"?Kt.createElementNS(pd,e):n?Kt.createElement(e,{is:n}):Kt.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Kt.createTextNode(e),createComment:e=>Kt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Kt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,i){const r=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{ur.innerHTML=xa(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=ur.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},sn="transition",qn="animation",_s=Symbol("_vtc"),$a={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},vd=Qe({},Vl,$a),md=e=>(e.displayName="Transition",e.props=vd,e),Bn=md((e,{slots:t})=>Ri(vu,gd(e),t)),wn=(e,t=[])=>{Ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},dr=e=>e?Ee(e)?e.some(t=>t.length>1):e.length>1:!1;function gd(e){const t={};for(const F in e)F in $a||(t[F]=e[F]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:p=r,appearToClass:d=l,leaveFromClass:m=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:w=`${n}-leave-to`}=e,I=yd(o),S=I&&I[0],_=I&&I[1],{onBeforeEnter:T,onEnter:z,onEnterCancelled:K,onLeave:V,onLeaveCancelled:Q,onBeforeAppear:D=T,onAppear:ae=z,onAppearCancelled:ue=K}=t,O=(F,te,ce,B)=>{F._enterCancelled=B,kn(F,te?d:l),kn(F,te?p:r),ce&&ce()},R=(F,te)=>{F._isLeaving=!1,kn(F,m),kn(F,w),kn(F,v),te&&te()},de=F=>(te,ce)=>{const B=F?ae:z,se=()=>O(te,F,ce);wn(B,[te,se]),fr(()=>{kn(te,F?c:i),Ut(te,F?d:l),dr(B)||pr(te,s,S,se)})};return Qe(t,{onBeforeEnter(F){wn(T,[F]),Ut(F,i),Ut(F,r)},onBeforeAppear(F){wn(D,[F]),Ut(F,c),Ut(F,p)},onEnter:de(!1),onAppear:de(!0),onLeave(F,te){F._isLeaving=!0;const ce=()=>R(F,te);Ut(F,m),F._enterCancelled?(Ut(F,v),mr(F)):(mr(F),Ut(F,v)),fr(()=>{F._isLeaving&&(kn(F,m),Ut(F,w),dr(V)||pr(F,s,_,ce))}),wn(V,[F,ce])},onEnterCancelled(F){O(F,!1,void 0,!0),wn(K,[F])},onAppearCancelled(F){O(F,!0,void 0,!0),wn(ue,[F])},onLeaveCancelled(F){R(F),wn(Q,[F])}})}function yd(e){if(e==null)return null;if(Be(e))return[Oo(e.enter),Oo(e.leave)];{const t=Oo(e);return[t,t]}}function Oo(e){return vc(e)}function Ut(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[_s]||(e[_s]=new Set)).add(t)}function kn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[_s];n&&(n.delete(t),n.size||(e[_s]=void 0))}function fr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let _d=0;function pr(e,t,n,s){const o=e._endId=++_d,i=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:r,timeout:l,propCount:c}=bd(e,t);if(!r)return s();const p=r+"end";let d=0;const m=()=>{e.removeEventListener(p,v),i()},v=w=>{w.target===e&&++d>=c&&m()};setTimeout(()=>{d<c&&m()},l+1),e.addEventListener(p,v)}function bd(e,t){const n=window.getComputedStyle(e),s=I=>(n[I]||"").split(", "),o=s(`${sn}Delay`),i=s(`${sn}Duration`),r=hr(o,i),l=s(`${qn}Delay`),c=s(`${qn}Duration`),p=hr(l,c);let d=null,m=0,v=0;t===sn?r>0&&(d=sn,m=r,v=i.length):t===qn?p>0&&(d=qn,m=p,v=c.length):(m=Math.max(r,p),d=m>0?r>p?sn:qn:null,v=d?d===sn?i.length:c.length:0);const w=d===sn&&/\b(?:transform|all)(?:,|$)/.test(s(`${sn}Property`).toString());return{type:d,timeout:m,propCount:v,hasTransform:w}}function hr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>vr(n)+vr(e[s])))}function vr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function mr(e){return(e?e.ownerDocument:document).body.offsetHeight}function wd(e,t,n){const s=e[_s];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Gs=Symbol("_vod"),Sa=Symbol("_vsh"),kd={name:"show",beforeMount(e,{value:t},{transition:n}){e[Gs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Gn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Gn(e,!0),s.enter(e)):s.leave(e,()=>{Gn(e,!1)}):Gn(e,t))},beforeUnmount(e,{value:t}){Gn(e,t)}};function Gn(e,t){e.style.display=t?e[Gs]:"none",e[Sa]=!t}const xd=Symbol(""),$d=/(?:^|;)\s*display\s*:/;function Sd(e,t,n){const s=e.style,o=qe(n);let i=!1;if(n&&!o){if(t)if(qe(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&Fs(s,l,"")}else for(const r in t)n[r]==null&&Fs(s,r,"");for(const r in n)r==="display"&&(i=!0),Fs(s,r,n[r])}else if(o){if(t!==n){const r=s[xd];r&&(n+=";"+r),s.cssText=n,i=$d.test(n)}}else t&&e.removeAttribute("style");Gs in e&&(e[Gs]=i?s.display:"",e[Sa]&&(s.display="none"))}const gr=/\s*!important$/;function Fs(e,t,n){if(Ee(n))n.forEach(s=>Fs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Td(e,t);gr.test(n)?e.setProperty(gn(s),n.replace(gr,""),"important"):e[s]=n}}const yr=["Webkit","Moz","ms"],Ro={};function Td(e,t){const n=Ro[t];if(n)return n;let s=xt(t);if(s!=="filter"&&s in e)return Ro[t]=s;s=oo(s);for(let o=0;o<yr.length;o++){const i=yr[o]+s;if(i in e)return Ro[t]=i}return t}const _r="http://www.w3.org/1999/xlink";function br(e,t,n,s,o,i=kc(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(_r,t.slice(6,t.length)):e.setAttributeNS(_r,t,n):n==null||i&&!ml(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Pt(n)?String(n):n)}function wr(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?xa(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(l!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=ml(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(o||t)}function Cd(e,t,n,s){e.addEventListener(t,n,s)}function Md(e,t,n,s){e.removeEventListener(t,n,s)}const kr=Symbol("_vei");function Ed(e,t,n,s,o=null){const i=e[kr]||(e[kr]={}),r=i[t];if(s&&r)r.value=s;else{const[l,c]=Pd(t);if(s){const p=i[t]=Ld(s,o);Cd(e,l,p,c)}else r&&(Md(e,l,r,c),i[t]=void 0)}}const xr=/(?:Once|Passive|Capture)$/;function Pd(e){let t;if(xr.test(e)){t={};let s;for(;s=e.match(xr);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):gn(e.slice(2)),t]}let Do=0;const Id=Promise.resolve(),Ad=()=>Do||(Id.then(()=>Do=0),Do=Date.now());function Ld(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;At(Od(s,n.value),t,5,[s])};return n.value=e,n.attached=Ad(),n}function Od(e,t){if(Ee(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>o=>!o._stopped&&s&&s(o))}else return t}const $r=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Rd=(e,t,n,s,o,i)=>{const r=o==="svg";t==="class"?wd(e,s,r):t==="style"?Sd(e,n,s):to(t)?gi(t)||Ed(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Dd(e,t,s,r))?(wr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&br(e,t,s,r,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!qe(s))?wr(e,xt(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),br(e,t,s,r))};function Dd(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&$r(t)&&Pe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return $r(t)&&qe(n)?!1:t in e}const Nd=["ctrl","shift","alt","meta"],Fd={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Nd.some(n=>e[`${n}Key`]&&!t.includes(n))},fn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...i)=>{for(let r=0;r<t.length;r++){const l=Fd[t[r]];if(l&&l(o,t))return}return e(o,...i)}))},zd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ta=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const i=gn(o.key);if(t.some(r=>r===i||zd[r]===i))return e(o)}))},Bd=Qe({patchProp:Rd},hd);let Sr;function Hd(){return Sr||(Sr=Yu(Bd))}const Ca=((...e)=>{const t=Hd().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Vd(s);if(!o)return;const i=t._component;!Pe(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=n(o,!1,jd(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t});function jd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Vd(e){return qe(e)?document.querySelector(e):e}/*!
19
+ * pinia v2.3.1
20
+ * (c) 2025 Eduardo San Martin Morote
21
+ * @license MIT
22
+ */let Ma;const yo=e=>Ma=e,Ea=Symbol();function si(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var is;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(is||(is={}));function Ud(){const e=bl(!0),t=e.run(()=>me({}));let n=[],s=[];const o=Ti({install(i){yo(o),o._a=i,i.provide(Ea,o),i.config.globalProperties.$pinia=o,s.forEach(r=>n.push(r)),s=[]},use(i){return this._a?n.push(i):s.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Pa=()=>{};function Tr(e,t,n,s=Pa){e.push(t);const o=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&wl()&&$c(o),o}function An(e,...t){e.slice().forEach(n=>{n(...t)})}const Kd=e=>e(),Cr=Symbol(),No=Symbol();function oi(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];si(o)&&si(s)&&e.hasOwnProperty(n)&&!Ge(s)&&!Yt(s)?e[n]=oi(o,s):e[n]=s}return e}const Wd=Symbol();function qd(e){return!si(e)||!e.hasOwnProperty(Wd)}const{assign:rn}=Object;function Gd(e){return!!(Ge(e)&&e.effect)}function Jd(e,t,n,s){const{state:o,actions:i,getters:r}=t,l=n.state.value[e];let c;function p(){l||(n.state.value[e]=o?o():{});const d=Gc(n.state.value[e]);return rn(d,i,Object.keys(r||{}).reduce((m,v)=>(m[v]=Ti(A(()=>{yo(n);const w=n._s.get(e);return r[v].call(w,w)})),m),{}))}return c=Ia(e,p,t,n,s,!0),c}function Ia(e,t,n={},s,o,i){let r;const l=rn({actions:{}},n),c={deep:!0};let p,d,m=[],v=[],w;const I=s.state.value[e];!i&&!I&&(s.state.value[e]={});let S;function _(ue){let O;p=d=!1,typeof ue=="function"?(ue(s.state.value[e]),O={type:is.patchFunction,storeId:e,events:w}):(oi(s.state.value[e],ue),O={type:is.patchObject,payload:ue,storeId:e,events:w});const R=S=Symbol();Ke().then(()=>{S===R&&(p=!0)}),d=!0,An(m,O,s.state.value[e])}const T=i?function(){const{state:O}=n,R=O?O():{};this.$patch(de=>{rn(de,R)})}:Pa;function z(){r.stop(),m=[],v=[],s._s.delete(e)}const K=(ue,O="")=>{if(Cr in ue)return ue[No]=O,ue;const R=function(){yo(s);const de=Array.from(arguments),F=[],te=[];function ce(oe){F.push(oe)}function B(oe){te.push(oe)}An(v,{args:de,name:R[No],store:Q,after:ce,onError:B});let se;try{se=ue.apply(this&&this.$id===e?this:Q,de)}catch(oe){throw An(te,oe),oe}return se instanceof Promise?se.then(oe=>(An(F,oe),oe)).catch(oe=>(An(te,oe),Promise.reject(oe))):(An(F,se),se)};return R[Cr]=!0,R[No]=O,R},V={_p:s,$id:e,$onAction:Tr.bind(null,v),$patch:_,$reset:T,$subscribe(ue,O={}){const R=Tr(m,ue,O.detached,()=>de()),de=r.run(()=>We(()=>s.state.value[e],F=>{(O.flush==="sync"?d:p)&&ue({storeId:e,type:is.direct,events:w},F)},rn({},c,O)));return R},$dispose:z},Q=Cs(V);s._s.set(e,Q);const ae=(s._a&&s._a.runWithContext||Kd)(()=>s._e.run(()=>(r=bl()).run(()=>t({action:K}))));for(const ue in ae){const O=ae[ue];if(Ge(O)&&!Gd(O)||Yt(O))i||(I&&qd(O)&&(Ge(O)?O.value=I[ue]:oi(O,I[ue])),s.state.value[e][ue]=O);else if(typeof O=="function"){const R=K(O,ue);ae[ue]=R,l.actions[ue]=O}}return rn(Q,ae),rn(Oe(Q),ae),Object.defineProperty(Q,"$state",{get:()=>s.state.value[e],set:ue=>{_(O=>{rn(O,ue)})}}),s._p.forEach(ue=>{rn(Q,r.run(()=>ue({store:Q,app:s._a,pinia:s,options:l})))}),I&&i&&n.hydrate&&n.hydrate(Q.$state,I),p=!0,d=!0,Q}/*! #__NO_SIDE_EFFECTS__ */function Yd(e,t,n){let s,o;const i=typeof t=="function";s=e,o=i?n:t;function r(l,c){const p=lu();return l=l||(p?$t(Ea,null):null),l&&yo(l),l=Ma,l._s.has(s)||(i?Ia(s,t,o,l):Jd(s,o,l)),l._s.get(s)}return r.$id=s,r}const Xd=["top","right","bottom","left"],Mr=["start","end"],Er=Xd.reduce((e,t)=>e.concat(t,t+"-"+Mr[0],t+"-"+Mr[1]),[]),bs=Math.min,Sn=Math.max,Zd={left:"right",right:"left",bottom:"top",top:"bottom"},Qd={start:"end",end:"start"};function ii(e,t,n){return Sn(e,bs(t,n))}function Pn(e,t){return typeof e=="function"?e(t):e}function Ht(e){return e.split("-")[0]}function Mt(e){return e.split("-")[1]}function Aa(e){return e==="x"?"y":"x"}function Di(e){return e==="y"?"height":"width"}const ef=new Set(["top","bottom"]);function Jt(e){return ef.has(Ht(e))?"y":"x"}function Ni(e){return Aa(Jt(e))}function La(e,t,n){n===void 0&&(n=!1);const s=Mt(e),o=Ni(e),i=Di(o);let r=o==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(r=Ys(r)),[r,Ys(r)]}function tf(e){const t=Ys(e);return[Js(e),t,Js(t)]}function Js(e){return e.replace(/start|end/g,t=>Qd[t])}const Pr=["left","right"],Ir=["right","left"],nf=["top","bottom"],sf=["bottom","top"];function of(e,t,n){switch(e){case"top":case"bottom":return n?t?Ir:Pr:t?Pr:Ir;case"left":case"right":return t?nf:sf;default:return[]}}function rf(e,t,n,s){const o=Mt(e);let i=of(Ht(e),n==="start",s);return o&&(i=i.map(r=>r+"-"+o),t&&(i=i.concat(i.map(Js)))),i}function Ys(e){return e.replace(/left|right|bottom|top/g,t=>Zd[t])}function lf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Oa(e){return typeof e!="number"?lf(e):{top:e,right:e,bottom:e,left:e}}function rs(e){const{x:t,y:n,width:s,height:o}=e;return{width:s,height:o,top:n,left:t,right:t+s,bottom:n+o,x:t,y:n}}function Ar(e,t,n){let{reference:s,floating:o}=e;const i=Jt(t),r=Ni(t),l=Di(r),c=Ht(t),p=i==="y",d=s.x+s.width/2-o.width/2,m=s.y+s.height/2-o.height/2,v=s[l]/2-o[l]/2;let w;switch(c){case"top":w={x:d,y:s.y-o.height};break;case"bottom":w={x:d,y:s.y+s.height};break;case"right":w={x:s.x+s.width,y:m};break;case"left":w={x:s.x-o.width,y:m};break;default:w={x:s.x,y:s.y}}switch(Mt(t)){case"start":w[r]-=v*(n&&p?-1:1);break;case"end":w[r]+=v*(n&&p?-1:1);break}return w}async function af(e,t){var n;t===void 0&&(t={});const{x:s,y:o,platform:i,rects:r,elements:l,strategy:c}=e,{boundary:p="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:v=!1,padding:w=0}=Pn(t,e),I=Oa(w),_=l[v?m==="floating"?"reference":"floating":m],T=rs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:d,strategy:c})),z=m==="floating"?{x:s,y:o,width:r.floating.width,height:r.floating.height}:r.reference,K=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),V=await(i.isElement==null?void 0:i.isElement(K))?await(i.getScale==null?void 0:i.getScale(K))||{x:1,y:1}:{x:1,y:1},Q=rs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:z,offsetParent:K,strategy:c}):z);return{top:(T.top-Q.top+I.top)/V.y,bottom:(Q.bottom-T.bottom+I.bottom)/V.y,left:(T.left-Q.left+I.left)/V.x,right:(Q.right-T.right+I.right)/V.x}}const cf=async(e,t,n)=>{const{placement:s="bottom",strategy:o="absolute",middleware:i=[],platform:r}=n,l=i.filter(Boolean),c=await(r.isRTL==null?void 0:r.isRTL(t));let p=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:m}=Ar(p,s,c),v=s,w={},I=0;for(let _=0;_<l.length;_++){var S;const{name:T,fn:z}=l[_],{x:K,y:V,data:Q,reset:D}=await z({x:d,y:m,initialPlacement:s,placement:v,strategy:o,middlewareData:w,rects:p,platform:{...r,detectOverflow:(S=r.detectOverflow)!=null?S:af},elements:{reference:e,floating:t}});d=K??d,m=V??m,w={...w,[T]:{...w[T],...Q}},D&&I<=50&&(I++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(p=D.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:o}):D.rects),{x:d,y:m}=Ar(p,v,c)),_=-1)}return{x:d,y:m,placement:v,strategy:o,middlewareData:w}},uf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:o,rects:i,platform:r,elements:l,middlewareData:c}=t,{element:p,padding:d=0}=Pn(e,t)||{};if(p==null)return{};const m=Oa(d),v={x:n,y:s},w=Ni(o),I=Di(w),S=await r.getDimensions(p),_=w==="y",T=_?"top":"left",z=_?"bottom":"right",K=_?"clientHeight":"clientWidth",V=i.reference[I]+i.reference[w]-v[w]-i.floating[I],Q=v[w]-i.reference[w],D=await(r.getOffsetParent==null?void 0:r.getOffsetParent(p));let ae=D?D[K]:0;(!ae||!await(r.isElement==null?void 0:r.isElement(D)))&&(ae=l.floating[K]||i.floating[I]);const ue=V/2-Q/2,O=ae/2-S[I]/2-1,R=bs(m[T],O),de=bs(m[z],O),F=R,te=ae-S[I]-de,ce=ae/2-S[I]/2+ue,B=ii(F,ce,te),se=!c.arrow&&Mt(o)!=null&&ce!==B&&i.reference[I]/2-(ce<F?R:de)-S[I]/2<0,oe=se?ce<F?ce-F:ce-te:0;return{[w]:v[w]+oe,data:{[w]:B,centerOffset:ce-B-oe,...se&&{alignmentOffset:oe}},reset:se}}});function df(e,t,n){return(e?[...n.filter(o=>Mt(o)===e),...n.filter(o=>Mt(o)!==e)]:n.filter(o=>Ht(o)===o)).filter(o=>e?Mt(o)===e||(t?Js(o)!==o:!1):!0)}const ff=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,s,o;const{rects:i,middlewareData:r,placement:l,platform:c,elements:p}=t,{crossAxis:d=!1,alignment:m,allowedPlacements:v=Er,autoAlignment:w=!0,...I}=Pn(e,t),S=m!==void 0||v===Er?df(m||null,w,v):v,_=await c.detectOverflow(t,I),T=((n=r.autoPlacement)==null?void 0:n.index)||0,z=S[T];if(z==null)return{};const K=La(z,i,await(c.isRTL==null?void 0:c.isRTL(p.floating)));if(l!==z)return{reset:{placement:S[0]}};const V=[_[Ht(z)],_[K[0]],_[K[1]]],Q=[...((s=r.autoPlacement)==null?void 0:s.overflows)||[],{placement:z,overflows:V}],D=S[T+1];if(D)return{data:{index:T+1,overflows:Q},reset:{placement:D}};const ae=Q.map(R=>{const de=Mt(R.placement);return[R.placement,de&&d?R.overflows.slice(0,2).reduce((F,te)=>F+te,0):R.overflows[0],R.overflows]}).sort((R,de)=>R[1]-de[1]),O=((o=ae.filter(R=>R[2].slice(0,Mt(R[0])?2:3).every(de=>de<=0))[0])==null?void 0:o[0])||ae[0][0];return O!==l?{data:{index:T+1,overflows:Q},reset:{placement:O}}:{}}}},pf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:o,middlewareData:i,rects:r,initialPlacement:l,platform:c,elements:p}=t,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:I="none",flipAlignment:S=!0,..._}=Pn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const T=Ht(o),z=Jt(l),K=Ht(l)===l,V=await(c.isRTL==null?void 0:c.isRTL(p.floating)),Q=v||(K||!S?[Ys(l)]:tf(l)),D=I!=="none";!v&&D&&Q.push(...rf(l,S,I,V));const ae=[l,...Q],ue=await c.detectOverflow(t,_),O=[];let R=((s=i.flip)==null?void 0:s.overflows)||[];if(d&&O.push(ue[T]),m){const ce=La(o,r,V);O.push(ue[ce[0]],ue[ce[1]])}if(R=[...R,{placement:o,overflows:O}],!O.every(ce=>ce<=0)){var de,F;const ce=(((de=i.flip)==null?void 0:de.index)||0)+1,B=ae[ce];if(B&&(!(m==="alignment"?z!==Jt(B):!1)||R.every(W=>Jt(W.placement)===z?W.overflows[0]>0:!0)))return{data:{index:ce,overflows:R},reset:{placement:B}};let se=(F=R.filter(oe=>oe.overflows[0]<=0).sort((oe,W)=>oe.overflows[1]-W.overflows[1])[0])==null?void 0:F.placement;if(!se)switch(w){case"bestFit":{var te;const oe=(te=R.filter(W=>{if(D){const re=Jt(W.placement);return re===z||re==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(re=>re>0).reduce((re,we)=>re+we,0)]).sort((W,re)=>W[1]-re[1])[0])==null?void 0:te[0];oe&&(se=oe);break}case"initialPlacement":se=l;break}if(o!==se)return{reset:{placement:se}}}return{}}}},hf=new Set(["left","top"]);async function vf(e,t){const{placement:n,platform:s,elements:o}=e,i=await(s.isRTL==null?void 0:s.isRTL(o.floating)),r=Ht(n),l=Mt(n),c=Jt(n)==="y",p=hf.has(r)?-1:1,d=i&&c?-1:1,m=Pn(t,e);let{mainAxis:v,crossAxis:w,alignmentAxis:I}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof I=="number"&&(w=l==="end"?I*-1:I),c?{x:w*d,y:v*p}:{x:v*p,y:w*d}}const mf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:o,y:i,placement:r,middlewareData:l}=t,c=await vf(t,e);return r===((n=l.offset)==null?void 0:n.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:r}}}}},gf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:o,platform:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:c={fn:T=>{let{x:z,y:K}=T;return{x:z,y:K}}},...p}=Pn(e,t),d={x:n,y:s},m=await i.detectOverflow(t,p),v=Jt(Ht(o)),w=Aa(v);let I=d[w],S=d[v];if(r){const T=w==="y"?"top":"left",z=w==="y"?"bottom":"right",K=I+m[T],V=I-m[z];I=ii(K,I,V)}if(l){const T=v==="y"?"top":"left",z=v==="y"?"bottom":"right",K=S+m[T],V=S-m[z];S=ii(K,S,V)}const _=c.fn({...t,[w]:I,[v]:S});return{..._,data:{x:_.x-n,y:_.y-s,enabled:{[w]:r,[v]:l}}}}}},yf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:o,rects:i,platform:r,elements:l}=t,{apply:c=()=>{},...p}=Pn(e,t),d=await r.detectOverflow(t,p),m=Ht(o),v=Mt(o),w=Jt(o)==="y",{width:I,height:S}=i.floating;let _,T;m==="top"||m==="bottom"?(_=m,T=v===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(T=m,_=v==="end"?"top":"bottom");const z=S-d.top-d.bottom,K=I-d.left-d.right,V=bs(S-d[_],z),Q=bs(I-d[T],K),D=!t.middlewareData.shift;let ae=V,ue=Q;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ue=K),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(ae=z),D&&!v){const R=Sn(d.left,0),de=Sn(d.right,0),F=Sn(d.top,0),te=Sn(d.bottom,0);w?ue=I-2*(R!==0||de!==0?R+de:Sn(d.left,d.right)):ae=S-2*(F!==0||te!==0?F+te:Sn(d.top,d.bottom))}await c({...t,availableWidth:ue,availableHeight:ae});const O=await r.getDimensions(l.floating);return I!==O.width||S!==O.height?{reset:{rects:!0}}:{}}}};function kt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zt(e){return kt(e).getComputedStyle(e)}const Lr=Math.min,ls=Math.max,Xs=Math.round;function Ra(e){const t=zt(e);let n=parseFloat(t.width),s=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,r=Xs(n)!==o||Xs(s)!==i;return r&&(n=o,s=i),{width:n,height:s,fallback:r}}function mn(e){return Na(e)?(e.nodeName||"").toLowerCase():""}let Os;function Da(){if(Os)return Os;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Os=e.brands.map((t=>t.brand+"/"+t.version)).join(" "),Os):navigator.userAgent}function Bt(e){return e instanceof kt(e).HTMLElement}function pn(e){return e instanceof kt(e).Element}function Na(e){return e instanceof kt(e).Node}function Or(e){return typeof ShadowRoot>"u"?!1:e instanceof kt(e).ShadowRoot||e instanceof ShadowRoot}function _o(e){const{overflow:t,overflowX:n,overflowY:s,display:o}=zt(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!["inline","contents"].includes(o)}function _f(e){return["table","td","th"].includes(mn(e))}function ri(e){const t=/firefox/i.test(Da()),n=zt(e),s=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!s&&s!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((o=>n.willChange.includes(o)))||["paint","layout","strict","content"].some((o=>{const i=n.contain;return i!=null&&i.includes(o)}))}function Fa(){return!/^((?!chrome|android).)*safari/i.test(Da())}function Fi(e){return["html","body","#document"].includes(mn(e))}function za(e){return pn(e)?e:e.contextElement}const Ba={x:1,y:1};function Fn(e){const t=za(e);if(!Bt(t))return Ba;const n=t.getBoundingClientRect(),{width:s,height:o,fallback:i}=Ra(t);let r=(i?Xs(n.width):n.width)/s,l=(i?Xs(n.height):n.height)/o;return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}function ws(e,t,n,s){var o,i;t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),l=za(e);let c=Ba;t&&(s?pn(s)&&(c=Fn(s)):c=Fn(e));const p=l?kt(l):window,d=!Fa()&&n;let m=(r.left+(d&&((o=p.visualViewport)==null?void 0:o.offsetLeft)||0))/c.x,v=(r.top+(d&&((i=p.visualViewport)==null?void 0:i.offsetTop)||0))/c.y,w=r.width/c.x,I=r.height/c.y;if(l){const S=kt(l),_=s&&pn(s)?kt(s):s;let T=S.frameElement;for(;T&&s&&_!==S;){const z=Fn(T),K=T.getBoundingClientRect(),V=getComputedStyle(T);K.x+=(T.clientLeft+parseFloat(V.paddingLeft))*z.x,K.y+=(T.clientTop+parseFloat(V.paddingTop))*z.y,m*=z.x,v*=z.y,w*=z.x,I*=z.y,m+=K.x,v+=K.y,T=kt(T).frameElement}}return{width:w,height:I,top:v,right:m+w,bottom:v+I,left:m,x:m,y:v}}function hn(e){return((Na(e)?e.ownerDocument:e.document)||window.document).documentElement}function bo(e){return pn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ha(e){return ws(hn(e)).left+bo(e).scrollLeft}function ks(e){if(mn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Or(e)&&e.host||hn(e);return Or(t)?t.host:t}function ja(e){const t=ks(e);return Fi(t)?t.ownerDocument.body:Bt(t)&&_o(t)?t:ja(t)}function Zs(e,t){var n;t===void 0&&(t=[]);const s=ja(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=kt(s);return o?t.concat(i,i.visualViewport||[],_o(s)?s:[]):t.concat(s,Zs(s))}function Rr(e,t,n){return t==="viewport"?rs((function(s,o){const i=kt(s),r=hn(s),l=i.visualViewport;let c=r.clientWidth,p=r.clientHeight,d=0,m=0;if(l){c=l.width,p=l.height;const v=Fa();(v||!v&&o==="fixed")&&(d=l.offsetLeft,m=l.offsetTop)}return{width:c,height:p,x:d,y:m}})(e,n)):pn(t)?rs((function(s,o){const i=ws(s,!0,o==="fixed"),r=i.top+s.clientTop,l=i.left+s.clientLeft,c=Bt(s)?Fn(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:r*c.y}})(t,n)):rs((function(s){const o=hn(s),i=bo(s),r=s.ownerDocument.body,l=ls(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),c=ls(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let p=-i.scrollLeft+Ha(s);const d=-i.scrollTop;return zt(r).direction==="rtl"&&(p+=ls(o.clientWidth,r.clientWidth)-l),{width:l,height:c,x:p,y:d}})(hn(e)))}function Dr(e){return Bt(e)&&zt(e).position!=="fixed"?e.offsetParent:null}function Nr(e){const t=kt(e);let n=Dr(e);for(;n&&_f(n)&&zt(n).position==="static";)n=Dr(n);return n&&(mn(n)==="html"||mn(n)==="body"&&zt(n).position==="static"&&!ri(n))?t:n||(function(s){let o=ks(s);for(;Bt(o)&&!Fi(o);){if(ri(o))return o;o=ks(o)}return null})(e)||t}function bf(e,t,n){const s=Bt(t),o=hn(t),i=ws(e,!0,n==="fixed",t);let r={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(s||!s&&n!=="fixed")if((mn(t)!=="body"||_o(o))&&(r=bo(t)),Bt(t)){const c=ws(t,!0);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Ha(o));return{x:i.left+r.scrollLeft-l.x,y:i.top+r.scrollTop-l.y,width:i.width,height:i.height}}const wf={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:s,strategy:o}=e;const i=n==="clippingAncestors"?(function(p,d){const m=d.get(p);if(m)return m;let v=Zs(p).filter((_=>pn(_)&&mn(_)!=="body")),w=null;const I=zt(p).position==="fixed";let S=I?ks(p):p;for(;pn(S)&&!Fi(S);){const _=zt(S),T=ri(S);(I?T||w:T||_.position!=="static"||!w||!["absolute","fixed"].includes(w.position))?w=_:v=v.filter((z=>z!==S)),S=ks(S)}return d.set(p,v),v})(t,this._c):[].concat(n),r=[...i,s],l=r[0],c=r.reduce(((p,d)=>{const m=Rr(t,d,o);return p.top=ls(m.top,p.top),p.right=Lr(m.right,p.right),p.bottom=Lr(m.bottom,p.bottom),p.left=ls(m.left,p.left),p}),Rr(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:s}=e;const o=Bt(n),i=hn(n);if(n===i)return t;let r={scrollLeft:0,scrollTop:0},l={x:1,y:1};const c={x:0,y:0};if((o||!o&&s!=="fixed")&&((mn(n)!=="body"||_o(i))&&(r=bo(n)),Bt(n))){const p=ws(n);l=Fn(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-r.scrollLeft*l.x+c.x,y:t.y*l.y-r.scrollTop*l.y+c.y}},isElement:pn,getDimensions:function(e){return Bt(e)?Ra(e):e.getBoundingClientRect()},getOffsetParent:Nr,getDocumentElement:hn,getScale:Fn,async getElementRects(e){let{reference:t,floating:n,strategy:s}=e;const o=this.getOffsetParent||Nr,i=this.getDimensions;return{reference:bf(t,await o(n),s),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>zt(e).direction==="rtl"},kf=(e,t,n)=>{const s=new Map,o={platform:wf,...n},i={...o.platform,_c:s};return cf(e,t,{...o,platform:i})};function Va(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]=="object"&&e[n]?Va(e[n],t[n]):e[n]=t[n])}const Et={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function xs(e,t){let n=Et.themes[e]||{},s;do s=n[t],typeof s>"u"?n.$extend?n=Et.themes[n.$extend]||{}:(n=null,s=Et[t]):n=null;while(n);return s}function xf(e){const t=[e];let n=Et.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Et.themes[n.$extend]||{}):n=null;while(n);return t.map(s=>`v-popper--theme-${s}`)}function Fr(e){const t=[e];let n=Et.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Et.themes[n.$extend]||{}):n=null;while(n);return t}let Hn=!1;if(typeof window<"u"){Hn=!1;try{const e=Object.defineProperty({},"passive",{get(){Hn=!0}});window.addEventListener("test",null,e)}catch{}}let Ua=!1;typeof window<"u"&&typeof navigator<"u"&&(Ua=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Ka=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),zr={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Br={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Hr(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Fo(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const St=[];let xn=null;const jr={};function Vr(e){let t=jr[e];return t||(t=jr[e]=[]),t}let li=function(){};typeof window<"u"&&(li=window.Element);function Le(e){return function(t){return xs(t.theme,e)}}const zo="__floating-vue__popper",Wa=()=>et({name:"VPopper",provide(){return{[zo]:{parentPopper:this}}},inject:{[zo]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Le("disabled")},positioningDisabled:{type:Boolean,default:Le("positioningDisabled")},placement:{type:String,default:Le("placement"),validator:e=>Ka.includes(e)},delay:{type:[String,Number,Object],default:Le("delay")},distance:{type:[Number,String],default:Le("distance")},skidding:{type:[Number,String],default:Le("skidding")},triggers:{type:Array,default:Le("triggers")},showTriggers:{type:[Array,Function],default:Le("showTriggers")},hideTriggers:{type:[Array,Function],default:Le("hideTriggers")},popperTriggers:{type:Array,default:Le("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Le("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Le("popperHideTriggers")},container:{type:[String,Object,li,Boolean],default:Le("container")},boundary:{type:[String,li],default:Le("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:Le("strategy")},autoHide:{type:[Boolean,Function],default:Le("autoHide")},handleResize:{type:Boolean,default:Le("handleResize")},instantMove:{type:Boolean,default:Le("instantMove")},eagerMount:{type:Boolean,default:Le("eagerMount")},popperClass:{type:[String,Array,Object],default:Le("popperClass")},computeTransformOrigin:{type:Boolean,default:Le("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Le("autoMinSize")},autoSize:{type:[Boolean,String],default:Le("autoSize")},autoMaxSize:{type:Boolean,default:Le("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Le("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Le("preventOverflow")},overflowPadding:{type:[Number,String],default:Le("overflowPadding")},arrowPadding:{type:[Number,String],default:Le("arrowPadding")},arrowOverflow:{type:Boolean,default:Le("arrowOverflow")},flip:{type:Boolean,default:Le("flip")},shift:{type:Boolean,default:Le("shift")},shiftCrossAxis:{type:Boolean,default:Le("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Le("noAutoFocus")},disposeTimeout:{type:Number,default:Le("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[zo])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var s,o;(s=this.parentPopper)!=null&&s.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((o=this.parentPopper)==null?void 0:o.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(mf({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(ff({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(gf({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(pf({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(uf({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:s,rects:o,middlewareData:i})=>{let r;const{centerOffset:l}=i.arrow;return s.startsWith("top")||s.startsWith("bottom")?r=Math.abs(l)>o.reference.width/2:r=Math.abs(l)>o.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){const s=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:o,placement:i,middlewareData:r})=>{var l;if((l=r.autoSize)!=null&&l.skip)return{};let c,p;return i.startsWith("top")||i.startsWith("bottom")?c=o.reference.width:p=o.reference.height,this.$_innerNode.style[s==="min"?"minWidth":s==="max"?"maxWidth":"width"]=c!=null?`${c}px`:null,this.$_innerNode.style[s==="min"?"minHeight":s==="max"?"maxHeight":"height"]=p!=null?`${p}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(yf({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:s,availableHeight:o})=>{this.$_innerNode.style.maxWidth=s!=null?`${s}px`:null,this.$_innerNode.style.maxHeight=o!=null?`${o}px`:null}})));const n=await kf(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),xn&&this.instantMove&&xn.instantMove&&xn!==this.parentPopper){xn.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(xn=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Fo(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Zs(this.$_referenceNode),...Zs(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),s=n.parentNode.getBoundingClientRect(),o=t.x+t.width/2-(s.left+n.offsetLeft),i=t.y+t.height/2-(s.top+n.offsetTop);this.result.transformOrigin=`${o}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<St.length;n++)t=St[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}St.push(this),document.body.classList.add("v-popper--some-open");for(const t of Fr(this.theme))Vr(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Fo(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Hr(St,this),St.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Fr(this.theme)){const s=Vr(n);Hr(s,this),s.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}xn===this&&(xn=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Fo(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,zr,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],zr,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,Br,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Br,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(s=>s.addEventListener(t,n,Hn?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,s,o){let i=n;s!=null&&(i=typeof s=="function"?s(i):s),i.forEach(r=>{const l=t[r];l&&this.$_registerEventListeners(e,l,o)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:s,eventType:o,handler:i}=n;!e||e===o?s.forEach(r=>r.removeEventListener(o,i)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const s=n.getAttribute(e);s&&(n.removeAttribute(e),n.setAttribute(t,s))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const s=e[n];s==null?t.removeAttribute(n):t.setAttribute(n,s)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(as>=e.left&&as<=e.right&&cs>=e.top&&cs<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=as-ln,s=cs-an,o=t.left+t.width/2-ln+(t.top+t.height/2)-an+t.width+t.height,i=ln+n*o,r=an+s*o;return Rs(ln,an,i,r,t.left,t.top,t.left,t.bottom)||Rs(ln,an,i,r,t.left,t.top,t.right,t.top)||Rs(ln,an,i,r,t.right,t.top,t.right,t.bottom)||Rs(ln,an,i,r,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(Ua){const e=Hn?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Ur(t,!0),e),document.addEventListener("touchend",t=>Kr(t,!0),e)}else window.addEventListener("mousedown",e=>Ur(e,!1),!0),window.addEventListener("click",e=>Kr(e,!1),!0);window.addEventListener("resize",Sf)}function Ur(e,t){if(Et.autoHideOnMousedown)qa(e,t);else for(let n=0;n<St.length;n++){const s=St[n];try{s.mouseDownContains=s.popperNode().contains(e.target)}catch{}}}function Kr(e,t){Et.autoHideOnMousedown||qa(e,t)}function qa(e,t){const n={};for(let s=St.length-1;s>=0;s--){const o=St[s];try{const i=o.containsGlobalTarget=o.mouseDownContains||o.popperNode().contains(e.target);o.pendingHide=!1,requestAnimationFrame(()=>{if(o.pendingHide=!1,!n[o.randomId]&&Wr(o,i,e)){if(o.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&i){let l=o.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let r=o.parentPopper;for(;r&&Wr(r,r.containsGlobalTarget,e);)r.$_handleGlobalClose(e,t),r=r.parentPopper}})}catch{}}}function Wr(e,t,n){return n.closeAllPopover||n.closePopover&&t||$f(e,n)&&!t}function $f(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function Sf(){for(let e=0;e<St.length;e++)St[e].$_computePosition()}let ln=0,an=0,as=0,cs=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{ln=as,an=cs,as=e.clientX,cs=e.clientY},Hn?{passive:!0}:void 0);function Rs(e,t,n,s,o,i,r,l){const c=((r-o)*(t-i)-(l-i)*(e-o))/((l-i)*(n-e)-(r-o)*(s-t)),p=((n-e)*(t-i)-(s-t)*(e-o))/((l-i)*(n-e)-(r-o)*(s-t));return c>=0&&c<=1&&p>=0&&p<=1}const Tf={extends:Wa()},wo=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n};function Cf(e,t,n,s,o,i){return y(),b("div",{ref:"reference",class:he(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[vs(e.$slots,"default",bc(ya(e.slotData)))],2)}const Mf=wo(Tf,[["render",Cf]]);function Ef(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var s=e.indexOf("rv:");return parseInt(e.substring(s+3,e.indexOf(".",s)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}let zs;function ai(){ai.init||(ai.init=!0,zs=Ef()!==-1)}var ko={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){ai(),Ke(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",zs&&this.$el.appendChild(e),e.data="about:blank",zs||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!zs&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Pf=ru();ou("data-v-b329ee4c");const If={class:"resize-observer",tabindex:"-1"};iu();const Af=Pf((e,t,n,s,o,i)=>(y(),ft("div",If)));ko.render=Af;ko.__scopeId="data-v-b329ee4c";ko.__file="src/components/ResizeObserver.vue";const Ga=(e="theme")=>({computed:{themeClass(){return xf(this[e])}}}),Lf=et({name:"VPopperContent",components:{ResizeObserver:ko},mixins:[Ga()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Of=["id","aria-hidden","tabindex","data-popper-placement"],Rf={ref:"inner",class:"v-popper__inner"},Df=u("div",{class:"v-popper__arrow-outer"},null,-1),Nf=u("div",{class:"v-popper__arrow-inner"},null,-1),Ff=[Df,Nf];function zf(e,t,n,s,o,i){const r=hs("ResizeObserver");return y(),b("div",{id:e.popperId,ref:"popover",class:he(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:Me(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=Ta(l=>e.autoHide&&e.$emit("hide"),["esc"]))},[u("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=l=>e.autoHide&&e.$emit("hide"))}),u("div",{class:"v-popper__wrapper",style:Me(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[u("div",Rf,[e.mounted?(y(),b(ve,{key:0},[u("div",null,[vs(e.$slots,"default")]),e.handleResize?(y(),ft(r,{key:0,onNotify:t[1]||(t[1]=l=>e.$emit("resize",l))})):le("",!0)],64)):le("",!0)],512),u("div",{ref:"arrow",class:"v-popper__arrow-container",style:Me(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Ff,4)],4)],46,Of)}const Ja=wo(Lf,[["render",zf]]),Ya={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let ci=function(){};typeof window<"u"&&(ci=window.Element);const Bf=et({name:"VPopperWrapper",components:{Popper:Mf,PopperContent:Ja},mixins:[Ya,Ga("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,ci,Boolean],default:void 0},boundary:{type:[String,ci],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Hf(e,t,n,s,o,i){const r=hs("PopperContent"),l=hs("Popper");return y(),ft(l,Oi({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=c=>e.$emit("update:shown",c)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:pt(({popperId:c,isShown:p,shouldMountContent:d,skipTransition:m,autoHide:v,show:w,hide:I,handleResize:S,onResize:_,classes:T,result:z})=>[vs(e.$slots,"default",{shown:p,show:w,hide:I}),Re(r,{ref:"popperContent","popper-id":c,theme:e.finalTheme,shown:p,mounted:d,"skip-transition":m,"auto-hide":v,"handle-resize":S,classes:T,result:z,onHide:I,onResize:_},{default:pt(()=>[vs(e.$slots,"popper",{shown:p,hide:I})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const zi=wo(Bf,[["render",Hf]]),jf={...zi,name:"VDropdown",vPopperTheme:"dropdown"},Vf={...zi,name:"VMenu",vPopperTheme:"menu"},Uf={...zi,name:"VTooltip",vPopperTheme:"tooltip"},Kf=et({name:"VTooltipDirective",components:{Popper:Wa(),PopperContent:Ja},mixins:[Ya],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>xs(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>xs(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(s=>this.onResult(t,s)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),Wf=["innerHTML"],qf=["textContent"];function Gf(e,t,n,s,o,i){const r=hs("PopperContent"),l=hs("Popper");return y(),ft(l,Oi({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:pt(({popperId:c,isShown:p,shouldMountContent:d,skipTransition:m,autoHide:v,hide:w,handleResize:I,onResize:S,classes:_,result:T})=>[Re(r,{ref:"popperContent",class:he({"v-popper--tooltip-loading":e.loading}),"popper-id":c,theme:e.theme,shown:p,mounted:d,"skip-transition":m,"auto-hide":v,"handle-resize":I,classes:_,result:T,onHide:w,onResize:S},{default:pt(()=>[e.html?(y(),b("div",{key:0,innerHTML:e.finalContent},null,8,Wf)):(y(),b("div",{key:1,textContent:M(e.finalContent)},null,8,qf))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const Jf=wo(Kf,[["render",Gf]]),Xa="v-popper--has-tooltip";function Yf(e,t){let n=e.placement;if(!n&&t)for(const s of Ka)t[s]&&(n=s);return n||(n=xs(e.theme||"tooltip","placement")),n}function Za(e,t,n){let s;const o=typeof t;return o==="string"?s={content:t}:t&&o==="object"?s=t:s={content:!1},s.placement=Yf(s,n),s.targetNodes=()=>[e],s.referenceNode=()=>e,s}let Bo,$s,Xf=0;function Zf(){if(Bo)return;$s=me([]),Bo=Ca({name:"VTooltipDirectiveApp",setup(){return{directives:$s}},render(){return this.directives.map(t=>Ri(Jf,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Bo.mount(e)}function Qf(e,t,n){Zf();const s=me(Za(e,t,n)),o=me(!1),i={id:Xf++,options:s,shown:o};return $s.value.push(i),e.classList&&e.classList.add(Xa),e.$_popper={options:s,item:i,show(){o.value=!0},hide(){o.value=!1}}}function Qa(e){if(e.$_popper){const t=$s.value.indexOf(e.$_popper.item);t!==-1&&$s.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Xa)}function qr(e,{value:t,modifiers:n}){const s=Za(e,t,n);if(!s.content||xs(s.theme||"tooltip","disabled"))Qa(e);else{let o;e.$_popper?(o=e.$_popper,o.options.value=s):o=Qf(e,t,n),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?o.show():o.hide())}}const ep={beforeMount:qr,updated:qr,beforeUnmount(e){Qa(e)}};function Gr(e){e.addEventListener("mousedown",Qs),e.addEventListener("click",Qs),e.addEventListener("touchstart",ec,Hn?{passive:!0}:!1)}function Jr(e){e.removeEventListener("mousedown",Qs),e.removeEventListener("click",Qs),e.removeEventListener("touchstart",ec),e.removeEventListener("touchend",tc),e.removeEventListener("touchcancel",nc)}function Qs(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function ec(e){if(e.changedTouches.length===1){const t=e.currentTarget;t.$_vclosepopover_touch=!0;const n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",tc),t.addEventListener("touchcancel",nc)}}function tc(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const n=e.changedTouches[0],s=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-s.screenY)<20&&Math.abs(n.screenX-s.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function nc(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}const tp={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>"u"||t)&&Gr(e)},updated(e,{value:t,oldValue:n,modifiers:s}){e.$_closePopoverModifiers=s,t!==n&&(typeof t>"u"||t?Gr(e):Jr(e))},beforeUnmount(e){Jr(e)}};function np(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Va(Et,t),e.directive("tooltip",ep),e.directive("close-popper",tp),e.component("VTooltip",Uf),e.component("VDropdown",jf),e.component("VMenu",Vf))}const sp={version:"5.2.2",install:np,options:Et},Vn="";async function op(){const e=await fetch(`${Vn}/api/requests?summary=true`);if(!e.ok)throw new Error(`GET /api/requests?summary=true failed: ${e.status}`);return e.json()}async function ip(e){const t=await fetch(`${Vn}/api/conversations/${encodeURIComponent(e)}`);if(!t.ok)throw new Error(`GET /api/conversations/${e} failed: ${t.status}`);return t.json()}async function rp(e){const t=await fetch(`${Vn}/api/entries/${e}/detail`);if(t.status===404)return null;if(!t.ok)throw new Error(`GET /api/entries/${e}/detail failed: ${t.status}`);return(await t.json()).contextInfo??null}async function lp(e){const t=await fetch(`${Vn}/api/conversations/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok)throw new Error(`DELETE conversation failed: ${t.status}`)}async function ap(){const e=await fetch(`${Vn}/api/reset`,{method:"POST"});if(!e.ok)throw new Error(`POST /api/reset failed: ${e.status}`)}function cp(e,t,n){const s=new URLSearchParams;t&&s.set("conversation",t);const o=s.toString();return`${Vn}/api/export/${e}${o?`?${o}`:""}`}const Xe={system_prompt:{label:"System prompt",color:"#2563eb"},tool_definitions:{label:"Tool definitions",color:"#db2777"},tool_results:{label:"Tool results",color:"#059669"},tool_calls:{label:"Tool calls",color:"#ec4899"},assistant_text:{label:"Assistant text",color:"#d97706"},user_text:{label:"User text",color:"#10b981"},thinking:{label:"Thinking",color:"#8b5cf6"},system_injections:{label:"System injections",color:"#6366f1"},images:{label:"Images",color:"#4b5563"},cache_markers:{label:"Cache markers",color:"#6b7280"},other:{label:"Other",color:"#4b5563"}};function up(e){var t;return((t=Xe[e])==null?void 0:t.label)??e}function dp(e,t="#475569"){var n;return((n=Xe[e])==null?void 0:n.color)??t}const jn={system:["system_prompt","system_injections"],tools:["tool_definitions","tool_calls"],results:["tool_results"],conversation:["assistant_text","user_text","thinking"],other:["images","cache_markers","other"]},gt={system:{label:"System",color:"#2563eb"},tools:{label:"Tools",color:"#db2777"},results:{label:"Results",color:"#059669"},conversation:{label:"Conversation",color:"#d97706"},other:{label:"Other",color:"#4b5563"}};function Tt(e){const t=e.role||"user",n=e.content||"",s=e.contentBlocks;if(s&&Array.isArray(s)){const o=s.some(l=>l.type==="tool_use"),i=s.some(l=>l.type==="tool_result"),r=s.some(l=>l.type==="thinking");if(i)return"tool_results";if(o)return"tool_calls";if(r)return"thinking"}return typeof n=="string"&&n.includes("<system-reminder>")?"system_injections":t==="assistant"?"assistant_text":t==="user"?"user_text":"other"}function xo(e){const t={};for(const n of e)if(n.contentBlocks)for(const s of n.contentBlocks)s.type==="tool_use"&&s.id&&s.name&&(t[s.id]=s.name);return t}function Ho(e,t={}){const n=e.contentBlocks;if(n&&Array.isArray(n))for(const s of n){if(s.type==="tool_use")return(s.name||"tool")+"("+(s.input?JSON.stringify(s.input).slice(0,60):"")+")";if(s.type==="tool_result"){const i=s.tool_use_id?t[s.tool_use_id]:null,r=typeof s.content=="string"?s.content:JSON.stringify(s.content||""),l=i?i+": ":"";return l+r.slice(0,80-l.length)}const o=s;if(o.type==="thinking")return(o.thinking||o.text||"").slice(0,80);if(s.type==="text"||s.type==="input_text")return(s.text||"").slice(0,80)}return(e.content||"").slice(0,80)}function fp(e){return e.contentBlocks&&e.contentBlocks.length>0?e.contentBlocks.map(t=>{if(t.type==="tool_use")return t.name+"("+JSON.stringify(t.input,null,2)+")";if(t.type==="tool_result")return typeof t.content=="string"?t.content:JSON.stringify(t.content,null,2);const n=t;return n.type==="thinking"?n.thinking||n.text||"":t.type==="text"||t.type==="input_text"?t.text||"":JSON.stringify(t,null,2)}).join(`
23
+
24
+ `):e.content||""}function jo(e){const t={role:e.role};if(e.contentBlocks&&e.contentBlocks.length>0)t.content=e.contentBlocks;else try{t.content=JSON.parse(e.content)}catch{t.content=e.content}return t._tokens=e.tokens,t}const pp=["tool_results","system_injections","tool_calls","thinking","assistant_text","user_text"];function sc(e){const t=new Map;for(let s=e.length-1;s>=0;s--){const o=e[s],i=Tt(o);t.has(i)||t.set(i,{items:[],tokens:0});const r=t.get(i);r.items.push({msg:o,origIdx:s}),r.tokens+=o.tokens||0}const n=[...pp];for(const s of t.keys())n.includes(s)||n.push(s);return n.filter(s=>t.has(s)).map(s=>({category:s,...t.get(s)}))}function Xt(e){if(e.length===0)return[];const t=new Map;for(const o of e){const i=o.agentKey||"_default";t.set(i,(t.get(i)||0)+1)}let n="_default",s=0;for(const[o,i]of t)i>s&&(n=o,s=i);return e.map(o=>({entry:o,isMain:(o.agentKey||"_default")===n}))}const Yr="context-lens-density",Lt=Yd("session",()=>{const e=me(0),t=me([]),n=me(new Map),s=me(0),o=me(!1),i=me(null),r=me(null),l=me(!1),c=me("dashboard"),p=me("overview"),d=me(null),m=me("live"),v=me(null),w=me(""),I=me(""),S=me("comfortable"),_=me(null),T=me(0),z=me(null),K=me(null),V=me(!1),Q=me(null),D=me(new Set),ae=me(!1),ue=me("main"),O=me("main"),R=me("absolute"),de=me(new Set),F=me(!0),te=me(!1),ce=me(new Set),B=new Map;function se(x){const X=new Set(ce.value);X.add(x),ce.value=X;const be=B.get(x);be&&clearTimeout(be),B.set(x,setTimeout(()=>{B.delete(x);const Se=new Set(ce.value);Se.delete(x),ce.value=Se},1500))}const oe=new Map,W=me(null),re=me(0),we=A(()=>t.value.map(x=>{const X=n.value.get(x.id);return X||{...x,agents:[],entries:[]}})),H=A(()=>[]),C=A(()=>{let x=we.value;return w.value&&(x=x.filter(X=>X.source===w.value)),I.value&&(x=x.filter(X=>{const be=n.value.get(X.id);if(be&&be.entries.length>0)return be.entries[0].contextInfo.model.includes(I.value);const Se=t.value.find(nt=>nt.id===X.id);return Se==null?void 0:Se.latestModel.includes(I.value)})),x}),P=A(()=>w.value?t.value.filter(x=>x.source===w.value):t.value),ee=A(()=>{const x=new Set;for(const X of t.value)X.source&&x.add(X.source);return Array.from(x).sort()}),ne=A(()=>{const x=new Set;for(const X of t.value)X.latestModel&&x.add(X.latestModel);return Array.from(x).sort()}),$=A(()=>d.value?n.value.get(d.value)??null:null),L=A(()=>{const x=$.value;if(!x||x.entries.length===0)return null;if(m.value==="live"){const Se=[...Xt([...x.entries].reverse())].reverse().find(nt=>nt.isMain);return(Se==null?void 0:Se.entry)??x.entries[0]}return x.entries.find(be=>be.id===v.value)??x.entries[0]}),G=A(()=>{let x=0;for(const X of t.value)x+=X.totalCost??0;return x}),k=A(()=>{let x=0;for(const X of t.value)x+=X.entryCount;return x+s.value});async function g(){o.value=!0,r.value=null;try{const x=await op();e.value=x.revision,t.value=x.conversations,s.value=x.ungroupedCount;const X=new Set(x.conversations.map(be=>be.id));for(const be of n.value.keys())X.has(be)||n.value.delete(be);!d.value&&x.conversations.length>0&&c.value==="inspector"&&await f(x.conversations[0].id),d.value&&!X.has(d.value)&&(d.value=null,m.value="live",v.value=null,c.value==="inspector"&&(c.value="dashboard")),d.value&&X.has(d.value)&&await h(d.value)}catch(x){r.value=x instanceof Error?x.message:String(x)}finally{o.value=!1}}async function h(x){i.value=x;try{const X=await ip(x),be=new Map(n.value);be.set(x,X),n.value=be}catch(X){console.warn(`Failed to load conversation ${x}:`,X)}finally{i.value=null}}function a(x){if(x.type==="connected"){l.value=!0,x.revision!==e.value&&g();return}x.conversationId&&se(x.conversationId),g(),x.conversationId&&d.value===x.conversationId&&h(x.conversationId)}async function f(x){d.value=x,m.value="live",v.value=null,n.value.has(x)||await h(x)}function E(){m.value="live",v.value=null}function q(x){m.value="pinned",v.value=x}function N(x){c.value=x}function J(x){p.value=x}function pe(x){w.value=x}function fe(x){I.value=x}function ie(x,X=!1){_.value=x,z.value=null,K.value=null,Q.value=null,V.value=X,T.value+=1}function Z(x,X){_.value=x,z.value=X,K.value=null,Q.value=null,T.value+=1}function ke(x){_.value=null,z.value=null,K.value=x,Q.value=null,T.value+=1}function ge(x){_.value="tool_results",z.value=null,K.value=null,Q.value=x,T.value+=1}function $e(x){const X=new Set(D.value);X.has(x)?X.delete(x):X.add(x),D.value=X}async function Te(x){const X=x??D.value;if(X.size<2)return;D.value=new Set(X),ae.value=!0,c.value="compare";const be=[];for(const Se of X)n.value.has(Se)||be.push(h(Se));await Promise.all(be)}function Ie(x="dashboard"){ae.value=!1,D.value=new Set,c.value=x}function Fe(){_.value=null,z.value=null,K.value=null,V.value=!1,Q.value=null}async function Ae(x){if(oe.has(x))return oe.get(x);W.value=x;try{const X=await rp(x);if(X&&(oe.set(x,X),re.value++,oe.size>50)){const be=oe.keys().next().value;be!==void 0&&oe.delete(be)}return X}catch{return null}finally{W.value=null}}function Ye(x){return oe.get(x)??null}async function tt(x){try{await lp(x),t.value=t.value.filter(X=>X.id!==x),n.value.delete(x),d.value===x&&(t.value.length>0?await f(t.value[0].id):(d.value=null,m.value="live",v.value=null))}catch(X){r.value=X instanceof Error?X.message:String(X)}}async function ht(){try{await ap(),t.value=[],n.value=new Map,s.value=0,d.value=null,m.value="live",v.value=null,e.value=0}catch(x){r.value=x instanceof Error?x.message:String(x)}}function U(x){typeof document>"u"||document.documentElement.setAttribute("data-density",x)}function j(){if(typeof window>"u")return;const x=window.localStorage.getItem(Yr);x==="comfortable"||x==="compact"?S.value=x:S.value="comfortable",U(S.value)}function ye(x){S.value=x,typeof window<"u"&&window.localStorage.setItem(Yr,x),U(x)}return{revision:e,summaries:t,loadedConversations:n,conversations:we,ungrouped:H,loading:o,loadingSession:i,error:r,connected:l,view:c,inspectorTab:p,selectedSessionId:d,selectionMode:m,selectedEntryId:v,sourceFilter:w,modelFilter:I,density:S,messageFocusCategory:_,messageFocusToken:T,messageFocusTool:z,messageFocusIndex:K,messageFocusOpenDetail:V,messageFocusFile:Q,messagesMode:ue,timelineMode:O,timelineStackMode:R,timelineHiddenLegendKeys:de,timelineShowLimitOverlay:F,timelineShowCacheOverlay:te,recentlyUpdated:ce,compareSessionIds:D,compareMode:ae,filteredConversations:C,filteredSummaries:P,sources:ee,models:ne,selectedSession:$,selectedEntry:L,totalCost:G,totalRequests:k,load:g,loadConversationEntries:h,handleSSEEvent:a,selectSession:f,followLive:E,pinEntry:q,setView:N,setInspectorTab:J,setSourceFilter:pe,setModelFilter:fe,focusMessageCategory:ie,focusMessageTool:Z,focusMessageByIndex:ke,focusMessageFile:ge,clearMessageFocus:Fe,toggleCompareSession:$e,enterCompare:Te,exitCompare:Ie,loadEntryDetail:Ae,getEntryDetail:Ye,entryDetailLoading:W,entryDetailVersion:re,initializeDensity:j,setDensity:ye,deleteSession:tt,reset:ht}});function hp(e,t){const n=me(!1);let s=null,o=null;function i(){s&&s.close(),s=new EventSource(e),s.onopen=()=>{n.value=!0},s.onmessage=l=>{try{const c=JSON.parse(l.data);t(c)}catch{}},s.onerror=()=>{n.value=!1,s==null||s.close(),s=null,o&&clearTimeout(o),o=setTimeout(i,2e3)}}function r(){o&&(clearTimeout(o),o=null),s&&(s.close(),s=null),n.value=!1}return i(),ho(r),{connected:n,disconnect:r,reconnect:i}}function _e(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function bt(e){return e==null?"--":"$"+e.toFixed(2)}function ui(e){return e>=1e3?(e/1e3).toFixed(1)+"s":Math.round(e)+"ms"}function di(e,t=!1){return(t?e:e*100).toFixed(1)+"%"}function tn(e){if(!e)return"?";const t=e.match(/(opus|sonnet|haiku)-(\d+(?:\.\d+)?)/);if(t)return t[1]+"-"+t[2];const n=e.match(/(gpt-4o(?:-mini)?|gpt-4|gpt-3\.5)/);if(n)return n[1];const s=e.match(/(o[134](?:-mini)?)/);if(s)return s[1];const o=e.match(/(gemini-[\d.]+-(?:pro|flash)(?:-\w+)?)/);if(o)return o[1];const i=e.split(/[-_]/);return i.length>2?i.slice(0,3).join("-"):e}function Ss(e){const t=(e||"").toLowerCase();return t.includes("claude")?"badge-claude":t.includes("codex")?"badge-codex":t.includes("aider")?"badge-aider":t.includes("kimi")?"badge-kimi":t==="pi"||t.startsWith("pi-")?"badge-pi":"badge-unknown"}function fi(e){switch(e){case"good":return"#10b981";case"needs-work":return"#f59e0b";case"poor":return"#ef4444";default:return"#64748b"}}const vp={class:"toolbar"},mp={class:"session-model"},gp=["title"],yp=["title","aria-label"],_p={key:0,class:"session-id-toast"},bp={key:2,class:"toolbar-sep"},wp={class:"session-stat"},kp={class:"session-stat cost"},xp={key:3,class:"session-stat"},$p={class:"compare-label"},Sp={class:"toolbar-right"},Tp={class:"toolbar-stat"},Cp={class:"toolbar-stat"},Mp={class:"toolbar-stat cost"},Ep={key:1,class:"toolbar-dropdown"},Pp={key:2,class:"toolbar-dropdown"},Ip=["disabled"],Ap=et({__name:"AppToolbar",setup(e){const t=Lt(),n=me(!1),s=me(!1),o=me(!1),i=A(()=>t.view==="inspector"&&!!t.selectedSession),r=A(()=>t.selectedSession),l=A(()=>t.totalRequests>0),c=A(()=>i.value&&!!t.selectedSessionId),p=A(()=>{const O=t.selectedSessionId;return O?t.summaries.find(R=>R.id===O)??null:null});function d(O){if(!O)return"";let R=O;/^\/home\/[^/]+(\/|$)/.test(R)?R=R.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(R)&&(R=R.replace(/^\/Users\/[^/]+/,"~"));const de=R.split("/");return de.length>3?de.slice(-3).join("/"):R}const m=A(()=>t.selectedSessionId??"");function v(O){return String(O).trim().replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)||"unknown"}function w(O,R){const de=O==="lhar"?"lhar":"lhar.json";return`context-lens-export-${`session-${v(R||"all")}`}-privacy-standard.${de}`}async function I(O,R){const de=await fetch(O);if(!de.ok)throw new Error(`Download failed: ${de.status}`);const F=await de.blob(),te=URL.createObjectURL(F);try{const ce=document.createElement("a");ce.href=te,ce.download=R,ce.style.display="none",document.body.appendChild(ce),ce.click(),document.body.removeChild(ce)}finally{URL.revokeObjectURL(te)}}async function S(O,R){const de=R==="session"?t.selectedSessionId??void 0:void 0,F=cp(O,de),te=w(O,de);try{await I(F,te)}catch{window.open(F,"_blank")}n.value=!1}function _(){n.value=!n.value,n.value&&(s.value=!1)}function T(){s.value=!s.value,s.value&&(n.value=!1)}function z(){confirm("Clear all captured data?")&&t.reset(),s.value=!1}function K(){const O=t.selectedSessionId;!O||!c.value||(confirm("Remove this session?")&&t.deleteSession(O),s.value=!1)}function V(){t.setView("dashboard")}async function Q(){const O=m.value;if(O){try{await navigator.clipboard.writeText(O),o.value=!0}catch{}setTimeout(()=>{o.value=!1},1400)}}function D(O){return O.length<=18?O:`${O.slice(0,8)}…${O.slice(-8)}`}function ae(O){return o.value?`Copied: ${O}`:`Session ID: ${O} (click to copy)`}function ue(O){(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),Q())}return(O,R)=>{var de,F,te,ce;return y(),b("header",vp,[u("a",{class:"toolbar-brand toolbar-brand-btn",href:"#sessions",onClick:fn(V,["prevent"])},[...R[7]||(R[7]=[_a('<svg class="logo-mark" width="18" height="18" viewBox="0 0 18 18" aria-hidden="true" data-v-12cb5120><circle cx="9" cy="9" r="7.5" fill="none" stroke="var(--accent-blue)" stroke-width="1" opacity="0.35" data-v-12cb5120></circle><circle cx="9" cy="9" r="4" fill="none" stroke="var(--accent-blue)" stroke-width="1" opacity="0.6" data-v-12cb5120></circle><circle cx="9" cy="9" r="1.5" fill="var(--accent-blue)" data-v-12cb5120></circle></svg><span class="brand-text" data-v-12cb5120>Context Lens</span>',2)])]),i.value&&r.value?(y(),b(ve,{key:0},[R[9]||(R[9]=u("span",{class:"toolbar-sep"},null,-1)),u("span",{class:he(["session-badge",Y(Ss)(r.value.source)])},M(r.value.source||"?"),3),u("span",mp,M(Y(tn)(((de=p.value)==null?void 0:de.latestModel)??"")),1),r.value.workingDirectory?(y(),b("span",{key:0,class:"session-dir",title:r.value.workingDirectory},M(d(r.value.workingDirectory)),9,gp)):le("",!0),R[10]||(R[10]=u("span",{class:"toolbar-sep"},null,-1)),m.value?(y(),b("span",{key:1,class:he(["session-id",{copied:o.value}]),title:ae(m.value),role:"button",tabindex:"0","aria-label":ae(m.value),onClick:Q,onKeydown:ue},[xe(" SID "+M(D(m.value))+" ",1),o.value?(y(),b("span",_p,"Copied")):le("",!0)],42,yp)):le("",!0),m.value?(y(),b("span",bp)):le("",!0),u("span",wp,M(((F=p.value)==null?void 0:F.entryCount)??r.value.entries.length)+" turns",1),u("span",kp,M(Y(bt)(((te=p.value)==null?void 0:te.totalCost)??0)),1),(ce=p.value)!=null&&ce.healthScore?(y(),b("span",xp,[R[8]||(R[8]=xe(" Latest health ",-1)),u("span",{class:he(["session-health",{good:p.value.healthScore.rating==="good",warn:p.value.healthScore.rating==="needs-work",bad:p.value.healthScore.rating==="poor"}])},M(p.value.healthScore.overall),3)])):le("",!0)],64)):le("",!0),Y(t).compareMode?(y(),b(ve,{key:1},[R[13]||(R[13]=u("span",{class:"toolbar-sep"},null,-1)),u("span",$p,[R[11]||(R[11]=u("i",{class:"i-carbon-compare"},null,-1)),xe(" Comparing "+M(Y(t).compareSessionIds.size)+" sessions ",1)]),u("button",{class:"compare-exit-btn",onClick:R[0]||(R[0]=B=>Y(t).exitCompare())},[...R[12]||(R[12]=[u("i",{class:"i-carbon-close"},null,-1),xe(" Exit ",-1)])])],64)):le("",!0),u("div",Sp,[u("span",{class:he(["connection",{live:Y(t).connected}])},[R[14]||(R[14]=u("span",{class:"connection-dot"},null,-1)),xe(" "+M(Y(t).connected?"Live":"Offline"),1)],2),i.value?le("",!0):(y(),b(ve,{key:0},[u("span",Tp,M(Y(t).conversations.length)+" session"+M(Y(t).conversations.length!==1?"s":""),1),u("span",Cp,M(Y(t).totalRequests)+" req"+M(Y(t).totalRequests!==1?"s":""),1),u("span",Mp,M(Y(bt)(Y(t).totalCost)),1)],64)),l.value?(y(),b("div",Ep,[u("button",{class:"toolbar-control",onClick:_},[...R[15]||(R[15]=[u("i",{class:"i-carbon-download"},null,-1),xe(" Export ",-1)])]),Re(Bn,{name:"dropdown"},{default:pt(()=>[n.value?(y(),b("div",{key:0,class:"dropdown-menu",onMouseleave:R[5]||(R[5]=B=>n.value=!1)},[u("button",{class:"dropdown-item",onClick:R[1]||(R[1]=B=>S("lhar.json","all"))},[...R[16]||(R[16]=[u("i",{class:"i-carbon-document"},null,-1),xe(" All (.lhar.json)",-1)])]),u("button",{class:"dropdown-item",onClick:R[2]||(R[2]=B=>S("lhar","all"))},[...R[17]||(R[17]=[u("i",{class:"i-carbon-document"},null,-1),xe(" All (.lhar)",-1)])]),Y(t).selectedSessionId?(y(),b(ve,{key:0},[R[20]||(R[20]=u("div",{class:"dropdown-sep"},null,-1)),u("button",{class:"dropdown-item",onClick:R[3]||(R[3]=B=>S("lhar.json","session"))},[...R[18]||(R[18]=[u("i",{class:"i-carbon-document"},null,-1),xe(" Session (.lhar.json)",-1)])]),u("button",{class:"dropdown-item",onClick:R[4]||(R[4]=B=>S("lhar","session"))},[...R[19]||(R[19]=[u("i",{class:"i-carbon-document"},null,-1),xe(" Session (.lhar)",-1)])])],64)):le("",!0)],32)):le("",!0)]),_:1})])):le("",!0),l.value?(y(),b("div",Pp,[u("button",{class:"toolbar-control",onClick:T},[...R[21]||(R[21]=[u("i",{class:"i-carbon-overflow-menu-horizontal"},null,-1),xe(" Menu ",-1)])]),Re(Bn,{name:"dropdown"},{default:pt(()=>[s.value?(y(),b("div",{key:0,class:"dropdown-menu",onMouseleave:R[6]||(R[6]=B=>s.value=!1)},[u("button",{class:"dropdown-item dropdown-item--danger",onClick:z},[...R[22]||(R[22]=[u("i",{class:"i-carbon-trash-can"},null,-1),xe(" Reset all ",-1)])]),u("button",{class:he(["dropdown-item dropdown-item--danger",{"dropdown-item--disabled":!c.value}]),disabled:!c.value,onClick:K},[...R[23]||(R[23]=[u("i",{class:"i-carbon-subtract-alt"},null,-1),xe(" Remove this session ",-1)])],10,Ip)],32)):le("",!0)]),_:1})])):le("",!0)])])}}}),ct=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Lp=ct(Ap,[["__scopeId","data-v-12cb5120"]]),Op=["value","placeholder"],Rp=et({__name:"SearchInput",props:{modelValue:{},placeholder:{default:"Search…"},autoFocus:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,o=me(!1),i=me();function r(){var c;s("update:modelValue",""),(c=i.value)==null||c.focus()}function l(){var c;n.modelValue?s("update:modelValue",""):(c=i.value)==null||c.blur()}return uu(()=>{var c;n.autoFocus&&((c=i.value)==null||c.focus())}),(c,p)=>(y(),b("div",{class:he(["search-input-root",{focused:o.value,active:e.modelValue.length>0}]),onClick:p[3]||(p[3]=d=>{var m;return(m=i.value)==null?void 0:m.focus()})},[p[5]||(p[5]=u("i",{class:"i-carbon-search search-input-icon"},null,-1)),u("input",{ref_key:"inputRef",ref:i,value:e.modelValue,type:"text",class:"search-input-field",placeholder:e.placeholder,onInput:p[0]||(p[0]=d=>s("update:modelValue",d.target.value)),onFocus:p[1]||(p[1]=d=>o.value=!0),onBlur:p[2]||(p[2]=d=>o.value=!1),onKeydown:Ta(l,["escape"])},null,40,Op),e.modelValue.length>0?(y(),b("button",{key:0,class:"search-input-clear",tabindex:"-1",title:"Clear",onClick:fn(r,["stop"])},[...p[4]||(p[4]=[u("i",{class:"i-carbon-close"},null,-1)])])):le("",!0),p[6]||(p[6]=u("div",{class:"search-input-accent"},null,-1))],2))}}),Dp=ct(Rp,[["__scopeId","data-v-70f5ee93"]]);function Jn(e){return e<=0?0:e>=1?1:e}function Np(e,t){const n=e.healthScore,s=n?Jn((100-n.overall)/100):null,o=e.contextLimit?Jn(e.latestTotalTokens/e.contextLimit):0,i=s===null?o:Jn(s*.7+o*.3),r=t>0?Jn(e.totalCost/t):0,l=Jn(i*.7+r*.3);let c="Healthy",p="priority-healthy",d="prio-healthy";l>=.7?(c="Critical",p="priority-critical",d="prio-critical"):l>=.45&&(c="Warning",p="priority-warning",d="prio-warning");const m=`Priority ${Math.round(l*100)} = 0.7×risk(${Math.round(i*100)}) + 0.3×cost(${Math.round(r*100)}).`;return{risk:i,normalizedCost:r,score:l,label:c,toneClass:p,barClass:d,tooltip:m}}function oc(e,t,n){var w,I;const s=[],o=e.contextInfo,i=e.composition||[],r=i.reduce((S,_)=>S+_.tokens,0),l=xo(o.messages||[]),c=i.find(S=>S.category==="tool_results");if(c&&r>0&&c.pct>25){let S=0,_="";for(const T of o.messages||[])if(Tt(T)==="tool_results"&&T.tokens>S&&(S=T.tokens,T.contentBlocks)){for(const z of T.contentBlocks)if(z.type==="tool_result"&&z.tool_use_id&&l[z.tool_use_id]){_=l[z.tool_use_id];break}}if(S>2e3){const T=Math.round(S/r*100);s.push({severity:"high",title:`Large tool result${_?": "+_:""} (${_e(S)} tokens, ${T}% of context)`,detail:"This single result reduces space for conversation history and is re-sent every turn. You may want to truncate output or use summary flags.",impact:`${_e(S)} tok`})}}const p=i.find(S=>S.category==="tool_definitions");if(p&&p.pct>30){const S=new Set;for(const K of t)for(const V of K.contextInfo.messages||[])if(V.contentBlocks)for(const Q of V.contentBlocks)Q.type==="tool_use"&&Q.name&&S.add(Q.name);const _=[];if(o.tools)for(const K of o.tools){const V="name"in K?K.name:(w=K.function)==null?void 0:w.name;V&&_.push(V)}const T=_.filter(K=>!S.has(K)),z=_.length;if(z>S.size+3){const K=T.slice(0,5).join(", ")+(T.length>5?` +${T.length-5} more`:""),V=Math.round(p.tokens*T.length/z);s.push({severity:"high",title:`${S.size}/${z} tools used, ${T.length} idle`,detail:`Unused: ${K}. Definitions cost ~${_e(V)} tokens and are re-sent every turn. You may want to remove unused tools to free context.`,impact:`~${_e(V)} tok`})}}if(c&&c.pct>60){const S=i.find(K=>K.category==="user_text"),_=S?S.pct:0,T=new Map;for(const K of o.messages||[])if(Tt(K)==="tool_results"&&K.contentBlocks){for(const V of K.contentBlocks)if(V.type==="tool_result"&&V.tool_use_id){const Q=l[V.tool_use_id]||"unknown";T.set(Q,(T.get(Q)||0)+(K.tokens||0))}}const z=Array.from(T.entries()).sort((K,V)=>V[1]-K[1]).slice(0,3).map(([K,V])=>`${K} (${_e(V)})`).join(", ");s.push({severity:"med",title:`Tool results dominate: ${c.pct}% of context`,detail:`Top tools: ${z}. User text is only ${_}%. Large results crowd out conversation history.`,impact:"Structural"})}const d=e.contextLimit>0?Math.round(o.totalTokens/e.contextLimit*100):0;d>80?s.push({severity:"high",title:`Context utilization critical: ${d}%`,detail:`${_e(o.totalTokens)} of ${_e(e.contextLimit)} tokens. Overflow risk is elevated, and older messages may be dropped or summarized.`,impact:"Critical"}):d>60&&s.push({severity:"med",title:`Context utilization high: ${d}%`,detail:`${_e(o.totalTokens)} of ${_e(e.contextLimit)} tokens used.`,impact:"Monitor"});const m=t.indexOf(e);if(m>0){let S=-1;for(let _=m-1;_>=0;_--)if((I=n[_])!=null&&I.isMain){S=_;break}if(S>=0){const _=t[S].contextInfo.totalTokens;o.totalTokens<_*.7&&s.push({severity:"med",title:"Compaction detected",detail:`Tokens dropped ${_e(_)} → ${_e(o.totalTokens)}. Context was summarized or truncated — older details may be lost.`,impact:`-${_e(_-o.totalTokens)} tok`})}}const v=i.find(S=>S.category==="system_injections");v&&v.pct>5&&s.push({severity:"med",title:`System injections: ${v.pct}% of context`,detail:`${_e(v.tokens)} tokens of system-reminder blocks injected into messages. These are re-sent every turn, reducing space for actual conversation.`,impact:`${_e(v.tokens)} tok`});for(const S of e.securityAlerts||[]){const _=S.severity==="high"?"high":S.severity==="medium"?"med":"low",T=S.toolName?`tool result: ${S.toolName}`:`${S.role} message`;s.push({severity:_,title:`⚠ ${S.pattern.replace(/_/g," ")} in ${T} (msg ${S.messageIndex+1})`,detail:S.match,impact:S.severity,messageIndex:S.messageIndex,highlight:S.match})}return s}const Fp={class:"kpi-row"},zp={class:"kpi-card"},Bp={class:"kpi-value"},Hp={class:"kpi-card"},jp={class:"kpi-value accent-blue"},Vp={class:"kpi-card"},Up={class:"kpi-value"},Kp={class:"kpi-card"},Wp={class:"kpi-value accent-green"},qp={class:"kpi-card"},Gp={class:"kpi-value accent-amber"},Jp={class:"section-head"},Yp={class:"section-count"},Xp={class:"filter-group"},Zp={key:0,class:"filter-dropdown"},Qp=["onClick"],eh={class:"sort-group"},th={class:"table-wrap"},nh={class:"ledger"},sh={key:0,class:"col-select"},oh=["onClick"],ih={key:0,class:"col-select"},rh={class:"col-priority"},lh={class:"col-source"},ah={class:"col-model"},ch={class:"model-text"},uh={class:"col-dir"},dh=["title"],fh={class:"col-turns"},ph={class:"num"},hh={class:"col-context"},vh={class:"col-cost"},mh={class:"num green"},gh={class:"col-health"},yh={class:"health-cell"},_h={key:0,class:"health-tooltip"},bh={class:"health-tooltip-title"},wh={class:"health-audit-name"},kh={class:"col-spark"},xh=["innerHTML"],$h={class:"col-time"},Sh=["title"],Th={class:"col-arrow"},Ch=["href","onClick"],Mh=["colspan"],Eh={class:"expand-content"},Ph={class:"expand-inner"},Ih={key:0,class:"expand-loading"},Ah={key:0,class:"expand-section"},Lh={class:"expand-section-label"},Oh={class:"comp-tape"},Rh=["title"],Dh={key:0,class:"comp-seg-label"},Nh={class:"expand-section"},Fh={class:"finding-text"},zh={key:1,class:"finding"},Bh={key:0,class:"compare-bar"},Hh={class:"compare-bar-text"},jh={key:0,class:"dashboard-empty"},Vh={key:1,class:"dashboard-empty"},Uh=et({__name:"DashboardView",setup(e){const t=Lt(),n=me("recent"),s=me(new Set),o=me(!1),i=me(""),r=me(!1);We(()=>t.compareSessionIds.size,h=>{h===0&&r.value&&(r.value=!1)});function l(){r.value=!r.value,r.value||(t.compareSessionIds=new Set)}function c(h){return t.compareSessionIds.has(h)}function p(h){r.value?t.toggleCompareSession(h):ne(h)}const d=A(()=>t.compareSessionIds.size),m=me(null),v=A(()=>{const h=new Set;for(const a of t.summaries)a.source&&h.add(a.source);return Array.from(h).sort()});function w(h){return m.value?m.value.has(h):!0}function I(h){if(!m.value){const f=new Set(v.value);f.delete(h),f.size>0&&(m.value=f);return}const a=new Set(m.value);if(a.has(h)){if(a.delete(h),a.size===0)return}else a.add(h);a.size===v.value.length?m.value=null:m.value=a}const S=A(()=>m.value!==null),_=A(()=>m.value?`Source (${m.value.size})`:"Source"),T=A(()=>{let h=t.summaries;m.value&&(h=h.filter(f=>m.value.has(f.source)));const a=i.value.trim().toLowerCase();return a&&(h=h.filter(f=>[f.id,f.source,f.label,f.workingDirectory??"",f.latestModel].join("\0").toLowerCase().includes(a))),h}),z=A(()=>{let h=0;for(const a of T.value)h=Math.max(h,a.totalCost);return h}),K=A(()=>{const h=new Map;for(const a of T.value)h.set(a.id,Np(a,z.value));return h}),V=A(()=>{const h=[...T.value];return n.value==="priority"?h.sort((a,f)=>{var N,J;const E=((N=K.value.get(a.id))==null?void 0:N.score)??0;return(((J=K.value.get(f.id))==null?void 0:J.score)??0)-E}):n.value==="cost"&&h.sort((a,f)=>f.totalCost-a.totalCost),h}),Q=A(()=>T.value.length),D=A(()=>T.value.reduce((h,a)=>h+a.entryCount,0)),ae=A(()=>T.value.reduce((h,a)=>h+a.latestTotalTokens,0)),ue=A(()=>T.value.reduce((h,a)=>h+a.totalCost,0)),O=A(()=>{const h=T.value.filter(f=>{var E;return((E=f.healthScore)==null?void 0:E.overall)!=null});if(h.length===0)return 0;const a=h.reduce((f,E)=>{var q;return f+(((q=E.healthScore)==null?void 0:q.overall)??0)},0);return Math.round(a/h.length)});function R(h){return K.value.get(h)??{score:0,label:"Healthy",toneClass:"priority-healthy",barClass:"prio-healthy",risk:0,normalizedCost:0,tooltip:""}}function de(h){return h.contextLimit?h.latestTotalTokens/h.contextLimit:0}function F(h){return h>=.8?"util-high":h>=.6?"util-mid":"util-low"}function te(h){var f;const a=(f=h.healthScore)==null?void 0:f.rating;return a==="poor"?"health-bad":a==="needs-work"?"health-warn":"health-good"}function ce(h){return h>=90?"health-good":h>=50?"health-warn":"health-bad"}function B(h){const a=Date.now()-new Date(h).getTime();return a<6e4?"just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}function se(h){const a=new Date(h),f=a.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),E=a.toLocaleDateString("en-CA");return`${f} on ${E}`}function oe(h){if(!h)return"";let a=h;/^\/home\/[^/]+(\/|$)/.test(a)?a=a.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(a)&&(a=a.replace(/^\/Users\/[^/]+/,"~"));const f=a.split("/");return f.length>2?f.slice(-2).join("/"):a}function W(h){return h==="prio-critical"?"#ef4444":h==="prio-warning"?"#f59e0b":"#0ea5e9"}function re(h,a){if(h.length===0)return"";const f=72,E=22,q=Math.max(...h);if(q===0)return"";const N=h.map((fe,ie)=>{const Z=h.length<=1?f/2:ie/(h.length-1)*f,ke=E-fe/q*(E-4)-2;return`${Z.toFixed(1)},${ke.toFixed(1)}`}),J=N.join(" ")+` ${f},${E} 0,${E}`,pe="sg"+a.replace("#","");return`<svg viewBox="0 0 ${f} ${E}" preserveAspectRatio="none" style="display:block;width:100%;height:100%"><defs><linearGradient id="${pe}" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="${a}" stop-opacity="0.15"/><stop offset="100%" stop-color="${a}" stop-opacity="0.02"/></linearGradient></defs><polygon points="${J}" fill="url(#${pe})"/><polyline points="${N.join(" ")}" fill="none" stroke="${a}" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/><circle cx="${N[N.length-1].split(",")[0]}" cy="${N[N.length-1].split(",")[1]}" r="2" fill="${a}"/></svg>`}function we(h){const a=h.tokenHistory;if(!a||a.length<2)return"";const f=R(h.id);return re(a,W(f.barClass))}const H=[{key:"system_prompt",label:"System",color:"var(--cat-system, #3b82f6)"},{key:"tool_definitions",label:"Tool defs",color:"var(--cat-tools, #ec4899)"},{key:"tool_results",label:"Tool results",color:"var(--cat-tool-results, #10b981)"},{key:"assistant_text",label:"Assistant",color:"var(--cat-assistant, #f59e0b)"},{key:"user_text",label:"User",color:"var(--cat-user, #06b6d4)"},{key:"thinking",label:"Thinking",color:"var(--cat-thinking, #8b5cf6)"},{key:"system_injections",label:"Injections",color:"var(--cat-injections, #6366f1)"}];function C(h){const a=t.loadedConversations.get(h.id);return!a||a.entries.length===0?[]:a.entries[0].composition||[]}function P(h){const a=t.loadedConversations.get(h.id);if(!a||a.entries.length===0)return[];const f=a.entries[0],E=[...a.entries].reverse(),q=Xt(E);return oc(f,E,q)}function ee(h){return s.value.has(h)}async function ne(h){const a=new Set(s.value);a.has(h)?a.delete(h):(a.add(h),t.loadedConversations.has(h)||await t.loadConversationEntries(h)),s.value=a}function $(){s.value=new Set}function L(h){return`#session/${encodeURIComponent(h)}?tab=overview`}function G(h){t.setInspectorTab("overview"),t.selectSession(h),t.setView("inspector")}function k(){o.value=!1}function g(h){h.key==="Escape"&&$()}return(h,a)=>(y(),b("div",{class:"dashboard",onKeydown:g,tabindex:"-1",onClick:k},[u("div",Fp,[u("div",zp,[u("div",Bp,M(Q.value),1),a[7]||(a[7]=u("div",{class:"kpi-label"},"Sessions",-1))]),u("div",Hp,[u("div",jp,M(D.value),1),a[8]||(a[8]=u("div",{class:"kpi-label"},"Requests",-1))]),u("div",Vp,[u("div",Up,M(Y(_e)(ae.value)),1),a[9]||(a[9]=u("div",{class:"kpi-label"},"Total Tokens",-1))]),u("div",Kp,[u("div",Wp,M(Y(bt)(ue.value)),1),a[10]||(a[10]=u("div",{class:"kpi-label"},"Total Cost",-1))]),u("div",qp,[u("div",Gp,M(O.value),1),a[11]||(a[11]=u("div",{class:"kpi-label"},"Avg Health",-1))])]),u("div",Jp,[a[15]||(a[15]=u("span",{class:"section-title"},"Sessions",-1)),u("span",Yp,M(T.value.length),1),Re(Dp,{modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=f=>i.value=f),placeholder:"Filter by ID, directory, model…"},null,8,["modelValue"]),u("div",Xp,[u("button",{class:he(["compare-toggle",{active:r.value}]),onClick:l,title:"Select sessions to compare"},[...a[12]||(a[12]=[u("i",{class:"i-carbon-compare"},null,-1),xe(" Compare ",-1)])],2),v.value.length>1?(y(),b("div",Zp,[u("button",{class:he(["filter-btn",{"has-filter":S.value}]),onClick:a[1]||(a[1]=fn(f=>o.value=!o.value,["stop"]))},[xe(M(_.value)+" ",1),a[13]||(a[13]=u("span",{class:"caret"},null,-1))],2),o.value?(y(),b("div",{key:0,class:"filter-menu",onClick:a[2]||(a[2]=fn(()=>{},["stop"]))},[(y(!0),b(ve,null,Ce(v.value,f=>(y(),b("div",{key:f,class:he(["filter-option",{checked:w(f)}]),onClick:E=>I(f)},[a[14]||(a[14]=u("span",{class:"check"},[u("i",{class:"i-carbon-checkmark"})],-1)),u("span",{class:he(["source-badge",Y(Ss)(f)])},M(f),3)],10,Qp))),128))])):le("",!0)])):le("",!0),u("div",eh,[u("button",{class:he(["sort-btn",{active:n.value==="recent"}]),onClick:a[3]||(a[3]=f=>n.value="recent")},"Recent",2),u("button",{class:he(["sort-btn",{active:n.value==="priority"}]),onClick:a[4]||(a[4]=f=>n.value="priority")},"Priority",2),u("button",{class:he(["sort-btn",{active:n.value==="cost"}]),onClick:a[5]||(a[5]=f=>n.value="cost")},"Cost",2)])])]),u("div",th,[u("table",nh,[u("thead",null,[u("tr",null,[r.value?(y(),b("th",sh)):le("",!0),a[16]||(a[16]=u("th",{class:"col-priority"},null,-1)),a[17]||(a[17]=u("th",{class:"col-source"},"Source",-1)),a[18]||(a[18]=u("th",{class:"col-model"},"Model",-1)),a[19]||(a[19]=u("th",{class:"col-dir"},"Directory",-1)),a[20]||(a[20]=u("th",{class:"col-turns"},"Turns",-1)),a[21]||(a[21]=u("th",{class:"col-context sorted"},"Context",-1)),a[22]||(a[22]=u("th",{class:"col-cost"},"Cost",-1)),a[23]||(a[23]=u("th",{class:"col-health"},"Health",-1)),a[24]||(a[24]=u("th",{class:"col-spark"},"Trend",-1)),a[25]||(a[25]=u("th",{class:"col-time"},"Time",-1)),a[26]||(a[26]=u("th",{class:"col-arrow"},null,-1))])]),u("tbody",null,[(y(!0),b(ve,null,Ce(V.value,f=>{var E,q;return y(),b(ve,{key:f.id},[u("tr",{class:he(["main-row",{expanded:ee(f.id),selected:ee(f.id)||c(f.id),pulse:Y(t).recentlyUpdated.has(f.id)}]),onClick:N=>p(f.id)},[r.value?(y(),b("td",ih,[u("span",{class:he(["compare-check",{checked:c(f.id)}])},[...a[27]||(a[27]=[u("i",{class:"i-carbon-checkmark"},null,-1)])],2)])):le("",!0),u("td",rh,[u("div",{class:he(["priority-bar",R(f.id).barClass])},null,2)]),u("td",lh,[u("span",{class:he(["source-badge",Y(Ss)(f.source)])},M(f.source||"?"),3)]),u("td",ah,[u("span",ch,M(Y(tn)(f.latestModel)),1)]),u("td",uh,[u("span",{class:"dir-text",title:f.workingDirectory??""},M(oe(f.workingDirectory)),9,dh)]),u("td",fh,[u("span",ph,M(f.entryCount),1)]),u("td",hh,[u("span",{class:he(["util-chip",F(de(f))])},M(Math.round(de(f)*100))+"% ",3)]),u("td",vh,[u("span",mh,M(Y(bt)(f.totalCost)),1)]),u("td",gh,[u("div",yh,[u("span",{class:he(["health-num",te(f)])},M(((E=f.healthScore)==null?void 0:E.overall)??"—"),3),(q=f.healthScore)!=null&&q.audits?(y(),b("div",_h,[u("div",bh,"Health Score: "+M(f.healthScore.overall),1),(y(!0),b(ve,null,Ce(f.healthScore.audits,N=>(y(),b("div",{key:N.id,class:"health-audit-line"},[u("span",wh,M(N.name),1),u("span",{class:he(["health-audit-score",ce(N.score)])},M(N.score),3)]))),128))])):le("",!0)])]),u("td",kh,[u("div",{class:"inline-spark",innerHTML:we(f)},null,8,xh)]),u("td",$h,[u("span",{class:"time-text",title:se(f.latestTimestamp)},M(B(f.latestTimestamp)),9,Sh)]),u("td",Th,[u("a",{class:"inspect-btn",title:"Open in inspector",href:L(f.id),onClick:fn(N=>G(f.id),["prevent","stop"])},[...a[28]||(a[28]=[u("i",{class:"i-carbon-arrow-right"},null,-1)])],8,Ch)])],10,oh),u("tr",{class:he(["expand-row",{open:ee(f.id)}])},[u("td",{colspan:r.value?12:11},[u("div",Eh,[u("div",Ph,[Y(t).loadingSession===f.id?(y(),b("div",Ih," Loading… ")):(y(),b(ve,{key:1},[C(f).length>0?(y(),b("div",Ah,[u("div",Lh," Composition · "+M(Y(_e)(C(f).reduce((N,J)=>N+J.tokens,0)))+" tokens ",1),u("div",Oh,[(y(),b(ve,null,Ce(H,N=>{var J,pe,fe,ie;return He(u("div",{key:N.key,class:"comp-seg",style:Me({flex:((J=C(f).find(Z=>Z.category===N.key))==null?void 0:J.tokens)??0,background:N.color}),title:`${N.label}: ${((pe=C(f).find(Z=>Z.category===N.key))==null?void 0:pe.pct)??0}%`},[(((fe=C(f).find(Z=>Z.category===N.key))==null?void 0:fe.pct)??0)>=12?(y(),b("span",Dh,M(N.label),1)):le("",!0)],12,Rh),[[kd,(((ie=C(f).find(Z=>Z.category===N.key))==null?void 0:ie.tokens)??0)>0]])}),64))])])):le("",!0),u("div",Nh,[a[30]||(a[30]=u("div",{class:"expand-section-label"},"Findings",-1)),u("div",{class:he(["expand-findings",{"expand-findings--scroll":P(f).length>5}])},[P(f).length>0?(y(!0),b(ve,{key:0},Ce(P(f),(N,J)=>(y(),b("div",{key:J,class:"finding"},[u("i",{class:he(["finding-icon",[`sev-${N.severity}`,N.severity==="high"?"i-carbon-warning-alt":N.severity==="med"?"i-carbon-information":"i-carbon-checkmark"]])},null,2),u("span",Fh,[xe(M(N.title)+" ",1),N.impact?(y(),b("span",{key:0,class:he(["finding-impact",`sev-${N.severity}`])},M(N.impact),3)):le("",!0)])]))),128)):(y(),b("div",zh,[...a[29]||(a[29]=[u("i",{class:"finding-icon sev-low i-carbon-checkmark"},null,-1),u("span",{class:"finding-text muted"},"No issues detected.",-1)])]))],2)])],64))])])],8,Mh)],2)],64)}),128))])])]),Re(Bn,{name:"compare-bar"},{default:pt(()=>[r.value&&d.value>=2?(y(),b("div",Bh,[u("span",Hh,M(d.value)+" sessions selected",1),u("button",{class:"compare-bar-btn",onClick:a[6]||(a[6]=f=>Y(t).enterCompare())},[...a[31]||(a[31]=[u("i",{class:"i-carbon-compare"},null,-1),xe(" Compare ",-1)])])])):le("",!0)]),_:1}),V.value.length===0&&(i.value||m.value)?(y(),b("div",jh,[...a[32]||(a[32]=[u("div",{class:"empty-title"},"No matching sessions",-1),u("div",{class:"empty-sub"},"Try adjusting your search or filters",-1)])])):Y(t).summaries.length===0?(y(),b("div",Vh,[...a[33]||(a[33]=[u("div",{class:"empty-title"},"No requests captured",-1),u("div",{class:"empty-sub"},[xe("Point API calls to "),u("code",null,"localhost:4040")],-1)])])):le("",!0)],32))}}),Kh=ct(Uh,[["__scopeId","data-v-9ff64b6a"]]);function Bi(e){var i,r;const t=e.composition||[],n=t.reduce((l,c)=>l+c.tokens,0),s=new Map(t.map(l=>[l.category,l.tokens])),o=[];for(const[l,c]of Object.entries(jn)){let p=0;for(const d of c)p+=s.get(d)??0;p>0&&o.push({key:l,label:((i=gt[l])==null?void 0:i.label)??l,color:((r=gt[l])==null?void 0:r.color)??"#4b5563",tokens:p,pct:n>0?p/n*100:0})}return o.sort((l,c)=>c.tokens-l.tokens)}function Wh(e,t){const n=Bi(e);if(t.size===0)return n;const s=n.filter(i=>!t.has(i.key)),o=s.reduce((i,r)=>i+r.tokens,0);return s.map(i=>({...i,pct:o>0?i.tokens/o*100:0}))}function Vo(e,t){return t.size===0?e.contextInfo.totalTokens:Bi(e).filter(s=>!t.has(s.key)).reduce((s,o)=>s+o.tokens,0)}function qh(e,t){const n=t.findIndex(s=>s.entry.id===e);if(n<=0)return null;for(let s=n-1;s>=0;s--)if(t[s].isMain)return t[s].entry;return null}function Gh(e,t){const n=t.findIndex(i=>i.entry.id===e);if(n<0)return 0;let s=n;for(let i=n;i>=0;i--)if(t[i].isMain){s=i;break}let o=0;for(let i=s+1;i<t.length&&!t[i].isMain;i++)o++;return o}function Jh(e,t){var o,i;const n=new Map,s=1800;for(const r of e){const l=[],c=qh(r.entry.id,t);if(c&&r.isMain){const p=c.contextInfo.totalTokens,d=r.entry.contextInfo.totalTokens;p>0&&d<p*.75&&l.push({type:"compaction",label:"Compaction",detail:`${_e(p)} → ${_e(d)} total tokens`});const m=hi(c),v=hi(r.entry),w=m>0&&c.usage?c.usage.cacheReadTokens/m:null,I=v>0&&r.entry.usage?r.entry.usage.cacheReadTokens/v:null;if(w!==null&&I!==null){const T=I-w;Math.abs(T)>=.2&&l.push({type:"cache-shift",label:"Cache shift",detail:`${Math.round(w*100)}% → ${Math.round(I*100)}% hit rate`})}const S=((o=c.composition.find(T=>T.category==="tool_results"))==null?void 0:o.tokens)??0,_=((i=r.entry.composition.find(T=>T.category==="tool_results"))==null?void 0:i.tokens)??0;_-S>=s&&l.push({type:"tool-jump",label:"Tool jump",detail:`tool results +${_e(_-S)}`})}if(r.isMain){const p=Gh(r.entry.id,t);p>=3&&l.push({type:"subagent-burst",label:"Subagent burst",detail:`${p} subagent calls in this turn`})}l.length>0&&n.set(r.entry.id,l)}return n}function Yh(e){return e==="compaction"?"C":e==="cache-shift"?"H":e==="subagent-burst"?"S":"T"}function Xh(e,t){const n=e.map(s=>`${s.label}: ${s.detail}`).join(" | ");return`Turn ${t}: ${n}`}function ic(e,t){const n=t.findIndex(D=>D.entry.id===e.id);if(n<0)return null;const s=e.agentKey||"_default";let o=null;for(let D=n-1;D>=0;D--){const ae=t[D].entry;if((ae.agentKey||"_default")===s){o=ae;break}}if(!o)return null;const i=o.composition||[],r=e.composition||[],l=o.contextInfo.totalTokens,p=e.contextInfo.totalTokens-l,d=new Set;for(const D of i)d.add(D.category);for(const D of r)d.add(D.category);const m=[];for(const D of d){const ae=i.find(te=>te.category===D),ue=r.find(te=>te.category===D),O=ae?ae.tokens:0,R=ue?ue.tokens:0,de=R-O,F=Xe[D]||{label:D};m.push({category:D,label:F.label,delta:de,prevTokens:O,currTokens:R})}const v=[];for(const D of[...m].sort((ae,ue)=>Math.abs(ue.delta)-Math.abs(ae.delta)))D.delta===0?v.push({type:"same",text:` ${D.label}: ${_e(D.currTokens)} (unchanged)`,category:D.category,delta:D.delta}):D.prevTokens===0?v.push({type:"add",text:`+ ${D.label}: ${_e(D.currTokens)} (new)`,category:D.category,delta:D.delta}):D.currTokens===0?v.push({type:"remove",text:`- ${D.label}: ${_e(D.prevTokens)} (removed)`,category:D.category,delta:D.delta}):D.delta>0?v.push({type:"add",text:`+ ${D.label}: ${_e(D.prevTokens)} → ${_e(D.currTokens)} (+${_e(D.delta)})`,category:D.category,delta:D.delta}):v.push({type:"remove",text:`- ${D.label}: ${_e(D.prevTokens)} → ${_e(D.currTokens)} (${_e(D.delta)})`,category:D.category,delta:D.delta});const w=new Map;for(const[D,ae]of Object.entries(jn))for(const ue of ae)w.set(ue,D);const I=new Map,S=new Map;for(const D of m){const ae=w.get(D.category)??"other";I.set(ae,(I.get(ae)??0)+D.delta);const ue=S.get(ae);(!ue||Math.abs(D.delta)>ue.absDelta)&&S.set(ae,{category:D.category,absDelta:Math.abs(D.delta)})}const _=Array.from(I.entries()).map(([D,ae])=>{var ue,O;return{group:D,label:((ue=gt[D])==null?void 0:ue.label)??D,delta:ae,category:((O=S.get(D))==null?void 0:O.category)??""}}).filter(D=>D.delta!==0).sort((D,ae)=>Math.abs(ae.delta)-Math.abs(D.delta)),T=_.filter(D=>D.delta>0).slice(0,3),z=_.filter(D=>D.delta<0).slice(0,3);let K=0,V=0,Q=0;for(const D of t)(D.entry.agentKey||"_default")===s&&Q++,D.entry.id===o.id&&(K=Q),D.entry.id===e.id&&(V=Q);return{prevTurnNum:K,currTurnNum:V,delta:p,lines:v,topIncreases:T,topDecreases:z}}function Xr(e,t){const n=t?"0.85":"0.35";return/opus/i.test(e)?`rgba(251, 146, 60, ${n})`:/sonnet/i.test(e)?`rgba(96, 165, 250, ${n})`:/haiku/i.test(e)?`rgba(167, 139, 250, ${n})`:/gpt/i.test(e)?`rgba(16, 185, 129, ${n})`:`rgba(148, 163, 184, ${n})`}function Uo(e,t,n=3){return t===0?n:Math.max(n,Math.round(e/t*100))}function Ko(e,t=4){if(e===0)return[0];const n=e/t,s=Math.pow(10,Math.floor(Math.log10(n))),o=Math.ceil(n/s)*s,i=[];for(let r=0;r<=t;r++){const l=r*o;l<=e*1.1&&i.push(l)}return i}function Zh(e){return e>30?Math.ceil(e/15):1}function Qh(e){let t=0;return e.map(n=>(n.isMain&&t++,n.isMain?t:0))}function ev(e,t){return`${t?"":"Sub "}${tn(e.contextInfo.model)}: ${_e(e.contextInfo.totalTokens)} / ${bt(e.costUsd)}`}function tv(e,t){const n=Bi(e),s=e.contextInfo.totalTokens,o=n.map(i=>`${i.key===t.key?"▸ ":" "}${i.label}: ${_e(i.tokens)} (${i.pct.toFixed(1)}%)`);return o.push(` Total: ${_e(s)}`),o.join(`
25
+ `)}function Zr(e,t){return t==="cost"?bt(e):_e(e)}function pi(e){if(!e.usage)return null;const t=hi(e);return t===0?null:e.usage.cacheReadTokens/t}function hi(e){return e.usage?e.usage.inputTokens+e.usage.cacheReadTokens+e.usage.cacheWriteTokens:0}function rc(e){const t={turnsRemaining:null,growthPerTurn:0,sinceCompaction:0,contextLimit:0,currentTokens:0};if(e.length===0)return t;const n=e.filter(S=>S.isMain).map(S=>S.entry);if(n.length<2)return t;const o=n[n.length-1].contextLimit;if(o<=0)return t;let i=0;for(let S=1;S<n.length;S++){const _=n[S-1].contextInfo.totalTokens,T=n[S].contextInfo.totalTokens;_>0&&T<_*.75&&(i=S)}const r=n.slice(i);if(r.length<2)return t;const l=r[0].contextInfo.totalTokens,c=r[r.length-1].contextInfo.totalTokens,p=c-l,d=r.length-1,m=p/d,v=c,w=o-v;let I=null;return m>0&&(I=Math.floor(w/m),I<0&&(I=0)),{turnsRemaining:I,growthPerTurn:m,sinceCompaction:r.length,contextLimit:o,currentTokens:v}}function nv(e){var c,p;const t=Math.round(e.utilization*100),n=e.healthScore,s=[...e.composition].sort((d,m)=>m.tokens-d.tokens)[0],o=e.topDelta;let i="narrative-neutral",r=`Context is at ${t}% utilization.`;(n==null?void 0:n.rating)==="poor"||t>=85?(i="narrative-advisory",r=`Turn health is elevated risk (${n?n.overall+"/100":t+"% utilization"}).`):(n==null?void 0:n.rating)==="needs-work"||t>=65?(i="narrative-advisory",r=`Turn health shows moderate pressure (${n?n.overall+"/100":t+"% utilization"}).`):n&&(r=`Turn health is stable at ${n.overall}/100.`);const l=[];if(s&&l.push(`${((c=Xe[s.category])==null?void 0:c.label)??s.category} is the largest share (${Math.round(s.pct)}%).`),o){const d=((p=Xe[o.category])==null?void 0:p.label)??o.category,m=o.delta>0?"grew":"shrank";l.push(`${d} ${m} most vs previous main turn (${_e(Math.abs(o.delta))}).`)}return{toneClass:i,headline:r,detail:l.join(" ")}}const sv={Read:{paramKeys:["file_path","path"],kind:"read"},Write:{paramKeys:["file_path","path"],kind:"write"},Edit:{paramKeys:["file_path","path"],kind:"write"},MultiEdit:{paramKeys:["file_path","path"],kind:"write"},read_file:{paramKeys:["path","file_path"],kind:"read"},write_file:{paramKeys:["path","file_path"],kind:"write"},read:{paramKeys:["path","file_path"],kind:"read"},write:{paramKeys:["path","file_path"],kind:"write"},edit:{paramKeys:["path","file_path"],kind:"write"},replace:{paramKeys:["file_path","path"],kind:"write"},readFile:{paramKeys:["path","filePath","file_path"],kind:"read"},writeFile:{paramKeys:["path","filePath","file_path"],kind:"write"},editFile:{paramKeys:["path","filePath","file_path"],kind:"write"},create_file:{paramKeys:["path","file_path"],kind:"write"},patch:{paramKeys:["path","file_path"],kind:"write"}};function ov(e){const t=sv[e.name];if(!t)return null;const n=e.input;if(!n||typeof n!="object")return null;for(const s of t.paramKeys){const o=n[s];if(typeof o=="string"&&o.length>0)return{path:iv(o),kind:t.kind}}return null}function iv(e){let t=e.replace(/\/+/g,"/");return t.startsWith("./")&&(t=t.slice(2)),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t}function lc(e,t){if(!t)return e;const n=t.endsWith("/")?t:t+"/";if(e.startsWith(n))return e.slice(n.length);const s=rv(e);return s?"~/"+e.slice(s.length):e}function rv(e){const t=e.match(/^(\/(?:home|Users)\/[^/]+\/)/);return t?t[1]:null}function lv(e,t){const n=new Map;for(const s of e){if(!s.contentBlocks)continue;const i=s.contentBlocks.filter(r=>r.type==="tool_use").length>0?(s.tokens||0)/s.contentBlocks.length:0;for(const r of s.contentBlocks){if(r.type!=="tool_use")continue;const l=r,c=ov(l);if(c&&l.id){const p=lc(c.path,t);n.set(l.id,{path:p,kind:c.kind,tokens:Math.round(i)})}}}return n}function ac(e,t){const n=new Set,s=new Map;function o(i){let r=s.get(i);return r||(r={path:i,tokens:0,reads:0,writes:0,toolResultTokens:0,toolCallTokens:0},s.set(i,r)),r}for(const i of e){const r=i.contextInfo.messages??[];if(r.length===0)continue;const l=lv(r,t);for(const[c,p]of l){if(n.has(c))continue;n.add(c);const d=o(p.path);d.toolCallTokens+=p.tokens,d.tokens+=p.tokens,p.kind==="read"?d.reads++:d.writes++}for(const c of r){if(!c.contentBlocks)continue;const p=c.contentBlocks.filter(m=>m.type==="tool_result");if(p.length===0)continue;const d=p.length>0?(c.tokens||0)/p.length:0;for(const m of p){if(m.type!=="tool_result")continue;const v=m.tool_use_id,w=l.get(v);if(!w||!n.has(v))continue;const I=o(w.path),S=Math.round(d);I.toolResultTokens+=S,I.tokens+=S}}}return Array.from(s.values()).filter(i=>i.tokens>0).sort((i,r)=>r.tokens-i.tokens)}function Hi(e){const t=e.split("/");return t[t.length-1]||e}function Qr(e){const t=e.lastIndexOf("/");return t<=0?"":e.slice(0,t)}const el=["#3b82f6","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#14b8a6","#6366f1","#84cc16"];function vi(e){return el[e%el.length]}function av(e){var t=0,n=e.children,s=n&&n.length;if(!s)t=1;else for(;--s>=0;)t+=n[s].value;e.value=t}function cv(){return this.eachAfter(av)}function uv(e,t){let n=-1;for(const s of this)e.call(t,s,++n,this);return this}function dv(e,t){for(var n=this,s=[n],o,i,r=-1;n=s.pop();)if(e.call(t,n,++r,this),o=n.children)for(i=o.length-1;i>=0;--i)s.push(o[i]);return this}function fv(e,t){for(var n=this,s=[n],o=[],i,r,l,c=-1;n=s.pop();)if(o.push(n),i=n.children)for(r=0,l=i.length;r<l;++r)s.push(i[r]);for(;n=o.pop();)e.call(t,n,++c,this);return this}function pv(e,t){let n=-1;for(const s of this)if(e.call(t,s,++n,this))return s}function hv(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,s=t.children,o=s&&s.length;--o>=0;)n+=s[o].value;t.value=n})}function vv(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function mv(e){for(var t=this,n=gv(t,e),s=[t];t!==n;)t=t.parent,s.push(t);for(var o=s.length;e!==n;)s.splice(o,0,e),e=e.parent;return s}function gv(e,t){if(e===t)return e;var n=e.ancestors(),s=t.ancestors(),o=null;for(e=n.pop(),t=s.pop();e===t;)o=e,e=n.pop(),t=s.pop();return o}function yv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function _v(){return Array.from(this)}function bv(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function wv(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*kv(){var e=this,t,n=[e],s,o,i;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,s=e.children)for(o=0,i=s.length;o<i;++o)n.push(s[o]);while(n.length)}function ji(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Sv)):t===void 0&&(t=$v);for(var n=new eo(e),s,o=[n],i,r,l,c;s=o.pop();)if((r=t(s.data))&&(c=(r=Array.from(r)).length))for(s.children=r,l=c-1;l>=0;--l)o.push(i=r[l]=new eo(r[l])),i.parent=s,i.depth=s.depth+1;return n.eachBefore(Cv)}function xv(){return ji(this).eachBefore(Tv)}function $v(e){return e.children}function Sv(e){return Array.isArray(e)?e[1]:null}function Tv(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Cv(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function eo(e){this.data=e,this.depth=this.height=0,this.parent=null}eo.prototype=ji.prototype={constructor:eo,count:cv,each:uv,eachAfter:fv,eachBefore:dv,find:pv,sum:hv,sort:vv,path:mv,ancestors:yv,descendants:_v,leaves:bv,links:wv,copy:xv,[Symbol.iterator]:kv};function Mv(e){if(typeof e!="function")throw new Error;return e}function Yn(){return 0}function Xn(e){return function(){return e}}function Ev(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Pv(e,t,n,s,o){for(var i=e.children,r,l=-1,c=i.length,p=e.value&&(s-t)/e.value;++l<c;)r=i[l],r.y0=n,r.y1=o,r.x0=t,r.x1=t+=r.value*p}function Iv(e,t,n,s,o){for(var i=e.children,r,l=-1,c=i.length,p=e.value&&(o-n)/e.value;++l<c;)r=i[l],r.x0=t,r.x1=s,r.y0=n,r.y1=n+=r.value*p}var Av=(1+Math.sqrt(5))/2;function Lv(e,t,n,s,o,i){for(var r=[],l=t.children,c,p,d=0,m=0,v=l.length,w,I,S=t.value,_,T,z,K,V,Q,D;d<v;){w=o-n,I=i-s;do _=l[m++].value;while(!_&&m<v);for(T=z=_,Q=Math.max(I/w,w/I)/(S*e),D=_*_*Q,V=Math.max(z/D,D/T);m<v;++m){if(_+=p=l[m].value,p<T&&(T=p),p>z&&(z=p),D=_*_*Q,K=Math.max(z/D,D/T),K>V){_-=p;break}V=K}r.push(c={value:_,dice:w<I,children:l.slice(d,m)}),c.dice?Pv(c,n,s,o,S?s+=I*_/S:i):Iv(c,n,s,S?n+=w*_/S:o,i),S-=_,d=m}return r}const Ov=(function e(t){function n(s,o,i,r,l){Lv(t,s,o,i,r,l)}return n.ratio=function(s){return e((s=+s)>1?s:1)},n})(Av);function Rv(){var e=Ov,t=!1,n=1,s=1,o=[0],i=Yn,r=Yn,l=Yn,c=Yn,p=Yn;function d(v){return v.x0=v.y0=0,v.x1=n,v.y1=s,v.eachBefore(m),o=[0],t&&v.eachBefore(Ev),v}function m(v){var w=o[v.depth],I=v.x0+w,S=v.y0+w,_=v.x1-w,T=v.y1-w;_<I&&(I=_=(I+_)/2),T<S&&(S=T=(S+T)/2),v.x0=I,v.y0=S,v.x1=_,v.y1=T,v.children&&(w=o[v.depth+1]=i(v)/2,I+=p(v)-w,S+=r(v)-w,_-=l(v)-w,T-=c(v)-w,_<I&&(I=_=(I+_)/2),T<S&&(S=T=(S+T)/2),e(v,I,S,_,T))}return d.round=function(v){return arguments.length?(t=!!v,d):t},d.size=function(v){return arguments.length?(n=+v[0],s=+v[1],d):[n,s]},d.tile=function(v){return arguments.length?(e=Mv(v),d):e},d.padding=function(v){return arguments.length?d.paddingInner(v).paddingOuter(v):d.paddingInner()},d.paddingInner=function(v){return arguments.length?(i=typeof v=="function"?v:Xn(+v),d):i},d.paddingOuter=function(v){return arguments.length?d.paddingTop(v).paddingRight(v).paddingBottom(v).paddingLeft(v):d.paddingTop()},d.paddingTop=function(v){return arguments.length?(r=typeof v=="function"?v:Xn(+v),d):r},d.paddingRight=function(v){return arguments.length?(l=typeof v=="function"?v:Xn(+v),d):l},d.paddingBottom=function(v){return arguments.length?(c=typeof v=="function"?v:Xn(+v),d):c},d.paddingLeft=function(v){return arguments.length?(p=typeof v=="function"?v:Xn(+v),d):p},d}const Dv={key:0,class:"panel panel--hero"},Nv={class:"panel-head"},Fv={class:"panel-sub"},zv={class:"mode-toggle"},Bv={class:"panel-body"},Hv={key:0,class:"treemap"},jv=["onClick"],Vv={class:"tm-label"},Uv={class:"tm-val"},Kv={key:1,class:"tm-label-compact"},Wv={key:2,class:"tm-pct"},qv={key:1,class:"treemap treemap-simple"},Gv=["onClick"],Jv={class:"tm-label"},Yv={class:"tm-val"},Xv={key:2,class:"treemap"},Zv=["onClick"],Qv={class:"tm-label"},em={class:"tm-val"},tm={key:1,class:"tm-label-compact"},nm={key:2,class:"tm-pct"},sm={class:"legend"},om={class:"legend-pct"},im={key:0,class:"legend-item"},rm={class:"legend-file-path"},lm={class:"legend-pct"},am={key:0,class:"legend-item"},cm={class:"legend-pct"},tl=5,nl=6,um=et({__name:"CompositionTreemap",props:{entry:{},turnNum:{}},emits:["categoryClick","toolClick","fileClick"],setup(e,{emit:t}){const n=e,s=Lt(),o=t,i=me("detailed"),r=me(null),l=A(()=>{var ce;const F=((ce=n.entry)==null?void 0:ce.composition)||[],te=[];for(const[B,se]of Object.entries(jn)){let oe=0;for(const W of se){const re=F.find(we=>we.category===W);re&&(oe+=re.tokens)}if(oe>0){const W=gt[B];te.push({key:B,label:W.label,color:W.color,tokens:oe})}}return te}),c=A(()=>{const F=n.entry;return F?F.composition.filter(te=>te.tokens>0).map(te=>{var ce,B;return{key:te.category,label:((ce=Xe[te.category])==null?void 0:ce.label)??te.category,color:((B=Xe[te.category])==null?void 0:B.color)??"#4b5563",tokens:te.tokens,category:te.category}}):[]});function p(F){const te=["#10b981","#34d399","#14b8a6","#2dd4bf","#10b981","#06b6d4","#0ea5e9"];return te[F%te.length]}const d=A(()=>{const F=n.entry;if(!F)return[];const te=F.contextInfo.messages||[],ce=xo(te),B=new Map;for(const se of te){if(Tt(se)!=="tool_results")continue;const oe=(se.contentBlocks||[]).filter(re=>re.type==="tool_result");if(oe.length===0)continue;const W=(se.tokens||0)/oe.length;for(const re of oe){const we=re.tool_use_id||"unknown",H=ce[we]||`tool:${we.slice(0,8)}`;B.set(H,(B.get(H)||0)+W)}}return Array.from(B.entries()).sort((se,oe)=>oe[1]-se[1]).map(([se,oe],W)=>({key:`tool-${se}-${W}`,label:se,color:p(W),tokens:Math.max(1,Math.round(oe)),category:"tool_results",toolName:se}))}),m=A(()=>r.value==="tool_results"&&d.value.length>0?d.value:c.value),v=A(()=>{const F=s.selectedSession;if(!F||F.entries.length===0)return[];const te=F.workingDirectory;return ac(F.entries,te).map((B,se)=>({key:`file-${B.path}-${se}`,label:Hi(B.path),color:vi(se),tokens:B.tokens,category:"files",toolName:B.path}))}),w=A(()=>V(v.value)),I=A(()=>v.value.length>0),S=A(()=>m.value.slice(0,tl)),_=A(()=>m.value.slice(tl)),T=A(()=>_.value.map(F=>`${F.label}: ${de(F.tokens)}`).join(`
26
+ `)),z=A(()=>v.value.slice(0,nl)),K=A(()=>v.value.slice(nl).map(F=>`${F.toolName||F.label}: ${de(F.tokens)}`).join(`
27
+ `));function V(F){if(F.length===0)return[];const te=F.reduce((se,oe)=>se+oe.tokens,0),ce=ji({key:"root",label:"root",color:"#000000",tokens:0,children:F}).sum(se=>se.children&&se.children.length>0?0:Math.max(0,se.tokens||0));return Rv().size([100,100]).paddingInner(1).round(!0)(ce).leaves().map(se=>{const oe=se.data;return{key:oe.key,label:oe.label,color:oe.color,tokens:oe.tokens,category:oe.category,x:se.x0,y:se.y0,w:se.x1-se.x0,h:se.y1-se.y0,pct:te>0?oe.tokens/te*100:0}})}const Q=A(()=>V(m.value));function D(F){if(r.value===null&&F.category==="tool_results"&&d.value.length>1){r.value="tool_results";return}if(r.value==="tool_results"&&F.toolName){o("toolClick",F.toolName);return}o("categoryClick",F.category||"tool_results")}function ae(F){const te=n.entry;if(!te)return;const ce=jn[F]||[];if(ce.length===0)return;let B=ce[0],se=-1;for(const oe of ce){const W=te.composition.find(we=>we.category===oe),re=(W==null?void 0:W.tokens)??0;re>se&&(se=re,B=oe)}o("categoryClick",B)}function ue(F){F.toolName&&o("fileClick",F.toolName)}function O(){r.value=null}const R=A(()=>{var F;return((F=n.entry)==null?void 0:F.contextInfo.totalTokens)??0});function de(F){return R.value===0?"":Math.round(F/R.value*100)+"%"}return We(()=>{var F;return(F=n.entry)==null?void 0:F.id},()=>{r.value=null}),(F,te)=>{const ce=yn("tooltip");return e.entry.composition.length>0?(y(),b("section",Dv,[u("div",Nv,[te[3]||(te[3]=u("span",{class:"panel-title"},"Composition",-1)),u("span",Fv,"Turn "+M(e.turnNum)+" · "+M(Y(_e)(e.entry.composition.reduce((B,se)=>B+se.tokens,0))),1),i.value==="detailed"&&r.value?(y(),b("button",{key:0,class:"treemap-back",onClick:O}," Back to categories ")):le("",!0),u("div",zv,[u("button",{class:he({on:i.value==="detailed"}),onClick:te[0]||(te[0]=B=>i.value="detailed")},"Detail",2),u("button",{class:he({on:i.value==="simple"}),onClick:te[1]||(te[1]=B=>i.value="simple")},"Simple",2),I.value?(y(),b("button",{key:0,class:he({on:i.value==="files"}),onClick:te[2]||(te[2]=B=>i.value="files")},"Files",2)):le("",!0)])]),u("div",Bv,[i.value==="detailed"?(y(),b("div",Hv,[(y(!0),b(ve,null,Ce(Q.value,B=>He((y(),b("button",{key:B.key,class:"tm-block tm-block-2d",style:Me({left:B.x+"%",top:B.y+"%",width:B.w+"%",height:B.h+"%",background:B.color}),onClick:se=>D(B)},[B.w>=18&&B.h>=16?(y(),b(ve,{key:0},[u("span",Vv,M(B.label),1),u("span",Uv,M(Y(_e)(B.tokens)),1)],64)):B.w>=12&&B.h>=12?(y(),b("span",Kv,M(B.label.slice(0,8))+M(B.label.length>8?"…":""),1)):B.w>=8&&B.h>=8?(y(),b("span",Wv,M(Math.round(B.pct))+"%",1)):le("",!0)],12,jv)),[[ce,`${B.label}: ${B.tokens.toLocaleString()} (${B.pct.toFixed(1)}%)`]])),128))])):i.value==="simple"?(y(),b("div",qv,[(y(!0),b(ve,null,Ce(l.value,B=>He((y(),b("div",{key:B.key,class:he(["tm-block tm-block-simple",{"tm-block-narrow":B.tokens/e.entry.composition.reduce((se,oe)=>se+oe.tokens,0)<.15}]),style:Me({flex:B.tokens,background:B.color}),onClick:se=>ae(B.key)},[u("span",Jv,M(B.label),1),u("span",Yv,M(Y(_e)(B.tokens)),1)],14,Gv)),[[ce,`${B.label}: ${B.tokens.toLocaleString()}`]])),128))])):i.value==="files"?(y(),b("div",Xv,[(y(!0),b(ve,null,Ce(w.value,B=>He((y(),b("button",{key:B.key,class:"tm-block tm-block-2d",style:Me({left:B.x+"%",top:B.y+"%",width:B.w+"%",height:B.h+"%",background:B.color}),onClick:se=>ue(B)},[B.w>=18&&B.h>=16?(y(),b(ve,{key:0},[u("span",Qv,M(B.label),1),u("span",em,M(Y(_e)(B.tokens)),1)],64)):B.w>=12&&B.h>=12?(y(),b("span",tm,M(B.label.slice(0,8))+M(B.label.length>8?"…":""),1)):B.w>=8&&B.h>=8?(y(),b("span",nm,M(Math.round(B.pct))+"%",1)):le("",!0)],12,Zv)),[[ce,`${B.toolName||B.label}: ${B.tokens.toLocaleString()} (${B.pct.toFixed(1)}%)`]])),128))])):le("",!0),u("div",sm,[i.value==="detailed"?(y(),b(ve,{key:0},[(y(!0),b(ve,null,Ce(S.value,B=>(y(),b("span",{key:`legend-${B.key}`,class:"legend-item"},[u("span",{class:"legend-dot",style:Me({background:B.color})},null,4),xe(" "+M(B.label)+" ",1),u("span",om,M(de(B.tokens)),1)]))),128)),m.value.length>S.value.length?He((y(),b("span",im,[xe(" +"+M(m.value.length-S.value.length)+" more ",1)])),[[ce,T.value]]):le("",!0)],64)):i.value==="files"?(y(),b(ve,{key:1},[(y(!0),b(ve,null,Ce(z.value,B=>(y(),b("span",{key:`legend-file-${B.key}`,class:"legend-item"},[u("span",{class:"legend-dot",style:Me({background:B.color})},null,4),He((y(),b("span",rm,[xe(M(B.label),1)])),[[ce,B.toolName||B.label]]),u("span",lm,M(de(B.tokens)),1)]))),128)),v.value.length>z.value.length?He((y(),b("span",am,[xe(" +"+M(v.value.length-z.value.length)+" more ",1)])),[[ce,K.value]]):le("",!0)],64)):(y(!0),b(ve,{key:2},Ce(l.value,B=>(y(),b("span",{key:B.key,class:"legend-item"},[u("span",{class:"legend-dot",style:Me({background:B.color})},null,4),xe(" "+M(B.label)+" ",1),u("span",cm,M(de(B.tokens)),1)]))),128))])])])):le("",!0)}}}),dm=ct(um,[["__scopeId","data-v-ac46df9b"]]),fm={key:0,class:"panel panel--secondary"},pm={class:"panel-head"},hm={class:"panel-sub"},vm={class:"panel-body diff-body"},mm={key:0,class:"diff-tapes"},gm={class:"diff-tape-row"},ym={class:"diff-tape-label"},_m={class:"diff-tape-track"},bm={class:"diff-tape-val"},wm={class:"diff-tape-row"},km={class:"diff-tape-label"},xm={class:"diff-tape-track"},$m={class:"diff-tape-val"},Sm={key:1,class:"diff-summary-row"},Tm={key:0,class:"diff-summary-group"},Cm={class:"diff-summary-label"},Mm=["onClick"],Em=["onClick"],Pm={key:0,class:"diff-summary-group"},Im={class:"diff-summary-label"},Am=["onClick"],Lm={key:1,class:"diff-summary-group"},Om={class:"diff-summary-label"},Rm=["onClick"],Dm={key:2,class:"diff-hidden-wrap"},Nm={class:"diff-hidden-note"},Fm=["onClick"],zm={key:1,class:"diff-empty"},Bm=2e3,Hm=et({__name:"ContextDiffPanel",props:{diffData:{},currentEntry:{default:null},previousEntry:{default:null},showTapes:{type:Boolean,default:!1},hideUnchanged:{type:Boolean,default:!1},summaryMode:{default:"split"},combinedLabel:{default:"Drivers"},growthLabel:{default:"Growth drivers"},shrinkLabel:{default:"Shrink drivers"},deltaTone:{default:"good"},showWhenEmpty:{type:Boolean,default:!1},emptyText:{default:"First turn — no previous context."}},emits:["categoryClick"],setup(e,{emit:t}){const n=e,s=t,o=A(()=>!!n.diffData||n.showWhenEmpty),i=A(()=>{const w=n.diffData;return w?n.hideUnchanged?w.lines.filter(I=>I.type!=="same"):w.lines:[]}),r=A(()=>{const w=n.diffData,I=n.currentEntry;if(!w||!I)return[];const S=new Map(I.composition.map(_=>[_.category,_.tokens]));return w.lines.filter(_=>_.type==="same").map(_=>{var T;return{category:_.category,label:((T=Xe[_.category])==null?void 0:T.label)??_.category,tokens:S.get(_.category)??0}}).sort((_,T)=>T.tokens-_.tokens)}),l=A(()=>r.value.length===0?"":r.value.map(w=>`${w.label}: ${_e(w.tokens)}`).join(`
28
+ `)),c=A(()=>{const w=n.diffData;if(!w)return"var(--text-dim)";const I=w.delta>=0;return n.deltaTone==="bad"?I?"var(--accent-red)":"var(--accent-green)":I?"var(--accent-green)":"var(--accent-red)"});function p(w){return Math.abs(w)>=Bm}function d(w,I){return p(w)?I==="up"?"diff-tone-up":"diff-tone-down":"diff-tone-muted"}function m(w){return w.type==="same"?"diff-tone-muted":w.type==="add"?d(w.delta,"up"):d(w.delta,"down")}function v(w){s("categoryClick",w)}return(w,I)=>{const S=yn("tooltip");return o.value?(y(),b("section",fm,[u("div",pm,[I[0]||(I[0]=u("span",{class:"panel-title"},"Context Diff",-1)),e.diffData?(y(),b(ve,{key:0},[u("span",hm,"Turn "+M(e.diffData.prevTurnNum)+" → "+M(e.diffData.currTurnNum),1),u("span",{class:"diff-delta",style:Me({color:c.value})},M(e.diffData.delta>=0?"+":"")+M(Y(_e)(e.diffData.delta)),5)],64)):le("",!0)]),u("div",vm,[e.diffData?(y(),b(ve,{key:0},[e.showTapes&&e.currentEntry&&e.previousEntry?(y(),b("div",mm,[u("div",gm,[u("span",ym,"T"+M(e.diffData.prevTurnNum),1),u("div",_m,[(y(!0),b(ve,null,Ce(e.previousEntry.composition,_=>{var T;return y(),b("div",{key:"prev-"+_.category,class:"diff-tape-seg",style:Me({flex:_.tokens,background:((T=Y(Xe)[_.category])==null?void 0:T.color)??"#475569"})},null,4)}),128))]),u("span",bm,M(Y(_e)(e.previousEntry.contextInfo.totalTokens)),1)]),u("div",wm,[u("span",km,"T"+M(e.diffData.currTurnNum),1),u("div",xm,[(y(!0),b(ve,null,Ce(e.currentEntry.composition,_=>{var T;return y(),b("div",{key:"curr-"+_.category,class:"diff-tape-seg",style:Me({flex:_.tokens,background:((T=Y(Xe)[_.category])==null?void 0:T.color)??"#475569"})},null,4)}),128))]),u("span",$m,M(Y(_e)(e.currentEntry.contextInfo.totalTokens)),1)])])):le("",!0),e.diffData.topIncreases.length>0||e.diffData.topDecreases.length>0?(y(),b("div",Sm,[e.summaryMode==="combined"?(y(),b("div",Tm,[u("span",Cm,M(e.combinedLabel),1),(y(!0),b(ve,null,Ce(e.diffData.topIncreases,_=>(y(),b("button",{key:"inc-"+_.group,class:he(["diff-summary-chip",d(_.delta,"up")]),onClick:T=>v(_.category)},M(_.label)+" +"+M(Y(_e)(_.delta)),11,Mm))),128)),(y(!0),b(ve,null,Ce(e.diffData.topDecreases,_=>(y(),b("button",{key:"dec-"+_.group,class:he(["diff-summary-chip",d(_.delta,"down")]),onClick:T=>v(_.category)},M(_.label)+" "+M(Y(_e)(_.delta)),11,Em))),128))])):(y(),b(ve,{key:1},[e.diffData.topIncreases.length>0?(y(),b("div",Pm,[u("span",Im,M(e.growthLabel),1),(y(!0),b(ve,null,Ce(e.diffData.topIncreases,_=>(y(),b("button",{key:"inc-"+_.group,class:he(["diff-summary-chip",d(_.delta,"up")]),onClick:T=>v(_.category)},M(_.label)+" +"+M(Y(_e)(_.delta)),11,Am))),128))])):le("",!0),e.diffData.topDecreases.length>0?(y(),b("div",Lm,[u("span",Om,M(e.shrinkLabel),1),(y(!0),b(ve,null,Ce(e.diffData.topDecreases,_=>(y(),b("button",{key:"dec-"+_.group,class:he(["diff-summary-chip",d(_.delta,"down")]),onClick:T=>v(_.category)},M(_.label)+" "+M(Y(_e)(_.delta)),11,Rm))),128))])):le("",!0)],64))])):le("",!0),e.hideUnchanged&&r.value.length>0?(y(),b("div",Dm,[He((y(),b("span",Nm,[xe(M(r.value.length)+" unchanged "+M(r.value.length===1?"category":"categories")+" hidden ",1)])),[[S,l.value]])])):le("",!0),(y(!0),b(ve,null,Ce(i.value,(_,T)=>(y(),b("button",{key:"line-"+T,class:he(["diff-line",["diff-"+_.type,m(_)]]),onClick:z=>v(_.category)},M(_.text),11,Fm))),128))],64)):(y(),b("span",zm,M(e.emptyText),1))])])):le("",!0)}}}),cc=ct(Hm,[["__scopeId","data-v-f23cde3c"]]),jm={key:0,class:"panel panel--primary"},Vm={class:"panel-head"},Um={key:0,class:"finding-count"},Km={key:0,class:"audit-row"},Wm=["onClick"],qm={class:"rec-content"},Gm={class:"rec-title"},Jm={class:"rec-detail"},Ym=et({__name:"HealthFindings",props:{entry:{},recommendations:{},auditTooltip:{type:Function}},emits:["recommendationClick"],setup(e,{emit:t}){const n=t;function s(o){o.messageIndex!=null&&n("recommendationClick",o)}return(o,i)=>{const r=yn("tooltip");return e.entry.healthScore||e.recommendations.length>0?(y(),b("section",jm,[u("div",Vm,[i[0]||(i[0]=u("span",{class:"panel-title"},"Findings",-1)),e.recommendations.length?(y(),b("span",Um,M(e.recommendations.length),1)):le("",!0)]),e.entry.healthScore?(y(),b("div",Km,[(y(!0),b(ve,null,Ce(e.entry.healthScore.audits,l=>He((y(),b("span",{key:l.id,class:he(["audit-chip",l.score>=90?"audit-good":l.score>=50?"audit-warn":"audit-bad"])},[xe(M(l.name)+" ",1),u("b",null,M(l.score),1)],2)),[[r,e.auditTooltip(l)]])),128))])):le("",!0),e.recommendations.length>0?(y(),b("div",{key:1,class:he(["panel-body rec-list",{"rec-list--scroll":e.recommendations.length>3}])},[(y(!0),b(ve,null,Ce(e.recommendations,(l,c)=>(y(),b("div",{key:c,class:he(["rec",{"rec-clickable":l.messageIndex!=null}]),onClick:p=>l.messageIndex!=null&&s(l)},[u("i",{class:he(["rec-icon",[`sev-${l.severity}`,l.severity==="high"?"i-carbon-warning-alt":l.severity==="med"?"i-carbon-information":"i-carbon-checkmark"]])},null,2),u("div",qm,[u("div",Gm,M(l.title),1),u("div",Jm,M(l.detail),1)]),u("span",{class:he(["rec-impact",`sev-${l.severity}`])},M(l.impact),3)],10,Wm))),128))],2)):le("",!0)])):le("",!0)}}}),Xm=ct(Ym,[["__scopeId","data-v-f1490cbd"]]),Zm={key:0,class:"overview"},Qm={class:"narrative-copy"},eg={class:"narrative-title"},tg={class:"narrative-detail"},ng={class:"narrative-actions"},sg={class:"stats-grid"},og={class:"stat-detail"},ig={key:0,class:"stat-projection"},rg={key:1,class:"stat-projection stat-projection--warn"},lg={key:2,class:"stat-tape"},ag={key:3,class:"util-track"},cg={class:"stat-card"},ug={class:"stat-readout green"},dg={class:"stat-detail"},fg={class:"stat-card"},pg={class:"stat-readout"},hg={key:0,class:"stat-detail"},vg={key:0,class:"stat-card stat-card--health"},mg={class:"health-ring"},gg={width:"48",height:"48",viewBox:"0 0 48 48"},yg=["stroke","stroke-dasharray"],_g=["fill"],bg={key:1,class:"stat-card"},wg={class:"meta-row"},kg={key:0},xg={key:1},$g={key:2},Sg={key:1,class:"panel panel--secondary"},Tg={class:"panel-head"},Cg={class:"panel-sub"},Mg={class:"panel-body msg-preview"},Eg=["onClick"],Pg={class:"msg-group-name"},Ig={class:"msg-group-count"},Ag={class:"msg-group-tokens"},Lg={class:"msg-group-pct"},Og={class:"msg-group-bar"},Rg={key:2,class:"panel panel--secondary"},Dg={class:"panel-head"},Ng={class:"panel-sub"},Fg={class:"panel-body file-preview"},zg={class:"file-list"},Bg=["onClick"],Hg={class:"file-path"},jg={class:"file-dir"},Vg={class:"file-ops"},Ug={key:0,class:"file-op file-op--read"},Kg={key:1,class:"file-op file-op--write"},Wg={class:"file-tokens"},qg={class:"file-pct"},Gg={class:"file-bar"},Jg=et({__name:"OverviewTab",setup(e){const t=Lt(),n=A(()=>t.selectedEntry),s=A(()=>t.selectedSession),o=A(()=>s.value?[...s.value.entries].reverse():[]),i=A(()=>{const C=n.value;return!C||!C.contextLimit?0:C.contextInfo.totalTokens/C.contextLimit}),r=A(()=>{const C=i.value;return C>=.9?"var(--accent-red)":C>=.7?"var(--accent-amber)":"var(--accent-blue)"}),l=A(()=>{const C=n.value;if(!(C!=null&&C.usage))return null;const P=C.usage.inputTokens+C.usage.cacheReadTokens+C.usage.cacheWriteTokens;return P===0?null:C.usage.cacheReadTokens/P}),c=A(()=>Xt(o.value)),p=A(()=>rc(c.value)),d=A(()=>{const C=n.value;if(!C)return 0;const P=c.value,ee=P.findIndex(ne=>ne.entry.id===C.id);return ee<0?0:P.slice(0,ee+1).reduce((ne,$)=>ne+($.isMain?1:0),0)}),m=A(()=>{const C=n.value;if(!C)return[];const P=o.value,ee=c.value;return oc(C,P,ee)}),v=A(()=>{const C=n.value;if(!C)return null;const P=c.value,ee=P.findIndex(ne=>ne.entry.id===C.id);if(ee<0)return null;for(let ne=ee-1;ne>=0;ne--)if(P[ne].isMain)return P[ne].entry;return null}),w=A(()=>{const C=n.value,P=v.value;if(!C||!P)return[];const ee=new Map(P.composition.map(L=>[L.category,L.tokens])),ne=new Map(C.composition.map(L=>[L.category,L.tokens])),$=new Set([...ee.keys(),...ne.keys()]);return Array.from($).map(L=>{const G=ee.get(L)??0,k=ne.get(L)??0;return{category:L,delta:k-G}}).filter(L=>L.delta!==0).sort((L,G)=>Math.abs(G.delta)-Math.abs(L.delta))}),I=A(()=>{var $;const C=n.value;if(!(($=C==null?void 0:C.composition)!=null&&$.length))return null;const P=C.composition.reduce((L,G)=>L+G.tokens,0);if(P===0)return null;const ee={};for(const[L,G]of Object.entries(jn))for(const k of G)ee[k]=L;const ne=new Map;for(const L of C.composition){const G=ee[L.category]??L.category;ne.set(G,(ne.get(G)||0)+L.tokens)}return[...ne.entries()].sort((L,G)=>G[1]-L[1]).map(([L,G])=>{var k;return{key:L,color:((k=gt[L])==null?void 0:k.color)??"#475569",pct:G/P*100}})}),S=A(()=>{const C=n.value;return!C||c.value.length===0?null:ic(C,c.value)}),_=A(()=>{var C;return((C=n.value)==null?void 0:C.contextInfo.messages)||[]}),T=A(()=>sc(_.value)),z=A(()=>T.value.reduce((C,P)=>C+P.tokens,0)),K=A(()=>{var C;return((C=n.value)==null?void 0:C.contextInfo.totalTokens)??0}),V=A(()=>{const C=n.value;return C?nv({utilization:i.value,healthScore:C.healthScore,composition:C.composition,topDelta:w.value[0]??null}):null});function Q(C){t.setInspectorTab(C)}function D(){t.setInspectorTab("messages")}function ae(C,P=!0){D(),t.focusMessageCategory(C,P)}function ue(){D()}function O(C){D(),t.focusMessageTool("tool_results",C)}function R(C){C.messageIndex!=null&&(D(),t.focusMessageByIndex(C.messageIndex))}function de(C){if(!(/growth/i.test(C.id)||/growth/i.test(C.name)))return C.description;const ee=C.description||"";if(!/first turn/i.test(ee)||d.value<=1)return ee;const ne=n.value,$=v.value;if(!ne||!$||!ne.contextLimit)return ee;const L=ne.contextInfo.totalTokens-$.contextInfo.totalTokens,G=Math.abs(L),k=G/ne.contextLimit*100;return`Compared with previous main turn, context ${L>=0?"grew":"shrunk"} by ${_e(G)} (${k.toFixed(1)}% of limit).`}function F(C){return up(C)}function te(C){return dp(C)}function ce(C){return K.value>0?Math.round(C/K.value*100):0}function B(C){return K.value>0?`${C/K.value*100}%`:"0%"}const se=A(()=>{const C=s.value;if(!C||C.entries.length===0)return[];const P=C.workingDirectory;return ac(C.entries,P)}),oe=A(()=>se.value.reduce((C,P)=>C+P.tokens,0));function W(C){return oe.value>0?Math.round(C/oe.value*100):0}function re(C){return oe.value>0?`${C/oe.value*100}%`:"0%"}function we(C){D(),t.focusMessageFile(C)}function H(C){we(C)}return(C,P)=>{var ne;const ee=yn("tooltip");return n.value?(y(),b("div",Zm,[V.value?(y(),b("section",{key:0,class:he(["health-narrative",V.value.toneClass])},[u("div",Qm,[u("div",eg,M(V.value.headline),1),u("div",tg,M(V.value.detail),1)]),u("div",ng,[u("button",{class:"narrative-action",onClick:P[0]||(P[0]=$=>Q("messages"))},[...P[4]||(P[4]=[u("i",{class:"i-carbon-chat"},null,-1),xe(" Review Messages ",-1)])]),u("button",{class:"narrative-action",onClick:P[1]||(P[1]=$=>Q("timeline"))},[...P[5]||(P[5]=[u("i",{class:"i-carbon-activity"},null,-1),xe(" View Timeline ",-1)])])])],2)):le("",!0),u("div",sg,[u("div",{class:"stat-card stat-card--spine",style:Me({"--spine-color":r.value})},[u("div",{class:"stat-readout",style:Me({color:r.value})},M(Y(di)(i.value)),5),P[7]||(P[7]=u("div",{class:"stat-label"},"Context",-1)),u("div",og,M(Y(_e)(n.value.contextInfo.totalTokens))+" / "+M(Y(_e)(n.value.contextLimit)),1),p.value.turnsRemaining!==null&&p.value.turnsRemaining>0?He((y(),b("div",ig,[xe(" ~"+M(p.value.turnsRemaining)+" turns left ",1)])),[[ee,`Growing ~${Y(_e)(Math.round(p.value.growthPerTurn))}/turn over ${p.value.sinceCompaction} turns`]]):p.value.turnsRemaining===0?He((y(),b("div",rg,[...P[6]||(P[6]=[xe(" At limit ",-1)])])),[[ee,"Context window is at or near the limit"]]):le("",!0),I.value?(y(),b("div",lg,[(y(!0),b(ve,null,Ce(I.value,$=>(y(),b("div",{key:$.key,class:"stat-tape-seg",style:Me({flex:$.pct,background:$.color})},null,4))),128))])):(y(),b("div",ag,[u("div",{class:"util-fill",style:Me({width:Math.min(i.value*100,100)+"%",background:r.value})},null,4)]))],4),u("div",cg,[u("div",ug,M(Y(bt)(n.value.costUsd)),1),P[8]||(P[8]=u("div",{class:"stat-label"},"Turn cost",-1)),u("div",dg,M(Y(bt)(((ne=s.value)==null?void 0:ne.entries.reduce(($,L)=>$+(L.costUsd??0),0))??0))+" session",1)]),u("div",fg,[u("div",pg,M(n.value.usage?Y(_e)(n.value.usage.outputTokens):"—"),1),P[9]||(P[9]=u("div",{class:"stat-label"},"Output",-1)),n.value.timings?(y(),b("div",hg,M(Y(ui)(n.value.timings.total_ms)),1)):le("",!0)]),n.value.healthScore?(y(),b("div",vg,[u("div",mg,[(y(),b("svg",gg,[P[10]||(P[10]=u("circle",{cx:"24",cy:"24",r:"19",fill:"none",stroke:"var(--border-dim)","stroke-width":"3","stroke-dasharray":`${89.5} 30`,"stroke-linecap":"round",transform:"rotate(135 24 24)"},null,-1)),u("circle",{cx:"24",cy:"24",r:"19",fill:"none",stroke:Y(fi)(n.value.healthScore.rating),"stroke-width":"3","stroke-dasharray":`${89.5*(n.value.healthScore.overall/100)} ${119.4-89.5*(n.value.healthScore.overall/100)}`,"stroke-linecap":"round",transform:"rotate(135 24 24)",style:{transition:"stroke-dasharray 0.6s ease"}},null,8,yg),u("text",{x:"24",y:"25","text-anchor":"middle","dominant-baseline":"central",fill:Y(fi)(n.value.healthScore.rating),"font-family":"var(--font-display)","font-size":"13","font-weight":"700"},M(n.value.healthScore.overall),9,_g)]))]),P[11]||(P[11]=u("div",{class:"stat-label"},"Health",-1))])):(y(),b("div",bg,[...P[12]||(P[12]=[u("div",{class:"stat-readout dim"},"—",-1),u("div",{class:"stat-label"},"Health",-1)])]))]),u("div",wg,[u("span",null,M(n.value.contextInfo.messages.length)+" messages",1),l.value!==null?(y(),b("span",kg," cache "+M(Y(di)(l.value))+" hit ("+M(Y(_e)(n.value.usage.cacheReadTokens))+"r / "+M(Y(_e)(n.value.usage.cacheWriteTokens))+"w) ",1)):le("",!0),n.value.stopReason?(y(),b("span",xg,"stop: "+M(n.value.stopReason),1)):le("",!0),n.value.responseModel&&n.value.responseModel!==n.value.contextInfo.model?(y(),b("span",$g," model: "+M(n.value.responseModel),1)):le("",!0)]),Re(dm,{entry:n.value,"turn-num":d.value,onCategoryClick:P[2]||(P[2]=$=>ae($,!1)),onToolClick:O,onFileClick:H},null,8,["entry","turn-num"]),Re(Xm,{entry:n.value,recommendations:m.value,"audit-tooltip":de,onRecommendationClick:R},null,8,["entry","recommendations"]),Re(cc,{"diff-data":S.value,"current-entry":n.value,"previous-entry":v.value,"show-tapes":!0,"hide-unchanged":!0,"summary-mode":"combined","delta-tone":"bad",onCategoryClick:P[3]||(P[3]=$=>ae($,!1))},null,8,["diff-data","current-entry","previous-entry"]),T.value.length?(y(),b("section",Sg,[u("div",Tg,[P[13]||(P[13]=u("span",{class:"panel-title"},"Messages",-1)),u("span",Cg,M(_.value.length)+" messages · "+M(Y(_e)(z.value)),1)]),u("div",Mg,[(y(!0),b(ve,null,Ce(T.value,$=>(y(),b("div",{key:$.category,class:"msg-group-row",onClick:L=>ae($.category,!1)},[u("span",{class:"msg-group-dot",style:Me({background:te($.category)})},null,4),u("span",Pg,M(F($.category)),1),u("span",Ig,M($.items.length),1),u("span",Ag,M(Y(_e)($.tokens)),1),u("span",Lg,M(ce($.tokens))+"%",1),u("div",Og,[u("div",{class:"msg-group-bar-fill",style:Me({width:B($.tokens),background:te($.category)})},null,4)])],8,Eg))),128)),u("button",{class:"msg-view-all",onClick:ue},"View all messages ›")])])):le("",!0),se.value.length>0?(y(),b("section",Rg,[u("div",Dg,[P[14]||(P[14]=u("span",{class:"panel-title"},"Files",-1)),u("span",Ng,M(se.value.length)+" files · "+M(Y(_e)(oe.value)),1)]),u("div",Fg,[u("div",zg,[(y(!0),b(ve,null,Ce(se.value,($,L)=>(y(),b("div",{key:$.path,class:"file-row",onClick:G=>we($.path)},[u("span",{class:"file-dot",style:Me({background:Y(vi)(L)})},null,4),He((y(),b("span",Hg,[u("span",jg,M(Y(Qr)($.path)?Y(Qr)($.path)+"/":""),1),xe(M(Y(Hi)($.path)),1)])),[[ee,$.path]]),u("span",Vg,[$.reads>0?He((y(),b("span",Ug,[xe(M($.reads)+"r",1)])),[[ee,`${$.reads} read${$.reads>1?"s":""}`]]):le("",!0),$.writes>0?He((y(),b("span",Kg,[xe(M($.writes)+"w",1)])),[[ee,`${$.writes} write/edit${$.writes>1?"s":""}`]]):le("",!0)]),u("span",Wg,M(Y(_e)($.tokens)),1),u("span",qg,M(W($.tokens))+"%",1),u("div",Gg,[u("div",{class:"file-bar-fill",style:Me({width:re($.tokens),background:Y(vi)(L)})},null,4)])],8,Bg))),128))])])])):le("",!0)])):le("",!0)}}}),Yg=ct(Jg,[["__scopeId","data-v-ab5256cd"]]),Xg={__name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],setup(e,{emit:t}){const n=t,s=e,o=Mu(),i=me([]),r=A(()=>i.value.reduce(($,L)=>($[~~L.id]=L)&&$,{})),l=A(()=>i.value.length),c=me(null),p=me(!1),d=me({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),m=me({splitter:null,timeoutId:null}),v=A(()=>({[`splitpanes splitpanes--${s.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":d.value.dragging})),w=()=>{document.addEventListener("mousemove",_,{passive:!1}),document.addEventListener("mouseup",T),"ontouchstart"in window&&(document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",T))},I=()=>{document.removeEventListener("mousemove",_,{passive:!1}),document.removeEventListener("mouseup",T),"ontouchstart"in window&&(document.removeEventListener("touchmove",_,{passive:!1}),document.removeEventListener("touchend",T))},S=($,L)=>{const G=$.target.closest(".splitpanes__splitter");if(G){const{left:k,top:g}=G.getBoundingClientRect(),{clientX:h,clientY:a}="ontouchstart"in window&&$.touches?$.touches[0]:$;d.value.cursorOffset=s.horizontal?a-g:h-k}w(),d.value.mouseDown=!0,d.value.activeSplitter=L},_=$=>{d.value.mouseDown&&($.preventDefault(),d.value.dragging=!0,requestAnimationFrame(()=>{ae(Q($)),n("resize",i.value.map(L=>({min:L.min,max:L.max,size:L.size})))}))},T=()=>{d.value.dragging&&n("resized",i.value.map($=>({min:$.min,max:$.max,size:$.size}))),d.value.mouseDown=!1,setTimeout(()=>{d.value.dragging=!1,I()},100)},z=($,L)=>{"ontouchstart"in window&&($.preventDefault(),s.dblClickSplitter&&(m.value.splitter===L?(clearTimeout(m.value.timeoutId),m.value.timeoutId=null,K($,L),m.value.splitter=null):(m.value.splitter=L,m.value.timeoutId=setTimeout(()=>m.value.splitter=null,500)))),d.value.dragging||n("splitter-click",i.value[L])},K=($,L)=>{let G=0;i.value=i.value.map((k,g)=>(k.size=g===L?k.max:k.min,g!==L&&(G+=k.min),k)),i.value[L].size-=G,n("pane-maximize",i.value[L]),n("resized",i.value.map(k=>({min:k.min,max:k.max,size:k.size})))},V=($,L)=>{n("pane-click",r.value[L])},Q=$=>{const L=c.value.getBoundingClientRect(),{clientX:G,clientY:k}="ontouchstart"in window&&$.touches?$.touches[0]:$;return{x:G-(s.horizontal?0:d.value.cursorOffset)-L.left,y:k-(s.horizontal?d.value.cursorOffset:0)-L.top}},D=$=>{$=$[s.horizontal?"y":"x"];const L=c.value[s.horizontal?"clientHeight":"clientWidth"];return s.rtl&&!s.horizontal&&($=L-$),$*100/L},ae=$=>{const L=d.value.activeSplitter;let G={prevPanesSize:O(L),nextPanesSize:R(L),prevReachedMinPanes:0,nextReachedMinPanes:0};const k=0+(s.pushOtherPanes?0:G.prevPanesSize),g=100-(s.pushOtherPanes?0:G.nextPanesSize),h=Math.max(Math.min(D($),g),k);let a=[L,L+1],f=i.value[a[0]]||null,E=i.value[a[1]]||null;const q=f.max<100&&h>=f.max+G.prevPanesSize,N=E.max<100&&h<=100-(E.max+R(L+1));if(q||N){q?(f.size=f.max,E.size=Math.max(100-f.max-G.prevPanesSize-G.nextPanesSize,0)):(f.size=Math.max(100-E.max-G.prevPanesSize-R(L+1),0),E.size=E.max);return}if(s.pushOtherPanes){const J=ue(G,h);if(!J)return;({sums:G,panesToResize:a}=J),f=i.value[a[0]]||null,E=i.value[a[1]]||null}f!==null&&(f.size=Math.min(Math.max(h-G.prevPanesSize-G.prevReachedMinPanes,f.min),f.max)),E!==null&&(E.size=Math.min(Math.max(100-h-G.nextPanesSize-G.nextReachedMinPanes,E.min),E.max))},ue=($,L)=>{const G=d.value.activeSplitter,k=[G,G+1];return L<$.prevPanesSize+i.value[k[0]].min&&(k[0]=de(G).index,$.prevReachedMinPanes=0,k[0]<G&&i.value.forEach((g,h)=>{h>k[0]&&h<=G&&(g.size=g.min,$.prevReachedMinPanes+=g.min)}),$.prevPanesSize=O(k[0]),k[0]===void 0)?($.prevReachedMinPanes=0,i.value[0].size=i.value[0].min,i.value.forEach((g,h)=>{h>0&&h<=G&&(g.size=g.min,$.prevReachedMinPanes+=g.min)}),i.value[k[1]].size=100-$.prevReachedMinPanes-i.value[0].min-$.prevPanesSize-$.nextPanesSize,null):L>100-$.nextPanesSize-i.value[k[1]].min&&(k[1]=F(G).index,$.nextReachedMinPanes=0,k[1]>G+1&&i.value.forEach((g,h)=>{h>G&&h<k[1]&&(g.size=g.min,$.nextReachedMinPanes+=g.min)}),$.nextPanesSize=R(k[1]-1),k[1]===void 0)?($.nextReachedMinPanes=0,i.value.forEach((g,h)=>{h<l.value-1&&h>=G+1&&(g.size=g.min,$.nextReachedMinPanes+=g.min)}),i.value[k[0]].size=100-$.prevPanesSize-R(k[0]-1),null):{sums:$,panesToResize:k}},O=$=>i.value.reduce((L,G,k)=>L+(k<$?G.size:0),0),R=$=>i.value.reduce((L,G,k)=>L+(k>$+1?G.size:0),0),de=$=>[...i.value].reverse().find(L=>L.index<$&&L.size>L.min)||{},F=$=>i.value.find(L=>L.index>$+1&&L.size>L.min)||{},te=()=>{var $;Array.from((($=c.value)==null?void 0:$.children)||[]).forEach(L=>{const G=L.classList.contains("splitpanes__pane"),k=L.classList.contains("splitpanes__splitter");!G&&!k&&(L.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},ce=($,L,G=!1)=>{const k=$-1,g=document.createElement("div");g.classList.add("splitpanes__splitter"),G||(g.onmousedown=h=>S(h,k),typeof window<"u"&&"ontouchstart"in window&&(g.ontouchstart=h=>S(h,k)),g.onclick=h=>z(h,k+1)),s.dblClickSplitter&&(g.ondblclick=h=>K(h,k+1)),L.parentNode.insertBefore(g,L)},B=$=>{$.onmousedown=void 0,$.onclick=void 0,$.ondblclick=void 0,$.remove()},se=()=>{var $;const L=Array.from((($=c.value)==null?void 0:$.children)||[]);L.forEach(k=>{k.className.includes("splitpanes__splitter")&&B(k)});let G=0;L.forEach(k=>{k.className.includes("splitpanes__pane")&&(!G&&s.firstSplitter?ce(G,k,!0):G&&ce(G,k),G++)})},oe=({uid:$,...L})=>{const G=r.value[$];Object.entries(L).forEach(([k,g])=>G[k]=g)},W=$=>{var L;let G=-1;Array.from(((L=c.value)==null?void 0:L.children)||[]).some(k=>(k.className.includes("splitpanes__pane")&&G++,k.isSameNode($.el))),i.value.splice(G,0,{...$,index:G}),i.value.forEach((k,g)=>k.index=g),p.value&&Ke(()=>{se(),we({addedPane:i.value[G]}),n("pane-add",{index:G,panes:i.value.map(k=>({min:k.min,max:k.max,size:k.size}))})})},re=$=>{const L=i.value.findIndex(k=>k.id===$),G=i.value.splice(L,1)[0];i.value.forEach((k,g)=>k.index=g),Ke(()=>{se(),we({removedPane:{...G}}),n("pane-remove",{removed:G,panes:i.value.map(k=>({min:k.min,max:k.max,size:k.size}))})})},we=($={})=>{!$.addedPane&&!$.removedPane?C():i.value.some(L=>L.givenSize!==null||L.min||L.max<100)?P($):H(),p.value&&n("resized",i.value.map(L=>({min:L.min,max:L.max,size:L.size})))},H=()=>{const $=100/l.value;let L=0;const G=[],k=[];i.value.forEach(g=>{g.size=Math.max(Math.min($,g.max),g.min),L-=g.size,g.size>=g.max&&G.push(g.id),g.size<=g.min&&k.push(g.id)}),L>.1&&ee(L,G,k)},C=()=>{let $=100;const L=[],G=[];let k=0;i.value.forEach(h=>{$-=h.size,h.givenSize!==null&&k++,h.size>=h.max&&L.push(h.id),h.size<=h.min&&G.push(h.id)});let g=100;$>.1&&(i.value.forEach(h=>{h.givenSize===null&&(h.size=Math.max(Math.min($/(l.value-k),h.max),h.min)),g-=h.size}),g>.1&&ee(g,L,G))},P=({addedPane:$,removedPane:L}={})=>{let G=100/l.value,k=0;const g=[],h=[];(($==null?void 0:$.givenSize)??null)!==null&&(G=(100-$.givenSize)/(l.value-1).value),i.value.forEach(a=>{k-=a.size,a.size>=a.max&&g.push(a.id),a.size<=a.min&&h.push(a.id)}),!(Math.abs(k)<.1)&&(i.value.forEach(a=>{($==null?void 0:$.givenSize)!==null&&($==null?void 0:$.id)===a.id||(a.size=Math.max(Math.min(G,a.max),a.min)),k-=a.size,a.size>=a.max&&g.push(a.id),a.size<=a.min&&h.push(a.id)}),k>.1&&ee(k,g,h))},ee=($,L,G)=>{let k;$>0?k=$/(l.value-L.length):k=$/(l.value-G.length),i.value.forEach((g,h)=>{if($>0&&!L.includes(g.id)){const a=Math.max(Math.min(g.size+k,g.max),g.min),f=a-g.size;$-=f,g.size=a}else if(!G.includes(g.id)){const a=Math.max(Math.min(g.size+k,g.max),g.min),f=a-g.size;$-=f,g.size=a}}),Math.abs($)>.1&&Ke(()=>{p.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})};We(()=>s.firstSplitter,()=>se()),We(()=>s.dblClickSplitter,$=>{[...c.value.querySelectorAll(".splitpanes__splitter")].forEach((L,G)=>{L.ondblclick=$?k=>K(k,G):void 0})}),po(()=>p.value=!1),En(()=>{te(),se(),we(),n("ready"),p.value=!0});const ne=()=>{var $;return Ri("div",{ref:c,class:v.value},($=o.default)==null?void 0:$.call(o))};return on("panes",i),on("indexedPanes",r),on("horizontal",A(()=>s.horizontal)),on("requestUpdate",oe),on("onPaneAdd",W),on("onPaneRemove",re),on("onPaneClick",V),($,L)=>(y(),ft(Xl(ne)))}},sl={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){var t;const n=e,s=$t("requestUpdate"),o=$t("onPaneAdd"),i=$t("horizontal"),r=$t("onPaneRemove"),l=$t("onPaneClick"),c=(t=Es())==null?void 0:t.uid,p=$t("indexedPanes"),d=A(()=>p.value[c]),m=me(null),v=A(()=>{const _=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(_,I.value),w.value)}),w=A(()=>{const _=parseFloat(n.minSize);return isNaN(_)?0:_}),I=A(()=>{const _=parseFloat(n.maxSize);return isNaN(_)?100:_}),S=A(()=>{var _;return`${i.value?"height":"width"}: ${(_=d.value)==null?void 0:_.size}%`});return En(()=>{o({id:c,el:m.value,min:w.value,max:I.value,givenSize:n.size===void 0?null:v.value,size:v.value})}),We(()=>v.value,_=>s({uid:c,size:_})),We(()=>w.value,_=>s({uid:c,min:_})),We(()=>I.value,_=>s({uid:c,max:_})),po(()=>r(c)),(_,T)=>(y(),b("div",{ref_key:"paneEl",ref:m,class:"splitpanes__pane",onClick:T[0]||(T[0]=z=>Y(l)(z,_._.uid)),style:Me(S.value)},[vs(_.$slots,"default")],4))}};function Zg(){const e=Cs(new Set);function t(r){e.has(r)?e.delete(r):e.add(r)}function n(r){return e.has(r)}function s(r){e.add(r)}function o(r){e.delete(r)}function i(){e.clear()}return{expanded:e,toggle:t,isExpanded:n,expand:s,collapse:o,collapseAll:i}}const Qg="modulepreload",ey=function(e){return"/"+e},ol={},Ne=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){let r=function(p){return Promise.all(p.map(d=>Promise.resolve(d).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=r(n.map(p=>{if(p=ey(p),p in ol)return;ol[p]=!0;const d=p.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const v=document.createElement("link");if(v.rel=d?"stylesheet":Qg,d||(v.as="script"),v.crossOrigin="",v.href=p,c&&v.setAttribute("nonce",c),document.head.appendChild(v),d)return new Promise((w,I)=>{v.addEventListener("load",w),v.addEventListener("error",()=>I(new Error(`Unable to preload CSS for ${p}`)))})}))}function i(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return o.then(r=>{for(const l of r||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},ty={class:"detail-header"},ny={class:"header-top"},sy={class:"nav-btns"},oy=["disabled"],iy=["disabled"],ry={key:0,class:"header-meta"},ly={class:"detail-tabs"},ay={key:0,class:"block-sep"},cy=["innerHTML"],uy={class:"raw-header"},dy=["innerHTML"],fy={class:"detail-footer"},py={class:"meta-key"},hy=["title"],il=5e4,rl=500,vy=2e4,my=450,gy=et({__name:"DetailPane",props:{entry:{},messages:{},selectedIndex:{}},emits:["close","navigate"],setup(e,{emit:t}){const n=e,s=t,o=me("rendered"),i=me(!1),r=me(null);let l=null,c=null;const p=new Map,d=new Set,m=me(0),v=A(()=>{var k;return((k=n.messages[n.selectedIndex])==null?void 0:k.msg)??null}),w=A(()=>xo(n.entry.contextInfo.messages||[])),I=A(()=>{const k=v.value;if(!k)return"";const g=Tt(k);let a=(Xe[g]||{label:g}).label;if(k.contentBlocks)for(const f of k.contentBlocks){if(f.type==="tool_use"){a=`Tool Call — ${f.name||"unknown"}`;break}if(f.type==="tool_result"){const q=f.tool_use_id?w.value[f.tool_use_id]:null;a=`Tool Result${q?" — "+q:""}`;break}if(f.type==="thinking"){a="Thinking";break}}return a}),S=A(()=>{if(!v.value)return"";const k=Tt(v.value);return(Xe[k]||{color:"#4b5563"}).color}),_=A(()=>!v.value||!n.entry.contextInfo.totalTokens?"0":((v.value.tokens||0)/n.entry.contextInfo.totalTokens*100).toFixed(1)),T=A(()=>n.selectedIndex>0),z=A(()=>n.selectedIndex<n.messages.length-1);We(()=>n.selectedIndex,()=>{o.value="rendered",i.value=!1,Ke(()=>{r.value&&(r.value.scrollTop=0)}),Ke(()=>{$()})}),We([o,i],()=>{Ke(()=>{$()})}),We(v,()=>{Ke(()=>{$()})},{immediate:!0});function K(k){const g=n.selectedIndex+k;g>=0&&g<n.messages.length&&s("navigate",g)}function V(k){k.key==="Escape"&&(s("close"),k.preventDefault()),(k.key==="ArrowUp"||k.key==="k")&&(K(-1),k.preventDefault()),(k.key==="ArrowDown"||k.key==="j")&&(K(1),k.preventDefault())}const Q=me("Copy");async function D(){if(!v.value)return;const k=o.value==="raw"?JSON.stringify(jo(v.value),null,2):fp(v.value);await navigator.clipboard.writeText(k),Q.value="Copied!",setTimeout(()=>{Q.value="Copy"},1500)}function ae(k){if(i.value)return{text:k,truncated:!1};if(k.length>il)return{text:k.slice(0,il),truncated:!0};const g=k.split(`
29
+ `);return g.length>rl?{text:g.slice(0,rl).join(`
30
+ `),truncated:!0}:{text:k,truncated:!1}}function ue(k){let g=2166136261;for(let h=0;h<k.length;h++)g^=k.charCodeAt(h),g=Math.imul(g,16777619);return(g>>>0).toString(36)}function O(k){return k.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function R(k,g,h){let a="",f=0;g.lastIndex=0;let E=g.exec(k);for(;E;){const q=E.index,N=E[0];a+=O(k.slice(f,q)),a+=h(N,q),f=q+N.length,E=g.exec(k)}return a+=O(k.slice(f)),a}function de(k){return R(k,/"(?:\\.|[^"\\])*"(?=\s*:)?|"(?:\\.|[^"\\])*"|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,(h,a)=>{if(h.startsWith('"')){const f=k.slice(a+h.length);return`<span class="${/^\s*:/.test(f)?"syn-key":"syn-str"}">${O(h)}</span>`}return h==="true"||h==="false"?`<span class="syn-bool">${h}</span>`:h==="null"?`<span class="syn-null">${h}</span>`:`<span class="syn-num">${h}</span>`})}function F(k){return R(k,/<!--[\s\S]*?-->|<\/?[\w:.-]+(?:\s+[\w:.-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'))?)*\s*\/?>/g,h=>{if(h.startsWith("<!--"))return`<span class="syn-com">${O(h)}</span>`;const a=/^<(\/?)([\w:.-]+)([\s\S]*?)(\/?)>$/.exec(h);if(!a)return`<span class="syn-tag">${O(h)}</span>`;const f=a[1]?"/":"",E=a[2],q=a[3]||"",N=a[4]?"/":"";let J="";const pe=/([\w:.-]+)(\s*=\s*)(".*?"|'.*?')/g;let fe=0,ie=pe.exec(q);for(;ie;)J+=O(q.slice(fe,ie.index)),J+=`<span class="syn-attr">${O(ie[1])}</span>`,J+=O(ie[2]),J+=`<span class="syn-str">${O(ie[3])}</span>`,fe=ie.index+ie[0].length,ie=pe.exec(q);return J+=O(q.slice(fe)),`<span class="syn-punc">&lt;${f}</span><span class="syn-tag">${O(E)}</span>${J}<span class="syn-punc">${N}&gt;</span>`})}function te(k){return R(k,/```[\s\S]*?```|`[^`\n]+`|^#{1,6}\s.+$|^\s*[-*+]\s.+$|^\s*\d+\.\s.+$|^>\s.+$|\*\*[^*\n]+\*\*|__[^_\n]+__|\*[^*\n]+\*|_[^_\n]+_|~~[^~\n]+~~|\[[^\]]+\]\([^)]+\)/gm,h=>h.startsWith("```")||h.startsWith("`")?`<span class="syn-code">${O(h)}</span>`:h.startsWith("#")?`<span class="syn-heading">${O(h)}</span>`:/^\s*[-*+]\s/.test(h)||/^\s*\d+\.\s/.test(h)?`<span class="syn-list">${O(h)}</span>`:h.startsWith(">")?`<span class="syn-quote">${O(h)}</span>`:h.startsWith("[")?`<span class="syn-link">${O(h)}</span>`:`<span class="syn-em">${O(h)}</span>`)}function ce(k){return R(k,/\/\/.*$|\/\*[\s\S]*?\*\/|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`|\b(?:const|let|var|function|return|if|else|for|while|switch|case|break|continue|try|catch|finally|class|extends|new|import|from|export|async|await|interface|type|public|private|protected|throw|in|of|typeof|instanceof|true|false|null|undefined)\b|-?\d+(?:\.\d+)?/gm,h=>h.startsWith("//")||h.startsWith("/*")?`<span class="syn-com">${O(h)}</span>`:h.startsWith('"')||h.startsWith("'")||h.startsWith("`")?`<span class="syn-str">${O(h)}</span>`:/^-?\d/.test(h)?`<span class="syn-num">${h}</span>`:h==="true"||h==="false"?`<span class="syn-bool">${h}</span>`:h==="null"||h==="undefined"?`<span class="syn-null">${h}</span>`:`<span class="syn-keyword">${h}</span>`)}function B(k){const g=k.trim();if(!(g.startsWith("{")||g.startsWith("[")))return!1;try{return JSON.parse(g),!0}catch{return!1}}function se(k){const g=k.trim();return g.startsWith("<")?/<[\w:.-]+[\s>]/.test(g)&&/<\/[\w:.-]+>/.test(g):!1}function oe(k){return/(^#{1,6}\s)|(^\s*[-*+]\s)|(^\s*\d+\.\s)|(```)|(`[^`\n]+`)|(\[[^\]]+\]\([^)]+\))|(^>\s)|(\*\*[^*\n]+\*\*)/m.test(k)}function W(k){return/[{}();]|(^\s*(const|let|var|function|if|for|while|class|import|export)\s)/m.test(k)}function re(k,g=!1){return g||B(k)?"json":se(k)?"xml":oe(k)?"markdown":W(k)?"code":"text"}function we(k,g=!1){const h=re(k,g);return h==="json"?de(k):h==="xml"?F(k):h==="markdown"?te(k):h==="code"?ce(k):O(k)}function H(k){return k==="json"?"json":k==="xml"?"xml":k==="markdown"?"markdown":k==="code"?"typescript":null}function C(k,g){return!(g==="text"||k.length>vy||k.split(`
31
+ `).length>my)}async function P(){if(!l){if(c)return c;c=(async()=>{const{createHighlighterCore:k}=await Ne(async()=>{const{createHighlighterCore:h}=await import("./core-IjjuPsJe.js");return{createHighlighterCore:h}},[]),{createOnigurumaEngine:g}=await Ne(async()=>{const{createOnigurumaEngine:h}=await import("./engine-oniguruma-KVl37NQr.js");return{createOnigurumaEngine:h}},[]);l=await k({engine:g(Ne(()=>import("./wasm-CG6Dc4jp.js"),[])),themes:[Ne(()=>import("./github-dark-DHJKELXO.js"),[])],langs:[Ne(()=>import("./json-Cp-IABpG.js"),[]),Ne(()=>import("./jsonc-Des-eS-w.js"),[]),Ne(()=>import("./yaml-Buea-lGh.js"),[]),Ne(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([0,1])),Ne(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([2,3,4])),Ne(()=>import("./css-DPfMkruS.js"),[]),Ne(()=>import("./markdown-Cvjx9yec.js"),[]),Ne(()=>import("./typescript-BPQ3VLAy.js"),[]),Ne(()=>import("./javascript-wDzz0qaB.js"),[]),Ne(()=>import("./jsx-g9-lgVsj.js"),[]),Ne(()=>import("./tsx-COt5Ahok.js"),[]),Ne(()=>import("./python-B6aJPvgy.js"),[]),Ne(()=>import("./shellscript-Yzrsuije.js"),[]),Ne(()=>import("./sql-BLtJtn59.js"),[]),Ne(()=>import("./diff-D97Zzqfu.js"),[]),Ne(()=>import("./toml-vGWfd6FD.js"),[]),Ne(()=>import("./rust-B1yitclQ.js"),[]),Ne(()=>import("./go-CxLEBnE3.js"),[]),Ne(()=>import("./c-BIGW1oBm.js"),[]),Ne(()=>import("./cpp-BRuaLJcg.js"),__vite__mapDeps([5,6,7])),Ne(()=>import("./java-CylS5w8V.js"),[]),Ne(()=>import("./ruby-CkRbH_-r.js"),__vite__mapDeps([8,2,3,4,0,1,7,9,10,11,12,5,6,13,14])),Ne(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([15,2,3,4,0,1,7,16])),Ne(()=>import("./swift-Dg5xB15N.js"),[]),Ne(()=>import("./kotlin-BdnUsdx6.js"),[]),Ne(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([9,3,10,11,12])),Ne(()=>import("./dockerfile-BcOcwvcX.js"),[])]})})(),await c}}async function ee(k,g,h){if(!C(k,g)||p.has(h)||d.has(h))return;const a=H(g);if(a){d.add(h);try{if(await P(),!l)return;const f=l.codeToHtml(k,{lang:a,theme:"github-dark"});p.set(h,f),m.value+=1}catch{}finally{d.delete(h)}}}function ne(k,g=!1){m.value;const h=re(k,g),a=`${h}:${ue(k)}`;if(C(k,h)){const f=p.get(a);if(f)return f;ee(k,h,a)}return we(k,g)}function $(){const k=v.value;if(!k)return;if(o.value==="raw"){const h=JSON.stringify(jo(k),null,2),a=ae(h).text,f=re(a,!0);ee(a,f,`${f}:${ue(a)}`);return}const g=L();for(const h of g){const a=ae(h.content).text,f=re(a,h.isJson);ee(a,f,`${f}:${ue(a)}`)}}function L(){const k=v.value;if(!k)return[];const g=k.contentBlocks;return g&&g.length>0?g.map(h=>{if(h.type==="tool_use"){const f=h.input?JSON.stringify(h.input,null,2):"{}";return{type:"tool_use",label:`tool_use: ${h.name||"?"}`,labelClass:"lbl-tool-use",content:f,isJson:!0}}if(h.type==="tool_result"){const f=h.tool_use_id?w.value[h.tool_use_id]:null,E=typeof h.content=="string"?h.content:JSON.stringify(h.content,null,2);return{type:"tool_result",label:`tool_result${f?": "+f:""}`,labelClass:"lbl-tool-result",content:E,isJson:!1}}const a=h;return a.type==="thinking"?{type:"thinking",label:"thinking",labelClass:"lbl-thinking",content:a.thinking||a.text||"",isJson:!1}:h.type==="text"||h.type==="input_text"?{type:h.type,label:h.type,labelClass:"lbl-text",content:h.text||"",isJson:!1}:h.type==="image"?{type:"image",label:"image",labelClass:"lbl-image",content:"[Image content]",isJson:!1}:{type:"unknown",label:"block",labelClass:"lbl-text",content:`[Unknown block type: ${h.type||"unspecified"}]`,isJson:!1}}):[{type:"text",label:"",labelClass:"",content:k.content||"",isJson:!1}]}const G=A(()=>{const k=v.value;if(!k)return[];const g=[["Role",k.role],["Tokens",_e(k.tokens||0)],["% context",_.value+"%"],["Model",n.entry.contextInfo.model||"?"]];if(k.contentBlocks){for(const h of k.contentBlocks)if(h.type==="tool_use"&&(g.push(["tool_use_id",h.id||"?"]),g.push(["tool_name",h.name||"?"])),h.type==="tool_result"&&h.tool_use_id){g.push(["tool_use_id",h.tool_use_id]);const a=w.value[h.tool_use_id];a&&g.push(["tool_name",a])}}return g.push(["Position",`${n.selectedIndex+1} / ${n.messages.length}`]),g});return(k,g)=>{const h=yn("tooltip");return y(),b("div",{class:"detail",tabindex:"0",onKeydown:V},[u("div",ty,[u("div",ny,[u("span",{class:"detail-title",style:Me({color:S.value})},M(I.value),5),u("div",sy,[He((y(),b("button",{disabled:!T.value,onClick:g[0]||(g[0]=a=>K(-1))},[...g[6]||(g[6]=[u("i",{class:"i-carbon-chevron-up"},null,-1)])],8,oy)),[[h,"↑ Previous"]]),He((y(),b("button",{disabled:!z.value,onClick:g[1]||(g[1]=a=>K(1))},[...g[7]||(g[7]=[u("i",{class:"i-carbon-chevron-down"},null,-1)])],8,iy)),[[h,"↓ Next"]])]),He((y(),b("button",{class:"close-btn",onClick:g[2]||(g[2]=a=>k.$emit("close"))},[...g[8]||(g[8]=[u("i",{class:"i-carbon-close"},null,-1)])])),[[h,"Close (Esc)"]])]),v.value?(y(),b("div",ry,[u("span",null,[u("b",null,M(v.value.role),1)]),u("span",null,M(Y(_e)(v.value.tokens||0))+" tok",1),u("span",null,M(_.value)+"%",1),u("span",null,M(e.selectedIndex+1)+"/"+M(e.messages.length),1)])):le("",!0)]),u("div",ly,[u("button",{class:he({on:o.value==="rendered"}),onClick:g[3]||(g[3]=a=>o.value="rendered")},"Rendered",2),u("button",{class:he({on:o.value==="raw"}),onClick:g[4]||(g[4]=a=>o.value="raw")},"Raw",2)]),u("div",{ref_key:"contentEl",ref:r,class:"detail-body"},[o.value==="rendered"&&v.value?(y(!0),b(ve,{key:0},Ce(L(),(a,f)=>(y(),b(ve,{key:f},[f>0?(y(),b("hr",ay)):le("",!0),a.label?(y(),b("div",{key:1,class:he(["block-label",a.labelClass])},M(a.label),3)):le("",!0),u("div",{class:he(["block-content syntax rich-html",`kind-${re(ae(a.content).text,a.isJson)}`]),innerHTML:ne(ae(a.content).text,a.isJson)},null,10,cy),ae(a.content).truncated?(y(),b("button",{key:2,class:"show-more",onClick:g[5]||(g[5]=E=>i.value=!0)}," Show full content… ")):le("",!0)],64))),128)):o.value==="raw"&&v.value?(y(),b(ve,{key:1},[u("div",uy,[u("button",{class:he(["copy-btn",{copied:Q.value==="Copied!"}]),onClick:D},[g[9]||(g[9]=u("i",{class:"i-carbon-copy"},null,-1)),xe(" "+M(Q.value),1)],2)]),u("div",{class:"block-content syntax rich-html kind-json",innerHTML:ne(JSON.stringify(Y(jo)(v.value),null,2),!0)},null,8,dy)],64)):le("",!0)],512),u("div",fy,[g[10]||(g[10]=u("div",{class:"meta-header"},"Metadata",-1)),(y(!0),b(ve,null,Ce(G.value,([a,f])=>(y(),b(ve,{key:a},[u("span",py,M(a),1),u("span",{class:"meta-val",title:f},M(f),9,hy)],64))),128))])],32)}}}),yy=ct(gy,[["__scopeId","data-v-b695512a"]]),_y={class:"msg-toolbar"},by={class:"message-view-toggle"},wy={key:0,class:"message-view-toggle agent-toggle"},ky={key:0,class:"heavy-strip"},xy={class:"heavy-actions"},$y=["onClick"],Sy={class:"heavy-category"},Ty={class:"heavy-preview"},Cy={class:"heavy-tokens"},My={key:1,class:"focus-strip"},Ey={key:0},Py={key:1},Iy=["data-category"],Ay=["onClick"],Ly={class:"group-name"},Oy={class:"group-stats"},Ry={class:"group-bar-track"},Dy=["data-tool-name","onClick"],Ny={class:"msg-role"},Fy={class:"msg-preview"},zy={key:0,class:"focus-strip"},By={class:"focus-file-name"},Hy={class:"focus-file-count"},jy={class:"chrono-list"},Vy=["onClick"],Uy={class:"chrono-gutter subagent-gutter"},Ky={class:"chrono-preview subagent-preview"},Wy={class:"chrono-tok subagent-model"},qy={class:"chrono-turn-label"},Gy={key:2,class:"chrono-future-sep"},Jy=["onClick"],Yy={class:"chrono-gutter"},Xy={class:"chrono-type"},Zy={class:"chrono-preview"},Qy=et({__name:"MessagesTab",setup(e){const t=Lt(),n=A(()=>t.selectedEntry),s=A(()=>t.selectedSession),{isExpanded:o,toggle:i,expand:r}=Zg(),l=me(null),c=me("chrono"),p=me(!1),d=me(0),m=me(null),v=me(1),w=me(null),I=me([]),S=me(0),_=A(()=>xo(z.value)),T=A(()=>{const U=s.value;return!U||U.entries.length<=1?!1:Xt([...U.entries].reverse()).some(ye=>!ye.isMain)}),z=A(()=>{var j;if(!n.value)return[];t.entryDetailVersion;const U=t.getEntryDetail(n.value.id);return(j=U==null?void 0:U.messages)!=null&&j.length?U.messages:n.value.contextInfo.messages||[]}),K=A(()=>!s.value||s.value.entries.length===0?null:s.value.entries[0]),V=A(()=>{var j;if(!K.value)return[];t.entryDetailVersion;const U=t.getEntryDetail(K.value.id);return(j=U==null?void 0:U.messages)!=null&&j.length?U.messages:K.value.contextInfo.messages||[]}),Q=A(()=>z.value.length),D=A(()=>t.selectionMode!=="pinned"?!1:V.value.length>Q.value),ae=A(()=>{if(!D.value)return z.value.map((j,ye)=>({msg:j,origIdx:ye,future:!1}));const U=[];for(let j=0;j<z.value.length;j++)U.push({msg:z.value[j],origIdx:j,future:!1});for(let j=z.value.length;j<V.value.length;j++)U.push({msg:V.value[j],origIdx:j,future:!0});return U}),ue=A(()=>{const U=ae.value,j=new Set;U.length>0&&j.add(0);let ye=!1;for(let x=0;x<U.length;x++){const X=U[x].msg.role;X==="assistant"?ye=!0:X==="user"&&ye&&(j.add(x),ye=!1)}return j}),O=A(()=>{const U=s.value,j=n.value;if(!U||!j||t.messagesMode!=="all")return new Map;const ye=Xt([...U.entries].reverse()),x=[],X=[];let be=[];for(const De of ye)De.isMain?(x.push(De.entry),x.length>1&&X.push([...be]),be=[]):x.length>0&&be.push(De.entry);X.push([...be]);const Se=x.findIndex(De=>De.id===j.id);if(Se<0)return new Map;const nt=Array.from(ue.value).sort((De,Je)=>De-Je),jt=F.value,Un=new Map;for(let De=0;De<=Se&&De<X.length;De++){const Je=X[De];if(Je.length===0)continue;const Ze=De+1-jt;Ze<0||Ze<nt.length&&Un.set(nt[Ze],Je)}return Un}),R=A(()=>{const U=s.value,j=n.value;if(!U||!j)return 1;const ye=Xt([...U.entries].reverse());let x=0;for(const X of ye)if(X.isMain&&x++,X.entry.id===j.id)return x;return 1}),de=A(()=>{const U=Q.value;let j=0;for(const ye of ue.value)ye<U&&j++;return j}),F=A(()=>Math.max(0,R.value-de.value)),te=A(()=>{const U=new Map;let j=F.value;for(const ye of ue.value)j++,U.set(ye,j);return U}),ce=A(()=>sc(z.value)),B=A(()=>{if(c.value==="chrono")return we.value;const U=[];for(const j of ce.value)for(const ye of j.items)U.push(ye);return U}),se=A(()=>w.value!==null),oe=A(()=>se.value?w.value:n.value),W=A(()=>se.value?I.value:B.value),re=A(()=>se.value?S.value:d.value),we=A(()=>z.value.map((U,j)=>({msg:U,origIdx:j}))),H=A(()=>{const U=[];let j=0;for(const ye of ae.value)ye.future||(j+=ye.msg.tokens||0),U.push(j);return U}),C=A(()=>{var U;return((U=n.value)==null?void 0:U.contextInfo.totalTokens)??0}),P=A(()=>{const U=[];for(const j of ce.value)for(const ye of j.items)U.push({origIdx:ye.origIdx,category:j.category,preview:Ho(ye.msg,_.value)||"(empty)",tokens:ye.msg.tokens||0});return U.filter(j=>j.tokens>0).sort((j,ye)=>ye.tokens-j.tokens).slice(0,3)}),ee=A(()=>t.messageFocusTool),ne=A(()=>t.messageFocusCategory),$=A(()=>t.messageFocusFile),L=A(()=>{var x;const U=t.messageFocusCategory;if(!U)return null;const j=new Set(ce.value.map(X=>X.category));if(j.has(U))return U;const ye={assistant_text:["tool_calls","thinking","assistant_text","user_text"],tool_definitions:["tool_calls","tool_results","system_injections"],system_prompt:["system_injections","assistant_text","user_text"],images:["user_text","assistant_text","tool_results"],cache_markers:["tool_results","assistant_text","user_text"],other:["assistant_text","user_text","tool_results"]};for(const X of ye[U]||[])if(j.has(X))return X;return((x=ce.value[0])==null?void 0:x.category)??null}),G=A(()=>!!ne.value&&!!L.value&&ne.value!==L.value);function k(){w.value=null,I.value=[]}function g(U){k(),d.value=U,E(U),p.value=!0}function h(){p.value=!1,k()}function a(U){U.key==="Escape"&&p.value&&(h(),U.preventDefault(),U.stopPropagation())}function f(U){var X;const j=(U.contentBlocks||[])[0];if(!j)return`${U.role}|${U.tokens||0}|${((X=U.content)==null?void 0:X.slice(0,160))||""}`;if(j.type==="tool_result"){const be=typeof j.content=="string"?j.content:JSON.stringify(j.content||"");return`${U.role}|${U.tokens||0}|tool_result|${j.tool_use_id||""}|${be.slice(0,160)}`}if(j.type==="tool_use")return`${U.role}|${U.tokens||0}|tool_use|${j.id||""}|${j.name||""}|${JSON.stringify(j.input||{}).slice(0,120)}`;const ye=j,x=String(ye.text||ye.thinking||"").slice(0,160);return`${U.role}|${U.tokens||0}|${String(ye.type||"other")}|${x}`}function E(U){const j=B.value[U];if(!j)return;const ye=f(j.msg);m.value=ye;let x=0;for(let X=0;X<=U;X++)f(B.value[X].msg)===ye&&(x+=1);v.value=Math.max(1,x)}function q(){const U=m.value;if(!U)return-1;let j=0;for(let ye=0;ye<B.value.length;ye++)if(f(B.value[ye].msg)===U&&(j+=1,j===v.value))return ye;return-1}function N(U){se.value?S.value=U:(d.value=U,E(U))}function J(U,j){let ye=0;for(let x=0;x<ce.value.length;x++){if(x===U)return ye+j;ye+=ce.value[x].items.length}return 0}function pe(U){const j=B.value.findIndex(ye=>ye.origIdx===U);if(j>=0){if(c.value==="category"){const ye=z.value[U];if(ye){const x=Tt(ye);r(x)}}g(j)}}function fe(U){const j=Tt(U);return(Xe[j]||{color:"#4b5563"}).color}function ie(U){const j=Tt(U);return(Xe[j]||{label:j}).label}function Z(U){var x;if(!s.value)return;const j=s.value.entries;let ye=null;for(let X=j.length-1;X>=0;X--)if((((x=j[X].contextInfo.messages)==null?void 0:x.length)??0)>U){ye=j[X];break}ye||(ye=j[0]),t.pinEntry(ye.id)}async function ke(U){var be;const j=s.value;if(!j)return;const ye=j.entries.find(Se=>Se.id===U);if(!ye)return;await t.loadEntryDetail(U),t.entryDetailVersion;const x=t.getEntryDetail(U),X=(be=x==null?void 0:x.messages)!=null&&be.length?x.messages:ye.contextInfo.messages||[];w.value=ye,I.value=X.map((Se,nt)=>({msg:Se,origIdx:nt})),S.value=0,p.value=!0}function ge(U){if(Tt(U)!=="tool_results")return null;for(const j of U.contentBlocks||[])if(j.type==="tool_result")return j.tool_use_id&&_.value[j.tool_use_id]||null;return null}function $e(U){const j=ee.value;if(!j)return{};const ye=ge(U);if(!ye)return{"tool-muted":!0};const x=ye.trim().toLowerCase(),X=j.trim().toLowerCase();return{"tool-focused":x===X,"tool-muted":x!==X}}async function Te(){const U=L.value,j=t.messageFocusIndex,ye=t.messageFocusOpenDetail,x=t.messageFocusTool,X=t.messageFocusFile;t.clearMessageFocus();const be=j;if(be!=null){if(c.value==="chrono"){for(let De=0;De<4;De++){await Ke(),pe(be),await Ke();const Je=l.value;if(Je){const je=Array.from(Je.querySelectorAll(".chrono-row")).find(ot=>ot.classList.contains("selected"));if(je){je.scrollIntoView({block:"center",behavior:"smooth"});return}}}return}for(let De=0;De<4;De++){await Ke();for(const Je of ce.value)if(Je.items.find(je=>je.origIdx===be)){r(Je.category),await Ke(),await Ke(),pe(be),await Ke();const je=l.value;if(je){const mt=Array.from(je.querySelectorAll(".msg-row")).find($o=>$o.classList.contains("selected"));mt&&mt.scrollIntoView({block:"center",behavior:"smooth"})}return}}return}if(X){t.messageFocusFile=X,c.value="chrono",await Ke();const De=z.value,Je=new Set;for(const je of De)if(je.contentBlocks){for(const ot of je.contentBlocks)if(ot.type==="tool_use"){const mt=ot;Ye(mt)===X&&Je.add(mt.id)}}let Ze=-1;for(let je=0;je<De.length;je++){const ot=De[je];if(ot.contentBlocks){for(const mt of ot.contentBlocks){if(mt.type==="tool_result"&&Je.has(mt.tool_use_id)){Ze=je;break}if(mt.type==="tool_use"&&Ye(mt)===X&&Ze<0){Ze=je;break}}if(Ze>=0)break}}if(Ze>=0)for(let je=0;je<4;je++){await Ke();const ot=l.value;if(!ot)continue;const mt=Array.from(ot.querySelectorAll(".chrono-row"));if(mt[Ze]){mt[Ze].scrollIntoView({block:"center",behavior:"smooth"});return}}return}const Se=U;if(!Se)return;const nt=ye;if(nt?c.value="chrono":c.value="category",c.value==="chrono"){for(let De=0;De<4;De++){await Ke();const Je=l.value;if(!Je)continue;const Ze=Array.from(Je.querySelectorAll(".chrono-row"));let je=-1;for(let ot=z.value.length-1;ot>=0;ot--)if(Tt(z.value[ot])===Se){je=ot;break}if(je>=0&&Ze[je]){Ze[je].scrollIntoView({block:"center",behavior:"smooth"}),nt&&(await Ke(),pe(je));return}}return}let jt=null;for(let De=0;De<4;De++){if(await Ke(),jt=l.value,!jt)continue;r(Se),await Ke();const Je=jt.querySelector(`[data-category="${Se}"]`);if(Je){Je.scrollIntoView({block:"center",behavior:"smooth"});break}}if(!jt)return;const Un=x;if(Un){const De=Array.from(jt.querySelectorAll(".msg-row")),Je=Un.trim().toLowerCase(),Ze=De.find(je=>(je.getAttribute("data-tool-name")||"").trim().toLowerCase()===Je);Ze&&Ze.scrollIntoView({block:"center",behavior:"smooth"})}}function Ie(){t.focusMessageCategory(L.value||t.messageFocusCategory||"tool_results")}function Fe(){t.clearMessageFocus()}const Ae=A(()=>{const U=$.value;if(!U)return new Set;const j=z.value,ye=new Set,x=new Set;for(let X=0;X<j.length;X++){const be=j[X];if(be.contentBlocks){for(const Se of be.contentBlocks)if(Se.type==="tool_use"){const nt=Se;Ye(nt)===U&&(x.add(nt.id),ye.add(X))}}}for(let X=0;X<j.length;X++){const be=j[X];if(be.contentBlocks)for(const Se of be.contentBlocks)Se.type==="tool_result"&&x.has(Se.tool_use_id)&&ye.add(X)}return ye});function Ye(U){var x;const j=U.input,ye=(x=t.selectedSession)==null?void 0:x.workingDirectory;if(j&&typeof j=="object")for(const X of["file_path","path","filePath"]){const be=j[X];if(typeof be=="string"&&be.length>0){let Se=be.replace(/\/+/g,"/");return Se.startsWith("./")&&(Se=Se.slice(2)),Se.length>1&&Se.endsWith("/")&&(Se=Se.slice(0,-1)),lc(Se,ye)}}return null}function tt(U){if(!$.value)return{};const ye=Ae.value;return{"file-focused":ye.has(U),"file-muted":!ye.has(U)}}const ht=A(()=>{const U=$.value;return U?Hi(U):""});return We(()=>t.messageFocusToken,async()=>{await Te()},{immediate:!0}),We(()=>t.inspectorTab,async U=>{U==="messages"&&await Te()}),We(()=>{var U;return(U=n.value)==null?void 0:U.id},async U=>{U!=null&&await t.loadEntryDetail(U)},{immediate:!0}),We(()=>{var U;return(U=K.value)==null?void 0:U.id},async U=>{var j;U!=null&&U!==((j=n.value)==null?void 0:j.id)&&await t.loadEntryDetail(U)},{immediate:!0}),En(async()=>{t.inspectorTab==="messages"&&t.messageFocusCategory&&await Te()}),We(B,()=>{if(!p.value||se.value)return;const U=q();if(U>=0&&U!==d.value){d.value=U;return}d.value>=B.value.length&&(d.value=Math.max(0,B.value.length-1),E(d.value))}),(U,j)=>{const ye=yn("tooltip");return n.value?(y(),b("div",{key:0,class:"messages-tab",onKeydown:a},[Re(Y(Xg),{class:"default-theme","push-other-panes":!1},{default:pt(()=>[Re(Y(sl),{"min-size":25,size:p.value?42:100},{default:pt(()=>[u("div",{ref_key:"msgListEl",ref:l,class:"msg-list"},[u("div",_y,[u("div",by,[u("button",{class:he({on:c.value==="chrono"}),onClick:j[0]||(j[0]=x=>c.value="chrono")},"Chronological",2),u("button",{class:he({on:c.value==="category"}),onClick:j[1]||(j[1]=x=>c.value="category")},"By Category",2)]),T.value&&c.value==="chrono"?(y(),b("div",wy,[u("button",{class:he({on:Y(t).messagesMode==="main"}),onClick:j[2]||(j[2]=x=>Y(t).messagesMode="main")},"Main",2),u("button",{class:he({on:Y(t).messagesMode==="all"}),onClick:j[3]||(j[3]=x=>Y(t).messagesMode="all")},"All",2)])):le("",!0)]),c.value==="category"?(y(),b(ve,{key:0},[P.value.length>0?(y(),b("div",ky,[j[4]||(j[4]=u("div",{class:"heavy-title"},"Top heavy messages",-1)),u("div",xy,[(y(!0),b(ve,null,Ce(P.value,x=>(y(),b("button",{key:x.origIdx,class:"heavy-action",onClick:X=>pe(x.origIdx)},[u("span",Sy,M((Y(Xe)[x.category]||{label:x.category}).label),1),u("span",Ty,M(x.preview),1),u("span",Cy,M(Y(_e)(x.tokens)),1)],8,$y))),128))])])):le("",!0),ee.value||G.value?(y(),b("div",My,[ee.value?(y(),b("span",Ey,[j[5]||(j[5]=xe(" Filtered tool: ",-1)),u("b",null,M(ee.value),1)])):le("",!0),G.value?(y(),b("span",Py,[j[6]||(j[6]=xe(" Showing ",-1)),u("b",null,M((Y(Xe)[L.value||""]||{label:L.value}).label),1),j[7]||(j[7]=xe(" for ",-1)),u("b",null,M((Y(Xe)[ne.value||""]||{label:ne.value}).label),1),j[8]||(j[8]=xe(". ",-1))])):le("",!0),ee.value?(y(),b("button",{key:2,class:"focus-clear",onClick:fn(Ie,["stop"])},"Show all")):le("",!0)])):le("",!0),(y(!0),b(ve,null,Ce(ce.value,(x,X)=>(y(),b("div",{key:x.category,class:"msg-group","data-category":x.category},[u("div",{class:"group-head",onClick:be=>Y(i)(x.category)},[u("i",{class:he(["group-arrow",Y(o)(x.category)||L.value===x.category?"i-carbon-chevron-down":"i-carbon-chevron-right"])},null,2),u("span",{class:"group-dot",style:Me({background:(Y(Xe)[x.category]||{color:"#4b5563"}).color})},null,4),u("span",Ly,M((Y(Xe)[x.category]||{label:x.category}).label),1),u("span",Oy,[xe(M(x.items.length)+" ",1),j[9]||(j[9]=u("span",{class:"group-sep"},"·",-1)),xe(" "+M(Y(_e)(x.tokens))+" ",1),j[10]||(j[10]=u("span",{class:"group-sep"},"·",-1)),xe(" "+M(C.value>0?Math.round(x.tokens/C.value*100):0)+"% ",1)]),u("div",Ry,[u("div",{class:"group-bar-fill",style:Me({width:(C.value>0?Math.round(x.tokens/C.value*100):0)+"%",background:(Y(Xe)[x.category]||{color:"#4b5563"}).color})},null,4)])],8,Ay),u("div",{class:he(["group-items",{open:Y(o)(x.category)||L.value===x.category}])},[(y(!0),b(ve,null,Ce(x.items,(be,Se)=>{var nt;return y(),b("div",{key:be.origIdx,class:he(["msg-row",[$e(be.msg),{selected:p.value&&!se.value&&((nt=B.value[d.value])==null?void 0:nt.origIdx)===be.origIdx}]]),"data-tool-name":ge(be.msg)||"",onClick:jt=>g(J(X,Se))},[u("span",Ny,M(be.msg.role==="user"?"›":be.msg.role==="assistant"?"‹":"·"),1),u("span",Fy,M(Y(Ho)(be.msg,_.value)||"(empty)"),1),u("span",{class:he(["msg-tok",{hot:(be.msg.tokens||0)>2e3}])},M(Y(_e)(be.msg.tokens||0)),3)],10,Dy)}),128))],2)],8,Iy))),128))],64)):c.value==="chrono"?(y(),b(ve,{key:1},[$.value?(y(),b("div",zy,[u("span",null,[j[11]||(j[11]=xe(" Filtered file: ",-1)),He((y(),b("b",By,[xe(M(ht.value),1)])),[[ye,$.value]]),u("span",Hy,"("+M(Ae.value.size)+" messages)",1)]),u("button",{class:"focus-clear",onClick:fn(Fe,["stop"])},"Show all")])):le("",!0),u("div",jy,[(y(!0),b(ve,null,Ce(ae.value,(x,X)=>{var be;return y(),b(ve,{key:X},[O.value.has(X)?(y(!0),b(ve,{key:0},Ce(O.value.get(X),Se=>He((y(),b("div",{key:"sub-"+Se.id,class:"chrono-subagent-row",onClick:nt=>ke(Se.id)},[u("span",Uy,M(Y(_e)(Se.contextInfo.totalTokens)),1),j[12]||(j[12]=u("span",{class:"chrono-cat-dot subagent-dot"},null,-1)),j[13]||(j[13]=u("span",{class:"chrono-type subagent-type"},"subagent",-1)),u("span",Ky,M(Se.agentLabel),1),u("span",Wy,M(Y(tn)(Se.contextInfo.model)),1)],8,Vy)),[[ye,"Click to view subagent context"]])),128)):le("",!0),te.value.has(X)?(y(),b("div",{key:1,class:he(["chrono-turn-marker",{future:x.future}])},[u("span",qy,"Turn "+M(te.value.get(X)),1),j[14]||(j[14]=u("span",{class:"chrono-turn-line"},null,-1))],2)):le("",!0),x.future&&X===Q.value?(y(),b("div",Gy,[...j[15]||(j[15]=[u("span",{class:"chrono-future-line"},null,-1),u("span",{class:"chrono-future-label"},"After this turn",-1),u("span",{class:"chrono-future-line"},null,-1)])])):le("",!0),u("div",{class:he(["chrono-row",[tt(x.origIdx),{selected:!x.future&&p.value&&!se.value&&((be=B.value[d.value])==null?void 0:be.origIdx)===x.origIdx,future:x.future}]]),style:Me({"--cat-border":fe(x.msg)}),onClick:Se=>x.future?Z(x.origIdx):g(x.origIdx)},[He((y(),b("span",Yy,[xe(M(x.future?"":Y(_e)(H.value[X])),1)])),[[ye,x.future?"Click to jump to this turn":`Cumulative: ${Y(_e)(H.value[X])} of ${Y(_e)(C.value)}`]]),u("span",{class:"chrono-cat-dot",style:Me({background:fe(x.msg)})},null,4),u("span",Xy,M(ie(x.msg)),1),u("span",Zy,M(Y(Ho)(x.msg,_.value)||"(empty)"),1),u("span",{class:he(["chrono-tok",{hot:!x.future&&(x.msg.tokens||0)>2e3}])},M(Y(_e)(x.msg.tokens||0)),3)],14,Jy)],64)}),128))])],64)):le("",!0)],512)]),_:1},8,["size"]),p.value?(y(),ft(Y(sl),{key:0,"min-size":25,size:58},{default:pt(()=>[Re(yy,{entry:oe.value,messages:W.value,"selected-index":re.value,onClose:h,onNavigate:N},null,8,["entry","messages","selected-index"])]),_:1})):le("",!0)]),_:1})],32)):le("",!0)}}}),e0=ct(Qy,[["__scopeId","data-v-c0d2a74a"]]),t0={key:0,class:"timeline-tab"},n0={class:"timeline-scope-controls"},s0={class:"scope-toggle"},o0=["onClick"],i0={class:"panel panel--hero"},r0={class:"panel-head"},l0={class:"panel-controls"},a0={class:"mode-toggle"},c0={class:"panel-body"},u0={class:"chart-container"},d0={class:"y-axis"},f0=["onClick"],p0=["viewBox"],h0=["points"],v0=["aria-label"],m0={class:"chart-legend"},g0=["onClick"],y0={key:0,class:"projection-badge"},_0={key:1,class:"projection-badge projection-badge--warn"},b0={class:"panel panel--secondary panel--spine panel--cost"},w0={class:"panel-head"},k0={class:"panel-sub"},x0={class:"panel-body"},$0={class:"chart-container"},S0={class:"y-axis"},T0=["onClick"],C0={class:"chart-legend"},M0=et({__name:"TimelineTab",setup(e){const t=Lt(),n=A({get:()=>t.timelineMode,set:g=>{t.timelineMode=g}}),s=A({get:()=>t.timelineStackMode,set:g=>{t.timelineStackMode=g}}),o=A({get:()=>t.timelineHiddenLegendKeys,set:g=>{t.timelineHiddenLegendKeys=g}}),i=A({get:()=>t.timelineShowLimitOverlay,set:g=>{t.timelineShowLimitOverlay=g}}),r=A({get:()=>t.timelineShowCacheOverlay,set:g=>{t.timelineShowCacheOverlay=g}}),l=me(null),c=me(null),p=A(()=>t.selectedSession),d=A(()=>t.selectedEntry),m=A(()=>p.value?Xt([...p.value.entries].reverse()):[]),v=A(()=>n.value==="main"?m.value.filter(g=>g.isMain):m.value),w=A(()=>{let g=0;for(const h of v.value){const a=h.entry.contextInfo.totalTokens;a>g&&(g=a)}return g}),I=A(()=>{let g=0;for(const h of v.value){const a=h.entry.costUsd??0;a>g&&(g=a)}return g}),S=A(()=>v.value.length<=40),_=A(()=>Ko(Q.value)),T=A(()=>Qh(v.value)),z=A(()=>Jh(v.value,m.value)),K=A(()=>v.value.map((g,h)=>{const a=z.value.get(g.entry.id)||[],f=a[0]||null,E=T.value[h]||h+1;return{entryId:g.entry.id,firstEvent:f,title:f?Xh(a,E):""}}));function V(g){const h=new Set(o.value);h.has(g)?h.delete(g):h.add(g),o.value=h}const Q=A(()=>{if(o.value.size===0)return w.value;let g=0;for(const h of v.value){const a=Vo(h.entry,o.value);a>g&&(g=a)}return g});function D(g){const h=Vo(g.entry,o.value);return Uo(h,Q.value)}function ae(g){return Wh(g.entry,o.value)}function ue(g){return Uo(g.entry.costUsd??0,I.value)}function O(g){t.pinEntry(g.id)}function R(g){t.setInspectorTab("messages"),t.focusMessageCategory(g)}const de=A(()=>Zh(v.value.length)),F=A(()=>{const g=d.value;if(g&&g.contextLimit>0)return g.contextLimit;const h=v.value;return h.length>0?h[h.length-1].entry.contextLimit:0}),te=A(()=>{const g=Q.value;return i.value?Math.max(g,F.value):g}),ce=A(()=>{const g=te.value,h=F.value;return g===0||h===0?-1:(1-h/g)*100});function B(g){if(s.value==="normalized")return 100;if(!i.value)return D(g);const h=Vo(g.entry,o.value);return Uo(h,te.value)}const se=A(()=>Ko(te.value)),oe=A(()=>Ko(I.value)),W=[0,25,50,75,100],re=A(()=>{const g=d.value;return g?ic(g,m.value):null}),we=A(()=>{const g=new Map;for(const h of v.value){const a=tn(h.entry.contextInfo.model);g.has(a)||g.set(a,Xr(h.entry.contextInfo.model,!0))}return Array.from(g.entries()).map(([h,a])=>({name:h,color:a}))}),H=A(()=>Object.entries(gt).map(([g,h])=>({key:g,name:h.label,color:h.color}))),C=A(()=>{const g=v.value;if(g.length===0)return-1;if(n.value!=="all")return g.length-1;for(let h=g.length-1;h>=0;h--)if(g[h].isMain)return h;return-1}),P=A(()=>{const g=v.value,h=C.value;if(h<0)return!1;for(let a=0;a<=h;a++)if(!(n.value==="all"&&!g[a].isMain)&&pi(g[a].entry)!==null)return!0;return!1}),ee=A(()=>{const g=Math.max(0,C.value+1);return g===0?"0 0 1 100":`0 0 ${g} 100`}),ne=A(()=>{const g=v.value.length,h=Math.max(0,C.value+1);return g===0||h===0?"0%":`${h/g*100}%`}),$=A(()=>{const g=v.value,h=C.value;if(g.length===0||h<0)return"";const a=[];for(let f=0;f<=h;f++){if(n.value==="all"&&!g[f].isMain)continue;const E=pi(g[f].entry);if(E===null)continue;const q=f+.5,N=(1-E)*100;a.push(`${q.toFixed(3)},${N.toFixed(2)}`)}return a.join(" ")}),L=A(()=>rc(m.value));function G(g){g&&(g.scrollLeft=g.scrollWidth)}function k(){Ke(()=>{G(l.value),G(c.value)})}return En(()=>{k()}),We(()=>{var g,h;return[((g=p.value)==null?void 0:g.id)??"",n.value,v.value.length,((h=v.value[v.value.length-1])==null?void 0:h.entry.id)??""]},()=>{k()},{immediate:!0}),(g,h)=>{const a=yn("tooltip");return p.value?(y(),b("div",t0,[u("div",n0,[h[4]||(h[4]=u("span",{class:"scope-label"},"Scope",-1)),u("div",s0,[(y(),b(ve,null,Ce(["main","all"],f=>u("button",{key:"scope-"+f,class:he({on:n.value===f}),onClick:E=>n.value=f},M(f==="all"?"All turns":"Main turns"),11,o0)),64))])]),u("section",i0,[u("div",r0,[h[9]||(h[9]=u("span",{class:"panel-title"},"Token Timeline",-1)),u("div",l0,[P.value?(y(),b("button",{key:0,class:he(["overlay-toggle",{on:r.value}]),onClick:h[0]||(h[0]=f=>r.value=!r.value)},[...h[5]||(h[5]=[u("span",{class:"legend-dot legend-dot--cache"},null,-1),xe(" Cache ",-1)])],2)):le("",!0),s.value==="absolute"?(y(),b("button",{key:1,class:he(["overlay-toggle",{on:i.value}]),onClick:h[1]||(h[1]=f=>i.value=!i.value)},[...h[6]||(h[6]=[u("span",{class:"legend-dot legend-dot--dashed"},null,-1),xe(" Limit ",-1)])],2)):le("",!0),u("div",a0,[He((y(),b("button",{class:he({on:s.value==="absolute"}),onClick:h[2]||(h[2]=f=>s.value="absolute")},[...h[7]||(h[7]=[u("i",{class:"i-carbon-chart-column mode-icon"},null,-1),xe(" Abs ",-1)])],2)),[[a,"Absolute token counts"]]),He((y(),b("button",{class:he({on:s.value==="normalized"}),onClick:h[3]||(h[3]=f=>s.value="normalized")},[...h[8]||(h[8]=[u("i",{class:"i-carbon-chart-maximum mode-icon"},null,-1),xe(" Pct ",-1)])],2)),[[a,"Normalized to 100% per turn"]])])])]),u("div",c0,[u("div",u0,[u("div",d0,[s.value==="normalized"?(y(!0),b(ve,{key:0},Ce([...W].reverse(),f=>(y(),b("span",{key:"norm-"+f},M(f)+"%",1))),128)):(y(!0),b(ve,{key:1},Ce([...i.value?se.value:_.value].reverse(),f=>(y(),b("span",{key:f},M(Y(Zr)(f,"tokens")),1))),128))]),u("div",{ref_key:"tokenChartScrollEl",ref:l,class:"chart-scroll"},[u("div",{class:he(["bars-wrap",{sparse:S.value}])},[u("div",{class:he(["bars",{sparse:S.value}])},[(y(!0),b(ve,null,Ce(v.value,(f,E)=>{var q;return y(),b("div",{key:f.entry.id,class:he(["bar",{active:((q=d.value)==null?void 0:q.id)===f.entry.id,normalized:s.value==="normalized"}]),style:Me({height:B(f)+"%"}),onClick:N=>O(f.entry)},[(y(!0),b(ve,null,Ce(ae(f),N=>He((y(),b("div",{key:f.entry.id+"-"+N.key,class:"bar-segment",style:Me({height:N.pct+"%",background:N.color})},null,4)),[[a,Y(tv)(f.entry,N)]])),128))],14,f0)}),128))],2),s.value==="absolute"&&i.value&&ce.value>=0?(y(),b("div",{key:0,class:"limit-line",style:Me({top:ce.value+"%"})},null,4)):le("",!0),r.value&&$.value?(y(),b("svg",{key:1,class:"cache-line-svg",viewBox:ee.value,style:Me({width:ne.value}),preserveAspectRatio:"none"},[u("polyline",{points:$.value,fill:"none",stroke:"var(--accent-cyan)","stroke-width":"1.5","vector-effect":"non-scaling-stroke","stroke-linejoin":"round","stroke-linecap":"round",opacity:"0.7"},null,8,h0)],12,p0)):le("",!0)],2),u("div",{class:he(["events",{sparse:S.value}])},[(y(!0),b(ve,null,Ce(K.value,f=>(y(),b("div",{key:"evt-"+f.entryId,class:"event-slot"},[f.firstEvent?He((y(),b("button",{key:0,class:he(["event-marker",`event-marker--${f.firstEvent.type}`]),type:"button","aria-label":f.title},[xe(M(Y(Yh)(f.firstEvent.type)),1)],10,v0)),[[a,f.title]]):le("",!0)]))),128))],2),u("div",{class:he(["labels",{sparse:S.value}])},[(y(!0),b(ve,null,Ce(T.value,(f,E)=>(y(),b("div",{key:E,class:"label"},M(f&&(de.value<=1||f%de.value===0)?f:""),1))),128))],2)],512)]),u("div",m0,[(y(!0),b(ve,null,Ce(H.value,f=>(y(),b("button",{key:f.key,class:he(["legend-item legend-item--interactive",{"legend-item--hidden":o.value.has(f.key)}]),onClick:E=>V(f.key)},[u("span",{class:"legend-dot",style:Me({background:o.value.has(f.key)?"var(--text-ghost)":f.color})},null,4),xe(" "+M(f.name),1)],10,g0))),128)),L.value.turnsRemaining!==null&&L.value.turnsRemaining>0?He((y(),b("span",y0,[xe(" ~"+M(L.value.turnsRemaining)+" turns remaining ",1)])),[[a,`Growing ~${Y(_e)(Math.round(L.value.growthPerTurn))}/turn over ${L.value.sinceCompaction} turns since last compaction`]]):L.value.turnsRemaining===0?He((y(),b("span",_0,[...h[10]||(h[10]=[xe(" At limit ",-1)])])),[[a,"Context window is at or near the limit"]]):le("",!0)])])]),u("section",b0,[u("div",w0,[h[11]||(h[11]=u("span",{class:"panel-title"},"Cost Timeline",-1)),u("span",k0,"Scope: "+M(n.value==="main"?"Main turns only":"All turns"),1)]),u("div",x0,[u("div",$0,[u("div",S0,[(y(!0),b(ve,null,Ce([...oe.value].reverse(),f=>(y(),b("span",{key:"cost-"+f},M(Y(Zr)(f,"cost")),1))),128))]),u("div",{ref_key:"costChartScrollEl",ref:c,class:"chart-scroll"},[u("div",{class:he(["bars-wrap",{sparse:S.value}])},[u("div",{class:he(["bars",{sparse:S.value}])},[(y(!0),b(ve,null,Ce(v.value,f=>{var E;return He((y(),b("div",{key:"cost-"+f.entry.id,class:he(["bar",{active:((E=d.value)==null?void 0:E.id)===f.entry.id}]),style:Me({height:ue(f)+"%"}),onClick:q=>O(f.entry)},[u("div",{class:"bar-cost",style:Me({background:Y(Xr)(f.entry.contextInfo.model,f.isMain)})},null,4)],14,T0)),[[a,Y(ev)(f.entry,f.isMain)]])}),128))],2)],2),u("div",{class:he(["labels",{sparse:S.value}])},[(y(!0),b(ve,null,Ce(T.value,(f,E)=>(y(),b("div",{key:"cost-label-"+E,class:"label"},M(f&&(de.value<=1||f%de.value===0)?f:""),1))),128))],2)],512)]),u("div",C0,[(y(!0),b(ve,null,Ce(we.value,f=>(y(),b("span",{key:f.name,class:"legend-item"},[u("span",{class:"legend-dot",style:Me({background:f.color})},null,4),xe(" "+M(f.name),1)]))),128))])])]),Re(cc,{"diff-data":re.value,"show-when-empty":!!d.value,onCategoryClick:R},null,8,["diff-data","show-when-empty"])])):le("",!0)}}}),E0=ct(M0,[["__scopeId","data-v-8510f6fe"]]),P0=["aria-label","aria-valuemax","aria-valuenow"],I0={class:"scrubber-controls"},A0=["disabled"],L0={class:"readout-num"},O0={class:"readout-total"},R0=["disabled"],D0={class:"spark-bars"},N0={class:"tt-row tt-turn"},F0={class:"tt-row"},z0={class:"tt-row tt-dim"},B0=et({__name:"TurnScrubber",setup(e){const t=Lt(),n=me(null),s=me(!1),o=me(null),i=A(()=>t.selectedSession),r=A(()=>t.selectedEntry),l=A(()=>i.value?Xt([...i.value.entries].reverse()):[]),c=A(()=>l.value.filter(W=>W.isMain)),p=A(()=>c.value.map(W=>W.entry)),d=A(()=>c.value.map(W=>!W.isMain)),m=A(()=>p.value.length),v=A(()=>{const W=r.value;if(!W)return-1;let re=-1;for(const we of l.value)if(we.isMain&&re++,we.entry.id===W.id)return re;return-1}),w=A(()=>{let W=0;for(const re of p.value)re.contextInfo.totalTokens>W&&(W=re.contextInfo.totalTokens);return W}),I=A(()=>{const W=w.value;return W===0?p.value.map(()=>({height:.15,tokens:0,cost:0,model:"",utilization:0})):p.value.map(re=>({height:Math.max(.08,re.contextInfo.totalTokens/W),tokens:re.contextInfo.totalTokens,cost:re.costUsd??0,model:tn(re.contextInfo.model),utilization:re.contextLimit>0?re.contextInfo.totalTokens/re.contextLimit:0}))}),S=A(()=>t.selectionMode!=="pinned"||v.value<0?!1:v.value<m.value-1),_=A(()=>S.value?Math.max(0,m.value-1-v.value):0),T=A(()=>S.value?_.value/m.value>=.12:!1),z=A(()=>((v.value+1)/m.value+1)/2*100),K=A(()=>{const W=[];let re=0,we=-1;for(const H of l.value)H.isMain?(we>=0&&W.push(re),re=0,we++):re++;return we>=0&&W.push(re),W}),V=A(()=>{if(o.value===null||o.value<0||o.value>=p.value.length)return null;const W=p.value[o.value],re=I.value[o.value],we=K.value[o.value]||0;return{turn:o.value+1,tokens:_e(W.contextInfo.totalTokens),cost:bt(W.costUsd),model:re.model,subs:we,isSub:d.value[o.value]||!1}});function Q(W){de(W)&&t.pinEntry(p.value[W].id)}function D(){t.followLive()}function ae(){const W=v.value-1;de(W)&&Q(W)}function ue(){const W=v.value+1;de(W)&&Q(W)}function O(){r.value&&t.pinEntry(r.value.id)}function R(W){const re=n.value;if(!re||m.value===0)return-1;const we=re.getBoundingClientRect(),C=Math.max(0,Math.min(W.clientX-we.left,we.width))/we.width;return Math.min(Math.floor(C*m.value),m.value-1)}function de(W){return W>=0&&W<m.value}function F(W){var we,H;if(m.value===0)return;s.value=!0;const re=R(W);de(re)&&Q(re),(H=(we=W.target)==null?void 0:we.setPointerCapture)==null||H.call(we,W.pointerId)}function te(W){const re=R(W);o.value=de(re)?re:null,s.value&&de(re)&&Q(re)}function ce(W){var re,we;s.value=!1,(we=(re=W.target)==null?void 0:re.releasePointerCapture)==null||we.call(re,W.pointerId)}function B(){o.value=null}function se(W){W.key==="ArrowLeft"||W.key==="ArrowUp"?(W.preventDefault(),ae()):W.key==="ArrowRight"||W.key==="ArrowDown"?(W.preventDefault(),ue()):W.key==="Home"?(W.preventDefault(),Q(0)):W.key==="End"?(W.preventDefault(),m.value>0&&Q(m.value-1)):W.key==="Escape"&&(W.preventDefault(),D())}function oe(W){return W>=.9?"var(--accent-red)":W>=.7?"var(--accent-amber)":"var(--accent-blue)"}return(W,re)=>i.value&&r.value&&m.value>=1?(y(),b("div",{key:0,class:"scrubber",role:"slider","aria-label":`Turn scrubber: turn ${v.value+1} of ${m.value}`,"aria-valuemin":1,"aria-valuemax":m.value,"aria-valuenow":v.value+1,tabindex:"0",onKeydown:se},[u("div",I0,[u("button",{class:"ctrl-btn",disabled:v.value<=0,onClick:ae,title:"Previous turn (←)","aria-label":"Previous turn"},[...re[0]||(re[0]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M7 1L3 5L7 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,A0),u("span",{class:he(["turn-readout",Y(t).selectionMode==="live"?"is-live":"is-pinned"])},[re[1]||(re[1]=u("span",{class:"readout-dot"},null,-1)),u("span",L0,M(v.value+1),1),re[2]||(re[2]=u("span",{class:"readout-sep"},"/",-1)),u("span",O0,M(m.value),1)],2),u("button",{class:"ctrl-btn",disabled:v.value<0||v.value>=m.value-1,onClick:ue,title:"Next turn (→)","aria-label":"Next turn"},[...re[3]||(re[3]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M3 1L7 5L3 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,R0)]),u("div",{ref_key:"trackEl",ref:n,class:"scrubber-track",onPointerdown:F,onPointermove:te,onPointerup:ce,onPointerleave:B},[u("div",D0,[(y(!0),b(ve,null,Ce(I.value,(we,H)=>(y(),b("div",{key:H,class:he(["spark-col",{active:H===v.value,hover:H===o.value&&H!==v.value,past:Y(t).selectionMode==="pinned"&&H>v.value,"is-sub":d.value[H]}])},[u("div",{class:"spark-bar",style:Me({height:we.height*100+"%","--bar-color":oe(we.utilization)})},null,4),K.value[H]>0?(y(),b("div",{key:0,class:he(["sub-dot",{"sub-burst":K.value[H]>=3}])},null,2)):le("",!0)],2))),128))]),v.value>=0?(y(),b("div",{key:0,class:he(["playhead",{live:Y(t).selectionMode==="live"}]),style:Me({left:(v.value+.5)/m.value*100+"%"})},[...re[4]||(re[4]=[u("div",{class:"playhead-line"},null,-1),u("div",{class:"playhead-head"},null,-1)])],6)):le("",!0),T.value?(y(),b("div",{key:1,class:"new-turns-badge",style:Me({left:z.value+"%"}),onClick:fn(D,["stop"])}," +"+M(_.value)+" new ",5)):le("",!0),Re(Bn,{name:"tooltip-fade"},{default:pt(()=>[V.value&&o.value!==v.value?(y(),b("div",{key:0,class:"scrub-tooltip",style:Me({left:Math.min(Math.max((o.value+.5)/m.value*100,8),92)+"%"})},[u("div",N0,"T"+M(V.value.turn)+M(V.value.isSub?" (sub)":""),1),u("div",F0,M(V.value.tokens)+" · "+M(V.value.cost),1),u("div",z0,M(V.value.model)+M(V.value.subs>0?` · ${V.value.subs} sub`:""),1)],4)):le("",!0)]),_:1})],544),Y(t).selectionMode==="live"?(y(),b("button",{key:0,class:"action-btn action-pin",onClick:O,title:"Pin current turn to scrub history"},[...re[5]||(re[5]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("circle",{cx:"5",cy:"5",r:"3.5",stroke:"currentColor","stroke-width":"1"}),u("circle",{cx:"5",cy:"5",r:"1.5",fill:"currentColor"})],-1),xe(" Pin ",-1)])])):(y(),b("button",{key:1,class:"action-btn action-return",onClick:D,title:"Return to live (Esc)"},[...re[6]||(re[6]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M2 5H8M8 5L5.5 2.5M8 5L5.5 7.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),xe(" Live ",-1)])]))],40,P0)):le("",!0)}}),H0=ct(B0,[["__scopeId","data-v-865993b3"]]),j0={class:"tab-bar"},V0=["onClick"],U0={class:"tab-content"},K0=et({__name:"InspectorPanel",setup(e){const t=Lt(),n=[{id:"overview",label:"Overview",icon:"i-carbon-dashboard"},{id:"messages",label:"Messages",icon:"i-carbon-chat"},{id:"timeline",label:"Timeline",icon:"i-carbon-activity"}],s={overview:Yg,messages:e0,timeline:E0},o=A(()=>s[t.inspectorTab]);function i(l){l==="messages"&&t.clearMessageFocus(),t.setInspectorTab(l)}function r(l){l.key==="Escape"&&!l.defaultPrevented&&t.setView("dashboard")}return(l,c)=>(y(),b("div",{class:"inspector",onKeydown:r,tabindex:"-1"},[Re(H0),u("div",j0,[(y(),b(ve,null,Ce(n,p=>u("button",{key:p.id,class:he(["tab-btn",{active:Y(t).inspectorTab===p.id}]),onClick:d=>i(p.id)},[u("i",{class:he(p.icon)},null,2),xe(" "+M(p.label),1)],10,V0)),64))]),u("div",U0,[(y(),ft(Xl(o.value),{key:Y(t).inspectorTab}))])],32))}}),W0=ct(K0,[["__scopeId","data-v-74dad8d1"]]),q0={class:"session-rail","aria-label":"Sessions"},G0={class:"rail-scroll"},J0=["onClick"],Y0={class:"tile-meta"},X0=et({__name:"SessionRail",setup(e){const t=Lt();function n(c){t.selectSession(c),t.setView("inspector")}function s(){t.setView("dashboard")}function o(c){const p=tn(c.latestModel),d=c.entryCount+(c.entryCount===1?" turn":" turns"),m=bt(c.totalCost),v=c.healthScore?`
32
+ Health ${c.healthScore.overall}/100 (${c.healthScore.rating})`:"",w=c.workingDirectory?`
33
+ ${c.workingDirectory}`:"";return`${c.source} · ${p}
34
+ ${d} · ${m}${v}${w}`}function i(c){return c.contextLimit?Math.min(100,Math.round(c.latestTotalTokens/c.contextLimit*100)):0}function r(c){const p=i(c);return p>=80?"high":p>=60?"mid":"low"}const l={delay:{show:50,hide:0},placement:"right"};return(c,p)=>{const d=yn("tooltip");return y(),b("nav",q0,[He((y(),b("button",{class:"rail-back",onClick:s},[...p[0]||(p[0]=[u("i",{class:"i-carbon-grid grid-icon"},null,-1)])])),[[d,{content:"Dashboard",...l}]]),p[1]||(p[1]=u("span",{class:"rail-label"},"SESSIONS",-1)),u("div",G0,[(y(!0),b(ve,null,Ce(Y(t).summaries,m=>He((y(),b("button",{key:m.id,class:he(["rail-tile",{active:m.id===Y(t).selectedSessionId,pulse:Y(t).recentlyUpdated.has(m.id)}]),onClick:v=>n(m.id)},[u("span",{class:he(["tile-source",Y(Ss)(m.source)])},M(m.source||"?"),3),u("span",Y0,M(m.entryCount)+"t",1),u("span",{class:he(["tile-util",r(m)])},M(i(m))+"%",3)],10,J0)),[[d,{content:o(m),...l}]])),128))])])}}}),Z0=ct(X0,[["__scopeId","data-v-fe0c47d1"]]),Q0={class:"compare-view"},e_={class:"compare-header"},t_={class:"compare-title"},n_={class:"compare-count"},s_={class:"legend"},o_={class:"lanes"},i_=["onMouseenter"],r_={class:"lane-header"},l_={class:"lane-identity"},a_={class:"lane-index"},c_={class:"lane-model"},u_={key:0,class:"lane-dir"},d_={class:"lane-metrics"},f_={class:"lm-cell"},p_={class:"lm-value"},h_={key:0,class:"lm-winner"},v_={class:"lm-cell"},m_={class:"lm-value green"},g_={key:0,class:"lm-winner"},y_={class:"lm-cell"},__={key:0,class:"lm-winner"},b_={class:"lm-cell"},w_={key:1,class:"lm-value ghost"},k_={key:0,class:"lm-cell"},x_={class:"lm-value dim"},$_={key:1,class:"lm-cell"},S_={class:"lm-value dim"},T_={key:0,class:"lm-winner"},C_={class:"lm-cell"},M_={class:"lm-value dim"},E_=["href","onClick"],P_={class:"lane-body"},I_={class:"turn-track"},A_=["title","href","onMouseenter","onClick"],L_={class:"turn-num"},O_={key:0,class:"turns-empty"},R_={key:0,class:"sparkline-col"},D_={class:"sparkline-cell"},N_={class:"sparkline",viewBox:"0 0 100 100",preserveAspectRatio:"none"},F_=["y1","y2"],z_=["d"],B_=["d"],H_={class:"sparkline-val"},j_={class:"sparkline-cell"},V_={class:"sparkline sparkline--cost",viewBox:"0 0 100 100",preserveAspectRatio:"none"},U_=["d"],K_=["d"],W_={class:"sparkline-val"},q_={key:0,class:"comp-row"},G_={class:"comp-tape"},J_=["title"],Y_={key:0,class:"comp-seg-label"},X_={class:"comp-total"},ll="#ef4444",al="#9ca3af",Z_=et({__name:"CompareView",setup(e){const t=Lt(),n=me(null),s=me(null),o=me(null),i=A(()=>{const H=Object.entries(gt).map(([C,P])=>({key:C,label:P.label,color:P.color}));return H.push({key:"error",label:"Error",color:ll}),H.push({key:"stall",label:"Stall",color:al}),H});function r(H){const C={};for(const[P,ee]of Object.entries(jn)){C[P]=0;for(const ne of ee){const $=H.find(L=>L.category===ne);$&&(C[P]+=$.tokens)}}return C}function l(H){const C=r(H);let P="other",ee=0;for(const[ne,$]of Object.entries(C))$>ee&&(P=ne,ee=$);return P}function c(H){const C=r(H),P=Object.values(C).reduce((ee,ne)=>ee+ne,0);return P===0?[]:Object.entries(C).filter(([,ee])=>ee>0).sort((ee,ne)=>ne[1]-ee[1]).map(([ee,ne])=>{var $;return{key:ee,color:(($=gt[ee])==null?void 0:$.color)??"#475569",pct:ne/P*100}})}function p(H){const C=new Map;for(const ne of H){const $=ne.agentKey||"_default";C.set($,(C.get($)||0)+1)}let P="_default",ee=0;for(const[ne,$]of C)$>ee&&(P=ne,ee=$);return P}function d(H){const C=p(H.entries);return H.entries.filter(ee=>(ee.agentKey||"_default")===C).sort((ee,ne)=>new Date(ee.timestamp).getTime()-new Date(ne.timestamp).getTime()).map((ee,ne)=>{var g;const $=(ee.httpStatus??200)>=400,L=ee.stopReason==="max_tokens",G=l(ee.composition);let k;return $?k=ll:L?k=al:k=((g=gt[G])==null?void 0:g.color)??gt.other.color,{turnNumber:ne+1,entry:ee,dominantGroup:G,color:k,isError:$,isStall:L,tokens:ee.contextInfo.totalTokens,costUsd:ee.costUsd??0,segments:c(ee.composition)}})}function m(H){if(!H)return"";let C=H;/^\/home\/[^/]+(\/|$)/.test(C)?C=C.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(C)&&(C=C.replace(/^\/Users\/[^/]+/,"~"));const P=C.split("/");return P.length>2?P.slice(-2).join("/"):C}function v(H){for(let C=H.length-1;C>=0;C--){const P=pi(H[C].entry);if(P!==null)return P}return null}const w=A(()=>{const H=[];for(const C of t.compareSessionIds){const P=t.loadedConversations.get(C),ee=t.summaries.find(Z=>Z.id===C);if(!P&&!ee)continue;const ne=P?d(P):[],$=P?P.entries.reduce((Z,ke)=>Z+(ke.costUsd??0),0):(ee==null?void 0:ee.totalCost)??0,L=P?P.entries.reduce((Z,ke)=>{var ge;return Z+(((ge=ke.timings)==null?void 0:ge.total_ms)??0)},0):0,G=ne.length>0?ne[ne.length-1].entry:null,k=ne.map(Z=>Z.tokens),g=ne.map(Z=>Z.costUsd),h=P?(G==null?void 0:G.healthScore)??(ee==null?void 0:ee.healthScore):ee==null?void 0:ee.healthScore,a=(G==null?void 0:G.contextInfo.totalTokens)??(ee==null?void 0:ee.latestTotalTokens)??0,f=(G==null?void 0:G.contextLimit)??(ee==null?void 0:ee.contextLimit)??2e5,E=(ee==null?void 0:ee.latestModel)??(G==null?void 0:G.contextInfo.model)??"",q=(ee==null?void 0:ee.source)??(P==null?void 0:P.source)??"",N=(ee==null?void 0:ee.workingDirectory)??(P==null?void 0:P.workingDirectory)??null,J=P?P.entries.reduce((Z,ke)=>{var ge;return Z+(((ge=ke.usage)==null?void 0:ge.outputTokens)??0)},0):0,pe=G?c(G.composition):[],fe=v(ne),ie=J>0&&$>0?$/J*1e3:null;H.push({id:C,source:q,model:E,directory:m(N),turnCount:ne.length,totalCost:$,totalDurationMs:L,finalTokens:a,contextLimit:f,healthRating:(h==null?void 0:h.rating)??"unknown",healthScore:(h==null?void 0:h.overall)??0,turns:ne,tokenHistory:k,costHistory:g,utilization:f>0?a/f:0,outputTokens:J,cacheRate:fe,costPerOutputK:ie,finalComposition:pe})}return H}),I=A(()=>{let H=0;for(const C of w.value)for(const P of C.turns)P.tokens>H&&(H=P.tokens);return H||1}),S=A(()=>{let H=0;for(const C of w.value)for(const P of C.turns)P.costUsd>H&&(H=P.costUsd);return H||.01}),_=A(()=>{let H=0;for(const C of w.value){H=Math.max(H,C.contextLimit);for(const P of C.tokenHistory)P>H&&(H=P)}return H||1});function T(H){const ne=8+H/I.value*24;return Math.round(ne)+"px"}function z(H){return H<=0?0:.15+H/S.value*.85}function K(H,C){if(H.length===0)return"";const P=100,ee=100,ne=H.length>1?P/(H.length-1):0;return H.map(($,L)=>{const G=H.length===1?P/2:L*ne,k=ee-$/C*ee;return`${L===0?"M":"L"}${G.toFixed(1)},${k.toFixed(1)}`}).join(" ")}function V(H,C){if(H.length===0)return"";const P=100,ee=100,ne=H.length>1?P/(H.length-1):0,$=H.map((k,g)=>{const h=H.length===1?P/2:g*ne,a=ee-k/C*ee;return`${g===0?"M":"L"}${h.toFixed(1)},${a.toFixed(1)}`}).join(" "),L=H.length===1?P/2:(H.length-1)*ne,G=H.length===1?P/2:0;return`${$} L${L.toFixed(1)},${ee} L${G.toFixed(1)},${ee} Z`}function Q(H){const C=_.value;return 100-H/C*100}const D=A(()=>{let H=0;for(const C of w.value)for(const P of C.costHistory)P>H&&(H=P);return H||.01});function ae(H,C){return n.value===null||C===n.value?1:H===s.value?.3:.4}function ue(H){var P;const C=[`Turn ${H.turnNumber}`,`Model: ${tn(H.entry.contextInfo.model)}`,`Context: ${_e(H.entry.contextInfo.totalTokens)}`,`Cost: ${bt(H.entry.costUsd)}`,`Dominant: ${((P=gt[H.dominantGroup])==null?void 0:P.label)??H.dominantGroup}`];return H.entry.timings&&C.push(`Duration: ${ui(H.entry.timings.total_ms)}`),H.entry.stopReason&&C.push(`Stop: ${H.entry.stopReason}`),H.isError&&C.push(`HTTP ${H.entry.httpStatus}`),C.join(`
35
+ `)}function O(H,C){return`#session/${encodeURIComponent(H)}?tab=overview&turn=${C}`}function R(H){return`#session/${encodeURIComponent(H)}?tab=overview`}function de(H,C){n.value=C,s.value=H}function F(){n.value=null,s.value=null}function te(H,C,P){H.ctrlKey||H.metaKey||H.button===1||(H.preventDefault(),t.exitCompare("inspector"),t.selectSession(C),t.pinEntry(P.entry.id))}function ce(H,C){H.ctrlKey||H.metaKey||H.button===1||(H.preventDefault(),t.exitCompare("inspector"),t.setInspectorTab("overview"),t.selectSession(C))}function B(){t.exitCompare("dashboard")}function se(H){return H>=.8?"util-high":H>=.6?"util-mid":"util-low"}function oe(H){o.value=H}function W(){o.value=null}function re(H){return H>=.01?"$"+H.toFixed(2)+"/K":"$"+H.toFixed(3)+"/K"}const we=A(()=>{const H=w.value;if(H.length<2)return null;const C=H.map(h=>h.totalCost),P=H.map(h=>h.finalTokens),ee=H.map(h=>h.turnCount),ne=H.map(h=>h.costPerOutputK),$=Math.min(...C),L=Math.min(...P),G=Math.min(...ee),k=ne.filter(h=>h!==null),g=k.length>0?Math.min(...k):null;return H.map(h=>({isCheapest:h.totalCost<=$,isLeanest:h.finalTokens<=L,isFewest:h.turnCount<=G,isMostEfficient:g!==null&&h.costPerOutputK!==null&&h.costPerOutputK<=g}))});return(H,C)=>(y(),b("div",Q0,[u("header",e_,[u("button",{class:"back-btn",onClick:B},[...C[0]||(C[0]=[u("i",{class:"i-carbon-arrow-left"},null,-1),xe(" Dashboard ",-1)])]),u("h1",t_,[C[1]||(C[1]=xe(" Compare ",-1)),u("span",n_,M(w.value.length)+" sessions",1)]),u("div",s_,[(y(!0),b(ve,null,Ce(i.value,P=>(y(),b("span",{key:P.key,class:"legend-chip"},[u("span",{class:"legend-swatch",style:Me({background:P.color})},null,4),xe(" "+M(P.label),1)]))),128))])]),u("div",o_,[(y(!0),b(ve,null,Ce(w.value,(P,ee)=>(y(),b("div",{key:P.id,class:he(["lane",{"lane--focused":o.value===P.id,"lane--dimmed":o.value!==null&&o.value!==P.id}]),onMouseenter:ne=>oe(P.id),onMouseleave:W},[u("div",r_,[u("div",l_,[u("div",a_,M(ee+1),1),u("span",{class:he(["source-badge",Y(Ss)(P.source)])},M(P.source||"?"),3),u("span",c_,M(Y(tn)(P.model)),1),P.directory?(y(),b("span",u_,M(P.directory),1)):le("",!0)]),u("div",d_,[u("div",f_,[u("span",p_,M(P.turnCount),1),C[2]||(C[2]=u("span",{class:"lm-key"},"turns",-1)),we.value&&we.value[ee].isFewest?(y(),b("span",h_)):le("",!0)]),u("div",v_,[u("span",m_,M(Y(bt)(P.totalCost)),1),C[3]||(C[3]=u("span",{class:"lm-key"},"cost",-1)),we.value&&we.value[ee].isCheapest?(y(),b("span",g_)):le("",!0)]),u("div",y_,[u("span",{class:he(["lm-value",se(P.utilization)])},M(Math.round(P.utilization*100))+"% ",3),C[4]||(C[4]=u("span",{class:"lm-key"},"context",-1)),we.value&&we.value[ee].isLeanest?(y(),b("span",__)):le("",!0)]),u("div",b_,[P.healthRating!=="unknown"?(y(),b("span",{key:0,class:"lm-value lm-health",style:Me({color:Y(fi)(P.healthRating)})},M(P.healthScore),5)):(y(),b("span",w_,"--")),C[5]||(C[5]=u("span",{class:"lm-key"},"health",-1))]),P.cacheRate!==null?(y(),b("div",k_,[u("span",x_,M(Y(di)(P.cacheRate)),1),C[6]||(C[6]=u("span",{class:"lm-key"},"cache",-1))])):le("",!0),P.costPerOutputK!==null?(y(),b("div",$_,[u("span",S_,M(re(P.costPerOutputK)),1),C[7]||(C[7]=u("span",{class:"lm-key"},"$/out",-1)),we.value&&we.value[ee].isMostEfficient?(y(),b("span",T_)):le("",!0)])):le("",!0),u("div",C_,[u("span",M_,M(P.totalDurationMs>0?Y(ui)(P.totalDurationMs):"--"),1),C[8]||(C[8]=u("span",{class:"lm-key"},"duration",-1))])]),u("a",{class:"inspect-btn",title:"Open in inspector",href:R(P.id),onClick:ne=>ce(ne,P.id)},[...C[9]||(C[9]=[u("i",{class:"i-carbon-arrow-right"},null,-1)])],8,E_)]),u("div",P_,[u("div",I_,[(y(!0),b(ve,null,Ce(P.turns,ne=>(y(),b("a",{key:ne.turnNumber,class:he(["turn-col",{"turn-col--error":ne.isError,"turn-col--stall":ne.isStall,"turn-col--crosslit":n.value===ne.turnNumber&&s.value!==P.id}]),style:Me({opacity:ae(P.id,ne.turnNumber)}),title:ue(ne),href:O(P.id,ne.turnNumber),onMouseenter:$=>de(P.id,ne.turnNumber),onMouseleave:F,onClick:$=>te($,P.id,ne)},[u("div",{class:"turn-bar",style:Me({height:T(ne.tokens)})},[(y(!0),b(ve,null,Ce(ne.segments,$=>(y(),b("div",{key:$.key,class:"turn-seg",style:Me({flex:$.pct,background:$.color})},null,4))),128))],4),u("div",{class:"cost-dot",style:Me({opacity:z(ne.costUsd)})},null,4),u("span",L_,M(ne.turnNumber),1)],46,A_))),128)),P.turns.length===0?(y(),b("div",O_," Loading... ")):le("",!0)]),P.tokenHistory.length>1?(y(),b("div",R_,[u("div",D_,[(y(),b("svg",N_,[u("line",{x1:"0",y1:Q(P.contextLimit),x2:"100",y2:Q(P.contextLimit),class:"sparkline-limit"},null,8,F_),u("path",{d:V(P.tokenHistory,_.value),class:"sparkline-area"},null,8,z_),u("path",{d:K(P.tokenHistory,_.value),class:"sparkline-line"},null,8,B_)])),u("span",H_,[xe(M(Y(_e)(P.finalTokens)),1),C[10]||(C[10]=u("span",{class:"sparkline-sep"},"/",-1)),xe(M(Y(_e)(P.contextLimit)),1)])]),u("div",j_,[(y(),b("svg",V_,[u("path",{d:V(P.costHistory,D.value),class:"sparkline-area sparkline-area--cost"},null,8,U_),u("path",{d:K(P.costHistory,D.value),class:"sparkline-line sparkline-line--cost"},null,8,K_)])),u("span",W_,M(Y(bt)(P.totalCost))+" total",1)])])):le("",!0)]),P.finalComposition.length>0?(y(),b("div",q_,[u("div",G_,[(y(!0),b(ve,null,Ce(P.finalComposition,ne=>{var $,L;return y(),b("div",{key:ne.key,class:"comp-seg",style:Me({flex:ne.pct,background:ne.color}),title:`${(($=Y(gt)[ne.key])==null?void 0:$.label)??ne.key}: ${Math.round(ne.pct)}%`},[ne.pct>=18?(y(),b("span",Y_,M(((L=Y(gt)[ne.key])==null?void 0:L.label)??ne.key),1)):le("",!0)],12,J_)}),128))]),u("span",X_,M(Y(_e)(P.finalTokens)),1)])):le("",!0)],42,i_))),128))])]))}}),Q_=ct(Z_,[["__scopeId","data-v-f1fe8711"]]),eb={},tb={class:"empty"};function nb(e,t){return y(),b("div",tb,[...t[0]||(t[0]=[_a('<svg class="empty-icon" width="48" height="48" viewBox="0 0 48 48" aria-hidden="true" data-v-213dcf0e><circle cx="24" cy="24" r="20" fill="none" stroke="var(--border-mid)" stroke-width="1" data-v-213dcf0e></circle><circle cx="24" cy="24" r="10" fill="none" stroke="var(--border-bright)" stroke-width="0.8" data-v-213dcf0e></circle><circle cx="24" cy="24" r="3" fill="var(--accent-blue)" opacity="0.4" data-v-213dcf0e></circle></svg><div class="empty-title" data-v-213dcf0e>No requests captured yet</div><div class="empty-sub" data-v-213dcf0e> Start a tool through the CLI to capture traffic: </div><div class="empty-examples" data-v-213dcf0e><code data-v-213dcf0e>context-lens claude</code><code data-v-213dcf0e>context-lens codex</code><code data-v-213dcf0e>context-lens gemini</code></div>',4)])])}const sb=ct(eb,[["render",nb],["__scopeId","data-v-213dcf0e"]]),ob={class:"app"},ib={class:"app-body"},rb={key:0,class:"app-loading"},lb={class:"main-content"},ab={key:"inspector",class:"inspector-content"},cb={key:1,class:"loading-placeholder"},cl="#sessions",ub=et({__name:"App",setup(e){const t=Lt(),n=me(!1),s=me(!1),o=["overview","messages","timeline"];let i=null;const r=me(null),l=A(()=>{const _=t.view,T=r.value;return T===null?"view-instant":T==="dashboard"&&_==="inspector"?"view-slide-forward":T==="inspector"&&_==="dashboard"?"view-slide-back":"view-instant"});We(()=>t.view,(_,T)=>{r.value!==null?r.value=T:r.value=_});const{connected:c}=hp("/api/events",_=>{t.handleSSEEvent(_)});We(c,_=>{t.connected=_});function p(_){const T=_.match(/^#session\/([^?]+)(?:\?(.*))?$/);if(!T)return{sessionId:null,tab:null,turn:null};const K=decodeURIComponent(T[1]).trim()||null;if(!K)return{sessionId:null,tab:null,turn:null};const V=new URLSearchParams(T[2]??""),Q=V.get("tab"),D=Q&&o.includes(Q)?Q:null,ae=V.get("turn"),ue=ae?Number.parseInt(ae,10):NaN,O=Number.isFinite(ue)&&ue>0?ue:null;return{sessionId:K,tab:D,turn:O}}function d(_){return Xt([..._.entries].reverse()).filter(T=>T.isMain).map(T=>T.entry)}function m(){if(t.selectionMode!=="pinned")return null;const _=t.selectedSession;if(!_)return null;const T=d(_);if(T.length===0)return null;const z=t.selectedEntryId;if(z==null)return null;const K=T.findIndex(Q=>Q.id===z);if(K<0)return null;const V=K+1;return V<T.length?V:null}function v(_){const T=_.match(/^#compare\/(.+)$/);return T?T[1].split(",").map(z=>decodeURIComponent(z.trim())).filter(Boolean):null}async function w(){n.value=!0;try{const _=window.location.hash||"",T=v(_);if(T&&T.length>=2){const Q=T.filter(D=>t.summaries.some(ae=>ae.id===D));if(Q.length>=2){await t.enterCompare(new Set(Q));return}}const{sessionId:z,tab:K,turn:V}=p(_);if(z){if(!t.summaries.some(D=>D.id===z)){t.setView("dashboard");return}if(await t.selectSession(z),K&&t.setInspectorTab(K),V!=null&&t.selectedSession){const D=d(t.selectedSession);if(D.length>0){const ae=Math.min(Math.max(V,1),D.length);ae<D.length?t.pinEntry(D[ae-1].id):t.followLive()}else t.followLive()}else t.followLive();t.setView("inspector");return}t.setView("dashboard")}finally{n.value=!1}}function I(){if(n.value)return;let _=cl;if(t.view==="compare"&&t.compareSessionIds.size>=2)_=`#compare/${Array.from(t.compareSessionIds).map(z=>encodeURIComponent(z)).join(",")}`;else if(t.view==="inspector"&&t.selectedSessionId){const T=new URLSearchParams;T.set("tab",t.inspectorTab);const z=m();z!=null&&T.set("turn",String(z));const K=T.toString();_=`#session/${encodeURIComponent(t.selectedSessionId)}${K?`?${K}`:""}`}window.location.hash!==_&&(window.location.hash=_)}function S(){w()}return We(()=>{var _;return[t.view,t.selectedSessionId,t.inspectorTab,t.selectionMode,t.selectedEntryId,(_=t.selectedSession)==null?void 0:_.entries.length,t.compareMode,t.compareSessionIds.size]},()=>{I()}),En(async()=>{try{t.initializeDensity(),await t.load(),window.location.hash||(window.location.hash=cl),await w(),window.addEventListener("hashchange",S),i=setInterval(()=>{document.hidden||t.load()},5e3)}finally{s.value=!0}}),ho(()=>{window.removeEventListener("hashchange",S),i&&(clearInterval(i),i=null)}),(_,T)=>(y(),b("div",ob,[Re(Lp),u("div",ib,[s.value?(y(),b(ve,{key:1},[Re(Bn,{name:"rail-slide"},{default:pt(()=>[Y(t).view==="inspector"?(y(),ft(Z0,{key:0})):le("",!0)]),_:1}),u("div",lb,[Re(Bn,{name:l.value},{default:pt(()=>[Y(t).view==="dashboard"?(y(),ft(Kh,{key:"dashboard"})):Y(t).view==="compare"?(y(),ft(Q_,{key:"compare"})):Y(t).view==="inspector"?(y(),b("div",ab,[Y(t).selectedSession?(y(),ft(W0,{key:0})):(y(),b("div",cb,[...T[1]||(T[1]=[u("div",{class:"loading-spinner"},null,-1)])]))])):(y(),ft(sb,{key:"empty"}))]),_:1},8,["name"])])],64)):(y(),b("div",rb,[...T[0]||(T[0]=[u("div",{class:"loading-spinner"},null,-1)])]))])]))}}),db=ct(ub,[["__scopeId","data-v-766f3b5b"]]),Vi=Ca(db);Vi.use(Ud());Vi.use(sp);Vi.mount("#app");