scip-query 0.16.1 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +59 -9
  3. package/dist/augment-vue-worker.js +1 -1
  4. package/dist/{chunk-WN6XEYVX.js → chunk-27YDE22N.js} +2 -2
  5. package/dist/{chunk-VLSI5MYU.js → chunk-2DBY4MO7.js} +2 -2
  6. package/dist/{chunk-A46JTKTM.js → chunk-2DUWNJKE.js} +2 -2
  7. package/dist/{chunk-YSUD2S7T.js → chunk-2HCWAL42.js} +2 -2
  8. package/dist/{chunk-S5MTSES5.js → chunk-2TM23JYJ.js} +2 -2
  9. package/dist/{chunk-6EVORGCB.js → chunk-35DURZXI.js} +2 -2
  10. package/dist/{chunk-3LAKH6BV.js → chunk-3CJXFMR5.js} +2 -2
  11. package/dist/{chunk-UO4IADXJ.js → chunk-3YEBIYXL.js} +2 -2
  12. package/dist/{chunk-3YAZH3JU.js → chunk-45QWQSWS.js} +2 -2
  13. package/dist/{chunk-5XDNFOAH.js → chunk-4FLF7BHJ.js} +2 -2
  14. package/dist/{chunk-JRFCWCOD.js → chunk-4L4X66GE.js} +2 -2
  15. package/dist/{chunk-NLRWGGPY.js → chunk-5CJ6AQN7.js} +2 -2
  16. package/dist/{chunk-CM4EZLW4.js → chunk-5GAUXLOE.js} +2 -2
  17. package/dist/{chunk-QB7NRST4.js → chunk-5N5ZC566.js} +2 -2
  18. package/dist/{chunk-YD37KSEK.js → chunk-5QSMW5IO.js} +2 -2
  19. package/dist/{chunk-7II7NFRV.js → chunk-623AZLTE.js} +2 -2
  20. package/dist/{chunk-VYQY75NA.js → chunk-6TJERPN3.js} +2 -2
  21. package/dist/{chunk-IRIM3SUR.js → chunk-75H6GOND.js} +2 -2
  22. package/dist/{chunk-Q65QYKU7.js → chunk-7H37Z4UO.js} +2 -2
  23. package/dist/{chunk-OO6S4ECV.js → chunk-7XP7ZRSI.js} +2 -2
  24. package/dist/{chunk-5TVNLPUM.js → chunk-7Z5UT44B.js} +2 -2
  25. package/dist/{chunk-RQWNF2RM.js → chunk-BBTVIIOI.js} +2 -2
  26. package/dist/{chunk-MZB3DTHW.js → chunk-BGUYAA3Q.js} +2 -2
  27. package/dist/{chunk-3I34FZ6R.js → chunk-BTYDBDX5.js} +2 -2
  28. package/dist/{chunk-2EU6WVR3.js → chunk-BW4VDICR.js} +2 -2
  29. package/dist/{chunk-DKK2H4D7.js → chunk-CKRVVBM6.js} +2 -2
  30. package/dist/{chunk-ZHGUZKJL.js → chunk-CMLHZWRS.js} +2 -2
  31. package/dist/{chunk-OYGKBDAD.js → chunk-CSMPXDYE.js} +2 -2
  32. package/dist/{chunk-GWWYLYD3.js → chunk-DQYG5JHT.js} +2 -2
  33. package/dist/{chunk-6DNE65QS.js → chunk-E5HPTSRD.js} +2 -2
  34. package/dist/chunk-E7BTIEAY.js +2 -0
  35. package/dist/{chunk-RPMT6MTX.js → chunk-EUMETOTD.js} +2 -2
  36. package/dist/{chunk-2Y7YX54K.js → chunk-FY6RCFDH.js} +2 -2
  37. package/dist/{chunk-YFEJIYWH.js → chunk-FZXN37RN.js} +2 -2
  38. package/dist/{chunk-KI4WPR7Q.js → chunk-G4IUQW27.js} +2 -2
  39. package/dist/{chunk-U6BJVXWQ.js → chunk-GRHA5NGF.js} +2 -2
  40. package/dist/{chunk-XBPAJASV.js → chunk-H4T2AST4.js} +2 -2
  41. package/dist/{chunk-SOCS3467.js → chunk-HGO3D2JD.js} +2 -2
  42. package/dist/{chunk-LT6AHYVY.js → chunk-HJYHSTCP.js} +2 -2
  43. package/dist/{chunk-XC6PUFNN.js → chunk-HYRSGWFX.js} +2 -2
  44. package/dist/{chunk-K32ZOW3P.js → chunk-HZVG4KID.js} +2 -2
  45. package/dist/{chunk-RLB7FZKR.js → chunk-IHD2CHMX.js} +2 -2
  46. package/dist/{chunk-VSQRU3AP.js → chunk-IKAJI4SI.js} +2 -2
  47. package/dist/{chunk-BVHP2B4D.js → chunk-IZLWLO4X.js} +2 -2
  48. package/dist/{chunk-QSNG3NHQ.js → chunk-J7WYG63U.js} +2 -2
  49. package/dist/{chunk-NLVKD45E.js → chunk-JLZUM476.js} +2 -2
  50. package/dist/{chunk-7RAS466A.js → chunk-JYBP5ZIR.js} +2 -2
  51. package/dist/{chunk-S5RZQA6V.js → chunk-K3UVTL3J.js} +2 -2
  52. package/dist/{chunk-DA34GNNO.js → chunk-KWMRY4RN.js} +2 -2
  53. package/dist/{chunk-363TZ64I.js → chunk-KWQKWY6M.js} +2 -2
  54. package/dist/{chunk-PCCMMI2M.js → chunk-KZ2LZBQT.js} +2 -2
  55. package/dist/{chunk-S3IXCXW2.js → chunk-LG33DNTZ.js} +2 -2
  56. package/dist/chunk-M2TRDR25.js +84 -0
  57. package/dist/{chunk-VZCR3VQY.js → chunk-MBDBNQBW.js} +2 -2
  58. package/dist/chunk-MON5XXTG.js +7 -0
  59. package/dist/{chunk-EVCSXWER.js → chunk-O27267B6.js} +2 -2
  60. package/dist/{chunk-YCVYOV4A.js → chunk-O56VBJKB.js} +2 -2
  61. package/dist/{chunk-CS3FXTUC.js → chunk-OBPR6E5Z.js} +2 -2
  62. package/dist/{chunk-2LGPMYS2.js → chunk-OC7XDK62.js} +2 -2
  63. package/dist/{chunk-5UKDCXVC.js → chunk-OP5JXGDV.js} +2 -2
  64. package/dist/{chunk-CKIAEVGM.js → chunk-PA2MQKXD.js} +2 -2
  65. package/dist/{chunk-BFWVHD2P.js → chunk-PPAT3XUL.js} +2 -2
  66. package/dist/{chunk-G4KQ7S74.js → chunk-QEIGJJBC.js} +2 -2
  67. package/dist/{chunk-AAMZRDJT.js → chunk-QYBCGCY5.js} +2 -2
  68. package/dist/{chunk-W3ZVRLCH.js → chunk-RPPV6Y4K.js} +2 -2
  69. package/dist/{chunk-HGUNWXJX.js → chunk-RUQE7DZT.js} +2 -2
  70. package/dist/chunk-SMBIGBGN.js +67 -0
  71. package/dist/{chunk-EBSSCVR4.js → chunk-SQJ72PQW.js} +5 -5
  72. package/dist/{chunk-6GZ7LM7S.js → chunk-SSH2NPYS.js} +2 -2
  73. package/dist/{chunk-S2FZILCF.js → chunk-TAB7AWKO.js} +2 -2
  74. package/dist/{chunk-MCNWCJYL.js → chunk-TLTLJ4SW.js} +2 -2
  75. package/dist/{chunk-JXAJDINF.js → chunk-TR7C5HOC.js} +2 -2
  76. package/dist/{chunk-3OPIMH42.js → chunk-U244OVE6.js} +2 -2
  77. package/dist/chunk-U267E6YN.js +120 -0
  78. package/dist/chunk-U3JW5AYG.js +2 -0
  79. package/dist/{chunk-JQ2PCFZW.js → chunk-UKUISUS6.js} +2 -2
  80. package/dist/{chunk-2HFXPIBT.js → chunk-UWR52GNZ.js} +2 -2
  81. package/dist/{chunk-CVBS2FD4.js → chunk-V7MX6YUF.js} +2 -2
  82. package/dist/{chunk-BVUA3GZC.js → chunk-VCRMI56V.js} +2 -2
  83. package/dist/{chunk-753JWTUH.js → chunk-VDHEX6YO.js} +2 -2
  84. package/dist/{chunk-AMPN2VMF.js → chunk-W2I4QAW7.js} +2 -2
  85. package/dist/{chunk-P5QZILZ4.js → chunk-W3HSUCRG.js} +2 -2
  86. package/dist/{chunk-62Y3PC27.js → chunk-WENI5ZDR.js} +2 -2
  87. package/dist/{chunk-RYFIRFYJ.js → chunk-WGDIA2TU.js} +2 -2
  88. package/dist/{chunk-L27UIF3E.js → chunk-WT34AUWL.js} +2 -2
  89. package/dist/{chunk-HLRWOFXC.js → chunk-X566NT42.js} +2 -2
  90. package/dist/{chunk-ZEKBAMCN.js → chunk-XKWEMFHP.js} +2 -2
  91. package/dist/{chunk-SEEJPIWG.js → chunk-Y4BBVPRK.js} +2 -2
  92. package/dist/{chunk-KP2DJY7D.js → chunk-Y5BOEWAE.js} +2 -2
  93. package/dist/cli.js +321 -302
  94. package/dist/{config-types-SVkUIufk.d.ts → config-types-70s7NxKB.d.ts} +2 -0
  95. package/dist/{db-CS0TuVH6.d.ts → db-BBmJ0v3b.d.ts} +1 -1
  96. package/dist/{health-Btal3mQi.d.ts → health-CWpFL_6z.d.ts} +1 -1
  97. package/dist/index.d.ts +3 -3
  98. package/dist/index.js +1 -1
  99. package/dist/queries/affected.d.ts +2 -2
  100. package/dist/queries/affected.js +1 -1
  101. package/dist/queries/bottlenecks.d.ts +2 -2
  102. package/dist/queries/bottlenecks.js +1 -1
  103. package/dist/queries/by-kind.d.ts +2 -2
  104. package/dist/queries/by-kind.js +1 -1
  105. package/dist/queries/call-graph.d.ts +2 -2
  106. package/dist/queries/call-graph.js +1 -1
  107. package/dist/queries/change-surface.d.ts +2 -2
  108. package/dist/queries/change-surface.js +1 -1
  109. package/dist/queries/cleanup-plan.d.ts +2 -2
  110. package/dist/queries/cleanup-plan.js +1 -1
  111. package/dist/queries/co-change.d.ts +2 -2
  112. package/dist/queries/co-change.js +1 -1
  113. package/dist/queries/code.d.ts +2 -2
  114. package/dist/queries/code.js +1 -1
  115. package/dist/queries/complexity-hotspots.d.ts +2 -2
  116. package/dist/queries/complexity-hotspots.js +1 -1
  117. package/dist/queries/complexity.d.ts +2 -2
  118. package/dist/queries/complexity.js +1 -1
  119. package/dist/queries/convergence.d.ts +2 -2
  120. package/dist/queries/convergence.js +1 -1
  121. package/dist/queries/coupling.d.ts +2 -2
  122. package/dist/queries/coupling.js +1 -1
  123. package/dist/queries/cycles.d.ts +2 -2
  124. package/dist/queries/cycles.js +1 -1
  125. package/dist/queries/dataflow.d.ts +2 -2
  126. package/dist/queries/dataflow.js +1 -1
  127. package/dist/queries/dead.d.ts +2 -2
  128. package/dist/queries/dead.js +1 -1
  129. package/dist/queries/decorative-checkers.d.ts +2 -2
  130. package/dist/queries/decorative-checkers.js +1 -1
  131. package/dist/queries/deep-chains.d.ts +2 -2
  132. package/dist/queries/deep-chains.js +1 -1
  133. package/dist/queries/deps.d.ts +2 -2
  134. package/dist/queries/deps.js +1 -1
  135. package/dist/queries/diff-gate.d.ts +2 -2
  136. package/dist/queries/diff-gate.js +1 -1
  137. package/dist/queries/diff-impact.d.ts +2 -2
  138. package/dist/queries/diff-impact.js +1 -1
  139. package/dist/queries/doc-drift.d.ts +2 -2
  140. package/dist/queries/doc-drift.js +1 -1
  141. package/dist/queries/drift.d.ts +2 -2
  142. package/dist/queries/drift.js +1 -1
  143. package/dist/queries/duplicate-bodies.d.ts +2 -2
  144. package/dist/queries/duplicate-bodies.js +1 -1
  145. package/dist/queries/extract-candidates.d.ts +2 -2
  146. package/dist/queries/extract-candidates.js +1 -1
  147. package/dist/queries/fan.d.ts +2 -2
  148. package/dist/queries/fan.js +1 -1
  149. package/dist/queries/files.d.ts +2 -2
  150. package/dist/queries/health.d.ts +3 -3
  151. package/dist/queries/health.js +1 -1
  152. package/dist/queries/hierarchy.d.ts +2 -2
  153. package/dist/queries/hierarchy.js +1 -1
  154. package/dist/queries/hotspots.d.ts +2 -2
  155. package/dist/queries/hotspots.js +1 -1
  156. package/dist/queries/imports.d.ts +2 -2
  157. package/dist/queries/imports.js +1 -1
  158. package/dist/queries/incomplete-migration.d.ts +2 -2
  159. package/dist/queries/incomplete-migration.js +1 -1
  160. package/dist/queries/index.d.ts +3 -3
  161. package/dist/queries/index.js +1 -1
  162. package/dist/queries/isolated.d.ts +2 -2
  163. package/dist/queries/isolated.js +1 -1
  164. package/dist/queries/locality-candidates.d.ts +2 -2
  165. package/dist/queries/locality-candidates.js +1 -1
  166. package/dist/queries/members.d.ts +2 -2
  167. package/dist/queries/members.js +1 -1
  168. package/dist/queries/methods.d.ts +2 -2
  169. package/dist/queries/methods.js +1 -1
  170. package/dist/queries/not-implemented.d.ts +2 -2
  171. package/dist/queries/not-implemented.js +1 -1
  172. package/dist/queries/outline.d.ts +2 -2
  173. package/dist/queries/outline.js +1 -1
  174. package/dist/queries/passthrough-candidates.d.ts +2 -2
  175. package/dist/queries/passthrough-candidates.js +1 -1
  176. package/dist/queries/plan-context.d.ts +2 -2
  177. package/dist/queries/plan-context.js +1 -1
  178. package/dist/queries/react-component-duplicates.d.ts +2 -2
  179. package/dist/queries/react-component-duplicates.js +1 -1
  180. package/dist/queries/react-hook-candidates.d.ts +2 -2
  181. package/dist/queries/react-hook-candidates.js +1 -1
  182. package/dist/queries/react-large-component-pressure.d.ts +2 -2
  183. package/dist/queries/react-large-component-pressure.js +1 -1
  184. package/dist/queries/recent-duplicates.d.ts +2 -2
  185. package/dist/queries/recent-duplicates.js +1 -1
  186. package/dist/queries/redundant-reexports.d.ts +2 -2
  187. package/dist/queries/redundant-reexports.js +1 -1
  188. package/dist/queries/refs.d.ts +2 -2
  189. package/dist/queries/refs.js +1 -1
  190. package/dist/queries/self-audit.d.ts +2 -2
  191. package/dist/queries/self-audit.js +1 -1
  192. package/dist/queries/similar-chains.d.ts +2 -2
  193. package/dist/queries/similar-chains.js +1 -1
  194. package/dist/queries/similar-files.d.ts +2 -2
  195. package/dist/queries/similar-files.js +1 -1
  196. package/dist/queries/similar-signatures.d.ts +2 -2
  197. package/dist/queries/similar-signatures.js +1 -1
  198. package/dist/queries/similar.d.ts +2 -2
  199. package/dist/queries/similar.js +1 -1
  200. package/dist/queries/slice.d.ts +2 -2
  201. package/dist/queries/slice.js +1 -1
  202. package/dist/queries/stale-abstractions.d.ts +2 -2
  203. package/dist/queries/stale-abstractions.js +1 -1
  204. package/dist/queries/stats.d.ts +2 -2
  205. package/dist/queries/surface.d.ts +2 -2
  206. package/dist/queries/surface.js +1 -1
  207. package/dist/queries/symbols.d.ts +2 -2
  208. package/dist/queries/symbols.js +1 -1
  209. package/dist/queries/system.d.ts +2 -2
  210. package/dist/queries/system.js +1 -1
  211. package/dist/queries/test-quality.d.ts +2 -2
  212. package/dist/queries/test-quality.js +1 -1
  213. package/dist/queries/trace.d.ts +2 -2
  214. package/dist/queries/trace.js +1 -1
  215. package/dist/queries/twin-ab.d.ts +2 -2
  216. package/dist/queries/twin-ab.js +1 -1
  217. package/dist/queries/twin-drift.d.ts +2 -2
  218. package/dist/queries/twin-drift.js +1 -1
  219. package/dist/queries/unused-imports.d.ts +2 -2
  220. package/dist/queries/unused-imports.js +1 -1
  221. package/dist/queries/unused-params.d.ts +2 -2
  222. package/dist/queries/unused-params.js +1 -1
  223. package/dist/queries/vue-component-duplicates.d.ts +2 -2
  224. package/dist/queries/vue-component-duplicates.js +1 -1
  225. package/dist/queries/vue-composable-candidates.d.ts +2 -2
  226. package/dist/queries/vue-composable-candidates.js +1 -1
  227. package/dist/queries/vue-large-view-pressure.d.ts +2 -2
  228. package/dist/queries/vue-large-view-pressure.js +1 -1
  229. package/dist/queries/wrapper-candidates.d.ts +2 -2
  230. package/dist/queries/wrapper-candidates.js +1 -1
  231. package/dist/reindex-worker.js +26 -26
  232. package/dist/reindex.d.ts +3 -3
  233. package/dist/reindex.js +38 -34
  234. package/dist/runtime.d.ts +5 -3
  235. package/dist/runtime.js +1 -2
  236. package/dist/{scip-cli-BKL-26TZ.d.ts → scip-cli-CoMzb7Zu.d.ts} +1 -1
  237. package/dist/watch-server.js +4 -4
  238. package/docs/COMMAND_REFERENCE.md +1 -1
  239. package/package.json +2 -1
  240. package/skills/_shared/SKILL.md +2 -2
  241. package/skills/scip-calibrate/SKILL.md +5 -4
  242. package/skills/scip-tla-model-system/SKILL.md +10 -8
  243. package/skills/scip-verify/SKILL.md +3 -2
  244. package/dist/chunk-5P26M63Y.js +0 -2
  245. package/dist/chunk-FFIYGYQR.js +0 -67
  246. package/dist/chunk-QVZSWLLZ.js +0 -2
  247. package/dist/chunk-WFRZGMWJ.js +0 -71
  248. package/dist/chunk-XAEU4ROB.js +0 -101
  249. package/dist/chunk-Y42DMR6F.js +0 -6
