scip-query 0.23.0 → 0.26.0

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 (650) hide show
  1. package/CHANGELOG.md +491 -2
  2. package/README.md +111 -122
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/by-kind-PRVFAGTQ.js +2 -0
  5. package/dist/call-graph-DVPAQV2F.js +2 -0
  6. package/dist/call-graph-evidence-CUtj8V2I.d.ts +19 -0
  7. package/dist/chunk-2FSBGL5P.js +2 -0
  8. package/dist/chunk-2HLAFUCY.js +2 -0
  9. package/dist/chunk-2IWUT6CJ.js +3 -0
  10. package/dist/chunk-2KNN7GTQ.js +2 -0
  11. package/dist/chunk-2LHXRE2B.js +8 -0
  12. package/dist/{chunk-EG2CPZMJ.js → chunk-2YXE77TJ.js} +2 -2
  13. package/dist/chunk-36SGVCGX.js +2 -0
  14. package/dist/chunk-3ABBFPTP.js +2 -0
  15. package/dist/chunk-3IVFU4FD.js +3 -0
  16. package/dist/chunk-3JIQS44J.js +7 -0
  17. package/dist/chunk-3ZRB6DNK.js +7 -0
  18. package/dist/{chunk-6YTSKJJ3.js → chunk-42EOW5VI.js} +1 -1
  19. package/dist/{chunk-6I6L7Z62.js → chunk-4BHGBMNO.js} +2 -2
  20. package/dist/chunk-4BP3UBDG.js +2 -0
  21. package/dist/chunk-4D6RO7G4.js +2 -0
  22. package/dist/chunk-4FEWQ6RH.js +2 -0
  23. package/dist/chunk-4IGEOBG7.js +2 -0
  24. package/dist/chunk-4QZXBUKC.js +2 -0
  25. package/dist/chunk-4WBDEVX2.js +4 -0
  26. package/dist/chunk-4WCUBZU3.js +8 -0
  27. package/dist/chunk-4WTUBQ36.js +40 -0
  28. package/dist/chunk-4XQ4O6IM.js +3 -0
  29. package/dist/chunk-55UQAMZO.js +4 -0
  30. package/dist/chunk-5D2LVK7O.js +125 -0
  31. package/dist/chunk-5IYJ56TT.js +2 -0
  32. package/dist/chunk-5PLMJC7Q.js +2 -0
  33. package/dist/chunk-5TNQJUR2.js +5 -0
  34. package/dist/chunk-62BDNPMI.js +2 -0
  35. package/dist/chunk-64DZ5TXR.js +7 -0
  36. package/dist/chunk-65245JCM.js +2 -0
  37. package/dist/chunk-6FFVZZL4.js +2 -0
  38. package/dist/chunk-6KO5JHAR.js +2 -0
  39. package/dist/chunk-6LRXOOSX.js +2 -0
  40. package/dist/chunk-6LSEIIF7.js +2 -0
  41. package/dist/chunk-6YMNWD3H.js +6 -0
  42. package/dist/chunk-72AD6ZRR.js +5 -0
  43. package/dist/chunk-73AAKPUC.js +4 -0
  44. package/dist/chunk-76CZ77DF.js +2 -0
  45. package/dist/chunk-7VPEEAAG.js +2 -0
  46. package/dist/chunk-7WTPQ4NX.js +14 -0
  47. package/dist/chunk-7Y5T6XDP.js +2 -0
  48. package/dist/chunk-A2IIGFMJ.js +5 -0
  49. package/dist/chunk-AB5KCTEV.js +2 -0
  50. package/dist/chunk-AC566WBP.js +6 -0
  51. package/dist/chunk-AGWFSTXC.js +3 -0
  52. package/dist/chunk-AOSIYPTA.js +2 -0
  53. package/dist/chunk-AUVEWPIF.js +2 -0
  54. package/dist/chunk-B56T42J3.js +25 -0
  55. package/dist/chunk-BIQEF5NE.js +2 -0
  56. package/dist/chunk-BL6XJKTA.js +3 -0
  57. package/dist/chunk-BMKOQJRI.js +2 -0
  58. package/dist/chunk-BOZ4EXBB.js +3 -0
  59. package/dist/chunk-BUTWYEPH.js +2 -0
  60. package/dist/chunk-BZB4QPIP.js +2 -0
  61. package/dist/{chunk-ILTDAWEF.js → chunk-CE357GEE.js} +4 -4
  62. package/dist/chunk-CFN45HFP.js +2 -0
  63. package/dist/chunk-CFYMZFXT.js +368 -0
  64. package/dist/chunk-CN5EH7O3.js +2 -0
  65. package/dist/chunk-D254DNNQ.js +4 -0
  66. package/dist/chunk-D3FDISIC.js +2 -0
  67. package/dist/chunk-D3NX5XIE.js +3 -0
  68. package/dist/chunk-DA7RPPDF.js +3 -0
  69. package/dist/chunk-DDMC3FON.js +3 -0
  70. package/dist/chunk-DIO3FUSG.js +2 -0
  71. package/dist/chunk-DJ2NNSUK.js +3 -0
  72. package/dist/chunk-DKYQIM3C.js +18 -0
  73. package/dist/{chunk-JTQVMR42.js → chunk-DOOEL2IV.js} +2 -2
  74. package/dist/chunk-DVFP6PZI.js +2 -0
  75. package/dist/chunk-E3FDPXZK.js +2 -0
  76. package/dist/chunk-E7YNJLCB.js +2 -0
  77. package/dist/chunk-EFGW5JPH.js +2 -0
  78. package/dist/chunk-EJVTR244.js +13 -0
  79. package/dist/chunk-EOV7RTRZ.js +2 -0
  80. package/dist/chunk-ETOIKRHO.js +2 -0
  81. package/dist/chunk-EYK3ZAO2.js +3 -0
  82. package/dist/chunk-F2V2LPET.js +52 -0
  83. package/dist/chunk-F4LUHJTF.js +2 -0
  84. package/dist/chunk-F4PUT6IT.js +2 -0
  85. package/dist/chunk-F56GCXXS.js +5 -0
  86. package/dist/chunk-FC2EVQRM.js +2 -0
  87. package/dist/chunk-FL7NBMHP.js +3 -0
  88. package/dist/chunk-FMRN2TRL.js +3 -0
  89. package/dist/chunk-FVULPZDF.js +20 -0
  90. package/dist/chunk-GCKCF5FL.js +43 -0
  91. package/dist/chunk-GH2PYF46.js +2 -0
  92. package/dist/chunk-GHJAGXIP.js +2 -0
  93. package/dist/{chunk-WIWY3CRX.js → chunk-GMVSHUKZ.js} +2 -2
  94. package/dist/chunk-GS6KDO4R.js +2 -0
  95. package/dist/chunk-GUUBXNN7.js +2 -0
  96. package/dist/chunk-GVWX5T43.js +80 -0
  97. package/dist/chunk-GZKFETP5.js +2 -0
  98. package/dist/chunk-H4EQHO6J.js +9 -0
  99. package/dist/chunk-H73WY2RM.js +2 -0
  100. package/dist/chunk-H75GSPRV.js +60 -0
  101. package/dist/chunk-HDR3AHSV.js +61 -0
  102. package/dist/chunk-HQBSL74Y.js +2 -0
  103. package/dist/chunk-HRRFKWPZ.js +2 -0
  104. package/dist/chunk-HXENDJC6.js +2 -0
  105. package/dist/chunk-IIBAZNSW.js +21 -0
  106. package/dist/chunk-INLMWEUU.js +12 -0
  107. package/dist/chunk-IWQPAF4F.js +2 -0
  108. package/dist/chunk-IZJ6YUKP.js +35 -0
  109. package/dist/chunk-J2TMAIN5.js +60 -0
  110. package/dist/chunk-J5FJMODQ.js +142 -0
  111. package/dist/chunk-J7HZPIO3.js +2 -0
  112. package/dist/chunk-JEVRKFRL.js +2 -0
  113. package/dist/chunk-JFXSGAEB.js +30 -0
  114. package/dist/chunk-JVRTHGFS.js +3 -0
  115. package/dist/chunk-JYWEX7RR.js +360 -0
  116. package/dist/chunk-K3YL22N6.js +2 -0
  117. package/dist/chunk-K4CN7GXK.js +12 -0
  118. package/dist/chunk-K5TBVXU4.js +30 -0
  119. package/dist/chunk-KDDIE2DP.js +9 -0
  120. package/dist/chunk-KHWRRPV4.js +2 -0
  121. package/dist/chunk-KI6NBKDY.js +14 -0
  122. package/dist/chunk-KU3QRSTH.js +2 -0
  123. package/dist/chunk-KZBJWZJB.js +2 -0
  124. package/dist/chunk-L7GFM3NP.js +3 -0
  125. package/dist/chunk-LMO6PK3V.js +35 -0
  126. package/dist/chunk-LN4YXJJU.js +2 -0
  127. package/dist/chunk-LOVIZBJ4.js +43 -0
  128. package/dist/chunk-LPCRK4A2.js +11 -0
  129. package/dist/chunk-MMHZKBFA.js +2 -0
  130. package/dist/{chunk-M2O5NY6W.js → chunk-MOQQBQRD.js} +2 -2
  131. package/dist/chunk-N2WN6I3L.js +2 -0
  132. package/dist/chunk-N3ORQT7L.js +2 -0
  133. package/dist/chunk-NAZ3RAIW.js +2 -0
  134. package/dist/chunk-NDUNO5JQ.js +2 -0
  135. package/dist/chunk-NEIWRNAZ.js +4 -0
  136. package/dist/chunk-NJJMVD65.js +2 -0
  137. package/dist/chunk-NLOQOBXI.js +20 -0
  138. package/dist/chunk-NOLZOVCU.js +2 -0
  139. package/dist/chunk-NOWINRRN.js +2 -0
  140. package/dist/chunk-NZAXKGRL.js +16 -0
  141. package/dist/chunk-O2C4UILI.js +2 -0
  142. package/dist/chunk-O3RHA6ZT.js +3 -0
  143. package/dist/chunk-O4UZSPPI.js +3 -0
  144. package/dist/chunk-OGFV2BUX.js +2 -0
  145. package/dist/chunk-OZCJXZK6.js +499 -0
  146. package/dist/chunk-P6ODM7BY.js +2 -0
  147. package/dist/{chunk-XBGWL66K.js → chunk-PAVGPRHJ.js} +2 -2
  148. package/dist/chunk-PH52RA7D.js +2 -0
  149. package/dist/chunk-PKN354TH.js +3 -0
  150. package/dist/chunk-PWOASWEG.js +11 -0
  151. package/dist/chunk-QIWXRW72.js +2 -0
  152. package/dist/chunk-QJRMOK5N.js +2 -0
  153. package/dist/{chunk-YXPUP5G2.js → chunk-QOIXNWQR.js} +2 -2
  154. package/dist/chunk-QXEUDXBT.js +3 -0
  155. package/dist/chunk-QYUVVBMR.js +6 -0
  156. package/dist/chunk-QZ7KQZRN.js +2 -0
  157. package/dist/chunk-R6LQBUDH.js +2 -0
  158. package/dist/chunk-RBS42E55.js +20 -0
  159. package/dist/chunk-RSJKPCFX.js +26 -0
  160. package/dist/chunk-S6CZA3MV.js +2 -0
  161. package/dist/chunk-STMVAHJP.js +2 -0
  162. package/dist/chunk-SYVPTTVW.js +2 -0
  163. package/dist/chunk-T3I6NHBH.js +2 -0
  164. package/dist/chunk-T6DK3ZP7.js +2 -0
  165. package/dist/chunk-TKD34PHN.js +4 -0
  166. package/dist/chunk-TNNQFH7W.js +2 -0
  167. package/dist/chunk-TNV7SSUF.js +2 -0
  168. package/dist/chunk-TO7ZR3EH.js +8 -0
  169. package/dist/chunk-TOU3CHK4.js +2 -0
  170. package/dist/chunk-TRBI4UKT.js +2 -0
  171. package/dist/chunk-TZCVNCAN.js +4 -0
  172. package/dist/chunk-U4LZA5LL.js +3 -0
  173. package/dist/chunk-U5RIG3JP.js +3 -0
  174. package/dist/chunk-UP5KXN2I.js +2 -0
  175. package/dist/chunk-UQFR3NDH.js +5 -0
  176. package/dist/chunk-UXYXF7GV.js +2 -0
  177. package/dist/chunk-VB3GOKOS.js +2 -0
  178. package/dist/chunk-VF5JZICY.js +2 -0
  179. package/dist/chunk-VTY3VK6E.js +2 -0
  180. package/dist/chunk-VX2O4RIS.js +2 -0
  181. package/dist/chunk-WKPV2TDZ.js +2 -0
  182. package/dist/chunk-WOFQ5DTB.js +2 -0
  183. package/dist/chunk-WS4C6TCK.js +2 -0
  184. package/dist/chunk-WXU3DGPU.js +2 -0
  185. package/dist/chunk-X6RMKHJQ.js +81 -0
  186. package/dist/{chunk-4ILJCCXV.js → chunk-XHMN6ZX7.js} +2 -2
  187. package/dist/chunk-XHTVFLWW.js +2 -0
  188. package/dist/chunk-XKIDJCIK.js +2 -0
  189. package/dist/chunk-XTYTYZPT.js +2 -0
  190. package/dist/chunk-Y2JHHTTA.js +2 -0
  191. package/dist/chunk-YGVRMGYN.js +4 -0
  192. package/dist/chunk-YNQCGEQE.js +2 -0
  193. package/dist/chunk-YOQVEXVE.js +14 -0
  194. package/dist/chunk-YRT2WLYY.js +2 -0
  195. package/dist/chunk-YTAP5Y2G.js +2 -0
  196. package/dist/chunk-YTYWI7VB.js +2 -0
  197. package/dist/chunk-YULZRALL.js +2 -0
  198. package/dist/chunk-Z33WQG4Q.js +2 -0
  199. package/dist/chunk-ZGTYGDMF.js +16 -0
  200. package/dist/chunk-ZHMRSZFD.js +43 -0
  201. package/dist/chunk-ZHSP366W.js +10 -0
  202. package/dist/chunk-ZIBYCYKK.js +7 -0
  203. package/dist/{chunk-GAS2LJMP.js → chunk-ZLADLUE6.js} +3 -3
  204. package/dist/chunk-ZO4YXUT6.js +4 -0
  205. package/dist/{chunk-HYO3NP5Q.js → chunk-ZR4HBC2H.js} +2 -2
  206. package/dist/cli-main.js +6 -6
  207. package/dist/cli.js +1 -1
  208. package/dist/{code-B17qEMbt.d.ts → code-BNyrCF3_.d.ts} +3 -2
  209. package/dist/code-IL5WH3NZ.js +2 -0
  210. package/dist/code-result-json-ANTBEDFP.js +4 -0
  211. package/dist/command-descriptors-HEEMDHTU.js +222 -0
  212. package/dist/deps-EOWFC6FD.js +2 -0
  213. package/dist/direct-navigation-Y5B6OSIQ.js +3 -0
  214. package/dist/{exploration-topology-BG4v30HZ.d.ts → exploration-topology-CSgEyAz-.d.ts} +3 -1
  215. package/dist/files-K4AI3JUM.js +2 -0
  216. package/dist/frontend-profile-roles-D7eCum8P.d.ts +10 -0
  217. package/dist/{health-CPp2Jf1Z.d.ts → health-BtfmNrfa.d.ts} +58 -74
  218. package/dist/hierarchy-6W5NDIFI.js +2 -0
  219. package/dist/imports-WH365QY4.js +2 -0
  220. package/dist/index.d.ts +13 -1
  221. package/dist/index.js +1 -1
  222. package/dist/members-K3PHMF5S.js +2 -0
  223. package/dist/methods-E7KVMBX4.js +2 -0
  224. package/dist/output-continuation-command-BJSY67SN.js +3 -0
  225. package/dist/output-pagination-UZJ5ACIX.js +24 -0
  226. package/dist/postinstall.js +1 -1
  227. package/dist/project-reindex-EP24WT4X.js +3 -0
  228. package/dist/queries/affected.js +1 -1
  229. package/dist/queries/architecture.d.ts +15 -4
  230. package/dist/queries/architecture.js +1 -1
  231. package/dist/queries/bottlenecks.js +1 -1
  232. package/dist/queries/by-kind.js +1 -1
  233. package/dist/queries/call-graph.d.ts +3 -1
  234. package/dist/queries/call-graph.js +1 -1
  235. package/dist/queries/change-surface.d.ts +1 -0
  236. package/dist/queries/change-surface.js +1 -1
  237. package/dist/queries/cleanup-plan.d.ts +3 -3
  238. package/dist/queries/cleanup-plan.js +1 -1
  239. package/dist/queries/co-change.d.ts +20 -2
  240. package/dist/queries/co-change.js +1 -1
  241. package/dist/queries/code.d.ts +1 -1
  242. package/dist/queries/code.js +1 -1
  243. package/dist/queries/complexity.d.ts +6 -3
  244. package/dist/queries/complexity.js +1 -1
  245. package/dist/queries/context.d.ts +1 -7
  246. package/dist/queries/context.js +1 -1
  247. package/dist/queries/coupling.js +1 -1
  248. package/dist/queries/cycles.js +1 -1
  249. package/dist/queries/dead.d.ts +2 -0
  250. package/dist/queries/dead.js +1 -1
  251. package/dist/queries/decorative-checkers.js +1 -1
  252. package/dist/queries/dependence-slice.d.ts +46 -22
  253. package/dist/queries/dependence-slice.js +1 -1
  254. package/dist/queries/dependency-depth.d.ts +1 -7
  255. package/dist/queries/dependency-depth.js +1 -1
  256. package/dist/queries/deps.js +1 -1
  257. package/dist/queries/diff-impact.d.ts +3 -1
  258. package/dist/queries/diff-impact.js +1 -1
  259. package/dist/queries/doc-drift.js +1 -1
  260. package/dist/queries/drift.d.ts +1 -1
  261. package/dist/queries/drift.js +1 -1
  262. package/dist/queries/duplicate-bodies.d.ts +29 -2
  263. package/dist/queries/duplicate-bodies.js +1 -1
  264. package/dist/queries/entry-map.d.ts +2 -4
  265. package/dist/queries/entry-map.js +1 -1
  266. package/dist/queries/evidence.d.ts +121 -61
  267. package/dist/queries/evidence.js +1 -1
  268. package/dist/queries/fan.js +1 -1
  269. package/dist/queries/files.js +1 -1
  270. package/dist/queries/health.d.ts +1 -1
  271. package/dist/queries/health.js +1 -1
  272. package/dist/queries/hierarchy.d.ts +2 -2
  273. package/dist/queries/hierarchy.js +1 -1
  274. package/dist/queries/hotspots.d.ts +1 -1
  275. package/dist/queries/hotspots.js +1 -1
  276. package/dist/queries/imports.d.ts +1 -0
  277. package/dist/queries/imports.js +1 -1
  278. package/dist/queries/incomplete-migration.d.ts +3 -3
  279. package/dist/queries/incomplete-migration.js +1 -1
  280. package/dist/queries/index.d.ts +17 -65
  281. package/dist/queries/index.js +1 -1
  282. package/dist/queries/locality-candidates.d.ts +4 -4
  283. package/dist/queries/locality-candidates.js +1 -1
  284. package/dist/queries/members.d.ts +2 -2
  285. package/dist/queries/members.js +1 -1
  286. package/dist/queries/methods.js +1 -1
  287. package/dist/queries/not-implemented.d.ts +2 -6
  288. package/dist/queries/not-implemented.js +1 -1
  289. package/dist/queries/outline.js +1 -1
  290. package/dist/queries/passthrough-candidates.d.ts +9 -1
  291. package/dist/queries/passthrough-candidates.js +1 -1
  292. package/dist/queries/react-component-duplicates.d.ts +19 -3
  293. package/dist/queries/react-component-duplicates.js +1 -1
  294. package/dist/queries/react-hook-candidates.d.ts +22 -3
  295. package/dist/queries/react-hook-candidates.js +1 -1
  296. package/dist/queries/react-large-component-pressure.d.ts +17 -3
  297. package/dist/queries/react-large-component-pressure.js +1 -1
  298. package/dist/queries/recent-duplicates.js +1 -1
  299. package/dist/queries/redundant-reexports.d.ts +4 -14
  300. package/dist/queries/redundant-reexports.js +1 -1
  301. package/dist/queries/refs.d.ts +4 -1
  302. package/dist/queries/refs.js +1 -1
  303. package/dist/queries/review.d.ts +188 -0
  304. package/dist/queries/review.js +2 -0
  305. package/dist/queries/similar-files.d.ts +7 -10
  306. package/dist/queries/similar-files.js +1 -1
  307. package/dist/queries/similar-signatures.js +1 -1
  308. package/dist/queries/similar.d.ts +19 -1
  309. package/dist/queries/similar.js +1 -1
  310. package/dist/queries/slice-cohesion.d.ts +205 -0
  311. package/dist/queries/slice-cohesion.js +2 -0
  312. package/dist/queries/source-inspection.d.ts +6 -202
  313. package/dist/queries/source-inspection.js +1 -1
  314. package/dist/queries/source-search.d.ts +2 -3
  315. package/dist/queries/source-search.js +1 -1
  316. package/dist/queries/stats.d.ts +1 -0
  317. package/dist/queries/stats.js +1 -1
  318. package/dist/queries/surface.js +1 -1
  319. package/dist/queries/symbols.js +1 -1
  320. package/dist/queries/system.d.ts +4 -2
  321. package/dist/queries/system.js +1 -1
  322. package/dist/queries/test-quality.d.ts +1 -1
  323. package/dist/queries/test-quality.js +1 -1
  324. package/dist/queries/twin-drift.d.ts +23 -7
  325. package/dist/queries/twin-drift.js +1 -1
  326. package/dist/queries/unused-imports.js +1 -1
  327. package/dist/queries/unused-params.d.ts +3 -15
  328. package/dist/queries/unused-params.js +1 -1
  329. package/dist/queries/vue-component-duplicates.js +1 -1
  330. package/dist/queries/vue-composable-candidates.js +1 -1
  331. package/dist/queries/vue-large-view-pressure.js +1 -1
  332. package/dist/query-service-fastpath.js +5 -5
  333. package/dist/query-service-server.js +4 -4
  334. package/dist/refs-CCBJG7WK.js +2 -0
  335. package/dist/refs-pagination-DRNLVU4S.js +2 -0
  336. package/dist/reindex-worker.js +79 -29
  337. package/dist/reindex.js +45 -45
  338. package/dist/repository-cache-worker.js +2 -0
  339. package/dist/runtime.d.ts +8 -8
  340. package/dist/runtime.js +3 -4
  341. package/dist/rust-semantic-session-server.js +1 -1
  342. package/dist/rust-semantic-session-worker.js +1 -1
  343. package/dist/rust-semantic-worker.js +1 -1
  344. package/dist/service-queries-2WAJI7R6.js +6 -0
  345. package/dist/source-inspection-91U9zdO3.d.ts +341 -0
  346. package/dist/{source-search-types-Dwz8KeuW.d.ts → source-search-types-DWGYNg8M.d.ts} +15 -2
  347. package/dist/stats-G7DIV6VU.js +2 -0
  348. package/dist/surface-IO55UALI.js +2 -0
  349. package/dist/system-ZBMSHJXU.js +2 -0
  350. package/dist/{queries/trace.d.ts → trace-BMjw3prn.d.ts} +1 -18
  351. package/dist/typescript-indexer.js +2 -0
  352. package/dist/typescript-mailbox-worker.js +1 -1
  353. package/dist/watch-server.js +3 -3
  354. package/docs/AGENT_GUIDE.md +19 -128
  355. package/docs/CLI_JSON_OUTPUT.md +21 -17
  356. package/docs/COMMAND_REFERENCE.md +34 -49
  357. package/docs/CURRENT_COMMANDS.md +123 -0
  358. package/docs/DETECTOR_EVIDENCE_CONTRACTS.md +0 -40
  359. package/docs/DETECTOR_GUIDE.md +55 -12
  360. package/docs/PRODUCT_VISION.md +135 -0
  361. package/docs/PROPERTY_TESTING.md +73 -0
  362. package/docs/REVIEW.md +76 -0
  363. package/docs/SKILLS.md +51 -0
  364. package/docs/WINDOWS_SIDECAR_RELEASE.md +12 -3
  365. package/docs/accuracy-audit-checklist.md +70 -13
  366. package/docs/analyzer-inventory.md +2 -2
  367. package/docs/locality-analyzer-design.md +9 -9
  368. package/package.json +18 -80
  369. package/scripts/evidence-product-contract.mjs +7 -3
  370. package/scripts/record-review-coverage.mjs +118 -0
  371. package/scripts/scip-windows-provenance.mjs +29 -19
  372. package/skills/scip-architecture-review/SKILL.md +57 -0
  373. package/skills/scip-architecture-review/agents/openai.yaml +4 -0
  374. package/skills/scip-architecture-review/references/design-checks.md +17 -0
  375. package/skills/scip-explore/SKILL.md +15 -59
  376. package/skills/scip-explore/agents/openai.yaml +3 -3
  377. package/skills/scip-explore/references/external-evidence.md +2 -2
  378. package/skills/scip-explore/references/information-model.md +26 -29
  379. package/skills/scip-explore/scripts/capture-evidence.mjs +68 -34
  380. package/skills/scip-integrity-audit/SKILL.md +53 -181
  381. package/skills/scip-integrity-audit/agents/openai.yaml +3 -3
  382. package/skills/scip-integrity-audit/references/integrity-probes.md +27 -0
  383. package/skills/scip-plan/SKILL.md +39 -65
  384. package/skills/scip-plan/agents/openai.yaml +2 -2
  385. package/skills/scip-query/SKILL.md +28 -81
  386. package/skills/scip-query/agents/openai.yaml +2 -2
  387. package/skills/scip-query/references/command-guide.md +169 -0
  388. package/skills/scip-setup/SKILL.md +4 -2
  389. package/skills/scip-setup/agents/openai.yaml +3 -3
  390. package/dist/by-kind-XI2CSWEY.js +0 -2
  391. package/dist/call-graph-UONR6JR5.js +0 -2
  392. package/dist/call-graph-evidence-lZa2dwQA.d.ts +0 -11
  393. package/dist/chunk-26CT72HM.js +0 -2
  394. package/dist/chunk-2E7CX53V.js +0 -2
  395. package/dist/chunk-2GRUZAQF.js +0 -43
  396. package/dist/chunk-2LDBDR6J.js +0 -29
  397. package/dist/chunk-2OOY75BW.js +0 -2
  398. package/dist/chunk-2R3V3PSD.js +0 -4
  399. package/dist/chunk-2WC2OEDO.js +0 -4
  400. package/dist/chunk-35NLDRZC.js +0 -2
  401. package/dist/chunk-3AF4TUFK.js +0 -3
  402. package/dist/chunk-3D3QG236.js +0 -2
  403. package/dist/chunk-3FHOF22C.js +0 -21
  404. package/dist/chunk-3JKSW6LJ.js +0 -2
  405. package/dist/chunk-3L2ZBPEX.js +0 -133
  406. package/dist/chunk-3PJABJSU.js +0 -2
  407. package/dist/chunk-3SVF22I5.js +0 -2
  408. package/dist/chunk-3WR4E3A3.js +0 -3
  409. package/dist/chunk-4FTZ4P5G.js +0 -2
  410. package/dist/chunk-4UX2F3JX.js +0 -2
  411. package/dist/chunk-4WNW27SX.js +0 -2
  412. package/dist/chunk-5ENOG4VP.js +0 -61
  413. package/dist/chunk-64BFSI5I.js +0 -2
  414. package/dist/chunk-66DVSJQG.js +0 -455
  415. package/dist/chunk-6HFCYNYE.js +0 -9
  416. package/dist/chunk-6PQNKL3G.js +0 -3
  417. package/dist/chunk-6V5CNXL6.js +0 -2
  418. package/dist/chunk-6VVV4WRR.js +0 -4
  419. package/dist/chunk-7BWFZPPZ.js +0 -2
  420. package/dist/chunk-7CYG22FH.js +0 -2
  421. package/dist/chunk-7F45LJKI.js +0 -2
  422. package/dist/chunk-7IWV2EG3.js +0 -3
  423. package/dist/chunk-7KCZELVM.js +0 -2
  424. package/dist/chunk-AFHTBORT.js +0 -2
  425. package/dist/chunk-AVRYW5OZ.js +0 -2
  426. package/dist/chunk-B3X6KU75.js +0 -2
  427. package/dist/chunk-B5D7QPBE.js +0 -4
  428. package/dist/chunk-BBCIS4DX.js +0 -16
  429. package/dist/chunk-BDUVI7TO.js +0 -3
  430. package/dist/chunk-BE7ZZTMC.js +0 -2
  431. package/dist/chunk-BHVUJOCQ.js +0 -3
  432. package/dist/chunk-BJT7LSPK.js +0 -3
  433. package/dist/chunk-BKVWUP7Y.js +0 -2
  434. package/dist/chunk-BQGB4HBD.js +0 -2
  435. package/dist/chunk-BRV7PIFF.js +0 -2
  436. package/dist/chunk-CEEZJXEF.js +0 -2
  437. package/dist/chunk-CIYLO6SI.js +0 -7
  438. package/dist/chunk-CJZXN4NU.js +0 -2
  439. package/dist/chunk-CNO7TOKL.js +0 -2
  440. package/dist/chunk-COF23M5F.js +0 -2
  441. package/dist/chunk-CWFP7GM5.js +0 -2
  442. package/dist/chunk-D2DHWI3D.js +0 -2
  443. package/dist/chunk-D4N5SQ2M.js +0 -4
  444. package/dist/chunk-DBRSYFXR.js +0 -2
  445. package/dist/chunk-DHUIOLDT.js +0 -2
  446. package/dist/chunk-DIRJWYBM.js +0 -6
  447. package/dist/chunk-DIUFNHRJ.js +0 -35
  448. package/dist/chunk-DRENNWRG.js +0 -2
  449. package/dist/chunk-DTZCKZEU.js +0 -4
  450. package/dist/chunk-DULC3QFP.js +0 -5
  451. package/dist/chunk-DYGHBZ2N.js +0 -16
  452. package/dist/chunk-E5R6AQ73.js +0 -40
  453. package/dist/chunk-E73UNJTF.js +0 -38
  454. package/dist/chunk-EKV5HX33.js +0 -2
  455. package/dist/chunk-EQHFIL6T.js +0 -3
  456. package/dist/chunk-ESIQ66Z7.js +0 -2
  457. package/dist/chunk-EVFUMY4R.js +0 -3
  458. package/dist/chunk-F7DY272B.js +0 -2
  459. package/dist/chunk-FBN2FGXG.js +0 -2
  460. package/dist/chunk-FDLOBR6P.js +0 -4
  461. package/dist/chunk-FESCRNVV.js +0 -5
  462. package/dist/chunk-FFRKR4EQ.js +0 -2
  463. package/dist/chunk-FGA2U4OR.js +0 -8
  464. package/dist/chunk-FIQRSHVM.js +0 -2
  465. package/dist/chunk-FPYLNQPT.js +0 -2
  466. package/dist/chunk-FRUSVINH.js +0 -2
  467. package/dist/chunk-GSP44ENC.js +0 -2
  468. package/dist/chunk-GUFSG5TX.js +0 -2
  469. package/dist/chunk-GYIZ4NXB.js +0 -2
  470. package/dist/chunk-GZIUDL6G.js +0 -2
  471. package/dist/chunk-H5EXS3HM.js +0 -2
  472. package/dist/chunk-HCXEQRFF.js +0 -18
  473. package/dist/chunk-HEHOQQKH.js +0 -2
  474. package/dist/chunk-HKGFPJ4T.js +0 -4
  475. package/dist/chunk-HLZTEXRA.js +0 -2
  476. package/dist/chunk-HOENASQM.js +0 -3
  477. package/dist/chunk-HVF5VBG6.js +0 -2
  478. package/dist/chunk-I55I7XXP.js +0 -2
  479. package/dist/chunk-IDFEUFKS.js +0 -2
  480. package/dist/chunk-IHGQTTVW.js +0 -2
  481. package/dist/chunk-IICPE7B2.js +0 -20
  482. package/dist/chunk-IL676XCC.js +0 -18
  483. package/dist/chunk-IW5XQG5G.js +0 -2
  484. package/dist/chunk-IZDPJ2QI.js +0 -2
  485. package/dist/chunk-J66VOFW6.js +0 -5
  486. package/dist/chunk-JFMEXGFE.js +0 -2
  487. package/dist/chunk-JGKUET5J.js +0 -3
  488. package/dist/chunk-JS4PGXMV.js +0 -3
  489. package/dist/chunk-JWTGMPIT.js +0 -80
  490. package/dist/chunk-JYR66JN5.js +0 -5
  491. package/dist/chunk-KFOYCQAJ.js +0 -9
  492. package/dist/chunk-KLFEXGQA.js +0 -2
  493. package/dist/chunk-KMVGRIO2.js +0 -2
  494. package/dist/chunk-KYSDI3GE.js +0 -5
  495. package/dist/chunk-L6PJPETJ.js +0 -29
  496. package/dist/chunk-LDVT66YM.js +0 -2
  497. package/dist/chunk-LEECKFCJ.js +0 -2
  498. package/dist/chunk-LMZ5PRUV.js +0 -2
  499. package/dist/chunk-LQRQN2XA.js +0 -2
  500. package/dist/chunk-LXABEJX3.js +0 -2
  501. package/dist/chunk-MNV5FSBW.js +0 -3
  502. package/dist/chunk-MPQ4OTBM.js +0 -2
  503. package/dist/chunk-MTDBHTSF.js +0 -2
  504. package/dist/chunk-MV3CDXPI.js +0 -38
  505. package/dist/chunk-MWN53KRN.js +0 -60
  506. package/dist/chunk-MXNGIEPU.js +0 -3
  507. package/dist/chunk-N2ZSIIGR.js +0 -117
  508. package/dist/chunk-N5B2NILC.js +0 -5
  509. package/dist/chunk-NJITK2GP.js +0 -2
  510. package/dist/chunk-NOGJXYFO.js +0 -2
  511. package/dist/chunk-NOYBFVJA.js +0 -554
  512. package/dist/chunk-NWQXSFFU.js +0 -3
  513. package/dist/chunk-ODDUPDP7.js +0 -13
  514. package/dist/chunk-OLIWTZI3.js +0 -3
  515. package/dist/chunk-OLNV6I6U.js +0 -2
  516. package/dist/chunk-OR2E3AGZ.js +0 -2
  517. package/dist/chunk-OSR2GEHQ.js +0 -2
  518. package/dist/chunk-OSSESPDX.js +0 -3
  519. package/dist/chunk-OWOOWNJ5.js +0 -7
  520. package/dist/chunk-P42EIXTA.js +0 -2
  521. package/dist/chunk-PJFGPYTU.js +0 -2
  522. package/dist/chunk-PP7KNN7L.js +0 -2
  523. package/dist/chunk-PU7T5QYQ.js +0 -2
  524. package/dist/chunk-PWWAJSKV.js +0 -74
  525. package/dist/chunk-PZL5T7SU.js +0 -73
  526. package/dist/chunk-QBE3YX64.js +0 -23
  527. package/dist/chunk-QGVTFRY2.js +0 -7
  528. package/dist/chunk-QOJONDS7.js +0 -2
  529. package/dist/chunk-QU5XRYB5.js +0 -4
  530. package/dist/chunk-QUU5OBVK.js +0 -11
  531. package/dist/chunk-RBLQNW26.js +0 -20
  532. package/dist/chunk-RTQ7NEKG.js +0 -81
  533. package/dist/chunk-SQXRS7BG.js +0 -4
  534. package/dist/chunk-SSK6LDPC.js +0 -2
  535. package/dist/chunk-SZHGTCPP.js +0 -7
  536. package/dist/chunk-T4N4P2K5.js +0 -16
  537. package/dist/chunk-TA3QKLLU.js +0 -2
  538. package/dist/chunk-TEBQMNVI.js +0 -43
  539. package/dist/chunk-TPFHAQ2G.js +0 -2
  540. package/dist/chunk-TQPCBMWT.js +0 -5
  541. package/dist/chunk-TQZV7KV4.js +0 -2
  542. package/dist/chunk-TRNAEQ6P.js +0 -3
  543. package/dist/chunk-TY7CRN3Z.js +0 -2
  544. package/dist/chunk-UHFYCMZO.js +0 -35
  545. package/dist/chunk-UICY4GTQ.js +0 -7
  546. package/dist/chunk-UVGEWT4Y.js +0 -26
  547. package/dist/chunk-UXW33INU.js +0 -29
  548. package/dist/chunk-VMPRET3I.js +0 -5
  549. package/dist/chunk-VNLGKHS6.js +0 -6
  550. package/dist/chunk-VQILFTEH.js +0 -2
  551. package/dist/chunk-VUPHCS7Y.js +0 -57
  552. package/dist/chunk-VVZSBTSU.js +0 -23
  553. package/dist/chunk-VZRNID6A.js +0 -2
  554. package/dist/chunk-W5OXRYGE.js +0 -7
  555. package/dist/chunk-W6STWDQI.js +0 -57
  556. package/dist/chunk-W7CXK74K.js +0 -2
  557. package/dist/chunk-WB3WYIRE.js +0 -4
  558. package/dist/chunk-WDNVY4E7.js +0 -20
  559. package/dist/chunk-WK46TNUM.js +0 -3
  560. package/dist/chunk-WNTFFKAX.js +0 -12
  561. package/dist/chunk-WOIKCX6A.js +0 -2
  562. package/dist/chunk-WUN6KBHV.js +0 -2
  563. package/dist/chunk-WYCTJDVR.js +0 -2
  564. package/dist/chunk-WYPL7GF7.js +0 -2
  565. package/dist/chunk-XDAUYDFT.js +0 -2
  566. package/dist/chunk-XDQMU3BT.js +0 -2
  567. package/dist/chunk-XFA4SSO3.js +0 -3
  568. package/dist/chunk-XGZEP6GR.js +0 -8
  569. package/dist/chunk-XPDPNWTQ.js +0 -368
  570. package/dist/chunk-XRYABF57.js +0 -8
  571. package/dist/chunk-YBGKCQIS.js +0 -2
  572. package/dist/chunk-YEN6CYC7.js +0 -16
  573. package/dist/chunk-YF5IB2LF.js +0 -2
  574. package/dist/chunk-YI2AWIHC.js +0 -3
  575. package/dist/chunk-YPWBKGFU.js +0 -2
  576. package/dist/chunk-YPWHBBIS.js +0 -2
  577. package/dist/chunk-YSH6U3L4.js +0 -3
  578. package/dist/chunk-YU5DZUZI.js +0 -10
  579. package/dist/chunk-YWO5DDRC.js +0 -16
  580. package/dist/chunk-Z4CDXYNQ.js +0 -2
  581. package/dist/chunk-ZF5KHH7C.js +0 -2
  582. package/dist/chunk-ZOHS7AQV.js +0 -21
  583. package/dist/chunk-ZTI4SBFV.js +0 -3
  584. package/dist/code-MI6F2TTU.js +0 -2
  585. package/dist/code-result-json-FXALY4HE.js +0 -2
  586. package/dist/command-descriptors-P34VABY5.js +0 -343
  587. package/dist/dataflow-4KEMJPC6.js +0 -2
  588. package/dist/dependence-slice-R7FPWD5M.js +0 -2
  589. package/dist/deps-7EMQUYUT.js +0 -2
  590. package/dist/direct-navigation-6YO234F2.js +0 -3
  591. package/dist/entry-map-KOOLR26E.js +0 -2
  592. package/dist/files-OPIPJIGZ.js +0 -2
  593. package/dist/graph-evidence-Bjyky2V4.d.ts +0 -126
  594. package/dist/hierarchy-QPD2CAER.js +0 -2
  595. package/dist/imports-M6HUXRXC.js +0 -2
  596. package/dist/members-I5MEFOCT.js +0 -2
  597. package/dist/methods-5JYGGHXA.js +0 -2
  598. package/dist/next-anchor-candidates-BwMczMvX.d.ts +0 -90
  599. package/dist/output-continuation-command-UPQAAKBP.js +0 -3
  600. package/dist/output-pagination-3OFL2MJV.js +0 -19
  601. package/dist/project-reindex-UKKQ5PLS.js +0 -3
  602. package/dist/queries/anchors.d.ts +0 -123
  603. package/dist/queries/anchors.js +0 -2
  604. package/dist/queries/complexity-hotspots.d.ts +0 -40
  605. package/dist/queries/complexity-hotspots.js +0 -2
  606. package/dist/queries/convergence.d.ts +0 -33
  607. package/dist/queries/convergence.js +0 -2
  608. package/dist/queries/dataflow.d.ts +0 -77
  609. package/dist/queries/dataflow.js +0 -2
  610. package/dist/queries/deep-chains.d.ts +0 -5
  611. package/dist/queries/deep-chains.js +0 -2
  612. package/dist/queries/extract-candidates.d.ts +0 -52
  613. package/dist/queries/extract-candidates.js +0 -2
  614. package/dist/queries/isolated.d.ts +0 -24
  615. package/dist/queries/isolated.js +0 -2
  616. package/dist/queries/plan-context.d.ts +0 -33
  617. package/dist/queries/plan-context.js +0 -2
  618. package/dist/queries/reference-neighborhood.d.ts +0 -4
  619. package/dist/queries/reference-neighborhood.js +0 -2
  620. package/dist/queries/reference-reachability.d.ts +0 -48
  621. package/dist/queries/reference-reachability.js +0 -2
  622. package/dist/queries/self-audit.d.ts +0 -63
  623. package/dist/queries/self-audit.js +0 -2
  624. package/dist/queries/similar-chains.d.ts +0 -48
  625. package/dist/queries/similar-chains.js +0 -2
  626. package/dist/queries/slice.d.ts +0 -4
  627. package/dist/queries/slice.js +0 -2
  628. package/dist/queries/stale-abstractions.d.ts +0 -72
  629. package/dist/queries/stale-abstractions.js +0 -2
  630. package/dist/queries/system-map.d.ts +0 -449
  631. package/dist/queries/system-map.js +0 -2
  632. package/dist/queries/trace.js +0 -2
  633. package/dist/queries/twin-ab.d.ts +0 -66
  634. package/dist/queries/twin-ab.js +0 -2
  635. package/dist/queries/value-flow.d.ts +0 -43
  636. package/dist/queries/value-flow.js +0 -2
  637. package/dist/queries/wrapper-candidates.d.ts +0 -34
  638. package/dist/queries/wrapper-candidates.js +0 -2
  639. package/dist/refs-PSU4JZZW.js +0 -2
  640. package/dist/refs-pagination-JG6CJMRC.js +0 -2
  641. package/dist/slice-HYRATV64.js +0 -2
  642. package/dist/source-snippet-_wrcgmZc.d.ts +0 -15
  643. package/dist/stats-OOJ74B32.js +0 -2
  644. package/dist/surface-VTGDYWF5.js +0 -2
  645. package/dist/symbol-resolution-WD5EU5JE.js +0 -2
  646. package/dist/system-LRQNFOR2.js +0 -2
  647. package/dist/trace-F4B6OLL4.js +0 -2
  648. package/dist/value-flow-VRPZY72V.js +0 -2
  649. package/skills/concrete-plan/SKILL.md +0 -8
  650. package/skills/concrete-plan/agents/openai.yaml +0 -4
