scip-query 0.20.0 → 0.21.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 (594) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +255 -884
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/by-kind-XXGZGNZ6.js +2 -0
  5. package/dist/call-graph-VGY3R4L3.js +2 -0
  6. package/dist/call-graph-evidence-lZa2dwQA.d.ts +11 -0
  7. package/dist/change-analysis-types-CCtoCHbC.d.ts +9 -0
  8. package/dist/chunk-26CT72HM.js +2 -0
  9. package/dist/chunk-27OUNZW5.js +3 -0
  10. package/dist/chunk-2LJLEM5B.js +2 -0
  11. package/dist/chunk-3KXFB2FM.js +2 -0
  12. package/dist/chunk-3T5U2EQ2.js +2 -0
  13. package/dist/chunk-3TNRNKAT.js +2 -0
  14. package/dist/{chunk-PXY7F6Y4.js → chunk-3XQLJG7V.js} +5 -5
  15. package/dist/chunk-3XZELASU.js +2 -0
  16. package/dist/chunk-3YETOKNO.js +4 -0
  17. package/dist/chunk-47WX6UC4.js +2 -0
  18. package/dist/{chunk-7SQQWSY3.js → chunk-4HQYNZ3P.js} +2 -2
  19. package/dist/chunk-4IASLUOP.js +3 -0
  20. package/dist/{chunk-KMKTIO2G.js → chunk-4KIPF45P.js} +2 -2
  21. package/dist/chunk-4SZJF4GK.js +2 -0
  22. package/dist/chunk-4TOU7HHQ.js +2 -0
  23. package/dist/chunk-4ZCLDH6T.js +11 -0
  24. package/dist/{chunk-DQGFVPUV.js → chunk-527HV7JY.js} +3 -3
  25. package/dist/{chunk-ZTETIQ35.js → chunk-5BJPJUXF.js} +2 -2
  26. package/dist/chunk-5J3A6RBZ.js +16 -0
  27. package/dist/chunk-5KIJMEPC.js +2 -0
  28. package/dist/{chunk-JDOEX4E6.js → chunk-5QM7QT5B.js} +2 -2
  29. package/dist/chunk-5Z2H76VD.js +11 -0
  30. package/dist/chunk-63TFRBMB.js +2 -0
  31. package/dist/chunk-67FK5KGV.js +3 -0
  32. package/dist/chunk-6DO3VBLV.js +2 -0
  33. package/dist/chunk-6LS3IG2I.js +13 -0
  34. package/dist/chunk-6QN4FYQW.js +2 -0
  35. package/dist/chunk-6X4KO5A7.js +11 -0
  36. package/dist/chunk-743MEVFJ.js +8 -0
  37. package/dist/chunk-7G2WIVIX.js +2 -0
  38. package/dist/chunk-7KCZELVM.js +2 -0
  39. package/dist/chunk-7MUHSZGN.js +3 -0
  40. package/dist/chunk-7YZGSLW6.js +3 -0
  41. package/dist/chunk-7Z4GMCHM.js +117 -0
  42. package/dist/{chunk-32LVLCLN.js → chunk-AAOEROT3.js} +3 -3
  43. package/dist/chunk-AFRS7WJU.js +26 -0
  44. package/dist/chunk-ANCHW2R4.js +57 -0
  45. package/dist/{chunk-SXP2MBJH.js → chunk-AQF35NGT.js} +2 -2
  46. package/dist/chunk-ARGPDW2Y.js +6 -0
  47. package/dist/chunk-B3AREUQK.js +16 -0
  48. package/dist/chunk-BCTCADNB.js +2 -0
  49. package/dist/chunk-BM4OTGSY.js +3 -0
  50. package/dist/chunk-BMKTDJI6.js +16 -0
  51. package/dist/chunk-BOJ5SVE2.js +2 -0
  52. package/dist/{chunk-WXZLAAWK.js → chunk-BVR44XXB.js} +2 -2
  53. package/dist/{chunk-RUJURYSV.js → chunk-BYXWXLKM.js} +2 -2
  54. package/dist/chunk-BZCRHP46.js +3 -0
  55. package/dist/chunk-BZYSGZRK.js +2 -0
  56. package/dist/chunk-C52Q3JEQ.js +2 -0
  57. package/dist/chunk-C7WSQA6A.js +21 -0
  58. package/dist/{chunk-BDCC2NPY.js → chunk-CNT4ND5O.js} +2 -2
  59. package/dist/chunk-CQVDALWQ.js +2 -0
  60. package/dist/chunk-CTO3TRX7.js +2 -0
  61. package/dist/chunk-CXT3GZSQ.js +2 -0
  62. package/dist/{chunk-JVYA47YU.js → chunk-DGM2RJ3I.js} +2 -2
  63. package/dist/{chunk-7PIO7NKH.js → chunk-DK6MB565.js} +2 -2
  64. package/dist/chunk-DNPETNXT.js +2 -0
  65. package/dist/chunk-DRENNWRG.js +2 -0
  66. package/dist/chunk-DUDUIT5P.js +2 -0
  67. package/dist/chunk-DXEJ4FLZ.js +21 -0
  68. package/dist/chunk-DXYMTQZ4.js +2 -0
  69. package/dist/chunk-DZA7MQMU.js +6 -0
  70. package/dist/{chunk-ZHXX42OH.js → chunk-DZNWXJN2.js} +4 -4
  71. package/dist/{chunk-CJST5ETY.js → chunk-E6N6YTVM.js} +2 -2
  72. package/dist/chunk-E7CJ6O72.js +2 -0
  73. package/dist/chunk-EJHNTAEE.js +2 -0
  74. package/dist/chunk-EPLE5O5O.js +2 -0
  75. package/dist/chunk-F4FNK44D.js +2 -0
  76. package/dist/chunk-FCGMQETU.js +2 -0
  77. package/dist/chunk-FIO44MVK.js +3 -0
  78. package/dist/chunk-FLSVYEPL.js +2 -0
  79. package/dist/chunk-FOP7HD6H.js +3 -0
  80. package/dist/chunk-FSPENGSU.js +4 -0
  81. package/dist/chunk-FUUDUAKM.js +2 -0
  82. package/dist/chunk-FYCH2EYQ.js +2 -0
  83. package/dist/{chunk-5E4WNAVD.js → chunk-G47MFF47.js} +2 -2
  84. package/dist/chunk-G6VV7ROY.js +2 -0
  85. package/dist/chunk-GBZCVYWA.js +2 -0
  86. package/dist/chunk-GSHTVE56.js +3 -0
  87. package/dist/chunk-GTZFKDP3.js +2 -0
  88. package/dist/{chunk-2HPVVXM5.js → chunk-H2RBDP5S.js} +2 -2
  89. package/dist/chunk-H5EXS3HM.js +2 -0
  90. package/dist/chunk-HR5JYLVV.js +4 -0
  91. package/dist/chunk-HW7FASEL.js +2 -0
  92. package/dist/chunk-HYU4W353.js +10 -0
  93. package/dist/{chunk-FKSELJQF.js → chunk-I2LY3KN7.js} +2 -2
  94. package/dist/chunk-IGBQVEHE.js +2 -0
  95. package/dist/{chunk-3G66UZBH.js → chunk-IH3K5J6K.js} +2 -2
  96. package/dist/chunk-IHGK3SZ7.js +29 -0
  97. package/dist/chunk-IM23CSG5.js +2 -0
  98. package/dist/chunk-IQMGNIGY.js +2 -0
  99. package/dist/chunk-ITF3CWS5.js +2 -0
  100. package/dist/chunk-IZKJQQCQ.js +3 -0
  101. package/dist/chunk-J4HUBIVF.js +5 -0
  102. package/dist/{chunk-AZJQQKDD.js → chunk-JGMD6JGB.js} +2 -2
  103. package/dist/chunk-JLZWYDCZ.js +4 -0
  104. package/dist/chunk-JO6FK3Q5.js +2 -0
  105. package/dist/chunk-JSHDCVUM.js +81 -0
  106. package/dist/chunk-K2DZCH2K.js +2 -0
  107. package/dist/chunk-K63CAPS2.js +23 -0
  108. package/dist/chunk-KBIC6JHJ.js +2 -0
  109. package/dist/chunk-KFFQURUZ.js +2 -0
  110. package/dist/chunk-KFOYCQAJ.js +9 -0
  111. package/dist/chunk-KGKCJFWZ.js +6 -0
  112. package/dist/chunk-KK7GPALL.js +28 -0
  113. package/dist/chunk-L7WRUNKJ.js +2 -0
  114. package/dist/{chunk-W4ETQAXM.js → chunk-LFWB7TOJ.js} +2 -2
  115. package/dist/chunk-LGVTIZPV.js +61 -0
  116. package/dist/chunk-LIWIV26I.js +29 -0
  117. package/dist/chunk-LJMWILX6.js +3 -0
  118. package/dist/{chunk-BPAPWKP6.js → chunk-LXMW6ZAX.js} +8 -8
  119. package/dist/chunk-MFBVUQJZ.js +2 -0
  120. package/dist/{chunk-O64IZ6UX.js → chunk-MLTKGHD2.js} +2 -2
  121. package/dist/chunk-MLTSTKXD.js +5 -0
  122. package/dist/chunk-MR4ZKWO6.js +57 -0
  123. package/dist/{chunk-EN3O7VJA.js → chunk-MRXBLYRE.js} +2 -2
  124. package/dist/chunk-MXNGIEPU.js +3 -0
  125. package/dist/chunk-N4EFQIRX.js +20 -0
  126. package/dist/chunk-ND3BWIVN.js +7 -0
  127. package/dist/chunk-NODZYYGC.js +2 -0
  128. package/dist/chunk-NP4JFCLE.js +133 -0
  129. package/dist/chunk-NQXWWE6S.js +8 -0
  130. package/dist/chunk-NSDPPUDY.js +7 -0
  131. package/dist/chunk-NT4NVEHU.js +18 -0
  132. package/dist/chunk-O2VY47Y5.js +325 -0
  133. package/dist/chunk-O3EX5STE.js +5 -0
  134. package/dist/chunk-O4PZFAXA.js +3 -0
  135. package/dist/chunk-OA2BO4DR.js +2 -0
  136. package/dist/chunk-OFZVFIDF.js +3 -0
  137. package/dist/{chunk-PQCI4SQX.js → chunk-OG5UK2K7.js} +2 -2
  138. package/dist/chunk-OMVNRPST.js +2 -0
  139. package/dist/{chunk-7BAVHKMJ.js → chunk-OU6SDWAM.js} +9 -9
  140. package/dist/{chunk-LY4WC4AD.js → chunk-OY7PCALC.js} +2 -2
  141. package/dist/{chunk-A73XVBCR.js → chunk-P3UFF22M.js} +2 -2
  142. package/dist/chunk-PAZSBPJR.js +3 -0
  143. package/dist/chunk-PJBYDCBQ.js +38 -0
  144. package/dist/chunk-PRLU3I7G.js +79 -0
  145. package/dist/chunk-PU6XDQ2X.js +16 -0
  146. package/dist/{chunk-3CLX5EOX.js → chunk-PWEQ6CZZ.js} +2 -2
  147. package/dist/{chunk-XSRF6Q77.js → chunk-PX6QNUYF.js} +2 -2
  148. package/dist/chunk-Q4MRRB3C.js +3 -0
  149. package/dist/chunk-QGVUPYBC.js +35 -0
  150. package/dist/chunk-QH5Q6M5C.js +2 -0
  151. package/dist/chunk-QLWZUFDT.js +2 -0
  152. package/dist/chunk-QN2AI3D2.js +3 -0
  153. package/dist/{chunk-JAYYFEQY.js → chunk-QZCACNV5.js} +2 -2
  154. package/dist/chunk-RNKRYK6B.js +4 -0
  155. package/dist/chunk-RSUH7G5T.js +29 -0
  156. package/dist/chunk-RZWBTKXO.js +5 -0
  157. package/dist/chunk-SBFDPHKH.js +4 -0
  158. package/dist/{chunk-HX4GQPZP.js → chunk-SGSPCEFC.js} +3 -3
  159. package/dist/chunk-SIGVQT43.js +2 -0
  160. package/dist/chunk-SRIZDEWX.js +4 -0
  161. package/dist/chunk-SV2LEFVM.js +2 -0
  162. package/dist/chunk-T2PBOVDI.js +3 -0
  163. package/dist/chunk-TP2X2C2Y.js +3 -0
  164. package/dist/chunk-U2MNECDU.js +2 -0
  165. package/dist/chunk-U7DOYZDH.js +2 -0
  166. package/dist/chunk-UAQQR55F.js +2 -0
  167. package/dist/chunk-UBETC3Q2.js +2 -0
  168. package/dist/chunk-UEQORB2A.js +2 -0
  169. package/dist/chunk-UM56ZET4.js +38 -0
  170. package/dist/chunk-UXNXOMXJ.js +2 -0
  171. package/dist/{chunk-6SHPK5ZE.js → chunk-V6XENWOF.js} +2 -2
  172. package/dist/chunk-VJAD5WX5.js +2 -0
  173. package/dist/chunk-VRJG7N3I.js +453 -0
  174. package/dist/chunk-W7HN6V4E.js +7 -0
  175. package/dist/chunk-WCIKJ2E3.js +3 -0
  176. package/dist/chunk-WEXQYJY3.js +5 -0
  177. package/dist/chunk-WOPZX5GM.js +2 -0
  178. package/dist/chunk-WRQXLNYE.js +9 -0
  179. package/dist/{chunk-XKWKXZKW.js → chunk-WV6R37XV.js} +2 -2
  180. package/dist/{chunk-N5W4YZMK.js → chunk-WZ7V4BQV.js} +2 -2
  181. package/dist/chunk-WZRNEVYC.js +2 -0
  182. package/dist/chunk-X5MWO4DM.js +7 -0
  183. package/dist/chunk-XDAUYDFT.js +2 -0
  184. package/dist/{chunk-L7AW2QB5.js → chunk-XDOEHEET.js} +2 -2
  185. package/dist/chunk-XDQX6LDT.js +4 -0
  186. package/dist/chunk-XFRHBAIT.js +2 -0
  187. package/dist/chunk-XIPGCT3D.js +5 -0
  188. package/dist/chunk-XKM5D2XS.js +16 -0
  189. package/dist/chunk-XNF5T4T2.js +4 -0
  190. package/dist/chunk-Y2S4YNLH.js +3 -0
  191. package/dist/chunk-YA72ZUKO.js +2 -0
  192. package/dist/chunk-YBWE6J32.js +43 -0
  193. package/dist/chunk-YCXQQ3YB.js +2 -0
  194. package/dist/chunk-YDTK77JP.js +43 -0
  195. package/dist/chunk-YF25RQER.js +4 -0
  196. package/dist/chunk-YKHL4J3G.js +2 -0
  197. package/dist/chunk-YLNCTPOI.js +4 -0
  198. package/dist/chunk-YR7VRWNX.js +2 -0
  199. package/dist/chunk-YT4IQBET.js +3 -0
  200. package/dist/chunk-YUKYB54I.js +1 -0
  201. package/dist/chunk-Z2KGMIL4.js +2 -0
  202. package/dist/chunk-Z2QB75BS.js +3 -0
  203. package/dist/chunk-Z67JOKRE.js +554 -0
  204. package/dist/chunk-ZGDHC5AT.js +2 -0
  205. package/dist/chunk-ZMS4YCY7.js +2 -0
  206. package/dist/chunk-ZNW5A5VX.js +3 -0
  207. package/dist/{chunk-TFRAYKN6.js → chunk-ZP2WUVZ5.js} +2 -2
  208. package/dist/chunk-ZQUNCTEZ.js +2 -0
  209. package/dist/cli-main.js +8 -0
  210. package/dist/cli.js +1 -3
  211. package/dist/code-AXLJBZ6T.js +2 -0
  212. package/dist/code-B17qEMbt.d.ts +121 -0
  213. package/dist/code-result-json-CTZHAQXJ.js +2 -0
  214. package/dist/command-descriptors-6INSCKLW.js +342 -0
  215. package/dist/{config-types-jVM3D7MA.d.ts → config-types-B9B60MiR.d.ts} +199 -23
  216. package/dist/dataflow-AFXY423Q.js +2 -0
  217. package/dist/{db-B5PM5yNk.d.ts → db-BwIVAYNB.d.ts} +1 -1
  218. package/dist/dependence-slice-2G4X6VSJ.js +2 -0
  219. package/dist/deps-LMCAV5DO.js +2 -0
  220. package/dist/direct-navigation-2ONV22Y2.js +3 -0
  221. package/dist/entry-map-ZOC3VXO5.js +2 -0
  222. package/dist/exploration-topology-BG4v30HZ.d.ts +256 -0
  223. package/dist/file-dep-graph-Bqg3t3Px.d.ts +4 -0
  224. package/dist/file-kind-BKCVMNUf.d.ts +10 -0
  225. package/dist/files-WJQJLHMH.js +2 -0
  226. package/dist/graph-evidence-Bjyky2V4.d.ts +126 -0
  227. package/dist/graph-exploration-contract-CqDsnPQL.d.ts +7 -0
  228. package/dist/{health-Do5TKSJI.d.ts → health-CPp2Jf1Z.d.ts} +33 -34
  229. package/dist/hierarchy-ASNIHAX4.js +2 -0
  230. package/dist/imports-JICEKDKK.js +2 -0
  231. package/dist/index.d.ts +4 -31
  232. package/dist/index.js +1 -1
  233. package/dist/members-C5H2K3MS.js +2 -0
  234. package/dist/methods-KZOZHSD4.js +2 -0
  235. package/dist/next-anchor-candidates-BwMczMvX.d.ts +90 -0
  236. package/dist/output-continuation-command-NX3RH3TP.js +3 -0
  237. package/dist/output-pagination-3OFL2MJV.js +19 -0
  238. package/dist/postinstall.js +1 -1
  239. package/dist/project-reindex-A2SXUH2H.js +3 -0
  240. package/dist/queries/affected.d.ts +22 -4
  241. package/dist/queries/affected.js +1 -1
  242. package/dist/queries/anchors.d.ts +123 -0
  243. package/dist/queries/anchors.js +2 -0
  244. package/dist/queries/architecture.d.ts +3 -2
  245. package/dist/queries/architecture.js +1 -1
  246. package/dist/queries/bottlenecks.d.ts +26 -7
  247. package/dist/queries/bottlenecks.js +1 -1
  248. package/dist/queries/by-kind.d.ts +2 -2
  249. package/dist/queries/by-kind.js +1 -1
  250. package/dist/queries/call-graph.d.ts +17 -3
  251. package/dist/queries/call-graph.js +1 -1
  252. package/dist/queries/change-surface.d.ts +2 -2
  253. package/dist/queries/change-surface.js +1 -1
  254. package/dist/queries/cleanup-plan.d.ts +2 -2
  255. package/dist/queries/cleanup-plan.js +1 -1
  256. package/dist/queries/co-change.d.ts +2 -2
  257. package/dist/queries/co-change.js +1 -1
  258. package/dist/queries/code.d.ts +5 -26
  259. package/dist/queries/code.js +1 -1
  260. package/dist/queries/complexity-hotspots.d.ts +2 -2
  261. package/dist/queries/complexity-hotspots.js +1 -1
  262. package/dist/queries/complexity.d.ts +2 -2
  263. package/dist/queries/complexity.js +1 -1
  264. package/dist/queries/context.d.ts +145 -0
  265. package/dist/queries/context.js +2 -0
  266. package/dist/queries/convergence.d.ts +2 -2
  267. package/dist/queries/convergence.js +1 -1
  268. package/dist/queries/coupling.d.ts +8 -3
  269. package/dist/queries/coupling.js +1 -1
  270. package/dist/queries/cycles.d.ts +34 -7
  271. package/dist/queries/cycles.js +1 -1
  272. package/dist/queries/dataflow.d.ts +40 -14
  273. package/dist/queries/dataflow.js +1 -1
  274. package/dist/queries/dead.d.ts +2 -2
  275. package/dist/queries/dead.js +1 -1
  276. package/dist/queries/decorative-checkers.d.ts +3 -3
  277. package/dist/queries/decorative-checkers.js +1 -1
  278. package/dist/queries/deep-chains.d.ts +4 -38
  279. package/dist/queries/deep-chains.js +1 -1
  280. package/dist/queries/dependence-slice.d.ts +47 -0
  281. package/dist/queries/dependence-slice.js +2 -0
  282. package/dist/queries/dependency-depth.d.ts +49 -0
  283. package/dist/queries/dependency-depth.js +2 -0
  284. package/dist/queries/deps.d.ts +4 -2
  285. package/dist/queries/deps.js +1 -1
  286. package/dist/queries/diff-impact.d.ts +3 -3
  287. package/dist/queries/diff-impact.js +1 -1
  288. package/dist/queries/doc-drift.d.ts +4 -4
  289. package/dist/queries/doc-drift.js +1 -1
  290. package/dist/queries/drift.d.ts +2 -2
  291. package/dist/queries/drift.js +1 -1
  292. package/dist/queries/duplicate-bodies.d.ts +2 -2
  293. package/dist/queries/duplicate-bodies.js +1 -1
  294. package/dist/queries/entry-map.d.ts +121 -0
  295. package/dist/queries/entry-map.js +2 -0
  296. package/dist/queries/evidence.d.ts +70 -0
  297. package/dist/queries/evidence.js +2 -0
  298. package/dist/queries/extract-candidates.d.ts +2 -2
  299. package/dist/queries/extract-candidates.js +1 -1
  300. package/dist/queries/fan.d.ts +18 -5
  301. package/dist/queries/fan.js +1 -1
  302. package/dist/queries/files.d.ts +2 -2
  303. package/dist/queries/files.js +1 -1
  304. package/dist/queries/health.d.ts +4 -3
  305. package/dist/queries/health.js +1 -1
  306. package/dist/queries/hierarchy.d.ts +5 -3
  307. package/dist/queries/hierarchy.js +1 -1
  308. package/dist/queries/hotspots.d.ts +11 -5
  309. package/dist/queries/hotspots.js +1 -1
  310. package/dist/queries/imports.d.ts +2 -2
  311. package/dist/queries/imports.js +1 -1
  312. package/dist/queries/incomplete-migration.d.ts +4 -4
  313. package/dist/queries/incomplete-migration.js +1 -1
  314. package/dist/queries/index.d.ts +56 -136
  315. package/dist/queries/index.js +1 -1
  316. package/dist/queries/isolated.d.ts +2 -2
  317. package/dist/queries/isolated.js +1 -1
  318. package/dist/queries/locality-candidates.d.ts +2 -2
  319. package/dist/queries/locality-candidates.js +1 -1
  320. package/dist/queries/members.d.ts +2 -2
  321. package/dist/queries/members.js +1 -1
  322. package/dist/queries/methods.d.ts +2 -2
  323. package/dist/queries/methods.js +1 -1
  324. package/dist/queries/not-implemented.d.ts +3 -3
  325. package/dist/queries/not-implemented.js +1 -1
  326. package/dist/queries/outline.d.ts +2 -2
  327. package/dist/queries/outline.js +1 -1
  328. package/dist/queries/passthrough-candidates.d.ts +5 -9
  329. package/dist/queries/passthrough-candidates.js +1 -1
  330. package/dist/queries/plan-context.d.ts +27 -64
  331. package/dist/queries/plan-context.js +1 -1
  332. package/dist/queries/react-component-duplicates.d.ts +2 -2
  333. package/dist/queries/react-component-duplicates.js +1 -1
  334. package/dist/queries/react-hook-candidates.d.ts +2 -2
  335. package/dist/queries/react-hook-candidates.js +1 -1
  336. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  337. package/dist/queries/react-large-component-pressure.js +1 -1
  338. package/dist/queries/recent-duplicates.d.ts +2 -2
  339. package/dist/queries/recent-duplicates.js +1 -1
  340. package/dist/queries/redundant-reexports.d.ts +2 -2
  341. package/dist/queries/redundant-reexports.js +1 -1
  342. package/dist/queries/reference-neighborhood.d.ts +4 -0
  343. package/dist/queries/reference-neighborhood.js +2 -0
  344. package/dist/queries/reference-reachability.d.ts +48 -0
  345. package/dist/queries/reference-reachability.js +2 -0
  346. package/dist/queries/refs.d.ts +2 -2
  347. package/dist/queries/refs.js +1 -1
  348. package/dist/queries/self-audit.d.ts +2 -2
  349. package/dist/queries/self-audit.js +1 -1
  350. package/dist/queries/similar-chains.d.ts +2 -2
  351. package/dist/queries/similar-chains.js +1 -1
  352. package/dist/queries/similar-files.d.ts +2 -2
  353. package/dist/queries/similar-files.js +1 -1
  354. package/dist/queries/similar-signatures.d.ts +2 -2
  355. package/dist/queries/similar-signatures.js +1 -1
  356. package/dist/queries/similar.d.ts +2 -2
  357. package/dist/queries/similar.js +1 -1
  358. package/dist/queries/slice.d.ts +3 -36
  359. package/dist/queries/slice.js +1 -1
  360. package/dist/queries/source-inspection.d.ts +209 -0
  361. package/dist/queries/source-inspection.js +2 -0
  362. package/dist/queries/source-search.d.ts +13 -0
  363. package/dist/queries/source-search.js +2 -0
  364. package/dist/queries/stale-abstractions.d.ts +2 -2
  365. package/dist/queries/stale-abstractions.js +1 -1
  366. package/dist/queries/stats.d.ts +2 -2
  367. package/dist/queries/surface.d.ts +13 -4
  368. package/dist/queries/surface.js +1 -1
  369. package/dist/queries/symbols.d.ts +2 -2
  370. package/dist/queries/symbols.js +1 -1
  371. package/dist/queries/system-map.d.ts +449 -0
  372. package/dist/queries/system-map.js +2 -0
  373. package/dist/queries/system.d.ts +5 -3
  374. package/dist/queries/system.js +1 -1
  375. package/dist/queries/test-quality.d.ts +2 -2
  376. package/dist/queries/test-quality.js +1 -1
  377. package/dist/queries/trace.d.ts +47 -3
  378. package/dist/queries/trace.js +1 -1
  379. package/dist/queries/twin-ab.d.ts +3 -3
  380. package/dist/queries/twin-ab.js +1 -1
  381. package/dist/queries/twin-drift.d.ts +3 -3
  382. package/dist/queries/twin-drift.js +1 -1
  383. package/dist/queries/unused-imports.d.ts +2 -2
  384. package/dist/queries/unused-imports.js +1 -1
  385. package/dist/queries/unused-params.d.ts +2 -2
  386. package/dist/queries/unused-params.js +1 -1
  387. package/dist/queries/value-flow.d.ts +43 -0
  388. package/dist/queries/value-flow.js +2 -0
  389. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  390. package/dist/queries/vue-component-duplicates.js +1 -1
  391. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  392. package/dist/queries/vue-composable-candidates.js +1 -1
  393. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  394. package/dist/queries/vue-large-view-pressure.js +1 -1
  395. package/dist/queries/wrapper-candidates.d.ts +2 -2
  396. package/dist/queries/wrapper-candidates.js +1 -1
  397. package/dist/query-service-fastpath.js +6 -0
  398. package/dist/query-service-server.js +5 -0
  399. package/dist/refs-ZOORVRQC.js +2 -0
  400. package/dist/refs-pagination-SRCUOYRD.js +2 -0
  401. package/dist/reindex-worker.js +85 -86
  402. package/dist/reindex.d.ts +64 -42
  403. package/dist/reindex.js +93 -77
  404. package/dist/repository-text-C0Q8VYdN.d.ts +19 -0
  405. package/dist/runtime.d.ts +287 -8
  406. package/dist/runtime.js +4 -3
  407. package/dist/rust-semantic-session-server.js +1 -1
  408. package/dist/rust-semantic-session-worker.js +1 -1
  409. package/dist/rust-semantic-worker.js +1 -1
  410. package/dist/{scip-cli-BnEwZRLJ.d.ts → scip-cli-H-n59izO.d.ts} +33 -2
  411. package/dist/slice-NOTBWA7S.js +2 -0
  412. package/dist/source-search-types-Dwz8KeuW.d.ts +79 -0
  413. package/dist/source-snippet-_wrcgmZc.d.ts +15 -0
  414. package/dist/stats-OOJ74B32.js +2 -0
  415. package/dist/surface-BTBCLKNA.js +2 -0
  416. package/dist/symbol-resolution-SVSMX4RN.js +2 -0
  417. package/dist/system-2EIUFP6B.js +2 -0
  418. package/dist/trace-BB2GHQPG.js +2 -0
  419. package/dist/typescript-mailbox-worker.js +1 -1
  420. package/dist/value-flow-OA7AHSUG.js +2 -0
  421. package/dist/watch-server.js +3 -2
  422. package/docs/AGENT_GUIDE.md +133 -476
  423. package/docs/AI_FAILURE_MODES.md +30 -301
  424. package/docs/API.md +1 -1
  425. package/docs/API_EVOLUTION.md +6 -0
  426. package/docs/CLI_JSON_OUTPUT.md +207 -29
  427. package/docs/COMMAND_REFERENCE.md +255 -154
  428. package/docs/CONFIGURATION_WRITE_SAFETY.md +14 -13
  429. package/docs/DETECTOR_EVIDENCE_CONTRACTS.md +84 -0
  430. package/docs/DETECTOR_GUIDE.md +46 -138
  431. package/docs/DURABILITY.md +7 -1
  432. package/docs/INDEX_GENERATIONS.md +6 -0
  433. package/docs/LOCK_PROTOCOL.md +8 -0
  434. package/docs/REINDEX_METADATA_COMPATIBILITY.md +13 -3
  435. package/docs/SECURITY_MODEL.md +39 -42
  436. package/docs/accuracy-audit-checklist.md +4 -0
  437. package/docs/accuracy-hardening-goal.md +9 -2
  438. package/docs/analyzer-inventory.md +59 -264
  439. package/docs/analyzer-validation-protocol.md +62 -170
  440. package/docs/architecture-coherence-vision.md +18 -12
  441. package/docs/locality-analyzer-design.md +1 -1
  442. package/docs/schemas/cli-json-envelope.schema.json +212 -27
  443. package/docs/schemas/cli-json-export-receipt.schema.json +25 -0
  444. package/docs/schemas/cli-output-page.schema.json +1 -1
  445. package/docs/schemas/observation-receipt.schema.json +164 -0
  446. package/docs/schemas/project-config.schema.json +37 -45
  447. package/docs/schemas/suppression-record.schema.json +1 -34
  448. package/package.json +69 -11
  449. package/skills/concrete-plan/SKILL.md +8 -0
  450. package/skills/concrete-plan/agents/openai.yaml +4 -0
  451. package/skills/scip-explore/SKILL.md +49 -61
  452. package/skills/scip-explore/agents/openai.yaml +3 -3
  453. package/skills/scip-explore/references/delegated-exploration.md +51 -0
  454. package/skills/scip-explore/references/external-evidence.md +72 -0
  455. package/skills/scip-explore/references/information-model.md +51 -0
  456. package/skills/scip-explore/scripts/capture-evidence.mjs +666 -0
  457. package/skills/scip-integrity-audit/SKILL.md +185 -0
  458. package/skills/scip-integrity-audit/agents/openai.yaml +4 -0
  459. package/skills/scip-plan/SKILL.md +67 -49
  460. package/skills/scip-plan/agents/openai.yaml +3 -3
  461. package/skills/scip-query/SKILL.md +98 -77
  462. package/skills/scip-query/agents/openai.yaml +3 -3
  463. package/skills/scip-setup/SKILL.md +10 -102
  464. package/skills/scip-setup/agents/openai.yaml +3 -3
  465. package/dist/chunk-26QA6FAI.js +0 -8
  466. package/dist/chunk-2KAZEZ6M.js +0 -2
  467. package/dist/chunk-3ORVDL3H.js +0 -2
  468. package/dist/chunk-46XGSFNI.js +0 -2
  469. package/dist/chunk-4MAK2HOY.js +0 -6
  470. package/dist/chunk-4TURLRL5.js +0 -16
  471. package/dist/chunk-4UQVNCQE.js +0 -2
  472. package/dist/chunk-55Q3WLZX.js +0 -2
  473. package/dist/chunk-5I5G2QOX.js +0 -3
  474. package/dist/chunk-6LDJQXAH.js +0 -2
  475. package/dist/chunk-6O5TICIZ.js +0 -3
  476. package/dist/chunk-7O5IKBTZ.js +0 -16
  477. package/dist/chunk-7S5E7KWT.js +0 -2
  478. package/dist/chunk-7WPLAODU.js +0 -5
  479. package/dist/chunk-AFHORGLH.js +0 -42
  480. package/dist/chunk-AIE7TFJW.js +0 -9
  481. package/dist/chunk-AQOFWNQJ.js +0 -1
  482. package/dist/chunk-B2PX5I6M.js +0 -2
  483. package/dist/chunk-B75HZHUP.js +0 -2
  484. package/dist/chunk-B7PBSLZN.js +0 -2
  485. package/dist/chunk-BBW6JFHN.js +0 -2
  486. package/dist/chunk-BNXCIFVY.js +0 -2
  487. package/dist/chunk-BS2NMXQZ.js +0 -4
  488. package/dist/chunk-C3KV2II6.js +0 -2
  489. package/dist/chunk-C43RDDP4.js +0 -20
  490. package/dist/chunk-DAFAHMNB.js +0 -42
  491. package/dist/chunk-DQLPXMH6.js +0 -8
  492. package/dist/chunk-EKZTZXHZ.js +0 -117
  493. package/dist/chunk-EW2NTSFA.js +0 -18
  494. package/dist/chunk-F3Z4OUDS.js +0 -8
  495. package/dist/chunk-FJH2NW7J.js +0 -66
  496. package/dist/chunk-FTFP6O3L.js +0 -11
  497. package/dist/chunk-FYLK2DEJ.js +0 -2
  498. package/dist/chunk-GH74ASD6.js +0 -11
  499. package/dist/chunk-GMXWZP2B.js +0 -2
  500. package/dist/chunk-GOUBFH5O.js +0 -3
  501. package/dist/chunk-HLF2TX6R.js +0 -2
  502. package/dist/chunk-HX7M4BDI.js +0 -30
  503. package/dist/chunk-HZ72SESS.js +0 -128
  504. package/dist/chunk-IB2N4FIY.js +0 -10
  505. package/dist/chunk-IZYYAFN5.js +0 -2
  506. package/dist/chunk-JFGGXWQF.js +0 -947
  507. package/dist/chunk-JN4NMBEX.js +0 -8
  508. package/dist/chunk-JW56N3KI.js +0 -4
  509. package/dist/chunk-JZ2OXNWB.js +0 -2
  510. package/dist/chunk-KFZNKUNT.js +0 -2
  511. package/dist/chunk-L5GJNV2T.js +0 -8
  512. package/dist/chunk-L7JDSCDF.js +0 -4
  513. package/dist/chunk-LU47HG23.js +0 -14
  514. package/dist/chunk-LVY7NPF7.js +0 -2
  515. package/dist/chunk-MKCDWWGV.js +0 -4
  516. package/dist/chunk-MNE7YG56.js +0 -2
  517. package/dist/chunk-MRXBEXSY.js +0 -26
  518. package/dist/chunk-MV7OWDUX.js +0 -2
  519. package/dist/chunk-NGEXCJJW.js +0 -11
  520. package/dist/chunk-NIW6JDC5.js +0 -29
  521. package/dist/chunk-PBUQFCNB.js +0 -16
  522. package/dist/chunk-POAVPHH7.js +0 -2
  523. package/dist/chunk-QZ4JVECJ.js +0 -2
  524. package/dist/chunk-RDO52JGY.js +0 -2
  525. package/dist/chunk-RJT3TUUZ.js +0 -2
  526. package/dist/chunk-RVLDN63O.js +0 -4
  527. package/dist/chunk-RXOXSKY3.js +0 -2
  528. package/dist/chunk-S7OYBOCK.js +0 -2
  529. package/dist/chunk-SMNXQT5Z.js +0 -3
  530. package/dist/chunk-SRAFT254.js +0 -2
  531. package/dist/chunk-T7YQSHPQ.js +0 -3
  532. package/dist/chunk-UJCOIXDY.js +0 -2
  533. package/dist/chunk-UJPRPGCO.js +0 -13
  534. package/dist/chunk-WCCFZ7V7.js +0 -113
  535. package/dist/chunk-WUPW3UN3.js +0 -3
  536. package/dist/chunk-X54AGLVX.js +0 -2
  537. package/dist/chunk-Y2MVPNKY.js +0 -5
  538. package/dist/chunk-YKUU5AIC.js +0 -3
  539. package/dist/chunk-YLCJLTPL.js +0 -2
  540. package/dist/chunk-YTQVETEO.js +0 -2
  541. package/dist/chunk-Z4N3MZYA.js +0 -38
  542. package/dist/chunk-ZJOOT3BG.js +0 -2
  543. package/dist/chunk-ZK26BAQL.js +0 -2
  544. package/dist/command-descriptors-DSS46KXI.js +0 -642
  545. package/dist/diff-gate-types-B0QYpDv1.d.ts +0 -11
  546. package/dist/direct-navigation-6YHV6IB5.js +0 -3
  547. package/dist/queries/diff-gate.d.ts +0 -253
  548. package/dist/queries/diff-gate.js +0 -2
  549. package/docs/COMMITTED_RECORD_COMPATIBILITY.md +0 -154
  550. package/docs/analyzer-validation-ledger.md +0 -516
  551. package/docs/schemas/outcome-event-record.schema.json +0 -95
  552. package/skills/_shared/SKILL.md +0 -101
  553. package/skills/_shared/agents/openai.yaml +0 -4
  554. package/skills/_shared/references/agent-contract-catalog.md +0 -105
  555. package/skills/_shared/references/command-catalog.md +0 -118
  556. package/skills/_shared/references/detector-precision-and-diffgate.md +0 -59
  557. package/skills/_shared/references/evidence-and-dead-code.md +0 -25
  558. package/skills/scip-audit/SKILL.md +0 -77
  559. package/skills/scip-audit/agents/openai.yaml +0 -4
  560. package/skills/scip-audit/references/claims.md +0 -98
  561. package/skills/scip-audit/references/cleanup.md +0 -100
  562. package/skills/scip-audit/references/directory.md +0 -222
  563. package/skills/scip-audit/references/frontend.md +0 -130
  564. package/skills/scip-audit/references/integrity.md +0 -154
  565. package/skills/scip-audit/references/maintainability.md +0 -162
  566. package/skills/scip-audit/references/twin-drift.md +0 -104
  567. package/skills/scip-diagnose/SKILL.md +0 -52
  568. package/skills/scip-diagnose/agents/openai.yaml +0 -4
  569. package/skills/scip-diagnose/references/debug.md +0 -117
  570. package/skills/scip-diagnose/references/probe-reachability.md +0 -77
  571. package/skills/scip-diagnose/references/root-cause.md +0 -145
  572. package/skills/scip-diagnose/references/triage.md +0 -119
  573. package/skills/scip-explore/references/diagrams.md +0 -40
  574. package/skills/scip-explore/references/language-playbook.md +0 -49
  575. package/skills/scip-improve/SKILL.md +0 -56
  576. package/skills/scip-improve/agents/openai.yaml +0 -4
  577. package/skills/scip-improve/references/cleanup-batches.md +0 -53
  578. package/skills/scip-improve/references/directory-moves.md +0 -53
  579. package/skills/scip-improve/references/doc-reconcile.md +0 -30
  580. package/skills/scip-improve/references/frontend-extraction.md +0 -39
  581. package/skills/scip-improve/references/maintainability-mechanism.md +0 -43
  582. package/skills/scip-improve/references/twin-drift.md +0 -35
  583. package/skills/scip-plan/references/api-impact.md +0 -19
  584. package/skills/scip-plan/references/conductor.md +0 -41
  585. package/skills/scip-plan/references/high-assurance.md +0 -43
  586. package/skills/scip-plan/references/hyper-optimization.md +0 -50
  587. package/skills/scip-plan/references/tla-model.md +0 -88
  588. package/skills/scip-setup/references/bootstrap-workflow.md +0 -119
  589. package/skills/scip-setup/references/language-verification.md +0 -61
  590. package/skills/scip-setup/references/lifecycle-commands.md +0 -119
  591. package/skills/scip-setup/references/per-repo-triage.md +0 -24
  592. package/skills/scip-verify/SKILL.md +0 -229
  593. package/skills/scip-verify/agents/openai.yaml +0 -4
  594. package/skills/scip-verify/references/calibrate-detectors.md +0 -170
