@macintacos/caret 0.10.0 → 0.11.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 (318) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +5 -1
  3. package/commands/debug.md +22 -14
  4. package/dist/cli.js +991 -899
  5. package/opencode/caret.plugin.ts +3 -3
  6. package/opencode/commands/debug.md +14 -8
  7. package/package.json +34 -24
  8. package/ui/dist/assets/actionscript-3-Cs6JJXT5.js +1 -0
  9. package/ui/dist/assets/ahk-CA9gdOdF.js +1 -0
  10. package/ui/dist/assets/ahk2-_6rzW9BS.js +1 -0
  11. package/ui/dist/assets/andromeeda-vGVdxbeo.js +1 -0
  12. package/ui/dist/assets/{angular-html-166Zp_qr.js → angular-html-BCtCrX5a.js} +1 -1
  13. package/ui/dist/assets/{angular-ts-DJf9y5RJ.js → angular-ts-CHydi2Ns.js} +1 -1
  14. package/ui/dist/assets/apex-KFGFyKwG.js +1 -0
  15. package/ui/dist/assets/{apl-BRtDRKgK.js → apl-Drvu7CDf.js} +1 -1
  16. package/ui/dist/assets/{apl-CnwPGSsG.js → apl-gfMMiTNf.js} +1 -1
  17. package/ui/dist/assets/asciiarmor-C_eisQCp.js +1 -0
  18. package/ui/dist/assets/asciidoc-SCjQUq34.js +1 -0
  19. package/ui/dist/assets/{asn1-Dr8qZg38.js → asn1-DCl_8MCW.js} +1 -1
  20. package/ui/dist/assets/{asterisk-Bja0s6e1.js → asterisk-BEn0Cwpx.js} +1 -1
  21. package/ui/dist/assets/{astro-B9_p1ZlX.js → astro-D7QjN1UP.js} +1 -1
  22. package/ui/dist/assets/aurora-x-CDeNXAV0.js +1 -0
  23. package/ui/dist/assets/ayu-dark-DluEY0Gj.js +1 -0
  24. package/ui/dist/assets/ayu-light-C3h-C4tm.js +1 -0
  25. package/ui/dist/assets/ayu-mirage-Bqwy1Gya.js +1 -0
  26. package/ui/dist/assets/{bat-Bo4NYOV-.js → bat-qdxAdBWQ.js} +1 -1
  27. package/ui/dist/assets/bird2-CYIUgYqB.js +1 -0
  28. package/ui/dist/assets/{blade-DUQgH5UI.js → blade-fJMvh-87.js} +1 -1
  29. package/ui/dist/assets/bsl-_VjlB9mv.js +1 -0
  30. package/ui/dist/assets/{c-DkmnqVR5.js → c-CekX8pZk.js} +1 -1
  31. package/ui/dist/assets/c3-D0apG41V.js +1 -0
  32. package/ui/dist/assets/chapel-Yat3WM3Z.js +1 -0
  33. package/ui/dist/assets/clarity-CtfBBspg.js +1 -0
  34. package/ui/dist/assets/clike-D_6L3tnO.js +1 -0
  35. package/ui/dist/assets/cmake-84nbDH0I.js +1 -0
  36. package/ui/dist/assets/{cobol-D_DeO3_Y.js → cobol-CpcYU6QJ.js} +1 -1
  37. package/ui/dist/assets/cobol-DHLQUbN7.js +1 -0
  38. package/ui/dist/assets/{coffee-BlbmSk0s.js → coffee-C83ly5t5.js} +1 -1
  39. package/ui/dist/assets/coffeescript-De_zI4J0.js +1 -0
  40. package/ui/dist/assets/commonlisp-DgAKBe0r.js +1 -0
  41. package/ui/dist/assets/coq-DuBRPxYg.js +1 -0
  42. package/ui/dist/assets/cpp-BkID-Sus.js +1 -0
  43. package/ui/dist/assets/crystal-Bsdphhtm.js +1 -0
  44. package/ui/dist/assets/{crystal-CpLflAjJ.js → crystal-C3Etyhx4.js} +1 -1
  45. package/ui/dist/assets/{css-BVuUbqzr.js → css-BpCnu0V7.js} +1 -1
  46. package/ui/dist/assets/css-CnaYoQib.js +1 -0
  47. package/ui/dist/assets/{d-BhMjBjQP.js → d-DWkQyNnU.js} +1 -1
  48. package/ui/dist/assets/dark-plus-Cs2F2srj.js +1 -0
  49. package/ui/dist/assets/dist-BAGkWecZ.js +1 -0
  50. package/ui/dist/assets/dist-BGMYonjC.js +1 -0
  51. package/ui/dist/assets/dist-BPljwhRM.js +1 -0
  52. package/ui/dist/assets/dist-BRT8QHfd.js +1 -0
  53. package/ui/dist/assets/dist-C18hcQ4P.js +1 -0
  54. package/ui/dist/assets/dist-C83naKOT.js +2 -0
  55. package/ui/dist/assets/dist-CMpTs5ms.js +1 -0
  56. package/ui/dist/assets/dist-CZqH1975.js +9 -0
  57. package/ui/dist/assets/dist-CaX-VV5u.js +1 -0
  58. package/ui/dist/assets/dist-CdQe3tPj.js +1 -0
  59. package/ui/dist/assets/dist-CikfqRw0.js +1 -0
  60. package/ui/dist/assets/dist-DE3I1JlS.js +1 -0
  61. package/ui/dist/assets/dist-DP5L_loZ.js +11 -0
  62. package/ui/dist/assets/dist-DaoC_D4S.js +1 -0
  63. package/ui/dist/assets/dist-DfISJt9o.js +12 -0
  64. package/ui/dist/assets/dist-DhOuKeyt.js +1 -0
  65. package/ui/dist/assets/dist-DigqW6HL.js +1 -0
  66. package/ui/dist/assets/dist-UGYOZkY4.js +1 -0
  67. package/ui/dist/assets/{dockerfile-BLkNEvjs.js → dockerfile-DJkHQgkl.js} +1 -1
  68. package/ui/dist/assets/dracula-soft-5eyTD99u.js +1 -0
  69. package/ui/dist/assets/{dylan-C6jEEEk-.js → dylan-BCDoL_-p.js} +1 -1
  70. package/ui/dist/assets/{ecl-BSZaIHnp.js → ecl-BVIeWmwY.js} +1 -1
  71. package/ui/dist/assets/{edge-Bvaq3vgu.js → edge-D5Zqrwyu.js} +1 -1
  72. package/ui/dist/assets/{elixir-AtYS8b3T.js → elixir-CH9Za_0Q.js} +1 -1
  73. package/ui/dist/assets/{elm-DiPfkLEI.js → elm-BRsxXryd.js} +1 -1
  74. package/ui/dist/assets/emacs-lisp-c_oH4hRZ.js +1 -0
  75. package/ui/dist/assets/{erb-DFPsOHl7.js → erb-BmBctG8H.js} +1 -1
  76. package/ui/dist/assets/{erlang-DaB2Rkuy.js → erlang-BV0c4Hdn.js} +1 -1
  77. package/ui/dist/assets/everforest-dark-sB-x3p7T.js +1 -0
  78. package/ui/dist/assets/everforest-light-Df2xbC6M.js +1 -0
  79. package/ui/dist/assets/{factor-D7LVTn2l.js → factor-LKH5gN8L.js} +1 -1
  80. package/ui/dist/assets/{gdresource-C0sCabJj.js → gdresource-xMC7jr7x.js} +1 -1
  81. package/ui/dist/assets/gdscript-DYvRD3hg.js +1 -0
  82. package/ui/dist/assets/{git-rebase-DOQhjkkB.js → git-rebase-Czmn49GX.js} +1 -1
  83. package/ui/dist/assets/github-dark-C-LZuMrd.js +1 -0
  84. package/ui/dist/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
  85. package/ui/dist/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
  86. package/ui/dist/assets/github-light-EUqPIrTm.js +1 -0
  87. package/ui/dist/assets/github-light-high-contrast-B68TUdTA.js +1 -0
  88. package/ui/dist/assets/{glimmer-js-DnsoKoXj.js → glimmer-js-CPcJ-Kpr.js} +1 -1
  89. package/ui/dist/assets/{glimmer-ts-efCSUcGf.js → glimmer-ts-BNs1wtxL.js} +1 -1
  90. package/ui/dist/assets/{glsl-8mp3VUjq.js → glsl-Qt2fC-Ca.js} +1 -1
  91. package/ui/dist/assets/{graphql-NvuaWD7i.js → graphql-DkQYUTG4.js} +1 -1
  92. package/ui/dist/assets/groovy-CUpZ7dEl.js +1 -0
  93. package/ui/dist/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
  94. package/ui/dist/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
  95. package/ui/dist/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
  96. package/ui/dist/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
  97. package/ui/dist/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
  98. package/ui/dist/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
  99. package/ui/dist/assets/hack-CxhNZd7u.js +1 -0
  100. package/ui/dist/assets/{haml-Dzosfq8Y.js → haml-CsxFxMDV.js} +1 -1
  101. package/ui/dist/assets/{handlebars-tKuTe0db.js → handlebars-BdiOITvu.js} +1 -1
  102. package/ui/dist/assets/haxe-C8oCnwJJ.js +1 -0
  103. package/ui/dist/assets/{haxe-DIz0ZZqd.js → haxe-DjVOVvNP.js} +1 -1
  104. package/ui/dist/assets/horizon-CE9ld1lL.js +1 -0
  105. package/ui/dist/assets/horizon-bright-DSNQnXHK.js +1 -0
  106. package/ui/dist/assets/houston-CsvMBhTu.js +1 -0
  107. package/ui/dist/assets/{html-JqbgrVrs.js → html-QiZEf_SK.js} +1 -1
  108. package/ui/dist/assets/{html-derivative-0a3abtuv.js → html-derivative-CH1IZbFQ.js} +1 -1
  109. package/ui/dist/assets/{http-DMJqqRWL.js → http-B3cBswFA.js} +1 -1
  110. package/ui/dist/assets/{hurl-N2MzWbSO.js → hurl-CxLSuJlC.js} +1 -1
  111. package/ui/dist/assets/hxml-Dcm88srW.js +1 -0
  112. package/ui/dist/assets/index-DqObFNfe.js +5980 -0
  113. package/ui/dist/assets/index-MiIbURI7.css +1 -0
  114. package/ui/dist/assets/{java-B3EVVFFi.js → java-BofMVjSW.js} +1 -1
  115. package/ui/dist/assets/{javascript-Y0fZ_N_R.js → javascript-CXxuBuBv.js} +1 -1
  116. package/ui/dist/assets/javascript-DoL9Wb-Q.js +1 -0
  117. package/ui/dist/assets/{jinja-BD-QmqJ0.js → jinja-CR6mlgq7.js} +1 -1
  118. package/ui/dist/assets/{jison-BK-X5L2R.js → jison-Lnun11yb.js} +1 -1
  119. package/ui/dist/assets/{json-DlHOOSIb.js → json-CN58fVYV.js} +1 -1
  120. package/ui/dist/assets/{jsx-XohAHRMn.js → jsx-DCoYQRrE.js} +1 -1
  121. package/ui/dist/assets/{julia-BBLrPT8A.js → julia-BTSVBcvZ.js} +1 -1
  122. package/ui/dist/assets/{just-DEry_8sa.js → just-BHXaIZ4_.js} +1 -1
  123. package/ui/dist/assets/kanagawa-dragon-Bozd7klA.js +1 -0
  124. package/ui/dist/assets/kanagawa-lotus-BmuOG9ZW.js +1 -0
  125. package/ui/dist/assets/kanagawa-wave-BML5mF2J.js +1 -0
  126. package/ui/dist/assets/laserwave-C_8bwKvT.js +1 -0
  127. package/ui/dist/assets/latex-4pZhxAuK.js +1 -0
  128. package/ui/dist/assets/light-plus-DVQuIRkW.js +1 -0
  129. package/ui/dist/assets/{liquid-ZtUmbkDf.js → liquid-BKD3U_oR.js} +1 -1
  130. package/ui/dist/assets/{llvm-Cm23YOpf.js → llvm-DqHOMS-s.js} +1 -1
  131. package/ui/dist/assets/{lua-BmOQjHgA.js → lua-CTFIANPX.js} +1 -1
  132. package/ui/dist/assets/luau-C2pBCSgt.js +1 -0
  133. package/ui/dist/assets/{marko-BXMGyPGo.js → marko-ChHXPgtx.js} +1 -1
  134. package/ui/dist/assets/material-theme-Bm3Qr25_.js +1 -0
  135. package/ui/dist/assets/material-theme-darker-2IIEA8gg.js +1 -0
  136. package/ui/dist/assets/material-theme-lighter-uhdI0v04.js +1 -0
  137. package/ui/dist/assets/material-theme-ocean-CHQ94UKr.js +1 -0
  138. package/ui/dist/assets/material-theme-palenight-B5W6OYN7.js +1 -0
  139. package/ui/dist/assets/mdc-DUuqpwFU.js +1 -0
  140. package/ui/dist/assets/mermaid-BxpfTIzt.js +1 -0
  141. package/ui/dist/assets/min-dark-BSWPekZh.js +1 -0
  142. package/ui/dist/assets/min-light-DDpmG2fV.js +1 -0
  143. package/ui/dist/assets/mojo-fg40_ntQ.js +1 -0
  144. package/ui/dist/assets/monokai-B_bV9PQ9.js +1 -0
  145. package/ui/dist/assets/moonbit-DgjMoLWr.js +1 -0
  146. package/ui/dist/assets/move-BYnGhZoM.js +1 -0
  147. package/ui/dist/assets/{mumps-CW_TBmxz.js → mumps-BSzj6Xyz.js} +1 -1
  148. package/ui/dist/assets/{nginx-BrQiZd4C.js → nginx-T0b5wlEx.js} +1 -1
  149. package/ui/dist/assets/night-owl-DhmEMT88.js +1 -0
  150. package/ui/dist/assets/night-owl-light-eJ-hLW7d.js +1 -0
  151. package/ui/dist/assets/{nim-Ceo1IkbE.js → nim-85DDTDOp.js} +1 -1
  152. package/ui/dist/assets/nord-Cb4Vim4T.js +1 -0
  153. package/ui/dist/assets/{nsis-AQ_alPln.js → nsis-CfSuhXs5.js} +1 -1
  154. package/ui/dist/assets/nsis-CjNLYCLg.js +1 -0
  155. package/ui/dist/assets/{ntriples-d28e9m0E.js → ntriples-B9h1VB_g.js} +1 -1
  156. package/ui/dist/assets/nushell-DHYfO66s.js +1 -0
  157. package/ui/dist/assets/one-dark-pro-CLwyXe_n.js +1 -0
  158. package/ui/dist/assets/one-light-D7Lr4KcI.js +1 -0
  159. package/ui/dist/assets/org-YVLZnOmG.js +1 -0
  160. package/ui/dist/assets/perl-BkSkiI9m.js +1 -0
  161. package/ui/dist/assets/{perl-Bum057xI.js → perl-DvhyK2f5.js} +1 -1
  162. package/ui/dist/assets/{php-DcJ8ynWT.js → php-BHJ0Y1qf.js} +1 -1
  163. package/ui/dist/assets/plastic-DQwYfKfQ.js +1 -0
  164. package/ui/dist/assets/poimandres-DRFjx7u4.js +1 -0
  165. package/ui/dist/assets/{powershell-CzG71I4L.js → powershell-BcIto6Sf.js} +1 -1
  166. package/ui/dist/assets/{powershell-DshXNtvi.js → powershell-CCSX75yM.js} +1 -1
  167. package/ui/dist/assets/prisma-DMgNhnYS.js +1 -0
  168. package/ui/dist/assets/{pug-Bugr-47h.js → pug-Gsm0M45u.js} +1 -1
  169. package/ui/dist/assets/{pug-CA9Zezth.js → pug-Kw39Rh1n.js} +1 -1
  170. package/ui/dist/assets/puppet-BZyAS7I4.js +1 -0
  171. package/ui/dist/assets/python-B_1Jd8HM.js +1 -0
  172. package/ui/dist/assets/{qml-BHS1pXn9.js → qml-B658j8AE.js} +1 -1
  173. package/ui/dist/assets/r-CR7aKAa8.js +1 -0
  174. package/ui/dist/assets/r-CxDmU1I4.js +1 -0
  175. package/ui/dist/assets/{razor-BXH-K44T.js → razor-C-sVKuwt.js} +1 -1
  176. package/ui/dist/assets/rbs-C0MpOrj4.js +1 -0
  177. package/ui/dist/assets/red-DX1BQOs8.js +1 -0
  178. package/ui/dist/assets/{regexp-DUs7aoKy.js → regexp-DxGFa2i7.js} +1 -1
  179. package/ui/dist/assets/rose-pine-aMsaMD1D.js +1 -0
  180. package/ui/dist/assets/rose-pine-dawn-8PwUyIlP.js +1 -0
  181. package/ui/dist/assets/rose-pine-moon-DO-qXg-I.js +1 -0
  182. package/ui/dist/assets/{rst-DCrs7vP-.js → rst-CSAcRVJs.js} +1 -1
  183. package/ui/dist/assets/ruby-BjXV7-Qa.js +1 -0
  184. package/ui/dist/assets/{ruby-0-lN-lO6.js → ruby-nwXRunGb.js} +1 -1
  185. package/ui/dist/assets/{sas-B-GmRmDQ.js → sas-bPI1gB4G.js} +1 -1
  186. package/ui/dist/assets/{scala-DKOlJaKm.js → scala-BiFt_7mu.js} +1 -1
  187. package/ui/dist/assets/scheme-D9qYN0V5.js +1 -0
  188. package/ui/dist/assets/{scss-oB6C5dt1.js → scss-pEDYjvcR.js} +1 -1
  189. package/ui/dist/assets/{shell-Du5Qg9im.js → shell-DwuoZtxw.js} +1 -1
  190. package/ui/dist/assets/{shellscript-BDueQ3Pr.js → shellscript-BMqUwS6Q.js} +1 -1
  191. package/ui/dist/assets/{shellsession-snwU-yjZ.js → shellsession-DNtYOelF.js} +1 -1
  192. package/ui/dist/assets/{simple-mode-DRpGK0lJ.js → simple-mode-DXiLM1-G.js} +1 -1
  193. package/ui/dist/assets/slack-dark-DnToyrRv.js +1 -0
  194. package/ui/dist/assets/slack-ochin-B2OO5cIa.js +1 -0
  195. package/ui/dist/assets/smalltalk-BHpQb5nM.js +1 -0
  196. package/ui/dist/assets/smithy-Dgaz7aur.js +1 -0
  197. package/ui/dist/assets/snazzy-light-4G7pJPwS.js +1 -0
  198. package/ui/dist/assets/solarized-dark-UdsmMDCL.js +1 -0
  199. package/ui/dist/assets/solarized-light-C1IUL_tW.js +1 -0
  200. package/ui/dist/assets/solidity-Bj7E1mRn.js +1 -0
  201. package/ui/dist/assets/{soy-1UzSzCS_.js → soy-DnnesykU.js} +1 -1
  202. package/ui/dist/assets/sql-DuQMFDvy.js +1 -0
  203. package/ui/dist/assets/{sql-_8rHrLe0.js → sql-zhmnw-Qu.js} +1 -1
  204. package/ui/dist/assets/{stata-BFBQv4-R.js → stata-DL2EuIvP.js} +1 -1
  205. package/ui/dist/assets/{stex-sDrdk2BW.js → stex-DNzd62Q_.js} +1 -1
  206. package/ui/dist/assets/{stylus-DLLZ8dgm.js → stylus-BOVgKnng.js} +1 -1
  207. package/ui/dist/assets/surrealql-CWt3zqL2.js +1 -0
  208. package/ui/dist/assets/{svelte-COzcYWbs.js → svelte-DCo3F0ZU.js} +1 -1
  209. package/ui/dist/assets/swift-CyEgAFGc.js +1 -0
  210. package/ui/dist/assets/synthwave-84-nFMaYfgc.js +1 -0
  211. package/ui/dist/assets/system-verilog-Dh5ihWbf.js +1 -0
  212. package/ui/dist/assets/{templ-CIF5RvVU.js → templ-LSVSbai1.js} +1 -1
  213. package/ui/dist/assets/tex-9pbj95aK.js +1 -0
  214. package/ui/dist/assets/textile-C4jVoHG1.js +1 -0
  215. package/ui/dist/assets/tiki-AK6FwT8q.js +1 -0
  216. package/ui/dist/assets/tokyo-night-oM2G3aXe.js +1 -0
  217. package/ui/dist/assets/toml-BPTmHmyx.js +1 -0
  218. package/ui/dist/assets/{ts-tags-Bb-cll5a.js → ts-tags-CW8KiYYw.js} +1 -1
  219. package/ui/dist/assets/{tsx-B_TJQczU.js → tsx-H15NQblA.js} +1 -1
  220. package/ui/dist/assets/{ttcn-BePYh-hG.js → ttcn-PPSTk1ow.js} +1 -1
  221. package/ui/dist/assets/{ttcn-cfg-CY0aot7Q.js → ttcn-cfg-2b4Gb5sE.js} +1 -1
  222. package/ui/dist/assets/turtle-Cx3rYX2g.js +1 -0
  223. package/ui/dist/assets/twig-gygTtTHa.js +1 -0
  224. package/ui/dist/assets/{typescript-Ii543U_f.js → typescript-DAM7c_vC.js} +1 -1
  225. package/ui/dist/assets/typst-DiLVywPa.js +1 -0
  226. package/ui/dist/assets/{v-DETTlOr0.js → v-DBj4K9d_.js} +1 -1
  227. package/ui/dist/assets/{vb-Djn5o6TS.js → vb-DOwzaHZ0.js} +1 -1
  228. package/ui/dist/assets/{verilog-D-x6ne0Z.js → verilog-7LoJAqYT.js} +1 -1
  229. package/ui/dist/assets/verilog-B2gwz-sJ.js +1 -0
  230. package/ui/dist/assets/vesper-DdrHHSXu.js +1 -0
  231. package/ui/dist/assets/vhdl-kS471soi.js +1 -0
  232. package/ui/dist/assets/vitesse-black-fwtXNY1n.js +1 -0
  233. package/ui/dist/assets/vitesse-dark-BZCL-v6S.js +1 -0
  234. package/ui/dist/assets/vitesse-light-VbXTXTou.js +1 -0
  235. package/ui/dist/assets/{vue-CGYOL_ei.js → vue-DRQFPwfE.js} +1 -1
  236. package/ui/dist/assets/{vue-html-DJiTs0pH.js → vue-html-vjHeecsY.js} +1 -1
  237. package/ui/dist/assets/{vue-vine-BWgBzdhj.js → vue-vine-BUoL6GNl.js} +1 -1
  238. package/ui/dist/assets/{xml-wwBhpto-.js → xml-1zKw7rGe.js} +1 -1
  239. package/ui/dist/assets/{xquery-fj_R-kMw.js → xquery-BKJx4mf9.js} +1 -1
  240. package/ui/dist/assets/{xsl-ia_QpSvH.js → xsl-D_pz-oBz.js} +1 -1
  241. package/ui/dist/assets/{yaml-DPR0vpXc.js → yaml-DVXHqHg_.js} +1 -1
  242. package/ui/dist/assets/z80-Co3PbHdE.js +1 -0
  243. package/ui/dist/index.html +3 -2
  244. package/ui/dist/assets/actionscript-3--17pq3dv.js +0 -1
  245. package/ui/dist/assets/apex-VAyPSnFM.js +0 -1
  246. package/ui/dist/assets/asciiarmor-qTkVPQu6.js +0 -1
  247. package/ui/dist/assets/asciidoc-DE70LPWp.js +0 -1
  248. package/ui/dist/assets/bird2-C6vDhewU.js +0 -1
  249. package/ui/dist/assets/bsl-BkkzgIyY.js +0 -1
  250. package/ui/dist/assets/c3-BFHwR3_K.js +0 -1
  251. package/ui/dist/assets/clarity-SemFz856.js +0 -1
  252. package/ui/dist/assets/clike-DHH8Ad3s.js +0 -1
  253. package/ui/dist/assets/cmake-CyVbuzPu.js +0 -1
  254. package/ui/dist/assets/cobol-B_OZ4V-R.js +0 -1
  255. package/ui/dist/assets/coffeescript-B2pKbFk8.js +0 -1
  256. package/ui/dist/assets/commonlisp-CcllspGY.js +0 -1
  257. package/ui/dist/assets/coq-BrsZFFmf.js +0 -1
  258. package/ui/dist/assets/cpp-C-2HRkcc.js +0 -1
  259. package/ui/dist/assets/crystal-M5-qzICs.js +0 -1
  260. package/ui/dist/assets/css-CYpP4FRV.js +0 -1
  261. package/ui/dist/assets/dist-B9dAYtn2.js +0 -1
  262. package/ui/dist/assets/dist-BtZ4f0sy.js +0 -9
  263. package/ui/dist/assets/dist-BxKUx0iz.js +0 -1
  264. package/ui/dist/assets/dist-CmhY3KNJ.js +0 -1
  265. package/ui/dist/assets/dist-D-vK_12F.js +0 -1
  266. package/ui/dist/assets/dist-D1hccSXB.js +0 -1
  267. package/ui/dist/assets/dist-DWjpoB5Q.js +0 -1
  268. package/ui/dist/assets/dist-Dd0x4Lgi.js +0 -1
  269. package/ui/dist/assets/dist-Deoj7mVd.js +0 -11
  270. package/ui/dist/assets/dist-DtJjv6C-.js +0 -1
  271. package/ui/dist/assets/dist-DyJyAkU7.js +0 -1
  272. package/ui/dist/assets/dist-DzbZtok6.js +0 -2
  273. package/ui/dist/assets/dist-Jn2c79bF.js +0 -1
  274. package/ui/dist/assets/dist-WBctQMJH.js +0 -1
  275. package/ui/dist/assets/dist-nPPt0-3f.js +0 -1
  276. package/ui/dist/assets/dist-qtw8Ijdq.js +0 -1
  277. package/ui/dist/assets/dist-vj9fsPbi.js +0 -1
  278. package/ui/dist/assets/emacs-lisp-B4R74twV.js +0 -1
  279. package/ui/dist/assets/gdscript-Cp2uCuqX.js +0 -1
  280. package/ui/dist/assets/groovy-BC3IOsC8.js +0 -1
  281. package/ui/dist/assets/hack-BJ5H84Wq.js +0 -1
  282. package/ui/dist/assets/haxe-OTjmBuCE.js +0 -1
  283. package/ui/dist/assets/hxml-B0Qn7Nwc.js +0 -1
  284. package/ui/dist/assets/index-BMSMV2hN.css +0 -1
  285. package/ui/dist/assets/index-C_IKB4Ku.js +0 -2501
  286. package/ui/dist/assets/javascript-9Tg8ixDm.js +0 -1
  287. package/ui/dist/assets/latex-BuCB4qwR.js +0 -1
  288. package/ui/dist/assets/luau-FMPmPwt6.js +0 -1
  289. package/ui/dist/assets/mdc-Byn32K04.js +0 -1
  290. package/ui/dist/assets/mermaid-Bk4SNUv9.js +0 -1
  291. package/ui/dist/assets/mojo-BgCJLMeH.js +0 -1
  292. package/ui/dist/assets/moonbit-CaWjb8XO.js +0 -1
  293. package/ui/dist/assets/move-B1IS1UjX.js +0 -1
  294. package/ui/dist/assets/nushell-DcLAeLz5.js +0 -1
  295. package/ui/dist/assets/perl-CdEHsPfU.js +0 -1
  296. package/ui/dist/assets/prisma-BsRQq5mF.js +0 -1
  297. package/ui/dist/assets/puppet-B4hC2X4m.js +0 -1
  298. package/ui/dist/assets/python-BqYw9LYJ.js +0 -1
  299. package/ui/dist/assets/r-B4aRkCWL.js +0 -1
  300. package/ui/dist/assets/r-DADKenSm.js +0 -1
  301. package/ui/dist/assets/ruby-DsYpTuWg.js +0 -1
  302. package/ui/dist/assets/scheme-CyDdOh7e.js +0 -1
  303. package/ui/dist/assets/smalltalk-B16xEiuN.js +0 -1
  304. package/ui/dist/assets/solidity-CKzVLygQ.js +0 -1
  305. package/ui/dist/assets/sql-DcCJ9jop.js +0 -1
  306. package/ui/dist/assets/surrealql-C-hPyRoi.js +0 -1
  307. package/ui/dist/assets/swift-DonLKvLd.js +0 -1
  308. package/ui/dist/assets/system-verilog-DJ5XKQeo.js +0 -1
  309. package/ui/dist/assets/tex-DiIjyX_E.js +0 -1
  310. package/ui/dist/assets/textile-DWBqthVk.js +0 -1
  311. package/ui/dist/assets/tiki-CxVlf5KZ.js +0 -1
  312. package/ui/dist/assets/toml-LvoKBwCs.js +0 -1
  313. package/ui/dist/assets/turtle-BDLWE2cD.js +0 -1
  314. package/ui/dist/assets/twig-B2bev-dI.js +0 -1
  315. package/ui/dist/assets/typst-DI99ib-x.js +0 -1
  316. package/ui/dist/assets/verilog-CiiDBU1e.js +0 -1
  317. package/ui/dist/assets/vhdl-CMrOq2q1.js +0 -1
  318. package/ui/dist/assets/z80-CL1naaMV.js +0 -1
