scip-query 0.21.1 → 0.22.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 (354) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/augment-vue-worker.js +1 -1
  3. package/dist/by-kind-4IYG2SKW.js +2 -0
  4. package/dist/call-graph-WQNXMNNN.js +2 -0
  5. package/dist/{chunk-5QM7QT5B.js → chunk-25GWKRUZ.js} +2 -2
  6. package/dist/chunk-2BTJALUS.js +454 -0
  7. package/dist/{chunk-4ZCLDH6T.js → chunk-2KVU55CW.js} +2 -2
  8. package/dist/{chunk-CQVDALWQ.js → chunk-2OXVP5U5.js} +2 -2
  9. package/dist/{chunk-I2LY3KN7.js → chunk-2RE5OCHZ.js} +2 -2
  10. package/dist/{chunk-5J3A6RBZ.js → chunk-2XCGSDIT.js} +2 -2
  11. package/dist/{chunk-4KIPF45P.js → chunk-2YC7YNKT.js} +2 -2
  12. package/dist/{chunk-ZNW5A5VX.js → chunk-3QXC54FQ.js} +2 -2
  13. package/dist/{chunk-SGSPCEFC.js → chunk-3TJY6M3B.js} +2 -2
  14. package/dist/chunk-42W3LFUK.js +13 -0
  15. package/dist/chunk-44T4DUAA.js +2 -0
  16. package/dist/{chunk-YBWE6J32.js → chunk-4GAQ6FI4.js} +2 -2
  17. package/dist/{chunk-OU6SDWAM.js → chunk-4HE7MVWD.js} +2 -2
  18. package/dist/{chunk-QN2AI3D2.js → chunk-4TQU4TX2.js} +2 -2
  19. package/dist/{chunk-OMVNRPST.js → chunk-56NQAEPJ.js} +2 -2
  20. package/dist/{chunk-O4PZFAXA.js → chunk-57N6LN2A.js} +2 -2
  21. package/dist/{chunk-7MUHSZGN.js → chunk-5H5WTJSD.js} +2 -2
  22. package/dist/{chunk-J4HUBIVF.js → chunk-5YRQIE2B.js} +2 -2
  23. package/dist/{chunk-3XQLJG7V.js → chunk-5ZMBRQFC.js} +2 -2
  24. package/dist/{chunk-H2RBDP5S.js → chunk-6HRZQLOI.js} +2 -2
  25. package/dist/{chunk-PJBYDCBQ.js → chunk-6NC3YSPY.js} +2 -2
  26. package/dist/{chunk-MLTSTKXD.js → chunk-6VEFRPTD.js} +2 -2
  27. package/dist/{chunk-JLZWYDCZ.js → chunk-7C26EKLZ.js} +2 -2
  28. package/dist/{chunk-LXMW6ZAX.js → chunk-7IQXARSQ.js} +2 -2
  29. package/dist/chunk-7JYHQAH2.js +22 -0
  30. package/dist/{chunk-YA72ZUKO.js → chunk-7KSO2OAP.js} +2 -2
  31. package/dist/{chunk-YT4IQBET.js → chunk-7U2YQSDE.js} +2 -2
  32. package/dist/{chunk-XDOEHEET.js → chunk-7XA3OM44.js} +2 -2
  33. package/dist/{chunk-BCTCADNB.js → chunk-7XZGZBSQ.js} +2 -2
  34. package/dist/{chunk-3KXFB2FM.js → chunk-7YQOCABQ.js} +2 -2
  35. package/dist/chunk-A77SCPW2.js +3 -0
  36. package/dist/chunk-AK3PYTIK.js +5 -0
  37. package/dist/{chunk-6X4KO5A7.js → chunk-AMIMMNA4.js} +2 -2
  38. package/dist/{chunk-PWEQ6CZZ.js → chunk-AQ2PORIO.js} +2 -2
  39. package/dist/{chunk-E6N6YTVM.js → chunk-ARVO6TTW.js} +2 -2
  40. package/dist/{chunk-U7DOYZDH.js → chunk-AUY5BL74.js} +2 -2
  41. package/dist/{chunk-B3AREUQK.js → chunk-AYPDH2LU.js} +2 -2
  42. package/dist/{chunk-HR5JYLVV.js → chunk-AZS7YPCB.js} +2 -2
  43. package/dist/{chunk-ZQUNCTEZ.js → chunk-BDGTPN27.js} +2 -2
  44. package/dist/{chunk-DZNWXJN2.js → chunk-BDHFVH2M.js} +2 -2
  45. package/dist/{chunk-743MEVFJ.js → chunk-BECZLYNU.js} +2 -2
  46. package/dist/{chunk-4IASLUOP.js → chunk-BJT7LSPK.js} +2 -2
  47. package/dist/{chunk-X5MWO4DM.js → chunk-BTVKZGWT.js} +2 -2
  48. package/dist/{chunk-HYU4W353.js → chunk-BUTEIZKP.js} +2 -2
  49. package/dist/{chunk-UXNXOMXJ.js → chunk-BVFYEEBH.js} +2 -2
  50. package/dist/{chunk-UM56ZET4.js → chunk-BWVQP3LB.js} +2 -2
  51. package/dist/chunk-BYDAFMSR.js +57 -0
  52. package/dist/{chunk-P3UFF22M.js → chunk-C76O5MDS.js} +2 -2
  53. package/dist/chunk-C7IJMOFP.js +134 -0
  54. package/dist/{chunk-IM23CSG5.js → chunk-CBBHFNLX.js} +2 -2
  55. package/dist/{chunk-IZKJQQCQ.js → chunk-CKRWA452.js} +2 -2
  56. package/dist/{chunk-YLNCTPOI.js → chunk-CLG6DWVS.js} +2 -2
  57. package/dist/{chunk-DXEJ4FLZ.js → chunk-D2MVJSP4.js} +8 -8
  58. package/dist/chunk-D35XIZGN.js +2 -0
  59. package/dist/{chunk-AQF35NGT.js → chunk-DEAB5TGT.js} +2 -2
  60. package/dist/{chunk-7G2WIVIX.js → chunk-DJAO2OZJ.js} +2 -2
  61. package/dist/{chunk-PRLU3I7G.js → chunk-DKM723YF.js} +4 -4
  62. package/dist/{chunk-RSUH7G5T.js → chunk-DPWKKNKI.js} +2 -2
  63. package/dist/chunk-E44IVWIJ.js +367 -0
  64. package/dist/{chunk-W7HN6V4E.js → chunk-EDMB6SSO.js} +2 -2
  65. package/dist/{chunk-YCXQQ3YB.js → chunk-EELG7D3Q.js} +2 -2
  66. package/dist/{chunk-T2PBOVDI.js → chunk-EELPBR7E.js} +2 -2
  67. package/dist/{chunk-PAZSBPJR.js → chunk-EETGXQY7.js} +2 -2
  68. package/dist/{chunk-DUDUIT5P.js → chunk-ENWQWA2R.js} +2 -2
  69. package/dist/{chunk-QH5Q6M5C.js → chunk-ERCYGVAM.js} +2 -2
  70. package/dist/{chunk-ZGDHC5AT.js → chunk-EWWY2ZFL.js} +2 -2
  71. package/dist/{chunk-LJMWILX6.js → chunk-F24G5NBE.js} +2 -2
  72. package/dist/{chunk-XNF5T4T2.js → chunk-F24QUEQP.js} +2 -2
  73. package/dist/{chunk-IH3K5J6K.js → chunk-FBCVASUG.js} +2 -2
  74. package/dist/{chunk-EPLE5O5O.js → chunk-FELGD32K.js} +2 -2
  75. package/dist/{chunk-PU6XDQ2X.js → chunk-FFJQZG6J.js} +5 -5
  76. package/dist/{chunk-JGMD6JGB.js → chunk-FGNCOQUX.js} +2 -2
  77. package/dist/chunk-FKGQOTKD.js +2 -0
  78. package/dist/{chunk-27OUNZW5.js → chunk-GDRJB3SB.js} +2 -2
  79. package/dist/chunk-GH5YSGZL.js +5 -0
  80. package/dist/{chunk-IHGK3SZ7.js → chunk-GIQ6CSL4.js} +2 -2
  81. package/dist/{chunk-ITF3CWS5.js → chunk-GPGRZJ3R.js} +2 -2
  82. package/dist/{chunk-EJHNTAEE.js → chunk-GQIDEID3.js} +2 -2
  83. package/dist/{chunk-UEQORB2A.js → chunk-GRX7JOXQ.js} +2 -2
  84. package/dist/{chunk-6QN4FYQW.js → chunk-GVOMSPGL.js} +2 -2
  85. package/dist/{chunk-NT4NVEHU.js → chunk-GY7CCCEZ.js} +2 -2
  86. package/dist/{chunk-BVR44XXB.js → chunk-H7CG6LOE.js} +2 -2
  87. package/dist/{chunk-67FK5KGV.js → chunk-HCVJR2V4.js} +2 -2
  88. package/dist/{chunk-FOP7HD6H.js → chunk-HG722PO7.js} +2 -2
  89. package/dist/{chunk-YR7VRWNX.js → chunk-HISEUIL2.js} +2 -2
  90. package/dist/{chunk-Y2S4YNLH.js → chunk-HXOU4XNH.js} +2 -2
  91. package/dist/{chunk-DZA7MQMU.js → chunk-I6UTXNHU.js} +2 -2
  92. package/dist/{chunk-QZCACNV5.js → chunk-IJMD6BRI.js} +2 -2
  93. package/dist/{chunk-QGVUPYBC.js → chunk-IKVNEGTW.js} +2 -2
  94. package/dist/chunk-IMKZEXZG.js +2 -0
  95. package/dist/{chunk-LGVTIZPV.js → chunk-ISIQLPJ2.js} +2 -2
  96. package/dist/{chunk-BYXWXLKM.js → chunk-ISWFRGJ6.js} +2 -2
  97. package/dist/chunk-IW5XQG5G.js +2 -0
  98. package/dist/{chunk-ZMS4YCY7.js → chunk-IXESDH3J.js} +2 -2
  99. package/dist/{chunk-K63CAPS2.js → chunk-JAT6C3VX.js} +2 -2
  100. package/dist/{chunk-U2MNECDU.js → chunk-JFQBRL3J.js} +2 -2
  101. package/dist/{chunk-4SZJF4GK.js → chunk-JHH5SCZ3.js} +2 -2
  102. package/dist/{chunk-AAOEROT3.js → chunk-JJ62MTQH.js} +2 -2
  103. package/dist/chunk-JT6XX7QY.js +8 -0
  104. package/dist/{chunk-OY7PCALC.js → chunk-JUN5DOAK.js} +2 -2
  105. package/dist/{chunk-DXYMTQZ4.js → chunk-K3XFWJI2.js} +2 -2
  106. package/dist/{chunk-ZP2WUVZ5.js → chunk-KFVSJX25.js} +2 -2
  107. package/dist/{chunk-ND3BWIVN.js → chunk-KQHJEU6V.js} +2 -2
  108. package/dist/{chunk-KGKCJFWZ.js → chunk-KZYID5KV.js} +2 -2
  109. package/dist/{chunk-2LJLEM5B.js → chunk-LO5JSW2C.js} +2 -2
  110. package/dist/{chunk-CNT4ND5O.js → chunk-LRI5OMPE.js} +2 -2
  111. package/dist/{chunk-FCGMQETU.js → chunk-LXQUF2RP.js} +2 -2
  112. package/dist/{chunk-FSPENGSU.js → chunk-MHIEP7EG.js} +2 -2
  113. package/dist/{chunk-LIWIV26I.js → chunk-MSR2QRUE.js} +2 -2
  114. package/dist/chunk-N7FP5H5U.js +57 -0
  115. package/dist/{chunk-527HV7JY.js → chunk-NEIQPFBI.js} +2 -2
  116. package/dist/chunk-NK3JMP22.js +2 -0
  117. package/dist/{chunk-DK6MB565.js → chunk-NRBNAECH.js} +2 -2
  118. package/dist/{chunk-4HQYNZ3P.js → chunk-NVSZNESQ.js} +2 -2
  119. package/dist/{chunk-QLWZUFDT.js → chunk-OJNK5ALA.js} +2 -2
  120. package/dist/{chunk-MRXBLYRE.js → chunk-OPSAW5DT.js} +2 -2
  121. package/dist/{chunk-4TOU7HHQ.js → chunk-OTSPRVNW.js} +2 -2
  122. package/dist/{chunk-IQMGNIGY.js → chunk-OXYAWIEA.js} +2 -2
  123. package/dist/chunk-OZETODHH.js +2 -0
  124. package/dist/chunk-PBUH2P5S.js +3 -0
  125. package/dist/{chunk-5BJPJUXF.js → chunk-PIFTZEEM.js} +2 -2
  126. package/dist/{chunk-C52Q3JEQ.js → chunk-PLJUQFQN.js} +2 -2
  127. package/dist/{chunk-NODZYYGC.js → chunk-PLYUVM4F.js} +2 -2
  128. package/dist/{chunk-47WX6UC4.js → chunk-PXXYQK55.js} +2 -2
  129. package/dist/{chunk-SBFDPHKH.js → chunk-Q55NF3ZG.js} +2 -2
  130. package/dist/{chunk-N4EFQIRX.js → chunk-Q5TA4OY4.js} +2 -2
  131. package/dist/{chunk-HW7FASEL.js → chunk-Q6T2CAJL.js} +2 -2
  132. package/dist/chunk-Q7GBK5T7.js +81 -0
  133. package/dist/{chunk-CXT3GZSQ.js → chunk-QKT4UI2Y.js} +2 -2
  134. package/dist/{chunk-DGM2RJ3I.js → chunk-QLBSG7U5.js} +2 -2
  135. package/dist/chunk-QWKHW6VZ.js +2 -0
  136. package/dist/{chunk-3T5U2EQ2.js → chunk-R6M456QG.js} +2 -2
  137. package/dist/{chunk-RZWBTKXO.js → chunk-RDULNRSJ.js} +2 -2
  138. package/dist/{chunk-YKHL4J3G.js → chunk-RHHCLWQ6.js} +2 -2
  139. package/dist/{chunk-YF25RQER.js → chunk-RNKPYYYE.js} +2 -2
  140. package/dist/{chunk-XKM5D2XS.js → chunk-RPL3ARU7.js} +2 -2
  141. package/dist/{chunk-XFRHBAIT.js → chunk-RYOYJMGF.js} +2 -2
  142. package/dist/chunk-SB25YMEQ.js +2 -0
  143. package/dist/{chunk-SRIZDEWX.js → chunk-SVHTMVA4.js} +2 -2
  144. package/dist/{chunk-AFRS7WJU.js → chunk-SWK4XPUS.js} +2 -2
  145. package/dist/{chunk-YDTK77JP.js → chunk-T6QD2ZQB.js} +2 -2
  146. package/dist/{chunk-Z2QB75BS.js → chunk-TAYD3AE7.js} +2 -2
  147. package/dist/chunk-TD7VKJ2Y.js +117 -0
  148. package/dist/{chunk-K2DZCH2K.js → chunk-TH6IC56G.js} +2 -2
  149. package/dist/{chunk-FIO44MVK.js → chunk-TKDNDQA7.js} +2 -2
  150. package/dist/{chunk-Q4MRRB3C.js → chunk-TNG2FYS5.js} +2 -2
  151. package/dist/chunk-TQZV7KV4.js +2 -0
  152. package/dist/{chunk-NSDPPUDY.js → chunk-TUQIPUDS.js} +2 -2
  153. package/dist/chunk-TUSPIVZ3.js +4 -0
  154. package/dist/{chunk-RNKRYK6B.js → chunk-U2N2KE7A.js} +2 -2
  155. package/dist/{chunk-G47MFF47.js → chunk-UAQ4T73O.js} +2 -2
  156. package/dist/{chunk-5KIJMEPC.js → chunk-UDY7MIAW.js} +2 -2
  157. package/dist/{chunk-MLTKGHD2.js → chunk-URSGGIZX.js} +2 -2
  158. package/dist/{chunk-IGBQVEHE.js → chunk-UT7TADJX.js} +2 -2
  159. package/dist/{chunk-Z67JOKRE.js → chunk-V4NG5OMS.js} +105 -105
  160. package/dist/{chunk-OA2BO4DR.js → chunk-VMWUV6WB.js} +2 -2
  161. package/dist/{chunk-PX6QNUYF.js → chunk-VTCIYFEK.js} +2 -2
  162. package/dist/{chunk-6DO3VBLV.js → chunk-VU6LIWHT.js} +2 -2
  163. package/dist/{chunk-CTO3TRX7.js → chunk-VUSKPCUB.js} +2 -2
  164. package/dist/{chunk-V6XENWOF.js → chunk-VXJJTQYE.js} +2 -2
  165. package/dist/{chunk-BM4OTGSY.js → chunk-VZ7NXSHV.js} +2 -2
  166. package/dist/{chunk-ARGPDW2Y.js → chunk-WHADK6OS.js} +2 -2
  167. package/dist/chunk-WN3TCGJ4.js +2 -0
  168. package/dist/{chunk-GBZCVYWA.js → chunk-WOOAY3PA.js} +2 -2
  169. package/dist/{chunk-FLSVYEPL.js → chunk-WSLEJSFR.js} +2 -2
  170. package/dist/{chunk-BMKTDJI6.js → chunk-WYZIHUPZ.js} +2 -2
  171. package/dist/{chunk-WZ7V4BQV.js → chunk-XE33FV5W.js} +2 -2
  172. package/dist/{chunk-JO6FK3Q5.js → chunk-XFMVKFSF.js} +2 -2
  173. package/dist/{chunk-3YETOKNO.js → chunk-XGGBK66W.js} +2 -2
  174. package/dist/{chunk-BZCRHP46.js → chunk-XJX6LGHL.js} +2 -2
  175. package/dist/{chunk-OFZVFIDF.js → chunk-XN22RGSR.js} +2 -2
  176. package/dist/{chunk-VJAD5WX5.js → chunk-XSWYJCAK.js} +2 -2
  177. package/dist/{chunk-WV6R37XV.js → chunk-XU75YQN4.js} +2 -2
  178. package/dist/{chunk-UBETC3Q2.js → chunk-Y2VM4CJC.js} +2 -2
  179. package/dist/{chunk-7YZGSLW6.js → chunk-Y334QQU5.js} +2 -2
  180. package/dist/{chunk-TP2X2C2Y.js → chunk-YAGYMBEX.js} +2 -2
  181. package/dist/{chunk-KBIC6JHJ.js → chunk-YIHNPKWD.js} +2 -2
  182. package/dist/{chunk-5Z2H76VD.js → chunk-YXPUP5G2.js} +2 -2
  183. package/dist/{chunk-G6VV7ROY.js → chunk-Z2AWCTN6.js} +2 -2
  184. package/dist/{chunk-O3EX5STE.js → chunk-Z2PZVKPR.js} +2 -2
  185. package/dist/{chunk-OG5UK2K7.js → chunk-ZAZGGSM3.js} +2 -2
  186. package/dist/{chunk-GTZFKDP3.js → chunk-ZGW4HLPD.js} +2 -2
  187. package/dist/chunk-ZOXKSQQB.js +2 -0
  188. package/dist/{chunk-KFFQURUZ.js → chunk-ZPASRBLF.js} +2 -2
  189. package/dist/{chunk-WZRNEVYC.js → chunk-ZYM4HOFA.js} +2 -2
  190. package/dist/{chunk-FUUDUAKM.js → chunk-ZZ3Z7D56.js} +2 -2
  191. package/dist/cli-main.js +2 -2
  192. package/dist/code-EQJFDT6I.js +2 -0
  193. package/dist/code-result-json-7UWIWBOO.js +2 -0
  194. package/dist/{command-descriptors-6INSCKLW.js → command-descriptors-ORNTVNYV.js} +89 -89
  195. package/dist/dataflow-6VL54GX5.js +2 -0
  196. package/dist/dependence-slice-DT2NUHD2.js +2 -0
  197. package/dist/deps-DB7H5IKC.js +2 -0
  198. package/dist/direct-navigation-O3LUAYWQ.js +3 -0
  199. package/dist/entry-map-6K62RV3D.js +2 -0
  200. package/dist/files-MSLD7MO6.js +2 -0
  201. package/dist/hierarchy-IVBXAKFA.js +2 -0
  202. package/dist/imports-FRAVZ3Y2.js +2 -0
  203. package/dist/index.js +1 -1
  204. package/dist/members-KJOJDYGO.js +2 -0
  205. package/dist/methods-2AYABBT3.js +2 -0
  206. package/dist/output-continuation-command-JHMPH6NC.js +3 -0
  207. package/dist/project-reindex-HYO4WD7Z.js +3 -0
  208. package/dist/queries/affected.js +1 -1
  209. package/dist/queries/anchors.js +1 -1
  210. package/dist/queries/architecture.js +1 -1
  211. package/dist/queries/bottlenecks.js +1 -1
  212. package/dist/queries/by-kind.js +1 -1
  213. package/dist/queries/call-graph.js +1 -1
  214. package/dist/queries/change-surface.js +1 -1
  215. package/dist/queries/cleanup-plan.js +1 -1
  216. package/dist/queries/co-change.js +1 -1
  217. package/dist/queries/code.js +1 -1
  218. package/dist/queries/complexity-hotspots.js +1 -1
  219. package/dist/queries/complexity.d.ts +11 -0
  220. package/dist/queries/complexity.js +1 -1
  221. package/dist/queries/context.js +1 -1
  222. package/dist/queries/convergence.js +1 -1
  223. package/dist/queries/coupling.js +1 -1
  224. package/dist/queries/cycles.js +1 -1
  225. package/dist/queries/dataflow.js +1 -1
  226. package/dist/queries/dead.js +1 -1
  227. package/dist/queries/decorative-checkers.js +1 -1
  228. package/dist/queries/deep-chains.js +1 -1
  229. package/dist/queries/dependence-slice.js +1 -1
  230. package/dist/queries/dependency-depth.js +1 -1
  231. package/dist/queries/deps.js +1 -1
  232. package/dist/queries/diff-impact.js +1 -1
  233. package/dist/queries/doc-drift.js +1 -1
  234. package/dist/queries/drift.js +1 -1
  235. package/dist/queries/duplicate-bodies.js +1 -1
  236. package/dist/queries/entry-map.js +1 -1
  237. package/dist/queries/evidence.js +1 -1
  238. package/dist/queries/extract-candidates.js +1 -1
  239. package/dist/queries/fan.js +1 -1
  240. package/dist/queries/files.js +1 -1
  241. package/dist/queries/health.js +1 -1
  242. package/dist/queries/hierarchy.js +1 -1
  243. package/dist/queries/hotspots.js +1 -1
  244. package/dist/queries/imports.js +1 -1
  245. package/dist/queries/incomplete-migration.js +1 -1
  246. package/dist/queries/index.js +1 -1
  247. package/dist/queries/isolated.js +1 -1
  248. package/dist/queries/locality-candidates.js +1 -1
  249. package/dist/queries/members.js +1 -1
  250. package/dist/queries/methods.js +1 -1
  251. package/dist/queries/not-implemented.js +1 -1
  252. package/dist/queries/outline.js +1 -1
  253. package/dist/queries/passthrough-candidates.js +1 -1
  254. package/dist/queries/plan-context.js +1 -1
  255. package/dist/queries/react-component-duplicates.js +1 -1
  256. package/dist/queries/react-hook-candidates.js +1 -1
  257. package/dist/queries/react-large-component-pressure.js +1 -1
  258. package/dist/queries/recent-duplicates.js +1 -1
  259. package/dist/queries/redundant-reexports.js +1 -1
  260. package/dist/queries/reference-neighborhood.js +1 -1
  261. package/dist/queries/reference-reachability.js +1 -1
  262. package/dist/queries/refs.js +1 -1
  263. package/dist/queries/self-audit.js +1 -1
  264. package/dist/queries/similar-chains.js +1 -1
  265. package/dist/queries/similar-files.js +1 -1
  266. package/dist/queries/similar-signatures.js +1 -1
  267. package/dist/queries/similar.js +1 -1
  268. package/dist/queries/slice.js +1 -1
  269. package/dist/queries/source-inspection.js +1 -1
  270. package/dist/queries/source-search.js +1 -1
  271. package/dist/queries/stale-abstractions.js +1 -1
  272. package/dist/queries/surface.js +1 -1
  273. package/dist/queries/symbols.js +1 -1
  274. package/dist/queries/system-map.js +1 -1
  275. package/dist/queries/system.js +1 -1
  276. package/dist/queries/test-quality.js +1 -1
  277. package/dist/queries/trace.js +1 -1
  278. package/dist/queries/twin-ab.js +1 -1
  279. package/dist/queries/twin-drift.js +1 -1
  280. package/dist/queries/unused-imports.js +1 -1
  281. package/dist/queries/unused-params.js +1 -1
  282. package/dist/queries/value-flow.js +1 -1
  283. package/dist/queries/vue-component-duplicates.js +1 -1
  284. package/dist/queries/vue-composable-candidates.js +1 -1
  285. package/dist/queries/vue-large-view-pressure.js +1 -1
  286. package/dist/queries/wrapper-candidates.js +1 -1
  287. package/dist/query-service-fastpath.js +5 -5
  288. package/dist/query-service-server.js +2 -2
  289. package/dist/refs-ARMA6XUJ.js +2 -0
  290. package/dist/{refs-pagination-SRCUOYRD.js → refs-pagination-VUGIWN6U.js} +2 -2
  291. package/dist/reindex-worker.js +64 -22
  292. package/dist/reindex.js +74 -32
  293. package/dist/runtime.js +1 -1
  294. package/dist/rust-semantic-session-server.js +1 -1
  295. package/dist/rust-semantic-session-worker.js +1 -1
  296. package/dist/rust-semantic-worker.js +1 -1
  297. package/dist/slice-YOB5YFAM.js +2 -0
  298. package/dist/surface-VY5EFWTW.js +2 -0
  299. package/dist/{symbol-resolution-SVSMX4RN.js → symbol-resolution-DGQN4XIV.js} +2 -2
  300. package/dist/system-2KQ3QD2P.js +2 -0
  301. package/dist/trace-HTIPTXAE.js +2 -0
  302. package/dist/typescript-mailbox-worker.js +1 -1
  303. package/dist/value-flow-5FV3VQI7.js +2 -0
  304. package/dist/watch-server.js +3 -3
  305. package/package.json +1 -1
  306. package/dist/by-kind-XXGZGNZ6.js +0 -2
  307. package/dist/call-graph-VGY3R4L3.js +0 -2
  308. package/dist/chunk-3XZELASU.js +0 -2
  309. package/dist/chunk-63TFRBMB.js +0 -2
  310. package/dist/chunk-6LS3IG2I.js +0 -13
  311. package/dist/chunk-7Z4GMCHM.js +0 -117
  312. package/dist/chunk-ANCHW2R4.js +0 -57
  313. package/dist/chunk-C7WSQA6A.js +0 -21
  314. package/dist/chunk-DNPETNXT.js +0 -2
  315. package/dist/chunk-E7CJ6O72.js +0 -2
  316. package/dist/chunk-FYCH2EYQ.js +0 -2
  317. package/dist/chunk-GSHTVE56.js +0 -3
  318. package/dist/chunk-JSHDCVUM.js +0 -81
  319. package/dist/chunk-L7WRUNKJ.js +0 -2
  320. package/dist/chunk-LFWB7TOJ.js +0 -2
  321. package/dist/chunk-MFBVUQJZ.js +0 -2
  322. package/dist/chunk-MR4ZKWO6.js +0 -57
  323. package/dist/chunk-NP4JFCLE.js +0 -133
  324. package/dist/chunk-NQXWWE6S.js +0 -8
  325. package/dist/chunk-O2VY47Y5.js +0 -325
  326. package/dist/chunk-SIGVQT43.js +0 -2
  327. package/dist/chunk-UAQQR55F.js +0 -2
  328. package/dist/chunk-VRJG7N3I.js +0 -453
  329. package/dist/chunk-WCIKJ2E3.js +0 -3
  330. package/dist/chunk-WEXQYJY3.js +0 -5
  331. package/dist/chunk-WOPZX5GM.js +0 -2
  332. package/dist/chunk-XDQX6LDT.js +0 -4
  333. package/dist/chunk-XIPGCT3D.js +0 -5
  334. package/dist/chunk-Z2KGMIL4.js +0 -2
  335. package/dist/code-AXLJBZ6T.js +0 -2
  336. package/dist/code-result-json-CTZHAQXJ.js +0 -2
  337. package/dist/dataflow-AFXY423Q.js +0 -2
  338. package/dist/dependence-slice-2G4X6VSJ.js +0 -2
  339. package/dist/deps-LMCAV5DO.js +0 -2
  340. package/dist/direct-navigation-2ONV22Y2.js +0 -3
  341. package/dist/entry-map-ZOC3VXO5.js +0 -2
  342. package/dist/files-WJQJLHMH.js +0 -2
  343. package/dist/hierarchy-ASNIHAX4.js +0 -2
  344. package/dist/imports-JICEKDKK.js +0 -2
  345. package/dist/members-C5H2K3MS.js +0 -2
  346. package/dist/methods-KZOZHSD4.js +0 -2
  347. package/dist/output-continuation-command-NX3RH3TP.js +0 -3
  348. package/dist/project-reindex-A2SXUH2H.js +0 -3
  349. package/dist/refs-ZOORVRQC.js +0 -2
  350. package/dist/slice-NOTBWA7S.js +0 -2
  351. package/dist/surface-BTBCLKNA.js +0 -2
  352. package/dist/system-2EIUFP6B.js +0 -2
  353. package/dist/trace-BB2GHQPG.js +0 -2
  354. package/dist/value-flow-OA7AHSUG.js +0 -2