@@ -0,0 +1,5 @@
1
+ import{isAbsolute as Ve,relative as dn}from"path";var g=class extends Error{constructor(n,r){super(`refusing unsafe project file path ${JSON.stringify(n)} (${r})`);this.relativePath=n;this.reason=r;this.name="UnsafeProjectPathError"}relativePath;reason;code="SCIP_QUERY_UNSAFE_PROJECT_PATH"};function me(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function wi(e){return e.replace(/\\/g,"/")}function ki(e,t){return me(e)===me(t)}function b(e,t){let n=dn(e,t);return n===""||!n.startsWith("..")&&!Ve(n)}function E(e){if(!e)throw new g(e,"empty-path");if(e.includes("\0"))throw new g(e,"nul-byte");if(Ve(e)||/^[A-Za-z]:/.test(e)||e.startsWith("//")||e.startsWith("\\\\"))throw new g(e,"absolute-path");let t=me(e);if(t.split("/").some(r=>r===".."))throw new g(e,"parent-traversal");if(!t||t===".")throw new g(e,"empty-path");return t}import{createHash as ut,randomUUID as Rn}from"crypto";import{chmodSync as lt,existsSync as L,linkSync as vn,lstatSync as oe,readdirSync as je,realpathSync as F,unlinkSync as Tn,writeSync as On}from"fs";import{homedir as _n}from"os";import{basename as Bn,dirname as se,isAbsolute as ct,join as y,resolve as ce}from"path";import{closeSync as gn,existsSync as hn,fsyncSync as mn,mkdirSync as yn,openSync as Sn}from"fs";import{dirname as Qe}from"path";function Q(e,t,n,r){let i=0;for(;i<t.length;){let o=n.writeFile(e,t,i,t.length-i);if(!Number.isSafeInteger(o)||o<=0||o>t.length-i)throw new Error(`${r} write did not make valid forward progress`);i+=o}}function ye(e,t){if(t!=="win32")return!1;let n=e.code;return n==="EACCES"||n==="EBADF"||n==="EINVAL"||n==="EISDIR"||n==="EPERM"}var W=Object.freeze({platform:process.platform,pathExists:e=>hn(e),makeDirectory:e=>yn(e,{recursive:!0}),openFile:(e,t,n)=>Sn(e,t,n),syncFile:e=>mn(e),closeFile:e=>gn(e)});function Ze(e,t=W){let n=[],r=e;for(;!t.pathExists(r);){n.push(r);let o=Qe(r);if(o===r)throw new Error(`Cannot establish a durable directory path without an existing ancestor: ${e}`);r=o}let i="synced";for(let o of n.reverse())t.makeDirectory(o),i=ee(i,Z(Qe(o),t));return i}function Z(e,t=W){let n;try{n=t.openFile(e,"r")}catch(r){if(ye(r,t.platform))return"unsupported";throw r}try{t.syncFile(n)}catch(r){try{t.closeFile(n)}catch{}if(ye(r,t.platform))return"unsupported";throw r}return t.closeFile(n),"synced"}function ee(...e){return e.every(t=>t==="not-requested")?"not-requested":e.includes("unsupported")?"unsupported":"synced"}import{createRequire as bn}from"module";var Pn=bn(import.meta.url),et=jn().version;function jn(){for(let e of["../package.json","../../package.json"])try{return Pn(e)}catch{}return{version:"0.0.0"}}import{closeSync as Se,fstatSync as te,openSync as be,readFileSync as xn,readSync as tt}from"fs";import{createHash as Fn}from"crypto";var nt=8*1024*1024,Cn=64*1024*1024,wn=512*1024*1024,kn=256*1024*1024,I=class extends Error{constructor(n,r,i,o,s){let c=i==="too-large"?`is ${o} bytes; the safety limit is ${s} bytes`:i==="not-regular"?"is not a regular file":"changed while it was being read";super(`${n} ${JSON.stringify(r)} ${c}`);this.inputKind=n;this.inputPath=r;this.reason=i;this.observedBytes=o;this.limitBytes=s;this.name="BoundedFileReadError"}inputKind;inputPath;reason;observedBytes;limitBytes;code="SCIP_QUERY_BOUNDED_FILE_READ"};function ne(e,t){T(t.maxBytes);let n=String(e),r=be(e,"r");try{let i=te(r);st(i,t,n);let o=xn(r),s=te(r);if(s.dev!==i.dev||s.ino!==i.ino||s.size!==i.size||o.byteLength!==i.size)throw new I(t.inputKind,n,"changed-during-read",s.size,t.maxBytes);return o}finally{Se(r)}}function rt(e,t,n="utf8"){return ne(e,t).toString(n)}function H(e,t){return rt(e,{maxBytes:nt,inputKind:t})}function it(e,t){T(t.maxBytes);let n=[],r=Buffer.allocUnsafe(64*1024),i=0;for(;;){let o=tt(e,r,0,r.length,null);if(o===0)break;if(i+=o,!Number.isSafeInteger(i)||i>t.maxBytes)throw new I(t.inputKind,`file descriptor ${e}`,"too-large",i,t.maxBytes);n.push(Buffer.from(r.subarray(0,o)))}return Buffer.concat(n,i)}function ot(e,t){let n=be(e,"r");try{return it(n,t)}finally{Se(n)}}function En(e,t,n="utf8"){return ot(e,t).toString(n)}function re(e,t,n){T(t.maxBytes);let r=String(e),i=be(e,"r");try{let o=te(i);st(o,t,r);let s=Buffer.allocUnsafe(Math.min(1024*1024,Math.max(1,o.size))),c=0;for(;c<o.size;){let u=tt(i,s,0,Math.min(s.length,o.size-c),c);if(u===0)break;n(s.subarray(0,u)),c+=u}let a=te(i);if(a.dev!==o.dev||a.ino!==o.ino||a.size!==o.size||c!==o.size)throw new I(t.inputKind,r,"changed-during-read",a.size,t.maxBytes);return c}finally{Se(i)}}function In(e,t){let n=Fn("sha256");return re(e,t,r=>n.update(r)),n.digest("hex")}function st(e,t,n){if(!e.isFile())throw new I(t.inputKind,n,"not-regular",Number(e.size),t.maxBytes);if(e.size>t.maxBytes)throw new I(t.inputKind,n,"too-large",Number(e.size),t.maxBytes)}function T(e){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`maxBytes must be a non-negative safe integer; received ${e}`)}var ft=1,U=".scip-query-cache-owner.json",Dn=16*1024,pt=Object.freeze({...W,randomToken:()=>Rn(),linkFile:(e,t)=>vn(e,t),removeFile:e=>Tn(e),writeFile:(e,t,n,r)=>On(e,t,n,r)});function ie(e,t){return Object.assign(new Error(`refusing unsafe project dbPath ${JSON.stringify(e)} (${t}); use a repository-relative directory that remains inside the checkout`),{name:"UnsafeCachePathError",code:"SCIP_QUERY_UNSAFE_CACHE_PATH",configuredPath:e,reason:t})}function C(e,t){return Object.assign(new Error(`refusing unowned cache directory ${JSON.stringify(e)} (${t}); move unrelated data elsewhere or choose a new empty dbPath`),{name:"CacheOwnershipError",code:"SCIP_QUERY_CACHE_OWNERSHIP",cacheDir:e,reason:t})}function Ln(e,t){let n=F(e);return Nn(n,xe(n,t))}function xe(e,t){let n=F(e),r=process.env.SCIP_QUERY_CACHE_DIR;return r?ce(r):t?.dbPath?Mn(n,t.dbPath):An(n)}function dt(){let e=process.env.XDG_CACHE_HOME;return y(e||y(_n(),".cache"),"scip-query")}function An(e){let t=ce(e);try{t=F(t)}catch{}let n=ut("sha256").update(t).digest("hex").slice(0,12);return y(dt(),"projects",n)}function Qi(e){if(!/^[a-f0-9]{24}$/.test(e))throw new Error(`invalid repository cache identity: ${e}`);let t=y(dt(),"repositories",e);return mt(t),F(t)}function Zi(e){return process.env.SCIP_QUERY_SHARED_CACHE!=="0"&&!process.env.SCIP_QUERY_CACHE_DIR&&!process.env.SCIP_QUERY_INDEX_DB&&!e?.dbPath}function eo(e,t){let n=Ln(e,t);return{cacheDir:n,dbPath:y(n,"index.db"),indexPath:y(n,"index.scip"),metaPath:y(n,"meta.json")}}function Nn(e,t,n=pt){return Gn(e,t,n).cacheDir}function Gn(e,t,n=pt){let r=F(e),i=L(t)?"synced":mt(t,n),o=F(t),s=y(o,U);if(L(s))return Pe(r,o),Fe(s),$(o),{kind:"existing",cacheDir:o};at(o),Un(o),at(o);let a=`${JSON.stringify({schemaVersion:ft,canonicalProjectRoot:r,canonicalCacheDir:o,creatorVersion:et},null,2)}
2
+ `;try{let u=Jn(s,a,n),f=ee(i,u);return{kind:"published",cacheDir:o,achievedDurability:f==="synced"?"directory-durable":"file-flushed",directorySync:f}}catch(u){if(Kn(u))return Pe(r,o),{kind:"existing",cacheDir:o};throw u}}function Pe(e,t){let n=F(e),r=F(t);return Wn(r,n,r)}function to(e,t){return L(y(t,U))?(Pe(e,t),gt(t),!0):!1}function Mn(e,t){let n;try{n=E(t)}catch(s){throw s instanceof g?ie(t,s.reason):s}let r=ce(e,...n.split("/"));if(r===e||!b(e,r))throw ie(t,"outside-project");let i=zn(r),o=F(i);if(!b(e,o)&&o!==e)throw ie(t,"symlink-escape");return r}function zn(e){let t=e;for(;!L(t);){let n=se(t);if(n===t)throw ie(e,"no-existing-ancestor");t=n}return t}function Wn(e,t,n){let r=y(e,U);if(!L(r)||oe(r).isSymbolicLink())throw C(e,"missing regular ownership record");let i=oe(r);if(!i.isFile()||i.size>Dn)throw C(e,"invalid ownership record file");let o=H(r,"cache ownership record"),s=Hn(o,e);if(t!==void 0&&s.canonicalProjectRoot!==t)throw C(e,"ownership record belongs to a different project");if(s.canonicalCacheDir!==n)throw C(e,"ownership record names a different cache directory");return{record:s,ownerSha256:ut("sha256").update(o).digest("hex"),physicalCacheDir:e}}function Hn(e,t){try{let n=JSON.parse(e);if(n.schemaVersion!==ft||typeof n.canonicalProjectRoot!="string"||typeof n.canonicalCacheDir!="string"||typeof n.creatorVersion!="string"||!ct(n.canonicalProjectRoot)||!ct(n.canonicalCacheDir))throw new Error("invalid fields");return n}catch(n){throw C(t,`malformed ownership record: ${n instanceof Error?n.message:String(n)}`)}}function at(e){let t=je(e).filter(n=>n!==U&&!$n(n));if(t.length>0)throw C(e,`unrecognized existing entries: ${t.slice(0,3).join(", ")}`)}function $n(e){return e.startsWith(`${U}.tmp-`)||e.startsWith("git-worktree-context.json.tmp-")||[".scipquery-generations","affected-shadow-latest.json","affected-shadow.jsonl","agent-hooks","augment-vue-meta.json","cache-lifecycle.lock","evidence.db","evidence.db-shm","evidence.db-wal","health-report-cache.json","git-worktree-context.json","index.db","index.db-shm","index.db-wal","index.lock","index.scip","language-indexes","meta.json","reindex-activity.jsonl","shared-cache.json","typescript-index","typescript-scip-fragments","typescript-scip-overlays","typescript-semantic","watch-activity.json","watch-refresh-requests","watch-state.json","watch.lock"].includes(e)?!0:/^(?:reindex-|rust-|typescript-)/.test(e)}function Un(e){for(let t of je(e)){let n=y(e,t);try{let r=oe(n);if(r.isSymbolicLink())throw C(e,`legacy cache entry ${t} is a symlink`);if(r.isDirectory())$(n);else if(r.isFile())Fe(n);else throw C(e,`legacy cache entry ${t} is not a file or directory`)}catch(r){if(ht(r))continue;throw r}}$(e)}function gt(e,t=!1){try{let n=oe(e);if(n.isSymbolicLink())throw C(e,"managed cache tree contains a symlink");if(n.isFile()){Fe(e);return}if(!n.isDirectory())throw C(e,"managed cache tree contains a special file");$(e);for(let r of je(e))gt(y(e,r),!0)}catch(n){if(t&&ht(n))return;throw n}}function ht(e){let t=e?.code;return t==="ENOENT"||t==="ENOTDIR"}function mt(e,t=W){let n=Ze(e,t);return $(e),n}function Jn(e,t,n){let r=`${e}.tmp-${process.pid}-${n.randomToken()}`,i,o=!1;try{i=n.openFile(r,"wx",384),o=!0,Q(i,Buffer.from(t),n,"cache ownership record"),n.syncFile(i),n.closeFile(i),i=void 0,n.linkFile(r,e);let s=Z(se(e),n);return n.removeFile(r),o=!1,ee(s,Z(se(e),n))}finally{if(i!==void 0)try{n.closeFile(i)}catch{}if(o)try{n.removeFile(r)}catch{}}}function $(e){process.platform!=="win32"&&lt(e,448)}function Fe(e){process.platform!=="win32"&&lt(e,384)}function qn(e){if(L(e))return F(e);let t=F(se(e));return y(t,Bn(e))}function no(e){return qn(ce(e))}function Kn(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}import{spawnSync as Xn}from"child_process";import{createHash as Vn}from"crypto";import{existsSync as Qn,lstatSync as Zn,realpathSync as er}from"fs";import{dirname as tr,isAbsolute as nr,join as rr,relative as uo,resolve as ue,sep as lo}from"path";var yt=Symbol.for("scip-query.project-file-listing-context.v1"),St=globalThis,Ce=St[yt],R=Ce&&typeof Ce=="object"?Ce:{};St[yt]=R;function bt(e,t){let n=R.active?R.canonicalProjectRoots:void 0,r=n?.get(e);if(r!==void 0)return r;let i=t();return n?.set(e,i),i}function Pt(){return R.sequence??0}function jt(e,t,n){let r=R.active,i=r?.get(e);if(i&&i.pathBytes<=t)return i;let o=Yn(n(),(R.sequence??0)+1);if(R.sequence=o.sequence,o.pathBytes>t)throw new RangeError(`Git project file listing exceeded ${t} path bytes.`);return r?.set(e,o),o}function xt(e,t){let n=R.active?.get(e);return n&&n.sequence>t?n.indexAllowsTreeFingerprintReuse:void 0}function*Ft(e){let t=0;for(;t<e.taggedOutput.length;){let n=e.taggedOutput.indexOf("\0",t);if(n<0)return;yield e.taggedOutput.slice(t+2,n),t=n+1}}function Yn(e,t){let n=0,r=0,i=!0;for(;n<e.length;){let o=e.indexOf("\0",n);if(o<0||o<=n+2||e[n+1]!==" ")throw new Error("Git returned a malformed tagged project file listing.");let s=e[n];i&&=s==="H"||s==="?",r+=1,n=o+1}return{taggedOutput:e,pathBytes:Buffer.byteLength(e,"utf8")-r*2,indexAllowsTreeFingerprintReuse:i,sequence:t}}var v={run(e,t){let n=wt(e,t);return n.kind==="success"?n.output:void 0},runResult:wt},ir=["rev-parse","--show-toplevel","--absolute-git-dir","--git-common-dir","HEAD","HEAD^{tree}"],Ee=["status","--porcelain=v2","--branch","-z","--untracked-files=all"],we=/^[0-9a-f]{40,64}$/;function po(e,t=v){return or(e,t)?.context}function or(e,t=v){let n=t.runResult(e,ir);if(n.kind==="success"){let i=sr(n.output);if(i){let o=cr(i,t);if(o)return Ct(o)}}let r=ar(e,t);return r?Ct(r):void 0}function go(e,t=v){if(!e.headCommit)return;let n=t.run(e.projectRoot,Ee);if(n===void 0)return;let r=Ie(n);if(!(!r?.headCommit||r.headCommit!==e.headCommit))return{...e,clean:r.clean}}function ho(e,t=v,n={}){let r=t===v&&n.cachedInventoryAfterSequence!==void 0?xt(e,n.cachedInventoryAfterSequence):void 0;if(r!==void 0)return r;let i=t.run(e,["ls-files","-v","-z"]);return i===void 0?!1:i.split("\0").filter(Boolean).every(o=>o.startsWith("H "))}function Ct(e){return{context:e,projectFileInventorySequence:Pt()}}function Ie(e){let t=e.split("\0").filter(Boolean),n=t.find(i=>i.startsWith("# branch.oid "))?.slice(13),r=n==="(initial)"?void 0:n;if(!(r!==void 0&&!we.test(r))&&n!==void 0)return{headCommit:r,clean:t.every(i=>i.startsWith("# "))}}function sr(e){let t=e.split(`
3
+ `).map(a=>a.trim());if(t.length!==5)return;let[n,r,i,o,s]=t;if(!n||!r||!i||!o||!s||!we.test(o)||!we.test(s))return;let c=w(n);return{root:c,gitDir:w(ae(c,r)),commonDir:w(ae(c,i)),headCommit:o,treeOid:s}}function cr(e,t){let n=t.run(e.root,Ee);if(n===void 0)return;let r=Ie(n);return r?.headCommit!==e.headCommit?void 0:{...kt(e.root,e.gitDir),commonDir:e.commonDir,repositoryId:Re("repository",e.commonDir),headCommit:e.headCommit,treeOid:e.treeOid,clean:r.clean}}function ar(e,t){let n=ur(e,t);if(n.kind!=="worktree")return;let r=n.identity,i=r.projectRoot,o=t.run(i,["rev-parse","--git-common-dir"])?.trim();if(!o)return;let s=w(ae(i,o)),c=ke(t.run(i,["rev-parse","--verify","HEAD"])),a=ke(t.run(i,["rev-parse","--verify","HEAD^{tree}"])),u=t.run(i,Ee);if(u===void 0)return;let f=Ie(u);if(!(!f||f.headCommit!==c))return{...r,commonDir:s,repositoryId:Re("repository",s),headCommit:c,treeOid:a,clean:f.clean}}function ur(e,t=v){let n=t.runResult(e,["rev-parse","--show-toplevel"]);if(n.kind==="not-repository")return{kind:"non-git"};if(n.kind==="error")return n;let r=n.output.trim();if(!r)return{kind:"error",message:"Git returned an empty worktree root."};let i=w(r),o=t.run(i,["rev-parse","--absolute-git-dir"])?.trim();if(!o)return{kind:"error",message:"Git did not return an absolute worktree directory."};let s=w(ae(i,o));return{kind:"worktree",identity:kt(i,s)}}function kt(e,t){return{projectRoot:e,gitDir:t,worktreeId:Re("worktree",`${e}\0${t}`)}}function mo(e,t=v){let n=t.run(e,["worktree","list","--porcelain","-z"]);return n===void 0?[]:lr(n)}function lr(e){let t=[],n;for(let r of e.split("\0")){if(r===""){n&&t.push(n),n=void 0;continue}let i=r.indexOf(" "),o=i<0?r:r.slice(0,i),s=i<0?"":r.slice(i+1);if(o==="worktree"){n&&t.push(n),n={path:w(s),detached:!1,bare:!1,prunable:!1,locked:!1};continue}n&&(o==="HEAD"?n.head=s:o==="branch"?n.branch=s:o==="detached"?n.detached=!0:o==="bare"?n.bare=!0:o==="prunable"?n.prunable=!0:o==="locked"&&(n.locked=!0))}return n&&t.push(n),t}function yo(e,t,n=v){return ke(n.run(e,t))}function ae(e,t){return nr(t)?t:ue(e,t)}function w(e){try{return er(e)}catch{return ue(e)}}function Re(e,t){return Vn("sha256").update(`${e}\0${t}`).digest("hex").slice(0,24)}function ke(e){return e?.trim()||void 0}function wt(e,t){let n=Xn("git",["-C",e,...t],{encoding:"utf-8",env:{...process.env,LC_ALL:"C"},maxBuffer:52428800,stdio:["ignore","pipe","pipe"],timeout:3e4,killSignal:"SIGKILL"});if(n.status===0)return{kind:"success",output:n.stdout.trimEnd()};let i=(typeof n.stderr=="string"?n.stderr.trim():"")||n.error?.message||`git exited with status ${n.status??"unknown"}`,o=n.error?.code;return(/not a git repository/i.test(i)||o==="ENOENT"&&Qn(ue(e)))&&!fr(e)?{kind:"not-repository"}:{kind:"error",message:i}}function fr(e){if(process.env.GIT_DIR||process.env.GIT_COMMON_DIR)return!0;let t=ue(e);for(;;){try{return Zn(rr(t,".git")),!0}catch(r){let i=r.code;if(i!=="ENOENT"&&i!=="ENOTDIR")return!0}let n=tr(t);if(n===t)return!1;t=n}}import{execFileSync as Qr}from"child_process";import{isUtf8 as sn}from"buffer";import{createHash as He}from"crypto";import{closeSync as un,fstatSync as q,lstatSync as Ue,openSync as ln,readdirSync as Zr,readFileSync as ei,readSync as cn,readlinkSync as ti,realpathSync as Y}from"fs";import{isAbsolute as ni,join as Je,relative as ri,resolve as ii,sep as oi}from"path";function fe(e,t,n=[]){let r=ve(e);if(_t.has(r)||n.some(o=>le(r,o))||t.some(o=>Bt(r,o)))return"config";if(t.some(Lt)&&/\.d\.(?:ts|mts|cts)$/.test(r.toLowerCase()))return"ambient";let i=Dt(r);return t.some(o=>(At[o]??[]).includes(i))?"source":"other"}function Ot(e,t,n){let r=ve(e);if(_t.has(r)||n?.some(o=>le(r,o))||Bt(r,t)||Lt(t)&&/\.d\.(?:ts|mts|cts)$/.test(r.toLowerCase()))return!0;let i=Dt(r);return(At[t]??[]).includes(i)}function bo(e){if(typeof e!="object"||e===null)return null;let t=e;return typeof t.version!="number"||!It(t.languages)||typeof t.pnpmWorkspaces!="boolean"||typeof t.typescriptProjectMode!="string"||!It(t.typescriptProjects)||t.clojureConfigPath!==void 0&&typeof t.clojureConfigPath!="string"||!Array.isArray(t.files)||!t.files.every(pr)?null:t}function Et(e){return{...e,files:e.files.map(({semanticHash:t,...n})=>n)}}function Po(e,t){return!e||!t?e===t:JSON.stringify(Et(e))===JSON.stringify(Et(t))}function jo(e,t){let n=new Map((e?.files??[]).map(c=>[c.path,c])),r=new Map(t.files.map(c=>[c.path,c])),i=new Set([...n.keys(),...r.keys()]),o=[];for(let c of[...i].sort()){let a=n.get(c),u=r.get(c),f=fe(c,t.languages);!a&&u?o.push({kind:"added",path:c,inputKind:f,after:u}):a&&!u?o.push({kind:"deleted",path:c,inputKind:f,before:a}):a&&u&&(a.hash!==u.hash||a.size!==u.size)&&o.push({kind:"modified",path:c,inputKind:f,before:a,after:u})}let s=new Set;return e||s.add("prior-snapshot-unavailable"),e&&e.version!==t.version&&s.add("snapshot-version-changed"),(Rt(e?.files??[])||Rt(t.files))&&s.add("duplicate-input-path"),[...e?.files??[],...t.files].some(dr)&&s.add("unreadable-input"),{version:1,changes:o,projectIdentityChanged:e?!gr(e,t):!0,uncertainty:[...s].sort()}}function It(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function Rt(e){return new Set(e.map(t=>t.path)).size!==e.length}function pr(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.path=="string"&&typeof t.size=="number"&&Number.isFinite(t.size)&&typeof t.hash=="string"&&(t.semanticHash===void 0||typeof t.semanticHash=="string")}function dr(e){return e.hash==="unreadable"||e.size<0}function gr(e,t){return vt(e.languages,t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&vt(e.typescriptProjects,t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function vt(e,t){if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((i,o)=>i===r[o])}var _t=new Set([".scipquery.json"]),hr={typescript:["tsconfig.json"],javascript:["package.json"],java:["pom.xml","build.gradle"],scala:["build.sbt"],kotlin:["build.gradle.kts"],rust:["Cargo.toml"],python:["pyproject.toml","setup.py"],ruby:["Gemfile"],go:["go.mod"],cpp:["CMakeLists.txt","Makefile"],c:["CMakeLists.txt","Makefile"],csharp:["*.csproj","*.sln"],vb:["*.vbproj","*.sln"],dart:["pubspec.yaml"],php:["composer.json"],clojure:["deps.edn","project.clj","bb.edn","shadow-cljs.edn"]},mr={typescript:["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","tsconfig.*.json","jsconfig.json","jsconfig.*.json"],javascript:["package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb","tsconfig.json","tsconfig.*.json","jsconfig.json","jsconfig.*.json"],java:["build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","gradle.lockfile","gradle-wrapper.properties"],scala:["plugins.sbt","build.properties"],kotlin:["pom.xml","build.gradle","settings.gradle","settings.gradle.kts","gradle.properties","gradle.lockfile","gradle-wrapper.properties"],rust:["Cargo.lock","rust-project.json","rust-toolchain","rust-toolchain.toml"],python:["setup.cfg","requirements*.txt","Pipfile","Pipfile.lock","poetry.lock","uv.lock"],ruby:["Gemfile.lock","gems.locked"],go:["go.sum","go.work","go.work.sum"],cpp:["compile_commands.json"],c:["compile_commands.json"],csharp:["Directory.Build.props","Directory.Build.targets","Directory.Packages.props","packages.lock.json","NuGet.Config","global.json"],vb:["Directory.Build.props","Directory.Build.targets","Directory.Packages.props","packages.lock.json","NuGet.Config","global.json"],dart:["pubspec.lock","analysis_options.yaml"],php:["composer.lock"],clojure:[]},Tt=new Map;function Bt(e,t){return hr[t].some(n=>le(e,n))||mr[t].some(n=>le(e,n))}function le(e,t){let n=ve(t).replace(/^\.\//,"");if(!n)return!1;let r=e.split("/").at(-1)??e,i=n.includes("/")?e:r;if(!n.includes("*")&&!n.includes("?"))return i===n;let o=Tt.get(n);if(!o){let s=n.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]");o=new RegExp(`^${s}$`),Tt.set(n,o)}return o.test(i)}function ve(e){return e.replaceAll("\\","/").replace(/^\.\//,"")}function Dt(e){return e.includes(".")?`.${e.split(".").at(-1).toLowerCase()}`:""}function Lt(e){return e==="typescript"||e==="javascript"}var At={typescript:[".ts",".tsx",".mts",".cts"],javascript:[".js",".jsx",".mjs",".cjs",".vue"],java:[".java"],scala:[".scala"],kotlin:[".kt",".kts"],rust:[".rs"],python:[".py",".pyi"],ruby:[".rb"],go:[".go"],cpp:[".cc",".cpp",".cxx",".hpp",".hh",".hxx"],c:[".c",".h"],csharp:[".cs"],vb:[".vb"],dart:[".dart"],php:[".php"],clojure:[".clj",".cljs",".cljc"]};import{AsyncLocalStorage as yr}from"async_hooks";var Sr=new yr;function O(e,t){let n=pe(e);if(!n||n.missing.has(t))return;let r=n.files.get(t);if(r)return r;let i=n.readBaseFile?.(t);return i&&n.files.set(t,i),i}function _(e,t){let n=pe(e);if(n)return n.missing.has(t)?"missing":n.paths.includes(t)?"present":"missing"}function Nt(e,t){return pe(e)?.fingerprints.get(t)}function B(e){return pe(e)?.paths}function pe(e){let t=Sr.getStore();if(t)return t.projectRoot===w(e)?t:void 0}import{createRequire as br}from"module";import{existsSync as Pr,lstatSync as Gt,readdirSync as jr,statSync as xr}from"fs";import p from"path";var Fr=br(import.meta.url),Mt=new Set([".cache",".git",".next",".nuxt",".turbo",".nx","build","coverage","dist","node_modules","tmp","vendor"]),Cr=18003;function de(e,t=[]){let n=p.resolve(e),r=t.flatMap(a=>kr(n,a));if(r.length>0)return zt(n,Ht(r));let i=wr(n),o=Ht(i),s=Er(n,o)?[n,...o]:o,c=s.length>0?s:[n];return zt(n,c)}function $t(e){return new Set(e.map(t=>t==="."?"tsconfig.json":`${t.replace(/\/$/u,"")}/tsconfig.json`))}function Ut(e){let t=e.split("/").at(-1)?.toLowerCase();return t?.startsWith("tsconfig")===!0&&t.endsWith(".json")}function Jt(e,t,n=[]){let r;try{r=Fr("@ts-morph/common/dist/typescript.js")}catch{return null}let i=p.resolve(e),o=t==="workspace"?de(i,n):["."],s=new Set;for(let c of o){let a=c==="."?i:p.join(i,c),u=p.join(a,"tsconfig.json"),f=Rr(r,i);if(!f.fileExists(u))return null;let l=r.readConfigFile(u,f.readFile);if(l.error)return null;let d=r.parseJsonConfigFileContent(l.config,f,a);if(d.errors.some(m=>m.code!==Cr))return null;for(let m of d.fileNames){let h=p.resolve(m);b(i,h)&&s.add(p.relative(i,h).split(p.sep).join("/"))}}return s}function Oo(e,t,n,r){let i=p.resolve(e),o=new Set(r);for(let c of n){let a=p.resolve(i,c);if(b(i,a))try{let u=Gt(a);if(u.isSymbolicLink()||u.isFile()&&!o.has(D(i,a)))return!1}catch{}}let s=t==="workspace"?de(i,n):["."];for(let c of s){let a=c==="."?i:p.join(i,c),u=p.join(a,"tsconfig.json");if(!Kt(i,u))continue;let f=D(i,u);if(!o.has(f))return!1;try{if(Gt(u).isSymbolicLink())return!1;let l=Yt(i,u);if(l.includes("extends")||l.includes("\\"))return!1}catch{return!1}}return!0}function zt(e,t){return[...new Set(t.map(n=>D(e,n)))].sort((n,r)=>n.localeCompare(r))}function wr(e){let t=B(e);if(t)return t.flatMap(i=>{if(i.split("/").some(s=>Mt.has(s)))return[];let o=p.join(e,...i.split("/"));return Wt(e,o)?[p.dirname(o)]:[]});let n=[],r=[e];for(;r.length>0;){let i=r.pop(),o;try{o=jr(i,{withFileTypes:!0})}catch{continue}for(let s of o){let c=p.join(i,s.name);if(s.isDirectory()){!Mt.has(s.name)&&!s.name.startsWith(".")&&r.push(c);continue}s.isFile()&&Wt(e,c)&&n.push(p.dirname(c))}}return n}function kr(e,t){let n=t.trim();if(!n)return[];let r=p.resolve(e,n);if(!b(e,r))return[];let i=B(e);if(i){let o=D(e,r);if(i.includes(o)&&Te(p.basename(r)))return[p.dirname(r)];let s=o==="."?"":`${o}/`;return i.some(c=>c.startsWith(s))?[r]:[]}try{let o=xr(r);if(o.isDirectory())return[r];if(o.isFile()&&Te(p.basename(r)))return[p.dirname(r)]}catch{return[]}return[]}function Wt(e,t){if(!Te(p.basename(t)))return!1;let n=qt(e,t);return n?p.basename(t)==="tsconfig.json"||"include"in n||"files"in n||"references"in n:!1}function Te(e){return e.startsWith("tsconfig")&&e.endsWith(".json")}function Ht(e){let t=[...new Set(e.map(n=>p.resolve(n)))].sort((n,r)=>n.localeCompare(r));return t.length<=1?t:t.filter(n=>!t.some(r=>r!==n&&Tr(n,r)))}function Er(e,t){if(t.length===0||t.some(r=>p.resolve(r)===e))return!1;let n=p.join(e,"tsconfig.json");return Kt(e,n)&&Ir(e,n)}function Ir(e,t){let r=qt(e,t)?.include;return Array.isArray(r)?r.some(i=>typeof i=="string"&&i.trim()!==""&&!i.startsWith("!")&&(i.includes("/")||i.includes("**")||!p.extname(i))):!1}function qt(e,t){try{let n=JSON.parse(Yt(e,t));return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function Kt(e,t){let n=D(e,t),r=_(e,n);return r?r==="present":Pr(t)}function Yt(e,t){let n=D(e,t);if(B(e)){let i=O(e,n);if(!i)throw Object.assign(new Error(`Snapshot file ${n} is missing.`),{code:"ENOENT"});return i.content.toString("utf8")}return H(t,"TypeScript project config")}function Rr(e,t){let n=B(t);if(!n)return e.sys;let r=p.resolve(t),i=new Set(n),o=vr(r,n),s=e,c=a=>{let u=p.resolve(a);return b(r,u)?D(r,u):null};return{useCaseSensitiveFileNames:e.sys.useCaseSensitiveFileNames,fileExists(a){let u=c(a);return u===null?e.sys.fileExists(a):i.has(u)},readFile(a){let u=c(a);return u===null?e.sys.readFile(a):O(r,u)?.content.toString("utf8")},readDirectory(a,u,f,l,d){let m=p.resolve(a);return b(r,m)?s.matchFiles(m,u,f,l,e.sys.useCaseSensitiveFileNames,r,d,h=>o.get(p.resolve(h))??{files:[],directories:[]},h=>h):e.sys.readDirectory(a,u,f,l,d)}}}function vr(e,t){let n=new Map,r=new Map,i=o=>{n.has(o)||n.set(o,new Set),r.has(o)||r.set(o,new Set)};i(e);for(let o of t){let s=o.split("/"),c=e;for(let a=0;a<s.length-1;a+=1){let u=s[a];i(c),r.get(c).add(u),c=p.join(c,u),i(c)}n.get(c).add(s.at(-1))}return new Map([...n].map(([o,s])=>[o,{files:[...s].sort(),directories:[...r.get(o)??[]].sort()}]))}function D(e,t){let n=p.relative(e,t);return n?n.split(p.sep).join("/"):"."}function Tr(e,t){let n=p.relative(e,t);return!!n&&!n.startsWith("..")&&!p.isAbsolute(n)}import{createHash as Be}from"crypto";import{execFileSync as Xt}from"child_process";import{createRequire as Or}from"module";var _r=Or(import.meta.url),Br=/\.(?:[cm]?[jt]sx?)$/iu,Dr=/\.[jt]sx$/iu,Vt=/(?:^|\/)package\.json$/iu,J,Oe=new Map;function Qt(e,t){if(!De(e))return;let n=Lr();if(n)try{let r=typeof t=="string"?t:t.toString("utf8"),i=Dr.test(e)?n.LanguageVariant.JSX:n.LanguageVariant.Standard,o=n.createScanner(n.ScriptTarget.Latest,!1,i,r),s=Be("sha256").update(`typescript-semantic-v1\0${i}\0`),c=!1,a=!1;for(;;){let u=o.scan();if(u===n.SyntaxKind.EndOfFileToken)break;if(u===n.SyntaxKind.WhitespaceTrivia)continue;if(u===n.SyntaxKind.NewLineTrivia){c&&(a=!0);continue}a&&s.update("line-break\0");let f=o.getTokenText();s.update(`${u}\0${Buffer.byteLength(f)}\0`).update(f).update("\0"),c=!0,a=!1}return s.digest("hex")}catch{return}}function De(e){return Br.test(e)}function Le(e,t){if(Vt.test(e))try{let n=JSON.parse(typeof t=="string"?t:t.toString("utf8"));if(typeof n!="object"||n===null||Array.isArray(n))return;let{scripts:r,...i}=n;return Be("sha256").update("typescript-package-json-v1\0").update(_e(i)).digest("hex")}catch{return}}function Ae(e){return Vt.test(e)}function Ao(e,t,n){if(!Ae(t)||!/^[a-f0-9]{64}$/u.test(n))return;let r=`${e}\0${t}\0${n}`;if(Oe.has(r))return Oe.get(r);let i;try{let o=Xt("git",["-C",e,"log","--all","--format=%H","--max-count=64","--",t],{encoding:"utf8",maxBuffer:1048576,timeout:5e3}).split(/\r?\n/u).filter(Boolean);for(let s of o){let c=Xt("git",["-C",e,"show",`${s}:${t}`],{encoding:null,maxBuffer:4194304,timeout:5e3});if(Be("sha256").update(c).digest("hex")===n){i=Le(t,c);break}}}catch{i=void 0}return Oe.set(r,i),i}function Lr(){if(J!==void 0)return J;try{J=_r("typescript")}catch{J=null}return J}function _e(e){return Array.isArray(e)?`[${e.map(_e).join(",")}]`:typeof e=="object"&&e!==null?`{${Object.entries(e).sort(([t],[n])=>t.localeCompare(n)).map(([t,n])=>`${JSON.stringify(t)}:${_e(n)}`).join(",")}}`:JSON.stringify(e)}import{closeSync as Zt,existsSync as Ge,openSync as Ar,realpathSync as Nr,renameSync as Gr,unlinkSync as en,writeSync as Mr}from"fs";import{dirname as zr,join as Wr}from"path";var Hr="fingerprint-stat-cache.json",tn=1,$r=8*1024*1024,Ne=new Map;function Me(e,t,n,r){let i=nn(e),o=i.files.get(t);if(!(!o||!rn(o,n,r)))return i.hits+=1,{hash:o.hash,size:o.fingerprintSize,...o.semanticHash===void 0?{}:{semanticHash:o.semanticHash}}}function ze(e,t,n,r,i){if(i.hash==="unreadable"||i.size<0||!Number.isFinite(i.size))return;let o=nn(e),s={kind:n,dev:r.dev,ino:r.ino,mtimeMs:r.mtimeMs,ctimeMs:r.ctimeMs,size:r.size,hash:i.hash,fingerprintSize:i.size,...i.semanticHash===void 0?{}:{semanticHash:i.semanticHash}},c=o.files.get(t);c&&Xr(c,s)||(o.files.set(t,s),o.stores+=1,o.dirty=!0)}function We(e){let t=Ne.get(on(e));if(!(!t?.dirty||!t.cachePath))try{let n=zr(t.cachePath);if(!Ge(n))return;Vr(t.cachePath,qr(t)),t.dirty=!1}catch{}}function nn(e){let t=on(e),n=Ne.get(t);if(n)return n;let r=Ur(t),i=Jr(r),o={cachePath:r,files:i,dirty:!1,hits:0,stores:0};return Ne.set(t,o),o}function Ur(e){try{let t=xe(e);return Ge(t)?Wr(t,Hr):null}catch{return null}}function Jr(e){let t=new Map;if(!e||!Ge(e))return t;try{let n=JSON.parse(ne(e,{inputKind:"fingerprint stat cache",maxBytes:$r}).toString("utf8"));if(!Kr(n))return t;for(let[r,i]of Object.entries(n.files))i&&t.set(r,i)}catch{return t}return t}function qr(e){return{version:tn,files:Object.fromEntries(e.files)}}function Kr(e){if(typeof e!="object"||e===null)return!1;let t=e;return t.version!==tn||typeof t.files!="object"||t.files===null?!1:Object.values(t.files).every(Yr)}function Yr(e){if(typeof e!="object"||e===null)return!1;let t=e;return(t.kind==="file"||t.kind==="symlink")&&Number.isFinite(t.dev)&&Number.isFinite(t.ino)&&Number.isFinite(t.mtimeMs)&&Number.isFinite(t.ctimeMs)&&Number.isFinite(t.size)&&Number.isFinite(t.fingerprintSize)&&typeof t.hash=="string"&&t.hash!=="unreadable"&&(t.semanticHash===void 0||typeof t.semanticHash=="string")}function rn(e,t,n){return e.kind===t&&e.dev===n.dev&&e.ino===n.ino&&e.mtimeMs===n.mtimeMs&&e.ctimeMs===n.ctimeMs&&e.size===n.size}function Xr(e,t){return rn(e,t.kind,t)&&e.hash===t.hash&&e.fingerprintSize===t.fingerprintSize&&e.semanticHash===t.semanticHash}function Vr(e,t){let n=`${e}.${process.pid}.tmp`;try{en(n)}catch{}let r=Buffer.from(`${JSON.stringify(t)}
4
+ `,"utf8"),i=Ar(n,"wx",384);try{Q(i,r,{writeFile:(o,s,c,a)=>Mr(o,s,c,a)},"fingerprint stat cache")}catch(o){throw Zt(i),en(n),o}Zt(i),Gr(n,e)}function on(e){return Nr(e)}var X=64*1024*1024,si=1024*1024,ci=1024,A=class extends Error{constructor(n,r,i,o){super(`${n} ${JSON.stringify(r)} is ${i} bytes; the safety limit is ${o} bytes`);this.inputKind=n;this.inputPath=r;this.observedBytes=i;this.limitBytes=o;this.name="InputTooLargeError"}inputKind;inputPath;observedBytes;limitBytes;code="SCIP_QUERY_INPUT_TOO_LARGE"};function ai(e){return[...new Set((e??[]).map(t=>t.trim()).filter(Boolean))].sort((t,n)=>t.localeCompare(n))}function qe(e,t,n={}){let r=E(t),i=bt(e,()=>Y(e)),o=ii(i,...r.split("/"));if(!b(i,o)||o===i)throw new g(t,"outside-project");let s=Y(o);if(!b(i,s)||s===i)throw new g(t,"outside-project");let c=Ue(s);if(!c.isFile())throw new g(t,"not-a-file");let a={projectRoot:i,relativePath:r,absolutePath:s,size:c.size,mtimeMs:c.mtimeMs,device:c.dev,inode:c.ino},u=n.maxBytes??X;if(T(u),a.size>u)throw new A(n.inputKind??"project file",a.relativePath,a.size,u);return a}function ui(e,t,n={}){let r=E(t),i=_(e,r);if(i){if(i==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(r)} does not exist.`),{code:"ENOENT"});let a=O(e,r);if(!a)throw new g(r,"changed-during-read");let u=n.maxBytes??X;if(T(u),a.size>u)throw new A(n.inputKind??"project file",r,a.size,u);return Buffer.from(a.content)}let o=qe(e,t,n),s=n.maxBytes??X,c=ln(o.absolutePath,"r");try{let a=q(c);if(K(a,o,t),a.size>s)throw new A(n.inputKind??"project file",o.relativePath,a.size,s);let u=ei(c),f=q(c);if(K(f,o,t),u.byteLength!==a.size)throw new g(t,"changed-during-read");return u}finally{un(c)}}function is(e,t,n,r={}){if(n.byteLength===0)throw new Error("Project file probe literal must not be empty.");let{matchedLiteralIndexes:i,...o}=li(e,t,[n],r);return{...o,includesLiteral:i.length>0}}function li(e,t,n,r={}){if(n.length===0||n.some(a=>a.byteLength===0))throw new Error("Project file probe literals must not be empty.");let i=E(t),o=_(e,i);if(o){if(o==="missing")throw Object.assign(new Error(`Snapshot project file ${JSON.stringify(i)} does not exist.`),{code:"ENOENT"});let a=O(e,i);if(!a)throw new g(i,"changed-during-read");let u=r.maxBytes??X;if(T(u),a.size>u)throw new A(r.inputKind??"project file",i,a.size,u);let f=!a.content.includes(0)&&sn(a.content),l=n.map(an),d=f?pi(a.content,n,l):[];return{byteLength:a.size,isUtf8Text:f,matchedLiteralIndexes:d,bytes:d.length>0?Buffer.from(a.content):null,...r.computeSha256?{sha256:a.sha256}:{}}}let s=qe(e,t,r),c=ln(s.absolutePath,"r");try{let a=q(c);K(a,s,t);let u=r.computeSha256?He("sha256"):null,f=r.scratchBuffer??Buffer.allocUnsafe(si);if(f.byteLength===0)throw new Error("Project file probe scratch buffer must not be empty.");let l=0,d=n.map(()=>!1),m=!1,h=!0,P=Buffer.alloc(0),V=n.map(()=>Buffer.alloc(0)),N=n.map(an);for(;l<a.size;){let j=cn(c,f,0,Math.min(f.byteLength,a.size-l),l);if(j<=0)throw new g(t,"changed-during-read");let x=f.subarray(0,j);if(u?.update(x),m||=x.includes(0),h){let S=P.byteLength>0?Buffer.concat([P,x]):x,z=fi(S);h=sn(S.subarray(0,z)),P=Buffer.from(S.subarray(z))}for(let S=0;S<n.length;S+=1){if(d[S])continue;let z=n[S],Xe=V[S];d[S]=di(x,z,Xe,N[S]),V[S]=gi(x,z,Xe)}l+=j}h&&=P.byteLength===0,K(q(c),s,t);let G=!m&&h,M=G?d.flatMap((j,x)=>j?[x]:[]):[],k=null;if(M.length>0){k=Buffer.allocUnsafe(a.size);let j=0;for(;j<k.byteLength;){let x=cn(c,k,j,k.byteLength-j,j);if(x<=0)throw new g(t,"changed-during-read");j+=x}K(q(c),s,t)}return{byteLength:a.size,isUtf8Text:G,matchedLiteralIndexes:M,bytes:k,...u?{sha256:u.digest("hex")}:{}}}finally{un(c)}}function os(e,t,n={}){return ui(e,t,n).toString("utf8")}function K(e,t,n){if(!e.isFile()||e.dev!==t.device||e.ino!==t.inode||e.size!==t.size)throw new g(n,"changed-during-read")}function fi(e){if(e.byteLength===0)return 0;let t=e.byteLength-1,n=0;for(;t>=0&&n<3&&(e[t]&192)===128;)n+=1,t-=1;if(t<0)return e.byteLength;let r=e[t];return((r&128)===0?1:(r&224)===192?2:(r&240)===224?3:(r&248)===240?4:0)>e.byteLength-t?t:e.byteLength}function pi(e,t,n){return t.flatMap((r,i)=>$e(e,r,n[i])?[i]:[])}function di(e,t,n,r){if($e(e,t,r))return!0;if(n.byteLength===0||t.byteLength===1)return!1;let i=e.subarray(0,Math.min(e.byteLength,t.byteLength-1));return $e(Buffer.concat([n,i]),t,r)}function $e(e,t,n){if(n<0)return e.includes(t);let r=t[n],i=e.indexOf(r),o=0;for(;i>=0;){if(o+=1,o>ci)return e.includes(t);let s=i-n;if(s>=0&&s+t.byteLength<=e.byteLength&&e.compare(t,0,t.byteLength,s,s+t.byteLength)===0)return!0;i=e.indexOf(r,i+1)}return!1}function an(e){for(let n=1;n<e.byteLength;n+=1){let r=e[n];if(r>=65&&r<=90)return n}let t=e[0];return t>=65&&t<=90?0:-1}function gi(e,t,n){let r=t.byteLength-1;if(r===0)return Buffer.alloc(0);if(e.byteLength>=r)return Buffer.from(e.subarray(e.byteLength-r));let i=Buffer.concat([n,e]);return Buffer.from(i.subarray(Math.max(0,i.byteLength-r)))}function Ke(e){return typeof e=="object"&&e!==null&&"code"in e&&(e.code==="ENOENT"||e.code==="ENOTDIR")}function ss(e,t){try{return qe(e,t),!0}catch(n){if(Ke(n))return!1;throw n}}function hi(e){let t=B(e);return t?t.filter(n=>n&&!he(n)).sort():(ji(e)??xi(e)).filter(n=>n&&!he(n)).sort()}function mi(e,t={}){let n=(t.includePaths??[]).map(E),r=[...new Set([...hi(e),...n])].filter(s=>!he(s)).filter(s=>!t.language||Ot(s,t.language,t.markerFiles)).filter(s=>!t.includePath||t.includePath(s)).sort((s,c)=>s.localeCompare(c)),i=Y(e),o=r.flatMap(s=>fn(e,i,s));return We(i),o}function fn(e,t,n){let r=Nt(e,n);if(r)return[{path:n,size:r.fingerprintSize??r.size,hash:r.sha256}];if(_(e,n)==="present"){let o=O(e,n);if(o)return[{path:n,size:o.fingerprintSize??o.size,hash:o.sha256}]}let i=Je(e,n);try{let o=Ue(i);if(o.isSymbolicLink()){let P=Me(t,n,"symlink",ge(o));if(P)return[{path:n,size:P.size,hash:P.hash}];let V=Y(i),N=ri(t,V);if(N===".."||N.startsWith(`..${oi}`)||ni(N))throw new Error("external symlink");let G=ti(i),M=He("sha256").update("symlink\0").update(G).digest("hex"),k=Buffer.byteLength(G);return ze(t,n,"symlink",ge(o),{hash:M,size:k}),[{path:n,size:k,hash:M}]}let s=De(n)||Ae(n),c=Me(t,n,"file",ge(o));if(c&&(!s||c.semanticHash!==void 0))return[{path:n,size:c.size,hash:c.hash,...c.semanticHash===void 0?{}:{semanticHash:c.semanticHash}}];let a=He("sha256"),u=s,f=[],l=re(i,{inputKind:"project fingerprint input",maxBytes:X},P=>{a.update(P),u&&f.push(Buffer.from(P))}),d=a.digest("hex"),m=u?Buffer.concat(f,l):void 0,h=m?Qt(n,m)??Le(n,m):void 0;return ze(t,n,"file",ge(o),{hash:d,size:l,...h===void 0?{}:{semanticHash:h}}),[{path:n,size:l,hash:d,...h===void 0?{}:{semanticHash:h}}]}catch(o){return Ke(o)?[]:[{path:n,size:-1,hash:"unreadable"}]}}function ge(e){return{dev:e.dev,ino:e.ino,mtimeMs:e.mtimeMs,ctimeMs:e.ctimeMs,size:e.size}}function pn(e,t,n){let r=Ye(t,n),i=[...r.typescriptProjects.filter(a=>bi(e,a)),...r.clojureConfigPath?[r.clojureConfigPath]:[]],o=r.languages.includes("typescript")?Jt(e,r.typescriptProjectMode,r.typescriptProjects):null,s=r.languages.includes("typescript")?r.typescriptProjectMode==="workspace"?de(e,r.typescriptProjects):["."]:[],c=$t(s);return{...r,files:mi(e,{includePath:a=>{if(a===".scipquery.json")return!1;let u=fe(a,t,i);return u==="other"||u==="config"&&Ut(a)&&!c.has(a)?!1:u!=="source"||!Si(a)||!o?!0:o.has(a)},includePaths:i})}}function cs(e,t){let n=new Set(t.files.map(o=>o.path)),r=pn(e,t.languages,t),i=new Map(r.files.map(o=>[o.path,o]));return{...Ye(t.languages,t),files:[...t.files.flatMap(o=>{let s=i.get(o.path);return s?[s]:[]}),...r.files.filter(o=>!n.has(o.path))]}}function as(e,t,n,r,i,o){let s=l=>({mode:"full",fingerprint:pn(e,t,n),reason:l});if(!i)return s("change-journal-unavailable");if(!i.complete)return s(`change-journal-incomplete:${i.incompleteReason??"unknown"}`);if(!o)return s("accepted-generation-unavailable");if(i.baseGeneration!==o)return s("change-journal-base-mismatch");if(!r)return s("prior-project-input-snapshot-unavailable");let c=Ye(t,n);if(!yi(r,c))return s("project-input-configuration-changed");if(new Set(r.files.map(l=>l.path)).size!==r.files.length)return s("prior-project-input-snapshot-has-duplicate-paths");if(i.entries.length===0)return{mode:"delta",fingerprint:{...c,files:[...r.files].sort((l,d)=>l.path.localeCompare(d.path))},changedPaths:[]};let a=[...c.typescriptProjects,...c.clojureConfigPath?[c.clojureConfigPath]:[]],u=new Map(r.files.map(l=>[l.path,l]));for(let l of i.entries){let d=u.get(l.path);if(fe(l.path,t,a)!=="source")return s("non-source-project-input-changed");if(l.kind==="add"&&d)return s("added-path-already-in-prior-project-input-snapshot");if(l.kind==="delete"&&!d)return s("deleted-path-not-in-prior-project-input-snapshot");if(l.kind==="change"&&!d)return s("changed-path-not-in-prior-project-input-snapshot");if(d&&(d.hash==="unreadable"||d.size<0))return s("changed-path-was-unreadable")}let f=Y(e);for(let l of i.entries){let d=fn(e,f,l.path);if(l.kind==="delete"){if(d.length!==0)return s("deleted-source-is-still-readable");u.delete(l.path);continue}if(d.length!==1||d[0].hash==="unreadable"||d[0].size<0)return s(l.kind==="add"?"added-source-is-not-readable":"changed-source-no-longer-readable");u.set(l.path,d[0])}return We(f),{mode:"delta",fingerprint:{...c,files:[...u.values()].sort((l,d)=>l.path.localeCompare(d.path))},changedPaths:i.entries.map(l=>l.path).sort()}}function yi(e,t){return e.version===t.version&&JSON.stringify([...e.languages].sort())===JSON.stringify(t.languages)&&e.pnpmWorkspaces===t.pnpmWorkspaces&&e.typescriptProjectMode===t.typescriptProjectMode&&JSON.stringify([...e.typescriptProjects].sort())===JSON.stringify(t.typescriptProjects)&&e.clojureConfigPath===t.clojureConfigPath}function Si(e){return/\.(?:[cm]?[jt]sx?|vue)$/iu.test(e)}function bi(e,t){let n;try{n=E(t)}catch{return!1}let r=_(e,n);if(r)return r==="present";try{return Ue(Je(e,n)).isFile()}catch(i){if(Ke(i))return!1;throw i}}function Ye(e,t){return{version:3,languages:[...e].sort(),pnpmWorkspaces:t.typescriptProjectMode!=="workspace"&&t.pnpmWorkspaces===!0,typescriptProjectMode:t.typescriptProjectMode??"single",typescriptProjects:ai(t.typescriptProjects),clojureConfigPath:Pi(t.clojureConfigPath)}}function Pi(e){return e?.trim()||void 0}function ji(e){try{let t=jt(e,52428800,()=>Qr("git",["-C",e,"ls-files","-co","-v","-z","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:104857600,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}));return[...Ft(t)]}catch{return null}}function xi(e){let t=[],n=[""];for(;n.length>0;){let r=n.pop(),i=r?Je(e,r):e,o;try{o=Zr(i,{withFileTypes:!0})}catch{continue}for(let s of o){let c=r?`${r}/${s.name}`:s.name;if(s.isDirectory()){he(c)||n.push(c);continue}t.push(c)}}return t}function he(e){let t=e.split("/");return e==="meta.json"||t[0]===".scipquery"&&(t[1]==="events"||t[1]==="ledger"||t[1]==="releases"||t[1]==="suppressions")||t.some(n=>Fi.has(n))||e.endsWith(".db")||e.endsWith(".db-wal")||e.endsWith(".db-shm")||e.endsWith(".scip")}var Fi=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);export{nt as a,Cn as b,wn as c,kn as d,I as e,ne as f,rt as g,H as h,En as i,re as j,In as k,fe as l,Ot as m,bo as n,Et as o,Po as p,jo as q,pr as r,hr as s,Q as t,ye as u,W as v,Ze as w,Z as x,ee as y,g as z,me as A,wi as B,ki as C,b as D,E,et as F,xe as G,dt as H,An as I,Qi as J,Zi as K,eo as L,to as M,no as N,Ao as O,jt as P,Ft as Q,v as R,po as S,go as T,ho as U,ur as V,mo as W,yo as X,ae as Y,w as Z,de as _,$t as $,Ut as aa,Jt as ba,Oo as ca,A as da,ai as ea,qe as fa,ui as ga,is as ha,li as ia,os as ja,Ke as ka,ss as la,hi as ma,mi as na,pn as oa,cs as pa,as as qa,Ye as ra};
5
+ //# sourceMappingURL=chunk-XIPGCT3D.js.map
@@ -0,0 +1,16 @@
1
+ import{c as g}from"./chunk-NODZYYGC.js";import{a as y}from"./chunk-7MUHSZGN.js";import{d as p}from"./chunk-7Z4GMCHM.js";import{b as h,f as l,h as d}from"./chunk-6LS3IG2I.js";import{C as b}from"./chunk-C7WSQA6A.js";import{ua as u,va as f}from"./chunk-WEXQYJY3.js";function T(t,e,s={}){let n=y(t,e);if(!n)return null;let o=new g(t),a=L(t,n),r=n.endLine-n.startLine+1,m=o.calleeMap([n],{additive:!0,semantic:s.semantic}).get(n.symbolId)??[],c=new Set(m.map(B=>B.symbol));return{symbol:n.symbol,shortName:p(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:r,branches:a.branches,estimateBasis:a.estimateBasis,cyclomaticEstimate:a.branches+1,calleeCount:c.size,fanIn:N(t,n.symbolId),fanOut:w(m,n.relativePath)}}function L(t,e){let s=b(t,e.relativePath);if(s){let n=d(s.rootNode,e.startLine,e.endLine);if(n)return{branches:M(n),estimateBasis:"ast"}}return{branches:E(_(t,e.relativePath,e.startLine,e.endLine),S(t,e.relativePath)),estimateBasis:"regex-fallback"}}function j(t,e){let s=new Map,n=new Map;for(let o of e){let a=n.get(o.relativePath)??[];a.push(o),n.set(o.relativePath,a)}for(let[o,a]of n){let r=b(t,o),i=r===null?[]:a.filter(c=>r.rootNode.startPosition.row<=c.startLine&&r.rootNode.endPosition.row>=c.endLine),m=new Set(i.map(c=>c.symbolId));if(r&&i.length>0){for(let c of i)s.set(c.symbolId,{branches:0,estimateBasis:"ast"});v(r.rootNode,i,s)}for(let c of a)m.has(c.symbolId)||s.set(c.symbolId,P(t,c))}return s}function P(t,e){return{branches:E(_(t,e.relativePath,e.startLine,e.endLine),S(t,e.relativePath)),estimateBasis:"regex-fallback"}}function S(t,e){return t.get("SELECT language FROM documents WHERE relative_path = ?",e)?.language??"unknown"}function _(t,e,s,n){try{return u(t.config.projectRoot,e,{inputKind:"indexed source file"}).split(`
2
+ `).slice(s,n+1).join(`
3
+ `)}catch(o){if(!f(o))throw o;return""}}function N(t,e){return t.get(`SELECT COUNT(DISTINCT c.document_id) AS c
4
+ FROM mentions m
5
+ JOIN chunks c ON m.chunk_id = c.id
6
+ JOIN (
7
+ SELECT m2.symbol_id, c2.document_id
8
+ FROM mentions m2
9
+ JOIN chunks c2 ON m2.chunk_id = c2.id
10
+ WHERE m2.role = 1
11
+ GROUP BY m2.symbol_id
12
+ ) sym_def ON sym_def.symbol_id = m.symbol_id
13
+ WHERE m.symbol_id = ?
14
+ AND m.role != 1
15
+ AND sym_def.document_id != c.document_id`,e)?.c??0}function w(t,e){return new Set(t.filter(s=>s.file!==e).map(s=>s.symbol)).size}function M(t){let e=0;return l(t,s=>{e+=x(s)}),e}function v(t,e,s){let n=[...e].sort((o,a)=>o.startLine-a.startLine||a.endLine-o.endLine);l(t,o=>{let a=x(o);if(a===0)return;let r=o.startPosition.row,i=o.endPosition.row;for(let m of n){if(m.startLine>r)break;if(m.endLine<i)continue;let c=s.get(m.symbolId);c&&(c.branches+=a)}})}var D=new Set(["if_statement","conditional_expression","ternary_expression","for_statement","for_in_statement","for_of_statement","while_statement","do_statement","switch_case","case_statement","catch_clause","except_clause","elif_clause","match_arm"]);function x(t){return D.has(t.type)?1:t.type==="binary_expression"&&t.parent?.type!=="binary_expression"&&(t.text.includes("&&")||t.text.includes("||"))?I(t.text):0}function I(t){return(t.match(/&&|\|\|/g)??[]).length}function E(t,e){let s=h(t),n=0,o=[/\bif\b/g,/\belse\s+if\b/g,/\belse\b/g,/\bfor\b/g,/\bwhile\b/g,/\bswitch\b/g,/\bcase\b/g,/\bcatch\b/g,/\?\s*[^?]/g,/&&/g,/\|\|/g];for(let a of o){let r=s.match(a);r&&(n+=r.length)}if(e==="python"){let a=[/\belif\b/g,/\bexcept\b/g,/\bfinally\b/g];for(let r of a){let i=s.match(r);i&&(n+=i.length)}}else if(e==="rust"){let a=[/\bmatch\b/g,/=>/g,/\bloop\b/g];for(let r of a){let i=s.match(r);i&&(n+=i.length)}}else if(e==="ruby"){let a=[/\belsif\b/g,/\bunless\b/g,/\brescue\b/g,/\bwhen\b/g];for(let r of a){let i=s.match(r);i&&(n+=i.length)}}else if(e==="go"){let a=[/\bselect\b/g,/\bdefer\b/g];for(let r of a){let i=s.match(r);i&&(n+=i.length)}}return n}export{T as a,L as b,j as c,M as d};
16
+ //# sourceMappingURL=chunk-XKM5D2XS.js.map
@@ -0,0 +1,4 @@
1
+ import{b as i}from"./chunk-QH5Q6M5C.js";import{a as o}from"./chunk-YBWE6J32.js";import{y as l}from"./chunk-7Z4GMCHM.js";function y(e,r){let s=i(e,r);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let a=s.map(()=>"?").join(", "),n=e.all(`SELECT relative_path FROM documents
2
+ WHERE relative_path IN (${a})
3
+ ORDER BY relative_path`,...s).map(t=>t.relative_path).filter(t=>!e.isIgnored(t)),p=l(e,n,{onlyDocumented:!0,sort:!0}).map(({relativePath:t,...f})=>f),m=o(e,"forward",s).filter(t=>!e.isIgnored(t)),d=o(e,"reverse",s).filter(t=>!e.isIgnored(t));return{files:n,symbols:p,dependsOn:m,dependedOnBy:d}}function g(e,r){return y(e,r)}export{y as a,g as b};
4
+ //# sourceMappingURL=chunk-XNF5T4T2.js.map
@@ -0,0 +1,3 @@
1
+ import{a as d}from"./chunk-ILMHV3KM.js";import{a as A,b as T,c as v,g as P,j as R}from"./chunk-ND3BWIVN.js";import{d as g,e as L,f as p,g as M,h as k}from"./chunk-67FK5KGV.js";import{ja as I,ka as z}from"./chunk-XIPGCT3D.js";import c from"process";import{existsSync as _}from"fs";import{dirname as h,join as J,resolve as b,sep as N}from"path";import{fileURLToPath as K}from"url";async function G(e){let n=e.includeReferences!==!1,r=e.includeCallees===!0,t=e.includeSignatures===!0,s={timeoutMs:e.requestTimeoutMs},o=Q(e),a=W(e),l=H(e),f=j(e),C=re(e.projectRoot,o),x=te(e.projectRoot,C),w=ne(C),u=new T(v(e.rustAnalyzerBinary,x),{requestTimeoutMs:e.requestTimeoutMs,configuration:w});try{let y=await u.initialize({processId:c.pid,rootUri:g(x,"."),capabilities:{textDocument:{references:{dynamicRegistration:!1},callHierarchy:{dynamicRegistration:!1},hover:{dynamicRegistration:!1}}},initializationOptions:w});if(n&&!y.capabilities.referencesProvider)return{available:!1,reason:"rust-analyzer initialized without textDocument/references support.",references:a.map(i=>[i.symbolId,[]]),...r?{callees:l.map(i=>[i.symbolId,[]])}:{}};if(r&&!y.capabilities.callHierarchyProvider)return{available:!1,reason:"rust-analyzer initialized without call hierarchy support.",references:a.map(i=>[i.symbolId,[]]),callees:l.map(i=>[i.symbolId,[]]),...t?{signatures:f.map(i=>[i.symbolId,null])}:{}};if(t&&!y.capabilities.hoverProvider)return{available:!1,reason:"rust-analyzer initialized without hover support.",references:a.map(i=>[i.symbolId,[]]),...r?{callees:l.map(i=>[i.symbolId,[]])}:{},signatures:f.map(i=>[i.symbolId,null])};let $=ie(u,e.projectRoot,o);await se(u,$,e.diagnosticsTimeoutMs??1e4),await R(e.settleDelayMs??5e3);let S=n?await d(a,e.concurrency??8,async i=>{let D=await E(u,p(e.projectRoot,i,!1),{requestTimeoutMs:e.requestTimeoutMs,retryTimeoutMs:e.referenceRetryTimeoutMs});return{symbolId:i.symbolId,references:k(M(e.projectRoot,D.locations)),complete:D.complete}}):a.map(i=>({symbolId:i.symbolId,references:[],complete:!0})),B=r?await d(l,e.concurrency??8,async i=>({symbolId:i.symbolId,callees:await ae(u,e.projectRoot,i,s)})):[],U=t?await d(f,e.concurrency??8,async i=>({symbolId:i.symbolId,signature:await V(u,e.projectRoot,i,s)})):[];return{available:!0,references:S.filter(i=>i.complete).map(i=>[i.symbolId,i.references]),incompleteReferenceSymbolIds:S.filter(i=>!i.complete).map(i=>i.symbolId),...r?{callees:B.map(i=>[i.symbolId,i.callees])}:{},...t?{signatures:U.map(i=>[i.symbolId,i.signature])}:{}}}finally{await u.shutdown().catch(()=>{})}}function W(e){return e.referenceDefinitions??e.definitions}function H(e){return e.calleeDefinitions??e.definitions}function j(e){return e.signatureDefinitions??e.definitions}function Q(e){return[...e.includeReferences!==!1?W(e):[],...e.includeCallees===!0?H(e):[],...e.includeSignatures===!0?j(e):[]]}async function V(e,n,r,t={}){let s=p(n,r,!1),o=await X(e,{textDocument:s.textDocument,position:s.position},t);return Y(o)}async function X(e,n,r={}){try{return await e.hover(n,r)}catch(t){if(m(t),!(t instanceof Error?t.message:String(t)).includes("content modified"))return null;await F(r.deadlineMs);try{return await e.hover(n,r)}catch(o){return m(o),null}}}function Y(e){if(!e)return null;let n=Z(e.contents),r=/```(?:rust)?\s*([\s\S]*?)```/i.exec(n),t=r?r[1]:n;for(let s of t.split(/\r?\n/)){let o=s.replace(/^`+|`+$/g,"").trim();if(o&&ee(o))return o}return null}function Z(e){return typeof e=="string"?e:Array.isArray(e)?e.map(q).join(`
2
+ `):"value"in e?e.value:""}function q(e){return typeof e=="string"?e:e.value}function ee(e){return/^(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?(?:const\s+)?(?:unsafe\s+)?(?:extern\s+(?:"[^"]+"\s+)?)?(?:fn|struct|enum|trait|type|const|static|mod)\b/.test(e)}function ne(e){return{...e.length>0?{linkedProjects:e}:{},references:{excludeImports:!1,excludeTests:!1}}}function te(e,n){return n.length===1?h(n[0]):b(e)}function re(e,n){let r=b(e),t=[],s=new Set;for(let o of n){let a=h(b(r,o.relativePath));for(;me(r,a);){let l=J(a,"Cargo.toml");if(_(l)){s.has(l)||(s.add(l),t.push(l));break}let f=h(a);if(f===a)break;a=f}}return t}function ie(e,n,r){let t=new Set,s=[];for(let o of r)if(!t.has(o.relativePath)){t.add(o.relativePath);try{let a=g(n,o.relativePath);e.didOpenTextDocument({uri:a,languageId:"rust",version:1,text:I(n,o.relativePath,{inputKind:"indexed Rust source file"})}),s.push(a)}catch(a){if(!z(a))throw a}}return s}async function se(e,n,r){await Promise.all(n.map(t=>e.waitForDiagnostics(t,r).catch(()=>!1)))}async function De(e,n){return(await E(e,n)).locations}async function E(e,n,r={}){try{return{locations:await e.references(n,{timeoutMs:r.requestTimeoutMs,deadlineMs:r.deadlineMs}),complete:!0}}catch(t){m(t);let s=t instanceof Error?t.message:String(t);if(O(t))return{locations:[],complete:!1};if(!s.includes("content modified"))return{locations:[],complete:!0};await F(r.deadlineMs);try{return{locations:await e.references(n,oe(r)),complete:!0}}catch(o){return m(o),{locations:[],complete:!O(o)}}}}function oe(e){return{...e.retryTimeoutMs&&e.retryTimeoutMs>0?{timeoutMs:e.retryTimeoutMs}:{},...e.deadlineMs!==void 0?{deadlineMs:e.deadlineMs}:{}}}function O(e){let n=e instanceof Error?e.message:String(e);return n.includes("rust-analyzer LSP request")&&n.includes("timed out after")}async function ae(e,n,r,t={}){let s=p(n,r,!1),o=await le(e,{textDocument:s.textDocument,position:s.position},t),a=(await Promise.all(o.map(l=>ce(e,l,t)))).flat();return fe(ue(n,a))}async function le(e,n,r={}){try{return await e.prepareCallHierarchy(n,r)}catch(t){return m(t),[]}}async function ce(e,n,r={}){try{return await e.outgoingCalls(n,r)}catch(t){return m(t),[]}}async function F(e){if(e===void 0){await R(1e3);return}await P(1e3,e)}function m(e){if(e instanceof A)throw e}function ue(e,n){return n.map(r=>({symbol:r.to.name,file:L(e,r.to.uri),line:r.to.selectionRange.start.line,...r.fromRanges[0]===void 0?{}:{callsiteLine:r.fromRanges[0].start.line}}))}function fe(e){let n=new Set,r=[];for(let t of e){let s=`${t.symbol}\0${t.file}\0${t.line}\0${t.callsiteLine??""}`;n.has(s)||(n.add(s),r.push(t))}return r.sort((t,s)=>t.file.localeCompare(s.file)||t.line-s.line||t.symbol.localeCompare(s.symbol))}function me(e,n){return n===e||n.startsWith(`${e}${N}`)}async function de(){return new Promise((e,n)=>{let r=[];c.stdin.on("data",t=>r.push(t)),c.stdin.on("error",n),c.stdin.on("end",()=>e(Buffer.concat(r).toString("utf8")))})}async function pe(){try{let e=JSON.parse(await de()),n=await G(e);c.stdout.write(JSON.stringify(n))}catch(e){let n={available:!1,reason:e instanceof Error?e.message:String(e),references:[]};c.stdout.write(JSON.stringify(n)),c.exitCode=1}}c.argv[1]&&K(import.meta.url)===c.argv[1]&&pe();export{G as a,W as b,H as c,j as d,Q as e,V as f,X as g,Y as h,ne as i,te as j,re as k,ie as l,se as m,De as n,E as o,ae as p};
3
+ //# sourceMappingURL=chunk-Y2S4YNLH.js.map
@@ -0,0 +1,2 @@
1
+ import{d as T}from"./chunk-DXYMTQZ4.js";import{E as v,da as x,ga as m,ha as P,ia as k,ka as b,ma as j}from"./chunk-XIPGCT3D.js";import{createHash as A}from"crypto";import{isUtf8 as K}from"buffer";import{TextDecoder as _}from"util";var O=new _("utf-8",{fatal:!0});function H(e){return j(e.config.projectRoot)}function Q(e,t){let a=v(t),r;try{r=m(e.config.projectRoot,a,{inputKind:"repository text file"})}catch(o){if(b(o)||o instanceof x)return null;throw o}let n=C(r);return n===null?null:w(a,r,n,E(e),L(e))}function V(e,t,a){let r=H(e).filter(i=>!t.scope||i.includes(t.scope)),n=E(e),o=L(e),u=[],S=[],B=[],f=0,d=0,h={aligned:0,stale:0,unavailable:0},l=t.literalBytes?Buffer.isBuffer(t.literalBytes)?[t.literalBytes]:[...t.literalBytes]:[],F=l.length>0?Buffer.allocUnsafe(1024*1024):void 0;for(let i of r){let c,p,g=[],y=o.has(i);try{if(l.length>0){let s=l.length===1?P(e.config.projectRoot,i,l[0],{inputKind:"repository text file",computeSha256:y,scratchBuffer:F}):k(e.config.projectRoot,i,l,{inputKind:"repository text file",computeSha256:y,scratchBuffer:F});if(!s.isUtf8Text){u.push(i);continue}f+=s.byteLength,d+=1,p=s.sha256;let z=R(i,p,n,o);if(h[z.state]+=1,g="matchedLiteralIndexes"in s?s.matchedLiteralIndexes:s.includesLiteral?[0]:[],g.length===0||!s.bytes)continue;c=s.bytes}else c=m(e.config.projectRoot,i,{inputKind:"repository text file"})}catch(s){if(s instanceof x){B.push(i);continue}if(b(s))continue;S.push(i);continue}if(l.length===0&&!I(c)){u.push(i);continue}if(l.length===0){f+=c.byteLength,d+=1,p=y?M(c):void 0;let s=R(i,p,n,o);h[s.state]+=1}if(t.includeBytes&&!t.includeBytes(i,c))continue;let U=O.decode(c);a(w(i,c,U,n,o,p),g)}return{candidateFiles:r.length,scannedTextFiles:d,semanticFiles:h,scannedBytes:f,skippedBinaryPaths:u,skippedUnreadablePaths:S,skippedOversizedPaths:B}}function w(e,t,a,r,n,o){let u=o??M(t);return{relativePath:e,text:a,bytes:t.byteLength,freshness:{exactText:{state:"current",basis:"working-tree-read",sha256:u},semantic:R(e,u,r,n)}}}function R(e,t,a,r){if(!r.has(e))return{state:"unavailable",basis:"no-compiler-document"};let n=a.get(e);return!n||!t?{state:"unavailable",basis:"fingerprint-unavailable"}:{state:n===t?"aligned":"stale",basis:"indexed-input-fingerprint"}}function L(e){return new Set(e.all(`SELECT documents.relative_path FROM documents WHERE 1 = 1 ${e.pathExclusionsFor("documents")}`).map(t=>t.relative_path))}function E(e){let t=new Map;if(!e.generation.metadataRaw)return t;let a=T(e.generation.metadataRaw);if(a.kind!=="legacy"&&a.kind!=="supported")return t;let r=a.metadata.fingerprint;if(!D(r)||!Array.isArray(r.files))return t;for(let n of r.files)!D(n)||typeof n.path!="string"||typeof n.hash!="string"||t.set(n.path,n.hash);return t}function C(e){return I(e)?O.decode(e):null}function I(e){return!e.includes(0)&&K(e)}function M(e){return A("sha256").update(e).digest("hex")}function D(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}export{H as a,Q as b,V as c};
2
+ //# sourceMappingURL=chunk-YA72ZUKO.js.map
@@ -0,0 +1,43 @@
1
+ import{v as G,x as O}from"./chunk-6LS3IG2I.js";import{a as F}from"./chunk-C7WSQA6A.js";import{c as I,h as P,j as E,t as g,x as R,y as x}from"./chunk-JSHDCVUM.js";var _=R({kind:"file-dependency-graph",invalidation:x("file-dependency-graph"),serialize:e=>JSON.stringify(e),deserialize:K}),k=I("file-dep-graph",{clearGroups:["whole-project"]});function X(e,n,r){if(r.length===0)return[];let t=new Set(r),i=M(e),s=new Set;if(n==="forward")for(let o of t)for(let c of i.get(o)??[])t.has(c)||s.add(c);else for(let[o,c]of i)if(!t.has(o))for(let l of t)c.has(l)&&s.add(o);return[...s].sort()}function M(e,n,r={}){let t=r.scipEdges??"all-references",i=r.sourceEdges??"imports-only",s=m(n,t,i);return k.get(e,s,()=>{let o=new Set(F(e,{includeIgnored:!1})),c=E(e),l=0,f=0,a=null,p=!1,u=0,C=0,N=null;return g("file-dep-graph.product",()=>{if(c){let d=_.read(e,s,c);if(d){p=!0,N=d.construction;let S=w(d);return l=d.sourceFileCount,f=d.sourceEdgeCount,u=d.scipEdgeCount,C=S.size,a=d.sourceDependencyFingerprint,S}}let D=i==="none"?{files:[],edges:[],fingerprint:P("no-source-dependency-fallback")}:g("file-dep-graph.source-imports",()=>{let d=j(e,o,n,i);return l=d.files.length,f=d.edges.length,a=d.fingerprint,d},()=>({scope:n??null,sourceEdges:i,files:l,edges:f})),y=new Map,A=(d,S)=>h(e,y,o,d,S);g("file-dep-graph.scip-edges",()=>{for(let d of L(e,n,t))u=(u??0)+1,A(d.from_file,d.to_file)},()=>({scope:n??null,edges:u}));for(let d of D.edges)A(d.fromFile,d.toFile);return C=y.size,c&&(N="full",_.write(e,s,c,{version:2,construction:"full",sourceDependencyFingerprint:D.fingerprint,sourceFileCount:D.files.length,sourceEdgeCount:D.edges.length,scipEdgeCount:u,edgeCount:v(y),graph:b(y)})),y},()=>({scope:n??null,available:c!==null,hit:p,construction:N,files:l,sourceEdges:f,sourceEdgeMode:i,scipEdges:u,graphFiles:C,sourceDependencyFingerprint:a}))})}function Z(e){return J(e,"none")}function ee(e,n="imports-only"){let r=m(void 0,"all-references",n),t=E(e);if(!t)return null;let i=_.read(e,r,t);return i?{cacheKey:r,sourceEdges:n,graph:w(i)}:null}function J(e,n){let r=m(void 0,"all-references",n),t=M(e,void 0,{sourceEdges:n});return{cacheKey:r,sourceEdges:n,graph:t}}function ne(e,n,r,t){let i=n.sourceEdges??"imports-only",s=E(e);if(!s)return!1;let o=t??$(e,n,r);if(!o)return!1;let c=new Set(F(e,{includeIgnored:!1})),l=m(void 0,"all-references",i);return _.write(e,l,s,{version:2,construction:"carried",sourceDependencyFingerprint:null,sourceFileCount:c.size,sourceEdgeCount:null,scipEdgeCount:null,edgeCount:v(o),graph:b(o)}),!0}function $(e,n,r,t=[]){let i=n.sourceEdges??"imports-only",s=m(void 0,"all-references",i);if(n.cacheKey!==s)return null;let o=g("file-dep-graph.carry.indexed-files",()=>new Set(F(e,{includeIgnored:!1}))),c=new Set(r),l=new Map;g("file-dep-graph.carry.reuse",()=>{if(t.length===0)for(let[a,p]of n.graph)c.has(a)||l.set(a,p);else for(let[a,p]of n.graph)if(!(c.has(a)||!o.has(a)))for(let u of p)h(e,l,o,a,u)});let f=g("file-dep-graph.carry.scip-edges",()=>W(e,c,"all-references"));for(let a of f)h(e,l,o,a.from_file,a.to_file);return g("file-dep-graph.carry.source-edges",()=>{for(let a of c)if(o.has(a)){if(i!=="none")for(let p of O(e,a))p.sourcePath&&h(e,l,o,a,p.sourcePath);if(i==="imports-and-reexports")for(let p of G(e,a))p.sourcePath&&h(e,l,o,a,p.sourcePath)}}),l}function j(e,n,r,t){let i=[],s=[];for(let o of n)if(!(r&&!o.includes(r))){i.push(o);for(let c of O(e,o))c.sourcePath&&s.push({fromFile:o,toFile:c.sourcePath});if(t==="imports-and-reexports")for(let c of G(e,o))c.sourcePath&&s.push({fromFile:o,toFile:c.sourcePath})}return{files:i,edges:s,fingerprint:T(i,s)}}function T(e,n){let r=n.map(t=>`${t.fromFile}\0${t.toFile}`).sort();return P(JSON.stringify({files:e,edges:r}))}function m(e,n,r){return`edge-mode-v4:${n}:${r}:${e??"<all>"}`}function b(e){return[...e].map(([n,r])=>[n,[...r].sort()]).sort(([n],[r])=>n.localeCompare(r))}function w(e){return new Map(e.graph.map(([n,r])=>[n,new Set(r)]))}function K(e){let n=JSON.parse(e);return z(n)?n:null}function z(e){if(!e||typeof e!="object")return!1;let n=e;return n.version===2&&(n.construction==="full"||n.construction==="carried")&&(n.sourceDependencyFingerprint===null||typeof n.sourceDependencyFingerprint=="string")&&typeof n.sourceFileCount=="number"&&(n.sourceEdgeCount===null||typeof n.sourceEdgeCount=="number")&&(n.scipEdgeCount===null||typeof n.scipEdgeCount=="number")&&typeof n.edgeCount=="number"&&Array.isArray(n.graph)&&n.graph.every(H)}function v(e){let n=0;for(let r of e.values())n+=r.size;return n}function H(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&Array.isArray(e[1])&&e[1].every(n=>typeof n=="string")}function L(e,n,r){let t=n?"AND d1.relative_path LIKE ?":"",i=n?[`%${n}%`]:[],s=r==="imports-only"?"AND m.role = 2":"AND m.role != 1";return e.all(`SELECT DISTINCT
2
+ d1.relative_path AS from_file,
3
+ d2.relative_path AS to_file
4
+ FROM mentions m
5
+ JOIN chunks c ON m.chunk_id = c.id
6
+ JOIN documents d1 ON c.document_id = d1.id
7
+ JOIN global_symbols gs ON m.symbol_id = gs.id
8
+ JOIN (
9
+ SELECT m2.symbol_id, c2.document_id
10
+ FROM mentions m2
11
+ JOIN chunks c2 ON m2.chunk_id = c2.id
12
+ WHERE m2.role = 1
13
+ GROUP BY m2.symbol_id
14
+ ) sym_def ON sym_def.symbol_id = gs.id
15
+ JOIN documents d2 ON sym_def.document_id = d2.id
16
+ WHERE d1.id != d2.id
17
+ ${s}
18
+ ${e.pathExclusionsFor("d1","d2")}
19
+ ${t}`,...i)}function W(e,n,r){let t=[...n].sort();if(t.length===0)return[];let i=r==="imports-only"?"AND m.role = 2":"AND m.role != 1",s=[];for(let o=0;o<t.length;o+=500){let c=t.slice(o,o+500),l=c.map(()=>"?").join(", ");s.push(...e.all(`SELECT DISTINCT
20
+ d1.relative_path AS from_file,
21
+ d2.relative_path AS to_file
22
+ FROM documents d1
23
+ CROSS JOIN chunks c
24
+ CROSS JOIN mentions m
25
+ CROSS JOIN global_symbols gs
26
+ CROSS JOIN chunks c2
27
+ CROSS JOIN documents d2
28
+ WHERE d1.relative_path IN (${l})
29
+ AND c.document_id = d1.id
30
+ AND m.chunk_id = c.id
31
+ AND gs.id = m.symbol_id
32
+ AND c2.id = (
33
+ SELECT m2.chunk_id
34
+ FROM mentions m2
35
+ WHERE m2.symbol_id = gs.id AND m2.role = 1
36
+ ORDER BY m2.chunk_id
37
+ LIMIT 1
38
+ )
39
+ AND d2.id = c2.document_id
40
+ AND d1.id != d2.id
41
+ ${i}
42
+ ${e.pathExclusionsFor("d1","d2")}`,...c))}return s}function h(e,n,r,t,i){if(t===i||e.isIgnored(t)||e.isIgnored(i)||!r.has(i))return;let s=n.get(t);s||(s=new Set,n.set(t,s)),s.add(i)}export{X as a,M as b,Z as c,ee as d,ne as e,$ as f};
43
+ //# sourceMappingURL=chunk-YBWE6J32.js.map
@@ -0,0 +1,2 @@
1
+ import{b as v}from"./chunk-BOJ5SVE2.js";import{c as h}from"./chunk-NODZYYGC.js";import{a as p}from"./chunk-G6VV7ROY.js";import{a as g,c as y}from"./chunk-UM56ZET4.js";import{d as b}from"./chunk-7Z4GMCHM.js";function x(i,n={}){let{limit:f=20,scope:l,minFanIn:c=2,minFanOut:m=2,scanLimit:o}=n,a=new h(i),r=v(a.productionCallableDefinitions({scope:l,requireCallableSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof o=="number"&&o>0}),o),s=n.semantic!==!1,d=y(i,r,{limit:500,semantic:s,semanticEvidence:p});return r.map(e=>S(i,e,s,d.get(e.symbolId)??[])).filter(e=>e.fanIn>=c&&e.fanOut>=m).sort((e,t)=>t.score-e.score||t.fanIn-e.fanIn).slice(0,f)}function B(i,n={}){return x(i,n)}function S(i,n,f,l){let c=[...new Set(l.map(e=>e.file))].sort(),m=[...new Set(l.filter(e=>e.source!=="caller-map-inversion"||e.callEvidence==="scip-chunk").map(e=>e.file))].sort(),o=new Map;for(let e of g(i,n,{limit:500,semantic:f,semanticEvidence:p})){if(e.file===n.relativePath)continue;let t=`${e.symbol}|${e.file}`;o.has(t)||o.set(t,{symbol:e.symbol,shortName:b(e.symbol),file:e.file,evidenceStrength:e.source==="scip-chunk"?"candidate":"exact",evidenceSource:e.source})}let a=[...o.values()].sort((e,t)=>e.file.localeCompare(t.file)||e.symbol.localeCompare(t.symbol)),r=c.length,s=a.length,d=r*s,u=a.filter(e=>e.evidenceStrength==="candidate").map(e=>e.symbol);return{symbol:n.symbol,shortName:b(n.symbol),fanIn:r,fanOut:s,callerFiles:c,candidateCallerFiles:m,externalCallees:a.map(({symbol:e,shortName:t,file:C})=>({symbol:e,shortName:t,file:C})),externalCalleeEvidence:a,candidateExternalCallees:u,inputBasis:"mixed-static-call-or-reference-evidence",score:d,definedIn:n.relativePath,actionTier:"signal",riskKind:"coordination-hotspot",evidenceReasons:[`${r} incoming file(s) reference this symbol`,`${s} distinct cross-file callee symbol(s) are reached from it`,`centrality score is ${d} (fan-in * fan-out)`,`${m.length} incoming file(s) and ${u.length} outgoing target(s) rely on candidate rather than exact call evidence`],recommendation:"Review ownership, API stability, and caller groups before changing this central symbol; do not refactor solely from graph centrality."}}export{x as a,B as b};
2
+ //# sourceMappingURL=chunk-YCXQQ3YB.js.map
@@ -0,0 +1,43 @@
1
+ import{F as G,H as O,b as R,c as x}from"./chunk-NP4JFCLE.js";import{a as F}from"./chunk-5Z2H76VD.js";import{b as P,d as E}from"./chunk-PRLU3I7G.js";import{c as I}from"./chunk-FYCH2EYQ.js";import{e as g}from"./chunk-HGFDYOVB.js";var _=R({kind:"file-dependency-graph",invalidation:x("file-dependency-graph"),serialize:e=>JSON.stringify(e),deserialize:K}),k=I("file-dep-graph",{clearGroups:["whole-project"]});function X(e,n,r){if(r.length===0)return[];let t=new Set(r),i=M(e),s=new Set;if(n==="forward")for(let o of t)for(let c of i.get(o)??[])t.has(c)||s.add(c);else for(let[o,c]of i)if(!t.has(o))for(let l of t)c.has(l)&&s.add(o);return[...s].sort()}function M(e,n,r={}){let t=r.scipEdges??"all-references",i=r.sourceEdges??"imports-only",s=m(n,t,i);return k.get(e,s,()=>{let o=new Set(F(e,{includeIgnored:!1})),c=E(e),l=0,f=0,a=null,p=!1,u=0,C=0,N=null;return g("file-dep-graph.product",()=>{if(c){let d=_.read(e,s,c);if(d){p=!0,N=d.construction;let S=w(d);return l=d.sourceFileCount,f=d.sourceEdgeCount,u=d.scipEdgeCount,C=S.size,a=d.sourceDependencyFingerprint,S}}let D=i==="none"?{files:[],edges:[],fingerprint:P("no-source-dependency-fallback")}:g("file-dep-graph.source-imports",()=>{let d=j(e,o,n,i);return l=d.files.length,f=d.edges.length,a=d.fingerprint,d},()=>({scope:n??null,sourceEdges:i,files:l,edges:f})),y=new Map,A=(d,S)=>h(e,y,o,d,S);g("file-dep-graph.scip-edges",()=>{for(let d of L(e,n,t))u=(u??0)+1,A(d.from_file,d.to_file)},()=>({scope:n??null,edges:u}));for(let d of D.edges)A(d.fromFile,d.toFile);return C=y.size,c&&(N="full",_.write(e,s,c,{version:2,construction:"full",sourceDependencyFingerprint:D.fingerprint,sourceFileCount:D.files.length,sourceEdgeCount:D.edges.length,scipEdgeCount:u,edgeCount:v(y),graph:b(y)})),y},()=>({scope:n??null,available:c!==null,hit:p,construction:N,files:l,sourceEdges:f,sourceEdgeMode:i,scipEdges:u,graphFiles:C,sourceDependencyFingerprint:a}))})}function Z(e){return J(e,"none")}function ee(e,n="imports-only"){let r=m(void 0,"all-references",n),t=E(e);if(!t)return null;let i=_.read(e,r,t);return i?{cacheKey:r,sourceEdges:n,graph:w(i)}:null}function J(e,n){let r=m(void 0,"all-references",n),t=M(e,void 0,{sourceEdges:n});return{cacheKey:r,sourceEdges:n,graph:t}}function ne(e,n,r,t){let i=n.sourceEdges??"imports-only",s=E(e);if(!s)return!1;let o=t??$(e,n,r);if(!o)return!1;let c=new Set(F(e,{includeIgnored:!1})),l=m(void 0,"all-references",i);return _.write(e,l,s,{version:2,construction:"carried",sourceDependencyFingerprint:null,sourceFileCount:c.size,sourceEdgeCount:null,scipEdgeCount:null,edgeCount:v(o),graph:b(o)}),!0}function $(e,n,r,t=[]){let i=n.sourceEdges??"imports-only",s=m(void 0,"all-references",i);if(n.cacheKey!==s)return null;let o=g("file-dep-graph.carry.indexed-files",()=>new Set(F(e,{includeIgnored:!1}))),c=new Set(r),l=new Map;g("file-dep-graph.carry.reuse",()=>{if(t.length===0)for(let[a,p]of n.graph)c.has(a)||l.set(a,p);else for(let[a,p]of n.graph)if(!(c.has(a)||!o.has(a)))for(let u of p)h(e,l,o,a,u)});let f=g("file-dep-graph.carry.scip-edges",()=>W(e,c,"all-references"));for(let a of f)h(e,l,o,a.from_file,a.to_file);return g("file-dep-graph.carry.source-edges",()=>{for(let a of c)if(o.has(a)){if(i!=="none")for(let p of O(e,a))p.sourcePath&&h(e,l,o,a,p.sourcePath);if(i==="imports-and-reexports")for(let p of G(e,a))p.sourcePath&&h(e,l,o,a,p.sourcePath)}}),l}function j(e,n,r,t){let i=[],s=[];for(let o of n)if(!(r&&!o.includes(r))){i.push(o);for(let c of O(e,o))c.sourcePath&&s.push({fromFile:o,toFile:c.sourcePath});if(t==="imports-and-reexports")for(let c of G(e,o))c.sourcePath&&s.push({fromFile:o,toFile:c.sourcePath})}return{files:i,edges:s,fingerprint:T(i,s)}}function T(e,n){let r=n.map(t=>`${t.fromFile}\0${t.toFile}`).sort();return P(JSON.stringify({files:e,edges:r}))}function m(e,n,r){return`edge-mode-v4:${n}:${r}:${e??"<all>"}`}function b(e){return[...e].map(([n,r])=>[n,[...r].sort()]).sort(([n],[r])=>n.localeCompare(r))}function w(e){return new Map(e.graph.map(([n,r])=>[n,new Set(r)]))}function K(e){let n=JSON.parse(e);return z(n)?n:null}function z(e){if(!e||typeof e!="object")return!1;let n=e;return n.version===2&&(n.construction==="full"||n.construction==="carried")&&(n.sourceDependencyFingerprint===null||typeof n.sourceDependencyFingerprint=="string")&&typeof n.sourceFileCount=="number"&&(n.sourceEdgeCount===null||typeof n.sourceEdgeCount=="number")&&(n.scipEdgeCount===null||typeof n.scipEdgeCount=="number")&&typeof n.edgeCount=="number"&&Array.isArray(n.graph)&&n.graph.every(H)}function v(e){let n=0;for(let r of e.values())n+=r.size;return n}function H(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="string"&&Array.isArray(e[1])&&e[1].every(n=>typeof n=="string")}function L(e,n,r){let t=n?"AND d1.relative_path LIKE ?":"",i=n?[`%${n}%`]:[],s=r==="imports-only"?"AND m.role = 2":"AND m.role != 1";return e.all(`SELECT DISTINCT
2
+ d1.relative_path AS from_file,
3
+ d2.relative_path AS to_file
4
+ FROM mentions m
5
+ JOIN chunks c ON m.chunk_id = c.id
6
+ JOIN documents d1 ON c.document_id = d1.id
7
+ JOIN global_symbols gs ON m.symbol_id = gs.id
8
+ JOIN (
9
+ SELECT m2.symbol_id, c2.document_id
10
+ FROM mentions m2
11
+ JOIN chunks c2 ON m2.chunk_id = c2.id
12
+ WHERE m2.role = 1
13
+ GROUP BY m2.symbol_id
14
+ ) sym_def ON sym_def.symbol_id = gs.id
15
+ JOIN documents d2 ON sym_def.document_id = d2.id
16
+ WHERE d1.id != d2.id
17
+ ${s}
18
+ ${e.pathExclusionsFor("d1","d2")}
19
+ ${t}`,...i)}function W(e,n,r){let t=[...n].sort();if(t.length===0)return[];let i=r==="imports-only"?"AND m.role = 2":"AND m.role != 1",s=[];for(let o=0;o<t.length;o+=500){let c=t.slice(o,o+500),l=c.map(()=>"?").join(", ");s.push(...e.all(`SELECT DISTINCT
20
+ d1.relative_path AS from_file,
21
+ d2.relative_path AS to_file
22
+ FROM documents d1
23
+ CROSS JOIN chunks c
24
+ CROSS JOIN mentions m
25
+ CROSS JOIN global_symbols gs
26
+ CROSS JOIN chunks c2
27
+ CROSS JOIN documents d2
28
+ WHERE d1.relative_path IN (${l})
29
+ AND c.document_id = d1.id
30
+ AND m.chunk_id = c.id
31
+ AND gs.id = m.symbol_id
32
+ AND c2.id = (
33
+ SELECT m2.chunk_id
34
+ FROM mentions m2
35
+ WHERE m2.symbol_id = gs.id AND m2.role = 1
36
+ ORDER BY m2.chunk_id
37
+ LIMIT 1
38
+ )
39
+ AND d2.id = c2.document_id
40
+ AND d1.id != d2.id
41
+ ${i}
42
+ ${e.pathExclusionsFor("d1","d2")}`,...c))}return s}function h(e,n,r,t,i){if(t===i||e.isIgnored(t)||e.isIgnored(i)||!r.has(i))return;let s=n.get(t);s||(s=new Set,n.set(t,s)),s.add(i)}export{X as a,M as b,Z as c,ee as d,ne as e,$ as f};
43
+ //# sourceMappingURL=chunk-YDTK77JP.js.map
@@ -0,0 +1,4 @@
1
+ import{b as be}from"./chunk-EPLE5O5O.js";import{g as ye,j as O,r as M,v as P,z as G}from"./chunk-NP4JFCLE.js";import{e as pe}from"./chunk-FYCH2EYQ.js";var Oe=12,De=20,oe=200,ie=800,Ie=.9,Me=64,ke=pe("behavior-construct-ranges"),ge={if_statement:"branch",conditional_expression:"branch",ternary_expression:"branch",switch_statement:"branch",switch_expression:"branch",switch_case:"branch",case_statement:"branch",match_statement:"branch",match_expression:"branch",match_arm:"branch",for_statement:"loop",for_in_statement:"loop",for_of_statement:"loop",while_statement:"loop",do_statement:"loop",await_expression:"await",return_statement:"return",throw_statement:"throw",raise_statement:"throw",assignment_expression:"mutation",augmented_assignment_expression:"mutation",assignment:"mutation",pair:"shape",field_initializer:"shape",spread_element:"spread",dictionary_splat:"spread",catch_clause:"catch",except_clause:"catch",finally_clause:"finally"},Z=["anchor","signature","binding","branch","loop","call","await","return","throw","mutation","shape","spread","catch","finally"],Ce=[...Z,"lifecycle"],_e=["loop","await","throw","mutation","spread","catch","finally","lifecycle"],Ye=new Set(["onBeforeMount","onBeforeUnmount","onMounted","onUnmounted","useEffect","useInsertionEffect","useLayoutEffect"]);var Ne=new Set(["object","object_pattern","dictionary","field_declaration_list","struct_expression","struct_pattern"]);function Ct(e,n,t,o,r=[],a={}){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ee(e,n,t,o,r),u=ne(e,n,c.startLine,c.endLine),d=u?.startLine??t,p=u?.endLine??o,N=(u?I(s.rootNode,c.startLine,c.endLine):null)??M(s.rootNode,d,p);if(!N)return null;let b=Le(N,l,d,p,r);if(!b||b.lines.length===0||b.lines.some(S=>S.text.length>ie))return null;let h=ot(l,d,p),C=it(b);if((a.requireSavings??!0)&&C>=h*Ie)return null;let x=Z.filter(S=>b.lines.some(v=>v.signals.includes(S)));return{...u?{callable:{name:u.name,startLine:u.startLine,endLine:u.endLine}}:{},representation:"outline",constructKind:b.constructKind,signature:b.signature,lines:b.lines,signals:x,testCases:be(n)==="test"?ut(l,d,p):[],coverage:{sourceStatements:b.sourceStatements,representedStatements:b.sourceStatements,copiedStatements:b.copiedStatements,omittedStatements:0},rawCharacters:h,outlineCharacters:C,candidateLines:b.sourceStatements,omittedLines:0}}function _t(e,n,t,o,r){if(r.length===0)return[];let a=P(e,n);if(!a)return[];let s=O(e,n),l=ee(e,n,t,o,r),c=ne(e,n,l.startLine,l.endLine),u=c?.startLine??t,d=c?.endLine??o,p=(c?I(a.rootNode,l.startLine,l.endLine):null)??M(a.rootNode,u,d);if(!p)return[];let N=Le(p,s,u,d,r);return N?N.lines.filter(b=>b.text.length<=ie&&b.signals.some(h=>["branch","loop","catch","finally"].includes(h))&&r.some(h=>h>=b.line&&h<=b.endLine)):[]}function Nt(e,n,t,o){let r=P(e,n);if(!r)return null;let a=I(r.rootNode,t,o)??M(r.rootNode,t,o);if(!a)return null;let s=[],l=se(a),c=[];return ce(a,a,u=>{if(Y.has(u.type)||je.has(u.type)){ze(s,c,u);return}if(te.has(u.type)){He(s,c,u);return}if(z.has(u.type)){Ue(s,c,u);return}H.has(u.type)&&Ke(s,u)}),{facts:Je(s),terminals:we(l),unsupported:c}}function ee(e,n,t,o,r=[]){let a=r.filter(d=>d>=t&&d<=o),s=ke.get(e,n,ye(e,n)??"",()=>new Map),l=`${t}:${o}:${a.join(",")}`,c=s.get(l);if(c)return s.delete(l),s.set(l,c),{startLine:c[0],endLine:c[1]};let u=$e(e,n,t,o,a);if(s.set(l,[u.startLine,u.endLine]),s.size>Me){let d=s.keys().next().value;d!==void 0&&s.delete(d)}return u}function $e(e,n,t,o,r){let a=P(e,n),s=[];if(r.length>0&&a){let d=[],p=r[0],N=p;for(let h of r)p=Math.min(p,h),N=Math.max(N,h);Ee(a.rootNode,p,N,h=>{Qe(h)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&d.push(h),T.has(h.type)&&h.startPosition.row>=t&&h.endPosition.row<=o&&r.every(C=>h.startPosition.row<=C&&h.endPosition.row>=C)&&s.push(h)});let b=d.sort((h,C)=>h.endPosition.row-h.startPosition.row-(C.endPosition.row-C.startPosition.row)||h.startPosition.row-C.startPosition.row)[0];if(b)return{startLine:b.startPosition.row,endLine:b.endPosition.row}}let l=ne(e,n,t,o);if(l)return{startLine:l.startLine,endLine:l.endLine};if(r.length===0)return{startLine:t,endLine:o};let c=(G(e,n)?.callables??[]).filter(d=>d.startLine>=t&&d.endLine<=o&&r.every(p=>d.startLine<=p&&d.endLine>=p)).sort((d,p)=>d.endLine-d.startLine-(p.endLine-p.startLine)||d.startLine-p.startLine)[0];if(!a)return c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o};let u=s.sort((d,p)=>d.endPosition.row-d.startPosition.row-(p.endPosition.row-p.startPosition.row)||d.startPosition.row-p.startPosition.row)[0];return u?{startLine:u.startPosition.row,endLine:u.endPosition.row}:c?{startLine:c.startLine,endLine:c.endLine}:{startLine:t,endLine:o}}function xt(e,n,t,o,r={}){if(o-t+1<(r.minimumBodyLines??De))return null;let s=Re(e,n,t,o,[],!1);if(!s)return null;let l=s.candidates.map(S=>({...S,signals:S.signals.filter(v=>v!=="anchor"&&v!=="signature")})).filter(S=>S.signals.length>0);if(l.length===0)return null;let c=ct(l),u=l.filter(S=>S.text.length<=oe);if(u.length===0)return null;let d=_e.filter(S=>(c[S]??0)>0),p=d.filter(S=>S!=="await"),N=s.shapes.reduce((S,v)=>S+v.fields.length,0);if(p.length===0&&!((c.await??0)>0&&N>0)&&N<3)return null;let b=lt(u,c),h=new Map;for(let S of d){let v=b.find(m=>m.signals.includes(S));v&&h.set(v.line,v)}if(h.size===0){let S=b.find(v=>v.signals.includes("branch"));S&&h.set(S.line,S)}let C=Math.min(10,Math.max(1,r.maxLines??h.size)),x=new Map;for(let S of h.values()){if(x.size>=C)break;x.set(S.line,S)}return x.size>=l.length&&s.shapes.length===0?null:{owner:s.callable?.name??null,startLine:t,endLine:o,lines:[...x.values()].sort((S,v)=>S.line-v.line),shapes:s.shapes,signalCounts:c,candidateLines:l.length,omittedLines:l.length-x.size}}function vt(e,n,t,o){let r=Re(e,n,t,o,[],!1);return r?new Map(r.candidates.map(a=>[a.line,a.signals.filter(s=>s!=="lifecycle")])):new Map}var T=new Set(["arrow_function","constructor_declaration","function_declaration","function_definition","function_expression","generator_function","generator_function_declaration","function_item","lambda","lambda_expression","method","method_declaration","method_definition"]),B=new Set(["block","body","compound_statement","declaration_list","statement_block"]),Y=new Set(["if_expression","if_statement","unless","unless_statement"]),je=new Set(["conditional_expression","ternary_expression"]),te=new Set(["do_statement","enhanced_for_statement","for_expression","for_in_statement","for_of_statement","for_statement","loop_expression","while_statement"]),z=new Set(["match_expression","match_statement","switch_expression","switch_statement"]),xe=new Set(["case_statement","match_arm","switch_case","switch_default"]),H=new Set(["try_expression","try_statement"]),X=new Set(["catch_clause","except_clause","rescue"]),j=new Set(["ensure","finally_clause"]),$=new Set(["else","else_clause"]),ve=new Set(["raise_statement","return_statement","throw_statement"]),qe=new Set(["block_comment","comment","line_comment"]);function ze(e,n,t){let o=t.childForFieldName("condition")??ue(t),r=t.childForFieldName("consequence")??t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),a=t.childForFieldName("alternative")??t.namedChildren.find(c=>$.has(c.type));if(!o||!r){n.push(le(t,"conditional-fields-unresolved"));return}let s=F(o,"predicate",o.text),l=F(r,Se(r),"consequence");if(E(e,s,l,"predicate-consequence",{branchRole:"consequence"}),J(e,s,r,"consequence"),a){let c=F(a,Se(a),"alternative");E(e,s,c,"predicate-alternative",{branchRole:"alternative"}),J(e,s,a,"alternative");return}E(e,s,ae(s,"otherwise continue"),"predicate-fallthrough",{branchRole:"fallthrough"})}function He(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(s=>B.has(s.type));if(!o){n.push(le(t,"loop-body-unresolved"));return}let r=t.childForFieldName("condition"),a=F(r??t,"predicate",r?.text??R(t,o));E(e,a,F(o,"outcome","iteration"),"loop-iteration",{branchRole:"iteration"}),J(e,a,o,"iteration"),E(e,a,ae(a,"loop exits"),"loop-exit",{branchRole:"exit"})}function Ue(e,n,t){let o=t.childForFieldName("body")??t.namedChildren.find(c=>B.has(c.type)),r=t.childForFieldName("value")??t.childForFieldName("condition")??t.childForFieldName("subject")??ue(t),a=We(o??t);if(!r||a.length===0){n.push(le(t,"switch-cases-unresolved"));return}let s=F(r,"predicate",r.text),l=!1;for(let c of a){let u=Xe(c);l||=u;let d=R(c,c.namedChildren.find(p=>Q(p)));E(e,s,F(c,"outcome",d||(u?"default":"case")),u?"predicate-default":"predicate-case",{branchRole:u?"default":"case"}),J(e,s,c,u?"default":"case")}l||E(e,s,ae(s,"no case matched"),"predicate-fallthrough",{branchRole:"fallthrough"})}function Ke(e,n){let t=F(n,"scope","try");for(let o of Ve(n)){let r=j.has(o.type),a=F(o,"handler",r?"finally":R(o,W(o)));E(e,t,a,r?"finally-cleanup":"exception-handler",{branchRole:r?"finally":"catch"}),Ge(e,a,o,r?"finally":"catch")}}function Ge(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"handler-throw":"handler-return",{branchRole:o,terminalKind:a})}}function J(e,n,t,o){for(let r of se(t)){let a=r.label.startsWith("throw")||r.label.startsWith("raise")?"throw":"return";E(e,n,r,a==="throw"?"predicate-throw":"predicate-return",{branchRole:o,terminalKind:a})}}function E(e,n,t,o,r){e.push({controller:n,outcome:t,subtype:o,attributes:r})}function F(e,n,t){return{kind:n,label:q(t).slice(0,ie),startLine:e.startPosition.row,endLine:e.endPosition.row,implicit:!1}}function ae(e,n){return{...e,kind:"outcome",label:n,implicit:!0}}function Se(e){return ve.has(e.type)?"terminal":"outcome"}function se(e){let n=[];return ce(e,e,t=>{ve.has(t.type)&&n.push(F(t,"terminal",t.text))}),we(n)}function ce(e,n,t){t(n);for(let o of n.namedChildren)o!==e&&T.has(o.type)||ce(e,o,t)}function We(e){let n=[],t=o=>{for(let r of o.namedChildren)z.has(r.type)||(xe.has(r.type)?n.push(r):t(r))};return t(e),n}function Ve(e){let n=[],t=o=>{for(let r of o.namedChildren)H.has(r.type)||(X.has(r.type)||j.has(r.type)?n.push(r):T.has(r.type)||t(r))};return t(e),n}function Xe(e){let n=R(e,e.namedChildren.find(t=>Q(t))).trim();return e.type==="switch_default"||/^(?:default\b|_\s*=>)/u.test(n)}function le(e,n){return{startLine:e.startPosition.row,endLine:e.endPosition.row,reason:n}}function Je(e){let n=new Map;for(let t of e)n.set(`${t.controller.startLine}\0${t.controller.endLine}\0${t.outcome.startLine}\0${t.outcome.endLine}\0${t.subtype}\0${t.outcome.label}`,t);return[...n.values()]}function we(e){let n=new Map;for(let t of e)n.set(`${t.startLine}\0${t.endLine}\0${t.kind}\0${t.label}`,t);return[...n.values()]}function Qe(e){return T.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||X.has(e.type)||j.has(e.type)}function Le(e,n,t,o,r){let s=I(e,t,o)??e,l=W(s),c=[],u=0,d=0,p=(i,f,y,g,w=!1,D=!0)=>{let K=w?y.trim():q(y);if(!K)return;let A=Math.max(t,i.startPosition.row),fe=Math.min(o,i.endPosition.row);c.push({line:A,endLine:Math.max(A,fe),depth:f,signals:Z.filter(me=>g.includes(me)||me==="anchor"&&r.some(he=>he>=A&&he<=fe)),text:K,copied:w}),D&&(u+=1,w&&(d+=1))},N=(i,f)=>{for(let y of i.namedChildren)_(y,f)},b=(i,f)=>{if(Y.has(i.type)){h(i,f,"else if");return}if($.has(i.type)){let y=i.namedChildren.find(w=>Y.has(w.type));if(y){h(y,f,"else if");return}p(i,f,"else",["branch"],!1,!1);let g=W(i)??i.namedChildren.find(w=>B.has(w.type));if(g)_(g,f+1);else for(let w of i.namedChildren)_(w,f+1);return}p(i,f,"else",["branch"],!1,!1),_(i,f+1)},h=(i,f,y=i.type.startsWith("unless")?"unless":"if")=>{let g=i.childForFieldName("condition")??ue(i),w=i.childForFieldName("consequence")??i.childForFieldName("body")??i.namedChildren.find(A=>B.has(A.type)),D=i.childForFieldName("alternative")??i.namedChildren.find(A=>$.has(A.type)),K=g?g.text:R(i,w);p(i,f,`${y} ${nt(K)}`,k(g,["branch"])),w&&_(w,f+1),D&&b(D,f)},C=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["loop"])),y&&_(y,f+1)},x=(i,f)=>{let y=i.childForFieldName("body")??i.namedChildren.find(g=>B.has(g.type));p(i,f,R(i,y),k(i,["branch"])),y&&_(y,f+1)},S=(i,f)=>{let y=i.namedChildren.find(g=>Q(g));p(i,f,R(i,y),["branch"],!1,!1);for(let g of i.namedChildren)(g===y||Q(g))&&_(g,f+1)},v=(i,f)=>{p(i,f,"try",[],!1);for(let y of i.namedChildren)B.has(y.type)?_(y,f+1):(X.has(y.type)||j.has(y.type))&&_(y,f)},m=(i,f,y)=>{let g=i.childForFieldName("body")??i.namedChildren.find(D=>B.has(D.type)),w=y==="finally"?"finally":R(i,g);p(i,f,w,[y],!1,!1),g&&_(g,f+1)},L=(i,f)=>{let y=W(i);p(i,f,R(i,y),k(i,["binding"])),y&&_(y,f+1)},_=(i,f)=>{if(i.startPosition.row>o||i.endPosition.row<t||qe.has(i.type)||i.type==="empty_statement")return;if(B.has(i.type)){N(i,f);return}if(Y.has(i.type)){h(i,f);return}if(te.has(i.type)){C(i,f);return}if(z.has(i.type)){x(i,f);return}if(xe.has(i.type)){S(i,f);return}if(H.has(i.type)){v(i,f);return}if(X.has(i.type)){m(i,f,"catch");return}if(j.has(i.type)){m(i,f,"finally");return}if($.has(i.type)){b(i,f);return}if(T.has(i.type)){L(i,f);return}let g=!Be(i)||rt(i);p(i,f,i.text,k(i),g)};return _(l&&l!==s?l:s,0),u===0?null:{constructKind:tt(s),signature:et(s,l,n,t),lines:c,sourceStatements:u,copiedStatements:d}}function I(e,n,t){let o=e.namedChildren.filter(r=>r.startPosition.row<=n&&r.endPosition.row>=t);for(let r of o.sort(Ze)){let a=I(r,n,t);if(a)return a}return T.has(e.type)&&e.startPosition.row<=n&&e.endPosition.row>=t?e:null}function Ze(e,n){return e.endPosition.row-e.startPosition.row-(n.endPosition.row-n.startPosition.row)||e.startPosition.row-n.startPosition.row}function W(e){return e.childForFieldName("body")??e.childForFieldName("consequence")??e.namedChildren.find(n=>B.has(n.type))??null}function et(e,n,t,o){let r=R(e,n);return r||(t[o]??e.text).trim()}function tt(e){return e.type.includes("constructor")?"constructor":e.type.includes("method")||e.type==="method"?re(e,new Set(["class_body","class_declaration","class_definition"]))?"class method":"object method":e.type==="arrow_function"||e.type==="function_expression"||e.type==="lambda"?re(e,new Set(["object","pair"]))?"object member":"function value":e.type.includes("function")?re(e,T)?"nested function":"module function":"source construct"}function re(e,n){let t=e.parent;for(;t;){if(n.has(t.type))return!0;t=t.parent}return!1}function ue(e){return e.namedChildren.find(n=>!B.has(n.type)&&!$.has(n.type))??null}function R(e,n){if(!n)return q(e.text);let t=Math.max(0,n.startIndex-e.startIndex);return q(e.text.slice(0,t)).replace(/[:{]\s*$/u,"").trim()}function nt(e){let n=q(e);return n.startsWith("(")&&n.endsWith(")")?n.slice(1,-1).trim():n}function q(e){return e.trim().replace(/\r?\n[\t ]*/gu," ")}function k(e,n=[]){let t=new Set(n);return e&&U(e,o=>{let r=ge[o.type];r&&t.add(r),o.type==="call_expression"&&(t.add("call"),Fe(o)&&t.add("shape")),de.has(o.type)&&t.add("binding")}),Z.filter(o=>t.has(o))}function rt(e){let n=!1;return U(e,t=>{n||!t.text.includes(`
2
+ `)||/(?:string|template|heredoc|raw_string)/u.test(t.type)&&(n=!0)}),n}function Q(e){return B.has(e.type)||Y.has(e.type)||te.has(e.type)||z.has(e.type)||H.has(e.type)||T.has(e.type)||Be(e)}function Be(e){return/(?:statement|declaration|expression|assignment|return|throw|raise|break|continue|yield|with_item)$/u.test(e.type)||de.has(e.type)}function ot(e,n,t){let o=0;for(let r=n;r<=t;r+=1)o+=(e[r]?.length??0)+10;return o}function it(e){return e.constructKind.length+e.signature.length+80+e.lines.reduce((n,t)=>n+t.text.length+t.depth*2+10,0)}function Re(e,n,t,o,r,a){let s=P(e,n);if(!s)return null;let l=O(e,n),c=ne(e,n,t,o),u=a?c?.startLine??t:t,d=a?c?.endLine??o:o,N=(c?.startLine===u&&c.endLine===d?I(s.rootNode,u,d):null)??M(s.rootNode,u,d);if(!N)return null;let b=new Map,h=new Map,C=new Map,x=(m,L)=>{if(m<u||m>d)return;let _=b.get(m)??new Set;_.add(L),b.set(m,_)};c&&x(c.startLine,"signature");for(let m of r)x(m,"anchor");U(N,m=>{let L=ge[m.type];if(L&&x(m.startPosition.row,L),L==="shape"&&at(h,m,N,u,d),m.type==="call_expression"){let i=(m.childForFieldName("function")??m.namedChild(0))?.text.split(".").at(-1);if(Fe(m)){x(m.startPosition.row,"shape");let f=V(m.text);f.length<=oe&&C.set(m.startPosition.row,f)}if(i&&Ye.has(i)){x(m.startPosition.row,"lifecycle");let f=V(m.text);f.length<=oe&&C.set(m.startPosition.row,f)}}de.has(m.type)&&x(m.startPosition.row,"binding")});let S=G(e,n);for(let m of S?.callSites??[])m.line<u||m.line>d||(x(m.line,"call"),m.calleeLeaf==="catch"&&x(m.line,"catch"));let v=[...b.entries()].sort(([m],[L])=>m-L).map(([m,L])=>({line:m,signals:Ce.filter(_=>L.has(_)),text:C.get(m)??V(l[m]??"")})).filter(m=>m.text.length>0||m.signals.includes("anchor"));return{...c?{callable:c}:{},rangeStart:u,rangeEnd:d,sourceLines:l,candidates:v,shapes:[...h.values()].sort((m,L)=>m.startLine-L.startLine)}}function at(e,n,t,o,r){if(n.startPosition.row<o||n.endPosition.row>r)return;let a=n.childForFieldName("key")??n.childForFieldName("name")??n.namedChild(0),s=V(a?.text??"");if(!s||s.includes(`
3
+ `)||s.length>60)return;let l=st(n,t);if(l.startPosition.row<o||l.endPosition.row>r)return;let c=`${l.startPosition.row}:${l.endPosition.row}`,u=e.get(c)??{startLine:l.startPosition.row,endLine:l.endPosition.row,fields:[]};u.fields.some(d=>d.name===s&&d.line===n.startPosition.row)||u.fields.push({name:s,line:n.startPosition.row}),e.set(c,u)}function st(e,n){let t=e.parent;for(;t&&t!==n.parent;){if(Ne.has(t.type))return t;if(t===n)break;t=t.parent}return e.parent??e}function ne(e,n,t,o){return G(e,n)?.callables.filter(r=>r.startLine<=t&&r.endLine>=o).sort((r,a)=>r.endLine-r.startLine-(a.endLine-a.startLine)||r.startLine-a.startLine)[0]}function U(e,n){n(e);for(let t of e.namedChildren)U(t,n)}function Ee(e,n,t,o){o(e);for(let r of e.namedChildren)r.startPosition.row>n||r.endPosition.row<t||Ee(r,n,t,o)}function V(e){return e.trim().replace(/\s+/gu," ")}function Fe(e){if(e.type!=="call_expression")return!1;let n=e.childForFieldName("arguments")??e.namedChildren.find(o=>o.type==="arguments"||o.type==="argument_list");if(!n)return!1;let t=!1;return U(n,o=>{Ne.has(o.type)&&(t=!0)}),t}function ct(e){let n={};for(let t of Ce){let o=e.filter(r=>r.signals.includes(t)).length;o>0&&(n[t]=o)}return n}function lt(e,n){let t=new Map;for(let a of e){let s=a.signals.join(",");t.set(s,(t.get(s)??0)+1)}let o=new Set(_e),r=a=>{let s=t.get(a.signals.join(","))??1,l=Math.min(...a.signals.map(d=>n[d]??1)),c=a.signals.some(d=>o.has(d))?3:1,u=Math.max(0,a.signals.length-1)*1e3;return c*(1e3/s+1e3/l)+u};return[...e].sort((a,s)=>r(s)-r(a)||s.line-a.line)}var de=new Set(["lexical_declaration","variable_declarator","const_item","static_item","let_declaration","assignment"]);function ut(e,n,t){let o=[],r=/\b(?:describe|it|test)(?:\.(?:only|skip|todo))?\s*\(\s*(['"`])([^'"`]+)\1/u;for(let a=n;a<=t;a+=1){let s=r.exec(e[a]??"")?.[2];if(!(!s||o.includes(s))&&(o.push(s),o.length>=Oe))break}return o}var dt=new Set(["arrow_function","class_declaration","constructor_declaration","field_definition","function_declaration","function_definition","function_expression","function_item","generator_function_declaration","generator_function","lexical_declaration","method","method_declaration","method_definition","object_method","variable_declaration"]);function ft(e,n,t){let o=P(e,n)?.rootNode??null,r=mt(o,t);if(!r)return null;let a=O(e,n);if(a.length===0)return null;let s=Math.max(0,r.startPosition.row),l=r.endPosition.column===0?r.endPosition.row-1:r.endPosition.row;return{type:r.type,startLine:s,endLine:Math.min(a.length-1,Math.max(s,l))}}function Et(e,n,t,o,r){let a=ee(e,n,o,r,[t]),s=a.startLine===a.endLine&&/(?:=>|\(|\{|\[|,)\s*$/u.test(O(e,n)[a.startLine]??"");if(!s&&(a.startLine>o||a.endLine<r))return a;let l=ft(e,n,t);return s&&l?{startLine:l.startLine,endLine:l.endLine}:l&&l.startLine>=o&&l.endLine<=r?{startLine:l.startLine,endLine:l.endLine}:{startLine:o,endLine:r}}function mt(e,n){if(!e||!Ae(e,n))return null;let t=Te(e,n);for(;t;){if(dt.has(t.type))return t;t=t.parent}return null}function Te(e,n){let t=e.namedChildren.filter(o=>Ae(o,n)).sort((o,r)=>Pe(o)-Pe(r));return t.length>0?Te(t[0],n):e}function Ae(e,n){return e.startPosition.row<=n&&e.endPosition.row>=n}function Pe(e){return e.endIndex-e.startIndex}export{Ct as a,_t as b,Nt as c,ee as d,xt as e,vt as f,ft as g,Et as h};
4
+ //# sourceMappingURL=chunk-YF25RQER.js.map
@@ -0,0 +1,2 @@
1
+ import{d as f}from"./chunk-SRIZDEWX.js";import{a as L}from"./chunk-T2PBOVDI.js";import{n as a,z as l}from"./chunk-NP4JFCLE.js";import{c as i,d as b,e as u,k as c}from"./chunk-DRENNWRG.js";function S(o,s){let t=L(o,s);if(!t)return[];let e=new f(o).definitionsForFile(t.relativePath).filter(r=>r.symbol!==t.symbol).filter(r=>c(t.symbol,r.symbol)).sort((r,m)=>r.startLine-m.startLine||r.endLine-m.endLine).map(r=>({symbol:r.symbol,shortName:i(r.symbol),startLine:r.startLine,endLine:r.endLine,kind:u(r.symbol)??"unknown"}));return a(t.relativePath)!=="clojure"?e:d(e,y(o,t))}function y(o,s){let t=b(s.symbol);if(!t)return[];let n=i(s.symbol);return(l(o,s.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===t).map(e=>({symbol:`${s.symbol}${e.memberName}().`,shortName:`${n}:${e.memberName}()`,startLine:e.startLine,endLine:e.endLine,kind:e.memberKind}))}function d(o,s){let t=new Map;for(let n of[...o,...s])t.set(`${n.shortName}:${n.startLine}:${n.endLine}`,n);return[...t.values()].sort((n,e)=>n.startLine-e.startLine||n.endLine-e.endLine)}export{S as a};
2
+ //# sourceMappingURL=chunk-YKHL4J3G.js.map
@@ -0,0 +1,4 @@
1
+ import{b as l,e as m}from"./chunk-T2PBOVDI.js";import{c as r}from"./chunk-DRENNWRG.js";function d(s,e){let t=l(s,e);return t.match?{matched:!0,resolved:{symbol:t.match.symbol,shortName:r(t.match.symbol),relativePath:t.match.relativePath},otherMatches:t.candidates.map(n=>({shortName:n.shortName,relativePath:n.relativePath,startLine:n.startLine})),totalMatches:t.total}:{matched:!1,suggestions:m(s,e,5)}}function g(s){let e=s.entries[0];return s.requested===1&&e?.status==="matched"&&e.kind==="source"&&(!e.rangeCoverage||e.rangeCoverage.referencedDefinitions===0)&&e.results.length===1?e.results[0]:null}function u(s,e,t){if(!t)return d(s,e);let n={file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:o(t.startLine),endLine:o(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
2
+ `).map((h,c)=>({line:o(t.startLine+c),text:h}))},a=d(s,e),i=a.totalMatches??0;return!a.matched||!a.resolved||i<=1?n:{...n,resolution:{selected:a.resolved,alternatives:a.otherMatches??[],totalMatches:i}}}function f(s){return{requested:s.requested,matched:s.matched,ambiguous:s.ambiguous,missing:s.missing,entries:s.entries.map(e=>({selector:e.selector,status:e.status,kind:e.kind,totalCandidates:e.totalCandidates,sources:e.results.map(t=>({file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:o(t.startLine),endLine:o(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
3
+ `).map((n,a)=>({line:o(t.startLine+a),text:n}))})),definitions:e.definitions,...e.fileCoverage?{fileCoverage:e.fileCoverage}:{},...e.rangeCoverage?{rangeCoverage:e.rangeCoverage}:{},candidates:e.candidates,omittedCandidates:e.omittedCandidates,suggestions:e.suggestions,...e.reason?{reason:e.reason}:{}})),literalValues:s.bindingClosure.inline}}function v(s,e,t){let n=g(t);return n?u(s,e[0],n):f(t)}function o(s){return s+1}export{d as a,g as b,u as c,f as d,v as e};
4
+ //# sourceMappingURL=chunk-YLNCTPOI.js.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-DXEJ4FLZ.js";function i(r,s,e={}){let a=t(r,s,{families:["dataflow"],...e.maxDepth!==void 0?{maxDepth:e.maxDepth}:{},...e.maxEdges!==void 0?{maxEdges:e.maxEdges}:{}});return{kind:"value-flow",targets:a.targets,edges:a.edges,coverage:{status:a.coverage.status,basis:"proved-bounded-static-value-flow",analysisBasis:"partial-system-definition-use",providers:["bounded-static-value-flow","typescript-local-dependence"],supportedRelations:["compiler-identified local definitions reaching local reads through a TypeScript control-flow graph","right-hand-side local reads supplying assignments and declarations","candidate closure captures and bounded same-owner field flow with explicit evidence strength","direct argument-to-parameter forwarding at compiler-resolved calls","bounded mechanically derived static arguments","callee return value to a consumed compiler-resolved call result"],unsupportedRelations:["general heap alias and cross-instance field points-to flow","exceptional control and value flow","closure invocation order","downstream local definition-use after a call result","dynamic calls not resolved by the semantic provider"],graph:a.coverage}}}export{i as a};
2
+ //# sourceMappingURL=chunk-YR7VRWNX.js.map
@@ -0,0 +1,3 @@
1
+ import{a as f}from"./chunk-T2PBOVDI.js";import{a as d,c as m}from"./chunk-DRENNWRG.js";function u(e,r){let c=f(e,r);if(!c)return[];let t=e.get(`SELECT symbol, enclosing_symbol FROM global_symbols
2
+ WHERE id = ? LIMIT 1`,c.symbolId);if(!t)return[];let o=[{symbol:t.symbol,shortName:m(t.symbol),depth:0}],n=t.enclosing_symbol,i=1,y=new Set([t.symbol]);for(;n&&!y.has(n)&&i<20;){y.add(n);let s=e.get("SELECT symbol, enclosing_symbol FROM global_symbols WHERE symbol = ?",n);if(!s)break;o.push({symbol:s.symbol,shortName:m(s.symbol),depth:i}),n=s.enclosing_symbol,i++}if(o.length>1)return o;let b=d(t.symbol);if("kind"in b)return o;let l=b.descriptors;if(l.length<=1)return o;let h=[o[0]];for(let s=l.length-2,p=1;s>=0;s--,p++){let g=l.slice(0,s+1).map(a=>a.suffix==="method"?`${a.name}()`:a.name.replace(/\.(ts|tsx|js|jsx|mjs|cjs|py|pyi|rs|java|scala|kt|kts|rb|go|cs|vb|dart|php|c|cc|cpp|cxx|h|hpp)$/,"")).join(":");h.push({symbol:g,shortName:g,depth:p})}return h}function N(e,r){return u(e,r)}export{u as a,N as b};
3
+ //# sourceMappingURL=chunk-YT4IQBET.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-YUKYB54I.js.map
@@ -0,0 +1,2 @@
1
+ import{i}from"./chunk-XIPGCT3D.js";var c=new Set(["aix","android","darwin","freebsd","haiku","linux","openbsd","sunos","win32","cygwin","netbsd"]);function d(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=n;return t.version!==1||typeof t.pid!="number"||!Number.isSafeInteger(t.pid)||t.pid<=0||typeof t.platform!="string"||!c.has(t.platform)||typeof t.startToken!="string"||t.startToken.trim()===""?null:{version:1,pid:t.pid,platform:t.platform,startToken:t.startToken}}function p(n,t){return n.version===t.version&&n.pid===t.pid&&n.platform===t.platform&&n.startToken===t.startToken}import{execFileSync as y}from"child_process";import{platform as P}from"os";var I=1e3,a=16*1024,s;function N(n,t=u){if(!Number.isSafeInteger(n)||n<=0)return null;let e=n===process.pid&&t===u;if(e&&s)return{...s};try{let r=b(n,t);if(!r)return null;let o={version:1,pid:n,platform:t.platform,startToken:r};return e&&(s=o),{...o}}catch{return null}}function b(n,t){if(t.platform==="linux"||t.platform==="android")return T(t.readFile(`/proc/${n}/stat`));if(t.platform==="win32"){let e=`([DateTimeOffset](Get-Process -Id ${n} -ErrorAction Stop).StartTime).ToUnixTimeMilliseconds()`;return m(t.run("powershell.exe",["-NoProfile","-NonInteractive","-Command",e]))}return t.platform==="darwin"||t.platform==="freebsd"||t.platform==="openbsd"||t.platform==="netbsd"?m(t.run("ps",["-p",String(n),"-o","lstart="])):null}function T(n){let t=n.lastIndexOf(")");if(t<0)return null;let r=n.slice(t+1).trim().split(/\s+/)[19];return r&&/^\d+$/.test(r)?r:null}function m(n){let t=n.trim();return t===""?null:t}var u={platform:P(),readFile(n){return i(n,{maxBytes:a,inputKind:"process identity pseudo-file"})},run(n,t){return y(n,[...t],{encoding:"utf8",timeout:I,maxBuffer:a,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}};function h(){return performance.now()}function _(n,t,e,r,o,l){if(n>0)return e;let f=Math.max(0,Math.min(l,t-1));return Math.min(o,r*2**f)}export{d as a,p as b,N as c,h as d,_ as e};
2
+ //# sourceMappingURL=chunk-Z2KGMIL4.js.map
@@ -0,0 +1,3 @@
1
+ import{e as i}from"./chunk-7Z4GMCHM.js";import{a as o}from"./chunk-6LS3IG2I.js";import{C as s}from"./chunk-JSHDCVUM.js";function u(r,e){let t=s(r,e.relativePath);if(t.length===0)return!1;let n=i(e.symbol);if(!n)return!1;let c=t.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
2
+ `),a=o(n);return new RegExp(`^\\s*export\\s+(?:default\\s+)?(?:(?:async\\s+)?function\\s+${a}\\b|(?:abstract\\s+)?class\\s+${a}\\b|(?:interface|type|enum|namespace|module)\\s+${a}\\b|(?:const|let|var)\\s+${a}\\b)`,"m").test(c)?!0:p(t,n)}function p(r,e){if(!e)return!1;let t=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${o(e)}\\b`);return r.some(n=>t.test(n))}export{u as a};
3
+ //# sourceMappingURL=chunk-Z2QB75BS.js.map