package/dist/cli.js CHANGED
@@ -2508,7 +2508,7 @@ var require_thread_stream = __commonJS((exports, module) => {
2508
2508
  var require_transport = __commonJS((exports, module) => {
2509
2509
  var __dirname = "/Users/juliantorres/GitLocal/Play/caret/trunk/node_modules/.bun/pino@10.3.1/node_modules/pino/lib";
2510
2510
  var { createRequire } = __require("module");
2511
- var { existsSync: existsSync4 } = __require("fs");
2511
+ var { existsSync: existsSync5 } = __require("fs");
2512
2512
  var getCallers = require_caller();
2513
2513
  var { join: join7, isAbsolute, sep } = __require("path");
2514
2514
  var { fileURLToPath: fileURLToPath2 } = __require("url");
@@ -2582,7 +2582,7 @@ var require_transport = __commonJS((exports, module) => {
2582
2582
  return false;
2583
2583
  }
2584
2584
  }
2585
- return isAbsolute(path) && !existsSync4(path);
2585
+ return isAbsolute(path) && !existsSync5(path);
2586
2586
  }
2587
2587
  function stripQuotes(value) {
2588
2588
  const first = value[0];
@@ -5803,7 +5803,7 @@ __export(exports_dist, {
5803
5803
  });
5804
5804
  import { styleText as styleText2, stripVTControlCharacters } from "util";
5805
5805
  import process$1 from "process";
5806
- import { existsSync as existsSync10, lstatSync, readdirSync as readdirSync5 } from "fs";
5806
+ import { existsSync as existsSync11, lstatSync, readdirSync as readdirSync6 } from "fs";
5807
5807
  import { dirname as dirname8, join as join14 } from "path";
5808
5808
  function isUnicodeSupported() {
5809
5809
  if (process$1.platform !== "win32") {
@@ -6515,9 +6515,9 @@ ${n3}
6515
6515
  return [];
6516
6516
  try {
6517
6517
  let i;
6518
- existsSync10(t2) ? lstatSync(t2).isDirectory() && (!e.directory || t2.endsWith("/")) ? i = t2 : i = dirname8(t2) : i = dirname8(t2);
6518
+ existsSync11(t2) ? lstatSync(t2).isDirectory() && (!e.directory || t2.endsWith("/")) ? i = t2 : i = dirname8(t2) : i = dirname8(t2);
6519
6519
  const c2 = t2.length > 1 && t2.endsWith("/") ? t2.slice(0, -1) : t2;
6520
- return readdirSync5(i).map((r2) => {
6520
+ return readdirSync6(i).map((r2) => {
6521
6521
  const n3 = join14(i, r2), m3 = lstatSync(n3);
6522
6522
  return {
6523
6523
  name: r2,
@@ -7216,190 +7216,7 @@ import { readFileSync as readFileSync2 } from "fs";
7216
7216
  import { homedir as homedir2 } from "os";
7217
7217
  import { join as join2 } from "path";
7218
7218
 
7219
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/error.js
7220
- /*!
7221
- * Copyright (c) Squirrel Chat et al., All rights reserved.
7222
- * SPDX-License-Identifier: BSD-3-Clause
7223
- *
7224
- * Redistribution and use in source and binary forms, with or without
7225
- * modification, are permitted provided that the following conditions are met:
7226
- *
7227
- * 1. Redistributions of source code must retain the above copyright notice, this
7228
- * list of conditions and the following disclaimer.
7229
- * 2. Redistributions in binary form must reproduce the above copyright notice,
7230
- * this list of conditions and the following disclaimer in the
7231
- * documentation and/or other materials provided with the distribution.
7232
- * 3. Neither the name of the copyright holder nor the names of its contributors
7233
- * may be used to endorse or promote products derived from this software without
7234
- * specific prior written permission.
7235
- *
7236
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
7237
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7238
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7239
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
7240
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7241
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
7242
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
7243
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7244
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7245
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7246
- */
7247
- function getLineColFromPtr(string, ptr) {
7248
- let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
7249
- return [lines.length, lines.pop().length + 1];
7250
- }
7251
- function makeCodeBlock(string, line, column) {
7252
- let lines = string.split(/\r\n|\n|\r/g);
7253
- let codeblock = "";
7254
- let numberLen = (Math.log10(line + 1) | 0) + 1;
7255
- for (let i = line - 1;i <= line + 1; i++) {
7256
- let l = lines[i - 1];
7257
- if (!l)
7258
- continue;
7259
- codeblock += i.toString().padEnd(numberLen, " ");
7260
- codeblock += ": ";
7261
- codeblock += l;
7262
- codeblock += `
7263
- `;
7264
- if (i === line) {
7265
- codeblock += " ".repeat(numberLen + column + 2);
7266
- codeblock += `^
7267
- `;
7268
- }
7269
- }
7270
- return codeblock;
7271
- }
7272
-
7273
- class TomlError extends Error {
7274
- line;
7275
- column;
7276
- codeblock;
7277
- constructor(message, options) {
7278
- const [line, column] = getLineColFromPtr(options.toml, options.ptr);
7279
- const codeblock = makeCodeBlock(options.toml, line, column);
7280
- super(`Invalid TOML document: ${message}
7281
-
7282
- ${codeblock}`, options);
7283
- this.line = line;
7284
- this.column = column;
7285
- this.codeblock = codeblock;
7286
- }
7287
- }
7288
-
7289
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/util.js
7290
- /*!
7291
- * Copyright (c) Squirrel Chat et al., All rights reserved.
7292
- * SPDX-License-Identifier: BSD-3-Clause
7293
- *
7294
- * Redistribution and use in source and binary forms, with or without
7295
- * modification, are permitted provided that the following conditions are met:
7296
- *
7297
- * 1. Redistributions of source code must retain the above copyright notice, this
7298
- * list of conditions and the following disclaimer.
7299
- * 2. Redistributions in binary form must reproduce the above copyright notice,
7300
- * this list of conditions and the following disclaimer in the
7301
- * documentation and/or other materials provided with the distribution.
7302
- * 3. Neither the name of the copyright holder nor the names of its contributors
7303
- * may be used to endorse or promote products derived from this software without
7304
- * specific prior written permission.
7305
- *
7306
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
7307
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7308
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7309
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
7310
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7311
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
7312
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
7313
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7314
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7315
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7316
- */
7317
- function isEscaped(str, ptr) {
7318
- let i = 0;
7319
- while (str[ptr - ++i] === "\\")
7320
- ;
7321
- return --i && i % 2;
7322
- }
7323
- function indexOfNewline(str, start = 0, end = str.length) {
7324
- let idx = str.indexOf(`
7325
- `, start);
7326
- if (str[idx - 1] === "\r")
7327
- idx--;
7328
- return idx <= end ? idx : -1;
7329
- }
7330
- function skipComment(str, ptr) {
7331
- for (let i = ptr;i < str.length; i++) {
7332
- let c = str[i];
7333
- if (c === `
7334
- `)
7335
- return i;
7336
- if (c === "\r" && str[i + 1] === `
7337
- `)
7338
- return i + 1;
7339
- if (c < " " && c !== "\t" || c === "\x7F") {
7340
- throw new TomlError("control characters are not allowed in comments", {
7341
- toml: str,
7342
- ptr
7343
- });
7344
- }
7345
- }
7346
- return str.length;
7347
- }
7348
- function skipVoid(str, ptr, banNewLines, banComments) {
7349
- let c;
7350
- while (true) {
7351
- while ((c = str[ptr]) === " " || c === "\t" || !banNewLines && (c === `
7352
- ` || c === "\r" && str[ptr + 1] === `
7353
- `))
7354
- ptr++;
7355
- if (banComments || c !== "#")
7356
- break;
7357
- ptr = skipComment(str, ptr);
7358
- }
7359
- return ptr;
7360
- }
7361
- function skipUntil(str, ptr, sep, end, banNewLines = false) {
7362
- if (!end) {
7363
- ptr = indexOfNewline(str, ptr);
7364
- return ptr < 0 ? str.length : ptr;
7365
- }
7366
- for (let i = ptr;i < str.length; i++) {
7367
- let c = str[i];
7368
- if (c === "#") {
7369
- i = indexOfNewline(str, i);
7370
- } else if (c === sep) {
7371
- return i + 1;
7372
- } else if (c === end || banNewLines && (c === `
7373
- ` || c === "\r" && str[i + 1] === `
7374
- `)) {
7375
- return i;
7376
- }
7377
- }
7378
- throw new TomlError("cannot find end of structure", {
7379
- toml: str,
7380
- ptr
7381
- });
7382
- }
7383
- function getStringEnd(str, seek) {
7384
- let first = str[seek];
7385
- let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
7386
- seek += target.length - 1;
7387
- do
7388
- seek = str.indexOf(target, ++seek);
7389
- while (seek > -1 && first !== "'" && isEscaped(str, seek));
7390
- if (seek > -1) {
7391
- seek += target.length;
7392
- if (target.length > 1) {
7393
- if (str[seek] === first)
7394
- seek++;
7395
- if (str[seek] === first)
7396
- seek++;
7397
- }
7398
- }
7399
- return seek;
7400
- }
7401
-
7402
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/date.js
7219
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/date.js
7403
7220
  /*!
7404
7221
  * Copyright (c) Squirrel Chat et al., All rights reserved.
7405
7222
  * SPDX-License-Identifier: BSD-3-Clause
@@ -7519,7 +7336,160 @@ class TomlDate extends Date {
7519
7336
  }
7520
7337
  }
7521
7338
 
7522
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/primitive.js
7339
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/error.js
7340
+ /*!
7341
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
7342
+ * SPDX-License-Identifier: BSD-3-Clause
7343
+ *
7344
+ * Redistribution and use in source and binary forms, with or without
7345
+ * modification, are permitted provided that the following conditions are met:
7346
+ *
7347
+ * 1. Redistributions of source code must retain the above copyright notice, this
7348
+ * list of conditions and the following disclaimer.
7349
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
7350
+ * this list of conditions and the following disclaimer in the
7351
+ * documentation and/or other materials provided with the distribution.
7352
+ * 3. Neither the name of the copyright holder nor the names of its contributors
7353
+ * may be used to endorse or promote products derived from this software without
7354
+ * specific prior written permission.
7355
+ *
7356
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
7357
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7358
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7359
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
7360
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7361
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
7362
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
7363
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7364
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7365
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7366
+ */
7367
+ function getLineColFromPtr(string, ptr) {
7368
+ let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
7369
+ return [lines.length, lines.pop().length + 1];
7370
+ }
7371
+ function makeCodeBlock(string, line, column) {
7372
+ let lines = string.split(/\r\n|\n|\r/g);
7373
+ let codeblock = "";
7374
+ let numberLen = (Math.log10(line + 1) | 0) + 1;
7375
+ for (let i = line - 1;i <= line + 1; i++) {
7376
+ let l = lines[i - 1];
7377
+ if (!l)
7378
+ continue;
7379
+ codeblock += i.toString().padEnd(numberLen, " ");
7380
+ codeblock += ": ";
7381
+ codeblock += l;
7382
+ codeblock += `
7383
+ `;
7384
+ if (i === line) {
7385
+ codeblock += " ".repeat(numberLen + column + 2);
7386
+ codeblock += `^
7387
+ `;
7388
+ }
7389
+ }
7390
+ return codeblock;
7391
+ }
7392
+
7393
+ class TomlError extends Error {
7394
+ line;
7395
+ column;
7396
+ codeblock;
7397
+ constructor(message, options) {
7398
+ const [line, column] = getLineColFromPtr(options.toml, options.ptr);
7399
+ const codeblock = makeCodeBlock(options.toml, line, column);
7400
+ super(`Invalid TOML document: ${message}
7401
+
7402
+ ${codeblock}`, options);
7403
+ this.line = line;
7404
+ this.column = column;
7405
+ this.codeblock = codeblock;
7406
+ }
7407
+ }
7408
+
7409
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/util.js
7410
+ /*!
7411
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
7412
+ * SPDX-License-Identifier: BSD-3-Clause
7413
+ *
7414
+ * Redistribution and use in source and binary forms, with or without
7415
+ * modification, are permitted provided that the following conditions are met:
7416
+ *
7417
+ * 1. Redistributions of source code must retain the above copyright notice, this
7418
+ * list of conditions and the following disclaimer.
7419
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
7420
+ * this list of conditions and the following disclaimer in the
7421
+ * documentation and/or other materials provided with the distribution.
7422
+ * 3. Neither the name of the copyright holder nor the names of its contributors
7423
+ * may be used to endorse or promote products derived from this software without
7424
+ * specific prior written permission.
7425
+ *
7426
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
7427
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7428
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7429
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
7430
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7431
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
7432
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
7433
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7434
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7435
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7436
+ */
7437
+ function indexOfNewline(str, start = 0) {
7438
+ let idx = str.indexOf(`
7439
+ `, start);
7440
+ if (str.charCodeAt(idx - 1) === 13)
7441
+ idx--;
7442
+ return idx;
7443
+ }
7444
+ function skipComment(ctx) {
7445
+ for (;ctx.p < ctx.s.length; ctx.p++) {
7446
+ let c = ctx.s.charCodeAt(ctx.p);
7447
+ if (c === 10)
7448
+ break;
7449
+ if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10) {
7450
+ ctx.p++;
7451
+ break;
7452
+ }
7453
+ if (c < 32 && c !== 9 || c === 127) {
7454
+ throw new TomlError("control characters are not allowed in comments", {
7455
+ toml: ctx.s,
7456
+ ptr: ctx.p
7457
+ });
7458
+ }
7459
+ }
7460
+ }
7461
+ function skipVoid(ctx, banNewLines, banComments) {
7462
+ let c;
7463
+ while (true) {
7464
+ while ((c = ctx.s.charCodeAt(ctx.p)) === 32 || c === 9 || !banNewLines && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10))
7465
+ ctx.p++;
7466
+ if (banComments || c !== 35)
7467
+ break;
7468
+ skipComment(ctx);
7469
+ }
7470
+ }
7471
+ function skipUntil(ctx, sep, end) {
7472
+ let ptr = ctx.p;
7473
+ if (!end) {
7474
+ ptr = indexOfNewline(ctx.s, ptr);
7475
+ ctx.p = ptr < 0 ? ctx.s.length : ptr;
7476
+ return;
7477
+ }
7478
+ for (;ctx.p < ctx.s.length; ctx.p++) {
7479
+ let c = ctx.s.charCodeAt(ctx.p);
7480
+ if (c === 35) {
7481
+ skipComment(ctx);
7482
+ } else if (c === end || c === sep) {
7483
+ return;
7484
+ }
7485
+ }
7486
+ throw new TomlError("cannot find end of structure", {
7487
+ toml: ctx.s,
7488
+ ptr
7489
+ });
7490
+ }
7491
+
7492
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/primitive.js
7523
7493
  /*!
7524
7494
  * Copyright (c) Squirrel Chat et al., All rights reserved.
7525
7495
  * SPDX-License-Identifier: BSD-3-Clause
@@ -7550,101 +7520,117 @@ class TomlDate extends Date {
7550
7520
  var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
7551
7521
  var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
7552
7522
  var LEADING_ZERO = /^[+-]?0[0-9_]/;
7553
- var ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
7554
- var ESC_MAP = {
7555
- b: "\b",
7556
- t: "\t",
7557
- n: `
7558
- `,
7559
- f: "\f",
7560
- r: "\r",
7561
- e: "\x1B",
7562
- '"': '"',
7563
- "\\": "\\"
7564
- };
7565
- function parseString(str, ptr = 0, endPtr = str.length) {
7566
- let isLiteral = str[ptr] === "'";
7567
- let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
7523
+ function parseString(ctx) {
7524
+ let start = ctx.p;
7525
+ let c = ctx.s.charCodeAt(ctx.p++);
7526
+ let first = c;
7527
+ let isLiteral = c === 39;
7528
+ let isMultiline = c === ctx.s.charCodeAt(ctx.p) && c === ctx.s.charCodeAt(ctx.p + 1);
7568
7529
  if (isMultiline) {
7569
- endPtr -= 2;
7570
- if (str[ptr += 2] === "\r")
7571
- ptr++;
7572
- if (str[ptr] === `
7573
- `)
7574
- ptr++;
7575
- }
7576
- let tmp = 0;
7577
- let isEscape;
7530
+ if ((c = ctx.s.charCodeAt(ctx.p += 2)) === 10)
7531
+ ctx.p++;
7532
+ else if (c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)
7533
+ ctx.p += 2;
7534
+ }
7578
7535
  let parsed = "";
7579
- let sliceStart = ptr;
7580
- while (ptr < endPtr - 1) {
7581
- let c = str[ptr++];
7582
- if (c === `
7583
- ` || c === "\r" && str[ptr] === `
7584
- `) {
7585
- if (!isMultiline) {
7586
- throw new TomlError("newlines are not allowed in strings", {
7587
- toml: str,
7588
- ptr: ptr - 1
7589
- });
7590
- }
7591
- } else if (c < " " && c !== "\t" || c === "\x7F") {
7536
+ let sliceStart = ctx.p;
7537
+ let state = 0;
7538
+ for (;ctx.p < ctx.s.length; ctx.p++) {
7539
+ c = ctx.s.charCodeAt(ctx.p);
7540
+ if (isMultiline && (c === 10 || c === 13 && ctx.s.charCodeAt(ctx.p + 1) === 10)) {
7541
+ state = state && 3;
7542
+ } else if (c < 32 && c !== 9 || c === 127) {
7592
7543
  throw new TomlError("control characters are not allowed in strings", {
7593
- toml: str,
7594
- ptr: ptr - 1
7544
+ toml: ctx.s,
7545
+ ptr: ctx.p
7595
7546
  });
7596
- }
7597
- if (isEscape) {
7598
- isEscape = false;
7599
- if (c === "x" || c === "u" || c === "U") {
7600
- let code = str.slice(ptr, ptr += c === "x" ? 2 : c === "u" ? 4 : 8);
7601
- if (!ESCAPE_REGEX.test(code)) {
7602
- throw new TomlError("invalid unicode escape", {
7603
- toml: str,
7604
- ptr: tmp
7605
- });
7606
- }
7607
- try {
7608
- parsed += String.fromCodePoint(parseInt(code, 16));
7609
- } catch {
7610
- throw new TomlError("invalid unicode escape", {
7611
- toml: str,
7612
- ptr: tmp
7613
- });
7614
- }
7615
- } else if (isMultiline && (c === `
7616
- ` || c === " " || c === "\t" || c === "\r")) {
7617
- ptr = skipVoid(str, ptr - 1, true);
7618
- if (str[ptr] !== `
7619
- ` && str[ptr] !== "\r") {
7620
- throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
7621
- toml: str,
7622
- ptr: tmp
7623
- });
7624
- }
7625
- ptr = skipVoid(str, ptr);
7626
- } else if (c in ESC_MAP) {
7627
- parsed += ESC_MAP[c];
7547
+ } else if ((!state || state === 3) && c === first && (!isMultiline || ctx.s.charCodeAt(ctx.p + 1) === first && ctx.s.charCodeAt(ctx.p + 2) === first)) {
7548
+ if (isMultiline) {
7549
+ if (ctx.s.charCodeAt(ctx.p + 3) === first)
7550
+ ctx.p++;
7551
+ if (ctx.s.charCodeAt(ctx.p + 3) === first)
7552
+ ctx.p++;
7553
+ }
7554
+ if (!state)
7555
+ parsed += ctx.s.slice(sliceStart, ctx.p);
7556
+ ctx.p += isMultiline ? 3 : 1;
7557
+ return parsed;
7558
+ } else if (!state) {
7559
+ if (!isLiteral && c === 92) {
7560
+ parsed += ctx.s.slice(sliceStart, sliceStart = ctx.p);
7561
+ state = 1;
7562
+ }
7563
+ } else if (state === 1) {
7564
+ if (c === 120 || c === 117 || c === 85) {
7565
+ let value = 0;
7566
+ let len = c === 120 ? 2 : c === 117 ? 4 : 8;
7567
+ for (let j = 0;j < len; j++, ctx.p++) {
7568
+ let hex = ctx.s.charCodeAt(ctx.p + 1);
7569
+ let digit = hex >= 48 && hex <= 57 ? hex - 48 : hex >= 65 && hex <= 70 ? hex - 65 + 10 : hex >= 97 && hex <= 102 ? hex - 97 + 10 : -1;
7570
+ if (digit < 0)
7571
+ throw new TomlError("invalid non-hex character in unicode escape", { toml: ctx.s, ptr: ctx.p + 1 });
7572
+ value = value << 4 | digit;
7573
+ }
7574
+ if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
7575
+ throw new TomlError("invalid unicode escape", { toml: ctx.s, ptr: ctx.p });
7576
+ }
7577
+ parsed += String.fromCodePoint(value);
7578
+ sliceStart = ctx.p + 1;
7579
+ state = 0;
7580
+ } else if (c === 32 || c === 9) {
7581
+ state = 2;
7628
7582
  } else {
7629
- throw new TomlError("unrecognized escape sequence", {
7630
- toml: str,
7631
- ptr: tmp
7583
+ if (c === 98)
7584
+ parsed += "\b";
7585
+ else if (c === 116)
7586
+ parsed += "\t";
7587
+ else if (c === 110)
7588
+ parsed += `
7589
+ `;
7590
+ else if (c === 102)
7591
+ parsed += "\f";
7592
+ else if (c === 114)
7593
+ parsed += "\r";
7594
+ else if (c === 101)
7595
+ parsed += "\x1B";
7596
+ else if (c === 34)
7597
+ parsed += '"';
7598
+ else if (c === 92)
7599
+ parsed += "\\";
7600
+ else
7601
+ throw new TomlError("unrecognized escape sequence", { toml: ctx.s, ptr: ctx.p });
7602
+ sliceStart = ctx.p + 1;
7603
+ state = 0;
7604
+ }
7605
+ } else if (c !== 32 && c !== 9) {
7606
+ if (state === 2) {
7607
+ throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
7608
+ toml: ctx.s,
7609
+ ptr: sliceStart
7632
7610
  });
7633
7611
  }
7634
- sliceStart = ptr;
7635
- } else if (!isLiteral && c === "\\") {
7636
- tmp = ptr - 1;
7637
- isEscape = true;
7638
- parsed += str.slice(sliceStart, tmp);
7612
+ state = !isLiteral && c === 92 ? 1 : 0;
7613
+ sliceStart = ctx.p;
7639
7614
  }
7640
7615
  }
7641
- return parsed + str.slice(sliceStart, endPtr - 1);
7616
+ throw new TomlError("unfinished string", { toml: ctx.s, ptr: start });
7642
7617
  }
7643
- function parseValue(value, toml, ptr, integersAsBigInt) {
7644
- if (value === "true")
7645
- return true;
7646
- if (value === "false")
7647
- return false;
7618
+ function sliceAndTrimEndOf(ctx, start, end) {
7619
+ let value = ctx.s.slice(start, end);
7620
+ let commentIdx = value.indexOf("#");
7621
+ if (commentIdx > 0) {
7622
+ skipComment({ s: value, p: commentIdx, d: 0 });
7623
+ value = value.slice(0, commentIdx);
7624
+ }
7625
+ return value.trimEnd();
7626
+ }
7627
+ function parseValue(ctx, integersAsBigInt, end) {
7628
+ let ptr = ctx.p;
7629
+ let err = { toml: ctx.s, ptr };
7630
+ skipUntil(ctx, 44, end);
7631
+ let value = sliceAndTrimEndOf(ctx, ptr, ctx.p);
7632
+ if (!value)
7633
+ throw new TomlError("incomplete declaration: value expected", err);
7648
7634
  if (value === "-inf")
7649
7635
  return -Infinity;
7650
7636
  if (value === "inf" || value === "+inf")
@@ -7656,25 +7642,16 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
7656
7642
  let isInt = INT_REGEX.test(value);
7657
7643
  if (isInt || FLOAT_REGEX.test(value)) {
7658
7644
  if (LEADING_ZERO.test(value)) {
7659
- throw new TomlError("leading zeroes are not allowed", {
7660
- toml,
7661
- ptr
7662
- });
7645
+ throw new TomlError("leading zeroes are not allowed", err);
7663
7646
  }
7664
7647
  value = value.replace(/_/g, "");
7665
7648
  let numeric = +value;
7666
7649
  if (isNaN(numeric)) {
7667
- throw new TomlError("invalid number", {
7668
- toml,
7669
- ptr
7670
- });
7650
+ throw new TomlError("invalid number", err);
7671
7651
  }
7672
7652
  if (isInt) {
7673
7653
  if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
7674
- throw new TomlError("integer value cannot be represented losslessly", {
7675
- toml,
7676
- ptr
7677
- });
7654
+ throw new TomlError("integer value cannot be represented losslessly", err);
7678
7655
  }
7679
7656
  if (isInt || integersAsBigInt === true)
7680
7657
  numeric = BigInt(value);
@@ -7682,16 +7659,12 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
7682
7659
  return numeric;
7683
7660
  }
7684
7661
  const date = new TomlDate(value);
7685
- if (!date.isValid()) {
7686
- throw new TomlError("invalid value", {
7687
- toml,
7688
- ptr
7689
- });
7690
- }
7662
+ if (!date.isValid())
7663
+ throw new TomlError("invalid value", err);
7691
7664
  return date;
7692
7665
  }
7693
7666
 
7694
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/extract.js
7667
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/extract.js
7695
7668
  /*!
7696
7669
  * Copyright (c) Squirrel Chat et al., All rights reserved.
7697
7670
  * SPDX-License-Identifier: BSD-3-Clause
@@ -7719,74 +7692,39 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
7719
7692
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7720
7693
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7721
7694
  */
7722
- function sliceAndTrimEndOf(str, startPtr, endPtr) {
7723
- let value = str.slice(startPtr, endPtr);
7724
- let commentIdx = value.indexOf("#");
7725
- if (commentIdx > -1) {
7726
- skipComment(str, commentIdx);
7727
- value = value.slice(0, commentIdx);
7728
- }
7729
- return [value.trimEnd(), commentIdx];
7730
- }
7731
- function extractValue(str, ptr, end, depth, integersAsBigInt) {
7732
- if (depth === 0) {
7733
- throw new TomlError("document contains excessively nested structures. aborting.", {
7734
- toml: str,
7735
- ptr
7736
- });
7737
- }
7738
- let c = str[ptr];
7739
- if (c === "[" || c === "{") {
7740
- let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
7741
- if (end) {
7742
- endPtr2 = skipVoid(str, endPtr2);
7743
- if (str[endPtr2] === ",")
7744
- endPtr2++;
7745
- else if (str[endPtr2] !== end) {
7746
- throw new TomlError("expected comma or end of structure", {
7747
- toml: str,
7748
- ptr: endPtr2
7749
- });
7750
- }
7695
+ function extractValue(ctx, end, integersAsBigInt) {
7696
+ let ptr = ctx.p;
7697
+ let c = ctx.s.charCodeAt(ptr);
7698
+ if (c === 91 || c === 123) {
7699
+ if (!ctx.d--) {
7700
+ throw new TomlError("document contains excessively nested structures. aborting.", {
7701
+ toml: ctx.s,
7702
+ ptr
7703
+ });
7751
7704
  }
7752
- return [value, endPtr2];
7705
+ let value = c === 91 ? parseArray(ctx, integersAsBigInt) : parseInlineTable(ctx, integersAsBigInt);
7706
+ ctx.d++;
7707
+ return value;
7753
7708
  }
7754
- let endPtr;
7755
- if (c === '"' || c === "'") {
7756
- endPtr = getStringEnd(str, ptr);
7757
- let parsed = parseString(str, ptr, endPtr);
7758
- if (end) {
7759
- endPtr = skipVoid(str, endPtr);
7760
- if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== `
7761
- ` && str[endPtr] !== "\r") {
7762
- throw new TomlError("unexpected character encountered", {
7763
- toml: str,
7764
- ptr: endPtr
7765
- });
7766
- }
7767
- endPtr += +(str[endPtr] === ",");
7768
- }
7769
- return [parsed, endPtr];
7709
+ if (c === 34 || c === 39) {
7710
+ return parseString(ctx);
7770
7711
  }
7771
- endPtr = skipUntil(str, ptr, ",", end);
7772
- let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","));
7773
- if (!slice[0]) {
7774
- throw new TomlError("incomplete key-value declaration: no value specified", {
7775
- toml: str,
7776
- ptr
7777
- });
7712
+ if (c === 116) {
7713
+ if (ctx.s.charCodeAt(++ctx.p) !== 114 || ctx.s.charCodeAt(++ctx.p) !== 117 || ctx.s.charCodeAt(++ctx.p) !== 101)
7714
+ throw new TomlError("invalid value", { toml: ctx.s, ptr });
7715
+ ctx.p++;
7716
+ return true;
7778
7717
  }
7779
- if (end && slice[1] > -1) {
7780
- endPtr = skipVoid(str, ptr + slice[1]);
7781
- endPtr += +(str[endPtr] === ",");
7718
+ if (c === 102) {
7719
+ if (ctx.s.charCodeAt(++ctx.p) !== 97 || ctx.s.charCodeAt(++ctx.p) !== 108 || ctx.s.charCodeAt(++ctx.p) !== 115 || ctx.s.charCodeAt(++ctx.p) !== 101)
7720
+ throw new TomlError("invalid value", { toml: ctx.s, ptr });
7721
+ ctx.p++;
7722
+ return false;
7782
7723
  }
7783
- return [
7784
- parseValue(slice[0], str, ptr, integersAsBigInt),
7785
- endPtr
7786
- ];
7724
+ return parseValue(ctx, integersAsBigInt, end);
7787
7725
  }
7788
7726
 
7789
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/struct.js
7727
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/struct.js
7790
7728
  /*!
7791
7729
  * Copyright (c) Squirrel Chat et al., All rights reserved.
7792
7730
  * SPDX-License-Identifier: BSD-3-Clause
@@ -7815,155 +7753,147 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
7815
7753
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7816
7754
  */
7817
7755
  var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
7818
- function parseKey(str, ptr, end = "=") {
7819
- let dot = ptr - 1;
7756
+ function parseKey(ctx, end = "=") {
7757
+ let start = ctx.p;
7758
+ let dot = start - 1;
7820
7759
  let parsed = [];
7821
- let endPtr = str.indexOf(end, ptr);
7760
+ let endPtr = ctx.s.indexOf(end, start);
7822
7761
  if (endPtr < 0) {
7823
7762
  throw new TomlError("incomplete key-value: cannot find end of key", {
7824
- toml: str,
7825
- ptr
7763
+ toml: ctx.s,
7764
+ ptr: start
7826
7765
  });
7827
7766
  }
7828
7767
  do {
7829
- let c = str[ptr = ++dot];
7830
- if (c !== " " && c !== "\t") {
7831
- if (c === '"' || c === "'") {
7832
- if (c === str[ptr + 1] && c === str[ptr + 2]) {
7768
+ let c = ctx.s.charCodeAt(ctx.p = ++dot);
7769
+ if (c !== 32 && c !== 9) {
7770
+ if (c === 34 || c === 39) {
7771
+ if (c === ctx.s.charCodeAt(ctx.p + 1) && c === ctx.s.charCodeAt(ctx.p + 2)) {
7833
7772
  throw new TomlError("multiline strings are not allowed in keys", {
7834
- toml: str,
7835
- ptr
7836
- });
7837
- }
7838
- let eos = getStringEnd(str, ptr);
7839
- if (eos < 0) {
7840
- throw new TomlError("unfinished string encountered", {
7841
- toml: str,
7842
- ptr
7773
+ toml: ctx.s,
7774
+ ptr: ctx.p
7843
7775
  });
7844
7776
  }
7845
- dot = str.indexOf(".", eos);
7846
- let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
7777
+ let part = parseString(ctx);
7778
+ dot = ctx.s.indexOf(".", ctx.p);
7779
+ let strEnd = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
7847
7780
  let newLine = indexOfNewline(strEnd);
7848
7781
  if (newLine > -1) {
7849
7782
  throw new TomlError("newlines are not allowed in keys", {
7850
- toml: str,
7851
- ptr: ptr + dot + newLine
7783
+ toml: ctx.s,
7784
+ ptr: newLine
7852
7785
  });
7853
7786
  }
7854
7787
  if (strEnd.trimStart()) {
7855
7788
  throw new TomlError("found extra tokens after the string part", {
7856
- toml: str,
7857
- ptr: eos
7789
+ toml: ctx.s,
7790
+ ptr: ctx.p
7858
7791
  });
7859
7792
  }
7860
- if (endPtr < eos) {
7861
- endPtr = str.indexOf(end, eos);
7793
+ if (endPtr < ctx.p) {
7794
+ endPtr = ctx.s.indexOf(end, ctx.p);
7862
7795
  if (endPtr < 0) {
7863
7796
  throw new TomlError("incomplete key-value: cannot find end of key", {
7864
- toml: str,
7865
- ptr
7797
+ toml: ctx.s,
7798
+ ptr: start
7866
7799
  });
7867
7800
  }
7868
7801
  }
7869
- parsed.push(parseString(str, ptr, eos));
7802
+ parsed.push(part);
7870
7803
  } else {
7871
- dot = str.indexOf(".", ptr);
7872
- let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
7804
+ dot = ctx.s.indexOf(".", ctx.p);
7805
+ let part = ctx.s.slice(ctx.p, dot < 0 || dot > endPtr ? endPtr : dot);
7873
7806
  if (!KEY_PART_RE.test(part)) {
7874
7807
  throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
7875
- toml: str,
7876
- ptr
7808
+ toml: ctx.s,
7809
+ ptr: ctx.p
7877
7810
  });
7878
7811
  }
7879
7812
  parsed.push(part.trimEnd());
7880
7813
  }
7881
7814
  }
7882
7815
  } while (dot + 1 && dot < endPtr);
7883
- return [parsed, skipVoid(str, endPtr + 1, true, true)];
7816
+ ctx.p = endPtr + 1;
7817
+ skipVoid(ctx, true, true);
7818
+ return parsed;
7884
7819
  }
7885
- function parseInlineTable(str, ptr, depth, integersAsBigInt) {
7820
+ function parseInlineTable(ctx, integersAsBigInt) {
7886
7821
  let res = {};
7887
7822
  let seen = new Set;
7888
7823
  let c;
7889
- ptr++;
7890
- while ((c = str[ptr++]) !== "}" && c) {
7891
- if (c === ",") {
7892
- throw new TomlError("expected value, found comma", {
7893
- toml: str,
7894
- ptr: ptr - 1
7895
- });
7896
- } else if (c === "#")
7897
- ptr = skipComment(str, ptr);
7898
- else if (c !== " " && c !== "\t" && c !== `
7899
- ` && c !== "\r") {
7900
- let k;
7901
- let t = res;
7902
- let hasOwn = false;
7903
- let [key, keyEndPtr] = parseKey(str, ptr - 1);
7904
- for (let i = 0;i < key.length; i++) {
7905
- if (i)
7906
- t = hasOwn ? t[k] : t[k] = {};
7907
- k = key[i];
7908
- if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
7909
- throw new TomlError("trying to redefine an already defined value", {
7910
- toml: str,
7911
- ptr
7912
- });
7913
- }
7914
- if (!hasOwn && k === "__proto__") {
7915
- Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
7916
- }
7917
- }
7918
- if (hasOwn) {
7824
+ ctx.p++;
7825
+ while (ctx.p < ctx.s.length) {
7826
+ skipVoid(ctx);
7827
+ if ((c = ctx.s.charCodeAt(ctx.p)) === 125) {
7828
+ ctx.p++;
7829
+ return res;
7830
+ }
7831
+ let k;
7832
+ let t = res;
7833
+ let hasOwn = false;
7834
+ let p = ctx.p;
7835
+ let key = parseKey(ctx);
7836
+ for (let i = 0;i < key.length; i++) {
7837
+ if (i)
7838
+ t = hasOwn ? t[k] : t[k] = {};
7839
+ k = key[i];
7840
+ if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
7919
7841
  throw new TomlError("trying to redefine an already defined value", {
7920
- toml: str,
7921
- ptr
7842
+ toml: ctx.s,
7843
+ ptr: p
7922
7844
  });
7923
7845
  }
7924
- let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
7925
- seen.add(value);
7926
- t[k] = value;
7927
- ptr = valueEndPtr;
7846
+ if (!hasOwn && k === "__proto__") {
7847
+ Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
7848
+ }
7849
+ }
7850
+ if (hasOwn) {
7851
+ throw new TomlError("trying to redefine an already defined value", {
7852
+ toml: ctx.s,
7853
+ ptr: ctx.p
7854
+ });
7855
+ }
7856
+ let value = extractValue(ctx, 125, integersAsBigInt);
7857
+ seen.add(t[k] = value);
7858
+ skipVoid(ctx);
7859
+ if ((c = ctx.s.charCodeAt(ctx.p++)) === 125) {
7860
+ return res;
7861
+ }
7862
+ if (c !== 44) {
7863
+ throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
7928
7864
  }
7929
7865
  }
7930
- if (!c) {
7931
- throw new TomlError("unfinished table encountered", {
7932
- toml: str,
7933
- ptr
7934
- });
7935
- }
7936
- return [res, ptr];
7866
+ throw new TomlError("unfinished table encountered", {
7867
+ toml: ctx.s,
7868
+ ptr: ctx.p
7869
+ });
7937
7870
  }
7938
- function parseArray(str, ptr, depth, integersAsBigInt) {
7871
+ function parseArray(ctx, integersAsBigInt) {
7939
7872
  let res = [];
7940
7873
  let c;
7941
- ptr++;
7942
- while ((c = str[ptr++]) !== "]" && c) {
7943
- if (c === ",") {
7944
- throw new TomlError("expected value, found comma", {
7945
- toml: str,
7946
- ptr: ptr - 1
7947
- });
7948
- } else if (c === "#")
7949
- ptr = skipComment(str, ptr);
7950
- else if (c !== " " && c !== "\t" && c !== `
7951
- ` && c !== "\r") {
7952
- let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
7953
- res.push(e[0]);
7954
- ptr = e[1];
7955
- }
7956
- }
7957
- if (!c) {
7958
- throw new TomlError("unfinished array encountered", {
7959
- toml: str,
7960
- ptr
7961
- });
7874
+ ctx.p++;
7875
+ while (ctx.p < ctx.s.length) {
7876
+ skipVoid(ctx);
7877
+ if ((c = ctx.s.charCodeAt(ctx.p)) === 93) {
7878
+ ctx.p++;
7879
+ return res;
7880
+ }
7881
+ res.push(extractValue(ctx, 93, integersAsBigInt));
7882
+ skipVoid(ctx);
7883
+ if ((c = ctx.s.charCodeAt(ctx.p++)) === 93) {
7884
+ return res;
7885
+ }
7886
+ if (c !== 44) {
7887
+ throw new TomlError("expected comma or end of structure", { toml: ctx.s, ptr: ctx.p - 1 });
7888
+ }
7962
7889
  }
7963
- return [res, ptr];
7890
+ throw new TomlError("unfinished array encountered", {
7891
+ toml: ctx.s,
7892
+ ptr: ctx.p
7893
+ });
7964
7894
  }
7965
7895
 
7966
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/parse.js
7896
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/parse.js
7967
7897
  /*!
7968
7898
  * Copyright (c) Squirrel Chat et al., All rights reserved.
7969
7899
  * SPDX-License-Identifier: BSD-3-Clause
@@ -8051,60 +7981,61 @@ function peekTable(key, table, meta, type) {
8051
7981
  return [k, t, state.c];
8052
7982
  }
8053
7983
  function parse(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
7984
+ let ctx = { s: toml, p: 0, d: maxDepth };
8054
7985
  let res = {};
8055
7986
  let meta = {};
7987
+ let tmp;
8056
7988
  let tbl = res;
8057
7989
  let m = meta;
8058
- for (let ptr = skipVoid(toml, 0);ptr < toml.length; ) {
8059
- if (toml[ptr] === "[") {
8060
- let isTableArray = toml[++ptr] === "[";
8061
- let k = parseKey(toml, ptr += +isTableArray, "]");
7990
+ skipVoid(ctx);
7991
+ while (ctx.p < toml.length) {
7992
+ if (toml.charCodeAt(ctx.p) === 91) {
7993
+ let isTableArray = toml.charCodeAt(++ctx.p) === 91;
7994
+ tmp = ctx.p += +isTableArray;
7995
+ let k = parseKey(ctx, "]");
8062
7996
  if (isTableArray) {
8063
- if (toml[k[1] - 1] !== "]") {
7997
+ if (toml.charCodeAt(ctx.p - 1) !== 93) {
8064
7998
  throw new TomlError("expected end of table declaration", {
8065
7999
  toml,
8066
- ptr: k[1] - 1
8000
+ ptr: ctx.p - 1
8067
8001
  });
8068
8002
  }
8069
- k[1]++;
8003
+ ctx.p++;
8070
8004
  }
8071
- let p = peekTable(k[0], res, meta, isTableArray ? 2 : 1);
8005
+ let p = peekTable(k, res, meta, isTableArray ? 2 : 1);
8072
8006
  if (!p) {
8073
8007
  throw new TomlError("trying to redefine an already defined table or value", {
8074
8008
  toml,
8075
- ptr
8009
+ ptr: tmp
8076
8010
  });
8077
8011
  }
8078
8012
  m = p[2];
8079
8013
  tbl = p[1];
8080
- ptr = k[1];
8081
8014
  } else {
8082
- let k = parseKey(toml, ptr);
8083
- let p = peekTable(k[0], tbl, m, 0);
8015
+ tmp = ctx.p;
8016
+ let k = parseKey(ctx);
8017
+ let p = peekTable(k, tbl, m, 0);
8084
8018
  if (!p) {
8085
8019
  throw new TomlError("trying to redefine an already defined table or value", {
8086
8020
  toml,
8087
- ptr
8021
+ ptr: tmp
8088
8022
  });
8089
8023
  }
8090
- let v = extractValue(toml, k[1], undefined, maxDepth, integersAsBigInt);
8091
- p[1][p[0]] = v[0];
8092
- ptr = v[1];
8024
+ p[1][p[0]] = extractValue(ctx, undefined, integersAsBigInt);
8093
8025
  }
8094
- ptr = skipVoid(toml, ptr, true);
8095
- if (toml[ptr] && toml[ptr] !== `
8096
- ` && toml[ptr] !== "\r") {
8026
+ skipVoid(ctx, true);
8027
+ if (ctx.p < toml.length && (tmp = toml.charCodeAt(ctx.p)) !== 10 && tmp !== 13) {
8097
8028
  throw new TomlError("each key-value declaration must be followed by an end-of-line", {
8098
8029
  toml,
8099
- ptr
8030
+ ptr: ctx.p
8100
8031
  });
8101
8032
  }
8102
- ptr = skipVoid(toml, ptr);
8033
+ skipVoid(ctx);
8103
8034
  }
8104
8035
  return res;
8105
8036
  }
8106
8037
 
8107
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js
8038
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/stringify.js
8108
8039
  /*!
8109
8040
  * Copyright (c) Squirrel Chat et al., All rights reserved.
8110
8041
  * SPDX-License-Identifier: BSD-3-Clause
@@ -8133,7 +8064,7 @@ function parse(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
8133
8064
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8134
8065
  */
8135
8066
 
8136
- // node_modules/.bun/smol-toml@1.6.1/node_modules/smol-toml/dist/index.js
8067
+ // node_modules/.bun/smol-toml@1.8.0/node_modules/smol-toml/dist/index.js
8137
8068
  /*!
8138
8069
  * Copyright (c) Squirrel Chat et al., All rights reserved.
8139
8070
  * SPDX-License-Identifier: BSD-3-Clause
@@ -9893,10 +9824,10 @@ function fatalDeny(reason) {
9893
9824
 
9894
9825
  // src/commands/daemon.ts
9895
9826
  import { randomUUID } from "crypto";
9896
- import { existsSync as existsSync6, unlinkSync as unlinkSync3 } from "fs";
9827
+ import { existsSync as existsSync7, unlinkSync as unlinkSync4 } from "fs";
9897
9828
 
9898
9829
  // src/config/settings.ts
9899
- import { readFileSync as readFileSync6, statSync } from "fs";
9830
+ import { readFileSync as readFileSync7, statSync as statSync2 } from "fs";
9900
9831
 
9901
9832
  // node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
9902
9833
  var exports_external = {};
@@ -24176,6 +24107,10 @@ function date4(params) {
24176
24107
  config(en_default());
24177
24108
  // src/config/constants.ts
24178
24109
  var DEFAULT_PORT = 42718;
24110
+ var DEFAULT_LOG_MAX_SIZE = 5 * 1024 * 1024;
24111
+ var DEFAULT_LOG_KEEP = 10;
24112
+ var MIN_LOG_MAX_SIZE = 64 * 1024;
24113
+ var MAX_LOG_MAX_SIZE = 256 * 1024 * 1024;
24179
24114
  var VANITY_HOST = "caret.localhost";
24180
24115
  var HOOK_TIMEOUT_S = 3900;
24181
24116
  var EXCERPT_RADIUS = 30;
@@ -24243,7 +24178,7 @@ function deriveIdleTimeoutSec(heartbeatMs) {
24243
24178
  }
24244
24179
 
24245
24180
  // src/config/paths.ts
24246
- import { chmodSync, mkdirSync } from "fs";
24181
+ import { chmodSync, existsSync as existsSync4, mkdirSync, renameSync } from "fs";
24247
24182
  import { homedir as homedir4 } from "os";
24248
24183
  function xdgDir(envVar, fallback) {
24249
24184
  const base = process.env[envVar] || `${homedir4()}/${fallback}`;
@@ -24273,11 +24208,20 @@ function configFile() {
24273
24208
  function prefsFile() {
24274
24209
  return `${stateDir()}/prefs.json`;
24275
24210
  }
24211
+ function logsDir() {
24212
+ return `${stateDir()}/logs`;
24213
+ }
24214
+ function logArchiveDir() {
24215
+ return `${logsDir()}/archive`;
24216
+ }
24276
24217
  function logFile() {
24277
- return `${stateDir()}/caret.log`;
24218
+ return `${logsDir()}/caret.log`;
24278
24219
  }
24279
24220
  function daemonLogFile() {
24280
- return `${stateDir()}/daemon.log`;
24221
+ return `${logsDir()}/daemon.log`;
24222
+ }
24223
+ function daemonStderrLogFile() {
24224
+ return `${logsDir()}/daemon-stderr.log`;
24281
24225
  }
24282
24226
  function daemonLock() {
24283
24227
  return `${stateDir()}/daemon.lock`;
@@ -24291,6 +24235,19 @@ function ensureStateDir(target = stateDir()) {
24291
24235
  chmodSync(root, 448);
24292
24236
  }
24293
24237
  }
24238
+ function ensureLogsDir() {
24239
+ ensureStateDir(logsDir());
24240
+ for (const name of ["caret.log", "daemon.log"]) {
24241
+ const from = `${stateDir()}/${name}`;
24242
+ const to = `${logsDir()}/${name}`;
24243
+ if (!existsSync4(from) || existsSync4(to))
24244
+ continue;
24245
+ try {
24246
+ renameSync(from, to);
24247
+ chmodSync(to, 384);
24248
+ } catch {}
24249
+ }
24250
+ }
24294
24251
 
24295
24252
  // src/lib/build-id.ts
24296
24253
  import { createHash } from "crypto";
@@ -24351,7 +24308,7 @@ async function loadUiAssets() {
24351
24308
  // package.json
24352
24309
  var package_default = {
24353
24310
  name: "@macintacos/caret",
24354
- version: "0.10.0",
24311
+ version: "0.11.1",
24355
24312
  license: "MIT",
24356
24313
  type: "module",
24357
24314
  description: "A Claude Code plugin that replaces the terminal plan-approval prompt with a local web UI for inline review, annotation, and approval.",
@@ -24386,24 +24343,6 @@ var package_default = {
24386
24343
  build: "mise run build"
24387
24344
  },
24388
24345
  devDependencies: {
24389
- "@happy-dom/global-registrator": "^20.9.0",
24390
- "@laststance/tailwind-suggest-canonical-classes": "^0.1.1",
24391
- "@playwright/test": "^1.60.0",
24392
- "@sveltejs/vite-plugin-svelte": "^7.1.2",
24393
- "@tailwindcss/vite": "^4.3.2",
24394
- "@types/bun": "^1.3.14",
24395
- "@types/semver": "^7.7.1",
24396
- "happy-dom": "^20.9.0",
24397
- listr2: "^10.2.1",
24398
- "pino-pretty": "^13.1.3",
24399
- svelte: "^5.55.9",
24400
- "svelte-check": "^4.4.8",
24401
- tailwindcss: "^4.3.2",
24402
- "tw-animate-css": "^1.4.0",
24403
- typescript: "^6.0.3",
24404
- vite: "^8.0.14"
24405
- },
24406
- dependencies: {
24407
24346
  "@clack/prompts": "^1.7.0",
24408
24347
  "@codemirror/commands": "^6.10.3",
24409
24348
  "@codemirror/lang-markdown": "^6.5.0",
@@ -24412,24 +24351,52 @@ var package_default = {
24412
24351
  "@codemirror/state": "^6.6.0",
24413
24352
  "@codemirror/view": "^6.43.0",
24414
24353
  "@commander-js/extra-typings": "^15.0.0",
24354
+ "@happy-dom/global-registrator": "^20.11.2",
24415
24355
  "@internationalized/date": "^3.12.2",
24356
+ "@laststance/tailwind-suggest-canonical-classes": "^0.1.1",
24416
24357
  "@lezer/highlight": "^1.2.3",
24417
- "@opencode-ai/plugin": "^1.16.2",
24418
- "@pierre/diffs": "1.2.7",
24358
+ "@pierre/diffs": "1.3.5",
24419
24359
  "@pierre/trees": "1.0.0-beta.6",
24360
+ "@playwright/test": "^1.62.1",
24361
+ "@sveltejs/vite-plugin-svelte": "^7.3.0",
24362
+ "@tailwindcss/vite": "^4.3.3",
24363
+ "@types/bun": "^1.3.14",
24364
+ "@types/semver": "^7.7.1",
24365
+ "@typescript/native": "npm:typescript@^7.0.2",
24420
24366
  "bits-ui": "^2.18.1",
24421
24367
  clsx: "^2.1.1",
24422
24368
  commander: "^15.0.0",
24369
+ "happy-dom": "^20.11.2",
24423
24370
  "jsonc-parser": "^3.3.1",
24371
+ listr2: "^11.0.0",
24424
24372
  marked: "^18.0.4",
24425
24373
  pino: "^10.3.1",
24374
+ "pino-pretty": "^13.1.3",
24426
24375
  semver: "^7.8.1",
24427
- shiki: "^4.1.0",
24428
- "smol-toml": "1.6.1",
24376
+ shiki: "^4.4.3",
24377
+ "smol-toml": "^1.8.0",
24378
+ svelte: "^5.56.9",
24379
+ "svelte-check": "^4.7.5",
24429
24380
  "tailwind-merge": "^3.6.0",
24430
24381
  "tailwind-variants": "^3.2.2",
24382
+ tailwindcss: "^4.3.3",
24383
+ "tw-animate-css": "^1.4.0",
24384
+ typescript: "^6.0.3",
24385
+ vite: "^8.2.1",
24431
24386
  xss: "^1.0.15",
24432
- zod: "4.4.3"
24387
+ zod: "^4.4.3"
24388
+ },
24389
+ dependencies: {
24390
+ "@opencode-ai/plugin": "^1.18.17"
24391
+ },
24392
+ pinned: {
24393
+ "//": "bun.lock is committed, so it is what pins every dependency exactly; a range above is the upgrade policy, not the resolved version. A bare version therefore means `bun update` must never move this one on its own, and these entries are the whole set. Everything else takes a range deliberately \u2014 zod and the TOML parser reading the config.toml trust boundary included: the lockfile already holds them, so a range costs no reproducibility and keeps them visible to an upgrade sweep. test/structure/exact-pin.test.ts fails on an exact pin with no reason, and on a reason that outlived its pin.",
24394
+ "@pierre/diffs": "Version-coupled to shiki through the resolve.alias block in ui/vite.config.ts, where an alias that stops matching grows the bundle by ~600 KB silently rather than failing anything. The pair moves as one reviewed bump, never on a sweep.",
24395
+ "@pierre/trees": "No stable release exists \u2014 the `latest` and `beta` dist-tags both point at the same prerelease. Exact rather than caret because a prerelease under a caret range is still a caret range: `^1.0.0-beta.6` expands to `>=1.0.0-beta.6 <2.0.0-0`, so a sweep would take a stable 1.0.0 the day it lands, and beta-to-stable is the jump that wants a human."
24396
+ },
24397
+ held: {
24398
+ "//": "A dependency whose range deliberately stops below the current major, with the evidence for that and the condition that lifts it. Distinct from `pinned` above, which is about exact versions: an entry here names a range that is doing its job by excluding something. Unlike a pin, a held range is self-describing to `bun outdated` \u2014 it shows up as a major behind \u2014 so this block answers the question it raises rather than surfacing a decision nothing else would show.",
24399
+ typescript: "NOT a hold on adoption \u2014 TypeScript 7 IS what type-checks this tree (EXC-1089). It arrives as the `@typescript/native` alias above; hk.pkl runs the backend program through node_modules/@typescript/native/bin/tsc and the UI program through `svelte-check --tsgo`, and both were proved live against injected type errors rather than trusted because they exited 0. This range stops at ^6 because svelte-check requires BOTH majors installed: 4.7.5 hard-throws from bin/ts-version-check.js once `typescript` is major >= 7, and the recipe it throws is the arrangement used here verbatim \u2014 `typescript@~6 @typescript/native@npm:typescript@7`, plus --tsgo. Its README repeats it and dist/src/index.js resolves `@typescript/native` before `@typescript/native-preview`, so this is upstream's supported setup rather than a workaround. A second reason keeps 6.x honest even so: test/structure/e2e-conventions.test.ts and test/structure/tokenize-conventions.test.ts import the compiler API as a PARSING LIBRARY, and 7.x exports lib/version.cjs as `.` with the API behind ./unstable/* subpaths that offer no standalone parse (unstable/ast's createSourceFile is a factory over Statement[]; the only SourceFile producer is Program.getSourceFile). With 6.x installed those two files need no port, and `tsc` 7 type-checks them clean \u2014 the 50 errors EXC-1083 measured were never caret's code, only two files typed against a package whose `.` export had moved. What lifts this: a svelte-check release whose peerDependencies.typescript admits ^7 \u2014 but that clears only the first reason. Collapsing to a single `typescript@7` means dropping the alias, moving this range to ^7, AND porting those two suites off the compiler API in the same pass, or they break on `ts.ScriptTarget` being undefined. test/structure/typescript-arrangement.test.ts reds on exactly that widening, and also pins the tsc path, the --tsgo flag, and this entry's own existence, because losing any of them silently reverts the adoption. Full evidence: EXC-1089, and the trial in EXC-1083."
24433
24400
  }
24434
24401
  };
24435
24402
 
@@ -24545,6 +24512,79 @@ function callerLocation() {
24545
24512
  }
24546
24513
  }
24547
24514
 
24515
+ // src/lib/log-rotate.ts
24516
+ import {
24517
+ closeSync,
24518
+ openSync,
24519
+ readdirSync as readdirSync3,
24520
+ readFileSync as readFileSync5,
24521
+ statSync,
24522
+ truncateSync,
24523
+ unlinkSync,
24524
+ writeFileSync
24525
+ } from "fs";
24526
+ import { basename as basename2 } from "path";
24527
+ var STALE_LOCK_MS = 60000;
24528
+ function stamp() {
24529
+ return new Date().toISOString().replace(/[-:.]/g, "");
24530
+ }
24531
+ function sizeOf(path) {
24532
+ try {
24533
+ return statSync(path).size;
24534
+ } catch {
24535
+ return -1;
24536
+ }
24537
+ }
24538
+ function claimLock(lock) {
24539
+ try {
24540
+ closeSync(openSync(lock, "wx", 384));
24541
+ return true;
24542
+ } catch (e) {
24543
+ if (e.code !== "EEXIST")
24544
+ return false;
24545
+ if (Date.now() - statSync(lock).mtimeMs >= STALE_LOCK_MS)
24546
+ unlinkSync(lock);
24547
+ return false;
24548
+ }
24549
+ }
24550
+ function prune(name, keep) {
24551
+ const dir = logArchiveDir();
24552
+ const pattern = new RegExp(`^${name}-\\d{8}T\\d{9}Z\\.log\\.gz$`);
24553
+ const found = readdirSync3(dir).filter((f) => pattern.test(f)).sort();
24554
+ for (const old of found.slice(0, Math.max(0, found.length - keep))) {
24555
+ try {
24556
+ unlinkSync(`${dir}/${old}`);
24557
+ } catch {}
24558
+ }
24559
+ }
24560
+ function rotateIfOversized(path, maxSize, keep) {
24561
+ try {
24562
+ if (sizeOf(path) <= maxSize)
24563
+ return;
24564
+ const name = basename2(path, ".log");
24565
+ const lock = `${logsDir()}/.rotate-${name}.lock`;
24566
+ if (!claimLock(lock))
24567
+ return;
24568
+ try {
24569
+ if (sizeOf(path) <= maxSize)
24570
+ return;
24571
+ ensureStateDir(logArchiveDir());
24572
+ const raw = readFileSync5(path);
24573
+ truncateSync(path, 0);
24574
+ if (keep > 0) {
24575
+ writeFileSync(`${logArchiveDir()}/${name}-${stamp()}.log.gz`, Bun.gzipSync(raw), {
24576
+ mode: 384
24577
+ });
24578
+ }
24579
+ prune(name, keep);
24580
+ } finally {
24581
+ try {
24582
+ unlinkSync(lock);
24583
+ } catch {}
24584
+ }
24585
+ } catch {}
24586
+ }
24587
+
24548
24588
  // src/lib/types.ts
24549
24589
  function errorMessage(err) {
24550
24590
  return err instanceof Error ? err.message : String(err);
@@ -24614,7 +24654,7 @@ function shortId(id) {
24614
24654
  }
24615
24655
 
24616
24656
  // src/redact/node.ts
24617
- import { readFileSync as readFileSync5, writeFileSync } from "fs";
24657
+ import { readFileSync as readFileSync6, writeFileSync as writeFileSync2 } from "fs";
24618
24658
  import { homedir as homedir5 } from "os";
24619
24659
  var FOREIGN_HOME = /(\/Users\/|\/home\/)[^/\s"']+/g;
24620
24660
  function scrubString(s, home = homedir5()) {
@@ -24636,17 +24676,17 @@ function redactLogText(text) {
24636
24676
  }).join(`
24637
24677
  `);
24638
24678
  }
24639
- function redactLogFiles(files = [logFile(), daemonLogFile()]) {
24679
+ function redactLogFiles(files = [logFile(), daemonLogFile(), daemonStderrLogFile()]) {
24640
24680
  const written = [];
24641
24681
  for (const file2 of files) {
24642
24682
  let text;
24643
24683
  try {
24644
- text = readFileSync5(file2, "utf-8");
24684
+ text = readFileSync6(file2, "utf-8");
24645
24685
  } catch {
24646
24686
  continue;
24647
24687
  }
24648
24688
  const sibling = `${file2.replace(/\.log$/, "")}.redacted.log`;
24649
- writeFileSync(sibling, redactLogText(text), { mode: 384 });
24689
+ writeFileSync2(sibling, redactLogText(text), { mode: 384 });
24650
24690
  written.push(sibling);
24651
24691
  }
24652
24692
  return written;
@@ -24658,7 +24698,7 @@ var pinoOpts = {
24658
24698
  timestamp: import_pino.default.stdTimeFunctions.isoTime,
24659
24699
  serializers: { err: (v) => v }
24660
24700
  };
24661
- function wrap(logger, liveLevel, liveRedact, source) {
24701
+ function wrap(logger, liveLevel, liveRedact, source, rotate) {
24662
24702
  function fields(extra, step, redact) {
24663
24703
  const out = scrubValue({ ...extra }, redact);
24664
24704
  out.step = step;
@@ -24677,6 +24717,7 @@ function wrap(logger, liveLevel, liveRedact, source) {
24677
24717
  logger.level = next;
24678
24718
  if (!logger.isLevelEnabled(method))
24679
24719
  return;
24720
+ rotate?.();
24680
24721
  const r = liveRedact();
24681
24722
  logger[method](fields(extra, step, r), r ? scrubString(msg) : msg);
24682
24723
  } catch {}
@@ -24687,6 +24728,7 @@ function wrap(logger, liveLevel, liveRedact, source) {
24687
24728
  warn: (step, msg, extra) => emit("warn", step, msg, extra),
24688
24729
  error(step, err, extra) {
24689
24730
  try {
24731
+ rotate?.();
24690
24732
  const r = liveRedact();
24691
24733
  const f = fields(extra, step, r);
24692
24734
  if (err instanceof Error)
@@ -24703,17 +24745,24 @@ var noopLogger = {
24703
24745
  warn: () => {},
24704
24746
  error: () => {}
24705
24747
  };
24706
- function createHookLogger(level, redact) {
24748
+ function createHookLogger(level, redact, limits) {
24707
24749
  const path = logFile();
24708
24750
  try {
24709
- ensureStateDir();
24751
+ ensureLogsDir();
24710
24752
  const dest = import_pino.default.destination({ dest: path, sync: true, mode: 384 });
24711
- return { log: wrap(import_pino.default(pinoOpts, dest), level, redact, "hook"), dest, path };
24753
+ const rotate = () => rotateIfOversized(path, limits.maxSize(), limits.keep());
24754
+ return { log: wrap(import_pino.default(pinoOpts, dest), level, redact, "hook", rotate), dest, path };
24712
24755
  } catch {
24713
24756
  return { log: noopLogger, dest: null, path };
24714
24757
  }
24715
24758
  }
24716
- var hookState = { level: "info", redact: false, instance: null };
24759
+ var hookState = {
24760
+ level: "info",
24761
+ redact: false,
24762
+ maxSize: DEFAULT_LOG_MAX_SIZE,
24763
+ keep: DEFAULT_LOG_KEEP,
24764
+ instance: null
24765
+ };
24717
24766
  function hook() {
24718
24767
  const path = logFile();
24719
24768
  if (hookState.instance && hookState.instance.path === path) {
@@ -24722,7 +24771,7 @@ function hook() {
24722
24771
  try {
24723
24772
  hookState.instance?.dest?.destroy();
24724
24773
  } catch {}
24725
- const next = createHookLogger(() => hookState.level, () => hookState.redact);
24774
+ const next = createHookLogger(() => hookState.level, () => hookState.redact, { maxSize: () => hookState.maxSize, keep: () => hookState.keep });
24726
24775
  hookState.instance = next.dest ? next : null;
24727
24776
  return next.log;
24728
24777
  }
@@ -24732,6 +24781,10 @@ function setLogLevel(level) {
24732
24781
  function setRedact(on) {
24733
24782
  hookState.redact = on;
24734
24783
  }
24784
+ function setLogRotation(maxSize, keep) {
24785
+ hookState.maxSize = maxSize;
24786
+ hookState.keep = keep;
24787
+ }
24735
24788
  function logDebug(step, msg, extra) {
24736
24789
  hook().debug(step, msg, extra);
24737
24790
  }
@@ -24744,14 +24797,17 @@ function logWarn(step, msg, extra) {
24744
24797
  function logError(step, err, ctx) {
24745
24798
  hook().error(step, err, ctx);
24746
24799
  }
24747
- function createDaemonLogger(level, dest, redact = () => false) {
24800
+ function createDaemonLogger(level, dest = daemonLogFile(), redact = () => false, limits) {
24748
24801
  try {
24802
+ if (typeof dest === "string")
24803
+ ensureLogsDir();
24749
24804
  const target = import_pino.default.destination({
24750
- ...dest === undefined ? { fd: 2 } : { dest },
24805
+ ...typeof dest === "number" ? { fd: dest } : { dest, mode: 384 },
24751
24806
  sync: true
24752
24807
  });
24753
24808
  const logger = import_pino.default({ ...pinoOpts, base: { pid: process.pid } }, target);
24754
- return wrap(logger, level, redact, "daemon");
24809
+ const rotate = limits && typeof dest === "string" ? () => rotateIfOversized(dest, limits.maxSize(), limits.keep()) : undefined;
24810
+ return wrap(logger, level, redact, "daemon", rotate);
24755
24811
  } catch {
24756
24812
  return noopLogger;
24757
24813
  }
@@ -24762,6 +24818,8 @@ var Port = exports_external.number().int().positive();
24762
24818
  var TimeoutS = exports_external.number().positive().lt(HOOK_TIMEOUT_S);
24763
24819
  var IdleMs = exports_external.number().int().nonnegative();
24764
24820
  var HeartbeatMs = exports_external.number().int().positive().lt(MAX_HEARTBEAT_MS);
24821
+ var LogMaxSize = exports_external.number().int().min(MIN_LOG_MAX_SIZE).max(MAX_LOG_MAX_SIZE);
24822
+ var LogKeep = exports_external.number().int().nonnegative();
24765
24823
  var DevIntervalMs = exports_external.number().int().positive();
24766
24824
  var Dev = exports_external.object({
24767
24825
  port: Port.optional(),
@@ -24775,7 +24833,9 @@ var Dev = exports_external.object({
24775
24833
  var SettingsSchema = exports_external.object({
24776
24834
  logging: exports_external.object({
24777
24835
  level: exports_external.enum(["debug", "info", "warn", "error"]).default("info"),
24778
- redact: exports_external.boolean().default(false)
24836
+ redact: exports_external.boolean().default(false),
24837
+ max_size: LogMaxSize.default(DEFAULT_LOG_MAX_SIZE),
24838
+ keep: LogKeep.default(DEFAULT_LOG_KEEP)
24779
24839
  }).prefault({}),
24780
24840
  daemon: exports_external.object({
24781
24841
  port: Port.default(DEFAULT_PORT),
@@ -24819,7 +24879,7 @@ function parseAndValidate(text, isCompiled) {
24819
24879
  function loadSettings(file2 = configFile(), isCompiled = isCompiledBinary()) {
24820
24880
  let text;
24821
24881
  try {
24822
- text = readFileSync6(file2, "utf-8");
24882
+ text = readFileSync7(file2, "utf-8");
24823
24883
  } catch {
24824
24884
  return DEFAULTS;
24825
24885
  }
@@ -24832,7 +24892,7 @@ function createSettings(file2 = configFile(), isCompiled = isCompiledBinary()) {
24832
24892
  current() {
24833
24893
  let st;
24834
24894
  try {
24835
- st = statSync(file2);
24895
+ st = statSync2(file2);
24836
24896
  } catch {
24837
24897
  return lastGood;
24838
24898
  }
@@ -24841,7 +24901,7 @@ function createSettings(file2 = configFile(), isCompiled = isCompiledBinary()) {
24841
24901
  }
24842
24902
  let text;
24843
24903
  try {
24844
- text = readFileSync6(file2, "utf-8");
24904
+ text = readFileSync7(file2, "utf-8");
24845
24905
  } catch {
24846
24906
  return lastGood;
24847
24907
  }
@@ -24894,7 +24954,9 @@ var ENV_VARS = [
24894
24954
  ["CARET_PORT", Port],
24895
24955
  ["CARET_TIMEOUT", TimeoutS],
24896
24956
  ["CARET_IDLE_MS", IdleMs],
24897
- ["CARET_HEARTBEAT_MS", HeartbeatMs]
24957
+ ["CARET_HEARTBEAT_MS", HeartbeatMs],
24958
+ ["CARET_LOG_MAX_SIZE", LogMaxSize],
24959
+ ["CARET_LOG_KEEP", LogKeep]
24898
24960
  ];
24899
24961
  function classifyEnv(raw, schema) {
24900
24962
  if (raw === undefined || raw.trim() === "")
@@ -24937,6 +24999,12 @@ function reviewTimeoutMs(s = settings().current()) {
24937
24999
  function heartbeatMs(s = settings().current()) {
24938
25000
  return envValue("CARET_HEARTBEAT_MS", HeartbeatMs) ?? s.daemon.heartbeat_ms;
24939
25001
  }
25002
+ function logMaxSize(s = settings().current()) {
25003
+ return envValue("CARET_LOG_MAX_SIZE", LogMaxSize) ?? s.logging.max_size;
25004
+ }
25005
+ function logKeep(s = settings().current()) {
25006
+ return envValue("CARET_LOG_KEEP", LogKeep) ?? s.logging.keep;
25007
+ }
24940
25008
 
24941
25009
  // src/commands/boot.ts
24942
25010
  function warnInvalidEnvVars(warn) {
@@ -24959,7 +25027,7 @@ function buildDiagnostics(deps) {
24959
25027
  }
24960
25028
 
24961
25029
  // src/daemon/lifecycle.ts
24962
- import { openSync, unlinkSync } from "fs";
25030
+ import { chmodSync as chmodSync2, openSync as openSync2, unlinkSync as unlinkSync2 } from "fs";
24963
25031
  import { normalize } from "path";
24964
25032
 
24965
25033
  // src/daemon/client.ts
@@ -25093,7 +25161,7 @@ function isPidAlive(pid) {
25093
25161
  }
25094
25162
  function removeDaemonLock() {
25095
25163
  try {
25096
- unlinkSync(daemonLock());
25164
+ unlinkSync2(daemonLock());
25097
25165
  } catch {}
25098
25166
  }
25099
25167
  async function retireDaemon(baseUrl, lock, currentStateDir, kill = (pid, sig) => process.kill(pid, sig)) {
@@ -25119,14 +25187,21 @@ function daemonCommand() {
25119
25187
  return [process.execPath, "daemon"];
25120
25188
  return [process.execPath, process.argv[1], "daemon"];
25121
25189
  }
25122
- function spawnDaemon() {
25123
- let out = "ignore";
25190
+ function openDaemonStderr(s) {
25191
+ const path = daemonStderrLogFile();
25124
25192
  try {
25125
- ensureStateDir();
25126
- out = openSync(daemonLogFile(), "a");
25193
+ ensureLogsDir();
25194
+ rotateIfOversized(path, logMaxSize(s), logKeep(s));
25195
+ const fd = openSync2(path, "a", 384);
25196
+ chmodSync2(path, 384);
25197
+ return fd;
25127
25198
  } catch {
25128
- logWarn("spawn", "daemon log unopenable; discarding daemon output");
25199
+ logWarn("spawn", "daemon stderr log unopenable; discarding output");
25200
+ return "ignore";
25129
25201
  }
25202
+ }
25203
+ function spawnDaemon(s) {
25204
+ const out = openDaemonStderr(s);
25130
25205
  Bun.spawn(daemonCommand(), {
25131
25206
  stdio: ["ignore", out, out],
25132
25207
  detached: true,
@@ -25149,14 +25224,14 @@ async function prodEnsureDeps(s) {
25149
25224
  isAlive: isPidAlive,
25150
25225
  retire: (baseUrl, lock) => retireDaemon(baseUrl, lock, world),
25151
25226
  removeLock: removeDaemonLock,
25152
- spawn: spawnDaemon,
25227
+ spawn: () => spawnDaemon(s),
25153
25228
  backoff,
25154
25229
  maxAttempts: 12
25155
25230
  };
25156
25231
  }
25157
25232
 
25158
25233
  // src/daemon/server.ts
25159
- import { renameSync as renameSync2, unlinkSync as unlinkSync2, writeFileSync as writeFileSync4 } from "fs";
25234
+ import { renameSync as renameSync3, unlinkSync as unlinkSync3, writeFileSync as writeFileSync5 } from "fs";
25160
25235
  import { dirname as dirname6 } from "path";
25161
25236
 
25162
25237
  // src/config/prefs.ts
@@ -25315,7 +25390,7 @@ import { readdir as readdir2 } from "fs/promises";
25315
25390
  import { join as join8, relative as relative3, sep as sep2 } from "path";
25316
25391
 
25317
25392
  // src/plan/excerpt.ts
25318
- import { readFileSync as readFileSync7 } from "fs";
25393
+ import { readFileSync as readFileSync8 } from "fs";
25319
25394
  import { readdir, realpath, stat } from "fs/promises";
25320
25395
  import { extname, isAbsolute, join as join7, relative as relative2, resolve, sep } from "path";
25321
25396
  var EXCERPT_HEAD_LINES = 60;
@@ -25456,7 +25531,7 @@ function readLines(abs, stats) {
25456
25531
  return memo.lines;
25457
25532
  let content;
25458
25533
  try {
25459
- content = readFileSync7(abs, "utf-8");
25534
+ content = readFileSync8(abs, "utf-8");
25460
25535
  } catch {
25461
25536
  return null;
25462
25537
  }
@@ -25602,12 +25677,12 @@ function createDecisions(log = noopLogger) {
25602
25677
  import { randomBytes } from "crypto";
25603
25678
 
25604
25679
  // src/plan/canonical-file.ts
25605
- import { appendFileSync, existsSync as existsSync4, statSync as statSync2, writeFileSync as writeFileSync2 } from "fs";
25680
+ import { appendFileSync, existsSync as existsSync5, statSync as statSync3, writeFileSync as writeFileSync3 } from "fs";
25606
25681
  function guardedPlanFileWrite(planFilePath, log, failMsg, write) {
25607
25682
  try {
25608
25683
  if (!planFilePath.endsWith(".md"))
25609
25684
  return;
25610
- if (!existsSync4(planFilePath) || !statSync2(planFilePath).isFile())
25685
+ if (!existsSync5(planFilePath) || !statSync3(planFilePath).isFile())
25611
25686
  return;
25612
25687
  write(planFilePath);
25613
25688
  } catch (err) {
@@ -25618,7 +25693,7 @@ function guardedPlanFileWrite(planFilePath, log, failMsg, write) {
25618
25693
  function writeCanonicalPlanFile(planFilePath, canonical, log) {
25619
25694
  if (!planFilePath)
25620
25695
  return;
25621
- guardedPlanFileWrite(planFilePath, log, "plan file canonicalize failed", (p) => writeFileSync2(p, canonical));
25696
+ guardedPlanFileWrite(planFilePath, log, "plan file canonicalize failed", (p) => writeFileSync3(p, canonical));
25622
25697
  }
25623
25698
  function appendReviewerNotesToPlanFile(planFilePath, notes, log) {
25624
25699
  const section = reviewerNotesSection(notes);
@@ -25629,27 +25704,27 @@ function appendReviewerNotesToPlanFile(planFilePath, notes, log) {
25629
25704
 
25630
25705
  // src/plan/rumdl.ts
25631
25706
  import { createHash as createHash2 } from "crypto";
25632
- import { chmodSync as chmodSync2, existsSync as existsSync5, mkdirSync as mkdirSync2, renameSync, writeFileSync as writeFileSync3 } from "fs";
25707
+ import { chmodSync as chmodSync3, existsSync as existsSync6, mkdirSync as mkdirSync2, renameSync as renameSync2, writeFileSync as writeFileSync4 } from "fs";
25633
25708
  import { mkdtemp, rm } from "fs/promises";
25634
25709
  import { tmpdir } from "os";
25635
25710
  import { dirname as dirname5, join as join9 } from "path";
25636
- var RUMDL_VERSION = "0.2.47";
25711
+ var RUMDL_VERSION = "0.2.54";
25637
25712
  var ASSETS = {
25638
25713
  "darwin-arm64": {
25639
25714
  url: `https://github.com/rvben/rumdl/releases/download/v${RUMDL_VERSION}/rumdl-v${RUMDL_VERSION}-aarch64-apple-darwin.tar.gz`,
25640
- sha256: "10dc23e994327ecc6e98d285802fcad1174608f203062cb18bac55b51976e0cb"
25715
+ sha256: "e2e005d6824d41402567feb5af21e1cfcd0ee47ea52a8ea53695479822ef4094"
25641
25716
  },
25642
25717
  "darwin-x64": {
25643
25718
  url: `https://github.com/rvben/rumdl/releases/download/v${RUMDL_VERSION}/rumdl-v${RUMDL_VERSION}-x86_64-apple-darwin.tar.gz`,
25644
- sha256: "9a2bf0c692310e0469fdc66fa83f74579cf0331cc1f9b306b25849cffd146c0f"
25719
+ sha256: "b3035da193b40a0247a9a88d07679bf248919a3e1f2664ad7ef822d97e65cc1d"
25645
25720
  },
25646
25721
  "linux-arm64": {
25647
25722
  url: `https://github.com/rvben/rumdl/releases/download/v${RUMDL_VERSION}/rumdl-v${RUMDL_VERSION}-aarch64-unknown-linux-musl.tar.gz`,
25648
- sha256: "b5ab4207b92c0bf0ea6d8946f15545c787e8cf6ecf2176d9e7f26c43aead86a8"
25723
+ sha256: "c27a96495f66415489d61346efef69bee4cf700d3739a9c5ba89bd477f9249ba"
25649
25724
  },
25650
25725
  "linux-x64": {
25651
25726
  url: `https://github.com/rvben/rumdl/releases/download/v${RUMDL_VERSION}/rumdl-v${RUMDL_VERSION}-x86_64-unknown-linux-musl.tar.gz`,
25652
- sha256: "bd4049763e93d6c25420ec086dee6690af31efc85af463c3ecf5d686a5fcf762"
25727
+ sha256: "a58c8de71484d4587f2a138476d70b3b2595366941d37b00606e80f86912aabb"
25653
25728
  }
25654
25729
  };
25655
25730
  function rumdlAsset(platform = process.platform, arch = process.arch) {
@@ -25683,13 +25758,13 @@ async function downloadRumdl(binPath, asset, fetchImpl = fetch) {
25683
25758
  if (await tar.exited !== 0)
25684
25759
  throw new Error(`rumdl: failed to extract ${asset.url}`);
25685
25760
  const extracted = join9(work, "rumdl");
25686
- if (!existsSync5(extracted))
25761
+ if (!existsSync6(extracted))
25687
25762
  throw new Error(`rumdl: binary not found in ${asset.url}`);
25688
25763
  mkdirSync2(dirname5(binPath), { recursive: true });
25689
25764
  const tmp = `${binPath}.${process.pid}.tmp`;
25690
25765
  await Bun.write(tmp, Bun.file(extracted));
25691
- chmodSync2(tmp, 493);
25692
- renameSync(tmp, binPath);
25766
+ chmodSync3(tmp, 493);
25767
+ renameSync2(tmp, binPath);
25693
25768
  return binPath;
25694
25769
  } finally {
25695
25770
  await rm(work, { recursive: true, force: true });
@@ -25697,7 +25772,7 @@ async function downloadRumdl(binPath, asset, fetchImpl = fetch) {
25697
25772
  }
25698
25773
  var installPinnedRumdl = (binPath) => downloadRumdl(binPath, rumdlAsset());
25699
25774
  async function installedVersion(bin) {
25700
- if (!existsSync5(bin))
25775
+ if (!existsSync6(bin))
25701
25776
  return null;
25702
25777
  try {
25703
25778
  const proc = Bun.spawn([bin, "--version"], { stdout: "pipe", stderr: "ignore" });
@@ -25713,7 +25788,7 @@ var inFlightInstall;
25713
25788
  async function ensureRumdl(install = installPinnedRumdl) {
25714
25789
  ensureStateDir(rumdlDir());
25715
25790
  const config2 = rumdlConfig();
25716
- writeFileSync3(config2, RUMDL_CONFIG);
25791
+ writeFileSync4(config2, RUMDL_CONFIG);
25717
25792
  const override = process.env.CARET_RUMDL_BIN?.trim();
25718
25793
  if (override && await installedVersion(override) === RUMDL_VERSION) {
25719
25794
  return { bin: override, config: config2, installed: false };
@@ -26336,15 +26411,15 @@ function createServer(opts) {
26336
26411
  instanceId
26337
26412
  };
26338
26413
  const tmp = `${lockPath}.tmp.${process.pid}`;
26339
- writeFileSync4(tmp, JSON.stringify(lock));
26340
- renameSync2(tmp, lockPath);
26414
+ writeFileSync5(tmp, JSON.stringify(lock));
26415
+ renameSync3(tmp, lockPath);
26341
26416
  } catch {}
26342
26417
  }
26343
26418
  function removeLock() {
26344
26419
  if (!lockPath)
26345
26420
  return;
26346
26421
  try {
26347
- unlinkSync2(lockPath);
26422
+ unlinkSync3(lockPath);
26348
26423
  } catch {}
26349
26424
  }
26350
26425
  writeLock();
@@ -26467,10 +26542,10 @@ function createStore(dir, log = noopLogger) {
26467
26542
  async function runDaemon(opts) {
26468
26543
  const startedAt = Date.now();
26469
26544
  const svc = watchSettings(settings(), (changes) => log.info("settings", `settings changed: ${changes.join("; ")}`));
26470
- const log = createDaemonLogger(() => svc.current().logging.level, undefined, () => svc.current().logging.redact);
26545
+ const log = createDaemonLogger(() => svc.current().logging.level, undefined, () => svc.current().logging.redact, { maxSize: () => logMaxSize(svc.current()), keep: () => logKeep(svc.current()) });
26471
26546
  const cfg = configFile();
26472
26547
  const boot = svc.current();
26473
- log.info("settings", existsSync6(cfg) ? `settings: reading ${cfg}` : `settings: no config at ${cfg}; using defaults`, { settings: boot });
26548
+ log.info("settings", existsSync7(cfg) ? `settings: reading ${cfg}` : `settings: no config at ${cfg}; using defaults`, { settings: boot });
26474
26549
  warnInvalidEnvVars((msg) => log.warn("env", msg));
26475
26550
  const adapter = selectAdapter();
26476
26551
  const store = createStore(reviewsDir(), log);
@@ -26504,7 +26579,7 @@ async function runDaemon(opts) {
26504
26579
  }),
26505
26580
  settings: () => settings().current(),
26506
26581
  configPath: cfg,
26507
- configExists: () => existsSync6(cfg),
26582
+ configExists: () => existsSync7(cfg),
26508
26583
  envOverrides
26509
26584
  }),
26510
26585
  log
@@ -26537,18 +26612,18 @@ async function runDaemon(opts) {
26537
26612
  process.once("unhandledRejection", onFatal("unhandledRejection"));
26538
26613
  process.once("exit", () => {
26539
26614
  try {
26540
- unlinkSync3(daemonLock());
26615
+ unlinkSync4(daemonLock());
26541
26616
  } catch {}
26542
26617
  });
26543
26618
  }
26544
26619
 
26545
26620
  // src/commands/discovery.ts
26546
- import { existsSync as existsSync7 } from "fs";
26621
+ import { existsSync as existsSync8 } from "fs";
26547
26622
  import { release } from "os";
26548
26623
 
26549
26624
  // src/discovery.ts
26550
- import { readdirSync as readdirSync3, statSync as statSync3 } from "fs";
26551
- import { basename as basename2, join as join11 } from "path";
26625
+ import { readdirSync as readdirSync4, statSync as statSync4 } from "fs";
26626
+ import { basename as basename3, join as join11 } from "path";
26552
26627
  var CARET_BIN = "caret-native";
26553
26628
  async function safe(build) {
26554
26629
  try {
@@ -26646,11 +26721,12 @@ function buildProcesses(deps) {
26646
26721
  return { count: items.length, items };
26647
26722
  }
26648
26723
  async function buildLogs(deps) {
26649
- const [caret, daemon] = await Promise.all([
26724
+ const [caret, daemon, daemonStderr] = await Promise.all([
26650
26725
  deps.logStats(deps.logPaths.caret),
26651
- deps.logStats(deps.logPaths.daemon)
26726
+ deps.logStats(deps.logPaths.daemon),
26727
+ deps.logStats(deps.logPaths.daemonStderr)
26652
26728
  ]);
26653
- return { caret, daemon };
26729
+ return { caret, daemon, daemonStderr };
26654
26730
  }
26655
26731
  function tallyReviews(records) {
26656
26732
  const counts = { pending: 0, approved: 0, rejected: 0, expired: 0, other: 0 };
@@ -26728,7 +26804,7 @@ function parsePsLines(text) {
26728
26804
  const [, pidStr, comm] = m ?? [];
26729
26805
  if (pidStr === undefined || comm === undefined)
26730
26806
  continue;
26731
- const name = basename2(comm.trim());
26807
+ const name = basename3(comm.trim());
26732
26808
  if (name === CARET_BIN)
26733
26809
  out.push({ pid: Number(pidStr), name });
26734
26810
  }
@@ -26748,7 +26824,7 @@ function listReviewFiles() {
26748
26824
  const dir = reviewsDir();
26749
26825
  let files;
26750
26826
  try {
26751
- files = readdirSync3(dir);
26827
+ files = readdirSync4(dir);
26752
26828
  } catch {
26753
26829
  return [];
26754
26830
  }
@@ -26769,7 +26845,7 @@ var TAIL_BYTES = 256 * 1024;
26769
26845
  async function logStats(path) {
26770
26846
  let size;
26771
26847
  try {
26772
- size = statSync3(path).size;
26848
+ size = statSync4(path).size;
26773
26849
  } catch {
26774
26850
  return { path, exists: false, size: 0, errors: 0, warns: 0 };
26775
26851
  }
@@ -26821,7 +26897,7 @@ function prodDiscoveryDeps(s) {
26821
26897
  }),
26822
26898
  settings: () => s,
26823
26899
  configPath: configFile(),
26824
- configExists: () => existsSync7(configFile()),
26900
+ configExists: () => existsSync8(configFile()),
26825
26901
  effective: () => ({
26826
26902
  port: getPort(s),
26827
26903
  idleMs: idleMs(s),
@@ -26836,7 +26912,11 @@ function prodDiscoveryDeps(s) {
26836
26912
  listReviewFiles,
26837
26913
  readAgentInstallState: () => selectAdapter().readInstallState(),
26838
26914
  logStats,
26839
- logPaths: { caret: logFile(), daemon: daemonLogFile() }
26915
+ logPaths: {
26916
+ caret: logFile(),
26917
+ daemon: daemonLogFile(),
26918
+ daemonStderr: daemonStderrLogFile()
26919
+ }
26840
26920
  };
26841
26921
  }
26842
26922
  async function runDiscoverySubcommand(opts) {
@@ -26859,17 +26939,17 @@ async function runDiscoverySubcommand(opts) {
26859
26939
  import {
26860
26940
  accessSync,
26861
26941
  constants,
26862
- existsSync as existsSync9,
26942
+ existsSync as existsSync10,
26863
26943
  mkdirSync as mkdirSync3,
26864
26944
  rmSync as rmSync2,
26865
- statSync as statSync4,
26945
+ statSync as statSync5,
26866
26946
  symlinkSync,
26867
- writeFileSync as writeFileSync5
26947
+ writeFileSync as writeFileSync6
26868
26948
  } from "fs";
26869
26949
  import { join as join13, resolve as resolve2 } from "path";
26870
26950
 
26871
26951
  // src/adapters/opencode/packaging.ts
26872
- import { existsSync as existsSync8, readdirSync as readdirSync4, readFileSync as readFileSync8 } from "fs";
26952
+ import { existsSync as existsSync9, readdirSync as readdirSync5, readFileSync as readFileSync9 } from "fs";
26873
26953
  import { dirname as dirname7, join as join12 } from "path";
26874
26954
  function resolveCaretRoot() {
26875
26955
  const candidates = [];
@@ -26878,7 +26958,7 @@ function resolveCaretRoot() {
26878
26958
  candidates.push(join12(dirname7(script), ".."));
26879
26959
  candidates.push(join12(dirname7(process.execPath), ".."));
26880
26960
  for (const root of candidates) {
26881
- if (existsSync8(join12(root, "opencode", "caret.plugin.ts")))
26961
+ if (existsSync9(join12(root, "opencode", "caret.plugin.ts")))
26882
26962
  return root;
26883
26963
  }
26884
26964
  throw new Error(`caret OpenCode packaging not found (no opencode/caret.plugin.ts under: ${candidates.join(", ") || "(none)"}). The OpenCode plugin source must ship with caret.`);
@@ -26888,7 +26968,7 @@ function loadOpencodePackaging(root = resolveCaretRoot()) {
26888
26968
  const commandsDir = join12(root, "opencode", "commands");
26889
26969
  let commands = [];
26890
26970
  try {
26891
- commands = readdirSync4(commandsDir).filter((f) => f.endsWith(".md")).sort().map((f) => ({ name: f, contents: readFileSync8(join12(commandsDir, f), "utf-8") }));
26971
+ commands = readdirSync5(commandsDir).filter((f) => f.endsWith(".md")).sort().map((f) => ({ name: f, contents: readFileSync9(join12(commandsDir, f), "utf-8") }));
26892
26972
  } catch {
26893
26973
  commands = [];
26894
26974
  }
@@ -26901,7 +26981,7 @@ function devMarketplaceDir() {
26901
26981
  }
26902
26982
  function resolveLocalCheckout(opts = {}, deps = {}) {
26903
26983
  const repoDir = resolve2(caretRoot(deps));
26904
- if (!existsSync9(join13(repoDir, ".claude-plugin", "marketplace.json"))) {
26984
+ if (!existsSync10(join13(repoDir, ".claude-plugin", "marketplace.json"))) {
26905
26985
  throw new Error(`--from-local must run from a caret checkout (no .claude-plugin/marketplace.json at ${repoDir}). A published caret installs with a plain \`caret install\`.`);
26906
26986
  }
26907
26987
  if (opts.requireArtifacts !== false) {
@@ -26928,7 +27008,7 @@ function writeDevMarketplace(repoDir, outDir) {
26928
27008
  rmSync2(outDir, { recursive: true, force: true });
26929
27009
  mkdirSync3(join13(outDir, ".claude-plugin"), { recursive: true });
26930
27010
  symlinkSync(resolve2(repoDir), join13(outDir, "caret"));
26931
- writeFileSync5(join13(outDir, ".claude-plugin", "marketplace.json"), `${JSON.stringify({
27011
+ writeFileSync6(join13(outDir, ".claude-plugin", "marketplace.json"), `${JSON.stringify({
26932
27012
  name: "caret",
26933
27013
  description: "Local caret dev build (generated by caret install --from-local).",
26934
27014
  owner: { name: "macintacos" },
@@ -26945,14 +27025,14 @@ async function prewarmLocalBuild(repoDir, deps = {}) {
26945
27025
  function isExecutable(path) {
26946
27026
  try {
26947
27027
  accessSync(path, constants.X_OK);
26948
- return statSync4(path).isFile();
27028
+ return statSync5(path).isFile();
26949
27029
  } catch {
26950
27030
  return false;
26951
27031
  }
26952
27032
  }
26953
27033
  function isDirectory(path) {
26954
27034
  try {
26955
- return statSync4(path).isDirectory();
27035
+ return statSync5(path).isDirectory();
26956
27036
  } catch {
26957
27037
  return false;
26958
27038
  }
@@ -27213,11 +27293,11 @@ async function runInstallClaudeTarget(opts, deps = {}) {
27213
27293
  }
27214
27294
 
27215
27295
  // src/commands/install/opencode.ts
27216
- import { existsSync as existsSync13, readFileSync as readFileSync9, writeFileSync as writeFileSync7 } from "fs";
27217
- import { basename as basename3, join as join15 } from "path";
27296
+ import { existsSync as existsSync14, readFileSync as readFileSync10, writeFileSync as writeFileSync8 } from "fs";
27297
+ import { basename as basename4, join as join15 } from "path";
27218
27298
 
27219
27299
  // src/adapters/opencode/deploy.ts
27220
- import { existsSync as existsSync11, mkdirSync as mkdirSync4, rmSync as rmSync3, writeFileSync as writeFileSync6 } from "fs";
27300
+ import { existsSync as existsSync12, mkdirSync as mkdirSync4, rmSync as rmSync3, writeFileSync as writeFileSync7 } from "fs";
27221
27301
  import { dirname as dirname9 } from "path";
27222
27302
  function renderPlugin(source, opts) {
27223
27303
  return source.replaceAll("__CARET_VERSION__", () => opts.version).replaceAll("__CARET_BIN__", () => opts.binPath);
@@ -27227,7 +27307,7 @@ function deployFiles(files, opts) {
27227
27307
  for (const f2 of files) {
27228
27308
  if (!opts.dryRun) {
27229
27309
  mkdirSync4(dirname9(f2.path), { recursive: true });
27230
- writeFileSync6(f2.path, f2.contents);
27310
+ writeFileSync7(f2.path, f2.contents);
27231
27311
  }
27232
27312
  paths.push(f2.path);
27233
27313
  }
@@ -27236,7 +27316,7 @@ function deployFiles(files, opts) {
27236
27316
  function removeFiles(targets, opts) {
27237
27317
  const paths = [];
27238
27318
  for (const p3 of targets) {
27239
- if (!existsSync11(p3))
27319
+ if (!existsSync12(p3))
27240
27320
  continue;
27241
27321
  if (!opts.dryRun)
27242
27322
  rmSync3(p3, { force: true });
@@ -27246,7 +27326,7 @@ function removeFiles(targets, opts) {
27246
27326
  }
27247
27327
 
27248
27328
  // src/commands/install/targets.ts
27249
- import { existsSync as existsSync12 } from "fs";
27329
+ import { existsSync as existsSync13 } from "fs";
27250
27330
  var INSTALL_TARGET_IDS = ["claude", "opencode"];
27251
27331
  var INSTALL_TARGETS = [
27252
27332
  {
@@ -27264,7 +27344,7 @@ var INSTALL_TARGETS = [
27264
27344
  ];
27265
27345
  var systemProbe = {
27266
27346
  hasCommand: (name) => Bun.which(name) !== null,
27267
- hasPath: existsSync12
27347
+ hasPath: existsSync13
27268
27348
  };
27269
27349
  function detectTargets(probe = systemProbe) {
27270
27350
  return INSTALL_TARGETS.filter((t2) => t2.detect(probe)).map((t2) => t2.id);
@@ -27317,7 +27397,7 @@ async function promptUpgrade(verdict, clack) {
27317
27397
 
27318
27398
  // src/commands/install/opencode.ts
27319
27399
  function isCaretCheckout(dir) {
27320
- return existsSync13(join15(dir, "opencode", "caret.plugin.ts"));
27400
+ return existsSync14(join15(dir, "opencode", "caret.plugin.ts"));
27321
27401
  }
27322
27402
  function caretEntries(text2, isCheckout) {
27323
27403
  return pluginEntries(text2).filter((entry) => {
@@ -27356,12 +27436,12 @@ async function runInstallOpencodeTarget(opts, deps = {}) {
27356
27436
  return;
27357
27437
  }
27358
27438
  if (opts.uninstall) {
27359
- await ui.step("Removing caret from OpenCode's plugin array", async () => editConfig(configFile2, (text2) => text2 === null ? null : caretEntries(text2, isCheckout).reduce((acc, entry) => removePluginFromConfigText(acc, entry), text2)), (changed) => changed.length > 0 ? `Removed caret from ${basename3(configFile2)}` : `caret was not in ${basename3(configFile2)}`);
27439
+ await ui.step("Removing caret from OpenCode's plugin array", async () => editConfig(configFile2, (text2) => text2 === null ? null : caretEntries(text2, isCheckout).reduce((acc, entry) => removePluginFromConfigText(acc, entry), text2)), (changed) => changed.length > 0 ? `Removed caret from ${basename4(configFile2)}` : `caret was not in ${basename4(configFile2)}`);
27360
27440
  await ui.step("Removing the /caret:* command files", async () => removeFiles(commandPaths, { dryRun: false }), (removed) => `Removed ${removed.paths.length} command file(s) from ${dir}`);
27361
27441
  await sweepLegacy(legacy, dir, ui);
27362
27442
  return;
27363
27443
  }
27364
- await ui.step(`Adding ${specifier} to OpenCode's plugin array`, async () => editConfig(configFile2, (text2) => setCaretPluginEntry(text2, specifier, isCheckout)), (changed) => changed.length > 0 ? `Added ${specifier} to ${basename3(configFile2)}` : `${specifier} was already in ${basename3(configFile2)}`);
27444
+ await ui.step(`Adding ${specifier} to OpenCode's plugin array`, async () => editConfig(configFile2, (text2) => setCaretPluginEntry(text2, specifier, isCheckout)), (changed) => changed.length > 0 ? `Added ${specifier} to ${basename4(configFile2)}` : `${specifier} was already in ${basename4(configFile2)}`);
27365
27445
  if (checks3(opts))
27366
27446
  await upgradeStep(configFile2, opts, deps, ui);
27367
27447
  await sweepLegacy(legacy, dir, ui);
@@ -27412,17 +27492,17 @@ async function upgradeStep(configFile2, opts, deps, ui) {
27412
27492
  await ui.step("Clearing OpenCode's cached caret", async () => (deps.clearCache ?? clearCachedCaret)(dirs), (cleared) => `Cleared ${cleared.length} cached ${cleared.length === 1 ? "copy" : "copies"} \u2014 OpenCode re-resolves on next start`);
27413
27493
  return;
27414
27494
  }
27415
- await ui.step(`Bumping ${CARET_PACKAGE} to ${verdict.published}`, async () => editConfig(configFile2, (text2) => text2 === null ? null : setPluginVersionInConfigText(text2, CARET_PACKAGE, verdict.published)), (changed) => changed.length > 0 ? `Bumped the pin to ${CARET_PACKAGE}@${verdict.published}` : `Left ${basename3(configFile2)} unchanged`);
27495
+ await ui.step(`Bumping ${CARET_PACKAGE} to ${verdict.published}`, async () => editConfig(configFile2, (text2) => text2 === null ? null : setPluginVersionInConfigText(text2, CARET_PACKAGE, verdict.published)), (changed) => changed.length > 0 ? `Bumped the pin to ${CARET_PACKAGE}@${verdict.published}` : `Left ${basename4(configFile2)} unchanged`);
27416
27496
  }
27417
27497
  function readConfigText(path2) {
27418
- return existsSync13(path2) ? readFileSync9(path2, "utf-8") : null;
27498
+ return existsSync14(path2) ? readFileSync10(path2, "utf-8") : null;
27419
27499
  }
27420
27500
  function editConfig(path2, transform2) {
27421
27501
  const existing = readConfigText(path2);
27422
27502
  const next = transform2(existing);
27423
27503
  if (next === null || next === existing)
27424
27504
  return [];
27425
- writeFileSync7(path2, next);
27505
+ writeFileSync8(path2, next);
27426
27506
  return [path2];
27427
27507
  }
27428
27508
 
@@ -27615,6 +27695,7 @@ async function runReconcileSubcommand() {
27615
27695
  const loaded = loadSettings();
27616
27696
  setLogLevel(loaded.logging.level);
27617
27697
  setRedact(loaded.logging.redact);
27698
+ setLogRotation(logMaxSize(loaded), logKeep(loaded));
27618
27699
  warnInvalidEnvVars((msg) => logWarn("env", msg));
27619
27700
  const adapter = selectAdapter();
27620
27701
  const baseUrl = `http://localhost:${getPort(loaded)}`;
@@ -27646,23 +27727,23 @@ function runRedactSubcommand() {
27646
27727
  }
27647
27728
  }
27648
27729
 
27649
- // node_modules/.bun/marked@18.0.4/node_modules/marked/lib/marked.esm.js
27650
- function M2() {
27730
+ // node_modules/.bun/marked@18.0.9/node_modules/marked/lib/marked.esm.js
27731
+ function C3() {
27651
27732
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
27652
27733
  }
27653
- var T3 = M2();
27654
- function N2(l2) {
27655
- T3 = l2;
27734
+ var R2 = C3();
27735
+ function j(l2) {
27736
+ R2 = l2;
27656
27737
  }
27657
- var _2 = { exec: () => null };
27658
- function E2(l2) {
27738
+ var z2 = { exec: () => null };
27739
+ function A2(l2) {
27659
27740
  let e = [];
27660
27741
  return (t2) => {
27661
27742
  let n3 = Math.max(0, Math.min(3, t2 - 1)), s = e[n3];
27662
27743
  return s || (s = l2(n3), e[n3] = s), s;
27663
27744
  };
27664
27745
  }
27665
- function d(l2, e = "") {
27746
+ function k(l2, e = "") {
27666
27747
  let t2 = typeof l2 == "string" ? l2 : l2.source, n3 = { replace: (s, r2) => {
27667
27748
  let i2 = typeof r2 == "string" ? r2 : r2.source;
27668
27749
  return i2 = i2.replace(m3.caret, "$1"), t2 = t2.replace(s, i2), n3;
@@ -27676,71 +27757,80 @@ var Te = ((l2 = "") => {
27676
27757
  return false;
27677
27758
  }
27678
27759
  })();
27679
- var m3 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l2) => new RegExp(`^( {0,3}${l2})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: E2((l2) => new RegExp(`^ {0,${l2}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: E2((l2) => new RegExp(`^ {0,${l2}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: E2((l2) => new RegExp(`^ {0,${l2}}(?:\`\`\`|~~~)`)), headingBeginRegex: E2((l2) => new RegExp(`^ {0,${l2}}#`)), htmlBeginRegex: E2((l2) => new RegExp(`^ {0,${l2}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: E2((l2) => new RegExp(`^ {0,${l2}}>`)) };
27760
+ var m3 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l2) => new RegExp(`^( {0,3}${l2})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: A2((l2) => new RegExp(`^ {0,${l2}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: A2((l2) => new RegExp(`^ {0,${l2}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: A2((l2) => new RegExp(`^ {0,${l2}}(?:\`\`\`|~~~)`)), headingBeginRegex: A2((l2) => new RegExp(`^ {0,${l2}}#`)), htmlBeginRegex: A2((l2) => new RegExp(`^ {0,${l2}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: A2((l2) => new RegExp(`^ {0,${l2}}>`)) };
27680
27761
  var Oe = /^(?:[ \t]*(?:\n|$))+/;
27681
27762
  var we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
27682
27763
  var ye = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
27683
- var B = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
27764
+ var q = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
27684
27765
  var Pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
27685
- var j = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
27766
+ var U2 = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
27686
27767
  var oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
27687
- var ae = d(oe).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
27688
- var Se = d(oe).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
27689
- var F = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
27690
- var $e = /^[^\n]+/;
27691
- var U2 = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
27692
- var Le = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", U2).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
27693
- var _e = d(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, j).getRegex();
27694
- var H = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
27695
- var K2 = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
27696
- var ze = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))", "i").replace("comment", K2).replace("tag", H).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
27697
- var le = d(F).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex();
27698
- var Me = d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", le).getRegex();
27699
- var W2 = { blockquote: Me, code: we, def: Le, fences: ye, heading: Pe, hr: B, html: ze, lheading: ae, list: _e, newline: Oe, paragraph: le, table: _2, text: $e };
27700
- var se = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3}\t)[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex();
27701
- var Ee = { ...W2, lheading: Se, table: se, paragraph: d(F).replace("hr", B).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex() };
27702
- var Ie = { ...W2, html: d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", K2).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _2, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d(F).replace("hr", B).replace("heading", ` *#{1,6} *[^
27768
+ var ae = k(oe).replace(/bull/g, U2).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
27769
+ var Se = k(oe).replace(/bull/g, U2).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
27770
+ var K2 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/;
27771
+ var _e = /^[^\n]+/;
27772
+ var W2 = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
27773
+ var $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W2).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
27774
+ var Le = k(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, U2).getRegex();
27775
+ var Q2 = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
27776
+ var X = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
27777
+ var Me = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))", "i").replace("comment", X).replace("tag", Q2).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
27778
+ var le = (l2) => k(K2).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", l2).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q2).getRegex();
27779
+ var ze = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/);
27780
+ var Ee = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/);
27781
+ var Ce = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ee).getRegex();
27782
+ var J2 = { blockquote: Ce, code: we, def: $e, fences: ye, heading: Pe, hr: q, html: Me, lheading: ae, list: Le, newline: Oe, paragraph: ze, table: z2, text: _e };
27783
+ var se = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3}\t)[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q2).getRegex();
27784
+ var Ae = { ...J2, lheading: Se, table: se, paragraph: k(K2).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q2).getRegex() };
27785
+ var Ie = { ...J2, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", X).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: z2, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(K2).replace("hr", q).replace("heading", ` *#{1,6} *[^
27703
27786
  ]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
27704
- var Ae = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
27705
- var Ce = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
27706
- var ue = /^( {2,}|\\)\n(?!\s*$)/;
27707
- var Be = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
27708
- var I2 = /[\p{P}\p{S}]/u;
27709
- var Z = /[\s\p{P}\p{S}]/u;
27710
- var X = /[^\s\p{P}\p{S}]/u;
27711
- var De = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Z).getRegex();
27712
- var pe = /(?!~)[\p{P}\p{S}]/u;
27713
- var qe = /(?!~)[\s\p{P}\p{S}]/u;
27714
- var ve = /(?:[^\s\p{P}\p{S}]|~)/u;
27715
- var He = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Te ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
27787
+ var Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
27788
+ var De = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
27789
+ var pe = /^( {2,}|\\)\n(?!\s*$)/;
27790
+ var qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
27791
+ var _2 = /[\p{P}\p{S}]/u;
27792
+ var I2 = /[\s\p{P}\p{S}]/u;
27793
+ var v = /[^\s\p{P}\p{S}]/u;
27794
+ var ve = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, I2).getRegex();
27795
+ var He = /[\p{Pi}\p{Ps}"']/u;
27796
+ var ue = /(?!~)[\p{P}\p{S}]/u;
27797
+ var Ze = /(?!~)[\s\p{P}\p{S}]/u;
27798
+ var Ge = /(?:[^\s\p{P}\p{S}]|~)/u;
27799
+ var Qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Te ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
27716
27800
  var ce = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
27717
- var Ze = d(ce, "u").replace(/punct/g, I2).getRegex();
27718
- var Ge = d(ce, "u").replace(/punct/g, pe).getRegex();
27801
+ var Ne = k(ce, "u").replace(/punct/g, _2).getRegex();
27802
+ var je = k(ce, "u").replace(/punct/g, ue).getRegex();
27803
+ var Fe = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/;
27804
+ var Ue = k(Fe, "u").replace(/openQuote/g, He).replace(/punct/g, _2).getRegex();
27719
27805
  var he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
27720
- var Ne = d(he, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z).replace(/punct/g, I2).getRegex();
27721
- var Qe = d(he, "gu").replace(/notPunctSpace/g, ve).replace(/punctSpace/g, qe).replace(/punct/g, pe).getRegex();
27722
- var je = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z).replace(/punct/g, I2).getRegex();
27723
- var Fe = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, I2).getRegex();
27724
- var Ue = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
27725
- var Ke = d(Ue, "gu").replace(/notPunctSpace/g, X).replace(/punctSpace/g, Z).replace(/punct/g, I2).getRegex();
27726
- var We = d(/\\(punct)/, "gu").replace(/punct/g, I2).getRegex();
27727
- var Xe = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
27728
- var Je = d(K2).replace("(?:-->|$)", "-->").getRegex();
27729
- var Ve = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
27730
- var v = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
27731
- var Ye = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", v).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
27732
- var ke = d(/^!?\[(label)\]\[(ref)\]/).replace("label", v).replace("ref", U2).getRegex();
27733
- var de = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", U2).getRegex();
27734
- var et = d("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", de).getRegex();
27806
+ var Ke = k(he, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, I2).replace(/punct/g, _2).getRegex();
27807
+ var We = k(he, "gu").replace(/notPunctSpace/g, Ge).replace(/punctSpace/g, Ze).replace(/punct/g, ue).getRegex();
27808
+ var Xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)";
27809
+ var Je = k(Xe, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, I2).replace(/punct/g, _2).getRegex();
27810
+ var Ve = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, I2).replace(/punct/g, _2).getRegex();
27811
+ var Ye = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)";
27812
+ var et = k(Ye, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, I2).replace(/punct/g, _2).getRegex();
27813
+ var tt = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _2).getRegex();
27814
+ var nt = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
27815
+ var rt = k(nt, "gu").replace(/notPunctSpace/g, v).replace(/punctSpace/g, I2).replace(/punct/g, _2).getRegex();
27816
+ var st = k(/\\(punct)/, "gu").replace(/punct/g, _2).getRegex();
27817
+ var it = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
27818
+ var ot = k(X).replace("(?:-->|$)", "-->").getRegex();
27819
+ var at = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ot).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
27820
+ var G = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
27821
+ var lt = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
27822
+ var de = k(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", W2).getRegex();
27823
+ var ke = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", W2).getRegex();
27824
+ var pt = k("reflink|nolink(?!\\()", "g").replace("reflink", de).replace("nolink", ke).getRegex();
27735
27825
  var ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
27736
- var J2 = { _backpedal: _2, anyPunctuation: We, autolink: Xe, blockSkip: He, br: ue, code: Ce, del: _2, delLDelim: _2, delRDelim: _2, emStrongLDelim: Ze, emStrongRDelimAst: Ne, emStrongRDelimUnd: je, escape: Ae, link: Ye, nolink: de, punctuation: De, reflink: ke, reflinkSearch: et, tag: Ve, text: Be, url: _2 };
27737
- var tt = { ...J2, link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", v).getRegex(), reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", v).getRegex() };
27738
- var Q2 = { ...J2, emStrongRDelimAst: Qe, emStrongLDelim: Ge, delLDelim: Fe, delRDelim: Ke, url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() };
27739
- var nt = { ...Q2, br: d(ue).replace("{2,}", "*").getRegex(), text: d(Q2.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
27740
- var D = { normal: W2, gfm: Ee, pedantic: Ie };
27741
- var A2 = { normal: J2, gfm: Q2, breaks: nt, pedantic: tt };
27742
- var rt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
27743
- var ge = (l2) => rt[l2];
27826
+ var V2 = { _backpedal: z2, anyPunctuation: st, autolink: it, blockSkip: Qe, br: pe, code: De, del: z2, delLDelim: z2, delRDelim: z2, emStrongLDelim: Ne, emStrongRDelimAst: Ke, emStrongRDelimUnd: Ve, escape: Be, link: lt, nolink: ke, punctuation: ve, reflink: de, reflinkSearch: pt, tag: at, text: qe, url: z2 };
27827
+ var ut = { ...V2, emStrongLDelim: Ue, emStrongRDelimAst: Je, emStrongRDelimUnd: et, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex() };
27828
+ var F = { ...V2, emStrongRDelimAst: We, emStrongLDelim: je, delLDelim: tt, delRDelim: rt, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() };
27829
+ var ct = { ...F, br: k(pe).replace("{2,}", "*").getRegex(), text: k(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
27830
+ var H = { normal: J2, gfm: Ae, pedantic: Ie };
27831
+ var B = { normal: V2, gfm: F, breaks: ct, pedantic: ut };
27832
+ var ht = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" };
27833
+ var ge = (l2) => ht[l2];
27744
27834
  function O(l2, e) {
27745
27835
  if (e) {
27746
27836
  if (m3.escapeTest.test(l2))
@@ -27749,7 +27839,7 @@ function O(l2, e) {
27749
27839
  return l2.replace(m3.escapeReplaceNoEncode, ge);
27750
27840
  return l2;
27751
27841
  }
27752
- function V2(l2) {
27842
+ function Y(l2) {
27753
27843
  try {
27754
27844
  l2 = encodeURI(l2).replace(m3.percentDecode, "%");
27755
27845
  } catch {
@@ -27757,12 +27847,12 @@ function V2(l2) {
27757
27847
  }
27758
27848
  return l2;
27759
27849
  }
27760
- function Y(l2, e) {
27850
+ function ee(l2, e) {
27761
27851
  let t2 = l2.replace(m3.findPipe, (r2, i2, o2) => {
27762
- let u5 = false, a2 = i2;
27852
+ let p3 = false, a2 = i2;
27763
27853
  for (;--a2 >= 0 && o2[a2] === "\\"; )
27764
- u5 = !u5;
27765
- return u5 ? "|" : " |";
27854
+ p3 = !p3;
27855
+ return p3 ? "|" : " |";
27766
27856
  }), n3 = t2.split(m3.splitPipe), s = 0;
27767
27857
  if (n3[0].trim() || n3.shift(), n3.length > 0 && !n3.at(-1)?.trim() && n3.pop(), e)
27768
27858
  if (n3.length > e)
@@ -27790,7 +27880,7 @@ function $(l2, e, t2) {
27790
27880
  }
27791
27881
  return l2.slice(0, n3 - s);
27792
27882
  }
27793
- function ee(l2) {
27883
+ function te(l2) {
27794
27884
  let e = l2.split(`
27795
27885
  `), t2 = e.length - 1;
27796
27886
  for (;t2 >= 0 && m3.blankLine.test(e[t2]); )
@@ -27824,10 +27914,10 @@ function me(l2, e = 0) {
27824
27914
  function xe(l2, e, t2, n3, s) {
27825
27915
  let r2 = e.href, i2 = e.title || null, o2 = l2[1].replace(s.other.outputLinkReplace, "$1");
27826
27916
  n3.state.inLink = true;
27827
- let u5 = { type: l2[0].charAt(0) === "!" ? "image" : "link", raw: t2, href: r2, title: i2, text: o2, tokens: n3.inlineTokens(o2) };
27828
- return n3.state.inLink = false, u5;
27917
+ let p3 = { type: l2[0].charAt(0) === "!" ? "image" : "link", raw: t2, href: r2, title: i2, text: o2, tokens: n3.inlineTokens(o2) };
27918
+ return n3.state.inLink = false, p3;
27829
27919
  }
27830
- function st(l2, e, t2) {
27920
+ function dt(l2, e, t2) {
27831
27921
  let n3 = l2.match(t2.other.indentCodeCompensation);
27832
27922
  if (n3 === null)
27833
27923
  return e;
@@ -27842,12 +27932,12 @@ function st(l2, e, t2) {
27842
27932
  }).join(`
27843
27933
  `);
27844
27934
  }
27845
- var w = class {
27935
+ var y = class {
27846
27936
  options;
27847
27937
  rules;
27848
27938
  lexer;
27849
27939
  constructor(e) {
27850
- this.options = e || T3;
27940
+ this.options = e || R2;
27851
27941
  }
27852
27942
  space(e) {
27853
27943
  let t2 = this.rules.block.newline.exec(e);
@@ -27857,14 +27947,14 @@ var w = class {
27857
27947
  code(e) {
27858
27948
  let t2 = this.rules.block.code.exec(e);
27859
27949
  if (t2) {
27860
- let n3 = this.options.pedantic ? t2[0] : ee(t2[0]), s = n3.replace(this.rules.other.codeRemoveIndent, "");
27950
+ let n3 = this.options.pedantic ? t2[0] : te(t2[0]), s = n3.replace(this.rules.other.codeRemoveIndent, "");
27861
27951
  return { type: "code", raw: n3, codeBlockStyle: "indented", text: s };
27862
27952
  }
27863
27953
  }
27864
27954
  fences(e) {
27865
27955
  let t2 = this.rules.block.fences.exec(e);
27866
27956
  if (t2) {
27867
- let n3 = t2[0], s = st(n3, t2[3] || "", this.rules);
27957
+ let n3 = t2[0], s = dt(n3, t2[3] || "", this.rules);
27868
27958
  return { type: "code", raw: n3, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: s };
27869
27959
  }
27870
27960
  }
@@ -27893,38 +27983,39 @@ var w = class {
27893
27983
  `).split(`
27894
27984
  `), s = "", r2 = "", i2 = [];
27895
27985
  for (;n3.length > 0; ) {
27896
- let o2 = false, u5 = [], a2;
27986
+ let o2 = false, p3 = [], a2;
27897
27987
  for (a2 = 0;a2 < n3.length; a2++)
27898
27988
  if (this.rules.other.blockquoteStart.test(n3[a2]))
27899
- u5.push(n3[a2]), o2 = true;
27989
+ p3.push(n3[a2]), o2 = true;
27900
27990
  else if (!o2)
27901
- u5.push(n3[a2]);
27991
+ p3.push(n3[a2]);
27902
27992
  else
27903
27993
  break;
27904
27994
  n3 = n3.slice(a2);
27905
- let c3 = u5.join(`
27906
- `), p3 = c3.replace(this.rules.other.blockquoteSetextReplace, `
27995
+ let u5 = p3.join(`
27996
+ `), c3 = u5.replace(this.rules.other.blockquoteSetextReplace, `
27907
27997
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
27908
27998
  s = s ? `${s}
27909
- ${c3}` : c3, r2 = r2 ? `${r2}
27910
- ${p3}` : p3;
27911
- let k = this.lexer.state.top;
27912
- if (this.lexer.state.top = true, this.lexer.blockTokens(p3, i2, true), this.lexer.state.top = k, n3.length === 0)
27999
+ ${u5}` : u5, r2 = r2 ? `${r2}
28000
+ ${c3}` : c3;
28001
+ let h2 = this.lexer.state.top;
28002
+ if (this.lexer.state.top = true, this.lexer.blockTokens(c3, i2, true), this.lexer.state.top = h2, n3.length === 0)
27913
28003
  break;
27914
- let h2 = i2.at(-1);
27915
- if (h2?.type === "code")
28004
+ let d = i2.at(-1);
28005
+ if (d?.type === "code")
27916
28006
  break;
27917
- if (h2?.type === "blockquote") {
27918
- let R2 = h2, f2 = R2.raw + `
27919
- ` + n3.join(`
27920
- `), S = this.blockquote(f2);
27921
- i2[i2.length - 1] = S, s = s.substring(0, s.length - R2.raw.length) + S.raw, r2 = r2.substring(0, r2.length - R2.text.length) + S.text;
28007
+ if (d?.type === "blockquote") {
28008
+ let T3 = d, g2 = n3.join(`
28009
+ `), w = T3.raw + `
28010
+ ` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), M2 = this.blockquote(w);
28011
+ i2[i2.length - 1] = M2, s = `${s}
28012
+ ${g2}`, r2 = r2.substring(0, r2.length - T3.text.length) + M2.text;
27922
28013
  break;
27923
- } else if (h2?.type === "list") {
27924
- let R2 = h2, f2 = R2.raw + `
28014
+ } else if (d?.type === "list") {
28015
+ let T3 = d, g2 = T3.raw + `
27925
28016
  ` + n3.join(`
27926
- `), S = this.list(f2);
27927
- i2[i2.length - 1] = S, s = s.substring(0, s.length - h2.raw.length) + S.raw, r2 = r2.substring(0, r2.length - R2.raw.length) + S.raw, n3 = f2.substring(i2.at(-1).raw.length).split(`
28017
+ `), w = this.list(g2);
28018
+ i2[i2.length - 1] = w, s = s.substring(0, s.length - d.raw.length) + w.raw, r2 = r2.substring(0, r2.length - T3.raw.length) + w.raw, n3 = g2.substring(i2.at(-1).raw.length).split(`
27928
28019
  `);
27929
28020
  continue;
27930
28021
  }
@@ -27939,69 +28030,69 @@ ${p3}` : p3;
27939
28030
  n3 = s ? `\\d{1,9}\\${n3.slice(-1)}` : `\\${n3}`, this.options.pedantic && (n3 = s ? n3 : "[*+-]");
27940
28031
  let i2 = this.rules.other.listItemRegex(n3), o2 = false;
27941
28032
  for (;e; ) {
27942
- let a2 = false, c3 = "", p3 = "";
28033
+ let a2 = false, u5 = "", c3 = "";
27943
28034
  if (!(t2 = i2.exec(e)) || this.rules.block.hr.test(e))
27944
28035
  break;
27945
- c3 = t2[0], e = e.substring(c3.length);
27946
- let k = me(t2[2].split(`
27947
- `, 1)[0], t2[1].length), h2 = e.split(`
27948
- `, 1)[0], R2 = !k.trim(), f2 = 0;
27949
- if (this.options.pedantic ? (f2 = 2, p3 = k.trimStart()) : R2 ? f2 = t2[1].length + 1 : (f2 = k.search(this.rules.other.nonSpaceChar), f2 = f2 > 4 ? 1 : f2, p3 = k.slice(f2), f2 += t2[1].length), R2 && this.rules.other.blankLine.test(h2) && (c3 += h2 + `
27950
- `, e = e.substring(h2.length + 1), a2 = true), !a2) {
27951
- let S = this.rules.other.nextBulletRegex(f2), te = this.rules.other.hrRegex(f2), ne = this.rules.other.fencesBeginRegex(f2), re = this.rules.other.headingBeginRegex(f2), be = this.rules.other.htmlBeginRegex(f2), Re = this.rules.other.blockquoteBeginRegex(f2);
28036
+ u5 = t2[0], e = e.substring(u5.length);
28037
+ let h2 = me(t2[2].split(`
28038
+ `, 1)[0], t2[1].length), d = e.split(`
28039
+ `, 1)[0], T3 = !h2.trim(), g2 = 0;
28040
+ if (this.options.pedantic ? (g2 = 2, c3 = h2.trimStart()) : T3 ? g2 = t2[1].length + 1 : (g2 = h2.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c3 = h2.slice(g2), g2 += t2[1].length), T3 && this.rules.other.blankLine.test(d) && (u5 += d + `
28041
+ `, e = e.substring(d.length + 1), a2 = true), !a2) {
28042
+ let w = this.rules.other.nextBulletRegex(g2), M2 = this.rules.other.hrRegex(g2), ne = this.rules.other.fencesBeginRegex(g2), re = this.rules.other.headingBeginRegex(g2), be = this.rules.other.htmlBeginRegex(g2), Re = this.rules.other.blockquoteBeginRegex(g2);
27952
28043
  for (;e; ) {
27953
- let G = e.split(`
27954
- `, 1)[0], C3;
27955
- if (h2 = G, this.options.pedantic ? (h2 = h2.replace(this.rules.other.listReplaceNesting, " "), C3 = h2) : C3 = h2.replace(this.rules.other.tabCharGlobal, " "), ne.test(h2) || re.test(h2) || be.test(h2) || Re.test(h2) || S.test(h2) || te.test(h2))
28044
+ let N2 = e.split(`
28045
+ `, 1)[0], D;
28046
+ if (d = N2, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), D = d) : D = d.replace(this.rules.other.tabCharGlobal, " "), ne.test(d) || re.test(d) || be.test(d) || Re.test(d) || w.test(d) || M2.test(d))
27956
28047
  break;
27957
- if (C3.search(this.rules.other.nonSpaceChar) >= f2 || !h2.trim())
27958
- p3 += `
27959
- ` + C3.slice(f2);
28048
+ if (D.search(this.rules.other.nonSpaceChar) >= g2 || !d.trim())
28049
+ c3 += `
28050
+ ` + D.slice(g2);
27960
28051
  else {
27961
- if (R2 || k.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(k) || re.test(k) || te.test(k))
28052
+ if (T3 || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h2) || re.test(h2) || M2.test(h2))
27962
28053
  break;
27963
- p3 += `
27964
- ` + h2;
28054
+ c3 += `
28055
+ ` + d;
27965
28056
  }
27966
- R2 = !h2.trim(), c3 += G + `
27967
- `, e = e.substring(G.length + 1), k = C3.slice(f2);
28057
+ T3 = !d.trim(), u5 += N2 + `
28058
+ `, e = e.substring(N2.length + 1), h2 = D.slice(g2);
27968
28059
  }
27969
28060
  }
27970
- r2.loose || (o2 ? r2.loose = true : this.rules.other.doubleBlankLine.test(c3) && (o2 = true)), r2.items.push({ type: "list_item", raw: c3, task: !!this.options.gfm && this.rules.other.listIsTask.test(p3), loose: false, text: p3, tokens: [] }), r2.raw += c3;
28061
+ r2.loose || (o2 ? r2.loose = true : this.rules.other.doubleBlankLine.test(u5) && (o2 = true)), r2.items.push({ type: "list_item", raw: u5, task: !!this.options.gfm && this.rules.other.listIsTask.test(c3), loose: false, text: c3, tokens: [] }), r2.raw += u5;
27971
28062
  }
27972
- let u5 = r2.items.at(-1);
27973
- if (u5)
27974
- u5.raw = u5.raw.trimEnd(), u5.text = u5.text.trimEnd();
28063
+ let p3 = r2.items.at(-1);
28064
+ if (p3)
28065
+ p3.raw = p3.raw.trimEnd(), p3.text = p3.text.trimEnd();
27975
28066
  else
27976
28067
  return;
27977
28068
  r2.raw = r2.raw.trimEnd();
27978
28069
  for (let a2 of r2.items) {
27979
28070
  this.lexer.state.top = false, a2.tokens = this.lexer.blockTokens(a2.text, []);
27980
- let c3 = a2.tokens[0];
27981
- if (a2.task && (c3?.type === "text" || c3?.type === "paragraph")) {
27982
- a2.text = a2.text.replace(this.rules.other.listReplaceTask, ""), c3.raw = c3.raw.replace(this.rules.other.listReplaceTask, ""), c3.text = c3.text.replace(this.rules.other.listReplaceTask, "");
27983
- for (let k = this.lexer.inlineQueue.length - 1;k >= 0; k--)
27984
- if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[k].src)) {
27985
- this.lexer.inlineQueue[k].src = this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask, "");
28071
+ let u5 = a2.tokens[0];
28072
+ if (a2.task && (u5?.type === "text" || u5?.type === "paragraph")) {
28073
+ a2.text = a2.text.replace(this.rules.other.listReplaceTask, ""), u5.raw = u5.raw.replace(this.rules.other.listReplaceTask, ""), u5.text = u5.text.replace(this.rules.other.listReplaceTask, "");
28074
+ for (let h2 = this.lexer.inlineQueue.length - 1;h2 >= 0; h2--)
28075
+ if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[h2].src)) {
28076
+ this.lexer.inlineQueue[h2].src = this.lexer.inlineQueue[h2].src.replace(this.rules.other.listReplaceTask, "");
27986
28077
  break;
27987
28078
  }
27988
- let p3 = this.rules.other.listTaskCheckbox.exec(a2.raw);
27989
- if (p3) {
27990
- let k = { type: "checkbox", raw: p3[0] + " ", checked: p3[0] !== "[ ]" };
27991
- a2.checked = k.checked, r2.loose ? a2.tokens[0] && ["paragraph", "text"].includes(a2.tokens[0].type) && "tokens" in a2.tokens[0] && a2.tokens[0].tokens ? (a2.tokens[0].raw = k.raw + a2.tokens[0].raw, a2.tokens[0].text = k.raw + a2.tokens[0].text, a2.tokens[0].tokens.unshift(k)) : a2.tokens.unshift({ type: "paragraph", raw: k.raw, text: k.raw, tokens: [k] }) : a2.tokens.unshift(k);
28079
+ let c3 = this.rules.other.listTaskCheckbox.exec(a2.raw);
28080
+ if (c3) {
28081
+ let h2 = { type: "checkbox", raw: c3[0] + " ", checked: c3[0] !== "[ ]" };
28082
+ a2.checked = h2.checked, r2.loose ? a2.tokens[0] && ["paragraph", "text"].includes(a2.tokens[0].type) && "tokens" in a2.tokens[0] && a2.tokens[0].tokens ? (a2.tokens[0].raw = h2.raw + a2.tokens[0].raw, a2.tokens[0].text = h2.raw + a2.tokens[0].text, a2.tokens[0].tokens.unshift(h2)) : a2.tokens.unshift({ type: "paragraph", raw: h2.raw, text: h2.raw, tokens: [h2] }) : a2.tokens.unshift(h2);
27992
28083
  }
27993
28084
  } else
27994
28085
  a2.task && (a2.task = false);
27995
28086
  if (!r2.loose) {
27996
- let p3 = a2.tokens.filter((h2) => h2.type === "space"), k = p3.length > 0 && p3.some((h2) => this.rules.other.anyLine.test(h2.raw));
27997
- r2.loose = k;
28087
+ let c3 = a2.tokens.filter((d) => d.type === "space"), h2 = c3.length > 0 && c3.some((d) => this.rules.other.anyLine.test(d.raw));
28088
+ r2.loose = h2;
27998
28089
  }
27999
28090
  }
28000
28091
  if (r2.loose)
28001
28092
  for (let a2 of r2.items) {
28002
28093
  a2.loose = true;
28003
- for (let c3 of a2.tokens)
28004
- c3.type === "text" && (c3.type = "paragraph");
28094
+ for (let u5 of a2.tokens)
28095
+ u5.type === "text" && (u5.type = "paragraph");
28005
28096
  }
28006
28097
  return r2;
28007
28098
  }
@@ -28009,7 +28100,7 @@ ${p3}` : p3;
28009
28100
  html(e) {
28010
28101
  let t2 = this.rules.block.html.exec(e);
28011
28102
  if (t2) {
28012
- let n3 = ee(t2[0]);
28103
+ let n3 = te(t2[0]);
28013
28104
  return { type: "html", block: true, raw: n3, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n3 };
28014
28105
  }
28015
28106
  }
@@ -28025,7 +28116,7 @@ ${p3}` : p3;
28025
28116
  let t2 = this.rules.block.table.exec(e);
28026
28117
  if (!t2 || !this.rules.other.tableDelimiter.test(t2[2]))
28027
28118
  return;
28028
- let n3 = Y(t2[1]), s = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
28119
+ let n3 = ee(t2[1]), s = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
28029
28120
  `) : [], i2 = { type: "table", raw: $(t2[0], `
28030
28121
  `), header: [], align: [], rows: [] };
28031
28122
  if (n3.length === s.length) {
@@ -28034,7 +28125,7 @@ ${p3}` : p3;
28034
28125
  for (let o2 = 0;o2 < n3.length; o2++)
28035
28126
  i2.header.push({ text: n3[o2], tokens: this.lexer.inline(n3[o2]), header: true, align: i2.align[o2] });
28036
28127
  for (let o2 of r2)
28037
- i2.rows.push(Y(o2, i2.header.length).map((u5, a2) => ({ text: u5, tokens: this.lexer.inline(u5), header: false, align: i2.align[a2] })));
28128
+ i2.rows.push(ee(o2, i2.header.length).map((p3, a2) => ({ text: p3, tokens: this.lexer.inline(p3), header: false, align: i2.align[a2] })));
28038
28129
  return i2;
28039
28130
  }
28040
28131
  }
@@ -28084,8 +28175,8 @@ ${p3}` : p3;
28084
28175
  if (i2 === -2)
28085
28176
  return;
28086
28177
  if (i2 > -1) {
28087
- let u5 = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + i2;
28088
- t2[2] = t2[2].substring(0, i2), t2[0] = t2[0].substring(0, u5).trim(), t2[3] = "";
28178
+ let p3 = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + i2;
28179
+ t2[2] = t2[2].substring(0, i2), t2[0] = t2[0].substring(0, p3).trim(), t2[3] = "";
28089
28180
  }
28090
28181
  }
28091
28182
  let s = t2[2], r2 = "";
@@ -28113,27 +28204,31 @@ ${p3}` : p3;
28113
28204
  if (!s || !s[1] && !s[2] && !s[3] && !s[4] || s[4] && n3.match(this.rules.other.unicodeAlphaNumeric))
28114
28205
  return;
28115
28206
  if (!(s[1] || s[3] || "") || !n3 || this.rules.inline.punctuation.exec(n3)) {
28116
- let i2 = [...s[0]].length - 1, o2, u5, a2 = i2, c3 = 0, p3 = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
28117
- for (p3.lastIndex = 0, t2 = t2.slice(-1 * e.length + i2);(s = p3.exec(t2)) !== null; ) {
28207
+ let i2 = [...s[0]].length - 1, o2, p3, a2 = i2, u5 = 0, c3 = s[0][0], h2 = n3 === c3, d = c3 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
28208
+ for (d.lastIndex = 0, t2 = t2.slice(-1 * e.length + i2);(s = d.exec(t2)) !== null; ) {
28118
28209
  if (o2 = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !o2)
28119
28210
  continue;
28120
- if (u5 = [...o2].length, s[3] || s[4]) {
28121
- a2 += u5;
28122
- continue;
28123
- } else if ((s[5] || s[6]) && i2 % 3 && !((i2 + u5) % 3)) {
28124
- c3 += u5;
28211
+ if (p3 = [...o2].length, s[3] || s[4]) {
28212
+ a2 += p3;
28125
28213
  continue;
28214
+ } else if (s[5] || s[6]) {
28215
+ if (i2 % 3 && !((i2 + p3) % 3)) {
28216
+ u5 += p3;
28217
+ continue;
28218
+ }
28219
+ if (h2)
28220
+ break;
28126
28221
  }
28127
- if (a2 -= u5, a2 > 0)
28222
+ if (a2 -= p3, a2 > 0)
28128
28223
  continue;
28129
- u5 = Math.min(u5, u5 + a2 + c3);
28130
- let k = [...s[0]][0].length, h2 = e.slice(0, i2 + s.index + k + u5);
28131
- if (Math.min(i2, u5) % 2) {
28132
- let f2 = h2.slice(1, -1);
28133
- return { type: "em", raw: h2, text: f2, tokens: this.lexer.inlineTokens(f2) };
28224
+ p3 = Math.min(p3, p3 + a2 + u5);
28225
+ let T3 = [...s[0]][0].length, g2 = e.slice(0, i2 + s.index + T3 + p3);
28226
+ if (Math.min(i2, p3) % 2) {
28227
+ let M2 = g2.slice(1, -1);
28228
+ return { type: "em", raw: g2, text: M2, tokens: this.lexer.inlineTokens(M2) };
28134
28229
  }
28135
- let R2 = h2.slice(2, -2);
28136
- return { type: "strong", raw: h2, text: R2, tokens: this.lexer.inlineTokens(R2) };
28230
+ let w = g2.slice(2, -2);
28231
+ return { type: "strong", raw: g2, text: w, tokens: this.lexer.inlineTokens(w) };
28137
28232
  }
28138
28233
  }
28139
28234
  }
@@ -28154,19 +28249,19 @@ ${p3}` : p3;
28154
28249
  if (!s)
28155
28250
  return;
28156
28251
  if (!(s[1] || "") || !n3 || this.rules.inline.punctuation.exec(n3)) {
28157
- let i2 = [...s[0]].length - 1, o2, u5, a2 = i2, c3 = this.rules.inline.delRDelim;
28158
- for (c3.lastIndex = 0, t2 = t2.slice(-1 * e.length + i2);(s = c3.exec(t2)) !== null; ) {
28159
- if (o2 = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !o2 || (u5 = [...o2].length, u5 !== i2))
28252
+ let i2 = [...s[0]].length - 1, o2, p3, a2 = i2, u5 = this.rules.inline.delRDelim;
28253
+ for (u5.lastIndex = 0, t2 = t2.slice(-1 * e.length + i2);(s = u5.exec(t2)) !== null; ) {
28254
+ if (o2 = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !o2 || (p3 = [...o2].length, p3 !== i2))
28160
28255
  continue;
28161
28256
  if (s[3] || s[4]) {
28162
- a2 += u5;
28257
+ a2 += p3;
28163
28258
  continue;
28164
28259
  }
28165
- if (a2 -= u5, a2 > 0)
28260
+ if (a2 -= p3, a2 > 0)
28166
28261
  continue;
28167
- u5 = Math.min(u5, u5 + a2);
28168
- let p3 = [...s[0]][0].length, k = e.slice(0, i2 + s.index + p3 + u5), h2 = k.slice(i2, -i2);
28169
- return { type: "del", raw: k, text: h2, tokens: this.lexer.inlineTokens(h2) };
28262
+ p3 = Math.min(p3, p3 + a2);
28263
+ let c3 = [...s[0]][0].length, h2 = e.slice(0, i2 + s.index + c3 + p3), d = h2.slice(i2, -i2);
28264
+ return { type: "del", raw: h2, text: d, tokens: this.lexer.inlineTokens(d) };
28170
28265
  }
28171
28266
  }
28172
28267
  }
@@ -28208,12 +28303,12 @@ var x2 = class l2 {
28208
28303
  inlineQueue;
28209
28304
  tokenizer;
28210
28305
  constructor(e) {
28211
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || T3, this.options.tokenizer = this.options.tokenizer || new w, this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
28212
- let t2 = { other: m3, block: D.normal, inline: A2.normal };
28213
- this.options.pedantic ? (t2.block = D.pedantic, t2.inline = A2.pedantic) : this.options.gfm && (t2.block = D.gfm, this.options.breaks ? t2.inline = A2.breaks : t2.inline = A2.gfm), this.tokenizer.rules = t2;
28306
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || R2, this.options.tokenizer = this.options.tokenizer || new y, this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
28307
+ let t2 = { other: m3, block: H.normal, inline: B.normal };
28308
+ this.options.pedantic ? (t2.block = H.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = H.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
28214
28309
  }
28215
28310
  static get rules() {
28216
- return { block: D, inline: A2 };
28311
+ return { block: H, inline: B };
28217
28312
  }
28218
28313
  static lex(e, t2) {
28219
28314
  return new l2(t2).lex(e);
@@ -28302,9 +28397,9 @@ var x2 = class l2 {
28302
28397
  }
28303
28398
  let i2 = e;
28304
28399
  if (this.options.extensions?.startBlock) {
28305
- let o2 = 1 / 0, u5 = e.slice(1), a2;
28306
- this.options.extensions.startBlock.forEach((c3) => {
28307
- a2 = c3.call({ lexer: this }, u5), typeof a2 == "number" && a2 >= 0 && (o2 = Math.min(o2, a2));
28400
+ let o2 = 1 / 0, p3 = e.slice(1), a2;
28401
+ this.options.extensions.startBlock.forEach((u5) => {
28402
+ a2 = u5.call({ lexer: this }, p3), typeof a2 == "number" && a2 >= 0 && (o2 = Math.min(o2, a2));
28308
28403
  }), o2 < 1 / 0 && o2 >= 0 && (i2 = e.substring(0, o2 + 1));
28309
28404
  }
28310
28405
  if (this.state.top && (r2 = this.tokenizer.paragraph(i2))) {
@@ -28336,84 +28431,80 @@ var x2 = class l2 {
28336
28431
  }
28337
28432
  inlineTokens(e, t2 = []) {
28338
28433
  this.tokenizer.lexer = this;
28339
- let n3 = e, s = null;
28434
+ let n3 = e;
28340
28435
  if (this.tokens.links) {
28341
- let a2 = Object.keys(this.tokens.links);
28342
- if (a2.length > 0)
28343
- for (;(s = this.tokenizer.rules.inline.reflinkSearch.exec(n3)) !== null; )
28344
- a2.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (n3 = n3.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + n3.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
28345
- }
28346
- for (;(s = this.tokenizer.rules.inline.anyPunctuation.exec(n3)) !== null; )
28347
- n3 = n3.slice(0, s.index) + "++" + n3.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
28348
- let r2;
28349
- for (;(s = this.tokenizer.rules.inline.blockSkip.exec(n3)) !== null; )
28350
- r2 = s[2] ? s[2].length : 0, n3 = n3.slice(0, s.index + r2) + "[" + "a".repeat(s[0].length - r2 - 2) + "]" + n3.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
28351
- n3 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n3) ?? n3;
28352
- let i2 = false, o2 = "", u5 = 1 / 0;
28436
+ let o2 = Object.keys(this.tokens.links);
28437
+ o2.length > 0 && (n3 = n3.replace(this.tokenizer.rules.inline.reflinkSearch, (p3) => o2.includes(p3.slice(p3.lastIndexOf("[") + 1, -1)) ? "[" + "a".repeat(p3.length - 2) + "]" : p3));
28438
+ }
28439
+ n3 = n3.replace(this.tokenizer.rules.inline.anyPunctuation, "++"), n3 = n3.replace(this.tokenizer.rules.inline.blockSkip, (o2, p3, a2) => {
28440
+ let u5 = a2 ? a2.length : 0;
28441
+ return o2.slice(0, u5) + "[" + "a".repeat(o2.length - u5 - 2) + "]";
28442
+ }), n3 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n3) ?? n3;
28443
+ let s = false, r2 = "", i2 = 1 / 0;
28353
28444
  for (;e; ) {
28354
- if (e.length < u5)
28355
- u5 = e.length;
28445
+ if (e.length < i2)
28446
+ i2 = e.length;
28356
28447
  else {
28357
28448
  this.infiniteLoopError(e.charCodeAt(0));
28358
28449
  break;
28359
28450
  }
28360
- i2 || (o2 = ""), i2 = false;
28361
- let a2;
28362
- if (this.options.extensions?.inline?.some((p3) => (a2 = p3.call({ lexer: this }, e, t2)) ? (e = e.substring(a2.raw.length), t2.push(a2), true) : false))
28451
+ s || (r2 = ""), s = false;
28452
+ let o2;
28453
+ if (this.options.extensions?.inline?.some((a2) => (o2 = a2.call({ lexer: this }, e, t2)) ? (e = e.substring(o2.raw.length), t2.push(o2), true) : false))
28363
28454
  continue;
28364
- if (a2 = this.tokenizer.escape(e)) {
28365
- e = e.substring(a2.raw.length), t2.push(a2);
28455
+ if (o2 = this.tokenizer.escape(e)) {
28456
+ e = e.substring(o2.raw.length), t2.push(o2);
28366
28457
  continue;
28367
28458
  }
28368
- if (a2 = this.tokenizer.tag(e)) {
28369
- e = e.substring(a2.raw.length), t2.push(a2);
28459
+ if (o2 = this.tokenizer.tag(e)) {
28460
+ e = e.substring(o2.raw.length), t2.push(o2);
28370
28461
  continue;
28371
28462
  }
28372
- if (a2 = this.tokenizer.link(e)) {
28373
- e = e.substring(a2.raw.length), t2.push(a2);
28463
+ if (o2 = this.tokenizer.link(e)) {
28464
+ e = e.substring(o2.raw.length), t2.push(o2);
28374
28465
  continue;
28375
28466
  }
28376
- if (a2 = this.tokenizer.reflink(e, this.tokens.links)) {
28377
- e = e.substring(a2.raw.length);
28378
- let p3 = t2.at(-1);
28379
- a2.type === "text" && p3?.type === "text" ? (p3.raw += a2.raw, p3.text += a2.text) : t2.push(a2);
28467
+ if (o2 = this.tokenizer.reflink(e, this.tokens.links)) {
28468
+ e = e.substring(o2.raw.length);
28469
+ let a2 = t2.at(-1);
28470
+ o2.type === "text" && a2?.type === "text" ? (a2.raw += o2.raw, a2.text += o2.text) : t2.push(o2);
28380
28471
  continue;
28381
28472
  }
28382
- if (a2 = this.tokenizer.emStrong(e, n3, o2)) {
28383
- e = e.substring(a2.raw.length), t2.push(a2);
28473
+ if (o2 = this.tokenizer.emStrong(e, n3, r2)) {
28474
+ e = e.substring(o2.raw.length), t2.push(o2);
28384
28475
  continue;
28385
28476
  }
28386
- if (a2 = this.tokenizer.codespan(e)) {
28387
- e = e.substring(a2.raw.length), t2.push(a2);
28477
+ if (o2 = this.tokenizer.codespan(e)) {
28478
+ e = e.substring(o2.raw.length), t2.push(o2);
28388
28479
  continue;
28389
28480
  }
28390
- if (a2 = this.tokenizer.br(e)) {
28391
- e = e.substring(a2.raw.length), t2.push(a2);
28481
+ if (o2 = this.tokenizer.br(e)) {
28482
+ e = e.substring(o2.raw.length), t2.push(o2);
28392
28483
  continue;
28393
28484
  }
28394
- if (a2 = this.tokenizer.del(e, n3, o2)) {
28395
- e = e.substring(a2.raw.length), t2.push(a2);
28485
+ if (o2 = this.tokenizer.del(e, n3, r2)) {
28486
+ e = e.substring(o2.raw.length), t2.push(o2);
28396
28487
  continue;
28397
28488
  }
28398
- if (a2 = this.tokenizer.autolink(e)) {
28399
- e = e.substring(a2.raw.length), t2.push(a2);
28489
+ if (o2 = this.tokenizer.autolink(e)) {
28490
+ e = e.substring(o2.raw.length), t2.push(o2);
28400
28491
  continue;
28401
28492
  }
28402
- if (!this.state.inLink && (a2 = this.tokenizer.url(e))) {
28403
- e = e.substring(a2.raw.length), t2.push(a2);
28493
+ if (!this.state.inLink && (o2 = this.tokenizer.url(e))) {
28494
+ e = e.substring(o2.raw.length), t2.push(o2);
28404
28495
  continue;
28405
28496
  }
28406
- let c3 = e;
28497
+ let p3 = e;
28407
28498
  if (this.options.extensions?.startInline) {
28408
- let p3 = 1 / 0, k = e.slice(1), h2;
28409
- this.options.extensions.startInline.forEach((R2) => {
28410
- h2 = R2.call({ lexer: this }, k), typeof h2 == "number" && h2 >= 0 && (p3 = Math.min(p3, h2));
28411
- }), p3 < 1 / 0 && p3 >= 0 && (c3 = e.substring(0, p3 + 1));
28412
- }
28413
- if (a2 = this.tokenizer.inlineText(c3)) {
28414
- e = e.substring(a2.raw.length), a2.raw.slice(-1) !== "_" && (o2 = a2.raw.slice(-1)), i2 = true;
28415
- let p3 = t2.at(-1);
28416
- p3?.type === "text" ? (p3.raw += a2.raw, p3.text += a2.text) : t2.push(a2);
28499
+ let a2 = 1 / 0, u5 = e.slice(1), c3;
28500
+ this.options.extensions.startInline.forEach((h2) => {
28501
+ c3 = h2.call({ lexer: this }, u5), typeof c3 == "number" && c3 >= 0 && (a2 = Math.min(a2, c3));
28502
+ }), a2 < 1 / 0 && a2 >= 0 && (p3 = e.substring(0, a2 + 1));
28503
+ }
28504
+ if (o2 = this.tokenizer.inlineText(p3)) {
28505
+ e = e.substring(o2.raw.length), o2.raw.slice(-1) !== "_" && (r2 = o2.raw.slice(-1)), s = true;
28506
+ let a2 = t2.at(-1);
28507
+ a2?.type === "text" ? (a2.raw += o2.raw, a2.text += o2.text) : t2.push(o2);
28417
28508
  continue;
28418
28509
  }
28419
28510
  if (e) {
@@ -28431,11 +28522,11 @@ var x2 = class l2 {
28431
28522
  throw new Error(t2);
28432
28523
  }
28433
28524
  };
28434
- var y = class {
28525
+ var P3 = class {
28435
28526
  options;
28436
28527
  parser;
28437
28528
  constructor(e) {
28438
- this.options = e || T3;
28529
+ this.options = e || R2;
28439
28530
  }
28440
28531
  space(e) {
28441
28532
  return "";
@@ -28469,8 +28560,8 @@ ${this.parser.parse(e)}</blockquote>
28469
28560
  list(e) {
28470
28561
  let { ordered: t2, start: n3 } = e, s = "";
28471
28562
  for (let o2 = 0;o2 < e.items.length; o2++) {
28472
- let u5 = e.items[o2];
28473
- s += this.listitem(u5);
28563
+ let p3 = e.items[o2];
28564
+ s += this.listitem(p3);
28474
28565
  }
28475
28566
  let r2 = t2 ? "ol" : "ul", i2 = t2 && n3 !== 1 ? ' start="' + n3 + '"' : "";
28476
28567
  return "<" + r2 + i2 + `>
@@ -28533,7 +28624,7 @@ ${e}</tr>
28533
28624
  return `<del>${this.parser.parseInline(e)}</del>`;
28534
28625
  }
28535
28626
  link({ href: e, title: t2, tokens: n3 }) {
28536
- let s = this.parser.parseInline(n3), r2 = V2(e);
28627
+ let s = this.parser.parseInline(n3), r2 = Y(e);
28537
28628
  if (r2 === null)
28538
28629
  return s;
28539
28630
  e = r2;
@@ -28542,7 +28633,7 @@ ${e}</tr>
28542
28633
  }
28543
28634
  image({ href: e, title: t2, text: n3, tokens: s }) {
28544
28635
  s && (n3 = this.parser.parseInline(s, this.parser.textRenderer));
28545
- let r2 = V2(e);
28636
+ let r2 = Y(e);
28546
28637
  if (r2 === null)
28547
28638
  return O(n3);
28548
28639
  e = r2;
@@ -28590,7 +28681,7 @@ var b3 = class l3 {
28590
28681
  renderer;
28591
28682
  textRenderer;
28592
28683
  constructor(e) {
28593
- this.options = e || T3, this.options.renderer = this.options.renderer || new y, this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L;
28684
+ this.options = e || R2, this.options.renderer = this.options.renderer || new P3, this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L;
28594
28685
  }
28595
28686
  static parse(e, t2) {
28596
28687
  return new l3(t2).parse(e);
@@ -28605,7 +28696,7 @@ var b3 = class l3 {
28605
28696
  let s = e[n3];
28606
28697
  if (this.options.extensions?.renderers?.[s.type]) {
28607
28698
  let i2 = s, o2 = this.options.extensions.renderers[i2.type].call({ parser: this }, i2);
28608
- if (o2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(i2.type)) {
28699
+ if (o2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(i2.type)) {
28609
28700
  t2 += o2 || "";
28610
28701
  continue;
28611
28702
  }
@@ -28677,7 +28768,7 @@ var b3 = class l3 {
28677
28768
  let r2 = e[s];
28678
28769
  if (this.options.extensions?.renderers?.[r2.type]) {
28679
28770
  let o2 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
28680
- if (o2 !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
28771
+ if (o2 !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
28681
28772
  n3 += o2 || "";
28682
28773
  continue;
28683
28774
  }
@@ -28739,11 +28830,11 @@ var b3 = class l3 {
28739
28830
  return n3;
28740
28831
  }
28741
28832
  };
28742
- var P3 = class {
28833
+ var S = class {
28743
28834
  options;
28744
28835
  block;
28745
28836
  constructor(e) {
28746
- this.options = e || T3;
28837
+ this.options = e || R2;
28747
28838
  }
28748
28839
  static passThroughHooks = new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
28749
28840
  static passThroughHooksRespectAsync = new Set(["preprocess", "postprocess", "processAllTokens"]);
@@ -28766,17 +28857,17 @@ var P3 = class {
28766
28857
  return e ? b3.parse : b3.parseInline;
28767
28858
  }
28768
28859
  };
28769
- var q = class {
28770
- defaults = M2();
28860
+ var Z = class {
28861
+ defaults = C3();
28771
28862
  options = this.setOptions;
28772
28863
  parse = this.parseMarkdown(true);
28773
28864
  parseInline = this.parseMarkdown(false);
28774
28865
  Parser = b3;
28775
- Renderer = y;
28866
+ Renderer = P3;
28776
28867
  TextRenderer = L;
28777
28868
  Lexer = x2;
28778
- Tokenizer = w;
28779
- Hooks = P3;
28869
+ Tokenizer = y;
28870
+ Hooks = S;
28780
28871
  constructor(...e) {
28781
28872
  this.use(...e);
28782
28873
  }
@@ -28818,8 +28909,8 @@ var q = class {
28818
28909
  if ("renderer" in r2) {
28819
28910
  let i2 = t2.renderers[r2.name];
28820
28911
  i2 ? t2.renderers[r2.name] = function(...o2) {
28821
- let u5 = r2.renderer.apply(this, o2);
28822
- return u5 === false && (u5 = i2.apply(this, o2)), u5;
28912
+ let p3 = r2.renderer.apply(this, o2);
28913
+ return p3 === false && (p3 = i2.apply(this, o2)), p3;
28823
28914
  } : t2.renderers[r2.name] = r2.renderer;
28824
28915
  }
28825
28916
  if ("tokenizer" in r2) {
@@ -28830,59 +28921,59 @@ var q = class {
28830
28921
  }
28831
28922
  "childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
28832
28923
  }), s.extensions = t2), n3.renderer) {
28833
- let r2 = this.defaults.renderer || new y(this.defaults);
28924
+ let r2 = this.defaults.renderer || new P3(this.defaults);
28834
28925
  for (let i2 in n3.renderer) {
28835
28926
  if (!(i2 in r2))
28836
28927
  throw new Error(`renderer '${i2}' does not exist`);
28837
28928
  if (["options", "parser"].includes(i2))
28838
28929
  continue;
28839
- let o2 = i2, u5 = n3.renderer[o2], a2 = r2[o2];
28840
- r2[o2] = (...c3) => {
28841
- let p3 = u5.apply(r2, c3);
28842
- return p3 === false && (p3 = a2.apply(r2, c3)), p3 || "";
28930
+ let o2 = i2, p3 = n3.renderer[o2], a2 = r2[o2];
28931
+ r2[o2] = (...u5) => {
28932
+ let c3 = p3.apply(r2, u5);
28933
+ return c3 === false && (c3 = a2.apply(r2, u5)), c3 || "";
28843
28934
  };
28844
28935
  }
28845
28936
  s.renderer = r2;
28846
28937
  }
28847
28938
  if (n3.tokenizer) {
28848
- let r2 = this.defaults.tokenizer || new w(this.defaults);
28939
+ let r2 = this.defaults.tokenizer || new y(this.defaults);
28849
28940
  for (let i2 in n3.tokenizer) {
28850
28941
  if (!(i2 in r2))
28851
28942
  throw new Error(`tokenizer '${i2}' does not exist`);
28852
28943
  if (["options", "rules", "lexer"].includes(i2))
28853
28944
  continue;
28854
- let o2 = i2, u5 = n3.tokenizer[o2], a2 = r2[o2];
28855
- r2[o2] = (...c3) => {
28856
- let p3 = u5.apply(r2, c3);
28857
- return p3 === false && (p3 = a2.apply(r2, c3)), p3;
28945
+ let o2 = i2, p3 = n3.tokenizer[o2], a2 = r2[o2];
28946
+ r2[o2] = (...u5) => {
28947
+ let c3 = p3.apply(r2, u5);
28948
+ return c3 === false && (c3 = a2.apply(r2, u5)), c3;
28858
28949
  };
28859
28950
  }
28860
28951
  s.tokenizer = r2;
28861
28952
  }
28862
28953
  if (n3.hooks) {
28863
- let r2 = this.defaults.hooks || new P3;
28954
+ let r2 = this.defaults.hooks || new S;
28864
28955
  for (let i2 in n3.hooks) {
28865
28956
  if (!(i2 in r2))
28866
28957
  throw new Error(`hook '${i2}' does not exist`);
28867
28958
  if (["options", "block"].includes(i2))
28868
28959
  continue;
28869
- let o2 = i2, u5 = n3.hooks[o2], a2 = r2[o2];
28870
- P3.passThroughHooks.has(i2) ? r2[o2] = (c3) => {
28871
- if (this.defaults.async && P3.passThroughHooksRespectAsync.has(i2))
28960
+ let o2 = i2, p3 = n3.hooks[o2], a2 = r2[o2];
28961
+ S.passThroughHooks.has(i2) ? r2[o2] = (u5) => {
28962
+ if (this.defaults.async && S.passThroughHooksRespectAsync.has(i2))
28872
28963
  return (async () => {
28873
- let k = await u5.call(r2, c3);
28874
- return a2.call(r2, k);
28964
+ let h2 = await p3.call(r2, u5);
28965
+ return a2.call(r2, h2);
28875
28966
  })();
28876
- let p3 = u5.call(r2, c3);
28877
- return a2.call(r2, p3);
28878
- } : r2[o2] = (...c3) => {
28967
+ let c3 = p3.call(r2, u5);
28968
+ return a2.call(r2, c3);
28969
+ } : r2[o2] = (...u5) => {
28879
28970
  if (this.defaults.async)
28880
28971
  return (async () => {
28881
- let k = await u5.apply(r2, c3);
28882
- return k === false && (k = await a2.apply(r2, c3)), k;
28972
+ let h2 = await p3.apply(r2, u5);
28973
+ return h2 === false && (h2 = await a2.apply(r2, u5)), h2;
28883
28974
  })();
28884
- let p3 = u5.apply(r2, c3);
28885
- return p3 === false && (p3 = a2.apply(r2, c3)), p3;
28975
+ let c3 = p3.apply(r2, u5);
28976
+ return c3 === false && (c3 = a2.apply(r2, u5)), c3;
28886
28977
  };
28887
28978
  }
28888
28979
  s.hooks = r2;
@@ -28890,8 +28981,8 @@ var q = class {
28890
28981
  if (n3.walkTokens) {
28891
28982
  let r2 = this.defaults.walkTokens, i2 = n3.walkTokens;
28892
28983
  s.walkTokens = function(o2) {
28893
- let u5 = [];
28894
- return u5.push(i2.call(this, o2)), r2 && (u5 = u5.concat(r2.call(this, o2))), u5;
28984
+ let p3 = [];
28985
+ return p3.push(i2.call(this, o2)), r2 && (p3 = p3.concat(r2.call(this, o2))), p3;
28895
28986
  };
28896
28987
  }
28897
28988
  this.defaults = { ...this.defaults, ...s };
@@ -28917,19 +29008,19 @@ var q = class {
28917
29008
  return o2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n3) + ", string expected"));
28918
29009
  if (i2.hooks && (i2.hooks.options = i2, i2.hooks.block = e), i2.async)
28919
29010
  return (async () => {
28920
- let u5 = i2.hooks ? await i2.hooks.preprocess(n3) : n3, c3 = await (i2.hooks ? await i2.hooks.provideLexer(e) : e ? x2.lex : x2.lexInline)(u5, i2), p3 = i2.hooks ? await i2.hooks.processAllTokens(c3) : c3;
28921
- i2.walkTokens && await Promise.all(this.walkTokens(p3, i2.walkTokens));
28922
- let h2 = await (i2.hooks ? await i2.hooks.provideParser(e) : e ? b3.parse : b3.parseInline)(p3, i2);
28923
- return i2.hooks ? await i2.hooks.postprocess(h2) : h2;
29011
+ let p3 = i2.hooks ? await i2.hooks.preprocess(n3) : n3, u5 = await (i2.hooks ? await i2.hooks.provideLexer(e) : e ? x2.lex : x2.lexInline)(p3, i2), c3 = i2.hooks ? await i2.hooks.processAllTokens(u5) : u5;
29012
+ i2.walkTokens && await Promise.all(this.walkTokens(c3, i2.walkTokens));
29013
+ let d = await (i2.hooks ? await i2.hooks.provideParser(e) : e ? b3.parse : b3.parseInline)(c3, i2);
29014
+ return i2.hooks ? await i2.hooks.postprocess(d) : d;
28924
29015
  })().catch(o2);
28925
29016
  try {
28926
29017
  i2.hooks && (n3 = i2.hooks.preprocess(n3));
28927
29018
  let a2 = (i2.hooks ? i2.hooks.provideLexer(e) : e ? x2.lex : x2.lexInline)(n3, i2);
28928
29019
  i2.hooks && (a2 = i2.hooks.processAllTokens(a2)), i2.walkTokens && this.walkTokens(a2, i2.walkTokens);
28929
- let p3 = (i2.hooks ? i2.hooks.provideParser(e) : e ? b3.parse : b3.parseInline)(a2, i2);
28930
- return i2.hooks && (p3 = i2.hooks.postprocess(p3)), p3;
28931
- } catch (u5) {
28932
- return o2(u5);
29020
+ let c3 = (i2.hooks ? i2.hooks.provideParser(e) : e ? b3.parse : b3.parseInline)(a2, i2);
29021
+ return i2.hooks && (c3 = i2.hooks.postprocess(c3)), c3;
29022
+ } catch (p3) {
29023
+ return o2(p3);
28933
29024
  }
28934
29025
  };
28935
29026
  }
@@ -28946,45 +29037,45 @@ Please report this to https://github.com/markedjs/marked.`, e) {
28946
29037
  };
28947
29038
  }
28948
29039
  };
28949
- var z2 = new q;
28950
- function g2(l4, e) {
28951
- return z2.parse(l4, e);
29040
+ var E2 = new Z;
29041
+ function f2(l4, e) {
29042
+ return E2.parse(l4, e);
28952
29043
  }
28953
- g2.options = g2.setOptions = function(l4) {
28954
- return z2.setOptions(l4), g2.defaults = z2.defaults, N2(g2.defaults), g2;
28955
- };
28956
- g2.getDefaults = M2;
28957
- g2.defaults = T3;
28958
- g2.use = function(...l4) {
28959
- return z2.use(...l4), g2.defaults = z2.defaults, N2(g2.defaults), g2;
29044
+ f2.options = f2.setOptions = function(l4) {
29045
+ return E2.setOptions(l4), f2.defaults = E2.defaults, j(f2.defaults), f2;
28960
29046
  };
28961
- g2.walkTokens = function(l4, e) {
28962
- return z2.walkTokens(l4, e);
29047
+ f2.getDefaults = C3;
29048
+ f2.defaults = R2;
29049
+ function kt(...l4) {
29050
+ return E2.use(...l4), f2.defaults = E2.defaults, j(f2.defaults), f2;
29051
+ }
29052
+ f2.use = kt;
29053
+ f2.walkTokens = function(l4, e) {
29054
+ return E2.walkTokens(l4, e);
28963
29055
  };
28964
- g2.parseInline = z2.parseInline;
28965
- g2.Parser = b3;
28966
- g2.parser = b3.parse;
28967
- g2.Renderer = y;
28968
- g2.TextRenderer = L;
28969
- g2.Lexer = x2;
28970
- g2.lexer = x2.lex;
28971
- g2.Tokenizer = w;
28972
- g2.Hooks = P3;
28973
- g2.parse = g2;
28974
- var Ft = g2.options;
28975
- var Ut = g2.setOptions;
28976
- var Kt = g2.use;
28977
- var Wt = g2.walkTokens;
28978
- var Xt = g2.parseInline;
28979
- var Vt = b3.parse;
28980
- var Yt = x2.lex;
29056
+ f2.parseInline = E2.parseInline;
29057
+ f2.Parser = b3;
29058
+ f2.parser = b3.parse;
29059
+ f2.Renderer = P3;
29060
+ f2.TextRenderer = L;
29061
+ f2.Lexer = x2;
29062
+ f2.lexer = x2.lex;
29063
+ f2.Tokenizer = y;
29064
+ f2.Hooks = S;
29065
+ f2.parse = f2;
29066
+ var nn = f2.options;
29067
+ var rn = f2.setOptions;
29068
+ var sn = f2.walkTokens;
29069
+ var on = f2.parseInline;
29070
+ var ln = b3.parse;
29071
+ var pn = x2.lex;
28981
29072
 
28982
29073
  // src/plan/format.ts
28983
29074
  var PLAN_FORMAT_DENY_MESSAGE = "caret: this plan has a code block with no language marker, so it can't be " + "syntax-highlighted in the review UI. Add a language tag to every code block's " + "opening fence (e.g. ```ts, ```bash, ```json), and use `text` for non-code " + "blocks like directory trees, console output, or ASCII art. Then resubmit the plan.";
28984
29075
  function hasUntaggedCodeBlock(plan) {
28985
29076
  if (!plan?.trim())
28986
29077
  return false;
28987
- const marked = new q({ gfm: true, breaks: false });
29078
+ const marked = new Z({ gfm: true, breaks: false });
28988
29079
  let untagged = false;
28989
29080
  marked.walkTokens(marked.lexer(plan), (token) => {
28990
29081
  if (token.type === "code" && !(token.lang ?? "").trim())
@@ -29115,6 +29206,7 @@ async function runReviewSubcommand() {
29115
29206
  const loaded = loadSettings();
29116
29207
  setLogLevel(loaded.logging.level);
29117
29208
  setRedact(loaded.logging.redact);
29209
+ setLogRotation(logMaxSize(loaded), logKeep(loaded));
29118
29210
  warnInvalidEnvVars((msg) => logWarn("env", msg));
29119
29211
  const adapter = selectAdapter();
29120
29212
  let hookInput;
@@ -29788,12 +29880,12 @@ var maxDistance = 3;
29788
29880
  function editDistance(a2, b4) {
29789
29881
  if (Math.abs(a2.length - b4.length) > maxDistance)
29790
29882
  return Math.max(a2.length, b4.length);
29791
- const d2 = [];
29883
+ const d = [];
29792
29884
  for (let i2 = 0;i2 <= a2.length; i2++) {
29793
- d2[i2] = [i2];
29885
+ d[i2] = [i2];
29794
29886
  }
29795
29887
  for (let j2 = 0;j2 <= b4.length; j2++) {
29796
- d2[0][j2] = j2;
29888
+ d[0][j2] = j2;
29797
29889
  }
29798
29890
  for (let j2 = 1;j2 <= b4.length; j2++) {
29799
29891
  for (let i2 = 1;i2 <= a2.length; i2++) {
@@ -29803,13 +29895,13 @@ function editDistance(a2, b4) {
29803
29895
  } else {
29804
29896
  cost = 1;
29805
29897
  }
29806
- d2[i2][j2] = Math.min(d2[i2 - 1][j2] + 1, d2[i2][j2 - 1] + 1, d2[i2 - 1][j2 - 1] + cost);
29898
+ d[i2][j2] = Math.min(d[i2 - 1][j2] + 1, d[i2][j2 - 1] + 1, d[i2 - 1][j2 - 1] + cost);
29807
29899
  if (i2 > 1 && j2 > 1 && a2[i2 - 1] === b4[j2 - 2] && a2[i2 - 2] === b4[j2 - 1]) {
29808
- d2[i2][j2] = Math.min(d2[i2][j2], d2[i2 - 2][j2 - 2] + 1);
29900
+ d[i2][j2] = Math.min(d[i2][j2], d[i2 - 2][j2 - 2] + 1);
29809
29901
  }
29810
29902
  }
29811
29903
  }
29812
- return d2[a2.length][b4.length];
29904
+ return d[a2.length][b4.length];
29813
29905
  }
29814
29906
  function suggestSimilar(word, candidates) {
29815
29907
  if (!candidates || candidates.length === 0)