@@ -0,0 +1,134 @@
1
+ import{a as Ie}from"./chunk-YXPUP5G2.js";import{b as q,c as sn,d as on,e as we,g as ut}from"./chunk-DRENNWRG.js";import{b as Yt,c as z,d as Ne,f as Zt,g as en,h as tn,i as nn,j as rn,p as fe}from"./chunk-DKM723YF.js";import{a as Xt,c as N,d as pe,e as Gt,f as de}from"./chunk-IW5XQG5G.js";import{a as at,b as ct,e as lt}from"./chunk-HGFDYOVB.js";import{C as b,h as De,ma as Re,na as ve}from"./chunk-AK3PYTIK.js";var Ae=null;function _e(e){Ae?.(e)}function ec(e,t){let n=Ae;Ae=e;try{return t()}finally{Ae=n}}var vr=N("source-text",{clearGroups:["whole-project","source-file"]}),wr=N("source-lines",{clearGroups:["whole-project","source-file"]});function I(e,t){let n=t.replace(/\\/g,"/");return _e(n),vr.get(e,n,()=>Ar(e,n))}function Ar(e,t){let n=t.replace(/\\/g,"/");_e(n);try{return Re(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(r){if(ve(r))return"";throw r}}function ic(e){if(e.length===0)return[];let t=e.split(`
2
+ `);return e.endsWith(`
3
+ `)&&t.pop(),t}function pt(e,t){let n=t.replace(/\\/g,"/");return wr.get(e,n,()=>{let r=I(e,n);return r?r.split(`
4
+ `):[]})}var jr=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function Or(e){let t=jr.exec(e);return t?t[1]??"":null}function oc(e,t,n){return Mr(e,t,n).length>0}function Mr(e,t,n){if(n<=0)return[];let r=pt(e,t);if(r.length===0)return[];let s=[];for(let i=n-1;i>=0&&i>=n-5;i-=1){let o=(r[i]??"").trim();if(o==="")continue;let a=Or(o);if(a!==null){s.push(a);continue}if(!o.startsWith("//")&&!o.startsWith("*")&&!o.startsWith("/*")&&!o.startsWith("@")&&!o.startsWith("#"))return s}return s}import{extname as an}from"path";var $r={".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 O(e){return $r[an(e).toLowerCase()]??null}function M(e){return an(e).toLowerCase()===".vue"}var Br=[h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),h("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"}),je("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"}),je("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"}),je("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"}),je("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"})];function Y(e){let t=new Map;return{kind:e.kind,read(n,r,s){let i=!1,o=0,a;if(at()){let c=Ne(n);if(c){let l=`${c}\0${r}\0${s}`;a=t.get(l),a||(a=ct(["evidence-product-file-read-v1",e.kind,c,r,s]),t.set(l,a))}}return lt("evidence-product.file.read",()=>{let c=Zt(n,e.kind,r,s);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return i=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:i,payloadBytes:o}))},write(n,r,s,i){en(n,e.kind,r,s,e.serialize(i))},writeBatch(n,r){tn(n,r.map(s=>({kind:e.kind,relativePath:s.relativePath,contentHash:s.contentHash,payload:e.serialize(s.value)})))}}}function mc(e){let t=new Map;return{kind:e.kind,read(n,r,s){let i=!1,o=0,a;if(at()){let c=`${s}\0${r}`;a=t.get(c),a||(a=ct(["evidence-product-project-read-v1",e.kind,s,r]),t.set(c,a))}return lt("evidence-product.project.read",()=>{let c=nn(n,e.kind,r,s);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return i=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:i,payloadBytes:o}))},write(n,r,s,i){rn(n,e.kind,r,s,e.serialize(i))}}}function Z(e){let t=Br.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function h(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function je(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}import{createRequire as zr}from"module";import{setFlagsFromString as cn}from"v8";import{runInNewContext as Vr}from"vm";var ee;function Wr(){if(ee!==void 0)return ee;let e=globalThis.gc;if(typeof e=="function")return ee=e,ee;try{cn("--expose_gc");let t=Vr("gc");cn("--no-expose_gc"),ee=typeof t=="function"?t:null}catch{ee=null}return ee}function Ur(){let e=Wr();return e?(e(),!0):!1}var Hr=512*1024*1024,dt=0;function ln(e,t=Ur){!Number.isFinite(e)||e<=0||(dt+=e,!(dt<Hr)&&(dt=0,t()))}var _=zr(import.meta.url),Oe=null,un=!1;function qr(){if(un)return null;if(Oe)return Oe;try{return Oe=_("tree-sitter"),Oe}catch{return un=!0,null}}var pn=new Map,Me=new Set;function Qr(e){if(Me.has(e))return null;let t=pn.get(e);if(t)return t;let n;try{switch(e){case"rust":n=_("tree-sitter-rust");break;case"typescript":n=_("tree-sitter-typescript").typescript;break;case"tsx":n=_("tree-sitter-typescript").tsx;break;case"javascript":n=_("tree-sitter-javascript");break;case"python":n=_("tree-sitter-python");break;case"java":n=_("tree-sitter-java");break;case"kotlin":n=_("tree-sitter-kotlin");break;case"scala":n=_("tree-sitter-scala");break;case"ruby":n=_("tree-sitter-ruby");break;case"c":n=_("tree-sitter-c");break;case"cpp":n=_("tree-sitter-cpp");break;case"csharp":n=_("tree-sitter-c-sharp");break;case"php":n=_("tree-sitter-php").php;break;case"vb":{let r=_("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return Me.add(e),null}}catch{return Me.add(e),null}return pn.set(e,n),n}var dn=new Map;function Jr(e){let t=dn.get(e);if(t)return t;let n=Qr(e);if(!n)return null;let r=qr();if(!r)return null;let s=new r;try{s.setLanguage(n)}catch{return Me.add(e),null}return dn.set(e,s),s}function Kr(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function te(e,t){let n=Jr(e);if(!n)return null;try{let r=Kr(n,t);return ln(t.length*10),r}catch{return null}}import{createRequire as Xr}from"module";import{posix as ft}from"path";var kc=Gt("vue-sfc-units"),Gr=Xr(import.meta.url),Yr;function Zr(){return Yr??=Gr("@vue/compiler-sfc")}function es(...e){return Zr().parse(...e)}function ts(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function ns(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function gn(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let s;try{s=es(n,{filename:t})}catch(o){return r.errors.push(mn(o)),r}r.errors.push(...s.errors.map(mn));let{descriptor:i}=s;return i.template&&(r.template=$e(e,t,"template",i.template)),i.script&&r.scripts.push(fn(e,t,i.script,!1)),i.scriptSetup&&r.scripts.push(fn(e,t,i.scriptSetup,!0)),r.styles=i.styles.map(o=>$e(e,t,"style",o)),r.customBlocks=i.customBlocks.map(o=>$e(e,t,"custom",o)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(o=>o?.errors??[])),r}function fn(e,t,n,r){let s=$e(e,t,"script",n);return{...s,kind:"script",setup:r,astLanguage:ns(s.lang)}}function $e(e,t,n,r){let s=ss(r.attrs),i=typeof s.lang=="string"?s.lang:null,o=typeof s.src=="string"?s.src:typeof r.src=="string"?r.src:void 0;if(o){let c=rs(t,o);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:o,attrs:s,lang:i,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${o}`]};let l=I(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:s,lang:i,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:s,lang:i,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function rs(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=ts(ft.normalize(ft.join(ft.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function ss(e){return{...e}}function mn(e){return e instanceof Error?e.message:String(e)}function me(e,t,n){let s=gn(e,t,n).scripts.filter(o=>o.astLanguage&&o.body.length>0),i=s[0]?.astLanguage;return i?{body:s.map(o=>`${`
6
+ `.repeat(o.startLine)}${o.body}`).join(`
7
+ `),startLine:0,language:i}:null}var Be=de("ast-trees",{clearGroups:["whole-project","source-file"]});function $(e,t){if(M(t))return is(e,t);let n=O(t);if(!n)return null;let r=I(e,t);return r?Be.get(e,t,r,()=>te(n,r)):null}function Ac(e,t,n){if(M(t))return Be.get(e,t,n,()=>{let s=me(e,t,n);return s?te(s.language,`
8
+ `.repeat(s.startLine)+s.body):null});let r=O(t);return r?Be.get(e,t,n,()=>te(r,n)):null}function Ce(e,t,n){if(M(t)){let i=me(e,t,n);if(!i)return null;let o=te(i.language,`
9
+ `.repeat(i.startLine)+i.body);return o?{tree:o,language:i.language}:null}let r=O(t);if(!r)return null;let s=te(r,n);return s?{tree:s,language:r}:null}function is(e,t){let n=I(e,t);return n?Be.get(e,t,n,()=>{let r=me(e,t,n);if(!r)return null;let s=`
10
+ `.repeat(r.startLine)+r.body;return te(r.language,s)}):null}function Ee(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var In=["function_declaration","generator_function_declaration","method_definition","method_signature","function_signature"],os=new Set(In),as=[...In,"variable_declarator","public_field_definition"],cs=["function_item","function_signature_item"],ls=["function_definition"],us=[],yn=new Set(["arrow_function","function_expression","generator_function"]);function _n(e){return e==="rust"?cs:e==="python"?ls:e==="typescript"||e==="tsx"||e==="javascript"?as:us}function Ve(e,t){let n=ds(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:bn(n.functionNode),params:hn(n.functionNode),paramsEndLine:Sn(n.functionNode),isLiteralPassthrough:Nn(n.functionNode,t)};if(!ps(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(s=>s.type==="identifier"||s.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:bn(e),params:hn(e),paramsEndLine:Sn(e),isLiteralPassthrough:Nn(e,t)}:null}function Cn(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function hn(e){let t=Cn(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(Ee(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let s=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),i=r.childForFieldName("pattern");if(!s&&i&&i.type==="identifier"){n.push({name:i.text,simple:!0});continue}let o=r.namedChildren.find(a=>a.type==="identifier");n.push({name:i?.type==="identifier"?i.text:o?.text??"",simple:!1})}return n}function Sn(e){let t=Cn(e);return t?t.endPosition.row:e.startPosition.row}function ps(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?os.has(e):!1}function ds(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let s=xn(r);return s?{name:n.text,definitionNode:e,functionNode:s}:null}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let s=xn(r);return s?{name:n.text,definitionNode:e,functionNode:s}:null}return null}function xn(e){if(yn.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(s=>s.type==="arguments"))?.namedChildren??[]).filter(s=>yn.has(s.type));return r.length===1?r[0]:null}function bn(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)Ee(r)||(n+=1);return n}function Nn(e,t){let n=e.namedChildren.find(p=>p.type==="block"||p.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(p=>!Ee(p));if(r.length!==1)return!1;let s=r[0],i=null;if(s.type==="return_statement"||s.type==="expression_statement"?i=s.namedChild(0)??null:t==="rust"&&(s.type==="call_expression"||s.type==="macro_invocation")&&(i=s),!i)return!1;let o=t==="python"?"call":"call_expression";if(i.type!==o)return!1;let a=i.namedChildren.find(p=>p.type==="arguments"||p.type==="argument_list");if(!a)return!1;let c=a.namedChildren.filter(p=>!Ee(p)),l=e.namedChildren.find(p=>p.type==="parameters"||p.type==="formal_parameters");if(!l)return!1;let u=[];for(let p of l.namedChildren){if(p.type==="identifier"){u.push(p.text);continue}let d=p.namedChildren.find(f=>f.type==="identifier");d&&u.push(d.text)}if(c.length!==u.length)return!1;for(let p=0;p<u.length;p+=1){let d=c[p];if(d.type!=="identifier"||d.text!==u[p])return!1}return!0}function $c(e,t){return e.filter(n=>n.startLine<=t&&n.endLine>=t).sort((n,r)=>n.endLine-n.startLine-(r.endLine-r.startLine)||n.startLine-r.startLine)[0]??null}function En(e,t){let n=ms(e,t);if(!n)return null;let r=ne(n);if(!r)return null;let s=gs(n);return{calleeLeaf:r,calleeQualifier:s?fs(n):void 0,calleeText:n.text,memberAccess:s,line:e.startPosition.row}}function fs(e){return(e.childForFieldName("object")??e.childForFieldName("value")??e.namedChild(0)??void 0)?.text||void 0}function ms(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return e.childForFieldName("function")??e.namedChild(0);if(e.type==="new_expression")return e.childForFieldName("constructor")??e.namedChild(0)}return null}function gs(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function ne(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"private_property_identifier":case"shorthand_property_identifier":return e.text.replace(/^#/u,"");case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?ne(t):null}case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?ne(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?ne(t):null}case"super":case"self":case"this":return null;default:return null}}var ys=new Set(["identifier","type_identifier","field_identifier"]),hs=new Set(["identifier"]),Ss=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),xs=new Set(["rust","python"]),bs=/\{([^{}]*)\}/g,Ns=/\b([A-Za-z_][\w]*)\b/g;function kn(e,t){return Is(t).has(e.type)}function Pn(e,t){return xs.has(t)&&e.type==="string_content"}function mt(e){let t=0;for(let r of e.values()){let s=r[r.length-1];s!==void 0&&s>t&&(t=s)}let n=new Array(t+1);for(let r=0;r<=t;r+=1)n[r]=new Set;for(let[r,s]of e)for(let i of s)n[i].add(r);return n}function Is(e){return e==="rust"?ys:e==="python"?hs:Ss}function Ln(e,t){let n=e.startPosition.row;for(let r of e.text.matchAll(bs)){let s=r[1]??"";for(let i of s.matchAll(Ns))i[1]&&t(i[1],n)}}var _s=[/\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],Cs=/^#!?\[\s*serde\s*\(/,Es=/^#!?\[\s*schemars\s*\(/,ks=/^#!?\[\s*validate\s*\(/,Ps=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function Tn(e,t,n){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let r=e.childForFieldName("function")??e.namedChild(0);if(!r)return;let s=ne(r);if(!s||!Ps.has(s))return;let i=e.namedChildren.find(c=>c.type==="arguments");if(!i)return;let o=i.namedChild(0);if(!o||o.type!=="string")return;let a=o.namedChildren.find(c=>c.type==="string_fragment");a&&n.add(a.text)}function Fn(e,t){let n=Cs.test(e),r=Es.test(e),s=ks.test(e);if(!(!n&&!r&&!s))for(let i of _s){i.lastIndex=0;let o;for(;(o=i.exec(e))!==null;){let a=o[1],c=a.split("::").pop()??a;c==="is_none"&&/\bOption\b/.test(a)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(a)||c&&t.add(c)}}}function Dn(e,t){let n=new Map,r=(o,a)=>{if(o===a)return;let c=n.get(o);c||(c=new Set,n.set(o,c)),c.add(a)},s=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),i=(o,a)=>{let c=l=>{s.has(l.type)&&l.text!==a&&r(l.text,a);for(let u of l.children)c(u)};for(let l of o.children)c(l)};if(t==="rust")for(let o of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let a=o.namedChildren.find(l=>l.type==="type_identifier")?.text;if(!a)continue;let c=o.namedChildren.find(l=>l.type==="field_declaration_list"||l.type==="enum_variant_list"||l.type==="ordered_field_declaration_list");c&&i(c,a),o.type==="type_item"&&i(o,a)}else if(t==="python")for(let o of e.rootNode.descendantsOfType("class_definition")){let a=o.namedChildren.find(u=>u.type==="identifier")?.text;if(!a)continue;let c=o.childForFieldName("superclasses");c&&i(c,a);let l=o.namedChildren.find(u=>u.type==="block");if(l)for(let u of l.descendantsOfType("type"))for(let p of u.descendantsOfType("identifier"))p.text!==a&&r(p.text,a)}else for(let o of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let a=o.namedChildren.find(c=>c.type==="type_identifier")?.text;a&&i(o,a)}return n}var Ls=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),gt=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 Rn(e){let t=[],n=[],r=[],s=new Map,i=[],o=0,a=0,c=(l,u)=>{let p=s.get(l);if(!p){s.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)};for(;a<e.length;){let l=e[a];if(l===`
11
+ `){o+=1,a+=1;continue}if(/\s|,/.test(l)){a+=1;continue}if(l===";"){a=Ue(e,a);continue}if(l==='"'){let x=Pe(e,a,o);o=x.line,a=x.index;continue}if(l==="("||l==="["||l==="{"){i.push({kind:l,startLine:o,endLine:o,headTokens:[],tokens:[],children:[]}),a+=1;continue}if(l===")"||l==="]"||l==="}"){let x=i.pop();x&&(x.endLine=o,Ts(x,{callables:t,callSites:n,clojureMembers:r,recordIdentifier:c}),i[i.length-1]?.children.push(x)),a+=1;continue}if(yt(l)){a+=1;continue}let u=o,p=a;for(;a<e.length&&!ht(e[a]);)a+=1;let d=e.slice(p,a);if(!d)continue;let f={text:d,line:u};Fs(i[i.length-1],f),c(T(d),u)}return{language:"clojure",callables:t,callSites:n,clojureMembers:r,typeContainerMap:new Map,identifierLineMap:s,identifiersByLine:As(s),fileIdentifiers:new Set(s.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function Ts(e,t){if(e.kind!=="("||e.headTokens.length===0)return;let n=e.headTokens[0],r=T(n.text),s=Ls.get(n.text);if(s){let o=e.headTokens[1];if(o){let a=T(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:s})}}if(Ds(e,t),!r||gt.has(n.text)||gt.has(r)||r.startsWith(":"))return;let i=ws(n.text);t.callSites.push({calleeLeaf:i.leaf,calleeQualifier:i.qualifier,calleeText:i.text,memberAccess:!1,line:n.line})}function Fs(e,t){e&&(e.headTokens.length<2&&e.headTokens.push(t),e.tokens.length<200&&e.tokens.push(t))}function Ds(e,t){let n=T(e.tokens[0]?.text??"");if(n==="defprotocol"){let r=T(e.tokens[1]?.text??"");if(!r)return;for(let s of We(e))ke(t,r,"protocol",s,"protocol-method");return}if(n==="defrecord"||n==="deftype"){let r=T(e.tokens[1]?.text??"");if(!r)return;let s=n==="defrecord"?"record":"type",i=n==="defrecord"?"record-method":"type-method";for(let o of We(e))ke(t,r,s,o,i);return}if(n==="extend-type"){let r=T(e.tokens[1]?.text??"");if(!r)return;for(let s of We(e))ke(t,r,"extension",s,"extension-method");return}if(n==="extend-protocol"){let r=T(e.tokens[1]?.text??"");for(let s of We(e)){r&&ke(t,r,"extension",s,"extension-method");let i=vs(e,s.startLine);i&&i!==r&&ke(t,i,"extension",s,"extension-method")}}}function We(e){return e.children.filter(Rs)}function Rs(e){if(e.kind!=="(")return!1;let t=T(e.tokens[0]?.text??"");return!!(t&&!gt.has(t)&&!t.startsWith(":"))}function ke(e,t,n,r,s){let i=r.tokens[0],o=T(i?.text??"");!i||!o||(e.recordIdentifier(o,i.line),e.clojureMembers.push({ownerName:t,ownerKind:n,memberName:o,memberKind:s,startLine:r.startLine,endLine:r.endLine}))}function vs(e,t){let n=null;for(let r=2;r<e.tokens.length;r+=1){let s=e.tokens[r];if(s.line>t)break;let i=T(s.text);i&&!i.startsWith(":")&&(n=i)}return n}function T(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function ws(e){let t=e.replace(/^#?['`~@]+/,""),n=t.lastIndexOf("/"),r=T(t);if(n<=0)return{leaf:r,text:t};let s=t.slice(0,n);return{leaf:r,qualifier:s,text:t}}function Ue(e,t){let n=t;for(;n<e.length&&e[n]!==`
12
+ `;)n+=1;return n}function Pe(e,t,n){let r=t+1,s=n;for(;r<e.length;){let i=e[r];if(i==="\\"){r+=2;continue}if(i===`
13
+ `&&(s+=1),r+=1,i==='"')break}return{index:r,line:s}}function yt(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function ht(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function As(e){let t=[];for(let[n,r]of e)for(let s of r)t[s]??=new Set,t[s].add(n);return t}var vn=6,js=de("source-facts",{clearGroups:["whole-project","source-file"]}),St=Y({kind:"source-facts",invalidation:Z("source-facts"),serialize:$s,deserialize:Bs});function ge(e,t){return xt(e,t).facts}function xt(e,t){let n=I(e,t);if(!n)return{facts:null};let r=Os(e,t,n);return r?js.get(e,t,n,()=>Ms(e,t,r,n)):{facts:null}}function Os(e,t,n){return M(t)?me(e,t,n)?.language??null:O(t)}function Ms(e,t,n,r){let s=z(e,t,r),i=St.read(e,t,s);if(i&&i.language===n)return{facts:i};if(n==="clojure"){let c=Rn(r);return St.write(e,t,s,c),{facts:c}}let o=$(e,t);if(!o)return{facts:null,unavailable:{language:n,reason:"parser-unavailable"}};let a=Vs(o,n);return St.write(e,t,s,a),{facts:a}}function $s(e){let t={version:vn,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 Bs(e){try{let t=JSON.parse(e);if(t.version!==vn||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,s])=>[r,new Set(s)])),identifierLineMap:n,identifiersByLine:mt(n),fileIdentifiers:new Set(n.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function Vs(e,t){let n=[],r=[],s=new Set,i=new Set,o=new Map,a=(l,u)=>{let p=o.get(l);if(!p){o.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)},c=l=>{let u=Ve(l,t);u&&n.push(u);let p=En(l,t);p&&r.push(p),Tn(l,t,i),t==="rust"&&(l.type==="attribute_item"||l.type==="inner_attribute_item")&&Fn(l.text,s),kn(l,t)&&a(l.text,l.startPosition.row),Pn(l,t)&&Ln(l,a);for(let d of l.children)c(d)};return c(e.rootNode),{language:t,callables:n,callSites:r,clojureMembers:[],typeContainerMap:Dn(e,t),identifierLineMap:o,identifiersByLine:mt(o),fileIdentifiers:new Set(o.keys()),rustAttrReferencedNames:s,crossLanguageDispatchNames:i}}var wn=new WeakMap,An=new Set(["call_expression","call","decorator","pair","string","string_literal","template_string","variable_declarator"]);function Ws(e,t){let n=Array.isArray(t)?t:[t];if(!n.every(i=>An.has(i)))return e.descendantsOfType(t);let r=Us(e);return n.length===1?r.get(n[0])??[]:n.flatMap(i=>r.get(i)??[]).sort((i,o)=>i.startIndex-o.startIndex)}function bt(e,t){let n=e.walk(),r=0,s=!1;for(;!s;){if(t(n),n.gotoFirstChild()){r+=1;continue}for(;;){if(r===0){s=!0;break}if(n.gotoNextSibling())break;n.gotoParent(),r-=1}}}function Us(e){let t=wn.get(e);if(t)return t;let n=new Map;return bt(e,r=>{let s=r.nodeType;if(!An.has(s))return;let i=n.get(s);i?i.push(r.currentNode):n.set(s,[r.currentNode])}),wn.set(e,n),n}function On(e,t){t(e);for(let n of e.namedChildren)On(n,t)}var Hs=/(?:function|method|lambda)/u,jn=new WeakMap;function zs(e){let t=jn.get(e);if(t)return t;let n=[];return bt(e,r=>{if(!r.nodeIsNamed)return;let s=r.nodeType;(s==="arrow_function"||Hs.test(s))&&n.push(r.currentNode)}),jn.set(e,n),n}function qs(e,t,n){let r=null;for(let s of zs(e))s.startPosition.row>t||s.endPosition.row<n||(!r||s.endIndex-s.startIndex<r.endIndex-r.startIndex)&&(r=s);return r}function Mn(e,t,n){if(e.startPosition.row>t||e.endPosition.row<n)return null;for(let r of e.namedChildren){let s=Mn(r,t,n);if(s)return s}return e}function Qs(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function Nt(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?Nt(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function Js(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(Nt)??[]}var $n=new Set(["rust","typescript","tsx","javascript","python","clojure"]),Ks=new Set(["rust","typescript","tsx","javascript","python"]);function It(e,t){let n=ge(e,t);return!n||!$n.has(n.language)?null:n.callables.map(r=>({name:r.name,startLine:r.startLine,endLine:r.endLine}))}function Xs(e,t){if(!Ks.has(t))return null;let n=[];for(let r of e.descendantsOfType([..._n(t)])){let s=Ve(r,t);s&&n.push({name:s.name,startLine:s.startLine,endLine:s.endLine})}return n}function Gs(e,t){let n=ge(e,t);return!n||!$n.has(n.language)?null:n.callSites}function Bn(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}import{createRequire as ci}from"module";import{existsSync as ie}from"fs";import{basename as Wn,dirname as k,extname as B,join as F,relative as re,resolve as S,sep as li}from"path";import{existsSync as Ct,readdirSync as Ys,statSync as Zs}from"fs";import{join as ye,relative as ei}from"path";function Vn(e){let t=ti(e)??ii(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let s of t)for(let i of oi(e,s)){if(r.has(i))continue;r.add(i);let o=ai(e,i);o&&n.push(o)}return n}function ti(e){let t=ye(e,"pnpm-workspace.yaml");if(!Ct(t))return null;try{return ni(De(t,"pnpm workspace manifest"))}catch{return null}}function ni(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let s=ri(r);if(!n){/^packages\s*:\s*$/.test(s.trim())&&(n=!0);continue}let i=/^\s+-\s*(.+)$/.exec(s);if(i){let o=si(i[1].trim());o&&t.push(o);continue}if(s.trim()!=="")break}return t}function ri(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function si(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function ii(e){let t=ye(e,"package.json");if(!Ct(t))return null;try{let n=JSON.parse(De(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function oi(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let o=ye(e,t);return _t(o)?[o]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),s=t.slice(n+1).replace(/^\//,""),i=ye(e,r||".");return _t(i)?Ys(i).map(o=>ye(i,o,s)).filter(_t):[]}function _t(e){try{return Zs(e).isDirectory()}catch{return!1}}function ai(e,t){let n=ye(t,"package.json");if(!Ct(n))return null;try{let r=JSON.parse(De(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:ei(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var ui=pe("indexed-paths",{clearGroups:[]}),pi=pe("indexed-path-digest",{clearGroups:[]}),di=N("tsconfig-alias-config",{clearGroups:["whole-project"]}),fi=N("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),mi=ci(import.meta.url),Le;function gi(){if(Le!==void 0)return Le;try{Le=mi("typescript")}catch{Le=null}return Le}var yi=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],hi=pe("workspace-packages",{clearGroups:["whole-project"]}),se=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],He=[".py",".pyi"],P=[".java",".scala",".kt",".kts"],ze=[".rs"],qe=[".rb"],Qe=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Q=[".cs",".vb"],Je=[".dart"],oe=[".php"],he=[".clj",".cljs",".cljc"],Si=new Set(se),Et=new Set(He),Un=new Set(P),kt=new Set(ze),Pt=new Set(qe),Hn=new Set(Qe),zn=new Set(Q),Lt=new Set(Je),qn=new Set(oe),Qn=new Set(he),xi=[{extensions:se,lookup:Si},{extensions:He,lookup:Et},{extensions:P,lookup:Un},{extensions:ze,lookup:kt},{extensions:qe,lookup:Pt},{extensions:Qe,lookup:Hn},{extensions:Q,lookup:zn},{extensions:Je,lookup:Lt},{extensions:oe,lookup:qn},{extensions:he,lookup:Qn}];function V(e,t){return t.has(B(e).toLowerCase())}function bi(e){return V(e,Et)}function Ni(e){return V(e,Un)}function Ii(e){return V(e,kt)}function _i(e){return V(e,Pt)}function Ci(e){return V(e,Hn)}function Ei(e){return V(e,zn)}function Jn(e){return B(e).toLowerCase()===".vb"}function ki(e){return V(e,Lt)}function Pi(e){return V(e,qn)}function Li(e){return V(e,Qn)}function Tt(e){let t=B(e).toLowerCase();for(let n of xi)if(n.lookup.has(t))return n.extensions;return se}function Ti(e){return Ni(e)||Ei(e)||Pi(e)}function J(e,t,n){return bi(t)?Se(e,t,n):Ii(t)?W(e,t,n):_i(t)?Ke(e,t,n):Ci(t)?Xe(e,t,n):Ti(t)?g(e,n.replace(/\\/g,"."),Tt(t)):ki(t)?Ge(e,t,n):Li(t)?Ft(e,n):Fi(e,t,n)}function Fi(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return Di(e,t,n)??vi(e,n);let r=k(F(e.config.projectRoot,t)),s=S(r,n),i=U(e);for(let o of Rt(s)){let a=b(re(e.config.projectRoot,o));if(i.has(a)||ie(o))return a}return b(re(e.config.projectRoot,s))}function Di(e,t,n){let r=$i(e,t);if(!r)return null;let s=U(e);for(let i of Ri(r,n)){let o=S(r.baseUrl,i);for(let a of Rt(o)){let c=b(re(e.config.projectRoot,a));if(s.has(c)||ie(a))return c}}return null}function Ri(e,t){let n=[];for(let[r,s]of Object.entries(e.paths)){let i=r.indexOf("*");if(i===-1){if(t!==r)continue;n.push(...s);continue}let o=r.slice(0,i),a=r.slice(i+1);if(!t.startsWith(o)||!t.endsWith(a)||t.length<o.length+a.length)continue;let c=t.slice(o.length,t.length-a.length);for(let l of s)n.push(l.includes("*")?l.replace("*",c):l)}return n}function vi(e,t){let n=Ai(wi(e),t);if(!n)return null;let r=U(e);for(let s of ji(n)){let i=S(e.config.projectRoot,n.pkg.relativeDir,s);for(let o of Rt(i)){let a=b(re(e.config.projectRoot,o));if(r.has(a)||ie(o))return a}}return null}function wi(e){return hi.get(e,()=>Vn(e.config.projectRoot))}function Ai(e,t){let n=null;for(let r of e){let s=null;t===r.name?s="":t.startsWith(`${r.name}/`)&&(s=t.slice(r.name.length+1)),s!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:s})}return n}function ji(e){let t=[],n=Oi(e.pkg.exports,e.subpath);if(n){let r=Mi(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function Oi(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return Kn(e[n])}function Kn(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=Kn(t[n]);if(r)return r}return null}function Mi(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function $i(e,t){let n=b(k(t));return fi.get(e,n,()=>Bi(e,n))}function Bi(e,t){let n=gi();if(!n)return null;let r=S(e.config.projectRoot),s=S(r,t);for(;s===r||s.startsWith(r+li);){for(let o of yi){let a=F(s,o);if(!ie(a))continue;let c=di.get(e,a,()=>Vi(n,a));if(c)return c}let i=k(s);if(i===s)break;s=i}return null}function Vi(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,k(t)),s=r.options.paths;return!s||Object.keys(s).length===0?null:{baseUrl:r.options.baseUrl?S(k(t),r.options.baseUrl):k(t),paths:s}}catch{return null}}function Se(e,t,n){let r=U(e),s;if(n.startsWith(".")){let i=n.match(/^(\.+)(.*)$/);if(!i)return null;let o=i[1].length,a=i[2].replace(/^\./,""),c=k(F(e.config.projectRoot,t));for(let l=1;l<o;l++)c=k(c);s=a?S(c,a.replace(/\./g,"/")):c}else s=S(e.config.projectRoot,n.replace(/\./g,"/"));for(let i of Wi(s)){let o=b(re(e.config.projectRoot,i));if(r.has(o)||ie(i))return o}return null}function W(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 s=k(F(e.config.projectRoot,t)),i;return r.startsWith("crate::")?i=S(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?i=S(s,r.slice(6).replace(/::/g,"/")):i=S(k(s),r.slice(7).replace(/::/g,"/")),Dt(e,Ui(i))}function Ke(e,t,n){let r=k(F(e.config.projectRoot,t)),s=S(r,n);return Dt(e,Hi(s))}function Xe(e,t,n){let r=k(F(e.config.projectRoot,t)),s=[S(r,n),S(e.config.projectRoot,n),S(e.config.projectRoot,"include",n),S(e.config.projectRoot,"src",n)];return Dt(e,s)}function g(e,t,n){let r=U(e),s=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),i=s.replace(/\./g,"/"),o=s.split(".").pop()??s;for(let c of n){let l=`${i}${c}`,u=[...r].find(p=>p.endsWith(l));if(u)return u}for(let c of n){let l=[...r].find(u=>Wn(u)===`${o}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(B(c).toLowerCase())).filter(c=>c.includes(`/${i}/`)||c.includes(`/${o}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function Ge(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=b(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let s=k(F(e.config.projectRoot,t)),i=S(s,n);for(let o of zi(i)){let a=b(re(e.config.projectRoot,o));if(r.has(a)||ie(o))return a}return null}function Ft(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=U(e);for(let s of he){let i=`${n}${s}`,o=[...r].find(a=>a.endsWith(i));if(o)return o}for(let s of he){let i=[...r].find(o=>Wn(o)===`${n.split("/").pop()}${s}`);if(i)return i}return null}function Wi(e){let t=B(e);return Et.has(t)?[e]:[`${e}.py`,`${e}.pyi`,F(e,"__init__.py"),F(e,"__init__.pyi")]}function Dt(e,t){let n=U(e);for(let r of t){let s=b(re(e.config.projectRoot,r));if(n.has(s)||ie(r))return s}return null}function Ui(e){let t=B(e);return kt.has(t)?[e]:[`${e}.rs`,F(e,"mod.rs")]}function Hi(e){let t=B(e);return Pt.has(t)?[e]:[`${e}.rb`,F(e,"index.rb")]}function zi(e){let t=B(e);return Lt.has(t)?[e]:[`${e}.dart`,e]}function Rt(e){let t=B(e),n=new Set;if(t){n.add(e);for(let r of se)n.add(e.slice(0,-t.length)+r)}else for(let r of se)n.add(`${e}${r}`),n.add(F(e,`index${r}`));return[...n]}function U(e){return ui.get(e,()=>new Set(Ie(e,{includeIgnored:!1}).map(b)))}function vt(e){return pi.get(e,()=>Yt([...U(e)].sort().join(`
14
+ `)))}function qi(e,t,n={}){let r=ge(e,t);if(!r)return[];let s=[];if(n.includeCrossLanguageDispatchNames)for(let i of r.crossLanguageDispatchNames)s.push({name:i,kind:"cross-language-dispatch",occurrences:1});if(n.includeRustAttributeNames&&r.language==="rust")for(let i of r.rustAttrReferencedNames)s.push({name:i,kind:"rust-attribute",occurrences:1});return s}import{basename as Xn}from"path";function A(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Qi(e){return e.replace(/'''[\s\S]*?'''/g,K).replace(/"""[\s\S]*?"""/g,K).replace(/#.*$/gm,K).replace(/\/\/.*$/gm,K).replace(/\/\*[\s\S]*?\*\//g,K).replace(/`(?:\\[\s\S]|[^`])*`/g,K).replace(/'(?:\\.|[^'\\\r\n])*'/g,K).replace(/"(?:\\.|[^"\\\r\n])*"/g,K)}function K(e){return e.replace(/[^\r\n]/g," ")}var Ql=de("stripped-lines",{clearGroups:["whole-project","source-file"]});Xt({name:"stripped-source-singleton",groups:["whole-project","source-file"],clearAll:()=>{Ye=null,Te=""},clearFile:()=>{Ye=null,Te=""}});var Ye=null,Te="";function Ji(e){return Ye===e||(Ye=e,Te=Qi(e)),Te}function X(e,t,n){let r=Ji(e);return`${r.slice(0,t)}${" ".repeat(n-t)}${r.slice(n)}`}function C(e,t){return new RegExp(`\\b${A(t)}\\b`,"m").test(e)}function xe(e,t){let n=new Set,r=new RegExp(`\\b${A(t)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let s of e.matchAll(r)){let i=s[1];i&&n.add(i)}return[...n]}function wt(e){let t=0;for(let n of e)n==="("&&(t+=1),n===")"&&(t-=1);return t}var Ki=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function E(e){let t=[],n=0,r=0;for(let s=0;s<e.length;s++){let i=e[s];(i==="{"||i==="["||i==="(")&&n++,(i==="}"||i==="]"||i===")")&&n--,i===","&&n===0&&(t.push(e.slice(r,s)),r=s+1)}return t.push(e.slice(r)),t}function L(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=(s,i)=>{let o=i||t.has(s.type);!o&&Ki.has(s.type)&&n.add(s.text);for(let a of s.children)r(a,o)};return r(e.rootNode,!1),n}function w(e,t,n,r,s,i,o){return{importedName:s,localName:i,sourcePath:o??g(e,r,Tt(t)),kind:"named",used:C(n,i),usedMembers:[]}}function m(e,t,n,r,s="named",i={}){return{importedName:e,localName:t,sourcePath:n,kind:s,used:r.has(t),usedMembers:[],isTypeOnly:i.isTypeOnly}}function H(e,t,n,r,s="named",i=[],o={}){return{importedName:e,localName:t,sourcePath:n,kind:s,used:r,usedMembers:i,isTypeOnly:o.isTypeOnly}}function ae(e,t){return{importedName:e,localName:null,sourcePath:t,kind:"side-effect",used:!0,usedMembers:[]}}function ce(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 D(e,t,n){let r=[];for(let s of e.matchAll(t)){let i=s[0];if(!i||typeof s.index!="number")continue;let o=X(e,s.index,s.index+i.length);for(let a of n(s,o))r.push(a)}return r}function R(e,t,n,r,s){let i=Ce(e,t,s)?.tree??null;if(i){let o=n(i);if(o)return o}return r()}function Ze(e,t,n,r,s){let i=Ce(e,t,s)?.tree??null,o=O(t),a=o?n[o]:void 0;return i&&a?a(i):r()}function Gn(e,t,n){return R(e,t,r=>Gi(e,t,r),()=>Xi(e,t,n),n)}function Xi(e,t,n){return D(n,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(r,s)=>{let i=r[1]?.trim();if(!i)return[];let o=Xn(i).replace(/\.[^.]+$/,"");return[H(i,o,Xe(e,t,i),C(s,o))]})}function Gi(e,t,n){let r=y(n,new Set(["preproc_include"])),s=[];for(let i of n.rootNode.descendantsOfType("preproc_include")){let o=null;for(let c of i.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=Xn(o).replace(/\.[^.]+$/,"");s.push(m(o,a,Xe(e,t,o),r))}return s}var Yi=new Set([":require",":require-macros",":use"]),Ot=String.raw`A-Za-z0-9_$*+!?.<>=-`;function Zn(e,t,n){let r=lo(n);if(!r)return[];let s=co(n,r.start,r.end),i=[];for(let o of r.children.slice(2)){if(o.type!=="list"||o.children.length===0)continue;let a=v(o.children[0]);if(a){if(Yi.has(a)){for(let c of to(o.children.slice(1)))i.push(...eo(e,c,s));continue}if(a===":import")for(let c of ro(o.children.slice(1)))i.push(c)}}return i}function Zi(e){return e.type==="list"&&v(e.children[0])==="ns"}function eo(e,t,n){let r=Ft(e,t.namespace),s=t.alias??t.namespace,i=io(n,s),o=[{importedName:t.namespace,localName:s,sourcePath:r,kind:"namespace",used:t.refers.length>0||t.referAll||i.length>0||oo(n,t.namespace),usedMembers:i}];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:ao(n,a),usedMembers:[]});return o}function to(e){return e.flatMap(t=>et(t,null))}function et(e,t){if(e.type==="atom")return e.text.startsWith(":")?[]:[{namespace:jt(t,e.text),alias:null,refers:[],referAll:!1}];if(e.type==="vector")return e.children.length>0&&v(e.children[0])===null?e.children.flatMap(n=>et(n,t)):no(e,t);if(e.type==="list"&&e.children.length>0){let n=v(e.children[0]);return n?!n||n.startsWith(":")?[]:e.children.slice(1).flatMap(r=>et(r,jt(t,n))):e.children.flatMap(r=>et(r,t))}return[]}function no(e,t){let n=v(e.children[0]);if(!n||n.startsWith(":"))return[];let r={namespace:jt(t,n),alias:null,refers:[],referAll:!1};for(let s=1;s<e.children.length;s+=1){let i=v(e.children[s]);if(!i?.startsWith(":"))continue;let o=e.children[s+1];if((i===":as"||i===":as-alias")&&o){r.alias=v(o),s+=1;continue}i===":refer"&&o&&(v(o)===":all"?r.referAll=!0:(o.type==="vector"||o.type==="list")&&r.refers.push(...o.children.map(v).filter(so)),s+=1)}return[r]}function ro(e){let t=[];for(let n of e){if(n.type==="atom"){let s=n.text.split(".").pop()??n.text;t.push(H(s,s,null,!0));continue}if(n.type!=="vector")continue;let r=v(n.children[0]);if(r)for(let s of n.children.slice(1)){let i=v(s);i&&t.push(H(`${r}.${i}`,i,null,!0))}}return t}function jt(e,t){return e?`${e}.${t}`:t}function v(e){return e?.type==="atom"?e.text:null}function so(e){return!!(e&&!e.startsWith(":"))}function io(e,t){let n=new Set,r=new RegExp(`${Mt()}${A(t)}\\s*/\\s*([${Ot}]+)`,"g");for(let s of e.matchAll(r)){let i=s[1];i&&n.add(i)}return[...n]}function oo(e,t){return new RegExp(`${Mt()}${A(t)}\\s*/`,"m").test(e)}function ao(e,t){return new RegExp(`${Mt()}${A(t)}(?![${Ot}])`,"m").test(e)}function Mt(){return`(?<![${Ot}])`}function co(e,t,n){let r="",s=0;for(;s<e.length;){if(s>=t&&s<n){r+=e[s]===`
15
+ `?`
16
+ `:" ",s+=1;continue}let i=e[s];if(i===";"){let o=Ue(e,s);r+=Yn(e.slice(s,o)),s=o;continue}if(i==='"'){let o=Pe(e,s,0).index;r+=Yn(e.slice(s,o)),s=o;continue}r+=i,s+=1}return r}function lo(e){let t=0;for(;t<e.length&&(t=$t(e,t),!(t>=e.length));){let n=tt(e,t);if(!n){t+=1;continue}if(Zi(n.form))return n.form;t=n.index}return null}function tt(e,t){let n=$t(e,t);if(e.startsWith("#?@",n)||e.startsWith("#?",n))return uo(e,n);if(e.startsWith("#_",n)){let s=tt(e,n+2);return s?{form:{type:"atom",text:"",start:n,end:s.index},index:s.index}:null}for(;yt(e[n]);)n+=1;let r=e[n];return r?r==="("?At(e,n,"list",")"):r==="["?At(e,n,"vector","]"):r==="{"?At(e,n,"map","}"):r==='"'?{form:{type:"atom",text:"",start:n,end:Pe(e,n,0).index},index:Pe(e,n,0).index}:fo(e,n):null}function uo(e,t){let n=e.startsWith("#?@",t)?3:2,r=tt(e,t+n);return r?{form:{type:"list",children:r.form.type==="list"||r.form.type==="vector"||r.form.type==="map"?po(r.form.children):[],start:t,end:r.index},index:r.index}:null}function po(e){let t=[];for(let n=0;n<e.length;n+=2){let r=v(e[n]),s=e[n+1];r?.startsWith(":")&&s&&t.push(s)}return t}function At(e,t,n,r){let s=[],i=t+1;for(;i<e.length;){if(i=$t(e,i),e[i]===r)return{form:{type:n,children:s,start:t,end:i+1},index:i+1};let o=tt(e,i);if(!o){i+=1;continue}o.form.type==="atom"&&o.form.text===""||s.push(o.form),i=o.index}return{form:{type:n,children:s,start:t,end:e.length},index:e.length}}function fo(e,t){let n=t;for(;n<e.length&&!ht(e[n]);)n+=1;return{form:{type:"atom",text:e.slice(t,n),start:t,end:n},index:n}}function $t(e,t){let n=t;for(;n<e.length;){let r=e[n];if(/\s|,/.test(r)){n+=1;continue}if(r===";"){n=Ue(e,n);continue}break}return n}function Yn(e){return e.replace(/[^\r\n]/g," ")}function er(e,t,n){let r=[];for(let s of n.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let i=s[1]?.trim(),o=s[2]?.trim()??null,a=s[0];if(!i||!a||typeof s.index!="number")continue;let c=X(n,s.index,s.index+a.length);r.push({importedName:i,localName:o,sourcePath:Ge(e,t,i),kind:o?"namespace":"side-effect",used:o?C(c,o):!0,usedMembers:o?xe(c,o):[]})}return r}function tr(e,t,n){let r=[];for(let s of n.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let i=s[1]?.trim();i&&r.push({specifier:i,sourcePath:Ge(e,t,i)})}return r}function nr(e,t,n){return Ze(e,t,{csharp:r=>go(e,t,r),vb:r=>mo(e,t,r)},()=>{let r=Jn(t)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return D(n,r,(s,i)=>{let o=s[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[w(e,t,i,u,p,d,g(e,u,Q))]})},n)}function mo(e,t,n){let r=y(n,new Set(["imports_statement"])),s=[];for(let i of n.rootNode.descendantsOfType("imports_statement")){let o=i.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;s.push(m(u,p,g(e,l,Q),r,c?"namespace":"named"))}return s}function go(e,t,n){let r=y(n,new Set(["using_directive"])),s=[];for(let i of n.rootNode.descendantsOfType("using_directive")){let o=i.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;s.push(m(u,p,g(e,l,Q),r,a?"namespace":"named"))}return s}var yo=N("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function rr(e,t){return yo.get(e,t,()=>{let n=new Set,r=I(e,t);if(!r)return n;let i=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 i.matchAll(/[A-Za-z_$][\w$]*/g))n.add(o[0]);return n})}function Bt(e,t,n){return R(e,t,r=>So(e,t,r),()=>ho(e,t,n),n)}function ho(e,t,n){return To(n).flatMap(r=>Fo(e,t,r.clause,r.specifier,r.start,r.end,n))}function So(e,t,n){let r=xo(e,t,n),s=[];for(let i of n.rootNode.descendantsOfType("import_statement"))s.push(...bo(e,t,n,i,r));return s}function xo(e,t,n){let r=y(n,new Set(["import_statement"]));if(M(t))for(let s of rr(e,t))r.add(s);return r}function bo(e,t,n,r,s){let i=Eo(r);if(!i)return[];let o=J(e,t,i),a=L(r,"import_clause");return a?No(n,a,o,s,ko(r.text)):[ae("*",o)]}function No(e,t,n,r,s){let i=[];for(let o of t.namedChildren)if(o.type==="identifier")i.push(Io(o.text,n,r,s));else if(o.type==="namespace_import"){let a=_o(e,o,n,r,s);a&&i.push(a)}else o.type==="named_imports"&&i.push(...Co(o,n,r,s));return i}function Io(e,t,n,r){return m("default",e,t,n,"default",{isTypeOnly:r})}function _o(e,t,n,r,s){let o=L(t,"identifier")?.text??"";if(!o)return null;let a=Lo(e,o);return ce("*",n,{localName:o,usedMembers:a,isTypeOnly:s,used:a.length>0||r.has(o)})}function Co(e,t,n,r){let s=[];for(let i of e.namedChildren){if(i.type!=="import_specifier")continue;let o=i.namedChild(0),a=i.namedChild(1);if(!o)continue;let c=o.text,l=a?.text??c;s.push(m(c,l,t,n,"named",{isTypeOnly:r||Po(i.text)}))}return s}function Eo(e){let t=L(e,"string");if(!t)return null;let n=L(t,"string_fragment");return n?n.text:null}function ko(e){return/^\s*import\s+type\b/.test(e)}function Po(e){return/^\s*type\b/.test(e.trim())}function Lo(e,t){let n=new Set;for(let r of e.rootNode.descendantsOfType("member_expression")){let s=r.namedChild(0),i=r.namedChild(1);!s||!i||s.type!=="identifier"||s.text!==t||(i.type==="property_identifier"||i.type==="identifier")&&n.add(i.text)}return[...n]}function To(e){let t=[],n=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(n)){let i=s[0],o=s[1],a=s[2];!i||!a||typeof s.index!="number"||t.push({clause:o,specifier:a,start:s.index,end:s.index+i.length})}let r=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(r)){let i=s[0],o=s[1];!i||!o||typeof s.index!="number"||t.push({clause:null,specifier:o,start:s.index,end:s.index+i.length})}return t.sort((s,i)=>s.start-i.start)}function Fo(e,t,n,r,s,i,o){let a=J(e,t,r),c=X(o,s,i);return n?Do(n).map(u=>({...u,sourcePath:a})).map(u=>{if(u.kind==="namespace"){let p=xe(c,u.localName);return ce(u.importedName,u.sourcePath,{localName:u.localName,usedMembers:p,used:p.length>0||C(c,u.localName),isTypeOnly:u.isTypeOnly})}return u.kind==="side-effect"?ae(u.importedName,u.sourcePath):H(u.importedName,u.localName??"",u.sourcePath,u.localName?C(c,u.localName):!1,u.kind,[],{isTypeOnly:u.isTypeOnly})}):[ae("*",a)]}function Do(e){let t=e.trim(),n=/^type\b/.test(t),r=t.replace(/^type\s+/,""),[s,i]=Ro(r),o=[];return s&&o.push(...sr(s,n)),i&&o.push(...sr(i,n)),o}function sr(e,t){let n=e.trim();if(!n)return[];if(n.startsWith("{")){let r=n.slice(1,-1).trim();return r?E(r).map(s=>{let i=s.trim(),o=t||/^type\b/.test(i),a=i.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 Ro(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 Vt(e,t,n){let r=$(e,t);return r?Mo(e,t,r):vo(e,t,n)}function vo(e,t,n){return[...wo(e,t,n),...Ao(e,t,n),...jo(e,t,n)]}function wo(e,t,n){let r=[],s=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of n.matchAll(s)){if(typeof i.index!="number")continue;let o=i[1]??"",a=i[2]??"",c=E(o).map(p=>Oo(p.trim())).filter(p=>!!p),l=be(n,i.index),u=be(n,i.index+i[0].length-1);r.push({kind:"named",sourcePath:J(e,t,a),names:c,startLine:l,endLine:u})}return r}function Ao(e,t,n){let r=[],s=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of n.matchAll(s)){if(typeof i.index!="number")continue;let o=i[2]??"",a=be(n,i.index),c=be(n,i.index+i[0].length-1);r.push({kind:"star-as",sourcePath:J(e,t,o),names:i[1]?[i[1]]:[],startLine:a,endLine:c})}return r}function jo(e,t,n){let r=[],s=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of n.matchAll(s)){if(typeof i.index!="number")continue;let o=i[1]??"",a=be(n,i.index),c=be(n,i.index+i[0].length-1);r.push({kind:"star",sourcePath:J(e,t,o),names:[],startLine:a,endLine:c})}return r}function Oo(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 be(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)e.charCodeAt(r)===10&&n++;return n}function Mo(e,t,n){let r=[];for(let s of n.rootNode.descendantsOfType("export_statement")){let i=$o(e,t,s);if(i===void 0)continue;let o=s.startPosition.row,a=s.endPosition.row,c=Bo(s,i,o,a);r.push(c)}return r}function $o(e,t,n){let r=L(n,"string");if(!r)return;let s=L(r,"string_fragment");if(s)return J(e,t,s.text)}function Bo(e,t,n,r){let s=L(e,"export_clause");if(s){let o=[];for(let a of s.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 i=L(e,"namespace_export");if(i){let o=i.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 ir(e,t,n){return Ze(e,t,{java:r=>Vo(e,t,r),kotlin:r=>Wo(e,t,r),scala:r=>Uo(e,t,r)},()=>D(n,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(r,s)=>{let i=r[1]?.trim();return i?Ho(e,t,i,s):[]}),n)}function Vo(e,t,n){let r=y(n,new Set(["import_declaration"])),s=[];for(let i of n.rootNode.descendantsOfType("import_declaration")){let o=i.children.some(p=>p.type==="asterisk"),c=i.namedChildren.find(p=>p.type==="scoped_identifier")??i.namedChildren.find(p=>p.type==="identifier");if(!c)continue;let l=c.text;if(o){s.push(ce("*",g(e,l,P)));continue}let u=l.split(".").pop()??l;s.push(m(u,u,g(e,l,P),r))}return s}function Wo(e,t,n){let r=y(n,new Set(["import_header","import_list"])),s=[];for(let i of n.rootNode.descendantsOfType("import_header")){let o=i.namedChildren.find(f=>f.type==="identifier");if(!o)continue;let a=i.namedChildren.some(f=>f.type==="wildcard_import"),c=i.namedChildren.find(f=>f.type==="import_alias");if(a){s.push(ce("*",g(e,o.text,P)));continue}let l=o.text,u=l.split(".").pop()??l,d=c?.namedChild(0)?.text??u;s.push(m(u,d,g(e,l,P),r))}return s}function Uo(e,t,n){let r=y(n,new Set(["import_declaration"])),s=[];for(let i of n.rootNode.descendantsOfType("import_declaration")){let o=i.namedChildren.find(p=>p.type==="namespace_selectors"||p.type==="namespace_wildcard"),a=i.namedChildren.filter(p=>p!==o&&(p.type==="identifier"||p.type==="stable_identifier")),c=a.map(p=>p.text).join(".");if(!c)continue;if(o?.type==="namespace_wildcard"){s.push(ce("*",g(e,c,P)));continue}if(o?.type==="namespace_selectors"){for(let p of o.namedChildren)if(p.type==="arrow_renamed_identifier"){let[d,f]=p.namedChildren;if(!d)continue;let x=d.text,le=f?.text??x;if(x==="_")continue;s.push(m(x,le,g(e,`${c}.${x}`,P),r))}else if(p.type==="identifier"){let d=p.text;s.push(m(d,d,g(e,`${c}.${d}`,P),r))}continue}let l=a[a.length-1]?.text??c,u=a.slice(0,-1).map(p=>p.text).join(".")||c;s.push(m(l,l,g(e,u&&a.length>1?`${u}.${l}`:c,P),r))}return s}function Ho(e,t,n,r){if(n.includes("{")&&n.includes("}")){let s=n.slice(0,n.indexOf("{")).replace(/\.$/,"").trim(),i=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return E(i).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==="_"?s:`${s}.${u}`.replace(/\.\./g,".");return[w(e,t,r,d,u,p)]})}return[w(e,t,r,n,n.split(".").pop()??n,n.split(".").pop()??n)]}function ar(e,t,n){return R(e,t,r=>zo(e,t,r),()=>D(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,s)=>{let i=r[1]?.trim();return i?E(i).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[w(e,t,s,u,p,d,g(e,u.replace(/\\/g,"."),oe))]}):[]}),n)}function zo(e,t,n){let r=y(n,new Set(["namespace_use_declaration"])),s=[],i=(o,a,c)=>{s.push(m(a,c,g(e,o.replace(/\\/g,"."),oe),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??"";for(let l of a.namedChildren){if(l.type!=="namespace_use_clause")continue;let{importedName:u,localName:p,qualified:d}=or(l,c);u&&i(d,u,p)}continue}for(let c of o.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:l,localName:u,qualified:p}=or(c,"");l&&i(p,l,u)}}return s}function or(e,t){let n=e.namedChildren.find(l=>l.type==="qualified_name"),r=e.namedChildren.filter(l=>l.type==="name"),s="";n?s=n.text:r.length>=1&&(s=r[0].text);let i=n&&r.length>0?r[r.length-1]:null,o=s.split("\\").pop()??s,a=i?.text??o,c=t?`${t}\\${s}`:s;return{importedName:o,localName:a,qualified:c}}function lr(e,t,n){return R(e,t,r=>qo(e,t,r),()=>Jo(n).flatMap(r=>Xo(e,t,r,n)),n)}function qo(e,t,n){let r=y(n,new Set(["import_statement","import_from_statement"])),s=[];for(let i of n.rootNode.descendantsOfType("import_statement"))for(let o of i.namedChildren){let a=cr(o);if(!a)continue;let c=Se(e,t,a.qualifiedName);s.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:r.has(a.localName),usedMembers:[]})}for(let i of n.rootNode.descendantsOfType("import_from_statement")){let o=i.namedChild(0);if(!o)continue;let a=Qo(o);if(a===null)continue;let c=Se(e,t,a);for(let l=1;l<i.namedChildCount;l+=1){let u=i.namedChild(l);if(u.type==="wildcard_import"){s.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let p=cr(u);p&&s.push({importedName:p.qualifiedName,localName:p.localName,sourcePath:c,kind:"named",used:r.has(p.localName),usedMembers:[]})}}return s}function cr(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 Qo(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let t=L(e,"import_prefix")?.text??"",n=L(e,"dotted_name")?.text??"";return`${t}${n}`}return null}function Jo(e){let t=e.split(`
17
+ `),n=[],r=0;for(let s=0;s<t.length;s++){let i=t[s],o=i.trimStart(),a=r;if(r+=i.length+1,!o.startsWith("import ")&&!o.startsWith("from "))continue;let c=i,l=a+i.length,u=wt(i);for(;s+1<t.length&&(u>0||c.trimEnd().endsWith("\\"));){s++;let d=t[s];c+=`
18
+ ${d}`,l+=1+d.length,u+=wt(d),r+=d.length+1}let p=Ko(c);p&&n.push({...p,start:a,end:l})}return n}function Ko(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 Xo(e,t,n,r){let s=X(r,n.start,n.end),i=n.clause.replace(/\n/g," ").trim();if(n.kind==="import")return E(i).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(),x=Se(e,t,d),le=xe(s,f);return[{importedName:d,localName:f,sourcePath:x,kind:"namespace",used:C(s,f)||le.length>0,usedMembers:le}]});let o=n.module?Se(e,t,n.module):null,a=[];for(let c of E(i)){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:C(s,d),usedMembers:[]})}return a}import{basename as Go}from"path";function ur(e,t,n){return R(e,t,r=>Zo(e,t,r),()=>Yo(e,t,n),n)}function Yo(e,t,n){return D(n,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(r,s)=>{let i=r[1],o=r[2];if(!i||!o)return[];let a=i==="require_relative"?Ke(e,t,o):null;if(a){let c=pr(o);return[H(c,c,a,C(s,c))]}return[ae(o,a)]})}function Zo(e,t,n){let r=y(n,new Set([])),s=[],i=new Set(["require","require_relative","load"]);for(let o of n.rootNode.descendantsOfType("call")){let a=o.namedChild(0);if(!a||a.type!=="identifier"||!i.has(a.text))continue;let l=o.namedChildren.find(f=>f.type==="argument_list")?.namedChild(0);if(!l||l.type!=="string")continue;let p=l.namedChildren.find(f=>f.type==="string_content")?.text;if(!p)continue;let d=a.text==="require_relative"?Ke(e,t,p):null;if(d){let f=pr(p);s.push(m(f,f,d,r))}else s.push(ae(p,d))}return s}function pr(e){return Bn(Go(e).replace(/\.[^.]+$/,""),/_/)}function dr(e,t,n){return R(e,t,r=>ea(e,t,r),()=>D(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,s)=>{let i=r[1]?.trim();return i?ta(e,t,i,s):[]}),n)}function ea(e,t,n){let r=y(n,new Set(["use_declaration"])),s=[];for(let i of n.rootNode.descendantsOfType("use_declaration")){let o=i.namedChild(0);if(o)for(let a of Fe(o,"")){if(!a.importedName||a.importedName==="*")continue;let c=W(e,t,a.qualifiedName)??W(e,t,a.qualifiedName.split("::").slice(0,-1).join("::"));s.push(m(a.importedName,a.localName,c,r))}}return s}function Fe(e,t){switch(e.type){case"identifier":case"super":case"crate":{let n=e.text;return[{qualifiedName:nt(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:nt(t,n),importedName:r,localName:r}]}case"scoped_use_list":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let s=nt(t,n.text),i=[];for(let o of r.namedChildren)i.push(...Fe(o,s));return i}case"use_list":{let n=[];for(let r of e.namedChildren)n.push(...Fe(r,t));return n}case"use_as_clause":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let s=Fe(n,t),i=r.text;return s.map(o=>({...o,localName:i}))}case"use_wildcard":{let n=e.namedChild(0),r=n?n.text:"";return[{qualifiedName:nt(t,`${r}::*`),importedName:"*",localName:"*"}]}default:return[]}}function nt(e,t){return e?t?`${e}::${t}`:e:t}function ta(e,t,n,r){let s=n.trim();if(s.includes("{")&&s.includes("}")){let u=s.slice(0,s.indexOf("{")).replace(/::$/,"").trim(),p=s.slice(s.indexOf("{")+1,s.lastIndexOf("}")).trim();return E(p).flatMap(d=>{let f=d.trim();if(!f)return[];if(f==="self"){let ot=u.split("::").filter(Boolean).pop();return ot?[w(e,t,r,u,ot,ot)]:[]}let[x,le]=f.split(/\s+as\s+/),ue=x?.trim();if(!ue)return[];let Dr=(le??ue.split("::").pop()??ue).trim(),Rr=`${u}::${ue}`.replace(/::::/g,"::");return[w(e,t,r,Rr,ue.split("::").pop()??ue,Dr,W(e,t,u))]})}let[i,o]=s.split(/\s+as\s+/),a=i?.trim()??s,c=(o??a.split("::").pop()??a).trim(),l=W(e,t,a)??W(e,t,a.split("::").slice(0,-1).join("::"));return[w(e,t,r,a,a.split("::").pop()??a,c,l)]}function fr(e,t,n){let r=$(e,t);if(r)return na(e,t,r);let s=[];for(let i of n.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let o=i[1]?.trim();o&&s.push(...sa(e,t,o))}return s}function na(e,t,n){let r=[];for(let s of n.rootNode.descendantsOfType("use_declaration")){if(!ra(s))continue;let i=s.namedChildren.find(o=>o.type!=="visibility_modifier");if(i)for(let o of Fe(i,""))o.importedName&&r.push(Wt(e,t,o.qualifiedName))}return r}function ra(e){for(let t of e.children)if(t.type==="visibility_modifier"&&t.text.startsWith("pub"))return!0;return!1}function sa(e,t,n){let r=n.trim();if(r.includes("{")&&r.includes("}")){let s=r.slice(0,r.indexOf("{")).replace(/::$/,"").trim(),i=r.slice(r.indexOf("{")+1,r.lastIndexOf("}")).trim();return E(i).flatMap(o=>{let a=o.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),l=`${s}::${c?.trim()??a}`.replace(/::::/g,"::");return[Wt(e,t,l)]})}return[Wt(e,t,r)]}function Wt(e,t,n){return{specifier:n,sourcePath:W(e,t,n)??W(e,t,n.split("::").slice(0,-1).join("::"))}}function G({language:e,extensions:t,imports:n,parseImports:r}){return{language:e,extensions:t,capabilities:{imports:n},parseImports:r}}function mr(e,t){let n=t.toLowerCase();for(let r of e)for(let s of r.extensions)if(n.endsWith(s))return r;return null}var ia={language:"javascript",extensions:se,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:Bt,parseReExports:Vt},oa=G({language:"python",extensions:He,imports:"ast-with-regex-fallback",parseImports:lr}),aa=G({language:"jvm",extensions:P,imports:"ast-dispatch-with-regex-fallback",parseImports:ir}),ca={language:"rust",extensions:ze,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:dr,parseExports:fr},la=G({language:"ruby",extensions:qe,imports:"ast-with-regex-fallback",parseImports:ur}),ua=G({language:"c/cpp",extensions:Qe,imports:"ast-with-regex-fallback",parseImports:Gn}),pa=G({language:"dotnet",extensions:Q,imports:"ast-dispatch-with-regex-fallback",parseImports:nr}),da={language:"dart",extensions:Je,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:er,parseExports:tr},fa=G({language:"php",extensions:oe,imports:"ast-with-regex-fallback",parseImports:ar}),ma=G({language:"clojure",extensions:he,imports:"regex-only",parseImports:Zn}),ga=[ia,oa,aa,ca,la,ua,pa,da,fa,ma];function rt(e){return mr(ga,e)}var Ut={clearGroups:["whole-project","source-file"]},ya=N("source-imports",Ut),bp=N("source-exports",Ut),ha=N("source-reexports",Ut),gr=Y({kind:"source-imports",invalidation:Z("source-imports"),serialize:Sa,deserialize:xa}),yr=Y({kind:"source-reexports",invalidation:Z("source-reexports"),serialize:ba,deserialize:Na});function hr(e,t){let n=b(t);return ha.get(e,n,()=>{let r=rt(n);if(!r?.parseReExports)return[];let s=I(e,n);if(!s)return[];let i=z(e,n,s),o=vt(e),a=yr.read(e,n,i);if(a?.resolutionFingerprint===o)return a.reExports;let c=r.parseReExports(e,n,s);return yr.write(e,n,i,{resolutionFingerprint:o,reExports:c}),c})}function Ht(e,t){let n=b(t);return ya.get(e,n,()=>{let r=rt(n);if(!r)return[];let s=I(e,n);return s?Sr(e,n,s,r):[]})}function Np(e,t){let n=b(t),r=rt(n);if(!r)return[];let s;try{s=Re(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(i){if(ve(i))return[];throw i}return Sr(e,n,s,r)}function Sr(e,t,n,r){let s=z(e,t,n),i=vt(e),o=gr.read(e,t,s);if(o?.resolutionFingerprint===i)return o.imports;let a=r.parseImports(e,t,n);return gr.write(e,t,s,{parserVersion:2,resolutionFingerprint:i,imports:a}),a}function Ip(e,t,n){let r=Ht(e,t).filter(s=>s.kind==="named"&&s.isTypeOnly!==!0&&s.localName===n&&s.sourcePath!==null);return r.length===1?r[0]:null}function Sa(e){return JSON.stringify(e)}function xa(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 ba(e){return JSON.stringify(e)}function Na(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}}function Cp(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
+ ${br(t.orderBy)}
25
+ ${Nr(t.limit)}`,...t.params??[])}function Ep(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
+ ${br(t.orderBy)}
45
+ ${Nr(t.limit)}`,...t.params??[])}function br(e){return e?`ORDER BY ${e}`:""}function Nr(e){return typeof e=="number"?`LIMIT ${e}`:""}function Ir(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 _r(e){if(!e)return null;let t=xr(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(xr(r)??r).replace(/\n/g," ")}function xr(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function st(e){return{forFile(t,n){return Cr(e,t,n)},forFiles(t,n){let r=new Map;for(let s of t)r.set(s,Cr(e,s,n));return r}}}function Cr(e,t,n){let r={file:t},s=n.facts||n.identifiers;if(n.text&&(r.text=I(e,t)),n.lines&&(r.lines=pt(e,t)),n.ast&&(r.ast=$(e,t)),n.imports&&(r.imports=Ht(e,t)),n.reexports&&(r.reexports=hr(e,t)),s){let i=xt(e,t),o=i.facts;n.facts&&(r.facts=o),i.unavailable&&(r.sourceFactsUnavailable=i.unavailable),n.identifiers&&o&&(r.identifiers=o.fileIdentifiers,r.identifierLineMap=o.identifierLineMap)}return r}function Ia(e,t={}){if(q(e.symbol)!==null)return t.includeClassMemberFallbacks===!0;let s=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(s)}function zt(e,t,n={}){let r=new Map;for(let i of t)e.length>0&&!Ia(i,{includeClassMemberFallbacks:n.includeClassMemberFallbacks})||r.set(i.id,i);for(let i of e)r.set(i.id,i);let s=[...r.values()];return n.sort?s.sort((i,o)=>i.start_line-o.start_line||i.end_line-o.end_line||i.symbol.localeCompare(o.symbol)):s}var _a=N("file-definitions",{clearGroups:["definition-catalog"]}),Ca=pe("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),Ea=N("file-function-like-definitions",{clearGroups:["definition-catalog"]}),Er=new WeakMap;function Qt(e,t,n={},r){return _e(t),n.includeClassMemberFallbacks?qt(e,t,void 0,{includeClassMemberFallbacks:!0},r):_a.get(e,t,()=>{let s=j(r,"evidence-read",()=>Tr(e,t));if(s)return s;let i=qt(e,t,void 0,n,r);return j(r,"evidence-write",()=>{let o=Ne(e),a=st(e).forFile(t,{text:!0}).text;o&&a&&Lr.write(e,t,z(e,t,a),{projectFingerprint:o,definitions:i.map(c=>({...c}))})}),i})}function ka(e,t){return Ea.get(e,t,()=>{let n=Tr(e,t);return n?n.filter(r=>r.isFunctionLike):qt(e,t,r=>r.isFunctionLike)})}var Lr=Y({kind:"file-definitions",invalidation:Z("file-definitions"),serialize:Pa,deserialize:La});function Tr(e,t){let n=Ne(e);if(!n)return null;let r=st(e).forFile(t,{text:!0}).text;if(!r)return null;let s=Lr.read(e,t,z(e,t,r));return s?Ta(s,n,t):null}function Pa(e){return JSON.stringify(e)}function La(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 Ta(e,t,n){if(e.projectFingerprint!==t)return null;let r=[];for(let s of e.definitions){let i=Fa(s,n);if(!i)return null;r.push(i)}return r}function Fa(e,t){return!fe(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||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||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||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?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 qt(e,t,n,r={},s){let i=j(s,"primary-rows",()=>Da(e,t)),o=j(s,"fallback-rows",()=>Ra(e,t)),a=j(s,"merge-rows",()=>zt(i,o,{sort:!0,includeClassMemberFallbacks:r.includeClassMemberFallbacks}).map(Jt));return n&&(a=a.filter(n)),j(s,"range-correction",()=>Kt(e,t,a,s,r.rangeCorrectionEvidence))}function j(e,t,n){return e?e(t,n):n()}function Da(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 Ra(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 Jt(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:on(e.symbol),parentTypeName:q(e.symbol),isFunctionLike:ut(e.symbol),isTypeLike:we(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function Qp(e,t={}){return va(e,t.scope)}function va(e,t){return Ie(e,{scope:t,includeIgnored:!1}).flatMap(n=>Qt(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function Jp(e,t){return Ie(e,{scope:t,includeIgnored:!1}).flatMap(n=>ka(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function Kp(e,t){let n=Ca.get(e,()=>new WeakMap),r=n.get(t.symbolMatches);r||(r=new Map,n.set(t.symbolMatches,r));let s=JSON.stringify({scope:t.scope??null,sqlPrefilter:t.sqlPrefilter??null}),i=r.get(s);if(i)return[...i];let o=kr(wa(e,t.scope,t.sqlPrefilter)),a=kr(Aa(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=zt(o.get(u)??[],a.get(u)??[],{sort:!0}).filter(d=>t.symbolMatches(d.symbol));p.length!==0&&l.push(...Kt(e,u,p.map(Jt)))}return r.set(s,l),[...l]}function wa(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",s=n?`AND ${Fr("gs",n)}`:"",i=t?[`%${t}%`]:[];return e.all(`SELECT
85
+ gs.id,
86
+ gs.symbol,
87
+ der.document_id,
88
+ der.start_line,
89
+ der.start_char,
90
+ der.end_line,
91
+ der.end_char,
92
+ d.relative_path,
93
+ gs.display_name,
94
+ gs.kind,
95
+ gs.documentation,
96
+ gs.enclosing_symbol
97
+ FROM global_symbols gs
98
+ JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
99
+ JOIN documents d ON der.document_id = d.id
100
+ WHERE 1 = 1
101
+ ${e.pathExclusionsFor("d")}
102
+ ${r}
103
+ ${s}
104
+ ${e.symbolNoiseFor("gs")}
105
+ ORDER BY d.relative_path, der.start_line, der.end_line`,...i)}function Aa(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",s=n?`AND ${Fr("gs",n)}`:"",i=t?[`%${t}%`]:[];return e.all(`SELECT
106
+ gs.id,
107
+ gs.symbol,
108
+ c.document_id,
109
+ MIN(c.start_line) AS start_line,
110
+ 0 AS start_char,
111
+ MAX(c.end_line) AS end_line,
112
+ 0 AS end_char,
113
+ d.relative_path,
114
+ gs.display_name,
115
+ gs.kind,
116
+ gs.documentation,
117
+ gs.enclosing_symbol
118
+ FROM global_symbols gs
119
+ JOIN mentions m ON m.symbol_id = gs.id
120
+ JOIN chunks c ON m.chunk_id = c.id
121
+ JOIN documents d ON c.document_id = d.id
122
+ WHERE m.role = 1
123
+ AND NOT EXISTS (
124
+ SELECT 1
125
+ FROM defn_enclosing_ranges existing_der
126
+ WHERE existing_der.symbol_id = gs.id
127
+ )
128
+ ${e.pathExclusionsFor("d")}
129
+ ${r}
130
+ ${s}
131
+ ${e.symbolNoiseFor("gs")}
132
+ GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
133
+ ORDER BY d.relative_path, start_line, end_line`,...i)}function ja(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function Fr(e,t){return t==="callable"?ja(e):Oa(e)}function Oa(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function kr(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 Xp(e,t,n={}){if(t.length===0)return[];let r=t.flatMap(s=>Qt(e,s)).filter(s=>!e.isIgnored(s.relativePath));return n.onlyDocumented&&(r=r.filter(s=>s.documentation!==null&&s.documentation!=="")),n.sort&&(r=r.sort((s,i)=>s.relativePath.localeCompare(i.relativePath)||s.startLine-i.startLine||s.endLine-i.endLine)),r.map(s=>({startLine:s.startLine,endLine:s.endLine,symbol:s.symbol,shortName:sn(s.symbol),signature:Ir(_r(s.documentation)),relativePath:s.relativePath,enclosingSymbol:s.enclosingSymbol}))}function Ma(e){let t=new Map,n=e.map((r,s)=>({definition:r,index:s,span:r.endLine-r.startLine})).sort((r,s)=>r.span-s.span||r.index-s.index);for(let{definition:r}of n)for(let s=r.startLine;s<=r.endLine;s+=1)t.has(s)||t.set(s,r);return t}function Gp(e,t){let n=Er.get(e);return n||(n=Ma(e),Er.set(e,n)),n.get(t)??null}function Yp(e,t){let n=Qt(e,t.relative_path).find(r=>r.symbolId===t.id)??(q(t.symbol)===null||!ut(t.symbol)?void 0:Kt(e,t.relative_path,[Jt(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 Kt(e,t,n,r,s){let i=j(r,"range-correction.source-text",()=>s?s.source:st(e).forFile(t,{text:!0}).text),o=j(r,"range-correction.callable-sites",()=>s?s.callables:It(e,t));return o?j(r,"range-correction.ast-correction",()=>Ha(n,o,i)):i?j(r,"range-correction.regex-fallback",()=>$a(n,i)):n}function $a(e,t){let n=t.split(/\r?\n/),r=Ba(e,n),s=Va(e,r),i=Wa(s,n);return Ua(e,i)}function Ba(e,t){let n=e.some(s=>it(s.symbol))?Ga(t):null,r=new Map;for(let s of e)r.set(s.symbolId,Xa(t,n,s));return r}function Va(e,t){return e.filter(n=>it(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 Wa(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let s=e[r],i=e[r+1],o=i?Math.max(s.startLine,i.startLine-1):t.length-1;n.set(s.definition.symbolId,{startLine:s.startLine,endLine:Ya(t,s.definition,s.startLine,o)})}return n}function Ua(e,t){return e.map(n=>{let r=t.get(n.symbolId);return r?{...n,startLine:r.startLine,endLine:r.endLine}:n})}function Ha(e,t,n=null){let r=new Map;for(let s of t){let i=r.get(s.name);i?i.push(s):r.set(s.name,[s])}return e.map(s=>{if(!Ka(s)||!s.leaf)return Pr(s,n);let i=r.get(s.leaf);if(!i||i.length===0)return Pr(s,n);let o=n?za(s,i,n):null;if(o)return{...s,startLine:o.startLine,endLine:o.endLine};let a=i[0],c=Math.abs(a.startLine-s.startLine);for(let l=1;l<i.length;l+=1){let u=i[l],p=Math.abs(u.startLine-s.startLine);p<c&&(a=u,c=p)}return{...s,startLine:a.startLine,endLine:a.endLine}})}function za(e,t,n){let r=qa(e.symbol);if(!r)return null;let s=n.split(/\r?\n/),i=new RegExp(`\\b${A(r)}\\b`);for(let o of t){let a=Qa(s,o.startLine);if(a&&i.test(a))return o}return null}function qa(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function Qa(e,t){for(let n=t;n>=0;n-=1){let r=e[n]?.trim()??"";if(r){if(/^impl\b/.test(r))return Ja(e,n,t);if(/^(?:struct|enum|trait|mod)\b/.test(r))return null}}return null}function Ja(e,t,n){let r=[];for(let s=t;s<=n;s+=1){let i=e[s]??"";if(r.push(i),i.includes("{"))break}return r.join(" ")}function Ka(e){return it(e.symbol)?!0:we(e.symbol)==="term"&&q(e.symbol)===null}function Pr(e,t){if(!t||!e.leaf||we(e.symbol)!=="term"||q(e.symbol)!==null)return e;let n=A(e.leaf),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${n}\\b`),i=t.split(/\r?\n/).findIndex(o=>r.test(o));return i>=0?{...e,startLine:i,endLine:i}:e}function Xa(e,t,n){if(!it(n.symbol))return n.startLine;let r=Math.max(0,Math.min(n.startLine,e.length-1));if(!t)return r;let s=t.get(n.leaf);if(!s||s.length===0)return r;let i=null;for(let o of s){let a=Math.abs(o-n.startLine);(!i||a<i.distance)&&(i={line:o,distance:a})}return i?.line??r}function Ga(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*\(/,s=/\b([A-Za-z_$][\w$]*)\s*\(/g,i=new Map,o=(a,c)=>{let l=i.get(a);if(!l){i.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]??"";for(let u of c.matchAll(t))u[1]&&o(u[1],a);for(let u of c.matchAll(n))u[1]&&o(u[1],a);let l=c.match(r);l?.[1]&&o(l[1],a);for(let u of c.matchAll(s))u[1]&&o(u[1],a)}return i}function Ya(e,t,n,r){let s=Math.max(n,Math.min(e.length-1,r)),i=Math.max(n,Math.min(s,t.endLine)),o=0,a=0,c=!1;for(let l=n;l<=s;l+=1){let u=Za(e[l]??"");for(let p of u)p==="{"?(o+=1,c=!0):p==="}"?o=Math.max(0,o-1):p==="("?a+=1:p===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=i)return l}return i}function Za(e){let t="",n=null,r=!1;for(let s=0;s<e.length;s+=1){let i=e[s],o=e[s+1];if(!n&&i==="/"&&o==="/"){t+=" ".repeat(e.length-s);break}if(n){if(r){r=!1,t+=" ";continue}if(i==="\\"){r=!0,t+=" ";continue}i===n&&(n=null),t+=" ";continue}if(i==='"'||i==="'"||i==="`"){n=i,t+=" ";continue}t+=i}return t}function it(e){return e.includes("().")}export{Y as a,mc as b,Z as c,Vn as d,oi as e,J as f,ec as g,I as h,Ar as i,ic as j,pt as k,oc as l,A as m,Qi as n,O as o,M as p,Ws as q,On as r,qs as s,Mn as t,Qs as u,Nt as v,Js as w,$ as x,Ac as y,ne as z,$c as A,ge as B,It as C,Xs as D,Gs as E,qi as F,nt as G,hr as H,Ht as I,Np as J,Ip as K,st as L,Cp as M,Ep as N,Ir as O,_r as P,zt as Q,Qt as R,Qp as S,va as T,Jp as U,Kp as V,Xp as W,Ma as X,Gp as Y,Yp as Z};
134
+ //# sourceMappingURL=chunk-C7IJMOFP.js.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-P3UFF22M.js";import{c as y,d as x}from"./chunk-WOPZX5GM.js";import{z as b}from"./chunk-SIGVQT43.js";import{a as S}from"./chunk-DK6MB565.js";import{L as g,h as m}from"./chunk-XIPGCT3D.js";import{existsSync as E,statSync as V}from"fs";import{join as j}from"path";import{existsSync as O,readdirSync as w}from"fs";import{createHash as D}from"crypto";import{join as f}from"path";function l(t){let r=0,e=0,n=0,o=0,i=0,a=[];for(let s of t)switch(s.state){case"legacy":r+=1;break;case"current":e+=1;break;case"unsupported-older":n+=1,a.push(u(s));break;case"unsupported-future":o+=1,a.push(u(s));break;case"malformed":i+=1,a.push(u(s));break}let c=r+e,d=n+o+i;return{complete:d===0,total:t.length,accepted:c,legacy:r,current:e,unsupportedOlder:n,unsupportedFuture:o,malformed:i,omitted:d,issues:a}}function u(t){if(t.state==="legacy"||t.state==="current")throw new Error(`accepted record ${t.path} cannot become a compatibility issue`);return{path:t.path,state:t.state,reason:t.reason??t.state}}var F=f(".scipquery","suppressions"),C="scip-query-suppression",P=1,p=2;function _(t){return f(t,F)}function v(t){if(t.id&&t.id.trim()!=="")return`${t.id.trim()}.json`;let r=`${t.check??""}\0${t.file??""}`;return`CHECK-${D("sha256").update(r).digest("hex").slice(0,12).toUpperCase()}.json`}function A(t){return v(t).slice(0,-5)}function $(t,r){if(typeof t!="object"||t===null||Array.isArray(t))return{state:"malformed",error:"not a suppression object"};let e=t;if(e.schemaVersion===void 0&&(e.kind!==void 0||e.suppressionIdentity!==void 0||e.writer!==void 0))return{state:"malformed",error:"suppression envelope metadata requires schemaVersion"};if(e.schemaVersion!==void 0){if(!Number.isSafeInteger(e.schemaVersion))return{state:"malformed",error:"schemaVersion must be a positive safe integer"};if(e.schemaVersion!==P&&e.schemaVersion!==p)return{state:e.schemaVersion>p?"unsupported-future":"unsupported-older",error:`unsupported schemaVersion ${String(e.schemaVersion)}`};if(e.kind!==void 0&&e.kind!==C)return{state:"malformed",error:`kind must be ${C}`}}if(e.schemaVersion===P&&e.decision!==void 0)return{state:"malformed",error:"schemaVersion 1 cannot carry automated adjudication metadata"};if(e.schemaVersion===p&&!y(e.decision))return{state:"malformed",error:"schemaVersion 2 requires a valid automated adjudication decision"};if(typeof e.reason!="string"||e.reason.trim()==="")return{state:"malformed",error:"missing reason"};if(!e.id&&!e.check)return{state:"malformed",error:"needs an id or a check"};let n=N(e);if(e.schemaVersion===void 0)return{state:"legacy",suppression:n,record:e,schemaVersion:0};let o=A(n);return e.suppressionIdentity!==o||r!==void 0&&e.suppressionIdentity!==r?{state:"malformed",error:"suppressionIdentity does not match the suppression target or filename"}:!e.writer||e.writer.tool!=="scip-query"||typeof e.writer.version!="string"||e.writer.version.trim()===""?{state:"malformed",error:"missing valid writer metadata"}:typeof e.createdAt!="string"||!Number.isFinite(Date.parse(e.createdAt))?{state:"malformed",error:"missing valid createdAt timestamp"}:e.updatedAt!==void 0&&(typeof e.updatedAt!="string"||!Number.isFinite(Date.parse(e.updatedAt)))?{state:"malformed",error:"invalid updatedAt timestamp"}:{state:e.schemaVersion===p?"current":"legacy",suppression:n,record:e,schemaVersion:e.schemaVersion}}function R(t){let r=_(t);if(!O(r))return{suppressions:[],compatibility:l([]),warnings:[]};let e=[],n=[];for(let i of w(r).sort()){if(!i.endsWith(".json"))continue;let a=f(r,i),c=`${F}/${i}`,d;try{d=JSON.parse(m(a,"suppression record"))}catch{n.push({path:c,state:"malformed",reason:"malformed JSON"});continue}let s=$(d,i.slice(0,-5));if("error"in s){n.push({path:c,state:s.state,reason:s.error});continue}n.push({path:c,state:s.state}),e.push(s.suppression)}let o=l(n);return{suppressions:e,compatibility:o,warnings:o.issues.map(i=>`${i.path}: ${i.reason} \u2014 ignored`)}}function N(t){return{...typeof t.id=="string"?{id:t.id}:{},...typeof t.check=="string"?{check:t.check}:{},...typeof t.file=="string"?{file:t.file}:{},reason:t.reason,...typeof t.expiresAt=="string"?{expiresAt:t.expiresAt}:{},...typeof t.createdAt=="string"?{createdAt:t.createdAt}:{},...t.decision?{decision:t.decision}:{}}}function W(){return process.env.SCIP_QUERY_PROJECT_ROOT??process.cwd()}var I;function G(t=W(),r=void 0){if(r===void 0&&I?.projectRoot===t)return I;let e=x(t),n=g(t,e),o=process.env.SCIP_QUERY_INDEX_DB;if(o)return{projectRoot:t,config:e,paths:n,dbPath:o,dbPathSource:"env",gitContext:r};if(E(n.dbPath))return{projectRoot:t,config:e,paths:n,dbPath:n.dbPath,dbPathSource:"configured",gitContext:r};let i=j(t,"index.db");return{projectRoot:t,config:e,paths:n,dbPath:i,dbPathSource:"root-fallback",rootFallbackWarning:U(i,n.dbPath),gitContext:r}}function oe(t,r={}){let{config:e,paths:n,dbPath:o,dbPathSource:i,rootFallbackWarning:a,gitContext:c}=G(t);if(!E(o))throw new Error("No index.db found. Run: scip-query reindex");r.warnOnRootFallback&&i==="root-fallback"&&a&&console.error(a);let d=R(t).suppressions,s={dbPath:o,indexPath:process.env.SCIP_QUERY_INDEX_SCIP??n.indexPath,projectRoot:t,collaborationDomainId:e.collaborationDomainId,sharedEvidenceDbPath:b(t,e,c),entryRoots:e.entryRoots,semantic:e.semantic,suppressions:[...e.suppressions??[],...d],declaredCouplings:e.declaredCouplings,locality:e.locality,architecture:e.architecture,coverageContracts:e.coverageContracts,docs:e.docs},k=S(t);return new h(s,k)}function U(t,r){let e="unknown time";try{e=V(t).mtime.toISOString()}catch{}return`warning: using legacy project-root index.db (${t}, modified ${e}) because the configured index was not found at ${r}. This fallback may be stale; run 'scip-query reindex' to refresh the configured index.`}export{oe as a};
2
- //# sourceMappingURL=chunk-IM23CSG5.js.map
1
+ import{a as h}from"./chunk-C76O5MDS.js";import{c as y,d as x}from"./chunk-QWKHW6VZ.js";import{D as b}from"./chunk-WN3TCGJ4.js";import{a as S}from"./chunk-NRBNAECH.js";import{M as g,h as m}from"./chunk-AK3PYTIK.js";import{existsSync as E,statSync as V}from"fs";import{join as j}from"path";import{existsSync as O,readdirSync as w}from"fs";import{createHash as D}from"crypto";import{join as f}from"path";function l(t){let r=0,e=0,n=0,o=0,i=0,a=[];for(let s of t)switch(s.state){case"legacy":r+=1;break;case"current":e+=1;break;case"unsupported-older":n+=1,a.push(u(s));break;case"unsupported-future":o+=1,a.push(u(s));break;case"malformed":i+=1,a.push(u(s));break}let c=r+e,d=n+o+i;return{complete:d===0,total:t.length,accepted:c,legacy:r,current:e,unsupportedOlder:n,unsupportedFuture:o,malformed:i,omitted:d,issues:a}}function u(t){if(t.state==="legacy"||t.state==="current")throw new Error(`accepted record ${t.path} cannot become a compatibility issue`);return{path:t.path,state:t.state,reason:t.reason??t.state}}var F=f(".scipquery","suppressions"),C="scip-query-suppression",P=1,p=2;function _(t){return f(t,F)}function v(t){if(t.id&&t.id.trim()!=="")return`${t.id.trim()}.json`;let r=`${t.check??""}\0${t.file??""}`;return`CHECK-${D("sha256").update(r).digest("hex").slice(0,12).toUpperCase()}.json`}function A(t){return v(t).slice(0,-5)}function $(t,r){if(typeof t!="object"||t===null||Array.isArray(t))return{state:"malformed",error:"not a suppression object"};let e=t;if(e.schemaVersion===void 0&&(e.kind!==void 0||e.suppressionIdentity!==void 0||e.writer!==void 0))return{state:"malformed",error:"suppression envelope metadata requires schemaVersion"};if(e.schemaVersion!==void 0){if(!Number.isSafeInteger(e.schemaVersion))return{state:"malformed",error:"schemaVersion must be a positive safe integer"};if(e.schemaVersion!==P&&e.schemaVersion!==p)return{state:e.schemaVersion>p?"unsupported-future":"unsupported-older",error:`unsupported schemaVersion ${String(e.schemaVersion)}`};if(e.kind!==void 0&&e.kind!==C)return{state:"malformed",error:`kind must be ${C}`}}if(e.schemaVersion===P&&e.decision!==void 0)return{state:"malformed",error:"schemaVersion 1 cannot carry automated adjudication metadata"};if(e.schemaVersion===p&&!y(e.decision))return{state:"malformed",error:"schemaVersion 2 requires a valid automated adjudication decision"};if(typeof e.reason!="string"||e.reason.trim()==="")return{state:"malformed",error:"missing reason"};if(!e.id&&!e.check)return{state:"malformed",error:"needs an id or a check"};let n=N(e);if(e.schemaVersion===void 0)return{state:"legacy",suppression:n,record:e,schemaVersion:0};let o=A(n);return e.suppressionIdentity!==o||r!==void 0&&e.suppressionIdentity!==r?{state:"malformed",error:"suppressionIdentity does not match the suppression target or filename"}:!e.writer||e.writer.tool!=="scip-query"||typeof e.writer.version!="string"||e.writer.version.trim()===""?{state:"malformed",error:"missing valid writer metadata"}:typeof e.createdAt!="string"||!Number.isFinite(Date.parse(e.createdAt))?{state:"malformed",error:"missing valid createdAt timestamp"}:e.updatedAt!==void 0&&(typeof e.updatedAt!="string"||!Number.isFinite(Date.parse(e.updatedAt)))?{state:"malformed",error:"invalid updatedAt timestamp"}:{state:e.schemaVersion===p?"current":"legacy",suppression:n,record:e,schemaVersion:e.schemaVersion}}function R(t){let r=_(t);if(!O(r))return{suppressions:[],compatibility:l([]),warnings:[]};let e=[],n=[];for(let i of w(r).sort()){if(!i.endsWith(".json"))continue;let a=f(r,i),c=`${F}/${i}`,d;try{d=JSON.parse(m(a,"suppression record"))}catch{n.push({path:c,state:"malformed",reason:"malformed JSON"});continue}let s=$(d,i.slice(0,-5));if("error"in s){n.push({path:c,state:s.state,reason:s.error});continue}n.push({path:c,state:s.state}),e.push(s.suppression)}let o=l(n);return{suppressions:e,compatibility:o,warnings:o.issues.map(i=>`${i.path}: ${i.reason} \u2014 ignored`)}}function N(t){return{...typeof t.id=="string"?{id:t.id}:{},...typeof t.check=="string"?{check:t.check}:{},...typeof t.file=="string"?{file:t.file}:{},reason:t.reason,...typeof t.expiresAt=="string"?{expiresAt:t.expiresAt}:{},...typeof t.createdAt=="string"?{createdAt:t.createdAt}:{},...t.decision?{decision:t.decision}:{}}}function W(){return process.env.SCIP_QUERY_PROJECT_ROOT??process.cwd()}var I;function G(t=W(),r=void 0){if(r===void 0&&I?.projectRoot===t)return I;let e=x(t),n=g(t,e),o=process.env.SCIP_QUERY_INDEX_DB;if(o)return{projectRoot:t,config:e,paths:n,dbPath:o,dbPathSource:"env",gitContext:r};if(E(n.dbPath))return{projectRoot:t,config:e,paths:n,dbPath:n.dbPath,dbPathSource:"configured",gitContext:r};let i=j(t,"index.db");return{projectRoot:t,config:e,paths:n,dbPath:i,dbPathSource:"root-fallback",rootFallbackWarning:U(i,n.dbPath),gitContext:r}}function oe(t,r={}){let{config:e,paths:n,dbPath:o,dbPathSource:i,rootFallbackWarning:a,gitContext:c}=G(t);if(!E(o))throw new Error("No index.db found. Run: scip-query reindex");r.warnOnRootFallback&&i==="root-fallback"&&a&&console.error(a);let d=R(t).suppressions,s={dbPath:o,indexPath:process.env.SCIP_QUERY_INDEX_SCIP??n.indexPath,projectRoot:t,collaborationDomainId:e.collaborationDomainId,sharedEvidenceDbPath:b(t,e,c),entryRoots:e.entryRoots,semantic:e.semantic,suppressions:[...e.suppressions??[],...d],declaredCouplings:e.declaredCouplings,locality:e.locality,architecture:e.architecture,coverageContracts:e.coverageContracts,docs:e.docs},k=S(t);return new h(s,k)}function U(t,r){let e="unknown time";try{e=V(t).mtime.toISOString()}catch{}return`warning: using legacy project-root index.db (${t}, modified ${e}) because the configured index was not found at ${r}. This fallback may be stale; run 'scip-query reindex' to refresh the configured index.`}export{oe as a};
2
+ //# sourceMappingURL=chunk-CBBHFNLX.js.map
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{$b as s,Bb as E,Ib as I,Sb as x,Ub as V,dc as k,eb as S,ec as A,mc as b}from"./chunk-Z67JOKRE.js";import{Y as v,za as h}from"./chunk-VRJG7N3I.js";var fe={defaultRole:"repository-observation"};function Ce(e,n=[]){return{defaultRole:e,...n.length>0?{rules:n}:{}}}function N(e,n){for(let t of e.rules??[]){if(t.when.kind==="option-present"){let r=n.options[t.when.name];if(r!==void 0&&r!==!1)return t.role;continue}if((t.when.kind==="argument"?n.args[t.when.index]:n.options[t.when.name])===t.when.equals)return t.role}return e.defaultRole}function ge(e){return[...new Set([e.defaultRole,...(e.rules??[]).map(n=>n.role)])]}function _(e){return e==="repository-observation"||e==="repository-preview"||e==="composite"}import{AsyncLocalStorage as ne}from"async_hooks";var W=1,G=1;var Y={policyId:"scip-query:unresolved-repository-policy",policyVersion:G,permission:"not-established",reasons:["No repository action policy was supplied for this claim."]};function L(e){return{schemaVersion:W,origin:e.contract.origin,coverage:X(e.coverage),producerValidation:e.contract.producerValidation,stateAuthority:S(e.receipt,e.receipt),repositoryPolicy:e.repositoryPolicy??Y,...e.contract.families?{families:e.contract.families}:{}}}function X(e){return e?e.complete===!0?{state:"complete",returned:e.returned,totalKnown:!0,total:e.total??e.returned,omitted:0}:e.totalKnown?{state:"partial",returned:e.returned,totalKnown:!0,...e.total===void 0?{}:{total:e.total},...e.omitted===void 0?{}:{omitted:e.omitted}}:{state:"unknown",returned:e.returned,totalKnown:!1}:{state:"unknown",returned:0,totalKnown:!1}}var z="scip-query-result";var Z=1,ee=1,M=1,P=1;function J(e){let n=e.resultSchemaVersion??ee;if(!h(n))throw new Error("CLI result schema version must be a positive safe integer.");let{producerVersion:t,...o}=e;return{kind:z,schemaVersion:Z,producer:{name:"scip-query",version:t},resultSchemaVersion:n,...o}}function T(e,n){return JSON.stringify(e,null,n?0:2)}var D=Symbol("option-value-source"),B=new Map,H=new Map,j=new Map,q=new ne;function _e(e,n){return q.run(e,n)}function Le(e){B=new Map(e)}function Me(e){H=new Map(e)}function Pe(e){j=new Map(e)}function f(e){return(...n)=>{let{args:t,opts:o}=K(n);I(r=>{b(r.generation.identity),e({db:r,args:t,opts:o})})}}function y(e,n){return f(t=>{let o=A(t.db,e,d(t.opts,"full"),{quiet:d(t.opts,"json")});n({...t,budget:o})})}function Je(e){return f(n=>c(n,e,{kind:"list"}))}function Te(e){return f(n=>c(n,e,{kind:"table",headers:e.headers,dashWidths:e.dashWidths}))}function De(e){return f(n=>c(n,e,{kind:"grouped",key:e.key}))}function te(e){return f(n=>R(n,e))}function Be(e){return te({commandName:e.commandName,query:e.query,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(n,t)=>s.sectionedReport(e.sections(n,t)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}function He(e,n,t){return(...o)=>{let{args:r,opts:i}=K(o),a=n({args:r,opts:i});if(!a)return t(...o);b(a.generationIdentity);let u={args:r,opts:i,observationReceipt:a.observationReceipt};R(u,{commandName:e.commandName,query:()=>a.result,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(l,m)=>s.sectionedReport(e.sections(l,m)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}}function oe(e,n){return y(e,t=>R(t,{...n,commandName:n.commandName??e}))}function je(e,n){return oe(e,{commandName:n.commandName??e,query:n.query,emptyMessage:n.emptyMessage,heuristicLabel:n.heuristicLabel,before:n.before,render:(t,o)=>s.sectionedReport(n.sections(t,o)),toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,after:n.after})}function qe(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"list"}))}function Qe(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"table",headers:n.headers,dashWidths:n.dashWidths}))}function Ke(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"grouped",key:n.key}))}function Ue(e,n){return String(e[n])}function Fe(e,n){let t=e[n];return typeof t=="string"?[t]:Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function $e(e,n){let t=e[n];return typeof t=="string"?t:void 0}function We(e,n){let t=e[n];return typeof t=="string"?t:void 0}function Q(e,n){let t=e[n];return typeof t=="number"?t:void 0}function d(e,n){return!!e[n]}function Ge(e,n){let t=e[n];return Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function Ye(e,n,t){return Q(e,n)??t}function Xe(e,n,t){let o=Q(e,n),r=o!==void 0&&re(e,n)!=="default";if(d(e,"full")){if(r)throw new Error("--full cannot be combined with --limit. Use --full for all findings, or --limit N for a capped report.");return Number.MAX_SAFE_INTEGER}return o??t}function re(e,n){return e[D]?.(n)}function c(e,n,t){R(e,{commandName:n.commandName,query:n.query,emptyMessage:(o,r)=>o.length===0&&n.emptyMessage?n.emptyMessage(r):void 0,heuristicLabel:n.heuristicLabel,render:(o,r)=>{t.kind==="list"?s.list(o,i=>n.format(i,r)):t.kind==="table"?s.table(t.headers,o.map(i=>n.format(i,r)),t.dashWidths):s.groupedByFile(o,i=>n.format(i,r),t.key?i=>t.key(i,r):void 0)},toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,before:n.before,after:n.after})}function R(e,n){let t=n.query(e);if(d(e.opts,"json")){if(!n.commandName)throw new Error("JSON output requires a command name so its result contract can be identified.");ae(n.commandName,e.args,e.opts,n.toJson?n.toJson(t,e):t,{analysisBudget:ie(e),coverage:n.coverage?.(t,e),agentResult:n.agentResult?.(t,e),observationReceipt:e.observationReceipt});return}let o=n.emptyMessage?.(t,e);if(o){s.empty(o);return}n.heuristicLabel&&k(n.heuristicLabel),n.before?.(t,e),n.render(t,e),n.after?.(t,e)}function ie(e){return e.budget?.analysisBudget}function ae(e,n,t,o,r={}){let i=B.get(e),a=H.get(e),u=j.get(e),l=a?N(a.operation,{args:n,options:t}):void 0,m=q.getStore();if(m!==void 0&&l!==void 0&&m!==l)throw new Error(`Command ${e} changed operation role during execution: selected ${m}, rendered ${l}.`);let O=m??l,w=me(o),C=r.coverage??ue(a,o,r.analysisBudget),p=C&&w&&!C.resolution?{...C,resolution:w}:C;p&&de(p);let g=d(t,"agentOutput"),U=g&&r.agentResult!==void 0?r.agentResult:o;if(d(t,"resultOnly")){let $=g&&r.agentResult!==void 0?r.agentResult:Object.hasOwn(r,"resultOnly")?r.resultOnly:o;x(JSON.stringify($,null,d(t,"compact")?0:2));return}let F=J({producerVersion:v,command:e,...O?{operationRole:O}:{},...i?{evidence:i}:{},...r.analysisBudget?{analysisBudget:r.analysisBudget}:{},args:ce(n),options:t,result:U,...g?{resultProjection:"agent"}:{},...p?{coverage:p}:{},...r.agentResult!==void 0&&!g?{agentResult:r.agentResult}:{},...se(O,i,r.analysisBudget,p,u,r.observationReceipt),...r.resultSchemaVersion===void 0?{}:{resultSchemaVersion:r.resultSchemaVersion}});x(T(F,d(t,"compact")))}function se(e,n,t,o,r,i){if(!e||!_(e))return{};let a=E(),u=i??(a?V({projectRoot:a.config.projectRoot,db:a,...r?{observedSourceKinds:r.observedSources}:{}}):void 0);return u?{evidenceContext:{schemaVersion:M,operationRole:e,receipt:u,analysisManifest:{schemaVersion:P,...n?{evidence:n}:{},...t?{analysisBudget:t}:{},...o?{coverage:o}:{},...r?{claimQualification:L({contract:r,receipt:u,...o?{coverage:o}:{}})}:{}}}}:{}}function de(e){if(!Number.isSafeInteger(e.returned)||e.returned<0)throw new Error("Invocation coverage returned count must be a non-negative safe integer.");if(e.complete!==!0&&e.complete!==!1&&e.complete!==null)throw new Error("Invocation coverage complete must be true, false, or null.");if(e.complete===!0){if(!e.totalKnown)throw new Error("Complete invocation coverage must know its total.");if(!Number.isSafeInteger(e.total)||e.total!==e.returned)throw new Error("Complete invocation coverage total must equal returned.");if(e.omitted!==0)throw new Error("Complete invocation coverage cannot omit results.");if(e.omittedIdentities!==void 0)throw new Error("Complete invocation coverage cannot name omitted identities.");if(e.continuation!==void 0)throw new Error("Complete invocation coverage cannot provide a continuation.")}else if(e.totalKnown){if(e.complete!==!1)throw new Error("Known incomplete invocation coverage must set complete to false.");if(!Number.isSafeInteger(e.total)||e.total<e.returned)throw new Error("Known invocation coverage total must be a safe integer at least as large as returned.");let n=e.total-e.returned;if(e.omitted!==n)throw new Error("Known invocation coverage omitted count must equal total minus returned.");if(n===0)throw new Error("Known incomplete invocation coverage must omit at least one result.");if(e.omittedIdentities&&e.omittedIdentities.length!==n)throw new Error("Omitted identity count must equal the disclosed omitted count.")}else{if(e.total!==void 0||e.omitted!==void 0)throw new Error("Unknown invocation coverage cannot claim a total or omitted count.");if(e.omittedIdentities!==void 0)throw new Error("Unknown invocation coverage cannot claim omitted identities.")}if(e.continuation&&(e.continuation.cursor.length===0||e.continuation.indexGeneration.length===0))throw new Error("Invocation coverage continuation requires a cursor and index generation.");if(e.resolution){if(!Number.isSafeInteger(e.resolution.totalCandidates)||e.resolution.totalCandidates<0)throw new Error("Invocation resolution candidate count must be a non-negative safe integer.");if(e.resolution.state==="exact"&&e.resolution.totalCandidates!==1)throw new Error("Exact invocation resolution must name exactly one candidate.");if(e.resolution.state==="missing"&&e.resolution.totalCandidates!==0)throw new Error("Missing invocation resolution cannot name candidates.");if(e.resolution.state==="ambiguous"&&e.resolution.totalCandidates<2)throw new Error("Ambiguous invocation resolution must name at least two candidates.")}}function ue(e,n,t){if(!e)return;let o=le(e,n);return e.coverage==="complete"?{complete:!0,totalKnown:!0,returned:o,total:o,omitted:0}:e.coverage==="sampled"?{complete:!1,totalKnown:!1,returned:o}:e.coverage==="bounded"&&t?{complete:!1,totalKnown:!1,returned:o}:{complete:null,totalKnown:!1,returned:o}}function le(e,n){let t=e.resultUnits??{kind:"report"};if(t.kind==="rows")return Array.isArray(n)?n.length:0;if(t.kind==="field"){if(!n||typeof n!="object")return 0;let o=n[t.field];return Array.isArray(o)?o.length:o==null?0:1}return n==null?0:1}function me(e){if(!e||typeof e!="object"||Array.isArray(e))return;let n=e;if(n.matched===!1)return{state:"missing",totalCandidates:0};if(n.matched!==!0||!Number.isSafeInteger(n.totalMatches))return;let t=n.totalMatches;return t<=0?{state:"missing",totalCandidates:0}:t===1?{state:"exact",totalCandidates:t}:{state:"ambiguous",totalCandidates:t}}function ce(e){return e.filter(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean")}function K(e){if(e.length===0)return{args:[],opts:{}};let n=e[e.length-1];return{args:e.slice(0,-1),opts:pe(n)}}function pe(e){if(!e||typeof e!="object")return{};let n=e,t=typeof n.optsWithGlobals=="function"?n.optsWithGlobals.bind(n):typeof n.opts=="function"?n.opts.bind(n):null;if(t){let o=t();return!o||typeof o!="object"?{}:(typeof n.getOptionValueSource=="function"&&Object.defineProperty(o,D,{value:r=>n.getOptionValueSource(r),enumerable:!1}),o)}return e}export{fe as a,Ce as b,N as c,ge as d,_e as e,Le as f,Me as g,Pe as h,f as i,y as j,Je as k,Te as l,De as m,te as n,Be as o,He as p,oe as q,je as r,qe as s,Qe as t,Ke as u,Ue as v,Fe as w,$e as x,We as y,Q as z,d as A,Ge as B,Ye as C,Xe as D,re as E,ae as F,K as G,pe as H};
3
- //# sourceMappingURL=chunk-IZKJQQCQ.js.map
2
+ import{$b as s,Bb as E,Ib as I,Sb as x,Ub as V,dc as k,eb as S,ec as A,mc as b}from"./chunk-V4NG5OMS.js";import{Ba as h,_ as v}from"./chunk-2BTJALUS.js";var fe={defaultRole:"repository-observation"};function Ce(e,n=[]){return{defaultRole:e,...n.length>0?{rules:n}:{}}}function N(e,n){for(let t of e.rules??[]){if(t.when.kind==="option-present"){let r=n.options[t.when.name];if(r!==void 0&&r!==!1)return t.role;continue}if((t.when.kind==="argument"?n.args[t.when.index]:n.options[t.when.name])===t.when.equals)return t.role}return e.defaultRole}function ge(e){return[...new Set([e.defaultRole,...(e.rules??[]).map(n=>n.role)])]}function _(e){return e==="repository-observation"||e==="repository-preview"||e==="composite"}import{AsyncLocalStorage as ne}from"async_hooks";var W=1,G=1;var Y={policyId:"scip-query:unresolved-repository-policy",policyVersion:G,permission:"not-established",reasons:["No repository action policy was supplied for this claim."]};function L(e){return{schemaVersion:W,origin:e.contract.origin,coverage:X(e.coverage),producerValidation:e.contract.producerValidation,stateAuthority:S(e.receipt,e.receipt),repositoryPolicy:e.repositoryPolicy??Y,...e.contract.families?{families:e.contract.families}:{}}}function X(e){return e?e.complete===!0?{state:"complete",returned:e.returned,totalKnown:!0,total:e.total??e.returned,omitted:0}:e.totalKnown?{state:"partial",returned:e.returned,totalKnown:!0,...e.total===void 0?{}:{total:e.total},...e.omitted===void 0?{}:{omitted:e.omitted}}:{state:"unknown",returned:e.returned,totalKnown:!1}:{state:"unknown",returned:0,totalKnown:!1}}var z="scip-query-result";var Z=1,ee=1,M=1,P=1;function J(e){let n=e.resultSchemaVersion??ee;if(!h(n))throw new Error("CLI result schema version must be a positive safe integer.");let{producerVersion:t,...o}=e;return{kind:z,schemaVersion:Z,producer:{name:"scip-query",version:t},resultSchemaVersion:n,...o}}function T(e,n){return JSON.stringify(e,null,n?0:2)}var D=Symbol("option-value-source"),B=new Map,H=new Map,j=new Map,q=new ne;function _e(e,n){return q.run(e,n)}function Le(e){B=new Map(e)}function Me(e){H=new Map(e)}function Pe(e){j=new Map(e)}function f(e){return(...n)=>{let{args:t,opts:o}=K(n);I(r=>{b(r.generation.identity),e({db:r,args:t,opts:o})})}}function y(e,n){return f(t=>{let o=A(t.db,e,d(t.opts,"full"),{quiet:d(t.opts,"json")});n({...t,budget:o})})}function Je(e){return f(n=>c(n,e,{kind:"list"}))}function Te(e){return f(n=>c(n,e,{kind:"table",headers:e.headers,dashWidths:e.dashWidths}))}function De(e){return f(n=>c(n,e,{kind:"grouped",key:e.key}))}function te(e){return f(n=>R(n,e))}function Be(e){return te({commandName:e.commandName,query:e.query,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(n,t)=>s.sectionedReport(e.sections(n,t)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}function He(e,n,t){return(...o)=>{let{args:r,opts:i}=K(o),a=n({args:r,opts:i});if(!a)return t(...o);b(a.generationIdentity);let u={args:r,opts:i,observationReceipt:a.observationReceipt};R(u,{commandName:e.commandName,query:()=>a.result,emptyMessage:e.emptyMessage,heuristicLabel:e.heuristicLabel,before:e.before,render:(l,m)=>s.sectionedReport(e.sections(l,m)),toJson:e.toJson,coverage:e.coverage,agentResult:e.agentResult,after:e.after})}}function oe(e,n){return y(e,t=>R(t,{...n,commandName:n.commandName??e}))}function je(e,n){return oe(e,{commandName:n.commandName??e,query:n.query,emptyMessage:n.emptyMessage,heuristicLabel:n.heuristicLabel,before:n.before,render:(t,o)=>s.sectionedReport(n.sections(t,o)),toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,after:n.after})}function qe(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"list"}))}function Qe(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"table",headers:n.headers,dashWidths:n.dashWidths}))}function Ke(e,n){return y(e,t=>c(t,{...n,commandName:e},{kind:"grouped",key:n.key}))}function Ue(e,n){return String(e[n])}function Fe(e,n){let t=e[n];return typeof t=="string"?[t]:Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function $e(e,n){let t=e[n];return typeof t=="string"?t:void 0}function We(e,n){let t=e[n];return typeof t=="string"?t:void 0}function Q(e,n){let t=e[n];return typeof t=="number"?t:void 0}function d(e,n){return!!e[n]}function Ge(e,n){let t=e[n];return Array.isArray(t)&&t.every(o=>typeof o=="string")?t:[]}function Ye(e,n,t){return Q(e,n)??t}function Xe(e,n,t){let o=Q(e,n),r=o!==void 0&&re(e,n)!=="default";if(d(e,"full")){if(r)throw new Error("--full cannot be combined with --limit. Use --full for all findings, or --limit N for a capped report.");return Number.MAX_SAFE_INTEGER}return o??t}function re(e,n){return e[D]?.(n)}function c(e,n,t){R(e,{commandName:n.commandName,query:n.query,emptyMessage:(o,r)=>o.length===0&&n.emptyMessage?n.emptyMessage(r):void 0,heuristicLabel:n.heuristicLabel,render:(o,r)=>{t.kind==="list"?s.list(o,i=>n.format(i,r)):t.kind==="table"?s.table(t.headers,o.map(i=>n.format(i,r)),t.dashWidths):s.groupedByFile(o,i=>n.format(i,r),t.key?i=>t.key(i,r):void 0)},toJson:n.toJson,coverage:n.coverage,agentResult:n.agentResult,before:n.before,after:n.after})}function R(e,n){let t=n.query(e);if(d(e.opts,"json")){if(!n.commandName)throw new Error("JSON output requires a command name so its result contract can be identified.");ae(n.commandName,e.args,e.opts,n.toJson?n.toJson(t,e):t,{analysisBudget:ie(e),coverage:n.coverage?.(t,e),agentResult:n.agentResult?.(t,e),observationReceipt:e.observationReceipt});return}let o=n.emptyMessage?.(t,e);if(o){s.empty(o);return}n.heuristicLabel&&k(n.heuristicLabel),n.before?.(t,e),n.render(t,e),n.after?.(t,e)}function ie(e){return e.budget?.analysisBudget}function ae(e,n,t,o,r={}){let i=B.get(e),a=H.get(e),u=j.get(e),l=a?N(a.operation,{args:n,options:t}):void 0,m=q.getStore();if(m!==void 0&&l!==void 0&&m!==l)throw new Error(`Command ${e} changed operation role during execution: selected ${m}, rendered ${l}.`);let O=m??l,w=me(o),C=r.coverage??ue(a,o,r.analysisBudget),p=C&&w&&!C.resolution?{...C,resolution:w}:C;p&&de(p);let g=d(t,"agentOutput"),U=g&&r.agentResult!==void 0?r.agentResult:o;if(d(t,"resultOnly")){let $=g&&r.agentResult!==void 0?r.agentResult:Object.hasOwn(r,"resultOnly")?r.resultOnly:o;x(JSON.stringify($,null,d(t,"compact")?0:2));return}let F=J({producerVersion:v,command:e,...O?{operationRole:O}:{},...i?{evidence:i}:{},...r.analysisBudget?{analysisBudget:r.analysisBudget}:{},args:ce(n),options:t,result:U,...g?{resultProjection:"agent"}:{},...p?{coverage:p}:{},...r.agentResult!==void 0&&!g?{agentResult:r.agentResult}:{},...se(O,i,r.analysisBudget,p,u,r.observationReceipt),...r.resultSchemaVersion===void 0?{}:{resultSchemaVersion:r.resultSchemaVersion}});x(T(F,d(t,"compact")))}function se(e,n,t,o,r,i){if(!e||!_(e))return{};let a=E(),u=i??(a?V({projectRoot:a.config.projectRoot,db:a,...r?{observedSourceKinds:r.observedSources}:{}}):void 0);return u?{evidenceContext:{schemaVersion:M,operationRole:e,receipt:u,analysisManifest:{schemaVersion:P,...n?{evidence:n}:{},...t?{analysisBudget:t}:{},...o?{coverage:o}:{},...r?{claimQualification:L({contract:r,receipt:u,...o?{coverage:o}:{}})}:{}}}}:{}}function de(e){if(!Number.isSafeInteger(e.returned)||e.returned<0)throw new Error("Invocation coverage returned count must be a non-negative safe integer.");if(e.complete!==!0&&e.complete!==!1&&e.complete!==null)throw new Error("Invocation coverage complete must be true, false, or null.");if(e.complete===!0){if(!e.totalKnown)throw new Error("Complete invocation coverage must know its total.");if(!Number.isSafeInteger(e.total)||e.total!==e.returned)throw new Error("Complete invocation coverage total must equal returned.");if(e.omitted!==0)throw new Error("Complete invocation coverage cannot omit results.");if(e.omittedIdentities!==void 0)throw new Error("Complete invocation coverage cannot name omitted identities.");if(e.continuation!==void 0)throw new Error("Complete invocation coverage cannot provide a continuation.")}else if(e.totalKnown){if(e.complete!==!1)throw new Error("Known incomplete invocation coverage must set complete to false.");if(!Number.isSafeInteger(e.total)||e.total<e.returned)throw new Error("Known invocation coverage total must be a safe integer at least as large as returned.");let n=e.total-e.returned;if(e.omitted!==n)throw new Error("Known invocation coverage omitted count must equal total minus returned.");if(n===0)throw new Error("Known incomplete invocation coverage must omit at least one result.");if(e.omittedIdentities&&e.omittedIdentities.length!==n)throw new Error("Omitted identity count must equal the disclosed omitted count.")}else{if(e.total!==void 0||e.omitted!==void 0)throw new Error("Unknown invocation coverage cannot claim a total or omitted count.");if(e.omittedIdentities!==void 0)throw new Error("Unknown invocation coverage cannot claim omitted identities.")}if(e.continuation&&(e.continuation.cursor.length===0||e.continuation.indexGeneration.length===0))throw new Error("Invocation coverage continuation requires a cursor and index generation.");if(e.resolution){if(!Number.isSafeInteger(e.resolution.totalCandidates)||e.resolution.totalCandidates<0)throw new Error("Invocation resolution candidate count must be a non-negative safe integer.");if(e.resolution.state==="exact"&&e.resolution.totalCandidates!==1)throw new Error("Exact invocation resolution must name exactly one candidate.");if(e.resolution.state==="missing"&&e.resolution.totalCandidates!==0)throw new Error("Missing invocation resolution cannot name candidates.");if(e.resolution.state==="ambiguous"&&e.resolution.totalCandidates<2)throw new Error("Ambiguous invocation resolution must name at least two candidates.")}}function ue(e,n,t){if(!e)return;let o=le(e,n);return e.coverage==="complete"?{complete:!0,totalKnown:!0,returned:o,total:o,omitted:0}:e.coverage==="sampled"?{complete:!1,totalKnown:!1,returned:o}:e.coverage==="bounded"&&t?{complete:!1,totalKnown:!1,returned:o}:{complete:null,totalKnown:!1,returned:o}}function le(e,n){let t=e.resultUnits??{kind:"report"};if(t.kind==="rows")return Array.isArray(n)?n.length:0;if(t.kind==="field"){if(!n||typeof n!="object")return 0;let o=n[t.field];return Array.isArray(o)?o.length:o==null?0:1}return n==null?0:1}function me(e){if(!e||typeof e!="object"||Array.isArray(e))return;let n=e;if(n.matched===!1)return{state:"missing",totalCandidates:0};if(n.matched!==!0||!Number.isSafeInteger(n.totalMatches))return;let t=n.totalMatches;return t<=0?{state:"missing",totalCandidates:0}:t===1?{state:"exact",totalCandidates:t}:{state:"ambiguous",totalCandidates:t}}function ce(e){return e.filter(n=>typeof n=="string"||typeof n=="number"||typeof n=="boolean")}function K(e){if(e.length===0)return{args:[],opts:{}};let n=e[e.length-1];return{args:e.slice(0,-1),opts:pe(n)}}function pe(e){if(!e||typeof e!="object")return{};let n=e,t=typeof n.optsWithGlobals=="function"?n.optsWithGlobals.bind(n):typeof n.opts=="function"?n.opts.bind(n):null;if(t){let o=t();return!o||typeof o!="object"?{}:(typeof n.getOptionValueSource=="function"&&Object.defineProperty(o,D,{value:r=>n.getOptionValueSource(r),enumerable:!1}),o)}return e}export{fe as a,Ce as b,N as c,ge as d,_e as e,Le as f,Me as g,Pe as h,f as i,y as j,Je as k,Te as l,De as m,te as n,Be as o,He as p,oe as q,je as r,qe as s,Qe as t,Ke as u,Ue as v,Fe as w,$e as x,We as y,Q as z,d as A,Ge as B,Ye as C,Xe as D,re as E,ae as F,K as G,pe as H};
3
+ //# sourceMappingURL=chunk-CKRWA452.js.map
@@ -1,4 +1,4 @@
1
- import{b as l,e as m}from"./chunk-T2PBOVDI.js";import{c as r}from"./chunk-DRENNWRG.js";function d(s,e){let t=l(s,e);return t.match?{matched:!0,resolved:{symbol:t.match.symbol,shortName:r(t.match.symbol),relativePath:t.match.relativePath},otherMatches:t.candidates.map(n=>({shortName:n.shortName,relativePath:n.relativePath,startLine:n.startLine})),totalMatches:t.total}:{matched:!1,suggestions:m(s,e,5)}}function g(s){let e=s.entries[0];return s.requested===1&&e?.status==="matched"&&e.kind==="source"&&(!e.rangeCoverage||e.rangeCoverage.referencedDefinitions===0)&&e.results.length===1?e.results[0]:null}function u(s,e,t){if(!t)return d(s,e);let n={file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:o(t.startLine),endLine:o(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
1
+ import{b as l,e as m}from"./chunk-EELPBR7E.js";import{c as r}from"./chunk-DRENNWRG.js";function d(s,e){let t=l(s,e);return t.match?{matched:!0,resolved:{symbol:t.match.symbol,shortName:r(t.match.symbol),relativePath:t.match.relativePath},otherMatches:t.candidates.map(n=>({shortName:n.shortName,relativePath:n.relativePath,startLine:n.startLine})),totalMatches:t.total}:{matched:!1,suggestions:m(s,e,5)}}function g(s){let e=s.entries[0];return s.requested===1&&e?.status==="matched"&&e.kind==="source"&&(!e.rangeCoverage||e.rangeCoverage.referencedDefinitions===0)&&e.results.length===1?e.results[0]:null}function u(s,e,t){if(!t)return d(s,e);let n={file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:o(t.startLine),endLine:o(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
2
2
  `).map((h,c)=>({line:o(t.startLine+c),text:h}))},a=d(s,e),i=a.totalMatches??0;return!a.matched||!a.resolved||i<=1?n:{...n,resolution:{selected:a.resolved,alternatives:a.otherMatches??[],totalMatches:i}}}function f(s){return{requested:s.requested,matched:s.matched,ambiguous:s.ambiguous,missing:s.missing,entries:s.entries.map(e=>({selector:e.selector,status:e.status,kind:e.kind,totalCandidates:e.totalCandidates,sources:e.results.map(t=>({file:t.relativePath,symbol:t.shortName,language:t.language??"unknown",range:{startLine:o(t.startLine),endLine:o(t.endLine)},...t.freshness?{freshness:t.freshness}:{},lines:t.source.split(`
3
3
  `).map((n,a)=>({line:o(t.startLine+a),text:n}))})),definitions:e.definitions,...e.fileCoverage?{fileCoverage:e.fileCoverage}:{},...e.rangeCoverage?{rangeCoverage:e.rangeCoverage}:{},candidates:e.candidates,omittedCandidates:e.omittedCandidates,suggestions:e.suggestions,...e.reason?{reason:e.reason}:{}})),literalValues:s.bindingClosure.inline}}function v(s,e,t){let n=g(t);return n?u(s,e[0],n):f(t)}function o(s){return s+1}export{d as a,g as b,u as c,f as d,v as e};
4
- //# sourceMappingURL=chunk-YLNCTPOI.js.map
4
+ //# sourceMappingURL=chunk-CLG6DWVS.js.map