@@ -0,0 +1,60 @@
1
+ import{o as f,u}from"./chunk-5TNQJUR2.js";import h from"ignore";import{existsSync as y,readdirSync as b}from"fs";import{dirname as a,isAbsolute as m,join as c,relative as v,resolve as T}from"path";function B(n){let t=h();return x(n,t)||t.add($),{isIgnored:e=>d(t,n,e),filter:e=>e.filter(r=>!d(t,n,r))}}function x(n,t){let i=new Set,e=(s,l)=>{if(!(i.has(s)||!y(s)))try{let g=u(s,{maxBytes:f,inputKind:"gitignore file"});t.add(l?S(g,l):g),i.add(s)}catch{}},r=a(n),o=0;for(;r!==a(r)&&o<5&&(e(c(r,".gitignore"),""),!y(c(r,".git")));)r=a(r),o++;return p(n,"",t,e),i.size>0}function p(n,t,i,e){let r=t?c(n,t):n;e(c(r,".gitignore"),t);let o;try{o=b(r,{withFileTypes:!0})}catch{return}for(let s of o){if(!s.isDirectory()||s.name===".git")continue;let l=t?`${t}/${s.name}`:s.name;d(i,n,`${l}/`)||p(n,l,i,e)}}function S(n,t){let i=t.replaceAll("\\","/").replace(/\/+$/,"");return n.split(/\r?\n/).map(e=>_(e,i)).join(`
2
+ `)}function _(n,t){let i=n.trimStart();if(!i||i.startsWith("#"))return n;let e=n.slice(0,n.length-i.length),r=i.startsWith("!"),o=r?i.slice(1):i;if(!o||o.startsWith("#"))return n;let s=F(o,t);return`${e}${r?"!":""}${s}`}var $=`
3
+ # Dependencies
4
+ node_modules/
5
+ vendor/
6
+ .bundle/
7
+
8
+ # Build output
9
+ dist/
10
+ build/
11
+ out/
12
+ target/
13
+ bin/
14
+ obj/
15
+
16
+ # Python
17
+ __pycache__/
18
+ *.pyc
19
+ *.pyo
20
+ .venv/
21
+ venv/
22
+ .env/
23
+ env/
24
+ *.egg-info/
25
+
26
+ # Rust
27
+ target/
28
+
29
+ # Java / Kotlin / Scala
30
+ *.class
31
+ .gradle/
32
+ .mvn/
33
+
34
+ # C# / .NET
35
+ bin/
36
+ obj/
37
+ packages/
38
+
39
+ # Go
40
+ vendor/
41
+
42
+ # Dart
43
+ .dart_tool/
44
+ build/
45
+
46
+ # PHP
47
+ vendor/
48
+
49
+ # IDE / OS
50
+ .idea/
51
+ .vscode/
52
+ *.swp
53
+ *.swo
54
+ .DS_Store
55
+ Thumbs.db
56
+
57
+ # Type definitions (often noise in queries)
58
+ *.d.ts
59
+ `;function d(n,t,i){let e=A(t,i);if(!e)return!1;try{return n.ignores(e)}catch{return!1}}function A(n,t){if(!t||t===".")return null;if(!m(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let i=m(t)?t:T(n,t),e=v(n,i).replaceAll("\\","/");return!e||e==="."||e.startsWith("..")?null:e}function F(n,t){let i=n.startsWith("/"),e=i?n.slice(1):n;return(e.endsWith("/")?e.slice(0,-1):e).includes("/")||i?`${t}/${e}`:`${t}/**/${e}`}export{B as a};
60
+ //# sourceMappingURL=chunk-J2TMAIN5.js.map
@@ -0,0 +1,142 @@
1
+ import{a as fe}from"./chunk-WOFQ5DTB.js";import{a as Oe,b as M,d as me}from"./chunk-PH52RA7D.js";import{b as xn}from"./chunk-7Y5T6XDP.js";import{c as dn,d as z,e as _e,g as fn,h as mn,i as gn,j as yn,k as Sn,l as hn}from"./chunk-X6RMKHJQ.js";import{a as de}from"./chunk-QOIXNWQR.js";import{a as un,c as le,d as w,e as ue,f as pn,g as pe}from"./chunk-GZKFETP5.js";import{b as H,c as bn,d as Nn,e as je,g as gt}from"./chunk-YULZRALL.js";import{a as dt,b as ft,e as mt}from"./chunk-HGFDYOVB.js";import{u as Ae,v as ve}from"./chunk-TKD34PHN.js";import{l as x}from"./chunk-U5RIG3JP.js";import{i as we}from"./chunk-62BDNPMI.js";var ui=w("source-text",{clearGroups:["whole-project","source-file"]}),pi=pe("source-lines",{clearGroups:["whole-project","source-file"]});function b(e,t){let n=t.replace(/\\/g,"/");me(n);let r=ui.get(e,n,()=>In(e,n));return Cn(n,r)}function Tl(e,t){let n=t.replace(/\\/g,"/");return me(n),Cn(n,In(e,n))}function Cn(e,t){return Oe(e,t.text),t.available||M(e),t.text}function In(e,t){try{return{text:Ae(e.config.projectRoot,t,{inputKind:"indexed source file"}),available:!0}}catch(n){if(M(t),ve(n))return{text:"",available:!1};throw n}}function Ll(e){if(e.length===0)return[];let t=e.split(`
2
+ `);return e.endsWith(`
3
+ `)&&t.pop(),t}function yt(e,t){let n=t.replace(/\\/g,"/"),r=b(e,n);return pi.get(e,n,r,()=>r?r.split(`
4
+ `):[])}var di=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+([a-z][\w-]*))?(?![\w-])/i;function fi(e){let t=di.exec(e);return t?t[1]?.toLowerCase()??"":null}function Dl(e,t,n){return En(e,t,n).length>0}function Fl(e,t,n,r){let i=_n(r);return En(e,t,n).some(s=>s===""||_n(s)===i)}function _n(e){let t=e.toLowerCase();return t==="dead-code"||t==="stale"?"dead":t==="wrapper"?"passthrough":t}function En(e,t,n){if(n<=0)return[];let r=yt(e,t);if(r.length===0)return[];let i=[];for(let s=n-1;s>=0&&s>=n-5;s-=1){let o=(r[s]??"").trim();if(o==="")continue;let a=fi(o);if(a!==null){i.push(a);continue}if(!mi(o))return i}return i}function mi(e){return["//","*","/*","@","#"].some(t=>e.startsWith(t))}import{extname as Pn}from"path";var gi={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb",".clj":"clojure",".cljs":"clojure",".cljc":"clojure"};function E(e){return gi[Pn(e).toLowerCase()]??null}function q(e){return Pn(e).toLowerCase()===".vue"}import{createHash as yi}from"crypto";import{serialize as xt,deserialize as Si}from"v8";import{types as St}from"util";var Rn=`node-v8:${process.versions.node}:${process.versions.v8}`,kn=2e4,Tn=16*1024*1024,X=null,ht=class{constructor(t,n){this.owner=t;this.parent=n}owner;parent;complete=!0;bytes=0;statements=new Map;reads=new Map;record(t,n,r,i){if(!this.complete)return;let s=this.statements.get(t);s===void 0&&(s=this.statements.size,this.statements.set(t,s),this.bytes+=t.length*2);let o=`${s}:${n}:${r}`,a=this.reads.get(o);if(a){a.digest!==i&&(this.complete=!1);return}if(this.bytes+=o.length*2+128,this.reads.size>=kn||this.bytes>Tn){this.complete=!1;return}this.reads.set(o,{statement:s,method:n,parameters:r,digest:i})}proof(){return this.complete?{version:1,encoding:Rn,statements:[...this.statements.keys()],reads:[...this.reads.values()]}:void 0}};function $l(e,t){let n=new ht(e,X);X=n;try{let r=t();return St.isPromise(r)&&ge(),{result:r,proof:n.proof()}}catch(r){throw ge(),r}finally{X=n.parent}}function ge(){for(let e=X;e;e=e.parent)e.complete=!1}function Me(e){for(let t=X;t;t=t.parent)if(t.owner===e)return!0;return!1}function Bl(e,t){if(!X)return t();let n=hi(e),r;try{r=t()}catch(i){throw ge(),i}return n!==void 0&&xi(e,n,r),r}function hi(e){try{if(e.supported&&bt(e.parameters))return xt(e.parameters).toString("base64")}catch{}ge()}function xi({owner:e,sql:t,method:n,parameters:r},i,s){try{if(xt(r).toString("base64")!==i){ge();return}let o=Ln(s);for(let a=X;a;a=a.parent)a.owner===e?a.record(t,n,i,o):a.complete=!1}catch{ge()}}function Vl(e,t){let n=new Map;try{return bi(t)?t.reads.every(r=>{let i=n.get(r.statement);i||(i=e.prepare(t.statements[r.statement]),n.set(r.statement,i));let s=Si(Buffer.from(r.parameters,"base64"));return!Array.isArray(s)||!bt(s)?!1:Ln(i[r.method](...s))===r.digest}):!1}catch{return!1}}function bi(e){return!e||e.version!==1||e.encoding!==Rn||!Array.isArray(e.statements)||!Array.isArray(e.reads)||e.reads.length>kn||!e.statements.every(t=>typeof t=="string")||JSON.stringify(e).length*2>Tn?!1:e.reads.every(t=>t&&Number.isSafeInteger(t.statement)&&t.statement>=0&&t.statement<e.statements.length&&(t.method==="get"||t.method==="all")&&typeof t.parameters=="string"&&typeof t.digest=="string")}function bt(e,t=0){return e==null||["string","number","bigint"].includes(typeof e)?!0:typeof e!="object"||St.isProxy(e)||t>3?!1:ArrayBuffer.isView(e)?Buffer.isBuffer(e)&&!St.isSharedArrayBuffer(e.buffer):Ni(e)?Reflect.ownKeys(e).every(n=>{if(typeof n!="string")return!1;let r=Object.getOwnPropertyDescriptor(e,n);return"value"in r&&bt(r.value,t+1)}):!1}function Ni(e){let t=Object.getPrototypeOf(e);return Array.isArray(e)||t===Object.prototype||t===null}function Ln(e){return yi("sha256").update(xt(e)).digest("hex")}var _i=[S("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),S("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),S("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),S("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),S("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),S("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),S("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),S("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),S("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),S("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),S("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),S("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),S("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),S("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),S("runtime-boundary-http-roles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/http-summaries.ts"}),S("runtime-boundary-mount-imports",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundary-accuracy.test.ts",owner:"src/analysis/runtime-boundaries/http-mounts.ts"}),S("runtime-boundary-source-hashes",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),S("runtime-boundary-direct-extraction",{dependsOn:["content-hash","direct-deps-digest","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/analysis/runtime-boundaries.test.ts",owner:"src/analysis/runtime-boundaries/graph.ts"}),Ce("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),Ce("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),Ce("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),Ce("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"}),Ce("typescript-hierarchy-targets",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","definitionSet","projectFingerprint","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/typescript/ts-morph-provider.ts"})];function Z(e){let t=new Map,n=e.invalidation.dependsOn.every(r=>r==="content-hash"||r==="tool-version");return{kind:e.kind,read(r,i,s){if(!n&&Me(r.db))return null;let o=!1,a=0,c;if(dt()){let l=_e(r);if(l){let u=`${l}\0${i}\0${s}`;c=t.get(u),c||(c=ft(["evidence-product-file-read-v1",e.kind,l,i,s]),t.set(u,c))}}return mt("evidence-product.file.read",()=>{let l=fn(r,e.kind,i,s);if(l===null)return null;a=l.length;try{let u=e.deserialize(l);return o=u!==null,u}catch{return null}},()=>({...c?{workIdentity:c,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:o,payloadBytes:a}))},has(r,i,s){return!n&&Me(r.db)?!1:mn(r,e.kind,i,s)},write(r,i,s,o){gn(r,e.kind,i,s,e.serialize(o))},writeBatch(r,i){yn(r,i.map(s=>({kind:e.kind,relativePath:s.relativePath,contentHash:s.contentHash,payload:e.serialize(s.value)})))}}}function Jl(e){let t=new Map;return{kind:e.kind,read(n,r,i){if(Me(n.db))return null;let s=!1,o=0,a;if(dt()){let c=`${i}\0${r}`;a=t.get(c),a||(a=ft(["evidence-product-project-read-v1",e.kind,i,r]),t.set(c,a))}return mt("evidence-product.project.read",()=>{let c=Sn(n,e.kind,r,i);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return s=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:s,payloadBytes:o}))},write(n,r,i,s){hn(n,e.kind,r,i,e.serialize(s))}}}function ee(e){let t=_i.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function S(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function Ce(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}import{createRequire as Ci}from"module";var ye=Ci(import.meta.url),$e=null,Dn=!1;function Ii(){if(Dn)return null;if($e)return $e;try{return $e=ye("tree-sitter"),$e}catch{return Dn=!0,null}}var Fn=new Map,Be=new Set,Ei=new Map([["rust","tree-sitter-rust"],["javascript","tree-sitter-javascript"],["python","tree-sitter-python"],["java","tree-sitter-java"],["kotlin","tree-sitter-kotlin"],["scala","tree-sitter-scala"],["ruby","tree-sitter-ruby"],["c","tree-sitter-c"],["cpp","tree-sitter-cpp"],["csharp","tree-sitter-c-sharp"]]);function Pi(e){let t=Ei.get(e);if(t)return ye(t);switch(e){case"typescript":return ye("tree-sitter-typescript").typescript;case"tsx":return ye("tree-sitter-typescript").tsx;case"php":return ye("tree-sitter-php").php;case"vb":{let n=ye("tree-sitter-vb-dotnet");return n.language??n}default:return}}function Ri(e){if(Be.has(e))return null;let t=Fn.get(e);if(t)return t;let n;try{if(e==="clojure")return Be.add(e),null;n=Pi(e)}catch{return Be.add(e),null}return Fn.set(e,n),n}var wn=new Map;function ki(e){let t=wn.get(e);if(t)return t;let n=Ri(e);if(!n)return null;let r=Ii();if(!r)return null;let i=new r;try{i.setLanguage(n)}catch{return Be.add(e),null}return wn.set(e,i),i}function Ti(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}var Li=24;function Ie(e,t){let n=ki(e);if(!n)return null;try{let r=Ti(n,t);return xn(t.length*Li),r}catch{return null}}import{createRequire as Di}from"module";import{posix as Nt}from"path";var ru=pn("vue-sfc-units"),Fi=Di(import.meta.url),wi;function Ai(){return wi??=Fi("@vue/compiler-sfc")}function vi(...e){return Ai().parse(...e)}function Oi(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function ji(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function On(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let i;try{i=vi(n,{filename:t})}catch(o){return r.errors.push(vn(o)),r}r.errors.push(...i.errors.map(vn));let{descriptor:s}=i;return s.template&&(r.template=Ve(e,t,"template",s.template)),s.script&&r.scripts.push(An(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push(An(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(o=>Ve(e,t,"style",o)),r.customBlocks=s.customBlocks.map(o=>Ve(e,t,"custom",o)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(o=>o?.errors??[])),r}function An(e,t,n,r){let i=Ve(e,t,"script",n);return{...i,kind:"script",setup:r,astLanguage:ji(i.lang)}}function Ve(e,t,n,r){let i=$i(r.attrs),s=typeof i.lang=="string"?i.lang:null,o=typeof i.src=="string"?i.src:typeof r.src=="string"?r.src:void 0;if(o){let c=Mi(t,o);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:o,attrs:i,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${o}`]};let l=b(e,c),u=l?Math.max(0,l.split(`
5
+ `).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:o,attrs:i,lang:s,body:l,startLine:0,endLine:u,errors:l?[]:[`Vue ${n} block source not found: ${c}`]}}let a=Math.max(0,r.loc.start.line-1);return{kind:n,ownerPath:t,sourcePath:t,external:!1,attrs:i,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function Mi(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=Oi(Nt.normalize(Nt.join(Nt.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function $i(e){return{...e}}function vn(e){return e instanceof Error?e.message:String(e)}function Ee(e,t,n){let i=On(e,t,n).scripts.filter(o=>o.astLanguage&&o.body.length>0),s=i[0]?.astLanguage;return s?{body:i.map(o=>`${`
6
+ `.repeat(o.startLine)}${o.body}`).join(`
7
+ `),startLine:0,language:s}:null}var Bi=pe("ast-trees",{clearGroups:["whole-project","source-file"]});function Ue(e,t,n,r){let i=Bi.get(e,t,n,()=>{let s=r();return s?{tree:s,root:s.rootNode}:null})?.tree??null;return i||M(t),i}function N(e,t){if(q(t))return Vi(e,t);let n=E(t);if(!n)return M(t),null;let r=b(e,t);return r?Ue(e,t,r,()=>Ie(n,r)):(M(t),null)}function We(e,t,n){if(Oe(t,n),q(t))return Ue(e,t,n,()=>{let i=Ee(e,t,n);return i?Ie(i.language,`
8
+ `.repeat(i.startLine)+i.body):null});let r=E(t);return r?Ue(e,t,n,()=>Ie(r,n)):(M(t),null)}function Vi(e,t){let n=b(e,t);return n?Ue(e,t,n,()=>{let r=Ee(e,t,n);if(!r)return null;let i=`
9
+ `.repeat(r.startLine)+r.body;return Ie(r.language,i)}):(M(t),null)}var Ui=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 jn(e){return Ui.has(e.type)?1:e.type==="binary_expression"&&e.parent?.type!=="binary_expression"&&(e.text.includes("&&")||e.text.includes("||"))?Wi(e.text):0}function Wi(e){return(e.match(/&&|\|\|/g)??[]).length}var Mn=new WeakMap,$n=new Set(["call_expression","call","new_expression","jsx_opening_element","jsx_self_closing_element","decorator","pair","string","string_literal","template_string","variable_declarator","function_declaration","generator_function_declaration","function_expression","arrow_function","method_definition","method_signature","function_signature","public_field_definition"]);function _t(e,t){let n=Array.isArray(t)?t:[t];if(!n.every(s=>$n.has(s)))return e.descendantsOfType(t);let r=zi(e);return n.length===1?r.get(n[0])??[]:n.flatMap(s=>r.get(s)??[]).sort((s,o)=>s.startIndex-o.startIndex)}function zi(e){let t=Mn.get(e);if(t)return t;let n=new Map;for(let r of e.descendantsOfType([...$n])){let i=r.type,s=n.get(i);s?s.push(r):n.set(i,[r])}return Mn.set(e,n),n}function Bn(e,t){t(e);for(let n of e.namedChildren)Bn(n,t)}function Vn(e,t,n){if(e.startPosition.row>t||e.endPosition.row<n)return null;for(let r of e.namedChildren){let i=Vn(r,t,n);if(i)return i}return e}var yu=new Set(["arrow_function","closure_expression","constructor_declaration","function_declaration","function_definition","function_expression","generator_function","generator_function_declaration","function_item","lambda","lambda_expression","method","method_declaration","method_definition"]);function Su(e,t,n,r,i={}){let s=i.startColumn!==void 0&&i.endColumn!==void 0,o=[],a=p=>{if(!(p.startPosition.row>t||p.endPosition.row<n)&&!(s&&(p.startPosition.row===t&&p.startPosition.column>i.startColumn||p.endPosition.row===n&&p.endPosition.column<i.endColumn))){o.push(p);for(let d of p.namedChildren)a(d)}};if(a(e),s){let p=o.sort((f,I)=>f.endIndex-f.startIndex-(I.endIndex-I.startIndex))[0];if(!p)return null;let d=p.childForFieldName("value");return d?Ct(d)??p:p}let c=o.filter(p=>r.has(p.type));if(c.length===0)return Vn(e,t,n);let l=Math.min(...c.map(p=>p.endPosition.row-p.startPosition.row)),u=c.filter(p=>p.endPosition.row-p.startPosition.row===l);return u.length===1?u[0]:null}function hu(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression","non_null_expression"].includes(t.type)&&t.namedChildren.length>0;){let n=t.namedChildren.filter(i=>i.type!=="comment"),r=t.type==="type_assertion"?n.at(-1):n[0];if(!r)break;t=r}return t}function Un(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?Un(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function xu(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(Un)??[]}function bu(e,t,n){if(!e)return;let r=new Set(t.filter(i=>i!==null));Bn(e,i=>{i.type!=="identifier"&&i.type!=="shorthand_property_identifier"||r.has(i.text)&&n.add(i.text)})}var Pe=new Set(["arrow_function","function_expression","generator_function"]);function Ct(e){if(Pe.has(e.type))return e;if(e.type!=="call_expression"||(e.childForFieldName("function")??e.namedChild(0))?.type!=="call_expression")return null;let r=((e.childForFieldName("arguments")??e.namedChildren.find(i=>i.type==="arguments"))?.namedChildren??[]).filter(i=>Pe.has(i.type));return r.length===1?r[0]:null}function Re(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var Kn=["function_declaration","generator_function_declaration","method_definition","method_signature","function_signature"],Hi=new Set(Kn),qi=[...Kn,"variable_declarator","public_field_definition"],Ki=["function_item","function_signature_item"],Ji=["function_definition"],Qi=[],Gi=new Set([...Pe,"closure_expression","lambda"]);function Jn(e){return e==="rust"?Ki:e==="python"?Ji:e==="typescript"||e==="tsx"||e==="javascript"?qi:Qi}function ze(e,t){let n=Xn(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,startColumn:n.definitionNode.startPosition.column,endLine:n.definitionNode.endPosition.row,endColumn:n.definitionNode.endPosition.column,paramCount:Hn(n.functionNode),params:Wn(n.functionNode),paramsEndLine:zn(n.functionNode),isLiteralPassthrough:qn(n.functionNode,t),branches:0};if(!Yn(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(i=>i.type==="identifier"||i.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,startColumn:e.startPosition.column,endLine:e.endPosition.row,endColumn:e.endPosition.column,paramCount:Hn(e),params:Wn(e),paramsEndLine:zn(e),isLiteralPassthrough:qn(e,t),branches:0}:null}function Qn(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function Gn(e,t){for(let n=e.parent;n;n=n.parent){let r=Yn(n.type,t),i=Pe.has(n.type);if(!r&&!Gi.has(n.type))continue;let s=i?Yi(n,t):null,o=s?.functionNode.startIndex===n.startIndex?s.definitionNode:n;return{name:o!==n?s.name:r?n.childForFieldName("name")?.text??null:null,startLine:o.startPosition.row,startColumn:o.startPosition.column,endLine:o.endPosition.row,endColumn:o.endPosition.column}}return null}function Yi(e,t){for(let n=e.parent;n;n=n.parent){let r=Xn(n,t);if(r?.functionNode.startIndex===e.startIndex)return r;if(!["arguments","call_expression","parenthesized_expression"].includes(n.type))break}return null}function Wn(e){let t=Qn(e);if(!t)return[];let n=[];for(let r of t.namedChildren)if(!Re(r)){if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}n.push(ns(r))}return n}function zn(e){let t=Qn(e);return t?t.endPosition.row:e.startPosition.row}function Yn(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?Hi.has(e):!1}function Xn(e,t){return t!=="typescript"&&t!=="tsx"&&t!=="javascript"?null:e.type==="variable_declarator"||e.type==="public_field_definition"?Xi(e):null}function Xi(e){let t=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1);if(!t||!n)return null;let r=Ct(n);return r?{name:t.text,definitionNode:e,functionNode:r}:null}function Hn(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return 0;let n=0;for(let r of t.namedChildren)Re(r)||(n+=1);return n}function qn(e,t){let n=e.namedChildren.find(l=>l.type==="block"||l.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(l=>!Re(l));if(r.length!==1)return!1;let i=r[0],s=Zi(i,t);if(!s)return!1;let o=s.namedChildren.find(l=>l.type==="arguments"||l.type==="argument_list");if(!o)return!1;let a=o.namedChildren.filter(l=>!Re(l)),c=ts(e);if(!c||a.length!==c.length)return!1;for(let l=0;l<c.length;l+=1){let u=a[l];if(u.type!=="identifier"||u.text!==c[l])return!1}return!0}function Zi(e,t){let n=es(e,t);if(!n)return null;let r=t==="python"?"call":"call_expression";if(n.type!==r)return null;let i=n.childForFieldName("function")??n.namedChild(0);return i&&(i.type===r||i.type==="call_expression")?null:n}function es(e,t){let n=null;return e.type==="return_statement"||e.type==="expression_statement"?n=e.namedChild(0)??null:t==="rust"&&(e.type==="call_expression"||e.type==="macro_invocation")&&(n=e),n}function ts(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return null;let n=[];for(let r of t.namedChildren){if(r.childForFieldName("value")||r.type==="assignment_pattern"||r.type==="default_parameter")return null;if(r.type==="identifier"){n.push(r.text);continue}let i=r.namedChildren.find(s=>s.type==="identifier");i&&n.push(i.text)}return n}function Eu(e,t){let n=e.filter(s=>s.startLine<=t&&s.endLine>=t),r=Math.min(...n.map(s=>s.endLine-s.startLine)),i=n.filter(s=>s.endLine-s.startLine===r);return i.length===1?i[0]:null}function ns(e){let t=e.namedChildren.some(i=>i.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(e.text),n=e.childForFieldName("pattern");if(!t&&n&&n.type==="identifier")return{name:n.text,simple:!0};let r=e.namedChildren.find(i=>i.type==="identifier");return{name:n?.type==="identifier"?n.text:r?.text??"",simple:!1}}function He(e,t){let n=ss(e,t);if(!n)return null;let r=Et(n)??(["typescript","tsx","javascript"].includes(t)?n:null);if(!r)return null;let i=r.text.replace(/^#/u,""),s=er(n);return{kind:rs(e),calleeLeaf:i,calleeQualifier:s?is(n):void 0,calleeText:n.text,memberAccess:s,line:e.startPosition.row,targetExpressionRange:{startLine:n.startPosition.row,startColumn:n.startPosition.column,endLine:n.endPosition.row,endColumn:n.endPosition.column},targetRange:{startLine:r.startPosition.row,startColumn:r.startPosition.column,endLine:r.endPosition.row,endColumn:r.endPosition.column},owner:Gn(e,t)}}function rs(e){return Zn.has(e.type)?"jsx-render":e.type==="new_expression"?"new":"call"}var Zn=new Set(["jsx_opening_element","jsx_self_closing_element"]);function is(e){return(e.childForFieldName("object")??e.childForFieldName("value")??e.namedChild(0)??void 0)?.text||void 0}function ss(e,t){return t==="rust"?os(e):t==="python"?e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0):t==="typescript"||t==="tsx"||t==="javascript"?as(e):null}function os(e){return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null}function as(e){return e.type==="call_expression"?It(e.childForFieldName("function")??e.namedChild(0)):e.type==="new_expression"?It(e.childForFieldName("constructor")??e.namedChild(0)):Zn.has(e.type)?ls(e):null}var cs=new Set(["await_expression","parenthesized_expression","non_null_expression","as_expression","satisfies_expression","type_assertion"]);function It(e){let t=e;for(;t&&cs.has(t.type);){let n=t.type==="type_assertion"?t.namedChild(t.namedChildCount-1):t.namedChild(0);if(!n)return t;t=n}return t}function ls(e){let t=e.childForFieldName("name")??e.namedChild(0);return t&&(t.type==="member_expression"||t.type==="nested_identifier"||(t.type==="identifier"||t.type==="jsx_identifier")&&/^[A-Z]/.test(t.text))?t:null}function er(e){switch(e.type){case"field_expression":case"member_expression":case"subscript_expression":case"nested_identifier":case"attribute":return!0;default:return!1}}function qe(e){return Et(e)?.text.replace(/^#/u,"")??null}var us=new Set(["super","identifier","type_identifier","field_identifier","property_identifier","private_property_identifier","shorthand_property_identifier","jsx_identifier"]);function Et(e){if(us.has(e.type))return e;if(e.type==="subscript_expression")return ps(e);let t=null;return er(e)?t=e.namedChild(e.namedChildCount-1):e.type==="generic_function"?t=e.childForFieldName("function")??e.namedChild(0):e.type==="scoped_identifier"&&(t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1)),t?Et(t):null}function ps(e){let t=It(e.childForFieldName("index"));return t&&["string","number","template_string"].includes(t.type)?t:e}var ds=new Set(["identifier","type_identifier","field_identifier"]),fs=new Set(["identifier"]),ms=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),gs=new Set(["rust","python"]),ys=/\{([^{}]*)\}/g,Ss=/\b([A-Za-z_][\w]*)\b/g;function tr(e,t){return hs(t).has(e.type)}function nr(e,t){return gs.has(t)&&e.type==="string_content"}function Pt(e){let t=0;for(let r of e.values()){let i=r[r.length-1];i!==void 0&&i>t&&(t=i)}let n=new Array(t+1);for(let r=0;r<=t;r+=1)n[r]=new Set;for(let[r,i]of e)for(let s of i)n[s].add(r);return n}function hs(e){return e==="rust"?ds:e==="python"?fs:ms}function rr(e,t){let n=e.startPosition.row;for(let r of e.text.matchAll(ys)){let i=r[1]??"";for(let s of i.matchAll(Ss))s[1]&&t(s[1],n)}}var xs=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],bs=/^#!?\[\s*serde\s*\(/,Ns=/^#!?\[\s*schemars\s*\(/,_s=/^#!?\[\s*validate\s*\(/,Cs=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]),Is=new Set(["typescript","tsx","javascript"]);function ir(e,t,n){if(!Is.has(t)||e.type!=="call_expression")return;let r=e.childForFieldName("function")??e.namedChild(0);if(!r)return;let i=qe(r);!i||!Cs.has(i)||Es(e,n)}function Es(e,t){let n=e.namedChildren.find(s=>s.type==="arguments");if(!n)return;let r=n.namedChild(0);if(!r||r.type!=="string")return;let i=r.namedChildren.find(s=>s.type==="string_fragment");i&&t.add(i.text)}function sr(e,t){let n=bs.test(e),r=Ns.test(e),i=_s.test(e);if(!(!n&&!r&&!i))for(let s of xs){s.lastIndex=0;let o;for(;(o=s.exec(e))!==null;){let a=o[1],c=a.split("::").pop()??a;Ps(c,a)||c&&t.add(c)}}}function Ps(e,t){return e==="is_none"?/\bOption\b/.test(t):e==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(t)}function or(e,t){let n=new Map,r=(l,u)=>{if(l===u)return;let p=n.get(l);p||(p=new Set,n.set(l,p)),p.add(u)},i=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),s=(l,u)=>{let p=d=>{i.has(d.type)&&d.text!==u&&r(d.text,u);for(let f of d.children)p(f)};for(let d of l.children)p(d)};return t==="rust"?(()=>{for(let l of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let u=l.namedChildren.find(d=>d.type==="type_identifier")?.text;if(!u)continue;let p=l.namedChildren.find(d=>d.type==="field_declaration_list"||d.type==="enum_variant_list"||d.type==="ordered_field_declaration_list");p&&s(p,u),l.type==="type_item"&&s(l,u)}})():t==="python"?(()=>{for(let l of e.rootNode.descendantsOfType("class_definition")){let u=l.namedChildren.find(f=>f.type==="identifier")?.text;if(!u)continue;let p=l.childForFieldName("superclasses");p&&s(p,u);let d=l.namedChildren.find(f=>f.type==="block");if(d)for(let f of d.descendantsOfType("type"))for(let I of f.descendantsOfType("identifier"))r(I.text,u)}})():(()=>{for(let l of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let u=l.namedChildren.find(p=>p.type==="type_identifier")?.text;u&&s(l,u)}})(),n}var Rs=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),Rt=new Set(["catch","comment","def","defprotocol","defrecord","deftype","defmethod","defmacro","defmacro-","defn","defn-","do","doseq","dotimes","fn","for","if","let","loop","ns","quote","recur","throw","try","extend-protocol","extend-type","when","when-let","when-not"]);function ar(e){let t=[],n=[],r=[],i=new Map,s=[],o={line:0,index:0},a=(l,u)=>{let p=i.get(l);if(!p){i.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)},c={callables:t,callSites:n,clojureMembers:r,recordIdentifier:a};for(;o.index<e.length;){let l=e[o.index];if(ks(e,l,o)||Ts(l,o,s,c))continue;if(Tt(l)){o.index+=1;continue}let u=Ls(e,o);u&&(Fs(s[s.length-1],u),a(v(u.text),u.line))}return{language:"clojure",callables:t,callSites:n,clojureMembers:r,typeContainerMap:new Map,identifierLineMap:i,identifiersByLine:$s(i),fileIdentifiers:new Set(i.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function ks(e,t,n){if(t===`
10
+ `)n.line+=1,n.index+=1;else if(/\s|,/.test(t))n.index+=1;else if(t===";")n.index=Ke(e,n.index);else if(t==='"'){let r=ke(e,n.index,n.line);n.line=r.line,n.index=r.index}else return!1;return!0}function Ts(e,t,n,r){if(e==="("||e==="["||e==="{")n.push({kind:e,startLine:t.line,endLine:t.line,headTokens:[],tokens:[],children:[]});else if(e===")"||e==="]"||e==="}"){let i=n.pop();i&&(i.endLine=t.line,Ds(i,r),n[n.length-1]?.children.push(i))}else return!1;return t.index+=1,!0}function Ls(e,t){let n=t.line,r=t.index;for(;t.index<e.length&&!Lt(e[t.index]);)t.index+=1;let i=e.slice(r,t.index);return i?{text:i,line:n,column:r-e.lastIndexOf(`
11
+ `,r-1)-1}:null}function Ds(e,t){if(e.kind!=="("||e.headTokens.length===0)return;let n=e.headTokens[0],r=v(n.text),i=Rs.get(n.text);if(i){let o=e.headTokens[1];if(o){let a=v(o.text);t.recordIdentifier(a,o.line),t.callables.push({name:a,startLine:e.startLine,endLine:e.endLine,paramCount:0,params:[],paramsEndLine:o.line,isLiteralPassthrough:!1,clojureKind:i})}}if(ws(e,t),!r||Rt.has(n.text)||Rt.has(r)||r.startsWith(":"))return;let s=Ms(n.text);t.callSites.push({calleeLeaf:s.leaf,calleeQualifier:s.qualifier,calleeText:s.text,memberAccess:!1,line:n.line,targetRange:{startLine:n.line,startColumn:n.column,endLine:n.line,endColumn:n.column+n.text.length}})}function Fs(e,t){e&&(e.headTokens.length<2&&e.headTokens.push(t),e.tokens.length<200&&e.tokens.push(t))}function ws(e,t){let n=v(e.tokens[0]?.text??"");if(n==="extend-protocol"){vs(e,t);return}let r=As(n);if(!r)return;let i=v(e.tokens[1]?.text??"");if(i)for(let s of cr(e))kt(t,i,r.ownerKind,s,r.memberKind)}function As(e){switch(e){case"defprotocol":return{ownerKind:"protocol",memberKind:"protocol-method"};case"defrecord":return{ownerKind:"record",memberKind:"record-method"};case"deftype":return{ownerKind:"type",memberKind:"type-method"};case"extend-type":return{ownerKind:"extension",memberKind:"extension-method"};default:return null}}function vs(e,t){let n=v(e.tokens[1]?.text??"");for(let r of cr(e)){n&&kt(t,n,"extension",r,"extension-method");let i=js(e,r.startLine);i&&i!==n&&kt(t,i,"extension",r,"extension-method")}}function cr(e){return e.children.filter(Os)}function Os(e){if(e.kind!=="(")return!1;let t=v(e.tokens[0]?.text??"");return!!(t&&!Rt.has(t)&&!t.startsWith(":"))}function kt(e,t,n,r,i){let s=r.tokens[0],o=v(s?.text??"");!s||!o||(e.recordIdentifier(o,s.line),e.clojureMembers.push({ownerName:t,ownerKind:n,memberName:o,memberKind:i,startLine:r.startLine,endLine:r.endLine}))}function js(e,t){let n=null;for(let r=2;r<e.tokens.length;r+=1){let i=e.tokens[r];if(i.line>t)break;let s=v(i.text);s&&!s.startsWith(":")&&(n=s)}return n}function v(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function Ms(e){let t=e.replace(/^#?['`~@]+/,""),n=t.lastIndexOf("/"),r=v(t);if(n<=0)return{leaf:r,text:t};let i=t.slice(0,n);return{leaf:r,qualifier:i,text:t}}function Ke(e,t){let n=t;for(;n<e.length&&e[n]!==`
12
+ `;)n+=1;return n}function ke(e,t,n){let r=t+1,i=n;for(;r<e.length;){let s=e[r];if(s==="\\"){r+=2;continue}if(s===`
13
+ `&&(i+=1),r+=1,s==='"')break}return{index:r,line:i}}function Tt(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function Lt(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function $s(e){let t=[];for(let[n,r]of e)for(let i of r)t[i]??=new Set,t[i].add(n);return t}var lr=15,Vs=pe("source-facts",{clearGroups:["whole-project","source-file"]}),Dt=Z({kind:"source-facts",invalidation:ee("source-facts"),serialize:zs,deserialize:Hs});function te(e,t){return Ft(e,t).facts}function Ft(e,t){let n=b(e,t);if(!n)return{facts:null};let r=Us(e,t,n);return r?Vs.get(e,t,n,()=>Ws(e,t,r,n)):{facts:null}}function Us(e,t,n){return q(t)?Ee(e,t,n)?.language??null:E(t)}function Ws(e,t,n,r){let i=z(e,t,r),s=Dt.read(e,t,i);if(s&&s.language===n)return{facts:s};if(n==="clojure"){let c=ar(r);return Dt.write(e,t,i,c),{facts:c}}let o=N(e,t);if(!o)return{facts:null,unavailable:{language:n,reason:"parser-unavailable"}};let a=qs(o,n);return Dt.write(e,t,i,a),{facts:a}}function zs(e){let t={version:lr,language:e.language,callables:e.callables,callSites:e.callSites,clojureMembers:e.clojureMembers,typeContainerMap:[...e.typeContainerMap.entries()].map(([n,r])=>[n,[...r]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function Hs(e){try{let t=JSON.parse(e);if(t.version!==lr||t.language==="clojure"&&(t.clojureMembers===void 0||t.callSites.some(r=>r.calleeText===void 0)))return null;let n=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,clojureMembers:t.clojureMembers??[],typeContainerMap:new Map(t.typeContainerMap.map(([r,i])=>[r,new Set(i)])),identifierLineMap:n,identifiersByLine:Pt(n),fileIdentifiers:new Set(n.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function qs(e,t){let n=[],r=[],i=new Set,s=new Set,o=new Map,a=(u,p)=>{let d=o.get(u);if(!d){o.set(u,[p]);return}d[d.length-1]!==p&&d.push(p)},c=[],l=u=>{let p=ze(u,t);p&&(p.branches=0,n.push(p),c.push(p));let d=jn(u);if(d>0)for(let I of c)I.branches=(I.branches??0)+d;let f=He(u,t);f&&r.push(f),ir(u,t,s),Ks(u,t,i,a);for(let I of u.children)l(I);p&&c.pop()};return l(e.rootNode),{language:t,callables:n,callSites:r,clojureMembers:[],typeContainerMap:or(e,t),identifierLineMap:o,identifiersByLine:Pt(o),fileIdentifiers:new Set(o.keys()),rustAttrReferencedNames:i,crossLanguageDispatchNames:s}}function Ks(e,t,n,r){t==="rust"&&(e.type==="attribute_item"||e.type==="inner_attribute_item")&&sr(e.text,n),tr(e,t)&&r(e.text,e.startPosition.row),nr(e,t)&&rr(e,r)}var pr=new Set(["rust","typescript","tsx","javascript","python","clojure"]),Js=new Set(["rust","typescript","tsx","javascript","python"]),dr=new Set(["typescript","tsx","javascript"]),wt=new WeakMap,ur=new WeakMap;function At(e,t){let n=te(e,t);return!n||!pr.has(n.language)?null:n.callables.map(r=>({name:r.name,startLine:r.startLine,endLine:r.endLine}))}function vt(e,t){return fr(e,t)?.map(({name:n,startLine:r,endLine:i})=>({name:n,startLine:r,endLine:i}))??null}function fr(e,t){if(!Js.has(t))return null;let n=wt.get(e)?.get(t);if(n)return n;let r=[];for(let s of _t(e,[...Jn(t)])){let o=ze(s,t);o&&r.push({...o,branches:void 0})}let i=wt.get(e)??new Map;return i.set(t,r),wt.set(e,i),r}function tp(e,t){let n=E(t);if(!n||!dr.has(n))return te(e,t)?.callables??null;let r=N(e,t)?.rootNode;return r?fr(r,n):null}function Qs(e,t){let n=E(t);if(n&&dr.has(n)){let i=N(e,t)?.rootNode;if(!i)return null;let s=ur.get(i);if(s)return s;let o=_t(i,["call_expression","new_expression","jsx_opening_element","jsx_self_closing_element"]).flatMap(a=>{let c=He(a,n);return c?[c]:[]});return ur.set(i,o),o}let r=te(e,t);return!r||!pr.has(r.language)?null:r.callSites}function mr(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}import{createRequire as oo}from"module";import{existsSync as ie}from"fs";import{basename as yr,dirname as P,extname as $,join as T,relative as ne,resolve as h,sep as ao}from"path";import{existsSync as jt,readdirSync as Gs,statSync as Ys}from"fs";import{join as Se,relative as Xs}from"path";function gr(e){let t=Zs(e)??ro(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let i of t)for(let s of io(e,i)){if(r.has(s))continue;r.add(s);let o=so(e,s);o&&n.push(o)}return n}function Zs(e){let t=Se(e,"pnpm-workspace.yaml");if(!jt(t))return null;try{return eo(we(t,"pnpm workspace manifest"))}catch{return null}}function eo(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let i=to(r);if(!n){/^packages\s*:\s*$/.test(i.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(i);if(s){let o=no(s[1].trim());o&&t.push(o);continue}if(i.trim()!=="")break}return t}function to(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function no(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function ro(e){let t=Se(e,"package.json");if(!jt(t))return null;try{let n=JSON.parse(we(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function io(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let o=Se(e,t);return Ot(o)?[o]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),i=t.slice(n+1).replace(/^\//,""),s=Se(e,r||".");return Ot(s)?Gs(s).map(o=>Se(s,o,i)).filter(Ot):[]}function Ot(e){try{return Ys(e).isDirectory()}catch{return!1}}function so(e,t){let n=Se(t,"package.json");if(!jt(n))return null;try{let r=JSON.parse(we(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:Xs(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var co=ue("indexed-paths",{clearGroups:[]}),lo=ue("indexed-path-digest",{clearGroups:[]}),uo=le("tsconfig-alias-config",{clearGroups:["whole-project"]}),po=le("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),fo=oo(import.meta.url),Te;function mo(){if(Te!==void 0)return Te;try{Te=fo("typescript")}catch{Te=null}return Te}var go=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],yo=ue("workspace-packages",{clearGroups:["whole-project"]}),re=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],Je=[".py",".pyi"],R=[".java",".scala",".kt",".kts"],Qe=[".rs"],Ge=[".rb"],Ye=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],K=[".cs",".vb"],Xe=[".dart"],se=[".php"],he=[".clj",".cljs",".cljc"],So=new Set(re),Mt=new Set(Je),Sr=new Set(R),$t=new Set(Qe),Bt=new Set(Ge),hr=new Set(Ye),xr=new Set(K),Vt=new Set(Xe),br=new Set(se),Nr=new Set(he),ho=[{extensions:re,lookup:So},{extensions:Je,lookup:Mt},{extensions:R,lookup:Sr},{extensions:Qe,lookup:$t},{extensions:Ge,lookup:Bt},{extensions:Ye,lookup:hr},{extensions:K,lookup:xr},{extensions:Xe,lookup:Vt},{extensions:se,lookup:br},{extensions:he,lookup:Nr}];function B(e,t){return t.has($(e).toLowerCase())}function xo(e){return B(e,Mt)}function bo(e){return B(e,Sr)}function No(e){return B(e,$t)}function _o(e){return B(e,Bt)}function Co(e){return B(e,hr)}function Io(e){return B(e,xr)}function _r(e){return $(e).toLowerCase()===".vb"}function Eo(e){return B(e,Vt)}function Po(e){return B(e,br)}function Ro(e){return B(e,Nr)}function Ut(e){let t=$(e).toLowerCase();for(let n of ho)if(n.lookup.has(t))return n.extensions;return re}function ko(e){return bo(e)||Io(e)||Po(e)}function J(e,t,n){return xo(t)?xe(e,t,n):No(t)?V(e,t,n):_o(t)?Ze(e,t,n):Co(t)?et(e,t,n):ko(t)?g(e,n.replace(/\\/g,"."),Ut(t)):Eo(t)?tt(e,t,n):Ro(t)?Wt(e,n):To(e,t,n)}function To(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return Lo(e,t,n)??Fo(e,n);let r=P(T(e.config.projectRoot,t)),i=h(r,n),s=U(e);for(let o of Ht(i)){let a=x(ne(e.config.projectRoot,o));if(s.has(a)||ie(o))return a}return x(ne(e.config.projectRoot,i))}function Lo(e,t,n){let r=Mo(e,t);if(!r)return null;let i=U(e);for(let s of Do(r,n)){let o=h(r.baseUrl,s);for(let a of Ht(o)){let c=x(ne(e.config.projectRoot,a));if(i.has(c)||ie(a))return c}}return null}function Do(e,t){let n=[];for(let[r,i]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...i);continue}Ho(r,s,t,i,n)}return n}function Fo(e,t){let n=Ao(wo(e),t);if(!n)return null;let r=U(e);for(let i of vo(n)){let s=h(e.config.projectRoot,n.pkg.relativeDir,i);for(let o of Ht(s)){let a=x(ne(e.config.projectRoot,o));if(r.has(a)||ie(o))return a}}return null}function wo(e){return yo.get(e,()=>gr(e.config.projectRoot))}function Ao(e,t){let n=null;for(let r of e){let i=null;t===r.name?i="":t.startsWith(`${r.name}/`)&&(i=t.slice(r.name.length+1)),i!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:i})}return n}function vo(e){let t=[],n=Oo(e.pkg.exports,e.subpath);if(n){t.push(n.replace(/^\.\//u,""));let r=jo(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function Oo(e,t){if(typeof e=="string")return t===""?e:null;if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return Cr(e[n])}function Cr(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return null;let t=e;for(let n of["types","import","default","require","node"]){let r=Cr(t[n]);if(r)return r}return null}function jo(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function Mo(e,t){let n=x(P(t));return po.get(e,n,()=>$o(e,n))}function $o(e,t){let n=mo();if(!n)return null;let r=h(e.config.projectRoot),i=h(r,t);for(;i===r||i.startsWith(r+ao);){for(let o of go){let a=T(i,o);if(!ie(a))continue;let c=uo.get(e,a,()=>Bo(n,a));if(c)return c}let s=P(i);if(s===i)break;i=s}return null}function Bo(e,t){try{let n=e.readConfigFile(t,e.sys.readFile);if(n.error||!n.config)return null;let r=e.parseJsonConfigFileContent(n.config,e.sys,P(t)),i=r.options.paths;return!i||Object.keys(i).length===0?null:{baseUrl:r.options.baseUrl?h(P(t),r.options.baseUrl):P(t),paths:i}}catch{return null}}function xe(e,t,n){let r=U(e),i;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let o=s[1].length,a=s[2].replace(/^\./,""),c=P(T(e.config.projectRoot,t));for(let l=1;l<o;l++)c=P(c);i=a?h(c,a.replace(/\./g,"/")):c}else i=h(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of Vo(i)){let o=x(ne(e.config.projectRoot,s));if(r.has(o)||ie(s))return o}return null}function V(e,t,n){if(!n)return null;let r=n.replace(/\s+as\s+.+$/,"").trim();if(!r.startsWith("crate::")&&!r.startsWith("self::")&&!r.startsWith("super::"))return null;let i=P(T(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=h(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=h(i,r.slice(6).replace(/::/g,"/")):s=h(P(i),r.slice(7).replace(/::/g,"/")),zt(e,Uo(s))}function Ze(e,t,n){let r=P(T(e.config.projectRoot,t)),i=h(r,n);return zt(e,Wo(i))}function et(e,t,n){let r=P(T(e.config.projectRoot,t)),i=[h(r,n),h(e.config.projectRoot,n),h(e.config.projectRoot,"include",n),h(e.config.projectRoot,"src",n)];return zt(e,i)}function g(e,t,n){let r=U(e),i=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=i.replace(/\./g,"/"),o=i.split(".").pop()??i;for(let c of n){let l=`${s}${c}`,u=[...r].find(p=>p.endsWith(l));if(u)return u}for(let c of n){let l=[...r].find(u=>yr(u)===`${o}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes($(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${o}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function tt(e,t,n){let r=U(e);if(n.startsWith("package:")){let o=n.slice(8),a=o.indexOf("/");if(a<0)return null;let c=o.slice(a+1),l=x(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let i=P(T(e.config.projectRoot,t)),s=h(i,n);for(let o of zo(s)){let a=x(ne(e.config.projectRoot,o));if(r.has(a)||ie(o))return a}return null}function Wt(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=U(e);for(let i of he){let s=`${n}${i}`,o=[...r].find(a=>a.endsWith(s));if(o)return o}for(let i of he){let s=[...r].find(o=>yr(o)===`${n.split("/").pop()}${i}`);if(s)return s}return null}function Vo(e){let t=$(e);return Mt.has(t)?[e]:[`${e}.py`,`${e}.pyi`,T(e,"__init__.py"),T(e,"__init__.pyi")]}function zt(e,t){let n=U(e);for(let r of t){let i=x(ne(e.config.projectRoot,r));if(n.has(i)||ie(r))return i}return null}function Uo(e){let t=$(e);return $t.has(t)?[e]:[`${e}.rs`,T(e,"mod.rs")]}function Wo(e){let t=$(e);return Bt.has(t)?[e]:[`${e}.rb`,T(e,"index.rb")]}function zo(e){let t=$(e);return Vt.has(t)?[e]:[`${e}.dart`,e]}function Ht(e){let t=$(e),n=new Set;if(t){n.add(e);for(let r of re)n.add(e.slice(0,-t.length)+r)}else for(let r of re)n.add(`${e}${r}`),n.add(T(e,`index${r}`));return[...n]}function U(e){return co.get(e,()=>new Set(de(e,{includeIgnored:!1}).map(x)))}function qt(e){return lo.get(e,()=>dn([...U(e)].sort().join(`
14
+ `)))}function Ho(e,t,n,r,i){let s=e.slice(0,t),o=e.slice(t+1);if(!n.startsWith(s)||!n.endsWith(o)||n.length<s.length+o.length)return;let a=n.slice(s.length,n.length-o.length);for(let c of r)i.push(c.includes("*")?c.replace("*",a):c)}function qo(e,t,n={}){let r=te(e,t);if(!r)return[];let i=[];if(n.includeCrossLanguageDispatchNames)for(let s of r.crossLanguageDispatchNames)i.push({name:s,kind:"cross-language-dispatch",occurrences:1});if(n.includeRustAttributeNames&&r.language==="rust")for(let s of r.rustAttrReferencedNames)i.push({name:s,kind:"rust-attribute",occurrences:1});return i}import{basename as Ir}from"path";function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ko(e){return e.replace(/'''[\s\S]*?'''/g,Q).replace(/"""[\s\S]*?"""/g,Q).replace(/#.*$/gm,Q).replace(/\/\/.*$/gm,Q).replace(/\/\*[\s\S]*?\*\//g,Q).replace(/`(?:\\[\s\S]|[^`])*`/g,Q).replace(/'(?:\\.|[^'\\\r\n])*'/g,Q).replace(/"(?:\\.|[^"\\\r\n])*"/g,Q)}function Q(e){return e.replace(/[^\r\n]/g," ")}un({name:"stripped-source-singleton",groups:["whole-project","source-file"],clearAll:()=>{nt=null,Le=""},clearFile:()=>{nt=null,Le=""}});var nt=null,Le="";function Jo(e){return nt===e||(nt=e,Le=Ko(e)),Le}function G(e,t,n){let r=Jo(e);return`${r.slice(0,t)}${" ".repeat(n-t)}${r.slice(n)}`}function _(e,t){return new RegExp(`\\b${O(t)}\\b`,"m").test(e)}function be(e,t){let n=new Set,r=new RegExp(`\\b${O(t)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let i of e.matchAll(r)){let s=i[1];s&&n.add(s)}return[...n]}function Kt(e){let t=0;for(let n of e)n==="("&&(t+=1),n===")"&&(t-=1);return t}var Qo=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function C(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let s=e[i];(s==="{"||s==="["||s==="(")&&n++,(s==="}"||s==="]"||s===")")&&n--,s===","&&n===0&&(t.push(e.slice(r,i)),r=i+1)}return t.push(e.slice(r)),t}function k(e,t){for(let n of e.namedChildren)if(n.type===t)return n;return null}function y(e,t){let n=new Set,r=(i,s)=>{let o=s||t.has(i.type);!o&&Qo.has(i.type)&&n.add(i.text);for(let a of i.children)r(a,o)};return r(e.rootNode,!1),n}function A(e,t,n,r,i,s,o){return{importedName:i,localName:s,sourcePath:o??g(e,r,Ut(t)),kind:"named",used:_(n,s),usedMembers:[]}}function m(e,t,n,r,i="named",s={}){return{importedName:e,localName:t,sourcePath:n,kind:i,used:r.has(t),usedMembers:[],isTypeOnly:s.isTypeOnly}}function W(e,t,n,r,i="named",s=[],o={}){return{importedName:e,localName:t,sourcePath:n,kind:i,used:r,usedMembers:s,isTypeOnly:o.isTypeOnly}}function oe(e,t){return{importedName:e,localName:null,sourcePath:t,kind:"side-effect",used:!0,usedMembers:[]}}function ae(e,t,n={}){return{importedName:e,localName:n.localName??null,sourcePath:t,kind:"namespace",used:n.used??!0,usedMembers:n.usedMembers??[],isTypeOnly:n.isTypeOnly}}function L(e,t,n){let r=[];for(let i of e.matchAll(t)){let s=i[0];if(!s||typeof i.index!="number")continue;let o=G(e,i.index,i.index+s.length);for(let a of n(i,o))r.push(a)}return r}function D(e,t,n,r,i){let s=We(e,t,i);if(s){let o=n(s);if(o)return o}return r()}function rt(e,t,n,r,i){let s=We(e,t,i),o=E(t),a=o?n[o]:void 0;return s&&a?a(s):r()}function Er(e,t,n){return D(e,t,r=>Yo(e,t,r),()=>Go(e,t,n),n)}function Go(e,t,n){return L(n,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(r,i)=>{let s=r[1]?.trim();if(!s)return[];let o=Ir(s).replace(/\.[^.]+$/,"");return[W(s,o,et(e,t,s),_(i,o))]})}function Yo(e,t,n){let r=y(n,new Set(["preproc_include"])),i=[];for(let s of n.rootNode.descendantsOfType("preproc_include")){let o=null;for(let c of s.namedChildren){if(c.type==="system_lib_string"){o=c.text.replace(/^<|>$/g,"");break}if(c.type==="string_literal"){o=c.namedChildren.find(u=>u.type==="string_content")?.text??c.text.replace(/^"|"$/g,"");break}}if(!o)continue;let a=Ir(o).replace(/\.[^.]+$/,"");i.push(m(o,a,et(e,t,o),r))}return i}var Xo=new Set([":require",":require-macros",":use"]),Qt=String.raw`A-Za-z0-9_$*+!?.<>=-`;function Rr(e,t,n){let r=da(n);if(!r)return[];let i=pa(n,r.start,r.end),s=[];for(let o of r.children.slice(2)){if(o.type!=="list"||o.children.length===0)continue;let a=F(o.children[0]);if(a)for(let c of Zo(e,o,a,i))s.push(c)}return s}function Zo(e,t,n,r){let i=[];if(Xo.has(n)){for(let s of na(t.children.slice(1)))i.push(...ta(e,s,r));return i}if(n===":import")for(let s of oa(t.children.slice(1)))i.push(s);return i}function ea(e){return e.type==="list"&&F(e.children[0])==="ns"}function ta(e,t,n){let r=Wt(e,t.namespace),i=t.alias??t.namespace,s=ca(n,i),o=[{importedName:t.namespace,localName:i,sourcePath:r,kind:"namespace",used:t.refers.length>0||t.referAll||s.length>0||la(n,t.namespace),usedMembers:s}];t.referAll&&o.push({importedName:"*",localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]});for(let a of t.refers)o.push({importedName:a,localName:a,sourcePath:r,kind:"named",used:ua(n,a),usedMembers:[]});return o}function na(e){return e.flatMap(t=>it(t,null))}function it(e,t){return e.type==="atom"?e.text.startsWith(":")?[]:[{namespace:Gt(t,e.text),alias:null,refers:[],referAll:!1}]:e.type==="vector"?e.children.length>0&&F(e.children[0])===null?e.children.flatMap(n=>it(n,t)):sa(e,t):e.type==="list"?ra(e,t):[]}function ra(e,t){if(e.children.length===0)return[];let n=F(e.children[0]);return n?n.startsWith(":")?[]:e.children.slice(1).flatMap(r=>it(r,Gt(t,n))):e.children.flatMap(r=>it(r,t))}function ia(e,t){F(t)===":all"?e.referAll=!0:(t.type==="vector"||t.type==="list")&&e.refers.push(...t.children.map(F).filter(aa))}function sa(e,t){let n=F(e.children[0]);if(!n||n.startsWith(":"))return[];let r={namespace:Gt(t,n),alias:null,refers:[],referAll:!1};for(let i=1;i<e.children.length;i+=1){let s=F(e.children[i]);if(!s?.startsWith(":"))continue;let o=e.children[i+1];if((s===":as"||s===":as-alias")&&o){r.alias=F(o),i+=1;continue}s===":refer"&&o&&(ia(r,o),i+=1)}return[r]}function oa(e){let t=[];for(let n of e){if(n.type==="atom"){let i=n.text.split(".").pop()??n.text;t.push(W(i,i,null,!0));continue}if(n.type!=="vector")continue;let r=F(n.children[0]);if(r)for(let i of n.children.slice(1)){let s=F(i);s&&t.push(W(`${r}.${s}`,s,null,!0))}}return t}function Gt(e,t){return e?`${e}.${t}`:t}function F(e){return e?.type==="atom"?e.text:null}function aa(e){return!!(e&&!e.startsWith(":"))}function ca(e,t){let n=new Set,r=new RegExp(`${Yt()}${O(t)}\\s*/\\s*([${Qt}]+)`,"g");for(let i of e.matchAll(r)){let s=i[1];s&&n.add(s)}return[...n]}function la(e,t){return new RegExp(`${Yt()}${O(t)}\\s*/`,"m").test(e)}function ua(e,t){return new RegExp(`${Yt()}${O(t)}(?![${Qt}])`,"m").test(e)}function Yt(){return`(?<![${Qt}])`}function pa(e,t,n){let r="",i=0;for(;i<e.length;){if(i>=t&&i<n){r+=e[i]===`
15
+ `?`
16
+ `:" ",i+=1;continue}let s=e[i];if(s===";"){let o=Ke(e,i);r+=Pr(e.slice(i,o)),i=o;continue}if(s==='"'){let o=ke(e,i,0).index;r+=Pr(e.slice(i,o)),i=o;continue}r+=s,i+=1}return r}function da(e){let t=0;for(;t<e.length&&(t=Xt(e,t),!(t>=e.length));){let n=st(e,t);if(!n){t+=1;continue}if(ea(n.form))return n.form;t=n.index}return null}function st(e,t){let n=Xt(e,t);if(e.startsWith("#?@",n)||e.startsWith("#?",n))return ma(e,n);if(e.startsWith("#_",n)){let r=st(e,n+2);return r?{form:{type:"atom",text:"",start:n,end:r.index},index:r.index}:null}for(;Tt(e[n]);)n+=1;return fa(e,n)}function fa(e,t){let n=e[t];return n?n==="("?Jt(e,t,"list",")"):n==="["?Jt(e,t,"vector","]"):n==="{"?Jt(e,t,"map","}"):n==='"'?{form:{type:"atom",text:"",start:t,end:ke(e,t,0).index},index:ke(e,t,0).index}:ya(e,t):null}function ma(e,t){let n=e.startsWith("#?@",t)?3:2,r=st(e,t+n);return r?{form:{type:"list",children:r.form.type==="list"||r.form.type==="vector"||r.form.type==="map"?ga(r.form.children):[],start:t,end:r.index},index:r.index}:null}function ga(e){let t=[];for(let n=0;n<e.length;n+=2){let r=F(e[n]),i=e[n+1];r?.startsWith(":")&&i&&t.push(i)}return t}function Jt(e,t,n,r){let i=[],s=t+1;for(;s<e.length;){if(s=Xt(e,s),e[s]===r)return{form:{type:n,children:i,start:t,end:s+1},index:s+1};let o=st(e,s);if(!o){s+=1;continue}o.form.type==="atom"&&o.form.text===""||i.push(o.form),s=o.index}return{form:{type:n,children:i,start:t,end:e.length},index:e.length}}function ya(e,t){let n=t;for(;n<e.length&&!Lt(e[n]);)n+=1;return{form:{type:"atom",text:e.slice(t,n),start:t,end:n},index:n}}function Xt(e,t){let n=t;for(;n<e.length;){let r=e[n];if(/\s|,/.test(r)){n+=1;continue}if(r===";"){n=Ke(e,n);continue}break}return n}function Pr(e){return e.replace(/[^\r\n]/g," ")}function kr(e,t,n){let r=[];for(let i of n.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let s=i[1]?.trim(),o=i[2]?.trim()??null,a=i[0];if(!s||!a||typeof i.index!="number")continue;let c=G(n,i.index,i.index+a.length);r.push({importedName:s,localName:o,sourcePath:tt(e,t,s),kind:o?"namespace":"side-effect",used:o?_(c,o):!0,usedMembers:o?be(c,o):[]})}return r}function Tr(e,t,n){let r=[];for(let i of n.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let s=i[1]?.trim();s&&r.push({specifier:s,sourcePath:tt(e,t,s)})}return r}function Lr(e,t,n){return rt(e,t,{csharp:r=>ha(e,t,r),vb:r=>Sa(e,t,r)},()=>{let r=_r(t)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return L(n,r,(i,s)=>{let o=i[1]?.trim();if(!o)return[];let[a,c]=o.split(/\s*=\s*/),l=!!c,u=(l?c:a)?.trim()??o,p=u.split(".").pop()??u,d=l?a?.trim()??p:p;return[A(e,t,s,u,p,d,g(e,u,K))]})},n)}function Sa(e,t,n){let r=y(n,new Set(["imports_statement"])),i=[];for(let s of n.rootNode.descendantsOfType("imports_statement")){let o=s.namedChildren.filter(d=>d.type==="namespace_name");if(o.length===0)continue;let a=o[o.length-1],c=o.length>1?o[0]:null,l=a.text,u=l.split(".").pop()??l,p=c?.text??u;i.push(m(u,p,g(e,l,K),r,c?"namespace":"named"))}return i}function ha(e,t,n){let r=y(n,new Set(["using_directive"])),i=[];for(let s of n.rootNode.descendantsOfType("using_directive")){let o=s.namedChildren;if(o.length===0)continue;let a=null,c;o.length>=2&&o[0].type==="identifier"&&(o[1].type==="qualified_name"||o[1].type==="identifier")?(a=o[0],c=o[1]):c=o[o.length-1];let l=c.text,u=l.split(".").pop()??l,p=a?.text??u;i.push(m(u,p,g(e,l,K),r,a?"namespace":"named"))}return i}var xa=w("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function Dr(e,t){return xa.get(e,t,()=>{let n=new Set,r=b(e,t);if(!r)return n;let s=r.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,o=>o.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,o=>o.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,o=>o.replace(/[^\r\n]/g," "));for(let o of s.matchAll(/[A-Za-z_$][\w$]*/g))n.add(o[0]);return n})}function Zt(e,t,n){return D(e,t,r=>Na(e,t,r),()=>ba(e,t,n),n)}function ba(e,t,n){return Fa(n).flatMap(r=>wa(e,t,r.clause,r.specifier,r.start,r.end,n))}function Na(e,t,n){let r=_a(e,t,n),i=[];for(let s of n.rootNode.descendantsOfType("import_statement"))i.push(...Ca(e,t,n,s,r));return i}function _a(e,t,n){let r=y(n,new Set(["import_statement"]));if(q(t))for(let i of Dr(e,t))r.add(i);return r}function Ca(e,t,n,r,i){let s=ka(r);if(!s)return[];let o=J(e,t,s),a=k(r,"import_clause");return a?Ia(n,a,o,i,Ta(r.text)):[oe("*",o)]}function Ia(e,t,n,r,i){let s=[];for(let o of t.namedChildren)if(o.type==="identifier")s.push(Ea(o.text,n,r,i));else if(o.type==="namespace_import"){let a=Pa(e,o,n,r,i);a&&s.push(a)}else o.type==="named_imports"&&s.push(...Ra(o,n,r,i));return s}function Ea(e,t,n,r){return m("default",e,t,n,"default",{isTypeOnly:r})}function Pa(e,t,n,r,i){let o=k(t,"identifier")?.text??"";if(!o)return null;let a=Da(e,o);return ae("*",n,{localName:o,usedMembers:a,isTypeOnly:i,used:a.length>0||r.has(o)})}function Ra(e,t,n,r){let i=[];for(let s of e.namedChildren){if(s.type!=="import_specifier")continue;let o=s.namedChild(0),a=s.namedChild(1);if(!o)continue;let c=o.text,l=a?.text??c;i.push(m(c,l,t,n,"named",{isTypeOnly:r||La(s.text)}))}return i}function ka(e){let t=k(e,"string");if(!t)return null;let n=k(t,"string_fragment");return n?n.text:null}function Ta(e){return/^\s*import\s+type\b/.test(e)}function La(e){return/^\s*type\b/.test(e.trim())}function Da(e,t){let n=new Set;for(let r of e.rootNode.descendantsOfType("member_expression")){let i=r.namedChild(0),s=r.namedChild(1);!i||!s||i.type!=="identifier"||i.text!==t||(s.type==="property_identifier"||s.type==="identifier")&&n.add(s.text)}return[...n]}function Fa(e){let t=[],n=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of e.matchAll(n)){let s=i[0],o=i[1],a=i[2];!s||!a||typeof i.index!="number"||t.push({clause:o,specifier:a,start:i.index,end:i.index+s.length})}let r=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of e.matchAll(r)){let s=i[0],o=i[1];!s||!o||typeof i.index!="number"||t.push({clause:null,specifier:o,start:i.index,end:i.index+s.length})}return t.sort((i,s)=>i.start-s.start)}function wa(e,t,n,r,i,s,o){let a=J(e,t,r),c=G(o,i,s);return n?Aa(n).map(u=>({...u,sourcePath:a})).map(u=>{if(u.kind==="namespace"){let p=be(c,u.localName);return ae(u.importedName,u.sourcePath,{localName:u.localName,usedMembers:p,used:p.length>0||_(c,u.localName),isTypeOnly:u.isTypeOnly})}return u.kind==="side-effect"?oe(u.importedName,u.sourcePath):W(u.importedName,u.localName??"",u.sourcePath,u.localName?_(c,u.localName):!1,u.kind,[],{isTypeOnly:u.isTypeOnly})}):[oe("*",a)]}function Aa(e){let t=e.trim(),n=/^type\b/.test(t),r=t.replace(/^type\s+/,""),[i,s]=va(r),o=[];return i&&o.push(...Fr(i,n)),s&&o.push(...Fr(s,n)),o}function Fr(e,t){let n=e.trim();if(!n)return[];if(n.startsWith("{")){let r=n.slice(1,-1).trim();return r?C(r).map(i=>{let s=i.trim(),o=t||/^type\b/.test(s),a=s.replace(/^type\s+/,""),[c,l]=a.split(/\s+as\s+/);return{importedName:c.trim(),localName:(l??c).trim(),kind:"named",isTypeOnly:o}}):[]}return n.startsWith("* as ")?[{importedName:"*",localName:n.slice(5).trim(),kind:"namespace",isTypeOnly:t}]:[{importedName:"default",localName:n,kind:"default",isTypeOnly:t}]}function va(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==="{"&&t++,r==="}"&&t--,r===","&&t===0)return[e.slice(0,n).trim(),e.slice(n+1).trim()]}return[e.trim(),null]}function en(e,t,n){let r=N(e,t);return r?Va(e,t,r):Oa(e,t,n)}function Oa(e,t,n){return[...ja(e,t,n),...Ma(e,t,n),...$a(e,t,n)]}function ja(e,t,n){let r=[],i=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[1]??"",a=s[2]??"",c=C(o).map(p=>Ba(p.trim())).filter(p=>!!p),l=Ne(n,s.index),u=Ne(n,s.index+s[0].length-1);r.push({kind:"named",sourcePath:J(e,t,a),names:c,startLine:l,endLine:u})}return r}function Ma(e,t,n){let r=[],i=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[2]??"",a=Ne(n,s.index),c=Ne(n,s.index+s[0].length-1);r.push({kind:"star-as",sourcePath:J(e,t,o),names:s[1]?[s[1]]:[],startLine:a,endLine:c})}return r}function $a(e,t,n){let r=[],i=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[1]??"",a=Ne(n,s.index),c=Ne(n,s.index+s[0].length-1);r.push({kind:"star",sourcePath:J(e,t,o),names:[],startLine:a,endLine:c})}return r}function Ba(e){if(!e)return null;let t=e.replace(/^type\s+/,"").trim();if(!t)return null;let n=t.match(/^(\w+)\s+as\s+(\w+)$/);if(n)return n[2]??null;let r=t.match(/^(\w+)$/);return r?r[1]??null:null}function Ne(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)e.charCodeAt(r)===10&&n++;return n}function Va(e,t,n){let r=[];for(let i of n.rootNode.descendantsOfType("export_statement")){let s=Ua(e,t,i);if(s===void 0)continue;let o=i.startPosition.row,a=i.endPosition.row,c=Wa(i,s,o,a);r.push(c)}return r}function Ua(e,t,n){let r=k(n,"string");if(!r)return;let i=k(r,"string_fragment");if(i)return J(e,t,i.text)}function Wa(e,t,n,r){let i=k(e,"export_clause");if(i){let o=[];for(let a of i.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),l=a.namedChild(1);c&&o.push((l??c).text)}return{kind:"named",sourcePath:t,names:o,startLine:n,endLine:r}}let s=k(e,"namespace_export");if(s){let o=s.namedChildren.find(a=>a.type==="identifier"||a.type==="type_identifier")?.text;return{kind:"star-as",sourcePath:t,names:o?[o]:[],startLine:n,endLine:r}}return{kind:"star",sourcePath:t,names:[],startLine:n,endLine:r}}function wr(e,t,n){return rt(e,t,{java:r=>za(e,t,r),kotlin:r=>Ha(e,t,r),scala:r=>qa(e,t,r)},()=>L(n,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(r,i)=>{let s=r[1]?.trim();return s?Qa(e,t,s,i):[]}),n)}function za(e,t,n){let r=y(n,new Set(["import_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("import_declaration")){let o=s.children.some(p=>p.type==="asterisk"),c=s.namedChildren.find(p=>p.type==="scoped_identifier")??s.namedChildren.find(p=>p.type==="identifier");if(!c)continue;let l=c.text;if(o){i.push(ae("*",g(e,l,R)));continue}let u=l.split(".").pop()??l;i.push(m(u,u,g(e,l,R),r))}return i}function Ha(e,t,n){let r=y(n,new Set(["import_header","import_list"])),i=[];for(let s of n.rootNode.descendantsOfType("import_header")){let o=s.namedChildren.find(f=>f.type==="identifier");if(!o)continue;let a=s.namedChildren.some(f=>f.type==="wildcard_import"),c=s.namedChildren.find(f=>f.type==="import_alias");if(a){i.push(ae("*",g(e,o.text,R)));continue}let l=o.text,u=l.split(".").pop()??l,d=c?.namedChild(0)?.text??u;i.push(m(u,d,g(e,l,R),r))}return i}function qa(e,t,n){let r=y(n,new Set(["import_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("import_declaration")){let o=s.namedChildren.find(l=>l.type==="namespace_selectors"||l.type==="namespace_wildcard"),a=s.namedChildren.filter(l=>l!==o&&(l.type==="identifier"||l.type==="stable_identifier")),c=a.map(l=>l.text).join(".");if(c){if(o?.type==="namespace_wildcard"){i.push(ae("*",g(e,c,R)));continue}if(o?.type==="namespace_selectors"){for(let l of o.namedChildren){let u=Ja(e,c,l,r);u&&i.push(u)}continue}i.push(Ka(e,c,a,r))}}return i}function Ka(e,t,n,r){let i=n[n.length-1]?.text??t,s=n.slice(0,-1).map(o=>o.text).join(".")||t;return m(i,i,g(e,s&&n.length>1?`${s}.${i}`:t,R),r)}function Ja(e,t,n,r){if(n.type==="arrow_renamed_identifier"){let[s,o]=n.namedChildren;if(!s)return null;let a=s.text,c=o?.text??a;return a==="_"?null:m(a,c,g(e,`${t}.${a}`,R),r)}if(n.type!=="identifier")return null;let i=n.text;return m(i,i,g(e,`${t}.${i}`,R),r)}function Qa(e,t,n,r){if(n.includes("{")&&n.includes("}")){let i=n.slice(0,n.indexOf("{")).replace(/\.$/,"").trim(),s=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return C(s).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),u=c?.trim();if(!u||u==="_")return[];let p=(l??u.split(".").pop()??u).trim(),d=u==="_"?i:`${i}.${u}`.replace(/\.\./g,".");return[A(e,t,r,d,u,p)]})}return[A(e,t,r,n,n.split(".").pop()??n,n.split(".").pop()??n)]}function vr(e,t,n){return D(e,t,r=>Ga(e,t,r),()=>L(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,i)=>{let s=r[1]?.trim();return s?C(s).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.split(/\s+as\s+/i),u=c?.trim()??a,p=u.split("\\").pop()??u,d=(l??p).trim();return[A(e,t,i,u,p,d,g(e,u.replace(/\\/g,"."),se))]}):[]}),n)}function Ga(e,t,n){let r=y(n,new Set(["namespace_use_declaration"])),i=[],s=(o,a,c)=>{i.push(m(a,c,g(e,o.replace(/\\/g,"."),se),r))};for(let o of n.rootNode.descendantsOfType("namespace_use_declaration")){let a=o.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=o.namedChildren.find(l=>l.type==="namespace_name")?.text??"";Ar(a.namedChildren,c,s);continue}Ar(o.namedChildren,"",s)}return i}function Ar(e,t,n){for(let r of e){if(r.type!=="namespace_use_clause")continue;let{importedName:i,localName:s,qualified:o}=Ya(r,t);i&&n(o,i,s)}}function Ya(e,t){let n=e.namedChildren.find(l=>l.type==="qualified_name"),r=e.namedChildren.filter(l=>l.type==="name"),i="";n?i=n.text:r.length>=1&&(i=r[0].text);let s=n&&r.length>0?r[r.length-1]:null,o=i.split("\\").pop()??i,a=s?.text??o,c=t?`${t}\\${i}`:i;return{importedName:o,localName:a,qualified:c}}function Or(e,t,n){return D(e,t,r=>Xa(e,t,r),()=>tc(n).flatMap(r=>rc(e,t,r,n)),n)}function Xa(e,t,n){let r=y(n,new Set(["import_statement","import_from_statement"])),i=[];for(let s of n.rootNode.descendantsOfType("import_statement"))for(let o of s.namedChildren){let a=jr(o);if(!a)continue;let c=xe(e,t,a.qualifiedName);i.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:r.has(a.localName),usedMembers:[]})}for(let s of n.rootNode.descendantsOfType("import_from_statement")){let o=s.namedChild(0);if(!o)continue;let a=ec(o);if(a===null)continue;let c=xe(e,t,a);Za(s,c,r,i)}return i}function Za(e,t,n,r){for(let i=1;i<e.namedChildCount;i+=1){let s=e.namedChild(i);if(s.type==="wildcard_import"){r.push({importedName:"*",localName:null,sourcePath:t,kind:"side-effect",used:!0,usedMembers:[]});continue}let o=jr(s);o&&r.push({importedName:o.qualifiedName,localName:o.localName,sourcePath:t,kind:"named",used:n.has(o.localName),usedMembers:[]})}}function jr(e){if(e.type==="aliased_import"){let t=e.namedChild(0),n=e.namedChild(1);return!t||!n?null:{qualifiedName:t.text,localName:n.text}}if(e.type==="dotted_name"){let t=e.text;return{qualifiedName:t,localName:t.split(".")[0]??t}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function ec(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let t=k(e,"import_prefix")?.text??"",n=k(e,"dotted_name")?.text??"";return`${t}${n}`}return null}function tc(e){let t=e.split(`
17
+ `),n=[],r=0;for(let i=0;i<t.length;i++){let s=t[i],o=s.trimStart(),a=r;if(r+=s.length+1,!o.startsWith("import ")&&!o.startsWith("from "))continue;let c=s,l=a+s.length,u=Kt(s);for(;i+1<t.length&&(u>0||c.trimEnd().endsWith("\\"));){i++;let d=t[i];c+=`
18
+ ${d}`,l+=1+d.length,u+=Kt(d),r+=d.length+1}let p=nc(c);p&&n.push({...p,start:a,end:l})}return n}function nc(e){let t=e.replace(/\\\s*\n/g," ").trim();if(t.startsWith("import "))return{kind:"import",module:null,clause:t.slice(7).trim()};let n=t.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!n)return null;let r=n[2].trim();return r.startsWith("(")&&r.endsWith(")")&&(r=r.slice(1,-1).trim()),{kind:"from",module:n[1],clause:r}}function rc(e,t,n,r){let i=G(r,n.start,n.end),s=n.clause.replace(/\n/g," ").trim();if(n.kind==="import")return C(s).flatMap(c=>{let l=c.trim().replace(/,$/,"");if(!l)return[];let[u,p]=l.split(/\s+as\s+/),d=u.trim(),f=(p??d.split(".")[0]??d).trim(),I=xe(e,t,d),Fe=be(i,f);return[{importedName:d,localName:f,sourcePath:I,kind:"namespace",used:_(i,f)||Fe.length>0,usedMembers:Fe}]});let o=n.module?xe(e,t,n.module):null,a=[];for(let c of C(s)){let l=c.trim().replace(/,$/,"");if(!l)continue;if(l==="*"){a.push({importedName:"*",localName:null,sourcePath:o,kind:"side-effect",used:!0,usedMembers:[]});continue}let[u,p]=l.split(/\s+as\s+/),d=(p??u).trim();a.push({importedName:u.trim(),localName:d,sourcePath:o,kind:"named",used:_(i,d),usedMembers:[]})}return a}import{basename as ic}from"path";function Mr(e,t,n){return D(e,t,r=>oc(e,t,r),()=>sc(e,t,n),n)}function sc(e,t,n){return L(n,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(r,i)=>{let s=r[1],o=r[2];if(!s||!o)return[];let a=s==="require_relative"?Ze(e,t,o):null;if(a){let c=$r(o);return[W(c,c,a,_(i,c))]}return[oe(o,a)]})}function oc(e,t,n){let r=y(n,new Set([])),i=[],s=new Set(["require","require_relative","load"]);for(let o of n.rootNode.descendantsOfType("call")){let a=o.namedChild(0);if(!a||a.type!=="identifier"||!s.has(a.text))continue;let c=ac(o);if(!c)continue;let l=a.text==="require_relative"?Ze(e,t,c):null;if(l){let u=$r(c);i.push(m(u,u,l,r))}else i.push(oe(c,l))}return i}function ac(e){let n=e.namedChildren.find(r=>r.type==="argument_list")?.namedChild(0);if(!(!n||n.type!=="string"))return n.namedChildren.find(r=>r.type==="string_content")?.text}function $r(e){return mr(ic(e).replace(/\.[^.]+$/,""),/_/)}function Br(e,t,n){return D(e,t,r=>cc(e,t,r),()=>L(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,i)=>{let s=r[1]?.trim();return s?pc(e,t,s,i):[]}),n)}function cc(e,t,n){let r=y(n,new Set(["use_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("use_declaration")){let o=s.namedChild(0);if(o)for(let a of De(o,"")){if(!a.importedName||a.importedName==="*")continue;let c=V(e,t,a.qualifiedName)??V(e,t,a.qualifiedName.split("::").slice(0,-1).join("::"));i.push(m(a.importedName,a.localName,c,r))}}return i}function De(e,t){let n=uc(e,t);if(n)return n;switch(e.type){case"scoped_use_list":return lc(e,t);case"use_list":{let r=[];for(let i of e.namedChildren)r.push(...De(i,t));return r}case"use_as_clause":{let r=e.namedChild(0),i=e.namedChild(1);if(!r||!i)return[];let s=De(r,t),o=i.text;return s.map(a=>({...a,localName:o}))}case"use_wildcard":{let r=e.namedChild(0),i=r?r.text:"";return[{qualifiedName:ot(t,`${i}::*`),importedName:"*",localName:"*"}]}default:return[]}}function lc(e,t){let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let i=ot(t,n.text),s=[];for(let o of r.namedChildren)s.push(...De(o,i));return s}function uc(e,t){switch(e.type){case"identifier":case"super":case"crate":{let n=e.text;return[{qualifiedName:ot(t,n),importedName:n,localName:n}]}case"self":{let n=t.split("::").filter(Boolean).pop()??"self";return[{qualifiedName:t||"self",importedName:n,localName:n}]}case"scoped_identifier":{let n=e.text,r=n.split("::").pop()??n;return[{qualifiedName:ot(t,n),importedName:r,localName:r}]}default:return null}}function ot(e,t){return e?t?`${e}::${t}`:e:t}function pc(e,t,n,r){let i=n.trim();if(i.includes("{")&&i.includes("}")){let u=i.slice(0,i.indexOf("{")).replace(/::$/,"").trim(),p=i.slice(i.indexOf("{")+1,i.lastIndexOf("}")).trim();return C(p).flatMap(d=>{let f=d.trim();if(!f)return[];if(f==="self"){let pt=u.split("::").filter(Boolean).pop();return pt?[A(e,t,r,u,pt,pt)]:[]}let[I,Fe]=f.split(/\s+as\s+/),ce=I?.trim();if(!ce)return[];let ci=(Fe??ce.split("::").pop()??ce).trim(),li=`${u}::${ce}`.replace(/::::/g,"::");return[A(e,t,r,li,ce.split("::").pop()??ce,ci,V(e,t,u))]})}let[s,o]=i.split(/\s+as\s+/),a=s?.trim()??i,c=(o??a.split("::").pop()??a).trim(),l=V(e,t,a)??V(e,t,a.split("::").slice(0,-1).join("::"));return[A(e,t,r,a,a.split("::").pop()??a,c,l)]}function Vr(e,t,n){let r=N(e,t);if(r)return dc(e,t,r);let i=[];for(let s of n.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let o=s[1]?.trim();o&&i.push(...mc(e,t,o))}return i}function dc(e,t,n){let r=[];for(let i of n.rootNode.descendantsOfType("use_declaration")){if(!fc(i))continue;let s=i.namedChildren.find(o=>o.type!=="visibility_modifier");if(s)for(let o of De(s,""))o.importedName&&r.push(tn(e,t,o.qualifiedName))}return r}function fc(e){for(let t of e.children)if(t.type==="visibility_modifier"&&t.text.startsWith("pub"))return!0;return!1}function mc(e,t,n){let r=n.trim();if(r.includes("{")&&r.includes("}")){let i=r.slice(0,r.indexOf("{")).replace(/::$/,"").trim(),s=r.slice(r.indexOf("{")+1,r.lastIndexOf("}")).trim();return C(s).flatMap(o=>{let a=o.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),l=`${i}::${c?.trim()??a}`.replace(/::::/g,"::");return[tn(e,t,l)]})}return[tn(e,t,r)]}function tn(e,t,n){return{specifier:n,sourcePath:V(e,t,n)??V(e,t,n.split("::").slice(0,-1).join("::"))}}function Y({language:e,extensions:t,imports:n,parseImports:r}){return{language:e,extensions:t,capabilities:{imports:n},parseImports:r}}function Ur(e,t){let n=t.toLowerCase();for(let r of e)for(let i of r.extensions)if(n.endsWith(i))return r;return null}var gc={language:"javascript",extensions:re,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:Zt,parseReExports:en},yc=Y({language:"python",extensions:Je,imports:"ast-with-regex-fallback",parseImports:Or}),Sc=Y({language:"jvm",extensions:R,imports:"ast-dispatch-with-regex-fallback",parseImports:wr}),hc={language:"rust",extensions:Qe,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:Br,parseExports:Vr},xc=Y({language:"ruby",extensions:Ge,imports:"ast-with-regex-fallback",parseImports:Mr}),bc=Y({language:"c/cpp",extensions:Ye,imports:"ast-with-regex-fallback",parseImports:Er}),Nc=Y({language:"dotnet",extensions:K,imports:"ast-dispatch-with-regex-fallback",parseImports:Lr}),_c={language:"dart",extensions:Xe,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:kr,parseExports:Tr},Cc=Y({language:"php",extensions:se,imports:"ast-with-regex-fallback",parseImports:vr}),Ic=Y({language:"clojure",extensions:he,imports:"regex-only",parseImports:Rr}),Ec=[gc,yc,Sc,hc,xc,bc,Nc,_c,Cc,Ic];function at(e){return Ur(Ec,e)}var nn={clearGroups:["whole-project","source-file"]},Pc=w("source-imports",nn),of=w("source-exports",nn),Rc=w("source-reexports",nn),Wr=Z({kind:"source-imports",invalidation:ee("source-imports"),serialize:kc,deserialize:Tc}),zr=Z({kind:"source-reexports",invalidation:ee("source-reexports"),serialize:Lc,deserialize:Dc});function Hr(e,t){let n=x(t);return Rc.get(e,n,()=>{let r=at(n);if(!r?.parseReExports)return[];let i=b(e,n);if(!i)return[];let s=z(e,n,i),o=qt(e),a=zr.read(e,n,s);if(a?.resolutionFingerprint===o)return a.reExports;let c=r.parseReExports(e,n,i);return zr.write(e,n,s,{resolutionFingerprint:o,reExports:c}),c})}function rn(e,t){let n=x(t);return Pc.get(e,n,()=>{let r=at(n);if(!r)return[];let i=b(e,n);return i?qr(e,n,i,r):[]})}function af(e,t){let n=x(t),r=at(n);if(!r)return[];let i;try{i=Ae(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(s){if(ve(s))return[];throw s}return qr(e,n,i,r)}function qr(e,t,n,r){let i=z(e,t,n),s=qt(e),o=Wr.read(e,t,i);if(o?.resolutionFingerprint===s)return o.imports;let a=r.parseImports(e,t,n);return Wr.write(e,t,i,{parserVersion:2,resolutionFingerprint:s,imports:a}),a}function cf(e,t,n){let r=rn(e,t).filter(i=>i.kind==="named"&&i.isTypeOnly!==!0&&i.localName===n&&i.sourcePath!==null);return r.length===1?r[0]:null}function kc(e){return JSON.stringify(e)}function Tc(e){try{let t=JSON.parse(e);return!fe(t)||t.parserVersion!==2||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.imports)?null:{parserVersion:2,resolutionFingerprint:t.resolutionFingerprint,imports:t.imports}}catch{return null}}function Lc(e){return JSON.stringify(e)}function Dc(e){try{let t=JSON.parse(e);return!fe(t)||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.reExports)?null:{resolutionFingerprint:t.resolutionFingerprint,reExports:t.reExports}}catch{return null}}import{fromBinary as Jr}from"@bufbuild/protobuf";import{DocumentSchema as Qr,SymbolRole as Gr}from"@c4312/scip";import{zstdDecompressSync as Yr}from"zlib";var Fc=le("definition-occurrence-ranges",{clearGroups:["whole-project","definition-catalog"],maxEntries:64});function wc(e,t){return Fc.get(e,t,()=>{let n=new Map;for(let r of e.all("SELECT c.occurrences FROM chunks c JOIN documents d ON d.id = c.document_id WHERE d.relative_path = ? ORDER BY c.chunk_index",t))for(let[i,s]of Ac(r.occurrences))n.has(i)||n.set(i,s);return n})}function Ac(e){let t=new Map;if(!e||e.length<=1)return t;try{for(let n of Jr(Qr,Yr(e)).occurrences){let r=vc(n);r&&n.symbol&&!t.has(n.symbol)&&t.set(n.symbol,r)}}catch{}return t}function vc(e){let t=e.range;if(!(!(e.symbolRoles&Gr.Definition)||t.length<3))return{start_line:t[0],start_char:t[1],end_line:t.length===4?t[2]:t[0],end_char:t.length===4?t[3]:t[2]}}function mf(e,t){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
19
+ FROM global_symbols gs
20
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
21
+ JOIN documents d ON der.document_id = d.id
22
+ WHERE ${t.where}
23
+ ${e.pathExclusionsFor("d")}
24
+ ${Xr(t.orderBy)}
25
+ ${Zr(t.limit)}`,...t.params??[])}function gf(e,t){return e.all(`SELECT
26
+ gs.id,
27
+ gs.symbol,
28
+ c.document_id,
29
+ MIN(c.start_line) AS start_line,
30
+ 0 AS start_char,
31
+ MAX(c.end_line) AS end_line,
32
+ 0 AS end_char,
33
+ d.relative_path,
34
+ gs.display_name,
35
+ gs.documentation
36
+ FROM global_symbols gs
37
+ JOIN mentions m ON m.symbol_id = gs.id
38
+ JOIN chunks c ON m.chunk_id = c.id
39
+ JOIN documents d ON c.document_id = d.id
40
+ WHERE m.role = 1
41
+ AND ${t.where}
42
+ ${e.pathExclusionsFor("d")}
43
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
44
+ ${Xr(t.orderBy)}
45
+ ${Zr(t.limit)}`,...t.params??[]).map(n=>({...n,...wc(e,n.relative_path).get(n.symbol)}))}function Xr(e){return e?`ORDER BY ${e}`:""}function Zr(e){return typeof e=="number"?`LIMIT ${e}`:""}function ei(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function ti(e){if(!e)return null;let t=Kr(e);if(t)return t.replace(/\n/g," ");let n=e.indexOf("|");if(n===-1)return e.replace(/\n/g," ");let r=e.slice(n+1);return(Kr(r)??r).replace(/\n/g," ")}function Kr(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}var Oc=le("reference-occurrence-lines",{clearGroups:["whole-project","source-file"],maxEntries:64});function yf(e,t,n){let r=Oc.get(e,t,()=>{let i=e.all("SELECT c.occurrences FROM chunks c JOIN documents d ON d.id = c.document_id WHERE d.relative_path = ? ORDER BY c.chunk_index",t);if(i.length===0)return null;let s=new Map;try{for(let o of i){if(!o.occurrences||o.occurrences.length<=1)return null;let{occurrences:a}=Jr(Qr,Yr(o.occurrences));jc(a,s)}}catch{return null}return new Map([...s].map(([o,a])=>[o,[...a].sort((c,l)=>c-l)]))});return r===null?null:r.get(n)??[]}function jc(e,t){for(let n of e){if(!n.symbol||(n.symbolRoles&Gr.Definition)!==0)continue;let r=n.range[0];if(r===void 0||!Number.isSafeInteger(r)||r<0)continue;let i=t.get(n.symbol)??new Set;i.add(r),t.set(n.symbol,i)}}function ct(e){return{forFile(t,n){return ni(e,t,n)},forFiles(t,n){let r=new Map;for(let i of t)r.set(i,ni(e,i,n));return r}}}function ni(e,t,n){let r={file:t},i=n.facts||n.identifiers;return n.text&&(r.text=b(e,t)),n.lines&&(r.lines=yt(e,t)),n.ast&&(r.ast=N(e,t)),n.imports&&(r.imports=rn(e,t)),n.reexports&&(r.reexports=Hr(e,t)),i&&Mc(e,t,n,r),r}function Mc(e,t,n,r){let i=Ft(e,t),s=i.facts;n.facts&&(r.facts=s),i.unavailable&&(r.sourceFactsUnavailable=i.unavailable),n.identifiers&&s&&(r.identifiers=s.fileIdentifiers,r.identifierLineMap=s.identifierLineMap)}function $c(e,t={}){if(H(e.symbol)!==null)return t.includeClassMemberFallbacks===!0;let i=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(i)}function sn(e,t,n={}){let r=new Map;for(let s of t)e.length>0&&!$c(s,{includeClassMemberFallbacks:n.includeClassMemberFallbacks})||r.set(s.id,s);for(let s of e)r.set(s.id,s);let i=[...r.values()];return n.sort?i.sort((s,o)=>s.start_line-o.start_line||s.end_line-o.end_line||s.symbol.localeCompare(o.symbol)):i}var Bc=w("file-definitions",{clearGroups:["definition-catalog"]}),Vc=ue("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),Uc=w("file-function-like-definitions",{clearGroups:["definition-catalog"]}),ri=new WeakMap;function lt(e,t,n={},r){return me(t),n.includeClassMemberFallbacks?an(e,t,void 0,{includeClassMemberFallbacks:!0},r):Bc.get(e,t,()=>{let i=j(r,"evidence-read",()=>oi(e,t));if(i)return i;let s=an(e,t,void 0,n,r);return j(r,"evidence-write",()=>{let o=_e(e),a=ct(e).forFile(t,{text:!0}).text;o&&a&&si.write(e,t,z(e,t,a),{projectFingerprint:o,definitions:s.map(c=>({...c}))})}),s})}function Wc(e,t){return me(t),Uc.get(e,t,()=>{let n=oi(e,t);return n?n.filter(r=>r.isFunctionLike):an(e,t,r=>r.isFunctionLike)})}var si=Z({kind:"file-definitions",invalidation:ee("file-definitions"),serialize:zc,deserialize:Hc});function oi(e,t){let n=_e(e);if(!n)return null;let r=ct(e).forFile(t,{text:!0}).text;if(!r)return null;let i=si.read(e,t,z(e,t,r));return i?qc(i,n,t):null}function zc(e){return JSON.stringify(e)}function Hc(e){try{let t=JSON.parse(e);return!fe(t)||typeof t.projectFingerprint!="string"||!Array.isArray(t.definitions)?null:{projectFingerprint:t.projectFingerprint,definitions:t.definitions}}catch{return null}}function qc(e,t,n){if(e.projectFingerprint!==t)return null;let r=[];for(let i of e.definitions){let s=Kc(i,n);if(!s)return null;r.push(s)}return r}function Kc(e,t){return!fe(e)||!Jc(e)||!Qc(e,t)||!Gc(e)||!Yc(e)?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function Jc(e){return typeof e.symbolId=="number"&&typeof e.symbol=="string"&&typeof e.documentId=="number"}function Qc(e,t){return typeof e.startLine=="number"&&(typeof e.startChar=="number"||e.startChar===void 0)&&typeof e.endLine=="number"&&(typeof e.endChar=="number"||e.endChar===void 0)&&e.relativePath===t}function Gc(e){return typeof e.leaf=="string"&&(typeof e.parentTypeName=="string"||e.parentTypeName===null)&&typeof e.isFunctionLike=="boolean"&&typeof e.isTypeLike=="boolean"&&(typeof e.kind=="number"||e.kind===null)}function Yc(e){return(typeof e.documentation=="string"||e.documentation===null)&&(typeof e.enclosingSymbol=="string"||e.enclosingSymbol===null)}function an(e,t,n,r={},i){let s=j(i,"primary-rows",()=>Xc(e,t)),o=j(i,"fallback-rows",()=>Zc(e,t)),a=j(i,"merge-rows",()=>sn(s,o,{sort:!0,includeClassMemberFallbacks:r.includeClassMemberFallbacks}).map(cn));return n&&(a=a.filter(n)),j(i,"range-correction",()=>ln(e,t,a,i,r.rangeCorrectionEvidence))}function j(e,t,n){return e?e(t,n):n()}function Xc(e,t){return e.all(`SELECT
46
+ gs.id,
47
+ gs.symbol,
48
+ der.document_id,
49
+ der.start_line,
50
+ der.start_char,
51
+ der.end_line,
52
+ der.end_char,
53
+ d.relative_path,
54
+ gs.display_name,
55
+ gs.kind,
56
+ gs.documentation,
57
+ gs.enclosing_symbol
58
+ FROM global_symbols gs
59
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
60
+ JOIN documents d ON der.document_id = d.id
61
+ WHERE d.relative_path = ?
62
+ ${e.symbolNoiseFor("gs")}
63
+ ORDER BY der.start_line, der.end_line`,t)}function Zc(e,t){return e.all(`SELECT
64
+ gs.id,
65
+ gs.symbol,
66
+ c.document_id,
67
+ MIN(c.start_line) AS start_line,
68
+ 0 AS start_char,
69
+ MAX(c.end_line) AS end_line,
70
+ 0 AS end_char,
71
+ d.relative_path,
72
+ gs.display_name,
73
+ gs.kind,
74
+ gs.documentation,
75
+ gs.enclosing_symbol
76
+ FROM global_symbols gs
77
+ JOIN mentions m ON m.symbol_id = gs.id
78
+ JOIN chunks c ON m.chunk_id = c.id
79
+ JOIN documents d ON c.document_id = d.id
80
+ WHERE d.relative_path = ?
81
+ AND m.role = 1
82
+ ${e.symbolNoiseFor("gs")}
83
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
84
+ ORDER BY start_line, end_line`,t)}function cn(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:Nn(e.symbol),parentTypeName:H(e.symbol),isFunctionLike:gt(e.symbol),isTypeLike:je(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function Mf(e,t={}){return tl(e,t.scope)}function $f(e,t){let n=new Set(t);if(n.size===0)return[];let r=el(e,[...n]);return de(e,{includeIgnored:!1}).filter(i=>r.has(i)).flatMap(i=>lt(e,i)).filter(i=>n.has(i.symbol))}function el(e,t){let n=new Set;for(let r=0;r<t.length;r+=400){let i=t.slice(r,r+400),s=e.all(`WITH requested AS (SELECT id FROM global_symbols WHERE symbol IN (${i.map(()=>"?").join(",")}))
85
+ SELECT d.relative_path FROM requested r
86
+ JOIN defn_enclosing_ranges der ON der.symbol_id = r.id
87
+ JOIN documents d ON d.id = der.document_id
88
+ UNION
89
+ SELECT d.relative_path FROM requested r
90
+ JOIN mentions m ON m.symbol_id = r.id AND m.role = 1
91
+ JOIN chunks c ON c.id = m.chunk_id
92
+ JOIN documents d ON d.id = c.document_id`,...i);for(let o of s)n.add(o.relative_path)}return n}function tl(e,t){return de(e,{scope:t,includeIgnored:!1}).flatMap(n=>lt(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function Bf(e,t){return de(e,{scope:t,includeIgnored:!1}).flatMap(n=>Wc(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function Vf(e,t){let n=Vc.get(e,()=>new WeakMap),r=n.get(t.symbolMatches);r||(r=new Map,n.set(t.symbolMatches,r));let i=JSON.stringify({scope:t.scope??null,sqlPrefilter:t.sqlPrefilter??null}),s=r.get(i);if(s)return[...s];let o=ii(nl(e,t.scope,t.sqlPrefilter)),a=ii(rl(e,t.scope,t.sqlPrefilter)),c=new Set([...o.keys(),...a.keys()]),l=[];for(let u of[...c].sort()){if(e.isIgnored(u))continue;let p=sn(o.get(u)??[],a.get(u)??[],{sort:!0}).filter(d=>t.symbolMatches(d.symbol));p.length!==0&&l.push(...ln(e,u,p.map(cn)))}return r.set(i,l),[...l]}function nl(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",i=n?`AND ${ai("gs",n)}`:"",s=t?[`%${t}%`]:[];return e.all(`SELECT
93
+ gs.id,
94
+ gs.symbol,
95
+ der.document_id,
96
+ der.start_line,
97
+ der.start_char,
98
+ der.end_line,
99
+ der.end_char,
100
+ d.relative_path,
101
+ gs.display_name,
102
+ gs.kind,
103
+ gs.documentation,
104
+ gs.enclosing_symbol
105
+ FROM global_symbols gs
106
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
107
+ JOIN documents d ON der.document_id = d.id
108
+ WHERE 1 = 1
109
+ ${e.pathExclusionsFor("d")}
110
+ ${r}
111
+ ${i}
112
+ ${e.symbolNoiseFor("gs")}
113
+ ORDER BY d.relative_path, der.start_line, der.end_line`,...s)}function rl(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",i=n?`AND ${ai("gs",n)}`:"",s=t?[`%${t}%`]:[];return e.all(`SELECT
114
+ gs.id,
115
+ gs.symbol,
116
+ c.document_id,
117
+ MIN(c.start_line) AS start_line,
118
+ 0 AS start_char,
119
+ MAX(c.end_line) AS end_line,
120
+ 0 AS end_char,
121
+ d.relative_path,
122
+ gs.display_name,
123
+ gs.kind,
124
+ gs.documentation,
125
+ gs.enclosing_symbol
126
+ FROM global_symbols gs
127
+ JOIN mentions m ON m.symbol_id = gs.id
128
+ JOIN chunks c ON m.chunk_id = c.id
129
+ JOIN documents d ON c.document_id = d.id
130
+ WHERE m.role = 1
131
+ AND NOT EXISTS (
132
+ SELECT 1
133
+ FROM defn_enclosing_ranges existing_der
134
+ WHERE existing_der.symbol_id = gs.id
135
+ )
136
+ ${e.pathExclusionsFor("d")}
137
+ ${r}
138
+ ${i}
139
+ ${e.symbolNoiseFor("gs")}
140
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
141
+ ORDER BY d.relative_path, start_line, end_line`,...s)}function il(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function ai(e,t){return t==="callable"?il(e):sl(e)}function sl(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function ii(e){let t=new Map;for(let n of e){let r=t.get(n.relative_path);r?r.push(n):t.set(n.relative_path,[n])}return t}function Uf(e,t,n={}){if(t.length===0)return[];let r=t.flatMap(i=>lt(e,i)).filter(i=>!e.isIgnored(i.relativePath));return n.onlyDocumented&&(r=r.filter(i=>i.documentation!==null&&i.documentation!=="")),n.sort&&(r=r.sort((i,s)=>i.relativePath.localeCompare(s.relativePath)||i.startLine-s.startLine||i.endLine-s.endLine)),r.map(i=>({startLine:i.startLine,endLine:i.endLine,symbol:i.symbol,shortName:bn(i.symbol),signature:ei(ti(i.documentation)),relativePath:i.relativePath,enclosingSymbol:i.enclosingSymbol}))}function ol(e){let t=new Map,n=e.map((r,i)=>({definition:r,index:i,span:r.endLine-r.startLine})).sort((r,i)=>r.span-i.span||r.index-i.index);for(let{definition:r}of n)for(let i=r.startLine;i<=r.endLine;i+=1)t.has(i)||t.set(i,r);return t}function Wf(e,t){let n=ri.get(e);return n||(n=ol(e),ri.set(e,n)),n.get(t)??null}function zf(e,t){let n=lt(e,t.relative_path).find(r=>r.symbolId===t.id)??(H(t.symbol)===null||!gt(t.symbol)?void 0:ln(e,t.relative_path,[cn(t)])[0]);return n?{symbolId:n.symbolId,symbol:n.symbol,documentId:n.documentId,startLine:n.startLine,startChar:n.startChar,endLine:n.endLine,endChar:n.endChar,relativePath:n.relativePath}:{symbolId:t.id,symbol:t.symbol,documentId:t.document_id,startLine:t.start_line,startChar:t.start_char??0,endLine:t.end_line,endChar:t.end_char??0,relativePath:t.relative_path}}function ln(e,t,n,r,i){let s=j(r,"range-correction.source-text",()=>i?i.source:ct(e).forFile(t,{text:!0}).text),o=j(r,"range-correction.callable-sites",()=>i?i.callables:al(e,t));return o?j(r,"range-correction.ast-correction",()=>fl(n,o,s)):s?j(r,"range-correction.regex-fallback",()=>cl(n,s)):n}function al(e,t){let n=E(t),r=n&&N(e,t)?.rootNode;return(n&&r&&vt(r,n))??At(e,t)}function cl(e,t){let n=t.split(/\r?\n/),r=ll(e,n),i=ul(e,r),s=pl(i,n);return dl(e,s)}function ll(e,t){let n=e.some(i=>ut(i.symbol))?Nl(t):null,r=new Map;for(let i of e)r.set(i.symbolId,bl(t,n,i));return r}function ul(e,t){return e.filter(n=>ut(n.symbol)).map(n=>({definition:n,startLine:t.get(n.symbolId)??n.startLine})).sort((n,r)=>n.startLine-r.startLine||n.definition.startLine-r.definition.startLine||n.definition.symbol.localeCompare(r.definition.symbol))}function pl(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let i=e[r],s=e[r+1],o=s?Math.max(i.startLine,s.startLine-1):t.length-1;n.set(i.definition.symbolId,{startLine:i.startLine,endLine:_l(t,i.definition,i.startLine,o)})}return n}function dl(e,t){return e.map(n=>{let r=t.get(n.symbolId);return r?{...n,startLine:r.startLine,endLine:r.endLine}:n})}function fl(e,t,n=null){let r,i=o=>xl(o,n?r??=n.split(/\r?\n/):null),s=new Map;for(let o of t){let a=s.get(o.name);a?a.push(o):s.set(o.name,[o])}return e.map(o=>{if(!hl(o)||!o.leaf)return i(o);let a=s.get(o.leaf);if(!a||a.length===0)return i(o);let c=n?ml(o,a,n):null;if(c)return{...o,startLine:c.startLine,endLine:c.endLine};let l=a[0],u=Math.abs(l.startLine-o.startLine);for(let p=1;p<a.length;p+=1){let d=a[p],f=Math.abs(d.startLine-o.startLine);f<u&&(l=d,u=f)}return{...o,startLine:l.startLine,endLine:l.endLine}})}function ml(e,t,n){let r=gl(e.symbol);if(!r)return null;let i=n.split(/\r?\n/),s=new RegExp(`\\b${O(r)}\\b`);for(let o of t){let a=yl(i,o.startLine);if(a&&s.test(a))return o}return null}function gl(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function yl(e,t){for(let n=t;n>=0;n-=1){let r=e[n]?.trim()??"";if(r){if(/^impl\b/.test(r))return Sl(e,n,t);if(/^(?:struct|enum|trait|mod)\b/.test(r))return null}}return null}function Sl(e,t,n){let r=[];for(let i=t;i<=n;i+=1){let s=e[i]??"";if(r.push(s),s.includes("{"))break}return r.join(" ")}function hl(e){return ut(e.symbol)?!0:je(e.symbol)==="term"&&H(e.symbol)===null}function xl(e,t){if(!t||!e.leaf||je(e.symbol)!=="term"||H(e.symbol)!==null)return e;let n=O(e.leaf),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${n}\\b`),i=t.findIndex(s=>r.test(s));return i>=0?{...e,startLine:i,endLine:i}:e}function bl(e,t,n){if(!ut(n.symbol))return n.startLine;let r=Math.max(0,Math.min(n.startLine,e.length-1));if(!t)return r;let i=t.get(n.leaf);if(!i||i.length===0)return r;let s=null;for(let o of i){let a=Math.abs(o-n.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??r}function Nl(e){let t=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,n=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,r=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,i=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,o=(a,c)=>{let l=s.get(a);if(!l){s.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";on(c,t,a,o),on(c,n,a,o);let l=c.match(r);l?.[1]&&o(l[1],a),on(c,i,a,o)}return s}function _l(e,t,n,r){let i=Math.max(n,Math.min(e.length-1,r)),s=Math.max(n,Math.min(i,t.endLine)),o={braceDepth:0,parenDepth:0,sawOpeningBrace:!1};for(let a=n;a<=i;a+=1){let c=Cl(e[a]??"");if(Il(c,o),o.sawOpeningBrace&&o.braceDepth===0||!o.sawOpeningBrace&&o.parenDepth===0&&a>=s)return a}return s}function Cl(e){let t="",n={quote:null,escaping:!1};for(let r=0;r<e.length;r+=1){let i=e[r],s=e[r+1];if(!n.quote&&i==="/"&&s==="/"){t+=" ".repeat(e.length-r);break}if(n.quote){El(n,i),t+=" ";continue}if(i==='"'||i==="'"||i==="`"){n.quote=i,t+=" ";continue}t+=i}return t}function ut(e){return e.includes("().")}function on(e,t,n,r){for(let i of e.matchAll(t))i[1]&&r(i[1],n)}function Il(e,t){for(let n of e)n==="{"?(t.braceDepth+=1,t.sawOpeningBrace=!0):n==="}"?t.braceDepth=Math.max(0,t.braceDepth-1):n==="("?t.parenDepth+=1:n===")"&&(t.parenDepth=Math.max(0,t.parenDepth-1))}function El(e,t){if(e.escaping){e.escaping=!1;return}if(t==="\\"){e.escaping=!0;return}t===e.quote&&(e.quote=null)}export{$l as a,ge as b,Bl as c,Vl as d,Z as e,Jl as f,ee as g,gr as h,io as i,J as j,b as k,Tl as l,Ll as m,yt as n,Dl as o,Fl as p,O as q,Ko as r,E as s,q as t,_t as u,Bn as v,yu as w,Su as x,hu as y,Un as z,xu as A,bu as B,N as C,We as D,Gn as E,Eu as F,He as G,te as H,Ft as I,fr as J,tp as K,Qs as L,qo as M,ot as N,Hr as O,rn as P,af as Q,cf as R,ct as S,wc as T,mf as U,gf as V,yf as W,sn as X,lt as Y,Mf as Z,$f as _,tl as $,Bf as aa,Vf as ba,Uf as ca,ol as da,Wf as ea,zf as fa};
142
+ //# sourceMappingURL=chunk-J5FJMODQ.js.map
@@ -0,0 +1,2 @@
1
+ import{b as g}from"./chunk-6LSEIIF7.js";import{a as f}from"./chunk-4WCUBZU3.js";import{d as l}from"./chunk-5D2LVK7O.js";import{r as a,s as m,v as c}from"./chunk-7WTPQ4NX.js";import{a as d}from"./chunk-FVULPZDF.js";function $(e,t={}){let{scope:r,limit:n}=t,i=new g(e),s=F(S(e,i,r));return v(s),n?s.slice(0,n):s}function S(e,t,r){let n=[],i=C(e);for(let s of I(e,r))x(i,s,s)>0||n.push(...b(e,t,s,i));return n}function I(e,t){return d(e,{scope:t,includeIgnored:!1}).filter(r=>c(e,r).length>0||a(e,r).length>0)}function b(e,t,r,n){let i=c(e,r).filter(o=>o.sourcePath&&!e.isIgnored(o.sourcePath)).flatMap(o=>R(e,t,r,o.sourcePath,n,[D(o.specifier)])),s=a(e,r).filter(o=>o.sourcePath&&!e.isIgnored(o.sourcePath)).flatMap(o=>R(e,t,r,o.sourcePath,n,o.kind==="named"&&o.names.length>0?o.names:[o.kind==="star"?`* from ${o.sourcePath}`:`* namespace from ${o.sourcePath}`]));return[...i,...s]}function R(e,t,r,n,i,s){let o=t.definitionsForFile(n);return s.map(u=>{let p=o.find(h=>h.leaf===u);return{barrelFile:r,symbol:p?.symbol??`source-reexport:${r}:${u}`,shortName:p?l(p.symbol):u,originalFile:n,barrelConsumers:0,directConsumers:x(i,n,r),...T(e,r)}})}function D(e){return e.split("::").at(-1)?.split("/").at(-1)?.replace(/\.[^.]+$/,"")??e}function T(e,t){return f(e,t)?{actionTier:"signal",surfaceEvidence:["barrel file is declared on the package public surface"],recommendation:"Review the package API before removing this re-export; local consumers are zero, but external consumers may import through the public barrel."}:{actionTier:"signal",surfaceEvidence:[],recommendation:"Review this re-export: no local source importer or re-exporter was resolved. Confirm external consumers and module initialization effects before removal."}}function C(e){let t=new Map;for(let r of d(e,{includeIgnored:!1}))for(let n of[...m(e,r),...c(e,r),...a(e,r)]){if(!n.sourcePath)continue;let i=t.get(n.sourcePath)??new Set;i.add(r),t.set(n.sourcePath,i)}return t}function x(e,t,r){let n=e.get(t);return n?n.size-(n.has(r)?1:0):0}function F(e){let t=new Set,r=[];for(let n of e){let i=`${n.barrelFile}|${n.symbol}|${n.originalFile}`;t.has(i)||(t.add(i),r.push(n))}return r}function v(e){e.sort((t,r)=>r.directConsumers-t.directConsumers||t.barrelFile.localeCompare(r.barrelFile)||t.shortName.localeCompare(r.shortName))}export{$ as a};
2
+ //# sourceMappingURL=chunk-J7HZPIO3.js.map
@@ -0,0 +1,2 @@
1
+ import{a as r,b as c}from"./chunk-HRRFKWPZ.js";import{g as u}from"./chunk-U5RIG3JP.js";var g=["typescript","javascript","java","scala","kotlin","rust","python","ruby","go","cpp","c","csharp","vb","dart","php","clojure"],M=["entry-surface","generated-code","compatibility-shim","reflection-or-registration","test-fixture","intentional-twin","historical-coupling-ended","detector-counterexample"];var p=2,s=3;var d=new Set(g);function v(e){let t=e;if(typeof e=="string")try{t=JSON.parse(e)}catch(l){return{kind:"malformed",reason:`invalid JSON: ${h(l)}`}}if(!r(t))return{kind:"malformed",reason:"metadata must be a JSON object"};let n=t.version;if(!Number.isInteger(n))return{kind:"malformed",reason:"version must be an integer"};if(n!==p&&n!==s)return{kind:"unsupported",version:n,direction:n<p?"older":"future"};let a=m(t,n);if(a)return{kind:"malformed",reason:a};let i=t,o={metadata:i,capabilities:f(i)};return n===p?{kind:"legacy",...o,metadata:i}:{kind:"supported",...o,metadata:i}}function j(e){return e.kind==="legacy"||e.kind==="supported"?e.metadata:null}function D(e){if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.stableGenerationIdentity)return null;let t=e.metadata;return JSON.stringify({version:t.version,status:t.status,updatedAt:t.updatedAt,fingerprint:t.fingerprint,indexedLanguages:t.indexedLanguages,scipCompanion:t.scipCompanion,sqliteLayoutVersion:t.version===s?t.sqliteLayoutVersion:void 0})}function f(e){let t=e.fingerprint!==void 0,n=r(e.fingerprint),a=e.indexedLanguages!==void 0,i=e.status==="complete",o=e.version===s?e:null;return{usableForQuery:a,usableForEvidenceCache:t,publishableGeneration:i&&n&&a,stableGenerationIdentity:i&&t&&typeof e.updatedAt=="string",languageShardReuse:!!o?.languageFingerprints,typescriptProjectShardReuse:!!o?.typescriptProjectShards}}function m(e,t){if(e.status!=="complete"&&e.status!=="partial")return"status must be complete or partial";if(e.updatedAt!==void 0&&!c(e.updatedAt))return"updatedAt must be a valid timestamp";let n=y(e);return n||(t===s?b(e):null)}function y(e){for(let t of["requestedLanguages","indexedLanguages"])if(e[t]!==void 0&&!x(e[t]))return`${t} must contain unique supported languages`;return e.skipped!==void 0&&!S(e.skipped)?"skipped must contain supported language/reason pairs":e.scipCompanion!==void 0&&e.scipCompanion!=="current"&&e.scipCompanion!=="deferred"?"scipCompanion must be current or deferred":null}function b(e){return e.sqliteLayoutVersion!==void 0&&(!Number.isSafeInteger(e.sqliteLayoutVersion)||e.sqliteLayoutVersion<1)?"sqliteLayoutVersion must be a positive safe integer":e.languageFingerprints!==void 0&&!R(e.languageFingerprints)?"languageFingerprints must map supported languages to fingerprint objects":e.typescriptProjectShards!==void 0&&!C(e.typescriptProjectShards)?"typescriptProjectShards must map project names to file fingerprints":null}function O(e){return e.version===s&&e.sqliteLayoutVersion===1}function x(e){return!Array.isArray(e)||!e.every(t=>typeof t=="string"&&d.has(t))?!1:new Set(e).size===e.length}function S(e){return Array.isArray(e)&&e.every(t=>r(t)&&typeof t.language=="string"&&d.has(t.language)&&typeof t.reason=="string")}function R(e){return r(e)&&Object.entries(e).every(([t,n])=>d.has(t)&&r(n))}function C(e){return r(e)&&Object.values(e).every(t=>r(t)&&Array.isArray(t.files)&&t.files.every(u))}function h(e){return e instanceof Error?e.message:String(e)}export{g as a,M as b,s as c,v as d,j as e,D as f,f as g,O as h};
2
+ //# sourceMappingURL=chunk-JEVRKFRL.js.map
@@ -0,0 +1,30 @@
1
+ import{b as n}from"./chunk-AOSIYPTA.js";import{b as l}from"./chunk-6LSEIIF7.js";import{d as o,i}from"./chunk-5D2LVK7O.js";function h(e,s){let t=n(e,s);return t.length===0?[]:d([...c(e,t),...m(e,t)]).filter(r=>!e.isIgnored(r.relative_path)).map(u)}function _(e,s){let t=n(e,s);return t.length===0?[]:d(c(e,t)).filter(r=>!e.isIgnored(r.relative_path)).map(r=>({...u(r),basis:"external-reference"}))}function c(e,s){return e.all(`WITH selected_paths(path) AS (SELECT value FROM json_each(?))
2
+ SELECT DISTINCT d1.relative_path, gs.symbol
3
+ FROM mentions m
4
+ JOIN chunks c ON m.chunk_id = c.id
5
+ JOIN documents d1 ON c.document_id = d1.id
6
+ JOIN global_symbols gs ON m.symbol_id = gs.id
7
+ WHERE d1.relative_path NOT IN (SELECT path FROM selected_paths)
8
+ AND (
9
+ EXISTS (
10
+ SELECT 1
11
+ FROM defn_enclosing_ranges der
12
+ JOIN documents d2 ON der.document_id = d2.id
13
+ WHERE der.symbol_id = gs.id
14
+ AND d2.relative_path IN (SELECT path FROM selected_paths)
15
+ )
16
+ OR EXISTS (
17
+ SELECT 1
18
+ FROM mentions def_m
19
+ JOIN chunks def_c ON def_m.chunk_id = def_c.id
20
+ JOIN documents d2 ON def_c.document_id = d2.id
21
+ WHERE def_m.symbol_id = gs.id
22
+ AND def_m.role = 1
23
+ AND d2.relative_path IN (SELECT path FROM selected_paths)
24
+ )
25
+ )
26
+ AND m.role != 1
27
+ AND ${e.localSymbolPredicate}
28
+ ${e.pathExclusionsFor("d1")}
29
+ ORDER BY d1.relative_path, gs.symbol`,JSON.stringify(s))}function m(e,s){let t=new l(e);return s.flatMap(r=>t.definitionsForFile(r).filter(a=>i(a.symbol)).map(a=>({relative_path:r,symbol:a.symbol})))}function d(e){let s=new Set;return e.filter(t=>{let r=`${t.relative_path}|${t.symbol}`;return s.has(r)?!1:(s.add(r),!0)})}function u(e){return{consumer:e.relative_path,symbol:e.symbol,shortName:o(e.symbol)}}export{h as a,_ as b};
30
+ //# sourceMappingURL=chunk-JFXSGAEB.js.map
@@ -0,0 +1,3 @@
1
+ import{a as p}from"./chunk-FMRN2TRL.js";import{b as c,d as l,o as h,x as g}from"./chunk-5D2LVK7O.js";function f(t,n){let i=p(t,n);if(!i)return[];let o=t.get(`SELECT symbol, enclosing_symbol FROM global_symbols
2
+ WHERE id = ? LIMIT 1`,i.symbolId);if(!o)return[];let r=[{symbol:o.symbol,shortName:l(o.symbol),depth:0}],e=o.enclosing_symbol,y=1,b=new Set([o.symbol]);for(;e&&!b.has(e);){b.add(e);let s=t.get("SELECT symbol, enclosing_symbol FROM global_symbols WHERE symbol = ?",e);if(!s)break;r.push({symbol:s.symbol,shortName:l(s.symbol),depth:y}),e=s.enclosing_symbol,y++}if(r.length>1)return r;let a=c(o.symbol);if("kind"in a||a.descriptors.length<=1)return r;let d=g(t,i.relativePath).filter(s=>o.symbol.startsWith(s.symbol)&&h(s.symbol,o.symbol)).sort((s,m)=>m.symbol.length-s.symbol.length);return[...r,...d.map((s,m)=>({symbol:s.symbol,shortName:l(s.symbol),depth:m+1}))]}function _(t,n){return f(t,n)}export{f as a,_ as b};
3
+ //# sourceMappingURL=chunk-JVRTHGFS.js.map