@@ -1,8 +1,8 @@
1
- import{a as k}from"./chunk-G4KQ7S74.js";import{a as T,e as x,s as R}from"./chunk-OO6S4ECV.js";import{o as w}from"./chunk-NLVKD45E.js";import{b as l}from"./chunk-MCNWCJYL.js";import{a as S}from"./chunk-64MNV6AB.js";import{d as g,z as _}from"./chunk-WFRZGMWJ.js";import{existsSync as d,readFileSync as B,readdirSync as $}from"fs";import{join as p}from"path";var H={files:new Set,pathPrefixes:[]},y=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,K=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,A=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],Y=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),q=4,J=g("package-surface",{clearGroups:["whole-project"]});function Q(t){return J.get(t,()=>Z(t.config.projectRoot))}function E(t,e){let r=Q(t);return r.files.has(e)?!0:r.pathPrefixes.some(s=>e.startsWith(s))}function Z(t){let e=new Set,r=[];for(let{manifest:s,packageRoot:i}of z(t))for(let n of tt(s))et(t,i,n,e,r);return e.size===0&&r.length===0?H:{files:e,pathPrefixes:r}}function z(t){let e=[],r=O(t,"");return r&&e.push({manifest:r,packageRoot:""}),D(t,"",e,0),e}function D(t,e,r,s){if(s>=q)return;let i=p(t,e);if(d(i))for(let n of $(i,{withFileTypes:!0})){if(!n.isDirectory()||Y.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name,o=O(t,a);o&&r.push({manifest:o,packageRoot:a}),D(t,a,r,s+1)}}function O(t,e){try{let r=B(p(t,e,"package.json"),"utf-8"),s=JSON.parse(r);return s&&typeof s=="object"?s:null}catch{return null}}function tt(t){let e=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&e.push(t[s]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let s of Object.values(r))typeof s=="string"&&e.push(s);return F(t.exports,e),e}function F(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))F(r,e)}function et(t,e,r,s,i){let n=r.replace(/\\/g,"/").replace(/^\.\//,"");if(n===""||n.startsWith(".."))return;let a=n.indexOf("*");if(a>=0){let c=n.slice(0,a);for(let u of j(c))u!==""&&i.push(f(e,u));return}let o=n.replace(K,"");for(let c of j(o)){c===o&&c===n&&s.add(f(e,n));for(let u of A)rt(t,s,e,c+u)}s.add(f(e,n))}function j(t){let e=[t];return y.test(t)&&(e.push(t.replace(y,"src/")),e.push(t.replace(y,""))),e}function rt(t,e,r,s){let i=f(r,s);if(e.add(i),!s.startsWith("src/")||d(p(t,i)))return;let n=A.find(P=>s.endsWith(P));if(!n)return;let a=s.slice(0,-n.length);st(t,e,r,a,n);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),u=a.slice(o+1);for(let P of N(t,r,c,`${u}${n}`))e.add(P)}function st(t,e,r,s,i){let n=f(r,`${s}/index${i}`);d(p(t,n))&&e.add(n)}function N(t,e,r,s){let i=p(t,e,r);if(!d(i))return[];let n=[];for(let a of $(i,{withFileTypes:!0})){let o=`${r}/${a.name}`;a.isDirectory()?n.push(...N(t,e,o,s)):a.isFile()&&a.name===s&&n.push(f(e,o))}return n}function f(t,e){return t?`${t}/${e}`:e}import{existsSync as h,readFileSync as nt,readdirSync as it}from"fs";import{dirname as at,join as b}from"path";var ot={rootFiles:new Set,sourcePrefixes:[]},ct=new Set([".git",".scipquery","node_modules","target"]),ut=6,ft=g("rust-library-surface",{clearGroups:["whole-project"]});function L(t,e,r){if(!r.endsWith(".rs")||!pt(lt(t),r))return!1;let s=R(t,r).find(i=>i.symbol===e);return s?St(_(t,r)[s.startLine]??""):!1}function lt(t){return ft.get(t,()=>gt(t.config.projectRoot))}function gt(t){let e=new Set,r=new Set;for(let s of dt(t)){let i=b(t,s,"Cargo.toml"),n=nt(i,"utf8"),a=ht(n),o=f(s,"src/lib.rs"),c=a?f(s,a):!bt(n)&&h(b(t,o))?o:null;if(!c)continue;e.add(c);let u=at(c).replaceAll("\\","/");r.add(u==="."?"":`${u}/`)}return e.size===0?ot:{rootFiles:e,sourcePrefixes:[...r].sort()}}function pt(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:mt(e)?!1:t.sourcePrefixes.some(r=>e.startsWith(r)):!1}function St(t){return/^\s*pub\s+(?!\()/.test(t)}function dt(t){if(!h(t))return[];let e=[];return C(t,"",e,0),e}function C(t,e,r,s){let i=b(t,e);if(h(i)&&(h(b(i,"Cargo.toml"))&&r.push(e),!(s>=ut)))for(let n of it(i,{withFileTypes:!0})){if(!n.isDirectory()||ct.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name;C(t,a,r,s+1)}}function ht(t){let e=!1;for(let r of t.split(`
1
+ import{a as k}from"./chunk-QEIGJJBC.js";import{a as T,e as x,s as R}from"./chunk-7XP7ZRSI.js";import{o as w}from"./chunk-JLZUM476.js";import{b as l}from"./chunk-TLTLJ4SW.js";import{a as S}from"./chunk-64MNV6AB.js";import{d as g,z as _}from"./chunk-M2TRDR25.js";import{existsSync as d,readFileSync as B,readdirSync as $}from"fs";import{join as p}from"path";var H={files:new Set,pathPrefixes:[]},y=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,K=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,A=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],Y=new Set([".git",".next",".turbo","build","coverage","dist","node_modules","out"]),q=4,J=g("package-surface",{clearGroups:["whole-project"]});function Q(t){return J.get(t,()=>Z(t.config.projectRoot))}function E(t,e){let r=Q(t);return r.files.has(e)?!0:r.pathPrefixes.some(s=>e.startsWith(s))}function Z(t){let e=new Set,r=[];for(let{manifest:s,packageRoot:i}of z(t))for(let n of tt(s))et(t,i,n,e,r);return e.size===0&&r.length===0?H:{files:e,pathPrefixes:r}}function z(t){let e=[],r=O(t,"");return r&&e.push({manifest:r,packageRoot:""}),D(t,"",e,0),e}function D(t,e,r,s){if(s>=q)return;let i=p(t,e);if(d(i))for(let n of $(i,{withFileTypes:!0})){if(!n.isDirectory()||Y.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name,o=O(t,a);o&&r.push({manifest:o,packageRoot:a}),D(t,a,r,s+1)}}function O(t,e){try{let r=B(p(t,e,"package.json"),"utf-8"),s=JSON.parse(r);return s&&typeof s=="object"?s:null}catch{return null}}function tt(t){let e=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&e.push(t[s]);let r=t.bin;if(typeof r=="string")e.push(r);else if(r&&typeof r=="object")for(let s of Object.values(r))typeof s=="string"&&e.push(s);return F(t.exports,e),e}function F(t,e){if(typeof t=="string"){e.push(t);return}if(!(!t||typeof t!="object"))for(let r of Object.values(t))F(r,e)}function et(t,e,r,s,i){let n=r.replace(/\\/g,"/").replace(/^\.\//,"");if(n===""||n.startsWith(".."))return;let a=n.indexOf("*");if(a>=0){let c=n.slice(0,a);for(let u of j(c))u!==""&&i.push(f(e,u));return}let o=n.replace(K,"");for(let c of j(o)){c===o&&c===n&&s.add(f(e,n));for(let u of A)rt(t,s,e,c+u)}s.add(f(e,n))}function j(t){let e=[t];return y.test(t)&&(e.push(t.replace(y,"src/")),e.push(t.replace(y,""))),e}function rt(t,e,r,s){let i=f(r,s);if(e.add(i),!s.startsWith("src/")||d(p(t,i)))return;let n=A.find(P=>s.endsWith(P));if(!n)return;let a=s.slice(0,-n.length);st(t,e,r,a,n);let o=a.lastIndexOf("/");if(o<=4)return;let c=a.slice(0,o),u=a.slice(o+1);for(let P of N(t,r,c,`${u}${n}`))e.add(P)}function st(t,e,r,s,i){let n=f(r,`${s}/index${i}`);d(p(t,n))&&e.add(n)}function N(t,e,r,s){let i=p(t,e,r);if(!d(i))return[];let n=[];for(let a of $(i,{withFileTypes:!0})){let o=`${r}/${a.name}`;a.isDirectory()?n.push(...N(t,e,o,s)):a.isFile()&&a.name===s&&n.push(f(e,o))}return n}function f(t,e){return t?`${t}/${e}`:e}import{existsSync as h,readFileSync as nt,readdirSync as it}from"fs";import{dirname as at,join as b}from"path";var ot={rootFiles:new Set,sourcePrefixes:[]},ct=new Set([".git",".scipquery","node_modules","target"]),ut=6,ft=g("rust-library-surface",{clearGroups:["whole-project"]});function L(t,e,r){if(!r.endsWith(".rs")||!pt(lt(t),r))return!1;let s=R(t,r).find(i=>i.symbol===e);return s?St(_(t,r)[s.startLine]??""):!1}function lt(t){return ft.get(t,()=>gt(t.config.projectRoot))}function gt(t){let e=new Set,r=new Set;for(let s of dt(t)){let i=b(t,s,"Cargo.toml"),n=nt(i,"utf8"),a=ht(n),o=f(s,"src/lib.rs"),c=a?f(s,a):!bt(n)&&h(b(t,o))?o:null;if(!c)continue;e.add(c);let u=at(c).replaceAll("\\","/");r.add(u==="."?"":`${u}/`)}return e.size===0?ot:{rootFiles:e,sourcePrefixes:[...r].sort()}}function pt(t,e){return e.endsWith(".rs")?t.rootFiles.has(e)?!0:mt(e)?!1:t.sourcePrefixes.some(r=>e.startsWith(r)):!1}function St(t){return/^\s*pub\s+(?!\()/.test(t)}function dt(t){if(!h(t))return[];let e=[];return C(t,"",e,0),e}function C(t,e,r,s){let i=b(t,e);if(h(i)&&(h(b(i,"Cargo.toml"))&&r.push(e),!(s>=ut)))for(let n of it(i,{withFileTypes:!0})){if(!n.isDirectory()||ct.has(n.name))continue;let a=e?`${e}/${n.name}`:n.name;C(t,a,r,s+1)}}function ht(t){let e=!1;for(let r of t.split(`
2
2
  `)){let s=r.replace(/\s+#.*$/,"").trim(),i=/^\[([^\]]+)\]$/.exec(s);if(i){e=i[1]==="lib";continue}if(!e)continue;let n=/^path\s*=\s*["']([^"']+)["']/.exec(s)?.[1];if(n)return n.replaceAll("\\","/").replace(/^\.\//,"")}return null}function bt(t){let e=!1;for(let r of t.split(`
3
3
  `)){let s=r.replace(/\s+#.*$/,"").trim(),i=/^\[([^\]]+)\]$/.exec(s);if(i){e=i[1]==="package";continue}if(e&&/^autolib\s*=\s*false\b/.test(s))return!0}return!1}function mt(t){return/(?:^|\/)src\/main\.rs$/.test(t)||/(?:^|\/)src\/bin\//.test(t)||/(?:^|\/)(?:examples|tests|benches)\//.test(t)}function m(t){let e=l(t);return Mt(e)?"test":It(e)?"worker":vt(e)?"entry":Vt(e)?"barrel":"source"}function Pt(t){return m(t)==="barrel"}function I(t){return xt.get(t,()=>{let r=S(t,{includeIgnored:!1}).filter(a=>{let o=m(a);return o==="entry"||o==="worker"});if(r.length===0)return new Set;let s=k(t),i=new Set,n=new Set;for(;r.length>0;){let a=r.shift();if(!i.has(a)){i.add(a),m(a)==="barrel"&&n.add(a);for(let o of s.get(a)??[])i.has(o)||r.push(o)}}return n})}var xt=g("live-barrels",{clearGroups:["whole-project"]});function yt(t,e){return I(t).has(l(e))}function ce(t){let e=I(t);return S(t,{includeIgnored:!1}).filter(r=>Pt(r)&&!e.has(r)&&!Et(t,r))}function Et(t,e){let r=l(e),s=T(t).forFile(r,{facts:!0}).facts?.callables;return s&&s.length>0?!0:(t.get(`SELECT COUNT(*) AS n
4
4
  FROM defn_enclosing_ranges der
5
5
  JOIN documents d ON d.id = der.document_id
6
6
  WHERE d.relative_path = ?
7
7
  AND der.end_line - der.start_line >= 2`,r)?.n??0)>0}function ue(t,e){let r=l(e),s=m(e);return s==="entry"||s==="worker"||Nt(r)||yt(t,r)}function fe(t,e,r){let s=l(r);if(E(t,s)||wt(t,e,s)||L(t,e,s)||Ft(e,s))return!0;let i=t.config.entryRoots;return i?!!(i.files?.some(n=>l(n)===s)||i.pathPrefixes?.some(n=>s.startsWith(l(n)))||i.qualifiedVars?.some(n=>Xt(e,n))||i.symbolPatterns?.some(n=>{try{return new RegExp(n).test(e)}catch{return!1}})):!1}var _t=g("package-surface-reachability",{clearGroups:["whole-project"]});function wt(t,e,r){let s=kt(t).get(r);return s===void 0?!1:s===null||s.has(x(e))}function kt(t){return _t.get(t,()=>{let e=new Map,r=[];for(let s of S(t,{includeIgnored:!1}))E(t,s)&&(e.set(s,null),r.push(s));for(;r.length>0;){let s=r.shift(),i=e.get(s);if(i!==void 0)for(let n of w(t,s)){if(!n.sourcePath||t.isIgnored(n.sourcePath))continue;let a=Tt(i,n);a!==void 0&&Rt(e,n.sourcePath,a)&&r.push(n.sourcePath)}}return e})}function Tt(t,e){if(t===null)return e.kind==="named"?new Set(e.names):null;if(e.kind==="star")return new Set(t);if(e.kind==="star-as")return;let r=e.names.filter(s=>t.has(s));return r.length>0?new Set(r):void 0}function Rt(t,e,r){if(!t.has(e))return t.set(e,r),!0;let s=t.get(e);if(s===void 0)return!1;if(s===null||r===null)return s===null?!1:(t.set(e,null),!0);let i=!1;for(let n of r)s.has(n)||(s.add(n),i=!0);return i}var v=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]),jt=new Set(["default","generateMetadata","generateStaticParams"]),$t=new Set(["default","getStaticProps","getServerSideProps","getStaticPaths","config"]),At=new Set(["default","loader","action","clientLoader","clientAction","headers","links","meta","shouldRevalidate","ErrorBoundary","HydrateFallback"]),Dt=new Set(["load","actions","entries",...v]),Ot=new Set(["default"]);function Ft(t,e){let r=x(t);return r===""?!1:V(e)?v.has(r):X(e)?jt.has(r):W(e)?$t.has(r):G(e)?At.has(r):U(e)?Dt.has(r):Ct(e)?Ot.has(r):!1}function Nt(t){return V(t)||X(t)||W(t)||Lt(t)||G(t)||U(t)}function V(t){return/(?:^|\/)app(?:\/[^/]+)*\/route\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function X(t){return/(?:^|\/)app(?:\/[^/]+)*\/(?:page|layout|template|loading|error|not-found|global-error|head|default)\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function W(t){return/(?:^|\/)pages\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function Lt(t){let e="(?:middleware|proxy|instrumentation)\\.(?:ts|js|mts|mjs)";return new RegExp(`^(?:src/)?${e}$`).test(t)||new RegExp(`(?:^|/)src/${e}$`).test(t)||new RegExp(`(?:^|/)(?:apps|services|packages)/[^/]+/(?:src/)?${e}$`).test(t)}function G(t){return/(?:^|\/)app\/routes\/.+\.(?:ts|tsx|js|jsx|mjs|cjs)$/.test(t)}function U(t){return/(?:^|\/)src\/routes\/(?:.*\/)?\+(?:page|page\.server|layout|layout\.server|server)\.(?:ts|js)$/.test(t)}function Ct(t){return/(?:^|\/)src\/(?:pages|views|routes)\/.+\.(?:ts|tsx|js|jsx|vue)$/.test(t)}function Mt(t){return!!(/\.(?:test|spec)\.[a-z0-9]+$/i.test(t)||/(?:^|\/)(?:_)?test_[^/]+$/i.test(t)||/(?:^|\/)spec_[^/]+$/i.test(t)||/(?:^|\/)[^/]+_test\.[a-z0-9]+$/i.test(t)||/(?:^|\/)[^/]+_tests\.rs$/i.test(t)||/(?:^|\/)tests\.rs$/i.test(t)||/(?:^|\/)[^/]+_spec\.[a-z0-9]+$/i.test(t)||/(?:^|\/)__tests__\//i.test(t)||/(?:^|\/)test\//i.test(t)||/(?:^|\/)tests\//i.test(t)||/(?:^|\/)__fixtures__\//i.test(t)||/(?:^|\/)__mocks__\//i.test(t)||/(?:^|\/)test-support\//i.test(t)||/(?:^|\/)test-utils\//i.test(t)||/(?:^|\/)testing\//i.test(t))}function It(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function vt(t){let e=t.split("/"),r=e[e.length-1]??t;return r==="cli.ts"||r==="cli.js"||r==="postinstall.ts"||r==="postinstall.js"||r==="main.ts"||r==="main.js"||r==="main.rs"||r==="main.go"||r==="main.py"||r==="build.rs"||r==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:r==="index.ts"||r==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:e.length<=2:!1}function Vt(t){return t==="index.ts"||t==="index.js"||t.endsWith("/index.ts")||t.endsWith("/index.js")||t.endsWith("/mod.rs")||t.endsWith("/__init__.py")}function Xt(t,e){let r=e.lastIndexOf("/");if(r<0)return!1;let s=e.slice(0,r),i=e.slice(r+1);return t.includes(M(s)+"/")&&t.includes(M(i)+".")}function M(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{E as a,m as b,Pt as c,yt as d,ce as e,ue as f,fe as g};
8
- //# sourceMappingURL=chunk-NLRWGGPY.js.map
8
+ //# sourceMappingURL=chunk-5CJ6AQN7.js.map
@@ -1,2 +1,2 @@
1
- import{d as f}from"./chunk-B3X6KU75.js";import{N as d}from"./chunk-MCNWCJYL.js";function S(n,e={}){let{minComponentLines:o=300,minFileLines:i=800,minJsxTokens:u=80,minBehaviorTokens:s=40,limit:a=20,scope:m,scanLimit:c,filePattern:p}=e;return d(n).reactProfiles({scope:m,scanLimit:c}).filter(t=>t.kind==="component").filter(t=>!p||t.file.includes(p)||t.name.includes(p)).map(t=>C(t,{minComponentLines:o,minFileLines:i,minJsxTokens:u,minBehaviorTokens:s})).filter(t=>t!==null).sort((t,r)=>r.componentLines-t.componentLines||r.fileLines-t.fileLines||t.file.localeCompare(r.file)).slice(0,a)}function C(n,e){let o=Math.max(80,Math.floor(e.minComponentLines/2)),i=f(n,x({minComponentLines:e.minComponentLines,minFileLines:e.minFileLines,minJsxTokens:e.minJsxTokens,minBehaviorTokens:e.minBehaviorTokens,substantialComponentLines:o}),"component"),{reasons:u}=i;if(u.length===0)return null;let s=i.dominantPressure,a=i.pressureKinds,m=b(n),c=R(s,a,m);return{file:n.file,component:n.name,componentLines:n.loc,fileLines:n.fileLines,jsxTokens:n.jsxTokens.size,behaviorTokens:n.behaviorTokens.size,dominantPressure:s,pressureKinds:a,contextKind:m,recommendationKind:c,recommendation:v(c,m),reasons:u,loc:n.loc}}function x(n){return[{axis:"component",value:e=>e.loc,qualifies:(e,o)=>o>=n.minComponentLines,reason:(e,o)=>`${o} component line(s)`},{axis:"file",value:e=>e.fileLines,qualifies:(e,o)=>o>=n.minFileLines&&e.loc>=n.substantialComponentLines,reason:(e,o)=>`${o} file line(s)`},{axis:"jsx-structure",value:e=>e.jsxTokens.size,weightedValue:(e,o)=>o*3,qualifies:(e,o)=>o>=n.minJsxTokens,reason:(e,o)=>`${o} JSX structure token(s)`},{axis:"hook-behavior",value:e=>e.behaviorTokens.size,weightedValue:(e,o)=>o*4,qualifies:(e,o)=>o>=n.minBehaviorTokens,reason:(e,o)=>`${o} behavior token(s)`}]}function b(n){let e=n.file.split(/[\\/]+/).filter(Boolean),o=e.slice(0,-1).map(r=>r.toLowerCase()),i=(e.at(-1)??n.name).replace(/\.[^.]+$/,""),s=o.findIndex(r=>k.has(r))>=0,a=o.some(r=>h.has(r));if(L(i)||L(n.name))return"component";let c=T.has(i.toLowerCase()),p=/(?:Page|Route|Screen)$/.test(n.name),l=s&&/View$/.test(n.name),t=!a&&i.replace(/[^A-Za-z0-9]+/g,"").toLowerCase()===n.name.replace(/[^A-Za-z0-9]+/g,"").toLowerCase()&&/(?:Page|Route|Screen|View)$/.test(i);return c||p||l||t?"route-page":"component"}function L(n){let e=n.split(/[^A-Za-z0-9]+/).filter(Boolean).map(o=>o.toLowerCase());return e.at(-1)&&g.has(e.at(-1))?!0:[...g].some(o=>n.endsWith(P(o)))}function R(n,e,o){return n==="hook-behavior"?"behavior-extraction":o==="route-page"?"route-page-decomposition":e.includes("hook-behavior")?"behavior-extraction":e.includes("jsx-structure")?"jsx-decomposition":e.includes("file")?"file-decomposition":n==="jsx-structure"?"jsx-decomposition":n==="file"&&!e.includes("component")?"file-decomposition":"component-decomposition"}function v(n,e){switch(n){case"behavior-extraction":return"Extract independent state, effects, requests, or handlers into hooks, controllers, or feature modules.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"jsx-decomposition":return e==="route-page"?"Split page JSX into named layout sections before extracting behavior.":"Split repeated JSX sections into named presentational components.";case"file-decomposition":return"Review file-level decomposition; split colocated panels or helpers before changing behavior.";case"component-decomposition":return"Review component boundaries around props, state ownership, and independently changing UI sections."}}var h=new Set(["component","components","panel","panels","partial","partials"]),g=new Set(["banner","button","card","dialog","drawer","filter","form","grid","header","item","list","menu","modal","nav","panel","picker","rail","row","section","selector","shell","sidebar","table","toolbar"]),k=new Set(["landing","page","pages","route","routes","screen","screens","view","views"]),T=new Set(["page","route","screen"]);function P(n){return n.charAt(0).toUpperCase()+n.slice(1)}export{S as a};
2
- //# sourceMappingURL=chunk-CM4EZLW4.js.map
1
+ import{d as f}from"./chunk-B3X6KU75.js";import{N as d}from"./chunk-TLTLJ4SW.js";function S(n,e={}){let{minComponentLines:o=300,minFileLines:i=800,minJsxTokens:u=80,minBehaviorTokens:s=40,limit:a=20,scope:m,scanLimit:c,filePattern:p}=e;return d(n).reactProfiles({scope:m,scanLimit:c}).filter(t=>t.kind==="component").filter(t=>!p||t.file.includes(p)||t.name.includes(p)).map(t=>C(t,{minComponentLines:o,minFileLines:i,minJsxTokens:u,minBehaviorTokens:s})).filter(t=>t!==null).sort((t,r)=>r.componentLines-t.componentLines||r.fileLines-t.fileLines||t.file.localeCompare(r.file)).slice(0,a)}function C(n,e){let o=Math.max(80,Math.floor(e.minComponentLines/2)),i=f(n,x({minComponentLines:e.minComponentLines,minFileLines:e.minFileLines,minJsxTokens:e.minJsxTokens,minBehaviorTokens:e.minBehaviorTokens,substantialComponentLines:o}),"component"),{reasons:u}=i;if(u.length===0)return null;let s=i.dominantPressure,a=i.pressureKinds,m=b(n),c=R(s,a,m);return{file:n.file,component:n.name,componentLines:n.loc,fileLines:n.fileLines,jsxTokens:n.jsxTokens.size,behaviorTokens:n.behaviorTokens.size,dominantPressure:s,pressureKinds:a,contextKind:m,recommendationKind:c,recommendation:v(c,m),reasons:u,loc:n.loc}}function x(n){return[{axis:"component",value:e=>e.loc,qualifies:(e,o)=>o>=n.minComponentLines,reason:(e,o)=>`${o} component line(s)`},{axis:"file",value:e=>e.fileLines,qualifies:(e,o)=>o>=n.minFileLines&&e.loc>=n.substantialComponentLines,reason:(e,o)=>`${o} file line(s)`},{axis:"jsx-structure",value:e=>e.jsxTokens.size,weightedValue:(e,o)=>o*3,qualifies:(e,o)=>o>=n.minJsxTokens,reason:(e,o)=>`${o} JSX structure token(s)`},{axis:"hook-behavior",value:e=>e.behaviorTokens.size,weightedValue:(e,o)=>o*4,qualifies:(e,o)=>o>=n.minBehaviorTokens,reason:(e,o)=>`${o} behavior token(s)`}]}function b(n){let e=n.file.split(/[\\/]+/).filter(Boolean),o=e.slice(0,-1).map(r=>r.toLowerCase()),i=(e.at(-1)??n.name).replace(/\.[^.]+$/,""),s=o.findIndex(r=>k.has(r))>=0,a=o.some(r=>h.has(r));if(L(i)||L(n.name))return"component";let c=T.has(i.toLowerCase()),p=/(?:Page|Route|Screen)$/.test(n.name),l=s&&/View$/.test(n.name),t=!a&&i.replace(/[^A-Za-z0-9]+/g,"").toLowerCase()===n.name.replace(/[^A-Za-z0-9]+/g,"").toLowerCase()&&/(?:Page|Route|Screen|View)$/.test(i);return c||p||l||t?"route-page":"component"}function L(n){let e=n.split(/[^A-Za-z0-9]+/).filter(Boolean).map(o=>o.toLowerCase());return e.at(-1)&&g.has(e.at(-1))?!0:[...g].some(o=>n.endsWith(P(o)))}function R(n,e,o){return n==="hook-behavior"?"behavior-extraction":o==="route-page"?"route-page-decomposition":e.includes("hook-behavior")?"behavior-extraction":e.includes("jsx-structure")?"jsx-decomposition":e.includes("file")?"file-decomposition":n==="jsx-structure"?"jsx-decomposition":n==="file"&&!e.includes("component")?"file-decomposition":"component-decomposition"}function v(n,e){switch(n){case"behavior-extraction":return"Extract independent state, effects, requests, or handlers into hooks, controllers, or feature modules.";case"route-page-decomposition":return"Split route/page orchestration from reusable panels and feature controllers.";case"jsx-decomposition":return e==="route-page"?"Split page JSX into named layout sections before extracting behavior.":"Split repeated JSX sections into named presentational components.";case"file-decomposition":return"Review file-level decomposition; split colocated panels or helpers before changing behavior.";case"component-decomposition":return"Review component boundaries around props, state ownership, and independently changing UI sections."}}var h=new Set(["component","components","panel","panels","partial","partials"]),g=new Set(["banner","button","card","dialog","drawer","filter","form","grid","header","item","list","menu","modal","nav","panel","picker","rail","row","section","selector","shell","sidebar","table","toolbar"]),k=new Set(["landing","page","pages","route","routes","screen","screens","view","views"]),T=new Set(["page","route","screen"]);function P(n){return n.charAt(0).toUpperCase()+n.slice(1)}export{S as a};
2
+ //# sourceMappingURL=chunk-5GAUXLOE.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-YSUD2S7T.js";import{a as c}from"./chunk-64MNV6AB.js";import{existsSync as m}from"fs";import{basename as p,isAbsolute as g,join as d}from"path";function S(t,r){let e=f(t,r,{allowMultiple:!1})[0]?.relativePath;return e||x(t,r)}function j(t,r){return f(t,r,{allowMultiple:!0}).map(e=>e.relativePath)}function x(t,r){if(!r)return null;let e=r.replace(/\\/g,"/").replace(/^\.\//,""),s=g(e)&&e.startsWith(t.config.projectRoot)?e.slice(t.config.projectRoot.length).replace(/^\/+/,""):e,i=d(t.config.projectRoot,s);return m(i)?s:null}function f(t,r,e){let s=h(r);if(!s)return[];let i=c(t,{includeIgnored:!1}).map(o=>({relativePath:o,score:v(o,s)})).filter(o=>o.score>0).sort((o,l)=>l.score-o.score||o.relativePath.localeCompare(l.relativePath));if(i.length===0){let o=u(t,r);return!o||t.isIgnored(o.relativePath)?[]:[{relativePath:o.relativePath,score:700}]}let n=i.filter(o=>o.score>=1100);if(n.length>0)return e.allowMultiple?n:[n[0]];let a=i.filter(o=>o.score>=800);return a.length>0?e.allowMultiple?a:[a[0]]:e.allowMultiple?i:[i[0]]}function v(t,r){let e=h(t),s=p(e),i=p(r),n=0;return e===r&&(n+=1200),e.endsWith(`/${r}`)&&(n+=1100),s===i&&(n+=900),e.startsWith(`${r}/`)&&(n+=850),e.includes(r)&&(n+=250),n}function h(t){return t.trim().replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}export{S as a,j as b};
2
- //# sourceMappingURL=chunk-QB7NRST4.js.map
1
+ import{a as u}from"./chunk-2HCWAL42.js";import{a as c}from"./chunk-64MNV6AB.js";import{existsSync as m}from"fs";import{basename as p,isAbsolute as g,join as d}from"path";function S(t,r){let e=f(t,r,{allowMultiple:!1})[0]?.relativePath;return e||x(t,r)}function j(t,r){return f(t,r,{allowMultiple:!0}).map(e=>e.relativePath)}function x(t,r){if(!r)return null;let e=r.replace(/\\/g,"/").replace(/^\.\//,""),s=g(e)&&e.startsWith(t.config.projectRoot)?e.slice(t.config.projectRoot.length).replace(/^\/+/,""):e,i=d(t.config.projectRoot,s);return m(i)?s:null}function f(t,r,e){let s=h(r);if(!s)return[];let i=c(t,{includeIgnored:!1}).map(o=>({relativePath:o,score:v(o,s)})).filter(o=>o.score>0).sort((o,l)=>l.score-o.score||o.relativePath.localeCompare(l.relativePath));if(i.length===0){let o=u(t,r);return!o||t.isIgnored(o.relativePath)?[]:[{relativePath:o.relativePath,score:700}]}let n=i.filter(o=>o.score>=1100);if(n.length>0)return e.allowMultiple?n:[n[0]];let a=i.filter(o=>o.score>=800);return a.length>0?e.allowMultiple?a:[a[0]]:e.allowMultiple?i:[i[0]]}function v(t,r){let e=h(t),s=p(e),i=p(r),n=0;return e===r&&(n+=1200),e.endsWith(`/${r}`)&&(n+=1100),s===i&&(n+=900),e.startsWith(`${r}/`)&&(n+=850),e.includes(r)&&(n+=250),n}function h(t){return t.trim().replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}export{S as a,j as b};
2
+ //# sourceMappingURL=chunk-5N5ZC566.js.map
@@ -1,2 +1,2 @@
1
- import{b as A}from"./chunk-2EU6WVR3.js";import{a as _}from"./chunk-CVBS2FD4.js";import{f as R,g as L}from"./chunk-753JWTUH.js";import{b as D}from"./chunk-B75HZHUP.js";import{a as E}from"./chunk-3I34FZ6R.js";import{f as x,g as I}from"./chunk-NLRWGGPY.js";import{a as w}from"./chunk-BGBBVSH4.js";import{d as N}from"./chunk-OO6S4ECV.js";import{b as T,c as h}from"./chunk-NLVKD45E.js";import{a as g}from"./chunk-64MNV6AB.js";import{y as S}from"./chunk-WFRZGMWJ.js";var F={caller:3,"entry-surface":2,rooted:1},O=/not\s*yet\s*implement|not\s*implement|unimplement|\bnyi\b|\btodo\b|\bstub\b|not\s*supported|coming\s*soon/i,P=/^throw\s+new\s+[\w.]*Error\s*\(([\s\S]*)\)\s*;?$/,C=/^return(\s+(null|undefined|false|0|''|""|``|\[\]|\{\}))?\s*;?$/,v=/\/\/\s*TODO\b|\/\*\s*TODO\b/i,K=/(?:=>|\))\s*(?::\s*[^{;=]+)?\s*\{\s*\}\s*;?\s*$/;function et(e,n={}){let{scope:o,limit:r=30,scanLimit:l,semantic:a=!0}=n,s=new E(e),t=D(s.productionCallableDefinitions({scope:o,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),l),c=[];for(let i of t){let m=M(e,i);m&&c.push(m)}if(c.length===0)return[];let d=j(e,c,t),f=c.filter(i=>!d.has(i.def.symbol));if(f.length===0)return[];let p=_(e,s).forDefinitions(f.map(i=>i.def),{semantic:a}),u=[];for(let i of f){let b=p.get(i.def.symbolId)?.realConsumers.length??0,y=B(e,i.def,b);y&&u.push({symbol:i.def.symbol,shortName:N(i.def.symbol),file:i.def.relativePath,startLine:i.def.startLine,endLine:i.def.endLine,loc:w(i.def),stubKind:i.stubKind,reachability:y,callerFanIn:b,stubText:i.stubText})}return u.sort((i,m)=>F[m.reachability]-F[i.reachability]||m.callerFanIn-i.callerFanIn||i.file.localeCompare(m.file)||i.startLine-m.startLine),r?u.slice(0,r):u}function B(e,n,o){return o>0?"caller":I(e,n.symbol,n.relativePath)?"rooted":x(e,n.relativePath)?"entry-surface":null}function M(e,n){let o=R(e,n);if(!o)return null;let r=L(o),l=r.trim();if(l==="")return!z(o)||!A(e,n)?null:{def:n,stubKind:"empty-body",stubText:"(empty body)"};let a=h(r),s=T(r),t=$(a,s);if(t.length!==1)return null;let c=t[0];return U(c)?{def:n,stubKind:"throw-stub",stubText:c.trim()}:v.test(r)&&C.test(c.trim())?{def:n,stubKind:"todo-return-default",stubText:l}:null}function $(e,n){let o=[],r=0,l="";for(let a=0;a<n.length;a+=1){let s=n[a];if(s==="("||s==="["||s==="{"?r+=1:(s===")"||s==="]"||s==="}")&&(r=Math.max(0,r-1)),s===";"&&r===0){o.push(l),l="";continue}l+=e[a]??""}return l.trim()&&o.push(l),o.map(a=>a.trim()).filter(a=>a.length>0)}function U(e){let n=P.exec(e.trim());return n?O.test(n[1]??""):!1}function z(e){return K.test(e.trimEnd())}function j(e,n,o){let r=new Set,l=new Set(n.map(t=>t.def.parentTypeName).filter(t=>t!==null));if(l.size===0)return r;let a=k(e,l),s=new Map;for(let t of o){if(!t.parentTypeName)continue;let c=s.get(t.leaf)??new Set;c.add(t.parentTypeName),s.set(t.leaf,c)}for(let t of n){let c=t.def.parentTypeName;if(!c)continue;let d=a.get(c);if(!d||d.size===0)continue;let f=s.get(t.def.leaf)??new Set;[...d].every(u=>f.has(u))&&r.add(t.def.symbol)}return r}var Y=/\bclass\s+([A-Za-z_$][\w$]*)\s+extends\s+([A-Za-z_$][\w$]*)/g;function k(e,n){let o=new Map;for(let r of g(e,{includeIgnored:!1})){let l=S(e,r);if(l)for(let a of l.matchAll(Y)){let s=a[1],t=a[2];if(!s||!t||!n.has(t))continue;let c=o.get(t)??new Set;c.add(s),o.set(t,c)}}return o}export{et as a};
2
- //# sourceMappingURL=chunk-YD37KSEK.js.map
1
+ import{b as A}from"./chunk-BW4VDICR.js";import{a as _}from"./chunk-V7MX6YUF.js";import{f as R,g as L}from"./chunk-VDHEX6YO.js";import{b as D}from"./chunk-B75HZHUP.js";import{a as E}from"./chunk-BTYDBDX5.js";import{f as x,g as I}from"./chunk-5CJ6AQN7.js";import{a as w}from"./chunk-BGBBVSH4.js";import{d as N}from"./chunk-7XP7ZRSI.js";import{b as T,c as h}from"./chunk-JLZUM476.js";import{a as g}from"./chunk-64MNV6AB.js";import{y as S}from"./chunk-M2TRDR25.js";var F={caller:3,"entry-surface":2,rooted:1},O=/not\s*yet\s*implement|not\s*implement|unimplement|\bnyi\b|\btodo\b|\bstub\b|not\s*supported|coming\s*soon/i,P=/^throw\s+new\s+[\w.]*Error\s*\(([\s\S]*)\)\s*;?$/,C=/^return(\s+(null|undefined|false|0|''|""|``|\[\]|\{\}))?\s*;?$/,v=/\/\/\s*TODO\b|\/\*\s*TODO\b/i,K=/(?:=>|\))\s*(?::\s*[^{;=]+)?\s*\{\s*\}\s*;?\s*$/;function et(e,n={}){let{scope:o,limit:r=30,scanLimit:l,semantic:a=!0}=n,s=new E(e),t=D(s.productionCallableDefinitions({scope:o,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),l),c=[];for(let i of t){let m=M(e,i);m&&c.push(m)}if(c.length===0)return[];let d=j(e,c,t),f=c.filter(i=>!d.has(i.def.symbol));if(f.length===0)return[];let p=_(e,s).forDefinitions(f.map(i=>i.def),{semantic:a}),u=[];for(let i of f){let b=p.get(i.def.symbolId)?.realConsumers.length??0,y=B(e,i.def,b);y&&u.push({symbol:i.def.symbol,shortName:N(i.def.symbol),file:i.def.relativePath,startLine:i.def.startLine,endLine:i.def.endLine,loc:w(i.def),stubKind:i.stubKind,reachability:y,callerFanIn:b,stubText:i.stubText})}return u.sort((i,m)=>F[m.reachability]-F[i.reachability]||m.callerFanIn-i.callerFanIn||i.file.localeCompare(m.file)||i.startLine-m.startLine),r?u.slice(0,r):u}function B(e,n,o){return o>0?"caller":I(e,n.symbol,n.relativePath)?"rooted":x(e,n.relativePath)?"entry-surface":null}function M(e,n){let o=R(e,n);if(!o)return null;let r=L(o),l=r.trim();if(l==="")return!z(o)||!A(e,n)?null:{def:n,stubKind:"empty-body",stubText:"(empty body)"};let a=h(r),s=T(r),t=$(a,s);if(t.length!==1)return null;let c=t[0];return U(c)?{def:n,stubKind:"throw-stub",stubText:c.trim()}:v.test(r)&&C.test(c.trim())?{def:n,stubKind:"todo-return-default",stubText:l}:null}function $(e,n){let o=[],r=0,l="";for(let a=0;a<n.length;a+=1){let s=n[a];if(s==="("||s==="["||s==="{"?r+=1:(s===")"||s==="]"||s==="}")&&(r=Math.max(0,r-1)),s===";"&&r===0){o.push(l),l="";continue}l+=e[a]??""}return l.trim()&&o.push(l),o.map(a=>a.trim()).filter(a=>a.length>0)}function U(e){let n=P.exec(e.trim());return n?O.test(n[1]??""):!1}function z(e){return K.test(e.trimEnd())}function j(e,n,o){let r=new Set,l=new Set(n.map(t=>t.def.parentTypeName).filter(t=>t!==null));if(l.size===0)return r;let a=k(e,l),s=new Map;for(let t of o){if(!t.parentTypeName)continue;let c=s.get(t.leaf)??new Set;c.add(t.parentTypeName),s.set(t.leaf,c)}for(let t of n){let c=t.def.parentTypeName;if(!c)continue;let d=a.get(c);if(!d||d.size===0)continue;let f=s.get(t.def.leaf)??new Set;[...d].every(u=>f.has(u))&&r.add(t.def.symbol)}return r}var Y=/\bclass\s+([A-Za-z_$][\w$]*)\s+extends\s+([A-Za-z_$][\w$]*)/g;function k(e,n){let o=new Map;for(let r of g(e,{includeIgnored:!1})){let l=S(e,r);if(l)for(let a of l.matchAll(Y)){let s=a[1],t=a[2];if(!s||!t||!n.has(t))continue;let c=o.get(t)??new Set;c.add(s),o.set(t,c)}}return o}export{et as a};
2
+ //# sourceMappingURL=chunk-5QSMW5IO.js.map
@@ -1,4 +1,4 @@
1
- import{m as f}from"./chunk-2Y7YX54K.js";import{a as d}from"./chunk-YSUD2S7T.js";import{d as s,h as u,p as m,q as g}from"./chunk-OO6S4ECV.js";import{y as c}from"./chunk-WFRZGMWJ.js";function E(e,r,i={}){let n=d(e,r);if(!n)return{definitions:[],referencedBy:[]};let t=e.get("SELECT display_name, documentation FROM global_symbols WHERE id = ?",n.symbolId),a=g(t?.documentation??null),o=e.isIgnored(n.relativePath)?[]:[{relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,signature:y(a,t?.display_name??null,n.symbol),source:S(e,n.relativePath,n.startLine,n.endLine)}],b=f(e,n,{semantic:i.semantic}).map(l=>({relativePath:l.file,line:l.line,enclosingSymbol:l.enclosingSymbol,enclosingShort:l.enclosingSymbol?s(l.enclosingSymbol):"(top-level)"}));return{definitions:o,referencedBy:b}}function S(e,r,i,n){let t=c(e,r);if(!t)return null;let o=t.split(`
1
+ import{m as f}from"./chunk-FY6RCFDH.js";import{a as d}from"./chunk-2HCWAL42.js";import{d as s,h as u,p as m,q as g}from"./chunk-7XP7ZRSI.js";import{y as c}from"./chunk-M2TRDR25.js";function E(e,r,i={}){let n=d(e,r);if(!n)return{definitions:[],referencedBy:[]};let t=e.get("SELECT display_name, documentation FROM global_symbols WHERE id = ?",n.symbolId),a=g(t?.documentation??null),o=e.isIgnored(n.relativePath)?[]:[{relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,signature:y(a,t?.display_name??null,n.symbol),source:S(e,n.relativePath,n.startLine,n.endLine)}],b=f(e,n,{semantic:i.semantic}).map(l=>({relativePath:l.file,line:l.line,enclosingSymbol:l.enclosingSymbol,enclosingShort:l.enclosingSymbol?s(l.enclosingSymbol):"(top-level)"}));return{definitions:o,referencedBy:b}}function S(e,r,i,n){let t=c(e,r);if(!t)return null;let o=t.split(`
2
2
  `).slice(i,n+1).join(`
3
3
  `).trimEnd();return o.length>0?o:null}function y(e,r,i){let n=m(e);if(n&&!p(n))return n;let t=(r??"").trim();return t?u(i)&&!t.endsWith("()")?`${t}()`:t:s(i)}function p(e){return e.startsWith("undefined")||e.includes("|")||e.includes("```")}export{E as a};
4
- //# sourceMappingURL=chunk-7II7NFRV.js.map
4
+ //# sourceMappingURL=chunk-623AZLTE.js.map
@@ -1,2 +1,2 @@
1
- import{a as v}from"./chunk-YFEJIYWH.js";import{a as j}from"./chunk-IRIM3SUR.js";import{a as w}from"./chunk-7II7NFRV.js";import{a as p}from"./chunk-363TZ64I.js";import{a as H}from"./chunk-XBPAJASV.js";import{a as T}from"./chunk-KI4WPR7Q.js";import{a as P,b as A}from"./chunk-CKIAEVGM.js";import{b as D}from"./chunk-U6BJVXWQ.js";import{a as S}from"./chunk-HLRWOFXC.js";import{a as I}from"./chunk-BFWVHD2P.js";import{a as G}from"./chunk-RLB7FZKR.js";import{a as k}from"./chunk-VSQRU3AP.js";import{a as F}from"./chunk-VZCR3VQY.js";function X(t,e,n={}){let o=n.impactDepth??3,r=n.sliceDepth??3,l=n.semantic,s=!z(e),a=s?w(t,e,{semantic:l}):{definitions:[],referencedBy:[]},m=s?k(t,e,{semantic:l}):null,f=s?I(t,e,{semantic:l}):null,h=s?T(t,e,{semantic:l}):null,y=s?p(t,e,{direction:"backward",maxDepth:r,semantic:l}):null,R=s?p(t,e,{direction:"forward",maxDepth:r,semantic:l}):null,d=s?G(t,e,{maxDepth:o,scope:n.scope}):[],i=F(t,e,{semantic:l}),C=P(t,e),g=A(t,e),u=j(t,e),x=v(t,e),c={symbol:a.definitions.length>0||a.referencedBy.length>0||m!==null||f!==null||h!==null||y!==null||R!==null||d.length>0,file:i!==null||C.length>0||g.length>0,module:u.files.length>0||u.symbols.length>0||x.length>0},b=[];!c.symbol&&!c.file&&!c.module&&b.push("No symbol, file, or module matched target.");let B=i?.file??a.definitions[0]?.relativePath??null;return{target:e,matched:c,history:O(t,B),trace:a,callGraph:m,complexity:f,dataflow:h,backwardSlice:y,forwardSlice:R,affected:d,changeSurface:i,deps:C,rdeps:g,system:u,surface:x,warnings:b}}function O(t,e){let n={available:!1,file:e,churn:null,coChangePartners:[],suppressionsInFile:0};if(!e)return n;let o=S(t).fileChurn();if(!o)return n;let r=D(t,e,{limit:5});return{available:!0,file:e,churn:o.get(e)??{changes:0,fixChanges:0,lastChangedAt:0},coChangePartners:r.findings.map(l=>({file:l.fileA===e?l.fileB:l.fileA,together:l.together,confidence:l.confidence,subjectContext:l.subjectContext})),suppressionsInFile:H(t).byFile.get(e)??0}}function z(t){return t.includes("/")||t.includes("\\")||/\.[A-Za-z0-9]+(?::\d+(?:-\d+)?)?$/.test(t)}export{X as a};
2
- //# sourceMappingURL=chunk-VYQY75NA.js.map
1
+ import{a as v}from"./chunk-FZXN37RN.js";import{a as j}from"./chunk-75H6GOND.js";import{a as w}from"./chunk-623AZLTE.js";import{a as p}from"./chunk-KWQKWY6M.js";import{a as H}from"./chunk-H4T2AST4.js";import{a as T}from"./chunk-G4IUQW27.js";import{a as P,b as A}from"./chunk-PA2MQKXD.js";import{b as D}from"./chunk-GRHA5NGF.js";import{a as S}from"./chunk-X566NT42.js";import{a as I}from"./chunk-PPAT3XUL.js";import{a as G}from"./chunk-IHD2CHMX.js";import{a as k}from"./chunk-IKAJI4SI.js";import{a as F}from"./chunk-MBDBNQBW.js";function X(t,e,n={}){let o=n.impactDepth??3,r=n.sliceDepth??3,l=n.semantic,s=!z(e),a=s?w(t,e,{semantic:l}):{definitions:[],referencedBy:[]},m=s?k(t,e,{semantic:l}):null,f=s?I(t,e,{semantic:l}):null,h=s?T(t,e,{semantic:l}):null,y=s?p(t,e,{direction:"backward",maxDepth:r,semantic:l}):null,R=s?p(t,e,{direction:"forward",maxDepth:r,semantic:l}):null,d=s?G(t,e,{maxDepth:o,scope:n.scope}):[],i=F(t,e,{semantic:l}),C=P(t,e),g=A(t,e),u=j(t,e),x=v(t,e),c={symbol:a.definitions.length>0||a.referencedBy.length>0||m!==null||f!==null||h!==null||y!==null||R!==null||d.length>0,file:i!==null||C.length>0||g.length>0,module:u.files.length>0||u.symbols.length>0||x.length>0},b=[];!c.symbol&&!c.file&&!c.module&&b.push("No symbol, file, or module matched target.");let B=i?.file??a.definitions[0]?.relativePath??null;return{target:e,matched:c,history:O(t,B),trace:a,callGraph:m,complexity:f,dataflow:h,backwardSlice:y,forwardSlice:R,affected:d,changeSurface:i,deps:C,rdeps:g,system:u,surface:x,warnings:b}}function O(t,e){let n={available:!1,file:e,churn:null,coChangePartners:[],suppressionsInFile:0};if(!e)return n;let o=S(t).fileChurn();if(!o)return n;let r=D(t,e,{limit:5});return{available:!0,file:e,churn:o.get(e)??{changes:0,fixChanges:0,lastChangedAt:0},coChangePartners:r.findings.map(l=>({file:l.fileA===e?l.fileB:l.fileA,together:l.together,confidence:l.confidence,subjectContext:l.subjectContext})),suppressionsInFile:H(t).byFile.get(e)??0}}function z(t){return t.includes("/")||t.includes("\\")||/\.[A-Za-z0-9]+(?::\d+(?:-\d+)?)?$/.test(t)}export{X as a};
2
+ //# sourceMappingURL=chunk-6TJERPN3.js.map
@@ -1,4 +1,4 @@
1
- import{b as m}from"./chunk-QB7NRST4.js";import{x as o}from"./chunk-OO6S4ECV.js";function h(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
1
+ import{b as m}from"./chunk-5N5ZC566.js";import{x as o}from"./chunk-7XP7ZRSI.js";function h(t,l){let s=m(t,l);if(s.length===0)return{files:[],symbols:[],dependsOn:[],dependedOnBy:[]};let d=s.map(()=>"?").join(", "),i=t.all(`SELECT relative_path FROM documents
2
2
  WHERE relative_path IN (${d})
3
3
  ORDER BY relative_path`,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e)),n=o(t,i,{onlyDocumented:!0,sort:!0}).map(({relativePath:e,...c})=>c),a=t.all(`SELECT DISTINCT d2.relative_path
4
4
  FROM mentions m
@@ -32,4 +32,4 @@ import{b as m}from"./chunk-QB7NRST4.js";import{x as o}from"./chunk-OO6S4ECV.js";
32
32
  WHERE d2.relative_path IN (${d})
33
33
  AND d1.relative_path NOT IN (${d})
34
34
  ORDER BY d1.relative_path`,...s,...s).map(e=>e.relative_path).filter(e=>!t.isIgnored(e));return{files:i,symbols:n,dependsOn:a,dependedOnBy:r}}export{h as a};
35
- //# sourceMappingURL=chunk-IRIM3SUR.js.map
35
+ //# sourceMappingURL=chunk-75H6GOND.js.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-3I34FZ6R.js";import{a as L}from"./chunk-YSUD2S7T.js";import{d as i,e as b,f as u,l as c}from"./chunk-OO6S4ECV.js";import{f as l}from"./chunk-NLVKD45E.js";import{B as a}from"./chunk-MCNWCJYL.js";function S(o,s){let t=L(o,s);if(!t)return[];let e=new f(o).definitionsForFile(t.relativePath).filter(r=>r.symbol!==t.symbol).filter(r=>c(t.symbol,r.symbol)).sort((r,m)=>r.startLine-m.startLine||r.endLine-m.endLine).map(r=>({symbol:r.symbol,shortName:i(r.symbol),startLine:r.startLine,endLine:r.endLine,kind:u(r.symbol)??"unknown"}));return a(t.relativePath)!=="clojure"?e:d(e,y(o,t))}function y(o,s){let t=b(s.symbol);if(!t)return[];let n=i(s.symbol);return(l(o,s.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===t).map(e=>({symbol:`${s.symbol}${e.memberName}().`,shortName:`${n}:${e.memberName}()`,startLine:e.startLine,endLine:e.endLine,kind:e.memberKind}))}function d(o,s){let t=new Map;for(let n of[...o,...s])t.set(`${n.shortName}:${n.startLine}:${n.endLine}`,n);return[...t.values()].sort((n,e)=>n.startLine-e.startLine||n.endLine-e.endLine)}export{S as a};
2
- //# sourceMappingURL=chunk-Q65QYKU7.js.map
1
+ import{a as f}from"./chunk-BTYDBDX5.js";import{a as L}from"./chunk-2HCWAL42.js";import{d as i,e as b,f as u,l as c}from"./chunk-7XP7ZRSI.js";import{f as l}from"./chunk-JLZUM476.js";import{B as a}from"./chunk-TLTLJ4SW.js";function S(o,s){let t=L(o,s);if(!t)return[];let e=new f(o).definitionsForFile(t.relativePath).filter(r=>r.symbol!==t.symbol).filter(r=>c(t.symbol,r.symbol)).sort((r,m)=>r.startLine-m.startLine||r.endLine-m.endLine).map(r=>({symbol:r.symbol,shortName:i(r.symbol),startLine:r.startLine,endLine:r.endLine,kind:u(r.symbol)??"unknown"}));return a(t.relativePath)!=="clojure"?e:d(e,y(o,t))}function y(o,s){let t=b(s.symbol);if(!t)return[];let n=i(s.symbol);return(l(o,s.relativePath)?.clojureMembers??[]).filter(e=>e.ownerName===t).map(e=>({symbol:`${s.symbol}${e.memberName}().`,shortName:`${n}:${e.memberName}()`,startLine:e.startLine,endLine:e.endLine,kind:e.memberKind}))}function d(o,s){let t=new Map;for(let n of[...o,...s])t.set(`${n.shortName}:${n.startLine}:${n.endLine}`,n);return[...t.values()].sort((n,e)=>n.startLine-e.startLine||n.endLine-e.endLine)}export{S as a};
2
+ //# sourceMappingURL=chunk-7H37Z4UO.js.map
@@ -1,4 +1,4 @@
1
- import{a as _,g as O,j as C,o as $,p as T}from"./chunk-NLVKD45E.js";import{E as N}from"./chunk-MCNWCJYL.js";import{a as h}from"./chunk-64MNV6AB.js";import{c as y,h as S,i as x,o as D,v as R,x as E,y as k,z as M}from"./chunk-WFRZGMWJ.js";var V={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function u(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let n=e.split(" ");if(n.length<4)return{scheme:n[0]??"",manager:n[1]??"",packageName:n[2]??"",version:"",descriptors:[],raw:e};let t=n[0],i=n[1],r=e.slice(t.length+1+i.length+1),s;if(r.startsWith("`")){let l=r.indexOf("`",1);l===-1?(s=r.slice(1),r=""):(s=r.slice(1,l),r=r.slice(l+2))}else{let l=r.indexOf(" ");l===-1?(s=r,r=""):(s=r.slice(0,l),r=r.slice(l+1))}let o,a=r.indexOf(" ");a===-1?(o=r,r=""):(o=r.slice(0,a),r=r.slice(a+1));let c=ee(r);return{scheme:t,manager:i,packageName:s,version:o,descriptors:c,raw:e}}function f(e){let n=u(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let i=n.descriptors[t];if(i?.suffix==="type")return i.name}return null}function ee(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let s=e.indexOf("]",t+1);if(s===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,s),suffix:"type-param"}),t=s+1;continue}if(e[t]==="("&&(n.length===0||t===0||w(e[t-1]))){let s=e.indexOf(")",t+1);if(s!==-1&&e[s+1]!=="."){n.push({name:e.slice(t+1,s),suffix:"parameter"}),t=s+1;continue}}let i;if(e[t]==="`"){let s=e.indexOf("`",t+1);if(s===-1){i=e.slice(t+1),n.push({name:i,suffix:"term"});break}i=e.slice(t+1,s),t=s+1}else{let s=t;for(;t<e.length&&!w(e[t]);)t++;i=e.slice(s,t)}if(t>=e.length){i&&n.push({name:i,suffix:"term"});break}let r=e[t];if(r==="("){let s=e.indexOf(")",t+1);s!==-1&&e[s+1]==="."?(n.push({name:i,suffix:"method"}),t=s+2):s!==-1?(n.push({name:i,suffix:"method"}),t=s+1):(n.push({name:i,suffix:"term"}),t++)}else{let s=V[r];s&&n.push({name:i,suffix:s}),t+=1}}return n}function w(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function A(e){let n=u(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let i=[];for(let r of t.descriptors){let s=ne(r);s&&i.push(s)}return i.join(":")}function ne(e){let n=e.suffix==="namespace"?te(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function te(e){return e.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/,"").replace(/\.(py|pyi)$/,"").replace(/\.(rs)$/,"").replace(/\.(java|scala|kt|kts)$/,"").replace(/\.(rb)$/,"").replace(/\.(go)$/,"").replace(/\.(cs|vb)$/,"").replace(/\.(dart)$/,"").replace(/\.(php)$/,"").replace(/\.(c|cc|cpp|cxx|h|hpp)$/,"")}function v(e){let n=u(e);if("kind"in n&&n.kind==="local")return n.id;let t=n;return t.descriptors.length===0?"":t.descriptors[t.descriptors.length-1].name}function p(e){let n=u(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function Ae(e){return e.endsWith("().")||p(e)==="method"}function P(e){let n=p(e);return n==="method"?!0:n!=="term"?!1:e.endsWith("().")?!0:e.startsWith("rust-analyzer ")&&e.includes("#")?!1:e.startsWith("scip-typescript ")?!/#[A-Za-z0-9_$]+\.$/.test(e):!0}function ve(e){return p(e)==="namespace"}var ie=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function Pe(e){return ie.test(e)}var re=new Set(["test","tests","_tests"]);function Qe(e){let n=u(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let i=n.descriptors[t];if(i?.suffix==="namespace"&&i.name&&re.has(i.name))return!0}return!1}function je(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length!==r.length+1)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Be(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length<=r.length)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Je(e,n){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
1
+ import{a as _,g as O,j as C,o as $,p as T}from"./chunk-JLZUM476.js";import{E as N}from"./chunk-TLTLJ4SW.js";import{a as h}from"./chunk-64MNV6AB.js";import{c as y,h as S,i as x,o as D,v as R,x as E,y as k,z as M}from"./chunk-M2TRDR25.js";var V={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function u(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let n=e.split(" ");if(n.length<4)return{scheme:n[0]??"",manager:n[1]??"",packageName:n[2]??"",version:"",descriptors:[],raw:e};let t=n[0],i=n[1],r=e.slice(t.length+1+i.length+1),s;if(r.startsWith("`")){let l=r.indexOf("`",1);l===-1?(s=r.slice(1),r=""):(s=r.slice(1,l),r=r.slice(l+2))}else{let l=r.indexOf(" ");l===-1?(s=r,r=""):(s=r.slice(0,l),r=r.slice(l+1))}let o,a=r.indexOf(" ");a===-1?(o=r,r=""):(o=r.slice(0,a),r=r.slice(a+1));let c=ee(r);return{scheme:t,manager:i,packageName:s,version:o,descriptors:c,raw:e}}function f(e){let n=u(e);if("kind"in n)return null;for(let t=n.descriptors.length-2;t>=0;t--){let i=n.descriptors[t];if(i?.suffix==="type")return i.name}return null}function ee(e){let n=[],t=0;for(;t<e.length;){if(e[t]==="["){let s=e.indexOf("]",t+1);if(s===-1){n.push({name:e.slice(t+1),suffix:"type-param"});break}n.push({name:e.slice(t+1,s),suffix:"type-param"}),t=s+1;continue}if(e[t]==="("&&(n.length===0||t===0||w(e[t-1]))){let s=e.indexOf(")",t+1);if(s!==-1&&e[s+1]!=="."){n.push({name:e.slice(t+1,s),suffix:"parameter"}),t=s+1;continue}}let i;if(e[t]==="`"){let s=e.indexOf("`",t+1);if(s===-1){i=e.slice(t+1),n.push({name:i,suffix:"term"});break}i=e.slice(t+1,s),t=s+1}else{let s=t;for(;t<e.length&&!w(e[t]);)t++;i=e.slice(s,t)}if(t>=e.length){i&&n.push({name:i,suffix:"term"});break}let r=e[t];if(r==="("){let s=e.indexOf(")",t+1);s!==-1&&e[s+1]==="."?(n.push({name:i,suffix:"method"}),t=s+2):s!==-1?(n.push({name:i,suffix:"method"}),t=s+1):(n.push({name:i,suffix:"term"}),t++)}else{let s=V[r];s&&n.push({name:i,suffix:s}),t+=1}}return n}function w(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function A(e){let n=u(e);if("kind"in n&&n.kind==="local")return`local:${n.id}`;let t=n;if(t.descriptors.length===0)return t.raw;let i=[];for(let r of t.descriptors){let s=ne(r);s&&i.push(s)}return i.join(":")}function ne(e){let n=e.suffix==="namespace"?te(e.name):e.name;return n?e.suffix==="method"?`${n}()`:n:""}function te(e){return e.replace(/\.(ts|tsx|js|jsx|mjs|cjs)$/,"").replace(/\.(py|pyi)$/,"").replace(/\.(rs)$/,"").replace(/\.(java|scala|kt|kts)$/,"").replace(/\.(rb)$/,"").replace(/\.(go)$/,"").replace(/\.(cs|vb)$/,"").replace(/\.(dart)$/,"").replace(/\.(php)$/,"").replace(/\.(c|cc|cpp|cxx|h|hpp)$/,"")}function v(e){let n=u(e);if("kind"in n&&n.kind==="local")return n.id;let t=n;return t.descriptors.length===0?"":t.descriptors[t.descriptors.length-1].name}function p(e){let n=u(e);if("kind"in n&&n.kind==="local")return null;let t=n;return t.descriptors[t.descriptors.length-1]?.suffix??null}function Ae(e){return e.endsWith("().")||p(e)==="method"}function P(e){let n=p(e);return n==="method"?!0:n!=="term"?!1:e.endsWith("().")?!0:e.startsWith("rust-analyzer ")&&e.includes("#")?!1:e.startsWith("scip-typescript ")?!/#[A-Za-z0-9_$]+\.$/.test(e):!0}function ve(e){return p(e)==="namespace"}var ie=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function Pe(e){return ie.test(e)}var re=new Set(["test","tests","_tests"]);function Qe(e){let n=u(e);if("kind"in n)return!1;for(let t=0;t<n.descriptors.length-1;t+=1){let i=n.descriptors[t];if(i?.suffix==="namespace"&&i.name&&re.has(i.name))return!0}return!1}function je(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length!==r.length+1)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Be(e,n){let t=u(e),i=u(n);if("kind"in t||"kind"in i)return!1;let r=t.descriptors,s=i.descriptors;if(s.length<=r.length)return!1;for(let o=0;o<r.length;o++){let a=r[o],c=s[o];if(a.name!==c.name||a.suffix!==c.suffix)return!1}return!0}function Je(e,n){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
2
2
  FROM global_symbols gs
3
3
  JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
4
4
  JOIN documents d ON der.document_id = d.id
@@ -109,4 +109,4 @@ import{a as _,g as O,j as C,o as $,p as T}from"./chunk-NLVKD45E.js";import{E as
109
109
  ${e.symbolNoiseFor("gs")}
110
110
  GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
111
111
  ORDER BY d.relative_path, start_line, end_line`,...s)}function Se(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function Z(e,n){return n==="callable"?Se(e):xe(e)}function xe(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function U(e){let n=new Map;for(let t of e){let i=n.get(t.relative_path);i?i.push(t):n.set(t.relative_path,[t])}return n}function pn(e,n,t={}){if(n.length===0)return[];let i=n.flatMap(r=>F(e,r)).filter(r=>!e.isIgnored(r.relativePath));return t.onlyDocumented&&(i=i.filter(r=>r.documentation!==null&&r.documentation!=="")),t.sort&&(i=i.sort((r,s)=>r.relativePath.localeCompare(s.relativePath)||r.startLine-s.startLine||r.endLine-s.endLine)),i.map(r=>({startLine:r.startLine,endLine:r.endLine,symbol:r.symbol,shortName:A(r.symbol),signature:z(J(r.documentation)),relativePath:r.relativePath,enclosingSymbol:r.enclosingSymbol}))}function he(e){let n=new Map,t=e.map((i,r)=>({definition:i,index:r,span:i.endLine-i.startLine})).sort((i,r)=>i.span-r.span||i.index-r.index);for(let{definition:i}of t)for(let r=i.startLine;r<=i.endLine;r+=1)n.has(r)||n.set(r,i);return n}function gn(e,n){let t=H.get(e);return t||(t=he(e),H.set(e,t)),t.get(n)??null}function bn(e,n){let t=F(e,n.relative_path).find(i=>i.symbolId===n.id);return t?{symbolId:t.symbolId,symbol:t.symbol,documentId:t.documentId,startLine:t.startLine,startChar:t.startChar,endLine:t.endLine,endChar:t.endChar,relativePath:t.relativePath}:{symbolId:n.id,symbol:n.symbol,documentId:n.document_id,startLine:n.start_line,startChar:n.start_char??0,endLine:n.end_line,endChar:n.end_char??0,relativePath:n.relative_path}}function q(e,n,t){let i=g(e).forFile(n,{text:!0}).text,r=C(e,n);return r?Re(t,r,i):i?De(t,i):t}function De(e,n){let t=n.split(/\r?\n/),i=_e(e,t),r=Ie(e,i),s=Le(r,t);return Fe(e,s)}function _e(e,n){let t=e.some(r=>b(r.symbol))?$e(n):null,i=new Map;for(let r of e)i.set(r.symbolId,Ce(n,t,r));return i}function Ie(e,n){return e.filter(t=>b(t.symbol)).map(t=>({definition:t,startLine:n.get(t.symbolId)??t.startLine})).sort((t,i)=>t.startLine-i.startLine||t.definition.startLine-i.definition.startLine||t.definition.symbol.localeCompare(i.definition.symbol))}function Le(e,n){let t=new Map;for(let i=0;i<e.length;i+=1){let r=e[i],s=e[i+1],o=s?Math.max(r.startLine,s.startLine-1):n.length-1;t.set(r.definition.symbolId,{startLine:r.startLine,endLine:Te(n,r.definition,r.startLine,o)})}return t}function Fe(e,n){return e.map(t=>{let i=n.get(t.symbolId);return i?{...t,startLine:i.startLine,endLine:i.endLine}:t})}function Re(e,n,t=null){let i=new Map;for(let r of n){let s=i.get(r.name);s?s.push(r):i.set(r.name,[r])}return e.map(r=>{if(!Oe(r)||!r.leaf)return G(r,t);let s=i.get(r.leaf);if(!s||s.length===0)return G(r,t);let o=t?Ee(r,s,t):null;if(o)return{...r,startLine:o.startLine,endLine:o.endLine};let a=s[0],c=Math.abs(a.startLine-r.startLine);for(let l=1;l<s.length;l+=1){let d=s[l],m=Math.abs(d.startLine-r.startLine);m<c&&(a=d,c=m)}return{...r,startLine:a.startLine,endLine:a.endLine}})}function Ee(e,n,t){let i=ke(e.symbol);if(!i)return null;let r=t.split(/\r?\n/),s=new RegExp(`\\b${_(i)}\\b`);for(let o of n){let a=Me(r,o.startLine);if(a&&s.test(a))return o}return null}function ke(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function Me(e,n){for(let t=n;t>=0;t-=1){let i=e[t]?.trim()??"";if(i){if(/^impl\b/.test(i))return Ne(e,t,n);if(/^(?:struct|enum|trait|mod)\b/.test(i))return null}}return null}function Ne(e,n,t){let i=[];for(let r=n;r<=t;r+=1){let s=e[r]??"";if(i.push(s),s.includes("{"))break}return i.join(" ")}function Oe(e){return b(e.symbol)?!0:p(e.symbol)==="term"&&f(e.symbol)===null}function G(e,n){if(!n||!e.leaf||p(e.symbol)!=="term"||f(e.symbol)!==null)return e;let t=_(e.leaf),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${t}\\b`),s=n.split(/\r?\n/).findIndex(o=>i.test(o));return s>=0?{...e,startLine:s,endLine:s}:e}function Ce(e,n,t){if(!b(t.symbol))return t.startLine;let i=Math.max(0,Math.min(t.startLine,e.length-1));if(!n)return i;let r=n.get(t.leaf);if(!r||r.length===0)return i;let s=null;for(let o of r){let a=Math.abs(o-t.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??i}function $e(e){let n=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,t=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,i=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,r=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,o=(a,c)=>{let l=s.get(a);if(!l){s.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let d of c.matchAll(n))d[1]&&o(d[1],a);for(let d of c.matchAll(t))d[1]&&o(d[1],a);let l=c.match(i);l?.[1]&&o(l[1],a);for(let d of c.matchAll(r))d[1]&&o(d[1],a)}return s}function Te(e,n,t,i){let r=Math.max(t,Math.min(e.length-1,i)),s=Math.max(t,Math.min(r,n.endLine)),o=0,a=0,c=!1;for(let l=t;l<=r;l+=1){let d=we(e[l]??"");for(let m of d)m==="{"?(o+=1,c=!0):m==="}"?o=Math.max(0,o-1):m==="("?a+=1:m===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=s)return l}return s}function we(e){let n="",t=null,i=!1;for(let r=0;r<e.length;r+=1){let s=e[r],o=e[r+1];if(!t&&s==="/"&&o==="/"){n+=" ".repeat(e.length-r);break}if(t){if(i){i=!1,n+=" ";continue}if(s==="\\"){i=!0,n+=" ";continue}s===t&&(t=null),n+=" ";continue}if(s==='"'||s==="'"||s==="`"){t=s,n+=" ";continue}n+=s}return n}function b(e){return e.includes("().")}function yn(e){let n=u(e);if("kind"in n)return[];let t=[];for(let i=n.descriptors.length-2;i>=0;i-=1){let r=n.descriptors[i];r?.suffix==="type"&&r.name&&t.push(r.name)}return t}export{g as a,u as b,f as c,A as d,v as e,p as f,Ae as g,P as h,ve as i,Pe as j,Qe as k,je as l,Be as m,Je as n,We as o,z as p,J as q,I as r,F as s,un as t,ge as u,mn as v,fn as w,pn as x,he as y,gn as z,bn as A,yn as B};
112
- //# sourceMappingURL=chunk-OO6S4ECV.js.map
112
+ //# sourceMappingURL=chunk-7XP7ZRSI.js.map
@@ -1,4 +1,4 @@
1
- import{a as _}from"./chunk-QB7NRST4.js";import{a as r}from"./chunk-YSUD2S7T.js";import{a as l}from"./chunk-G4KQ7S74.js";import{d as c}from"./chunk-OO6S4ECV.js";function y(n,o){let e=r(n,o);if(!e)return[];let i=n.get(`SELECT COUNT(DISTINCT c.document_id) AS file_count
1
+ import{a as _}from"./chunk-5N5ZC566.js";import{a as r}from"./chunk-2HCWAL42.js";import{a as l}from"./chunk-QEIGJJBC.js";import{d as c}from"./chunk-7XP7ZRSI.js";function y(n,o){let e=r(n,o);if(!e)return[];let i=n.get(`SELECT COUNT(DISTINCT c.document_id) AS file_count
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN (
@@ -70,4 +70,4 @@ import{a as _}from"./chunk-QB7NRST4.js";import{a as r}from"./chunk-YSUD2S7T.js";
70
70
  GROUP BY d.id
71
71
  ORDER BY symbol_count DESC
72
72
  LIMIT ?`,...m,e).filter(t=>!n.isIgnored(t.relative_path)).map(t=>({name:t.relative_path,count:t.symbol_count}))}export{y as a,b,p as c,I as d};
73
- //# sourceMappingURL=chunk-5TVNLPUM.js.map
73
+ //# sourceMappingURL=chunk-7Z5UT44B.js.map
@@ -1,2 +1,2 @@
1
- import{d as D}from"./chunk-SOCS3467.js";import{f as m,g as p}from"./chunk-753JWTUH.js";import{a as L}from"./chunk-2HFXPIBT.js";import{b as v}from"./chunk-B75HZHUP.js";import{a as E}from"./chunk-3I34FZ6R.js";import{a as C}from"./chunk-BGBBVSH4.js";import{a as y}from"./chunk-UO4IADXJ.js";import{b}from"./chunk-YSUD2S7T.js";import{d as f,s as g}from"./chunk-OO6S4ECV.js";import{c as u,f as h}from"./chunk-NLVKD45E.js";var A=/^(?:validate|verify|check|assert)(?:[A-Z].*)?$/,N=/^(?:is|has)(?:[A-Z].*)?$/,S=/[{,]\s*(?:ok|success|valid|isValid)\s*:\s*false\b/,d=/\breturn\b/g,k=/\bfunction\b|=>|\)\s*(?::\s*[^{;=]+)?\s*\{/,I=/\.(?:addIssue|push)\s*\(/;function Y(e,t={}){let{scope:n,limit:i=30,scanLimit:l}=t,a=new E(e),r=v(a.productionCallableDefinitions({scope:n,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),l),s=[];for(let o of r){let c=w(e,o);c&&s.push({symbol:o.symbol,shortName:f(o.symbol),file:o.relativePath,startLine:o.startLine,endLine:o.endLine,loc:C(o),...c})}return s.sort((o,c)=>o.file.localeCompare(c.file)||o.startLine-c.startLine||o.loc-c.loc),i?s.slice(0,i):s}function _(e){return A.test(e)?"imperative":N.test(e)?"predicate":null}function w(e,t){let n=_(t.leaf);if(!n||L(e,t))return null;let i=m(e,t);if(!i||!k.test(i))return null;let l=h(e,t.relativePath)?.callables.find(r=>r.startLine===t.startLine&&r.endLine===t.endLine);if(n==="predicate"&&l?.paramCount===0)return null;if(D(i)){let r=K(e,t);return!r||T(r.body,R(r.snippet))||x(r.body)?null:{nameKind:n,resolvedVia:"one-hop-delegate",delegateTarget:r.shortName}}let a=p(i);return T(a,R(i))||x(a)?null:{nameKind:n,resolvedVia:"direct"}}var P=new Set(["if","for","while","switch","catch","function"]);function x(e){let t=u(e);for(let n of t.matchAll(/\b([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\(/g))if(!P.has(n[1]))return!0;return!1}function R(e){let t=e.indexOf("=>");return t===-1?!1:!/^\s*\{/.test(e.slice(t+2))}function T(e,t){let n=u(e);if(/\bthrow\b/.test(n)||/\.reject\s*\(/.test(n)||S.test(n)||I.test(n))return!0;let i=F(n);if(t&&i.length===0){let l=n.trim();return l!==""&&l!=="true"}for(let l of i)if(l!==""&&l!=="true")return!0;return!1}function F(e){let t=[];d.lastIndex=0;let n;for(;n=d.exec(e);){let i=n.index+n[0].length,l=0,a=e.length;for(let r=i;r<e.length;r+=1){let s=e[r];if(s==="("||s==="["||s==="{")l+=1;else if(s===")"||s==="]"||s==="}"){if(l===0){a=r;break}l-=1}else if(s===";"&&l===0){a=r;break}}t.push(e.slice(i,a).trim()),d.lastIndex=a}return t}function K(e,t){let n=y(e,t,{callableOnly:!0,limit:3}),i=[...new Set(n.map(o=>o.symbol))].filter(o=>o!==t.symbol);if(i.length!==1)return null;let a=b(e,i[0]).match;if(!a)return null;let r=g(e,a.relativePath).find(o=>o.symbolId===a.symbolId);if(!r)return null;let s=m(e,r);return s?{body:p(s),snippet:s,shortName:f(r.symbol)}:null}export{Y as a};
2
- //# sourceMappingURL=chunk-RQWNF2RM.js.map
1
+ import{d as D}from"./chunk-HGO3D2JD.js";import{f as m,g as p}from"./chunk-VDHEX6YO.js";import{a as L}from"./chunk-UWR52GNZ.js";import{b as v}from"./chunk-B75HZHUP.js";import{a as E}from"./chunk-BTYDBDX5.js";import{a as C}from"./chunk-BGBBVSH4.js";import{a as y}from"./chunk-3YEBIYXL.js";import{b}from"./chunk-2HCWAL42.js";import{d as f,s as g}from"./chunk-7XP7ZRSI.js";import{c as u,f as h}from"./chunk-JLZUM476.js";var A=/^(?:validate|verify|check|assert)(?:[A-Z].*)?$/,N=/^(?:is|has)(?:[A-Z].*)?$/,S=/[{,]\s*(?:ok|success|valid|isValid)\s*:\s*false\b/,d=/\breturn\b/g,k=/\bfunction\b|=>|\)\s*(?::\s*[^{;=]+)?\s*\{/,I=/\.(?:addIssue|push)\s*\(/;function Y(e,t={}){let{scope:n,limit:i=30,scanLimit:l}=t,a=new E(e),r=v(a.productionCallableDefinitions({scope:n,minLoc:1,requireFunctionLikeSymbol:!0,excludeTypesFiles:!0}),l),s=[];for(let o of r){let c=w(e,o);c&&s.push({symbol:o.symbol,shortName:f(o.symbol),file:o.relativePath,startLine:o.startLine,endLine:o.endLine,loc:C(o),...c})}return s.sort((o,c)=>o.file.localeCompare(c.file)||o.startLine-c.startLine||o.loc-c.loc),i?s.slice(0,i):s}function _(e){return A.test(e)?"imperative":N.test(e)?"predicate":null}function w(e,t){let n=_(t.leaf);if(!n||L(e,t))return null;let i=m(e,t);if(!i||!k.test(i))return null;let l=h(e,t.relativePath)?.callables.find(r=>r.startLine===t.startLine&&r.endLine===t.endLine);if(n==="predicate"&&l?.paramCount===0)return null;if(D(i)){let r=K(e,t);return!r||T(r.body,R(r.snippet))||x(r.body)?null:{nameKind:n,resolvedVia:"one-hop-delegate",delegateTarget:r.shortName}}let a=p(i);return T(a,R(i))||x(a)?null:{nameKind:n,resolvedVia:"direct"}}var P=new Set(["if","for","while","switch","catch","function"]);function x(e){let t=u(e);for(let n of t.matchAll(/\b([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*)\s*\(/g))if(!P.has(n[1]))return!0;return!1}function R(e){let t=e.indexOf("=>");return t===-1?!1:!/^\s*\{/.test(e.slice(t+2))}function T(e,t){let n=u(e);if(/\bthrow\b/.test(n)||/\.reject\s*\(/.test(n)||S.test(n)||I.test(n))return!0;let i=F(n);if(t&&i.length===0){let l=n.trim();return l!==""&&l!=="true"}for(let l of i)if(l!==""&&l!=="true")return!0;return!1}function F(e){let t=[];d.lastIndex=0;let n;for(;n=d.exec(e);){let i=n.index+n[0].length,l=0,a=e.length;for(let r=i;r<e.length;r+=1){let s=e[r];if(s==="("||s==="["||s==="{")l+=1;else if(s===")"||s==="]"||s==="}"){if(l===0){a=r;break}l-=1}else if(s===";"&&l===0){a=r;break}}t.push(e.slice(i,a).trim()),d.lastIndex=a}return t}function K(e,t){let n=y(e,t,{callableOnly:!0,limit:3}),i=[...new Set(n.map(o=>o.symbol))].filter(o=>o!==t.symbol);if(i.length!==1)return null;let a=b(e,i[0]).match;if(!a)return null;let r=g(e,a.relativePath).find(o=>o.symbolId===a.symbolId);if(!r)return null;let s=m(e,r);return s?{body:p(s),snippet:s,shortName:f(r.symbol)}:null}export{Y as a};
2
+ //# sourceMappingURL=chunk-BBTVIIOI.js.map
@@ -1,2 +1,2 @@
1
- import{b as o}from"./chunk-B75HZHUP.js";import{s as u}from"./chunk-WFRZGMWJ.js";function P(e){let t=m(e.profile?.name),r=()=>{let d=e.candidates(),a=e.filterCandidate?d.filter(e.filterCandidate):d,C=e.orderCandidates?[...a].sort(e.orderCandidates):a,i=o(C,e.scanLimit);t={pipeline:e.profile?.name,loadedCandidates:d.length,filteredCandidates:a.length,scannedCandidates:i.length,evaluatedCandidates:0,matchedResults:0,emittedResults:0,scanLimitApplied:i.length<a.length,resultLimitApplied:!1};let f=e.prepare?.(i)??void 0,n=[];for(let c of i){t.evaluatedCandidates+=1;let s=e.evaluate(c,f);s&&n.push(s)}t.matchedResults=n.length,e.orderResults&&n.sort(e.orderResults);let l=typeof e.limit=="number"?n.slice(0,e.limit):n;return t.emittedResults=l.length,t.resultLimitApplied=l.length<n.length,e.onProfile?.({...t}),l};return e.profile?u(`candidate-pipeline:${e.profile.name}`,r,()=>({...p(e.profile?.metadata),...t})):r()}function m(e){return{pipeline:e,loadedCandidates:0,filteredCandidates:0,scannedCandidates:0,evaluatedCandidates:0,matchedResults:0,emittedResults:0,scanLimitApplied:!1,resultLimitApplied:!1}}function p(e){return typeof e=="function"?e():e??{}}export{P as a};
2
- //# sourceMappingURL=chunk-MZB3DTHW.js.map
1
+ import{b as o}from"./chunk-B75HZHUP.js";import{s as u}from"./chunk-M2TRDR25.js";function P(e){let t=m(e.profile?.name),r=()=>{let d=e.candidates(),a=e.filterCandidate?d.filter(e.filterCandidate):d,C=e.orderCandidates?[...a].sort(e.orderCandidates):a,i=o(C,e.scanLimit);t={pipeline:e.profile?.name,loadedCandidates:d.length,filteredCandidates:a.length,scannedCandidates:i.length,evaluatedCandidates:0,matchedResults:0,emittedResults:0,scanLimitApplied:i.length<a.length,resultLimitApplied:!1};let f=e.prepare?.(i)??void 0,n=[];for(let c of i){t.evaluatedCandidates+=1;let s=e.evaluate(c,f);s&&n.push(s)}t.matchedResults=n.length,e.orderResults&&n.sort(e.orderResults);let l=typeof e.limit=="number"?n.slice(0,e.limit):n;return t.emittedResults=l.length,t.resultLimitApplied=l.length<n.length,e.onProfile?.({...t}),l};return e.profile?u(`candidate-pipeline:${e.profile.name}`,r,()=>({...p(e.profile?.metadata),...t})):r()}function m(e){return{pipeline:e,loadedCandidates:0,filteredCandidates:0,scannedCandidates:0,evaluatedCandidates:0,matchedResults:0,emittedResults:0,scanLimitApplied:!1,resultLimitApplied:!1}}function p(e){return typeof e=="function"?e():e??{}}export{P as a};
2
+ //# sourceMappingURL=chunk-BGUYAA3Q.js.map
@@ -1,2 +1,2 @@
1
- import{b as I,f as W,g as Y}from"./chunk-NLRWGGPY.js";import{a as x}from"./chunk-BGBBVSH4.js";import{b as U,d as X,e as Z,f as $}from"./chunk-UO4IADXJ.js";import{a as _,f as z,g as J,i as N,j as Q}from"./chunk-2Y7YX54K.js";import{a as B}from"./chunk-G4KQ7S74.js";import{a as j,g as k,h as T,j as V,k as G,s as D,u as H,v as O,w as P}from"./chunk-OO6S4ECV.js";import{m as F}from"./chunk-NLVKD45E.js";import{B as R,C as E,L as K}from"./chunk-MCNWCJYL.js";import{a as q}from"./chunk-64MNV6AB.js";import{B as h,s as w,y as A}from"./chunk-WFRZGMWJ.js";function ee(n,e,t){let r=e.identifierResolution==="strict"?N:Q,l=e.candidateNames?z(e.candidateNames):null,o=0,f=0,m=0,p=0,y="";for(let a of e.paths)if(o+=1,y=a,!(!R(a)&&!(e.includeVueSfc&&E(a)))&&!n.isIgnored(a)&&!e.skipPath?.(a))try{if(l&&!J(A(n,a),l))continue;f+=1;let S=(s,u,v,b)=>{if(e.candidateNames&&!e.candidateNames.has(s))return;m+=1;let g=e.resolveTargets?e.resolveTargets({sourceFile:a,name:s,kind:u,defaultTargets:b}):b();for(let L of g)p+=1,t({sourceFile:a,name:s,target:L,occurrences:v,kind:u})},M=_(n,a);for(let[s,u]of M)S(s,"identifier",u.length,()=>r(n,a,s));for(let s of F(n,a,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let u=s.kind==="cross-language-dispatch"?()=>N(n,a,s.name):()=>r(n,a,s.name);S(s.name,s.kind,s.occurrences,u)}}finally{e.afterPath?.(a),o%10===0&&w("source-reference-scan.progress",()=>{},()=>({scannedPaths:o,currentPath:y,candidateMatchedPaths:f,visitedNames:m,visitedHits:p}))}}function ne(n,e={}){let{scope:t,files:r,minLoc:l=1,maxLoc:o=Number.POSITIVE_INFINITY,excludeSymbol:f,excludeEntrySurfaces:m=!1,excludeTypesFiles:p=!1,excludeRootedSymbols:y=!1,requireFunctionLikeSymbol:a=!1,requireCallableSymbol:C=!1,excludeRustTraitImplMembers:S=!1,includeSuppressed:M=!1,sortByLocDesc:s=!1}=e,u=[],v=re(n,{scope:t,files:r,requireFunctionLikeSymbol:a,requireCallableSymbol:C}),b=new Map,g=new Map,L=i=>{let c=b.get(i);if(c!==void 0)return c;let d=W(n,i);return b.set(i,d),d},ie=i=>{let c=g.get(i);if(c!==void 0)return c;let d=I(i);return g.set(i,d),d};for(let i of v){let c=i.relativePath;if(n.isIgnored(c)||m&&L(c)||!oe(i,{requireFunctionLikeSymbol:a,requireCallableSymbol:C})||f!==void 0&&i.symbol===f)continue;let d=x(i);d<l||d>o||p&&ae(c)||y&&Y(n,i.symbol,c)||S&&V(i.symbol)||ie(c)!=="test"&&(G(i.symbol)||!M&&h(n,c,i.startLine)||u.push(i))}return s?u.sort((i,c)=>x(c)-x(i)):u}function re(n,e){return e.files!==void 0?[...new Set(e.files.map(r=>r.replace(/\\/g,"/")))].sort().filter(r=>!e.scope||r.includes(e.scope)).flatMap(r=>D(n,r)):e.requireCallableSymbol?P(n,{scope:e.scope,symbolMatches:k,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?P(n,{scope:e.scope,symbolMatches:T,sqlPrefilter:"function-like"}):O(n,e.scope)}function oe(n,e){return e.requireCallableSymbol?k(n.symbol):e.requireFunctionLikeSymbol?T(n.symbol):n.isFunctionLike}function ae(n){return(n.split("/").pop()??"").includes("types")}var te=class{constructor(e){this.db=e}db;scopedDefinitions(e){return H(this.db,e)}definitionsForFile(e){return D(this.db,e)}productionCallableDefinitions(e={}){return ne(this.db,e)}calleeMap(e,t={}){return U(this.db,e,t)}crossFileCallerMap(e,t={}){return X(this.db,e,t)}sourceFallbackCallerFiles(e,t={}){return Z(this.db,e,t)}callerFileMap(e,t={}){return $(this.db,e,t)}frameworkReferencedSymbolIds(e){let t=new Map;for(let l of e){if(!l.leaf)continue;let o=t.get(l.leaf)??[];o.push(l.symbolId),t.set(l.leaf,o)}let r=new Set;for(let l of q(this.db,{includeIgnored:!1}))if(R(l)==="rust")for(let{name:o}of F(this.db,l,{includeRustAttributeNames:!0}))for(let f of t.get(o)??[])r.add(f);return r}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let r=new Map(e.map(o=>[o.symbolId,o.symbol])),l=this.calleeMap(e,t);return new Set([...l.entries()].filter(([o,f])=>{let m=r.get(o);return f.some(p=>p.symbol!==m)}).map(([o])=>o))}fileDependencyGraph(e){return B(this.db,e)}fileKind(e){return I(e)}hasSuppressionComment(e){return h(this.db,e.relativePath,e.startLine)}sourceFiles(){return K(this.db)}scanSourceReferences(e,t){ee(this.db,e,t)}callableSignature(e){let t=j(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(r=>r.startLine===e.startLine&&r.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};export{te as a};
2
- //# sourceMappingURL=chunk-3I34FZ6R.js.map
1
+ import{b as I,f as W,g as Y}from"./chunk-5CJ6AQN7.js";import{a as x}from"./chunk-BGBBVSH4.js";import{b as U,d as X,e as Z,f as $}from"./chunk-3YEBIYXL.js";import{a as _,f as z,g as J,i as N,j as Q}from"./chunk-FY6RCFDH.js";import{a as B}from"./chunk-QEIGJJBC.js";import{a as j,g as k,h as T,j as V,k as G,s as D,u as H,v as O,w as P}from"./chunk-7XP7ZRSI.js";import{m as F}from"./chunk-JLZUM476.js";import{B as R,C as E,L as K}from"./chunk-TLTLJ4SW.js";import{a as q}from"./chunk-64MNV6AB.js";import{B as h,s as w,y as A}from"./chunk-M2TRDR25.js";function ee(n,e,t){let r=e.identifierResolution==="strict"?N:Q,l=e.candidateNames?z(e.candidateNames):null,o=0,f=0,m=0,p=0,y="";for(let a of e.paths)if(o+=1,y=a,!(!R(a)&&!(e.includeVueSfc&&E(a)))&&!n.isIgnored(a)&&!e.skipPath?.(a))try{if(l&&!J(A(n,a),l))continue;f+=1;let S=(s,u,v,b)=>{if(e.candidateNames&&!e.candidateNames.has(s))return;m+=1;let g=e.resolveTargets?e.resolveTargets({sourceFile:a,name:s,kind:u,defaultTargets:b}):b();for(let L of g)p+=1,t({sourceFile:a,name:s,target:L,occurrences:v,kind:u})},M=_(n,a);for(let[s,u]of M)S(s,"identifier",u.length,()=>r(n,a,s));for(let s of F(n,a,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let u=s.kind==="cross-language-dispatch"?()=>N(n,a,s.name):()=>r(n,a,s.name);S(s.name,s.kind,s.occurrences,u)}}finally{e.afterPath?.(a),o%10===0&&w("source-reference-scan.progress",()=>{},()=>({scannedPaths:o,currentPath:y,candidateMatchedPaths:f,visitedNames:m,visitedHits:p}))}}function ne(n,e={}){let{scope:t,files:r,minLoc:l=1,maxLoc:o=Number.POSITIVE_INFINITY,excludeSymbol:f,excludeEntrySurfaces:m=!1,excludeTypesFiles:p=!1,excludeRootedSymbols:y=!1,requireFunctionLikeSymbol:a=!1,requireCallableSymbol:C=!1,excludeRustTraitImplMembers:S=!1,includeSuppressed:M=!1,sortByLocDesc:s=!1}=e,u=[],v=re(n,{scope:t,files:r,requireFunctionLikeSymbol:a,requireCallableSymbol:C}),b=new Map,g=new Map,L=i=>{let c=b.get(i);if(c!==void 0)return c;let d=W(n,i);return b.set(i,d),d},ie=i=>{let c=g.get(i);if(c!==void 0)return c;let d=I(i);return g.set(i,d),d};for(let i of v){let c=i.relativePath;if(n.isIgnored(c)||m&&L(c)||!oe(i,{requireFunctionLikeSymbol:a,requireCallableSymbol:C})||f!==void 0&&i.symbol===f)continue;let d=x(i);d<l||d>o||p&&ae(c)||y&&Y(n,i.symbol,c)||S&&V(i.symbol)||ie(c)!=="test"&&(G(i.symbol)||!M&&h(n,c,i.startLine)||u.push(i))}return s?u.sort((i,c)=>x(c)-x(i)):u}function re(n,e){return e.files!==void 0?[...new Set(e.files.map(r=>r.replace(/\\/g,"/")))].sort().filter(r=>!e.scope||r.includes(e.scope)).flatMap(r=>D(n,r)):e.requireCallableSymbol?P(n,{scope:e.scope,symbolMatches:k,sqlPrefilter:"callable"}):e.requireFunctionLikeSymbol?P(n,{scope:e.scope,symbolMatches:T,sqlPrefilter:"function-like"}):O(n,e.scope)}function oe(n,e){return e.requireCallableSymbol?k(n.symbol):e.requireFunctionLikeSymbol?T(n.symbol):n.isFunctionLike}function ae(n){return(n.split("/").pop()??"").includes("types")}var te=class{constructor(e){this.db=e}db;scopedDefinitions(e){return H(this.db,e)}definitionsForFile(e){return D(this.db,e)}productionCallableDefinitions(e={}){return ne(this.db,e)}calleeMap(e,t={}){return U(this.db,e,t)}crossFileCallerMap(e,t={}){return X(this.db,e,t)}sourceFallbackCallerFiles(e,t={}){return Z(this.db,e,t)}callerFileMap(e,t={}){return $(this.db,e,t)}frameworkReferencedSymbolIds(e){let t=new Map;for(let l of e){if(!l.leaf)continue;let o=t.get(l.leaf)??[];o.push(l.symbolId),t.set(l.leaf,o)}let r=new Set;for(let l of q(this.db,{includeIgnored:!1}))if(R(l)==="rust")for(let{name:o}of F(this.db,l,{includeRustAttributeNames:!0}))for(let f of t.get(o)??[])r.add(f);return r}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let r=new Map(e.map(o=>[o.symbolId,o.symbol])),l=this.calleeMap(e,t);return new Set([...l.entries()].filter(([o,f])=>{let m=r.get(o);return f.some(p=>p.symbol!==m)}).map(([o])=>o))}fileDependencyGraph(e){return B(this.db,e)}fileKind(e){return I(e)}hasSuppressionComment(e){return h(this.db,e.relativePath,e.startLine)}sourceFiles(){return K(this.db)}scanSourceReferences(e,t){ee(this.db,e,t)}callableSignature(e){let t=j(this.db).forFile(e.relativePath,{facts:!0}).facts?.callables.find(r=>r.startLine===e.startLine&&r.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};export{te as a};
2
+ //# sourceMappingURL=chunk-BTYDBDX5.js.map
@@ -1,3 +1,3 @@
1
- import{a as S}from"./chunk-S2FZILCF.js";import{a as y}from"./chunk-MZB3DTHW.js";import{a as P}from"./chunk-B75HZHUP.js";import{a as x}from"./chunk-3I34FZ6R.js";import{a as h,g as b}from"./chunk-NLRWGGPY.js";import{a as v}from"./chunk-BGBBVSH4.js";import{d as l,e as p,h as d}from"./chunk-OO6S4ECV.js";import{a as u,h as m,i as g}from"./chunk-NLVKD45E.js";import{z as f}from"./chunk-WFRZGMWJ.js";import{basename as L,extname as D}from"path";function K(n,e){let{scope:i,maxLoc:t=15,limit:r=30,scanLimit:a}=e??{},s=new x(n);return y({candidates:()=>A(n,s,i,t),orderCandidates:P,scanLimit:a,profile:{name:"passthrough-candidates"},prepare:o=>s.calleeMap(o,{semantic:e?.semantic!==!1}),evaluate:(o,c)=>w(n,o,c.get(o.symbolId)??[]),orderResults:(o,c)=>o.loc-c.loc||o.file.localeCompare(c.file),limit:r})}function w(n,e,i){let t=j(i);if(t.size!==1||!m(n,e.relativePath,e.startLine,e.endLine))return null;let[,r]=[...t.entries()][0],a=I(n,e,r),s=T(n,e),o=a.length>0||s.length>0?"signal":"direct";return{symbol:e.symbol,shortName:l(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:v(e),forwardsTo:r.symbol,forwardsToShort:l(r.symbol),forwardsToFile:r.file,actionTier:o,boundaryEvidence:a,publicFacadeEvidence:s,recommendation:E(o,a,s)}}function I(n,e,i){return S(n,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:l(e.symbol)},{label:"callee name",value:l(i.symbol)},{label:"passthrough module",value:L(e.relativePath,D(e.relativePath))},{label:"callee module",value:L(i.file,D(i.file))}])}function E(n,e,i){if(n==="signal"){if(i.length>0)return`Review the public API before inlining; public-facade evidence: ${i.slice(0,2).join("; ")}.`;let t=e.filter(F);return t.length>0?`Review the public API before inlining; public-surface evidence: ${t.slice(0,2).join("; ")}.`:`Review the boundary before inlining; boundary evidence: ${e.slice(0,2).join("; ")}.`}return"Inline or remove this passthrough unless an external API or runtime registration depends on the forwarding name."}function T(n,e){return C(n,e)?h(n,e.relativePath)?["exported passthrough is declared on the package public surface"]:b(n,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function C(n,e){let i=f(n,e.relativePath);if(i.length===0)return!1;let t=p(e.symbol);if(!t)return!1;let r=i.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
1
+ import{a as S}from"./chunk-TAB7AWKO.js";import{a as y}from"./chunk-BGUYAA3Q.js";import{a as P}from"./chunk-B75HZHUP.js";import{a as x}from"./chunk-BTYDBDX5.js";import{a as h,g as b}from"./chunk-5CJ6AQN7.js";import{a as v}from"./chunk-BGBBVSH4.js";import{d as l,e as p,h as d}from"./chunk-7XP7ZRSI.js";import{a as u,h as m,i as g}from"./chunk-JLZUM476.js";import{z as f}from"./chunk-M2TRDR25.js";import{basename as L,extname as D}from"path";function K(n,e){let{scope:i,maxLoc:t=15,limit:r=30,scanLimit:a}=e??{},s=new x(n);return y({candidates:()=>A(n,s,i,t),orderCandidates:P,scanLimit:a,profile:{name:"passthrough-candidates"},prepare:o=>s.calleeMap(o,{semantic:e?.semantic!==!1}),evaluate:(o,c)=>w(n,o,c.get(o.symbolId)??[]),orderResults:(o,c)=>o.loc-c.loc||o.file.localeCompare(c.file),limit:r})}function w(n,e,i){let t=j(i);if(t.size!==1||!m(n,e.relativePath,e.startLine,e.endLine))return null;let[,r]=[...t.entries()][0],a=I(n,e,r),s=T(n,e),o=a.length>0||s.length>0?"signal":"direct";return{symbol:e.symbol,shortName:l(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:v(e),forwardsTo:r.symbol,forwardsToShort:l(r.symbol),forwardsToFile:r.file,actionTier:o,boundaryEvidence:a,publicFacadeEvidence:s,recommendation:E(o,a,s)}}function I(n,e,i){return S(n,e.relativePath,e.startLine,"passthrough","explicit ignore-passthrough comment",[{label:"passthrough name",value:l(e.symbol)},{label:"callee name",value:l(i.symbol)},{label:"passthrough module",value:L(e.relativePath,D(e.relativePath))},{label:"callee module",value:L(i.file,D(i.file))}])}function E(n,e,i){if(n==="signal"){if(i.length>0)return`Review the public API before inlining; public-facade evidence: ${i.slice(0,2).join("; ")}.`;let t=e.filter(F);return t.length>0?`Review the public API before inlining; public-surface evidence: ${t.slice(0,2).join("; ")}.`:`Review the boundary before inlining; boundary evidence: ${e.slice(0,2).join("; ")}.`}return"Inline or remove this passthrough unless an external API or runtime registration depends on the forwarding name."}function T(n,e){return C(n,e)?h(n,e.relativePath)?["exported passthrough is declared on the package public surface"]:b(n,e.symbol,e.relativePath)?["exported passthrough matches configured or framework public entry surface"]:[]:[]}function C(n,e){let i=f(n,e.relativePath);if(i.length===0)return!1;let t=p(e.symbol);if(!t)return!1;let r=i.slice(Math.max(0,e.startLine-2),e.startLine+1).join(`
2
2
  `),a=u(t);return new RegExp(`^\\s*export\\s+(?:default\\s+)?(?:(?:async\\s+)?function\\s+${a}\\b|(?:const|let|var)\\s+${a}\\b)`,"m").test(r)?!0:R(i,t)}function R(n,e){if(!e)return!1;let i=new RegExp(`^\\s*export\\s*\\{[^}\\n]*\\b${u(e)}\\b`);return n.some(t=>i.test(t))}function F(n){return n.includes("public surface")}function j(n){let e=n.some(t=>d(t.symbol))?n.filter(t=>d(t.symbol)):n,i=new Map;for(let t of e)i.has(t.symbol)||i.set(t.symbol,t);return i}function A(n,e,i,t){return e.productionCallableDefinitions({scope:i,minLoc:3,maxLoc:t,requireFunctionLikeSymbol:!0,excludeRustTraitImplMembers:!0}).filter(r=>!g(n,r))}export{K as a,C as b};
3
- //# sourceMappingURL=chunk-2EU6WVR3.js.map
3
+ //# sourceMappingURL=chunk-BW4VDICR.js.map
@@ -1,7 +1,7 @@
1
- import{b as k}from"./chunk-JQ2PCFZW.js";import{a as D}from"./chunk-3I34FZ6R.js";import{f as v,g as L}from"./chunk-NLRWGGPY.js";import{l as S}from"./chunk-2Y7YX54K.js";import{d as h,s as y}from"./chunk-OO6S4ECV.js";function z(e,n={}){let{scope:s,minLoc:c=1,maxDepth:a=5,scanLimit:f}=n,t=new D(e),i=_(e,s,c,f),o=new P;for(let r of i)o.add(r);let m=[],I=[];i.length>0&&m.push(C(e,0,i,o));let b=i.map(r=>r.definition).filter(r=>r!==null),x=new Set(i.map(r=>r.symbol));for(let r=1;r<=a&&b.length>0;r++){let u=t.calleeMap(b,{semantic:!1}),E=new Set;for(let d of b)for(let l of u.get(d.symbolId)??[])x.has(l.symbol)||E.add(l.symbol);let p=[];for(let d of E){x.add(d);let l=F(e,d);if(!l||e.isIgnored(l.relativePath)||v(e,l.relativePath)||L(e,l.symbol,l.relativePath)||t.fileKind(l.relativePath)==="test"||t.hasSuppressionComment(l))continue;let g=B(e,l,o);g.removable?p.push(w(l,"cascade")):g.blockingFiles.length>0&&I.push({shortName:h(l.symbol),file:l.relativePath,blockingFiles:g.blockingFiles.slice(0,3)})}if(p.length===0)break;for(let d of p)o.add(d);m.push(C(e,r,p,o)),b=p.map(d=>d.definition).filter(d=>d!==null)}let N=m.reduce((r,u)=>r+u.loc,0),R=m.reduce((r,u)=>r+u.entries.length,0);return{batches:m,totalSymbols:R,totalLoc:N,blocked:I}}function _(e,n,s,c){let a=k(e,{scope:n,minLoc:s,skipBarrels:!0,deadCodeOnly:!0,scanLimit:c,semantic:!1}),f=[];for(let t of a.symbols)t.kind==="dead-code"&&(v(e,t.relativePath)||L(e,t.symbol,t.relativePath)||f.push({symbol:t.symbol,shortName:t.shortName,file:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:t.loc,evidence:"graph-fact",definition:F(e,t.symbol)}));return f}function w(e,n){return{symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:e.endLine-e.startLine+1,evidence:n,definition:e}}function F(e,n){let s=e.get(`SELECT d.relative_path
1
+ import{b as k}from"./chunk-UKUISUS6.js";import{a as D}from"./chunk-BTYDBDX5.js";import{f as v,g as L}from"./chunk-5CJ6AQN7.js";import{l as S}from"./chunk-FY6RCFDH.js";import{d as h,s as y}from"./chunk-7XP7ZRSI.js";function z(e,n={}){let{scope:s,minLoc:c=1,maxDepth:a=5,scanLimit:f}=n,t=new D(e),i=_(e,s,c,f),o=new P;for(let r of i)o.add(r);let m=[],I=[];i.length>0&&m.push(C(e,0,i,o));let b=i.map(r=>r.definition).filter(r=>r!==null),x=new Set(i.map(r=>r.symbol));for(let r=1;r<=a&&b.length>0;r++){let u=t.calleeMap(b,{semantic:!1}),E=new Set;for(let d of b)for(let l of u.get(d.symbolId)??[])x.has(l.symbol)||E.add(l.symbol);let p=[];for(let d of E){x.add(d);let l=F(e,d);if(!l||e.isIgnored(l.relativePath)||v(e,l.relativePath)||L(e,l.symbol,l.relativePath)||t.fileKind(l.relativePath)==="test"||t.hasSuppressionComment(l))continue;let g=B(e,l,o);g.removable?p.push(w(l,"cascade")):g.blockingFiles.length>0&&I.push({shortName:h(l.symbol),file:l.relativePath,blockingFiles:g.blockingFiles.slice(0,3)})}if(p.length===0)break;for(let d of p)o.add(d);m.push(C(e,r,p,o)),b=p.map(d=>d.definition).filter(d=>d!==null)}let N=m.reduce((r,u)=>r+u.loc,0),R=m.reduce((r,u)=>r+u.entries.length,0);return{batches:m,totalSymbols:R,totalLoc:N,blocked:I}}function _(e,n,s,c){let a=k(e,{scope:n,minLoc:s,skipBarrels:!0,deadCodeOnly:!0,scanLimit:c,semantic:!1}),f=[];for(let t of a.symbols)t.kind==="dead-code"&&(v(e,t.relativePath)||L(e,t.symbol,t.relativePath)||f.push({symbol:t.symbol,shortName:t.shortName,file:t.relativePath,startLine:t.startLine,endLine:t.endLine,loc:t.loc,evidence:"graph-fact",definition:F(e,t.symbol)}));return f}function w(e,n){return{symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:e.endLine-e.startLine+1,evidence:n,definition:e}}function F(e,n){let s=e.get(`SELECT d.relative_path
2
2
  FROM global_symbols gs
3
3
  JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
4
4
  JOIN documents d ON d.id = der.document_id
5
5
  WHERE gs.symbol = ?
6
6
  LIMIT 1`,n);return s?y(e,s.relative_path).find(c=>c.symbol===n)??null:null}function B(e,n,s){let c=S(e,n);if(c.length===0)return{removable:!1,blockingFiles:[]};let a=new Set;for(let f of c)f.file===n.relativePath&&f.line>=n.startLine&&f.line<=n.endLine||s.contains(f.file,f.line)||a.add(f.file);return{removable:a.size===0,blockingFiles:[...a]}}function C(e,n,s,c){let a=[...s].sort((i,o)=>i.file.localeCompare(o.file)||i.startLine-o.startLine),f=new Set(a.map(i=>i.file)),t=[];for(let i of f){let o=y(e,i);o.length>0&&o.every(m=>c.contains(i,m.startLine))&&t.push(i)}return{depth:n,entries:a.map(({definition:i,...o})=>o),loc:a.reduce((i,o)=>i+o.loc,0),filesEmptied:t.sort()}}var P=class{ranges=new Map;add(n){let s=this.ranges.get(n.file)??[];s.push({start:n.startLine,end:n.endLine}),this.ranges.set(n.file,s)}contains(n,s){let c=this.ranges.get(n);return c?c.some(a=>s>=a.start&&s<=a.end):!1}};export{z as a,P as b};
7
- //# sourceMappingURL=chunk-DKK2H4D7.js.map
7
+ //# sourceMappingURL=chunk-CKRVVBM6.js.map
@@ -1,2 +1,2 @@
1
- import{a as k,b as C}from"./chunk-ZEKBAMCN.js";import{a as V,b as R,c as F,e as o,f as v}from"./chunk-B3X6KU75.js";import{a as B,b as g}from"./chunk-KMVGRIO2.js";import{N as y}from"./chunk-MCNWCJYL.js";function j(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:t=6,limit:i=20,scope:l,scanLimit:c,filePattern:d,focusFiles:h}=s,u=y(e).vueProfiles({scope:l,minBehaviorTokens:Math.max(3,t),scanLimit:c}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r})),n=k(u,r=>r.tokens);return C({profiles:u,limit:i,filePattern:d,focusFiles:h,candidateIndex:n,profile:{name:"vue-composable-candidates"},compare:(r,a)=>T(r,a,m,t),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.fileB.localeCompare(a.fileB)})}function T(e,s,m,t){let i=B(e.tokens,s.tokens);if(i.size<t||!P(i))return null;let l=R(e.tokens,s.tokens);if(l<m)return null;let c=o(i,"composable:"),d=o(i,"store:"),h=o(i,"reactivity:"),u=o(i,"lifecycle:"),n=o(i,"request:"),r=o(i,"function:"),a=o(i,"function-verb:"),b=o(i,"template-binding:"),p=o(i,"template-event:"),f=q({sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:l,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:v(i),sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:v(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:v(g(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:c,sharedStores:d,sharedRequests:n,sharedLifecycle:u,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function q(e){return V({genericWords:A,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,m=0,t=0,i=0,l=0,c=0,d=0;for(let n of e)n.startsWith("composable:")?s+=1:n.startsWith("store:")?m+=1:n.startsWith("request:")?t+=1:n.startsWith("lifecycle:")?i+=1:n.startsWith("function:")?l+=1:n.startsWith("reactivity:")?c+=1:(n.startsWith("function-verb:")||n.startsWith("template-binding:")||n.startsWith("template-event:"))&&(d+=1);let h=s+m,u=h+t+i+l+d;return F([{name:"requests",count:t},{name:"lifecycle",count:i},{name:"functions",count:l},{name:"reusableHooks",count:h},{name:"reactivity",count:c},{name:"namedBehavior",count:u}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{lifecycle:1,functions:2,namedBehavior:4},reason:"shared lifecycle workflow"},{min:{reusableHooks:2,requests:1,namedBehavior:5},reason:"shared reusable Vue hooks and requests"},{min:{reusableHooks:2,functions:2,namedBehavior:5},reason:"shared reusable Vue hooks and functions"},{min:{functions:2,reactivity:1,namedBehavior:4},reason:"shared reactive functions"}]).pass}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var A=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{j as a};
2
- //# sourceMappingURL=chunk-ZHGUZKJL.js.map
1
+ import{a as k,b as C}from"./chunk-XKWEMFHP.js";import{a as V,b as R,c as F,e as o,f as v}from"./chunk-B3X6KU75.js";import{a as B,b as g}from"./chunk-KMVGRIO2.js";import{N as y}from"./chunk-TLTLJ4SW.js";function j(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:t=6,limit:i=20,scope:l,scanLimit:c,filePattern:d,focusFiles:h}=s,u=y(e).vueProfiles({scope:l,minBehaviorTokens:Math.max(3,t),scanLimit:c}).map(r=>({file:r.file,tokens:r.behaviorTokens,profile:r})),n=k(u,r=>r.tokens);return C({profiles:u,limit:i,filePattern:d,focusFiles:h,candidateIndex:n,profile:{name:"vue-composable-candidates"},compare:(r,a)=>T(r,a,m,t),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.fileB.localeCompare(a.fileB)})}function T(e,s,m,t){let i=B(e.tokens,s.tokens);if(i.size<t||!P(i))return null;let l=R(e.tokens,s.tokens);if(l<m)return null;let c=o(i,"composable:"),d=o(i,"store:"),h=o(i,"reactivity:"),u=o(i,"lifecycle:"),n=o(i,"request:"),r=o(i,"function:"),a=o(i,"function-verb:"),b=o(i,"template-binding:"),p=o(i,"template-event:"),f=q({sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p});return{fileA:e.file,fileB:s.file,similarity:l,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:v(i),sharedComposables:c,sharedStores:d,sharedReactivity:h,sharedLifecycle:u,sharedRequests:n,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b,sharedTemplateEvents:p,evidenceClass:f.evidenceClass,actionTier:f.actionTier,evidenceClassReasons:f.reasons,recommendation:f.recommendation,uniqueToA:v(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:v(g(s.tokens,e.tokens)).slice(0,25),reason:S({sharedComposables:c,sharedStores:d,sharedRequests:n,sharedLifecycle:u,sharedFunctions:r,sharedFunctionVerbs:a,sharedBindings:b}),locA:e.profile.totalLines,locB:s.profile.totalLines}}function q(e){return V({genericWords:A,primitiveGroups:[{values:e.sharedReactivity,reasonPrefix:"shared reactivity primitive",bucket:"generic"},{values:e.sharedLifecycle,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedComposables,label:"shared composable",fallbackBucket:"shared-abstraction"},{names:e.sharedStores,label:"shared store",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedFunctions,label:"shared function",fallbackBucket:"generic"},{names:e.sharedFunctionVerbs,label:"shared action verb",fallbackBucket:"generic"},{names:e.sharedBindings,label:"shared binding",fallbackBucket:"generic"},{names:e.sharedTemplateEvents,label:"shared template event",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":return"Review for a shared composable, store, or feature module around the named domain behavior.";case"mixed":return"Separate generic Vue mechanics from domain-specific behavior before extracting a composable.";case"shared-abstraction":return"Review the existing composable/store usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct composable-extraction evidence."}}function P(e){let s=0,m=0,t=0,i=0,l=0,c=0,d=0;for(let n of e)n.startsWith("composable:")?s+=1:n.startsWith("store:")?m+=1:n.startsWith("request:")?t+=1:n.startsWith("lifecycle:")?i+=1:n.startsWith("function:")?l+=1:n.startsWith("reactivity:")?c+=1:(n.startsWith("function-verb:")||n.startsWith("template-binding:")||n.startsWith("template-event:"))&&(d+=1);let h=s+m,u=h+t+i+l+d;return F([{name:"requests",count:t},{name:"lifecycle",count:i},{name:"functions",count:l},{name:"reusableHooks",count:h},{name:"reactivity",count:c},{name:"namedBehavior",count:u}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{lifecycle:1,functions:2,namedBehavior:4},reason:"shared lifecycle workflow"},{min:{reusableHooks:2,requests:1,namedBehavior:5},reason:"shared reusable Vue hooks and requests"},{min:{reusableHooks:2,functions:2,namedBehavior:5},reason:"shared reusable Vue hooks and functions"},{min:{functions:2,reactivity:1,namedBehavior:4},reason:"shared reactive functions"}]).pass}function S(e){let s=[];return e.sharedComposables.length&&s.push(`shared composables: ${e.sharedComposables.join(", ")}`),e.sharedStores.length&&s.push(`shared stores: ${e.sharedStores.join(", ")}`),e.sharedRequests.length&&s.push(`shared request helpers: ${e.sharedRequests.join(", ")}`),e.sharedLifecycle.length&&s.push(`shared lifecycle: ${e.sharedLifecycle.join(", ")}`),e.sharedFunctions.length&&s.push(`shared functions: ${e.sharedFunctions.slice(0,6).join(", ")}`),e.sharedFunctionVerbs.length&&s.push(`shared action verbs: ${e.sharedFunctionVerbs.slice(0,6).join(", ")}`),e.sharedBindings.length&&s.push(`shared template bindings: ${e.sharedBindings.slice(0,6).join(", ")}`),s.join("; ")||"shared Vue behavior profile"}var A=new Set(["add","apply","cancel","change","clear","close","composable","create","data","delete","draft","edit","error","fetch","filter","form","item","items","load","loading","name","open","reactive","ref","refresh","remove","request","reset","resource","row","rows","save","saving","search","select","selected","store","submit","toggle","update","use","value","watch"]);export{j as a};
2
+ //# sourceMappingURL=chunk-CMLHZWRS.js.map
@@ -1,3 +1,3 @@
1
- import{m as d}from"./chunk-2Y7YX54K.js";import{a as h}from"./chunk-YSUD2S7T.js";import{h as g}from"./chunk-OO6S4ECV.js";import{a as p}from"./chunk-64MNV6AB.js";import{y as m}from"./chunk-WFRZGMWJ.js";function _(t,r,n={}){let e=h(t,r);if(!e)return[];let l=!g(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=d(t,e,{semantic:n.semantic}).map(o=>({relativePath:o.file,line:o.line})),s=R(t,e),f=new Set,a=[];for(let o of[...l,...c,...s]){let u=`${o.relativePath}:${o.line}`;f.has(u)||(f.add(u),a.push(o))}return a}function R(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=b(r.symbol);if(n.length===0)return[];let e=[];for(let i of p(t,{extensions:[".rb"],includeIgnored:!1})){let l=m(t,i);if(!l)continue;let c=l.split(`
1
+ import{m as d}from"./chunk-FY6RCFDH.js";import{a as h}from"./chunk-2HCWAL42.js";import{h as g}from"./chunk-7XP7ZRSI.js";import{a as p}from"./chunk-64MNV6AB.js";import{y as m}from"./chunk-M2TRDR25.js";function _(t,r,n={}){let e=h(t,r);if(!e)return[];let l=!g(e.symbol)&&!t.isIgnored(e.relativePath)?[{relativePath:e.relativePath,line:e.startLine}]:[],c=d(t,e,{semantic:n.semantic}).map(o=>({relativePath:o.file,line:o.line})),s=R(t,e),f=new Set,a=[];for(let o of[...l,...c,...s]){let u=`${o.relativePath}:${o.line}`;f.has(u)||(f.add(u),a.push(o))}return a}function R(t,r){if(!r.relativePath.endsWith(".rb"))return[];let n=b(r.symbol);if(n.length===0)return[];let e=[];for(let i of p(t,{extensions:[".rb"],includeIgnored:!1})){let l=m(t,i);if(!l)continue;let c=l.split(`
2
2
  `);for(let s=0;s<c.length;s++){let f=c[s]??"";n.some(a=>new RegExp(`@${a}\\b|\\b${a}:`).test(f))&&e.push({relativePath:i,line:s})}}return e}function b(t){let n=(t.split(":").pop()??t).replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^A-Za-z0-9_]+/g,"_").toLowerCase().replace(/^_+|_+$/g,""),e=n.split("_").filter(Boolean),i=new Set;return n&&i.add(n),e.length>=1&&i.add(e[e.length-1]),e.length>=2&&i.add(e.slice(-2).join("_")),[...i]}export{_ as a};
3
- //# sourceMappingURL=chunk-OYGKBDAD.js.map
3
+ //# sourceMappingURL=chunk-CSMPXDYE.js.map
@@ -1,6 +1,6 @@
1
- import{a as m}from"./chunk-QB7NRST4.js";import{a as h}from"./chunk-YSUD2S7T.js";import{d as g}from"./chunk-OO6S4ECV.js";import{readFileSync as f}from"fs";import{extname as y,join as d}from"path";function M(t,e,a={}){let{context:s=0}=a,r=L(e);if(r)return j(t,r.filePath,r.startLine,r.endLine,s);let i=h(t,e);return i?R(t,i,s):null}function L(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);return e?{filePath:e[1],startLine:parseInt(e[2],10),endLine:parseInt(e[3],10)}:null}function R(t,e,a){let s=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),r=d(t.config.projectRoot,e.relativePath),i;try{i=f(r,"utf-8")}catch{return null}let n=i.split(`
1
+ import{a as m}from"./chunk-5N5ZC566.js";import{a as h}from"./chunk-2HCWAL42.js";import{d as g}from"./chunk-7XP7ZRSI.js";import{readFileSync as f}from"fs";import{extname as y,join as d}from"path";function M(t,e,a={}){let{context:s=0}=a,r=L(e);if(r)return j(t,r.filePath,r.startLine,r.endLine,s);let i=h(t,e);return i?R(t,i,s):null}function L(t){let e=t.match(/^(.+\.\w+):(\d+)-(\d+)$/);return e?{filePath:e[1],startLine:parseInt(e[2],10),endLine:parseInt(e[3],10)}:null}function R(t,e,a){let s=t.get("SELECT language FROM documents WHERE relative_path = ?",e.relativePath),r=d(t.config.projectRoot,e.relativePath),i;try{i=f(r,"utf-8")}catch{return null}let n=i.split(`
2
2
  `),c=Math.max(0,e.startLine-a),l=Math.min(n.length-1,e.endLine+a),u=n.slice(c,l+1).join(`
3
3
  `);return{symbol:e.symbol,shortName:g(e.symbol),relativePath:e.relativePath,startLine:c,endLine:l,language:s?.language??v(e.relativePath),source:u}}function j(t,e,a,s,r){let i=m(t,e);if(!i)return null;let n=t.get("SELECT relative_path, language FROM documents WHERE relative_path = ?",i);if(!n)return null;let c=d(t.config.projectRoot,n.relative_path),l;try{l=f(c,"utf-8")}catch{return null}let u=l.split(`
4
4
  `),o=Math.max(0,a-1-r),p=Math.min(u.length-1,s-1+r),b=u.slice(o,p+1).join(`
5
5
  `);return{symbol:`${n.relative_path}:${a}-${s}`,shortName:`${n.relative_path}:${a}-${s}`,relativePath:n.relative_path,startLine:o,endLine:p,language:n.language??v(n.relative_path),source:b}}function v(t){switch(y(t).toLowerCase()){case".ts":case".tsx":case".mts":case".cts":return"typescript";case".js":case".jsx":case".mjs":case".cjs":return"javascript";case".py":case".pyi":return"python";case".rs":return"rust";case".go":return"go";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".rb":return"ruby";case".php":return"php";case".cs":return"csharp";case".vb":return"vb";case".dart":return"dart";case".c":case".h":return"c";case".cc":case".cpp":case".cxx":case".hpp":case".hh":case".hxx":return"cpp";case".vue":return"vue";default:return null}}export{M as a};
6
- //# sourceMappingURL=chunk-GWWYLYD3.js.map
6
+ //# sourceMappingURL=chunk-DQYG5JHT.js.map
@@ -1,4 +1,4 @@
1
- import{b as w}from"./chunk-2EU6WVR3.js";import{b as g}from"./chunk-YSUD2S7T.js";import{c as h,d as f}from"./chunk-MTDBHTSF.js";import{d as u,e as c,h as m,p as b,q as p}from"./chunk-OO6S4ECV.js";import{dirname as $,relative as T,resolve as k}from"path";var A=new Set(f());function O(t,n){return`tests/generated/twin-ab/${y(t)}-vs-${y(n)}.test.ts`}function y(t){return(t.split(/[/#]/).pop()||t).replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"symbol"}function I(t,n,a,e){let o=d(t,n);if(!o.ok)return o;let i=d(t,a);if(!i.ok)return i;let r=o.symbol.paramCount===null||i.symbol.paramCount===null?null:o.symbol.paramCount===i.symbol.paramCount,s=v(o.symbol,i.symbol,t.config.projectRoot,e,r);return{ok:!0,a:o.symbol,b:i.symbol,signatureCompatible:r,testSource:s}}function d(t,n){let e=g(t,n).match;if(!e)return{ok:!1,reason:`${n} does not resolve to an indexed symbol.`};let i=t.get("SELECT kind FROM global_symbols WHERE id = ?",e.symbolId)?.kind??null;if(!(i!==null?A.has(i):m(e.symbol)))return{ok:!1,reason:`${n} resolves to ${u(e.symbol)}${i!==null?` with SCIP kind ${h(i)}`:""} \u2014 twin-ab compares call outputs, so both referents must be functions or methods.`};if(!w(t,e))return{ok:!1,reason:`${n} (${u(e.symbol)} at ${e.relativePath}:${e.startLine+1}) is not exported \u2014 twin-ab needs an importable named binding for both twins.`};let s=t.get("SELECT documentation FROM global_symbols WHERE id = ?",e.symbolId),l=b(p(s?.documentation??null));return{ok:!0,symbol:{ref:n,symbol:e.symbol,shortName:c(e.symbol)||u(e.symbol),file:e.relativePath,startLine:e.startLine,signature:l,paramCount:l?x(l):null}}}function x(t){let n=t.indexOf("(");if(n===-1)return null;let a=0,e=-1;for(let s=n;s<t.length;s+=1){let l=t[s];if(l==="(")a+=1;else if(l===")"&&(a-=1,a===0)){e=s;break}}if(e===-1)return null;let o=t.slice(n+1,e).trim();if(!o)return 0;let i=1,r=0;for(let s of o)s==="("||s==="["||s==="{"?r+=1:s===")"||s==="]"||s==="}"?r=Math.max(0,r-1):s===","&&r===0&&(i+=1);return i}function S(t,n,a){let e=$(n),o=k(t,a),r=T(e,o).replace(/\\/g,"/").replace(/\.tsx?$/,".js");return r.startsWith(".")?r:`./${r}`}function v(t,n,a,e,o){let i=S(a,e,t.file),r=S(a,e,n.file),s=o===null?"Signature comparison: unknown (one or both signatures unavailable in the index) \u2014 check by hand.":o?"Signature comparison: param counts match.":"Signature comparison: param counts DIFFER \u2014 twins may not be directly comparable; check by hand.";return`/**
1
+ import{b as w}from"./chunk-BW4VDICR.js";import{b as g}from"./chunk-2HCWAL42.js";import{c as h,d as f}from"./chunk-MTDBHTSF.js";import{d as u,e as c,h as m,p as b,q as p}from"./chunk-7XP7ZRSI.js";import{dirname as $,relative as T,resolve as k}from"path";var A=new Set(f());function O(t,n){return`tests/generated/twin-ab/${y(t)}-vs-${y(n)}.test.ts`}function y(t){return(t.split(/[/#]/).pop()||t).replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"symbol"}function I(t,n,a,e){let o=d(t,n);if(!o.ok)return o;let i=d(t,a);if(!i.ok)return i;let r=o.symbol.paramCount===null||i.symbol.paramCount===null?null:o.symbol.paramCount===i.symbol.paramCount,s=v(o.symbol,i.symbol,t.config.projectRoot,e,r);return{ok:!0,a:o.symbol,b:i.symbol,signatureCompatible:r,testSource:s}}function d(t,n){let e=g(t,n).match;if(!e)return{ok:!1,reason:`${n} does not resolve to an indexed symbol.`};let i=t.get("SELECT kind FROM global_symbols WHERE id = ?",e.symbolId)?.kind??null;if(!(i!==null?A.has(i):m(e.symbol)))return{ok:!1,reason:`${n} resolves to ${u(e.symbol)}${i!==null?` with SCIP kind ${h(i)}`:""} \u2014 twin-ab compares call outputs, so both referents must be functions or methods.`};if(!w(t,e))return{ok:!1,reason:`${n} (${u(e.symbol)} at ${e.relativePath}:${e.startLine+1}) is not exported \u2014 twin-ab needs an importable named binding for both twins.`};let s=t.get("SELECT documentation FROM global_symbols WHERE id = ?",e.symbolId),l=b(p(s?.documentation??null));return{ok:!0,symbol:{ref:n,symbol:e.symbol,shortName:c(e.symbol)||u(e.symbol),file:e.relativePath,startLine:e.startLine,signature:l,paramCount:l?x(l):null}}}function x(t){let n=t.indexOf("(");if(n===-1)return null;let a=0,e=-1;for(let s=n;s<t.length;s+=1){let l=t[s];if(l==="(")a+=1;else if(l===")"&&(a-=1,a===0)){e=s;break}}if(e===-1)return null;let o=t.slice(n+1,e).trim();if(!o)return 0;let i=1,r=0;for(let s of o)s==="("||s==="["||s==="{"?r+=1:s===")"||s==="]"||s==="}"?r=Math.max(0,r-1):s===","&&r===0&&(i+=1);return i}function S(t,n,a){let e=$(n),o=k(t,a),r=T(e,o).replace(/\\/g,"/").replace(/\.tsx?$/,".js");return r.startsWith(".")?r:`./${r}`}function v(t,n,a,e,o){let i=S(a,e,t.file),r=S(a,e,n.file),s=o===null?"Signature comparison: unknown (one or both signatures unavailable in the index) \u2014 check by hand.":o?"Signature comparison: param counts match.":"Signature comparison: param counts DIFFER \u2014 twins may not be directly comparable; check by hand.";return`/**
2
2
  * Generated by 'scip-query twin-ab'. scip-integrity-audit drill 5
3
3
  * ("cross-examine same-concept twins"): where one concept is computed in
4
4
  * more than one place, feed both the same input and require the same
@@ -37,4 +37,4 @@ describe.skipIf(inputs.length === 0)('twin-ab: ${t.shortName} vs ${n.shortName}'
37
37
  });
38
38
  });
39
39
  `}export{O as a,I as b};
40
- //# sourceMappingURL=chunk-6DNE65QS.js.map
40
+ //# sourceMappingURL=chunk-E5HPTSRD.js.map
@@ -0,0 +1,2 @@
1
+ import{execFileSync as y}from"child_process";import{platform as G}from"os";var h=G()==="win32";function S(t){let e=h?"where":"which";try{return y(e,[t],{stdio:"pipe"}),!0}catch{return!1}}import{spawnSync as R}from"child_process";import{createHash as x}from"crypto";import{existsSync as b,lstatSync as w,realpathSync as v}from"fs";import{dirname as I,isAbsolute as E,join as W,resolve as d}from"path";var a={run(t,e){let r=l(t,e);return r.kind==="success"?r.output:void 0},runResult:l};function $(t,e=a){let r=C(t,e);if(r.kind!=="worktree")return;let o=r.identity,n=o.projectRoot,i=e.run(n,["rev-parse","--git-common-dir"])?.trim();if(!i)return;let s=u(p(n,i)),m=c(e.run(n,["rev-parse","--verify","HEAD"])),k=c(e.run(n,["rev-parse","--verify","HEAD^{tree}"])),f=e.run(n,["status","--porcelain=v1","-z","--untracked-files=all"]);if(f!==void 0)return{...o,commonDir:s,repositoryId:g("repository",s),headCommit:m,treeOid:k,clean:f.length===0}}function C(t,e=a){let r=e.runResult(t,["rev-parse","--show-toplevel"]);if(r.kind==="not-repository")return{kind:"non-git"};if(r.kind==="error")return r;let o=r.output.trim();if(!o)return{kind:"error",message:"Git returned an empty worktree root."};let n=u(o),i=e.run(n,["rev-parse","--absolute-git-dir"])?.trim();if(!i)return{kind:"error",message:"Git did not return an absolute worktree directory."};let s=u(p(n,i));return{kind:"worktree",identity:{projectRoot:n,gitDir:s,worktreeId:g("worktree",`${n}\0${s}`)}}}function H(t,e,r=a){return c(r.run(t,e))}function p(t,e){return E(e)?e:d(t,e)}function u(t){try{return v(t)}catch{return d(t)}}function g(t,e){return x("sha256").update(`${t}\0${e}`).digest("hex").slice(0,24)}function c(t){return t?.trim()||void 0}function l(t,e){let r=R("git",["-C",t,...e],{encoding:"utf-8",env:{...process.env,LC_ALL:"C"},maxBuffer:52428800,stdio:["ignore","pipe","pipe"]});if(r.status===0)return{kind:"success",output:r.stdout.trimEnd()};let n=(typeof r.stderr=="string"?r.stderr.trim():"")||r.error?.message||`git exited with status ${r.status??"unknown"}`,i=r.error?.code;return(/not a git repository/i.test(n)||i==="ENOENT"&&b(d(t)))&&!D(t)?{kind:"not-repository"}:{kind:"error",message:n}}function D(t){if(process.env.GIT_DIR||process.env.GIT_COMMON_DIR)return!0;let e=d(t);for(;;){try{return w(W(e,".git")),!0}catch(o){let n=o.code;if(n!=="ENOENT"&&n!=="ENOTDIR")return!0}let r=I(e);if(r===e)return!1;e=r}}export{S as a,$ as b,H as c,p as d,u as e};
2
+ //# sourceMappingURL=chunk-E7BTIEAY.js.map
@@ -1,4 +1,4 @@
1
- import{a as B}from"./chunk-WXVGNFAO.js";import{a as _}from"./chunk-3I34FZ6R.js";import{e as N}from"./chunk-UO4IADXJ.js";import{j as M}from"./chunk-DA34GNNO.js";import{d as R,g as y,i as F}from"./chunk-OO6S4ECV.js";import{E as w}from"./chunk-MCNWCJYL.js";import{execFileSync as g}from"child_process";import{existsSync as q,readFileSync as H}from"fs";import{basename as v}from"path";var J="Unable to compute git diff.";function Be(e,n={}){let i=n.plan??Z(e,n);return i.note?j(i.note,i.changedFileLines):i.changedFiles.length===0?V(i.changedFileLines):Y(i.changedFiles,[G(e,i.changedFiles,i.changedFiles,i.changedRanges)])}function Z(e,n={}){let{base:i="HEAD"}=n;try{let t=K(e.config.projectRoot,i),r=oe(e,t),o=se(e,Q(e.config.projectRoot,i));return{changedFileLines:t,changedFiles:r,changedRanges:o,renamedFiles:ne(e.config.projectRoot,i,r),note:t.length===0?"No changed files found.":void 0}}catch{return{changedFileLines:[],changedFiles:[],changedRanges:[],renamedFiles:[],note:J}}}function G(e,n,i,t=[]){let r=new _(e),o=new Set(i),s=B(t),a=[],l=new Map,d=n.flatMap(u=>r.definitionsForFile(u)).filter(Le),f=d.filter(u=>ce(u,s)),c=le(e,d,f,s),m=me([...f,...c.definitions]).sort((u,h)=>u.relativePath.localeCompare(h.relativePath)||u.startLine-h.startLine),p=m.map(u=>u.symbolId),C=ye(e,p),z=be(e,p,i),I=m.filter(u=>(C.get(u.symbolId)??0)===0),x=T(()=>M(e,I)),W=I.filter(u=>(x.get(u.symbolId)?.size??0)===0),U=T(()=>N(e,W));for(let u of m)he(e,u,o,a,l,x.get(u.symbolId)??new Set,U.get(u.symbolId)??new Set,C.get(u.symbolId)??0,z.get(u.symbolId)??new Set);return{changedSymbols:a,consumerEntries:[...l.entries()].map(([u,h])=>({file:u,symbols:[...h].sort()})),attributionNotes:c.notes}}function Y(e,n){let i=new Map,t=n.flatMap(s=>s.changedSymbols),r=n.flatMap(s=>s.attributionNotes??[]);for(let s of n)for(let a of s.consumerEntries){let l=i.get(a.file);l||(l=new Set,i.set(a.file,l));for(let d of a.symbols)l.add(d)}let o=Se(i);return{changedFiles:[...e],changedSymbols:t,affectedConsumers:o,attributionNotes:r,summary:{totalChangedFiles:e.length,totalChangedSymbols:t.length,totalAffectedFiles:o.length}}}function j(e,n=[]){return{changedFiles:n,changedSymbols:[],affectedConsumers:[],attributionNotes:[],summary:{totalChangedFiles:n.length,totalChangedSymbols:0,totalAffectedFiles:0,note:e}}}function V(e){return{changedFiles:e,changedSymbols:[],affectedConsumers:[],attributionNotes:[],summary:{totalChangedFiles:e.length,totalChangedSymbols:0,totalAffectedFiles:0,note:"Changed files are not present in the current SCIP index."}}}function K(e,n){let i=g("git",["diff","--name-only",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:67108864}),t=g("git",["diff","--name-only","--cached",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024}),r=g("git",["ls-files","--others","--exclude-standard"],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024});return[...new Set([i,t,r].flatMap(o=>o.split(`
1
+ import{a as B}from"./chunk-WXVGNFAO.js";import{a as _}from"./chunk-BTYDBDX5.js";import{e as N}from"./chunk-3YEBIYXL.js";import{j as M}from"./chunk-KWMRY4RN.js";import{d as R,g as y,i as F}from"./chunk-7XP7ZRSI.js";import{E as w}from"./chunk-TLTLJ4SW.js";import{execFileSync as g}from"child_process";import{existsSync as q,readFileSync as H}from"fs";import{basename as v}from"path";var J="Unable to compute git diff.";function Be(e,n={}){let i=n.plan??Z(e,n);return i.note?j(i.note,i.changedFileLines):i.changedFiles.length===0?V(i.changedFileLines):Y(i.changedFiles,[G(e,i.changedFiles,i.changedFiles,i.changedRanges)])}function Z(e,n={}){let{base:i="HEAD"}=n;try{let t=K(e.config.projectRoot,i),r=oe(e,t),o=se(e,Q(e.config.projectRoot,i));return{changedFileLines:t,changedFiles:r,changedRanges:o,renamedFiles:ne(e.config.projectRoot,i,r),note:t.length===0?"No changed files found.":void 0}}catch{return{changedFileLines:[],changedFiles:[],changedRanges:[],renamedFiles:[],note:J}}}function G(e,n,i,t=[]){let r=new _(e),o=new Set(i),s=B(t),a=[],l=new Map,d=n.flatMap(u=>r.definitionsForFile(u)).filter(Le),f=d.filter(u=>ce(u,s)),c=le(e,d,f,s),m=me([...f,...c.definitions]).sort((u,h)=>u.relativePath.localeCompare(h.relativePath)||u.startLine-h.startLine),p=m.map(u=>u.symbolId),C=ye(e,p),z=be(e,p,i),I=m.filter(u=>(C.get(u.symbolId)??0)===0),x=T(()=>M(e,I)),W=I.filter(u=>(x.get(u.symbolId)?.size??0)===0),U=T(()=>N(e,W));for(let u of m)he(e,u,o,a,l,x.get(u.symbolId)??new Set,U.get(u.symbolId)??new Set,C.get(u.symbolId)??0,z.get(u.symbolId)??new Set);return{changedSymbols:a,consumerEntries:[...l.entries()].map(([u,h])=>({file:u,symbols:[...h].sort()})),attributionNotes:c.notes}}function Y(e,n){let i=new Map,t=n.flatMap(s=>s.changedSymbols),r=n.flatMap(s=>s.attributionNotes??[]);for(let s of n)for(let a of s.consumerEntries){let l=i.get(a.file);l||(l=new Set,i.set(a.file,l));for(let d of a.symbols)l.add(d)}let o=Se(i);return{changedFiles:[...e],changedSymbols:t,affectedConsumers:o,attributionNotes:r,summary:{totalChangedFiles:e.length,totalChangedSymbols:t.length,totalAffectedFiles:o.length}}}function j(e,n=[]){return{changedFiles:n,changedSymbols:[],affectedConsumers:[],attributionNotes:[],summary:{totalChangedFiles:n.length,totalChangedSymbols:0,totalAffectedFiles:0,note:e}}}function V(e){return{changedFiles:e,changedSymbols:[],affectedConsumers:[],attributionNotes:[],summary:{totalChangedFiles:e.length,totalChangedSymbols:0,totalAffectedFiles:0,note:"Changed files are not present in the current SCIP index."}}}function K(e,n){let i=g("git",["diff","--name-only",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:67108864}),t=g("git",["diff","--name-only","--cached",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024}),r=g("git",["ls-files","--others","--exclude-standard"],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024});return[...new Set([i,t,r].flatMap(o=>o.split(`
2
2
  `)).map(o=>o.trim()).filter(o=>o.length>0))]}function Q(e,n){let i=g("git",["diff","--unified=0",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:67108864}),t=g("git",["diff","--unified=0","--cached",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024});return O([...E(i),...E(t)])}function L(e,n,i){try{return g("git",["show",`${n}:./${i}`],{encoding:"utf-8",cwd:e,timeout:1e4,stdio:["ignore","pipe","ignore"]})}catch{return null}}function ve(e,n,i=[]){let t=X(e,n,i);return r=>(t.has(r)||t.set(r,L(e,n,r)),t.get(r)??null)}function Ae(e,n=e.changedFiles){let i=new Map(e.renamedFiles.map(t=>[t.to,t.from]));return[...new Set(n.map(t=>i.get(t)??t))]}function X(e,n,i){let t=[...new Set(i)],r=new Map;if(t.length===0)return r;try{let o=t.map(a=>`${n}:./${a}
3
3
  `).join(""),s=g("git",["cat-file","--batch"],{cwd:e,input:o,maxBuffer:256*1024*1024,timeout:1e4,stdio:["pipe","pipe","ignore"]});return ee(s,t)}catch{for(let o of t)r.set(o,L(e,n,o));return r}}function ee(e,n){let i=new Map,t=0;for(let r of n){let o=e.indexOf(10,t);if(o<0)throw new Error("git cat-file batch output ended before object header");let s=e.subarray(t,o).toString("utf-8");if(t=o+1,s.endsWith(" missing")){i.set(r,null);continue}let a=/^[0-9a-f]+ ([^ ]+) (\d+)$/.exec(s);if(!a)throw new Error(`unexpected git cat-file batch header: ${s}`);let[,l,d]=a,f=Number(d);if(!Number.isFinite(f)||f<0)throw new Error(`unexpected git cat-file batch size: ${s}`);if(t+f>e.length)throw new Error("git cat-file batch output ended before blob payload");let c=e.subarray(t,t+f);i.set(r,l==="blob"?c.toString("utf-8"):null),t+=f,e[t]===10&&(t+=1)}return i}function ne(e,n,i){if(i.length===0)return[];let t=new Map,r=new Set;for(let s of ie(e,n))i.includes(s.to)&&(t.set(s.to,s),r.add(s.from));let o=te(e,n);if(o.length===0)return[...t.values()].sort((s,a)=>s.to.localeCompare(a.to));for(let s of i){if(t.has(s)||!q(`${e}/${s}`))continue;let a=o.filter(f=>!r.has(f)).filter(f=>v(f)===v(s));if(a.length===0)continue;let l=H(`${e}/${s}`,"utf-8"),d=a.map(f=>({from:f,to:s,similarity:re(L(e,n,f)??"",l)})).sort((f,c)=>c.similarity-f.similarity)[0];d&&d.similarity>=.45&&(t.set(s,d),r.add(d.from))}return[...t.values()].sort((s,a)=>s.to.localeCompare(a.to))}function te(e,n){let i=g("git",["diff","--name-only","--diff-filter=D",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:67108864}),t=g("git",["diff","--name-only","--diff-filter=D","--cached",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024});return[...new Set([...P(i),...P(t)])]}function ie(e,n){let i=g("git",["diff","--name-status","--find-renames",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:67108864}),t=g("git",["diff","--name-status","--find-renames","--cached",n],{encoding:"utf-8",cwd:e,timeout:3e4,maxBuffer:64*1024*1024});return[...i.split(`
4
4
  `),...t.split(`
@@ -18,4 +18,4 @@ import{a as B}from"./chunk-WXVGNFAO.js";import{a as _}from"./chunk-3I34FZ6R.js";
18
18
  AND m.role != 1
19
19
  AND ref_d.relative_path NOT IN (${i.map(()=>"?").join(",")})
20
20
  ${e.pathExclusionsFor("ref_d")}`,...n,...i),r=new Map;for(let o of t){let s=r.get(o.symbol_id);s||(s=new Set,r.set(o.symbol_id,s)),s.add(o.relative_path)}return r}function S(e,n,i,t,r){if(e.isIgnored(t)||n.has(t))return;let o=i.get(t);o||(o=new Set,i.set(t,o)),o.add(r)}function Se(e){return[...e.entries()].map(([n,i])=>({file:n,consumedSymbols:i.size})).sort((n,i)=>i.consumedSymbols-n.consumedSymbols)}function Le(e){return!(F(e.symbol)||e.parentTypeName!==null&&!y(e.symbol))}function De(e,n){return y(e.symbol)||e.isTypeLike?!0:e.parentTypeName===null&&n>0}export{J as a,Be as b,Z as c,G as d,Y as e,L as f,ve as g,Ae as h,X as i,fe as j};
21
- //# sourceMappingURL=chunk-RPMT6MTX.js.map
21
+ //# sourceMappingURL=chunk-EUMETOTD.js.map
@@ -1,4 +1,4 @@
1
- import{d as A,i as T}from"./chunk-DA34GNNO.js";import{d as I}from"./chunk-YSUD2S7T.js";import{e as d,s as w,z as P}from"./chunk-OO6S4ECV.js";import{a as v,b as F,f as h,p as y}from"./chunk-NLVKD45E.js";import{B as k,L as R,a as D,c as p}from"./chunk-MCNWCJYL.js";import{c as u,d as M,y as m}from"./chunk-WFRZGMWJ.js";function L(e,r,n,t={}){if(!n)return[];let i=m(e,r);return i?i.indexOf(n)===-1?[]:(x(e,r).get(n)??[]).filter(o=>!J(o,t)):[]}function J(e,r){return typeof r.excludeStartLine=="number"&&typeof r.excludeEndLine=="number"&&e>=r.excludeStartLine&&e<=r.excludeEndLine}var Y=u("file-identifiers",{clearGroups:["whole-project","source-file"]});function O(e,r){let n=h(e,r);return n?n.fileIdentifiers:Y.get(e,r,()=>new Set(x(e,r).keys()))}var W=u("file-ident-lines",{clearGroups:["whole-project","source-file"]});function x(e,r){let n=h(e,r);return n?n.identifierLineMap:W.get(e,r,()=>X(e,r))}var V=u("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function pe(e,r){let n=h(e,r);return n?n.identifiersByLine:V.get(e,r,()=>{let t=x(e,r),i=0;for(let o of t.values()){let c=o[o.length-1];c!==void 0&&c>i&&(i=c)}let a=new Array(i+1);for(let o=0;o<=i;o+=1)a[o]=new Set;for(let[o,c]of t)for(let s of c)a[s].add(o);return a})}function X(e,r){let n=new Map,t=(c,s)=>{let l=n.get(c);if(!l){n.set(c,[s]);return}l[l.length-1]!==s&&l.push(s)},i=m(e,r);if(!i)return n;let a=F(i).split(/\r?\n/),o=/\b([A-Za-z_$][\w$]*)\b/g;for(let c=0;c<a.length;c+=1){let s=a[c]??"";for(let l of s.matchAll(o))l[1]&&t(l[1],c)}return n}function Le(e,r){let n=z(e);return n?r.filter(t=>z(t.file)===n):r}function _e(e,r,n,t){let i=n.find(a=>a.file===r);if(i)return i;if(t){let a=new Set(y(e,r).map(o=>o.sourcePath).filter(o=>!!o));for(let o of n)for(let c of a)if(p(c,o.file))return o;return null}return n.length===1?n[0]:null}function z(e){let r=k(e);return r?r==="typescript"||r==="tsx"||r==="javascript"?"javascript-family":r:null}var q=M("global-leaf-index",{clearGroups:["whole-project"]});function E(e){return q.get(e,()=>{let r=e.all(`SELECT gs.id, gs.symbol,
1
+ import{d as A,i as T}from"./chunk-KWMRY4RN.js";import{d as I}from"./chunk-2HCWAL42.js";import{e as d,s as w,z as P}from"./chunk-7XP7ZRSI.js";import{a as v,b as F,f as h,p as y}from"./chunk-JLZUM476.js";import{B as k,L as R,a as D,c as p}from"./chunk-TLTLJ4SW.js";import{c as u,d as M,y as m}from"./chunk-M2TRDR25.js";function L(e,r,n,t={}){if(!n)return[];let i=m(e,r);return i?i.indexOf(n)===-1?[]:(x(e,r).get(n)??[]).filter(o=>!J(o,t)):[]}function J(e,r){return typeof r.excludeStartLine=="number"&&typeof r.excludeEndLine=="number"&&e>=r.excludeStartLine&&e<=r.excludeEndLine}var Y=u("file-identifiers",{clearGroups:["whole-project","source-file"]});function O(e,r){let n=h(e,r);return n?n.fileIdentifiers:Y.get(e,r,()=>new Set(x(e,r).keys()))}var W=u("file-ident-lines",{clearGroups:["whole-project","source-file"]});function x(e,r){let n=h(e,r);return n?n.identifierLineMap:W.get(e,r,()=>X(e,r))}var V=u("file-idents-by-line",{clearGroups:["whole-project","source-file"]});function pe(e,r){let n=h(e,r);return n?n.identifiersByLine:V.get(e,r,()=>{let t=x(e,r),i=0;for(let o of t.values()){let c=o[o.length-1];c!==void 0&&c>i&&(i=c)}let a=new Array(i+1);for(let o=0;o<=i;o+=1)a[o]=new Set;for(let[o,c]of t)for(let s of c)a[s].add(o);return a})}function X(e,r){let n=new Map,t=(c,s)=>{let l=n.get(c);if(!l){n.set(c,[s]);return}l[l.length-1]!==s&&l.push(s)},i=m(e,r);if(!i)return n;let a=F(i).split(/\r?\n/),o=/\b([A-Za-z_$][\w$]*)\b/g;for(let c=0;c<a.length;c+=1){let s=a[c]??"";for(let l of s.matchAll(o))l[1]&&t(l[1],c)}return n}function Le(e,r){let n=z(e);return n?r.filter(t=>z(t.file)===n):r}function _e(e,r,n,t){let i=n.find(a=>a.file===r);if(i)return i;if(t){let a=new Set(y(e,r).map(o=>o.sourcePath).filter(o=>!!o));for(let o of n)for(let c of a)if(p(c,o.file))return o;return null}return n.length===1?n[0]:null}function z(e){let r=k(e);return r?r==="typescript"||r==="tsx"||r==="javascript"?"javascript-family":r:null}var q=M("global-leaf-index",{clearGroups:["whole-project"]});function E(e){return q.get(e,()=>{let r=e.all(`SELECT gs.id, gs.symbol,
2
2
  COALESCE(der_doc.relative_path, mention_doc.relative_path) AS relative_path
3
3
  FROM global_symbols gs
4
4
  LEFT JOIN defn_enclosing_ranges der ON der.symbol_id = gs.id
@@ -13,4 +13,4 @@ import{d as A,i as T}from"./chunk-DA34GNNO.js";import{d as I}from"./chunk-YSUD2S
13
13
  ) mention_doc ON mention_doc.symbol_id = gs.id
14
14
  WHERE 1 = 1
15
15
  ${e.symbolNoiseFor("gs")}`),n=new Map;for(let t of r){if(!t.relative_path||e.isIgnored(t.relative_path))continue;let i=d(t.symbol);if(!i)continue;let a=n.get(i);a||(a=[],n.set(i,a)),a.some(o=>o.symbolId===t.id)||a.push({symbol:t.symbol,symbolId:t.id,file:t.relative_path})}return n})}var K=u("source-import-paths-by-local-name",{clearGroups:["whole-project","source-file"]});function $(e,r){let n=D(r);return K.get(e,n,()=>Q(e,n))}function Q(e,r){let n=new Map;for(let t of y(e,r)){if(!t.sourcePath)continue;let i=t.localName??t.importedName;if(i&&j(n,i,t.sourcePath),t.kind==="namespace")for(let a of t.usedMembers)j(n,a,t.sourcePath)}return n}function j(e,r,n){let t=e.get(r);t||(t=new Set,e.set(r,t)),t.add(n)}var B=/[A-Za-z_$][A-Za-z0-9_$]*/g,G=/^[A-Za-z_$][A-Za-z0-9_$]*$/,ee=512;function C(e){let r=[],n=!1;for(let t of e)t&&(n=!0,G.test(t)||r.push(t));return{candidateNames:e,hasUsableCandidate:n,nonIdentifierNames:r}}function H(e,r){let n=te(r)?r:C(r);if(n.candidateNames.size===0||!n.hasUsableCandidate)return!0;if(n.candidateNames.size<=ee){for(let i of n.candidateNames)if(i){if(G.test(i)){if(ne(i).test(e))return!0;continue}if(e.includes(i))return!0}return!1}B.lastIndex=0;let t;for(;(t=B.exec(e))!==null;)if(n.candidateNames.has(t[0]))return!0;for(let i of n.nonIdentifierNames)if(e.includes(i))return!0;return!1}function te(e){return"candidateNames"in e}function ne(e){return new RegExp(`(?<![A-Za-z_$0-9])${v(e)}(?![A-Za-z_$0-9])`)}function N(e,r,n){let t=E(e).get(n);if(!t||t.length===0)return[];if(t.length===1)return[g(t[0])];let i=t.filter(s=>s.file===r);if(i.length>0)return i.map(g);let a=$(e,r),o=a.get(n);if(o)for(let s of o){let l=t.filter(f=>p(s,f.file));if(l.length>0)return l.map(g)}let c=new Set;for(let s of a.values())for(let l of s)c.add(l);for(let s of c){let l=t.filter(f=>p(s,f.file));if(l.length>0&&l.length===t.length)return l.map(g)}return[]}function Be(e,r,n){let t=N(e,r,n);if(t.length>0)return t;let i=E(e).get(n);return!i||i.length===0?[]:i.map(g)}function U(e,r,n={}){let t=I(e,r);if(!t)return[];let i=d(t.symbol);if(!i)return[];if(n.semantic!==!1){let o=T(e,{...t,leaf:i,parentTypeName:null,isFunctionLike:!1,isTypeLike:!1,kind:null,documentation:null,enclosingSymbol:null});if(o.length>0){let c=new Map;for(let s of o){let l=c.get(s.file)??[];l.push(s.line),c.set(s.file,l)}return _(e,c)}}let a=new Map;for(let o of R(e)){let c=m(e,o);if(!c||c.indexOf(i)===-1||o!==t.relativePath&&!N(e,o,i).some(f=>f.symbolId===t.symbolId))continue;let s=L(e,o,i,o===t.relativePath?{excludeStartLine:t.startLine,excludeEndLine:t.endLine}:{});s.length>0&&a.set(o,s)}return _(e,a)}function Ge(e,r,n={}){let t=new Map;for(let s of r){if(!s.leaf)continue;let l=t.get(s.leaf)??[];l.push(s),t.set(s.leaf,l)}if(t.size===0)return new Map;let i=new Set(r.map(s=>s.symbolId)),a=new Set(t.keys()),o=C(a),c=new Map;for(let s of R(e)){if(n.skipPath?.(s)||!H(m(e,s),o))continue;let l=O(e,s);if(l.size!==0){for(let f of l)if(t.has(f))for(let b of N(e,s,f)){if(!i.has(b.symbolId)||s===b.relativePath)continue;let S=c.get(b.symbolId);S||(S=new Set,c.set(b.symbolId,S)),S.add(s)}}}return c}function g(e){return{symbolId:e.symbolId,symbol:e.symbol,relativePath:e.file}}function _(e,r){let n=[],t=new Set;for(let[i,a]of r){let o=w(e,i);for(let c of a){let s=P(o,c),l=`${i}|${c}|${s?.symbol??""}`;t.has(l)||(t.add(l),n.push({file:i,line:c,enclosingSymbol:s?.symbol??null}))}}return n}function re(e,r){let n=le(e,r);return n?_(e,oe(e,n.match,n.identifier)):[]}function Ve(e,r,n={}){return ie(e,r,n).map(t=>({file:t.file,line:t.line,enclosingSymbol:t.enclosingSymbol}))}function ie(e,r,n={}){let t=U(e,r,{semantic:n.semantic}),i=t.length>0?Z(t,"source-attribution"):Z(re(e,r),"scip-reference-chunk");return n.includeIgnored===!0?i:i.filter(a=>!e.isIgnored(a.file))}function Z(e,r){return e.map(n=>({...n,provenance:r}))}function oe(e,r,n){let t=new Map;for(let[i,a]of se(e,r.symbolId))t.set(i,ae(e,i,a,r,n));return t}function se(e,r){let n=new Map;for(let t of A(e,[r])){if(e.isIgnored(t.relative_path))continue;let i=n.get(t.relative_path);i||(i=[],n.set(t.relative_path,i)),i.push({start_line:t.chunk_start,end_line:t.chunk_end})}return n}function ae(e,r,n,t,i){let a=r===t.relativePath?{excludeStartLine:t.startLine,excludeEndLine:t.endLine}:{},o=i?L(e,r,i,a):[];return n.flatMap(c=>ce(o,c))}function ce(e,r){let n=e.filter(t=>t>=r.start_line&&t<=r.end_line);return n.length>0?n:[r.start_line]}function le(e,r){let n=I(e,r);return n?{match:n,identifier:d(n.symbol)||null}:null}export{x as a,pe as b,Le as c,_e as d,E as e,C as f,H as g,$ as h,N as i,Be as j,Ge as k,re as l,Ve as m};
16
- //# sourceMappingURL=chunk-2Y7YX54K.js.map
16
+ //# sourceMappingURL=chunk-FY6RCFDH.js.map
@@ -1,4 +1,4 @@
1
- import{b as l}from"./chunk-QB7NRST4.js";import{a}from"./chunk-3I34FZ6R.js";import{d as i,g as n}from"./chunk-OO6S4ECV.js";function _(e,r){let t=l(e,r);return t.length===0?[]:m([...d(e,t),...c(e,t)]).filter(o=>!e.isIgnored(o.relative_path)).map(u)}function d(e,r){let t=r.map(()=>"?").join(", ");return e.all(`SELECT DISTINCT d1.relative_path, gs.symbol
1
+ import{b as l}from"./chunk-5N5ZC566.js";import{a}from"./chunk-BTYDBDX5.js";import{d as i,g as n}from"./chunk-7XP7ZRSI.js";function _(e,r){let t=l(e,r);return t.length===0?[]:m([...d(e,t),...c(e,t)]).filter(o=>!e.isIgnored(o.relative_path)).map(u)}function d(e,r){let t=r.map(()=>"?").join(", ");return e.all(`SELECT DISTINCT d1.relative_path, gs.symbol
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents d1 ON c.document_id = d1.id
@@ -26,4 +26,4 @@ import{b as l}from"./chunk-QB7NRST4.js";import{a}from"./chunk-3I34FZ6R.js";impor
26
26
  AND ${e.localSymbolPredicate}
27
27
  ${e.pathExclusionsFor("d1")}
28
28
  ORDER BY d1.relative_path`,...r,...r,...r)}function c(e,r){let t=new a(e);return r.flatMap(o=>t.definitionsForFile(o).filter(s=>n(s.symbol)).map(s=>({relative_path:o,symbol:s.symbol})))}function m(e){let r=new Set;return e.filter(t=>{let o=`${t.relative_path}|${t.symbol}`;return r.has(o)?!1:(r.add(o),!0)})}function u(e){return{consumer:e.relative_path,symbol:e.symbol,shortName:i(e.symbol)}}export{_ as a};
29
- //# sourceMappingURL=chunk-YFEJIYWH.js.map
29
+ //# sourceMappingURL=chunk-FZXN37RN.js.map
@@ -1,2 +1,2 @@
1
- import{c as m}from"./chunk-B75HZHUP.js";import{a as g,c as b}from"./chunk-UO4IADXJ.js";import{m as y}from"./chunk-2Y7YX54K.js";import{a as c}from"./chunk-YSUD2S7T.js";import{d as r}from"./chunk-OO6S4ECV.js";function v(l,t,n={}){let o=c(l,t);if(!o)return null;let a=[{file:o.relativePath,line:o.startLine}],s=y(l,o,{semantic:n.semantic}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{producers:f,consumers:i}=S(l,o,s,{semantic:n.semantic!==!1});return{symbol:o.symbol,shortName:r(o.symbol),relativePath:o.relativePath,definitionSites:a.filter(e=>!l.isIgnored(e.file)),usageSites:s,producers:f.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),consumers:i.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function S(l,t,n,o){let a=m(g(l,t,{limit:30,semantic:o.semantic}).map(i=>({symbol:i.symbol,file:i.file}))),s=m(b(l,t,{limit:30,semantic:o.semantic})),f=s.length>0?s:m(n.map(i=>({symbol:i.enclosingSymbol==="(top-level)"?i.file:i.enclosingSymbol,file:i.file})));return{producers:a,consumers:f}}export{v as a};
2
- //# sourceMappingURL=chunk-KI4WPR7Q.js.map
1
+ import{c as m}from"./chunk-B75HZHUP.js";import{a as g,c as b}from"./chunk-3YEBIYXL.js";import{m as y}from"./chunk-FY6RCFDH.js";import{a as c}from"./chunk-2HCWAL42.js";import{d as r}from"./chunk-7XP7ZRSI.js";function v(l,t,n={}){let o=c(l,t);if(!o)return null;let a=[{file:o.relativePath,line:o.startLine}],s=y(l,o,{semantic:n.semantic}).map(e=>({file:e.file,line:e.line,enclosingSymbol:e.enclosingSymbol??"(top-level)",enclosingShort:e.enclosingSymbol?r(e.enclosingSymbol):"(top-level)"})),{producers:f,consumers:i}=S(l,o,s,{semantic:n.semantic!==!1});return{symbol:o.symbol,shortName:r(o.symbol),relativePath:o.relativePath,definitionSites:a.filter(e=>!l.isIgnored(e.file)),usageSites:s,producers:f.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:r(e.symbol),file:e.file})),consumers:i.filter(e=>!l.isIgnored(e.file)).map(e=>({symbol:e.symbol,shortName:e.symbol===e.file?"(top-level)":r(e.symbol),file:e.file}))}}function S(l,t,n,o){let a=m(g(l,t,{limit:30,semantic:o.semantic}).map(i=>({symbol:i.symbol,file:i.file}))),s=m(b(l,t,{limit:30,semantic:o.semantic})),f=s.length>0?s:m(n.map(i=>({symbol:i.enclosingSymbol==="(top-level)"?i.file:i.enclosingSymbol,file:i.file})));return{producers:a,consumers:f}}export{v as a};
2
+ //# sourceMappingURL=chunk-G4IUQW27.js.map
@@ -1,2 +1,2 @@
1
- import{a as y}from"./chunk-HLRWOFXC.js";import{b as u}from"./chunk-NLRWGGPY.js";import{a as p}from"./chunk-G4KQ7S74.js";import{existsSync as v}from"fs";import{join as w}from"path";function ne(e){return b.test(e)}var b=/(?:^|\/)(?:package-lock\.json|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|uv\.lock|poetry\.lock|Pipfile\.lock|bun\.lockb?|\.SRCINFO|CHANGELOG(?:\.[a-z]+)?|.*\.(?:map|tsbuildinfo))$|(?:^|\/)(?:dist|build|out|node_modules|docs\/plans)\//i;function se(e,t,n={}){let{minTogether:s=4,minConfidence:o=.6,limit:r=30,maxFilesPerCommit:l=20}=n,g=y(e,{historyMode:n.historyMode}),a=g.commitHistory(),c=t!==void 0,d=g.coChangePairs({minTogether:c?Math.min(s,2):s,minConfidence:c?0:o,maxFilesPerCommit:l});if(!a||!d)return{available:!1,commitsAnalyzed:0,findings:[]};let f=typeof n.scanLimit=="number"?d.slice(0,n.scanLimit):d,E=p(e),R=k(e),j=F(e,E,R),L=n.includeLinked===!0||c,m=[];for(let i of f){if(b.test(i.fileA)||b.test(i.fileB)||!x(e,i.fileA)||!x(e,i.fileB)||c&&!i.fileA.includes(t)&&!i.fileB.includes(t)||!c&&(u(i.fileA)==="test"||u(i.fileB)==="test"||D(i.fileA,i.fileB)||N(i.fileA,i.fileB)))continue;let h=j(i.fileA,i.fileB);if(!L&&h)continue;let C=$(i.fileA,i.fileB),S=_(i,C,h);if(m.push({...i,structurallyLinked:h,partnerClass:C.partnerClass,partnerClassReasons:C.reasons,...S?{declaredCouplingSuggestion:S}:{}}),m.length>=r)break}return{available:!0,commitsAnalyzed:a.commits.length,findings:m}}function x(e,t){return v(w(e.config.projectRoot,t))}function $(e,t){let n=T(e),s=T(t),o=[],r=a=>{o.includes(a)||o.push(a)},l=(a,c)=>n.tags.has(a)&&s.tags.has(c)||n.tags.has(c)&&s.tags.has(a);if(l("doc","code"))return r("one side is documentation and the other is executable source"),{partnerClass:"doc-code",reasons:o};if(n.tags.has("test")||s.tags.has("test"))return r("one side is classified as a test file"),{partnerClass:"test-code",reasons:o};if(l("schema","script"))return r("schema or contract file changes with a script or generated-code path"),{partnerClass:"schema-script",reasons:o};if(l("model","view"))return r("model or state path changes with a view or component path"),{partnerClass:"model-view",reasons:o};if(l("config","code"))return r("configuration file changes with executable source"),{partnerClass:"config-code",reasons:o};let g=U(n.tokens,s.tokens).filter(a=>!J.has(a));return A(e,t)||g.length>=2?(r(A(e,t)?"both files live in the same directory":`files share feature tokens: ${g.slice(0,4).join(", ")}`),{partnerClass:"same-feature",reasons:o}):(r("no specific relationship pattern matched"),{partnerClass:"unknown",reasons:o})}function _(e,t,n){if(n||e.together<4||e.confidence<.75||e.commitScope==="broad-sweep"||e.recency==="stale"||!Z.has(t.partnerClass))return;let s=[e.fileA,e.fileB].sort();return{name:`co-change ${t.partnerClass}: ${V(s)}`,files:s,reason:`${t.partnerClass} pair changed together ${e.together}x with ${Math.round(e.confidence*100)}% confidence; declare it if future edits should require both sides.`}}function F(e,t=p(e),n=k(e)){return(s,o)=>B(t,n,s,o)}var I=/(?:^|\/)(?:locales|i18n)\//i;function P(e){return I.test(e)}function N(e,t){return P(e)&&P(t)?!0:O(e,t)}function O(e,t){if(!e.endsWith(".json")||!t.endsWith(".json"))return!1;let n=e.lastIndexOf("/"),s=t.lastIndexOf("/");if(n<0||s<0)return!1;let o=e.slice(0,n),r=t.slice(0,s);if(o===r)return!1;let l=e.slice(n+1),g=t.slice(s+1);if(l!==g)return!1;let a=o.lastIndexOf("/"),c=r.lastIndexOf("/"),d=a>=0?o.slice(0,a):"",f=c>=0?r.slice(0,c):"";return d===f}function D(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/");if(e.slice(0,n)!==t.slice(0,s))return!1;let o=e.slice(n+1).split(".")[0],r=t.slice(s+1).split(".")[0];return o!==""&&o===r}function k(e){return(e.config.declaredCouplings??[]).filter(t=>Array.isArray(t.files)&&t.files.length>=2).map(t=>new Set(t.files))}function B(e,t,n,s){return e.get(n)?.has(s)===!0||e.get(s)?.has(n)===!0?!0:t.some(o=>o.has(n)&&o.has(s))}var M=/(?:^|\/)(?:readme|docs?|guides?|adr|architecture|design)(?:\/|$)|\.(?:md|mdx|rst|adoc|txt)$/i,z=/(?:^|\/)(?:\.[a-z0-9-]+rc|config|configs|settings|\.github)(?:\/|$)|(?:^|\/)(?:package\.json|tsconfig(?:\.[^.]+)?\.json|vite\.config\.[cm]?[jt]s|rollup\.config\.[cm]?[jt]s|eslint\.config\.[cm]?[jt]s)$|\.(?:json|ya?ml|toml|ini|env)$/i,G=/(?:^|\/)(?:schemas?|contracts?|migrations?|models?|types?)(?:\/|$)|(?:^|\/)[^/]*(?:schema|contract|migration|model|types?)[^/]*|(?:\.schema)?\.(?:graphql|gql|proto|prisma)$/i,H=/(?:^|\/)(?:scripts?|bin|tools?|tasks?|generators?|codegen|migrations?|seeds?)(?:\/|$)|(?:^|\/)[^/]*(?:generate|codegen|migrate|seed|script)[^/]*\.[cm]?[jt]s$/i,q=/(?:^|\/)(?:models?|entities|domain|state|stores?|reducers?)(?:\/|$)|(?:^|\/)[^/]*(?:model|entity|state|store|reducer|viewmodel)[^/]*\.[^.]+$/i,W=/(?:^|\/)(?:views?|pages?|components?|screens?|routes?|templates?)(?:\/|$)|(?:^|\/)[^/]*(?:view|page|component|screen|template)[^/]*\.[^.]+$|\.(?:vue|svelte|tsx|jsx)$/i,Z=new Set(["doc-code","config-code","schema-script","model-view","test-code"]),J=new Set(["src","lib","app","apps","packages","frontend","backend","examples","python","typescript","javascript","test","tests","spec","index","main","utils","util","types","type","config","docs","doc","package","requirements","ts","tsx","js","jsx","mjs","cjs","vue","py","md","mdx","json","yaml","yml","toml","txt"]);function T(e){let t=e.replace(/\\/g,"/"),n=new Set;return M.test(t)&&n.add("doc"),z.test(t)&&n.add("config"),G.test(t)&&n.add("schema"),H.test(t)&&n.add("script"),q.test(t)&&n.add("model"),W.test(t)&&n.add("view"),u(t)==="test"&&n.add("test"),!n.has("doc")&&!n.has("config")&&n.add("code"),{tags:n,tokens:K(t)}}function A(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/"),o=n>=0?e.slice(0,n):"",r=s>=0?t.slice(0,s):"";return o!==""&&o===r}function K(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).map(t=>t.toLowerCase()).filter(t=>t.length>=2)}function U(e,t){let n=new Set(t);return[...new Set(e.filter(s=>n.has(s)))].sort()}function V(e){return e.map(t=>t.split("/").pop()?.replace(/\.[^.]+$/,"")||t).join(" + ")}export{ne as a,se as b,$ as c,_ as d,F as e};
2
- //# sourceMappingURL=chunk-U6BJVXWQ.js.map
1
+ import{a as y}from"./chunk-X566NT42.js";import{b as u}from"./chunk-5CJ6AQN7.js";import{a as p}from"./chunk-QEIGJJBC.js";import{existsSync as v}from"fs";import{join as w}from"path";function ne(e){return b.test(e)}var b=/(?:^|\/)(?:package-lock\.json|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|uv\.lock|poetry\.lock|Pipfile\.lock|bun\.lockb?|\.SRCINFO|CHANGELOG(?:\.[a-z]+)?|.*\.(?:map|tsbuildinfo))$|(?:^|\/)(?:dist|build|out|node_modules|docs\/plans)\//i;function se(e,t,n={}){let{minTogether:s=4,minConfidence:o=.6,limit:r=30,maxFilesPerCommit:l=20}=n,g=y(e,{historyMode:n.historyMode}),a=g.commitHistory(),c=t!==void 0,d=g.coChangePairs({minTogether:c?Math.min(s,2):s,minConfidence:c?0:o,maxFilesPerCommit:l});if(!a||!d)return{available:!1,commitsAnalyzed:0,findings:[]};let f=typeof n.scanLimit=="number"?d.slice(0,n.scanLimit):d,E=p(e),R=k(e),j=F(e,E,R),L=n.includeLinked===!0||c,m=[];for(let i of f){if(b.test(i.fileA)||b.test(i.fileB)||!x(e,i.fileA)||!x(e,i.fileB)||c&&!i.fileA.includes(t)&&!i.fileB.includes(t)||!c&&(u(i.fileA)==="test"||u(i.fileB)==="test"||D(i.fileA,i.fileB)||N(i.fileA,i.fileB)))continue;let h=j(i.fileA,i.fileB);if(!L&&h)continue;let C=$(i.fileA,i.fileB),S=_(i,C,h);if(m.push({...i,structurallyLinked:h,partnerClass:C.partnerClass,partnerClassReasons:C.reasons,...S?{declaredCouplingSuggestion:S}:{}}),m.length>=r)break}return{available:!0,commitsAnalyzed:a.commits.length,findings:m}}function x(e,t){return v(w(e.config.projectRoot,t))}function $(e,t){let n=T(e),s=T(t),o=[],r=a=>{o.includes(a)||o.push(a)},l=(a,c)=>n.tags.has(a)&&s.tags.has(c)||n.tags.has(c)&&s.tags.has(a);if(l("doc","code"))return r("one side is documentation and the other is executable source"),{partnerClass:"doc-code",reasons:o};if(n.tags.has("test")||s.tags.has("test"))return r("one side is classified as a test file"),{partnerClass:"test-code",reasons:o};if(l("schema","script"))return r("schema or contract file changes with a script or generated-code path"),{partnerClass:"schema-script",reasons:o};if(l("model","view"))return r("model or state path changes with a view or component path"),{partnerClass:"model-view",reasons:o};if(l("config","code"))return r("configuration file changes with executable source"),{partnerClass:"config-code",reasons:o};let g=U(n.tokens,s.tokens).filter(a=>!J.has(a));return A(e,t)||g.length>=2?(r(A(e,t)?"both files live in the same directory":`files share feature tokens: ${g.slice(0,4).join(", ")}`),{partnerClass:"same-feature",reasons:o}):(r("no specific relationship pattern matched"),{partnerClass:"unknown",reasons:o})}function _(e,t,n){if(n||e.together<4||e.confidence<.75||e.commitScope==="broad-sweep"||e.recency==="stale"||!Z.has(t.partnerClass))return;let s=[e.fileA,e.fileB].sort();return{name:`co-change ${t.partnerClass}: ${V(s)}`,files:s,reason:`${t.partnerClass} pair changed together ${e.together}x with ${Math.round(e.confidence*100)}% confidence; declare it if future edits should require both sides.`}}function F(e,t=p(e),n=k(e)){return(s,o)=>B(t,n,s,o)}var I=/(?:^|\/)(?:locales|i18n)\//i;function P(e){return I.test(e)}function N(e,t){return P(e)&&P(t)?!0:O(e,t)}function O(e,t){if(!e.endsWith(".json")||!t.endsWith(".json"))return!1;let n=e.lastIndexOf("/"),s=t.lastIndexOf("/");if(n<0||s<0)return!1;let o=e.slice(0,n),r=t.slice(0,s);if(o===r)return!1;let l=e.slice(n+1),g=t.slice(s+1);if(l!==g)return!1;let a=o.lastIndexOf("/"),c=r.lastIndexOf("/"),d=a>=0?o.slice(0,a):"",f=c>=0?r.slice(0,c):"";return d===f}function D(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/");if(e.slice(0,n)!==t.slice(0,s))return!1;let o=e.slice(n+1).split(".")[0],r=t.slice(s+1).split(".")[0];return o!==""&&o===r}function k(e){return(e.config.declaredCouplings??[]).filter(t=>Array.isArray(t.files)&&t.files.length>=2).map(t=>new Set(t.files))}function B(e,t,n,s){return e.get(n)?.has(s)===!0||e.get(s)?.has(n)===!0?!0:t.some(o=>o.has(n)&&o.has(s))}var M=/(?:^|\/)(?:readme|docs?|guides?|adr|architecture|design)(?:\/|$)|\.(?:md|mdx|rst|adoc|txt)$/i,z=/(?:^|\/)(?:\.[a-z0-9-]+rc|config|configs|settings|\.github)(?:\/|$)|(?:^|\/)(?:package\.json|tsconfig(?:\.[^.]+)?\.json|vite\.config\.[cm]?[jt]s|rollup\.config\.[cm]?[jt]s|eslint\.config\.[cm]?[jt]s)$|\.(?:json|ya?ml|toml|ini|env)$/i,G=/(?:^|\/)(?:schemas?|contracts?|migrations?|models?|types?)(?:\/|$)|(?:^|\/)[^/]*(?:schema|contract|migration|model|types?)[^/]*|(?:\.schema)?\.(?:graphql|gql|proto|prisma)$/i,H=/(?:^|\/)(?:scripts?|bin|tools?|tasks?|generators?|codegen|migrations?|seeds?)(?:\/|$)|(?:^|\/)[^/]*(?:generate|codegen|migrate|seed|script)[^/]*\.[cm]?[jt]s$/i,q=/(?:^|\/)(?:models?|entities|domain|state|stores?|reducers?)(?:\/|$)|(?:^|\/)[^/]*(?:model|entity|state|store|reducer|viewmodel)[^/]*\.[^.]+$/i,W=/(?:^|\/)(?:views?|pages?|components?|screens?|routes?|templates?)(?:\/|$)|(?:^|\/)[^/]*(?:view|page|component|screen|template)[^/]*\.[^.]+$|\.(?:vue|svelte|tsx|jsx)$/i,Z=new Set(["doc-code","config-code","schema-script","model-view","test-code"]),J=new Set(["src","lib","app","apps","packages","frontend","backend","examples","python","typescript","javascript","test","tests","spec","index","main","utils","util","types","type","config","docs","doc","package","requirements","ts","tsx","js","jsx","mjs","cjs","vue","py","md","mdx","json","yaml","yml","toml","txt"]);function T(e){let t=e.replace(/\\/g,"/"),n=new Set;return M.test(t)&&n.add("doc"),z.test(t)&&n.add("config"),G.test(t)&&n.add("schema"),H.test(t)&&n.add("script"),q.test(t)&&n.add("model"),W.test(t)&&n.add("view"),u(t)==="test"&&n.add("test"),!n.has("doc")&&!n.has("config")&&n.add("code"),{tags:n,tokens:K(t)}}function A(e,t){let n=e.lastIndexOf("/"),s=t.lastIndexOf("/"),o=n>=0?e.slice(0,n):"",r=s>=0?t.slice(0,s):"";return o!==""&&o===r}function K(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).map(t=>t.toLowerCase()).filter(t=>t.length>=2)}function U(e,t){let n=new Set(t);return[...new Set(e.filter(s=>n.has(s)))].sort()}function V(e){return e.map(t=>t.split("/").pop()?.replace(/\.[^.]+$/,"")||t).join(" + ")}export{ne as a,se as b,$ as c,_ as d,F as e};
2
+ //# sourceMappingURL=chunk-GRHA5NGF.js.map