scip-query 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/{chunk-GD7XRHSV.js → chunk-2BMFRBV6.js} +2 -2
  2. package/dist/{chunk-3YQO3S5D.js → chunk-2WEH5QHC.js} +2 -2
  3. package/dist/{chunk-PE4EJOLN.js → chunk-4DAPXOWD.js} +2 -2
  4. package/dist/{chunk-EKP7XJ6L.js → chunk-4HTJZC6G.js} +2 -2
  5. package/dist/{chunk-RCRK4E7E.js → chunk-4JQFTUKD.js} +2 -2
  6. package/dist/{chunk-7I6KNKE3.js → chunk-4MHT7LKP.js} +2 -2
  7. package/dist/chunk-5OHZEO3U.js +3 -0
  8. package/dist/chunk-5QJIEYFB.js +34 -0
  9. package/dist/{chunk-Z2AJQ7VA.js → chunk-6DEX3XP6.js} +2 -2
  10. package/dist/{chunk-OMNT7E2T.js → chunk-6IGXZZQ4.js} +2 -2
  11. package/dist/{chunk-TA4DDU7J.js → chunk-6K2JQ2VI.js} +2 -2
  12. package/dist/{chunk-YO6DU7QZ.js → chunk-6QVCPUK6.js} +2 -2
  13. package/dist/chunk-6VL4AIEO.js +8 -0
  14. package/dist/{chunk-VHENVDS2.js → chunk-772YYL6I.js} +2 -2
  15. package/dist/{chunk-VTF5EH22.js → chunk-A2VTV2QB.js} +2 -2
  16. package/dist/{chunk-YSSTUCNS.js → chunk-ADRYSISR.js} +2 -2
  17. package/dist/{chunk-NM3BZXHA.js → chunk-AI2ECT7L.js} +2 -2
  18. package/dist/{chunk-TR5AU6A5.js → chunk-AP5GTKSG.js} +2 -2
  19. package/dist/{chunk-TCCUWKH4.js → chunk-BGRPMGTD.js} +2 -2
  20. package/dist/{chunk-7TYJD45F.js → chunk-BNW3Q24R.js} +2 -2
  21. package/dist/{chunk-K3V6XUTL.js → chunk-BUAC4Q4G.js} +2 -2
  22. package/dist/{chunk-SEZZ24IG.js → chunk-BZ6LCGE6.js} +2 -2
  23. package/dist/{chunk-ZJ737ZMD.js → chunk-CMXFASVD.js} +2 -2
  24. package/dist/{chunk-L6TOEQ2M.js → chunk-CO3AL7NZ.js} +2 -2
  25. package/dist/{chunk-ITUU3VE3.js → chunk-FVIKFWUL.js} +2 -2
  26. package/dist/{chunk-APLCSDXL.js → chunk-FVVT7GV6.js} +2 -2
  27. package/dist/chunk-HXXRN77A.js +2 -0
  28. package/dist/{chunk-NK7TQQG4.js → chunk-IC3RC3KJ.js} +2 -2
  29. package/dist/chunk-ISCKLDSS.js +22 -0
  30. package/dist/chunk-ITHQJZTG.js +2 -0
  31. package/dist/{chunk-RIXOMSOR.js → chunk-IVAIPXNO.js} +2 -2
  32. package/dist/{chunk-NO2TPMCQ.js → chunk-IW7ASGVF.js} +2 -2
  33. package/dist/{chunk-I66MQD5U.js → chunk-JODYQDE4.js} +2 -2
  34. package/dist/{chunk-HDA2V5DC.js → chunk-L2KFPRMA.js} +2 -2
  35. package/dist/{chunk-U254PV4S.js → chunk-MCW36F2D.js} +2 -2
  36. package/dist/{chunk-SDGCKEB7.js → chunk-MN75T4UB.js} +2 -2
  37. package/dist/{chunk-AGW2MVIO.js → chunk-NC4IUW25.js} +2 -2
  38. package/dist/{chunk-2DVVHNC3.js → chunk-NGI4V4AB.js} +2 -2
  39. package/dist/{chunk-SOGLYIJ4.js → chunk-O6KCZPJQ.js} +2 -2
  40. package/dist/chunk-OAI5GEIN.js +6 -0
  41. package/dist/chunk-OH5HIAID.js +4 -0
  42. package/dist/{chunk-NGLRXEWN.js → chunk-OLCKSG3Y.js} +2 -2
  43. package/dist/{chunk-JTCEWV7Q.js → chunk-OXKEUWMJ.js} +2 -2
  44. package/dist/{chunk-LBAMALDV.js → chunk-PRVDXGSK.js} +2 -2
  45. package/dist/{chunk-46ILZVMX.js → chunk-QJWN6LA5.js} +2 -2
  46. package/dist/{chunk-BCFED24F.js → chunk-QKO474FG.js} +2 -2
  47. package/dist/{chunk-TQTVM27C.js → chunk-QYKKTYBN.js} +2 -2
  48. package/dist/{chunk-UUDYI3FF.js → chunk-R6XDPWJA.js} +2 -2
  49. package/dist/{chunk-D43L5PQF.js → chunk-SCEMECW7.js} +2 -2
  50. package/dist/{chunk-2Y2WIJI4.js → chunk-SJR4SB7B.js} +2 -2
  51. package/dist/chunk-SYKCO25G.js +16 -0
  52. package/dist/{chunk-FYT2PE7C.js → chunk-T22X7WT6.js} +2 -2
  53. package/dist/{chunk-Y3RUPPIU.js → chunk-VDY4HYNK.js} +2 -2
  54. package/dist/{chunk-EAU4RDFG.js → chunk-VDZIEDJB.js} +2 -2
  55. package/dist/{chunk-6ZFKI5EP.js → chunk-VGBSY6N7.js} +2 -2
  56. package/dist/{chunk-VN6B6HFB.js → chunk-VZRILF2Z.js} +2 -2
  57. package/dist/{chunk-CVRXOP6M.js → chunk-WJIS6BNI.js} +2 -2
  58. package/dist/{chunk-SLX5XBCD.js → chunk-WN5Z3UVT.js} +2 -2
  59. package/dist/{chunk-6G76D2YM.js → chunk-XCW7DYHM.js} +2 -2
  60. package/dist/{chunk-6HP3BKIP.js → chunk-Y5H7TBVE.js} +2 -2
  61. package/dist/{chunk-I7OTKWNY.js → chunk-YWZBKYLS.js} +2 -2
  62. package/dist/{chunk-64UY7VTR.js → chunk-ZF6P2NAT.js} +3 -3
  63. package/dist/{chunk-VQGQHIAT.js → chunk-ZGIK464P.js} +2 -2
  64. package/dist/{chunk-WC43FMAB.js → chunk-ZOT3WUZW.js} +2 -2
  65. package/dist/{chunk-TFO4OMJZ.js → chunk-ZZ2W5P3D.js} +2 -2
  66. package/dist/cli.js +171 -151
  67. package/dist/index.js +1 -1
  68. package/dist/queries/affected.js +1 -1
  69. package/dist/queries/bottlenecks.js +1 -1
  70. package/dist/queries/by-kind.js +1 -1
  71. package/dist/queries/call-graph.js +1 -1
  72. package/dist/queries/change-surface.js +1 -1
  73. package/dist/queries/cleanup-plan.js +1 -1
  74. package/dist/queries/co-change.js +1 -1
  75. package/dist/queries/code.js +1 -1
  76. package/dist/queries/complexity-hotspots.js +1 -1
  77. package/dist/queries/complexity.js +1 -1
  78. package/dist/queries/convergence.js +1 -1
  79. package/dist/queries/coupling.js +1 -1
  80. package/dist/queries/cycles.js +1 -1
  81. package/dist/queries/dataflow.js +1 -1
  82. package/dist/queries/dead.js +1 -1
  83. package/dist/queries/deep-chains.js +1 -1
  84. package/dist/queries/deps.js +1 -1
  85. package/dist/queries/diff-gate.d.ts +5 -1
  86. package/dist/queries/diff-gate.js +1 -1
  87. package/dist/queries/diff-impact.js +1 -1
  88. package/dist/queries/doc-drift.js +1 -1
  89. package/dist/queries/drift.js +1 -1
  90. package/dist/queries/extract-candidates.js +1 -1
  91. package/dist/queries/fan.js +1 -1
  92. package/dist/queries/health.js +1 -1
  93. package/dist/queries/hierarchy.js +1 -1
  94. package/dist/queries/hotspots.js +1 -1
  95. package/dist/queries/imports.js +1 -1
  96. package/dist/queries/incomplete-migration.js +1 -1
  97. package/dist/queries/index.d.ts +1 -1
  98. package/dist/queries/index.js +1 -1
  99. package/dist/queries/isolated.js +1 -1
  100. package/dist/queries/members.js +1 -1
  101. package/dist/queries/methods.js +1 -1
  102. package/dist/queries/outline.js +1 -1
  103. package/dist/queries/passthrough-candidates.js +1 -1
  104. package/dist/queries/plan-context.js +1 -1
  105. package/dist/queries/recent-duplicates.js +1 -1
  106. package/dist/queries/redundant-reexports.js +1 -1
  107. package/dist/queries/refs.js +1 -1
  108. package/dist/queries/self-audit.js +1 -1
  109. package/dist/queries/similar-chains.js +1 -1
  110. package/dist/queries/similar-files.js +1 -1
  111. package/dist/queries/similar-signatures.js +1 -1
  112. package/dist/queries/similar.js +1 -1
  113. package/dist/queries/slice.js +1 -1
  114. package/dist/queries/stale-abstractions.js +1 -1
  115. package/dist/queries/surface.js +1 -1
  116. package/dist/queries/symbols.js +1 -1
  117. package/dist/queries/system.js +1 -1
  118. package/dist/queries/trace.js +1 -1
  119. package/dist/queries/unused-params.js +1 -1
  120. package/dist/queries/wrapper-candidates.js +1 -1
  121. package/package.json +1 -1
  122. package/dist/chunk-44G4P3GJ.js +0 -2
  123. package/dist/chunk-IBM6FXOQ.js +0 -3
  124. package/dist/chunk-LR7E2ATW.js +0 -8
  125. package/dist/chunk-PCMVXWDC.js +0 -34
  126. package/dist/chunk-PLFYFZX3.js +0 -2
  127. package/dist/chunk-SQ6VENQY.js +0 -6
  128. package/dist/chunk-T4AK46CM.js +0 -16
  129. package/dist/chunk-WQFOZIID.js +0 -4
@@ -1,4 +1,4 @@
1
- import{a as te,b as re,c as b,d as se,e as ne,f as oe,g as j,h as ie,i as U,j as ae,k as pe,l as E,m as W,n as T,o as V,p as z,q as S,r as Q,s as J,u as R,v as h,w as M,x as G}from"./chunk-WEJYUS5O.js";import{a as v,c as ce,d as me,e as C}from"./chunk-WQFOZIID.js";import{c as L}from"./chunk-VDZL45XI.js";import{basename as le}from"path";var Oe=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function x(t){let r=[],e=0,s=0;for(let n=0;n<t.length;n++){let o=t[n];(o==="{"||o==="["||o==="(")&&e++,(o==="}"||o==="]"||o===")")&&e--,o===","&&e===0&&(r.push(t.slice(s,n)),s=n+1)}return r.push(t.slice(s)),r}function y(t,r){for(let e of t.namedChildren)if(e.type===r)return e;return null}function g(t,r){let e=new Set,s=(n,o)=>{let i=o||r.has(n.type);!i&&Oe.has(n.type)&&e.add(n.text);for(let a of n.children)s(a,i)};return s(t.rootNode,!1),e}function P(t,r,e,s,n,o,i){return{importedName:n,localName:o,sourcePath:i??S(t,s,pe(r)),kind:"named",used:h(e,o),usedMembers:[]}}function f(t,r,e,s,n="named",o={}){return{importedName:t,localName:r,sourcePath:e,kind:n,used:s.has(r),usedMembers:[],isTypeOnly:o.isTypeOnly}}function $(t,r,e,s,n="named",o=[],i={}){return{importedName:t,localName:r,sourcePath:e,kind:n,used:s,usedMembers:o,isTypeOnly:i.isTypeOnly}}function D(t,r){return{importedName:t,localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]}}function O(t,r,e={}){return{importedName:t,localName:e.localName??null,sourcePath:r,kind:"namespace",used:e.used??!0,usedMembers:e.usedMembers??[],isTypeOnly:e.isTypeOnly}}function N(t,r,e){let s=[];for(let n of t.matchAll(r)){let o=n[0];if(!o||typeof n.index!="number")continue;let i=R(t,n.index,n.index+o.length);for(let a of e(n,i))s.push(a)}return s}function I(t,r,e,s){let n=C(t,r);if(n){let o=e(n);if(o)return o}return s()}function X(t,r,e,s){let n=C(t,r),o=ce(r),i=o?e[o]:void 0;return n&&i?i(n):s()}function ue(t,r,e){return I(t,r,s=>Ae(t,r,s),()=>ke(t,r,e))}function ke(t,r,e){return N(e,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(s,n)=>{let o=s[1]?.trim();if(!o)return[];let i=le(o).replace(/\.[^.]+$/,"");return[$(o,i,z(t,r,o),h(n,i))]})}function Ae(t,r,e){let s=g(e,new Set(["preproc_include"])),n=[];for(let o of e.rootNode.descendantsOfType("preproc_include")){let i=null;for(let p of o.namedChildren){if(p.type==="system_lib_string"){i=p.text.replace(/^<|>$/g,"");break}if(p.type==="string_literal"){i=p.namedChildren.find(c=>c.type==="string_content")?.text??p.text.replace(/^"|"$/g,"");break}}if(!i)continue;let a=le(i).replace(/\.[^.]+$/,"");n.push(f(i,a,z(t,r,i),s))}return n}function de(t,r,e){let s=[];for(let n of e.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let o=n[1]?.trim(),i=n[2]?.trim()??null,a=n[0];if(!o||!a||typeof n.index!="number")continue;let p=R(e,n.index,n.index+a.length);s.push({importedName:o,localName:i,sourcePath:Q(t,r,o),kind:i?"namespace":"side-effect",used:i?h(p,i):!0,usedMembers:i?M(p,i):[]})}return s}function fe(t,r,e){let s=[];for(let n of e.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let o=n[1]?.trim();o&&s.push({specifier:o,sourcePath:Q(t,r,o)})}return s}function ge(t,r,e){return X(t,r,{csharp:s=>Le(t,r,s),vb:s=>we(t,r,s)},()=>{let s=ae(r)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return N(e,s,(n,o)=>{let i=n[1]?.trim();if(!i)return[];let[a,p]=i.split(/\s*=\s*/),m=!!p,c=(m?p:a)?.trim()??i,l=c.split(".").pop()??c,u=m?a?.trim()??l:l;return[P(t,r,o,c,l,u,S(t,c,j))]})})}function we(t,r,e){let s=g(e,new Set(["imports_statement"])),n=[];for(let o of e.rootNode.descendantsOfType("imports_statement")){let i=o.namedChildren.filter(u=>u.type==="namespace_name");if(i.length===0)continue;let a=i[i.length-1],p=i.length>1?i[0]:null,m=a.text,c=m.split(".").pop()??m,l=p?.text??c;n.push(f(c,l,S(t,m,j),s,p?"namespace":"named"))}return n}function Le(t,r,e){let s=g(e,new Set(["using_directive"])),n=[];for(let o of e.rootNode.descendantsOfType("using_directive")){let i=o.namedChildren;if(i.length===0)continue;let a=null,p;i.length>=2&&i[0].type==="identifier"&&(i[1].type==="qualified_name"||i[1].type==="identifier")?(a=i[0],p=i[1]):p=i[i.length-1];let m=p.text,c=m.split(".").pop()??m,l=a?.text??c;n.push(f(c,l,S(t,m,j),s,a?"namespace":"named"))}return n}var je=L("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function Se(t,r){return je.get(t,r,()=>{let e=new Set,s=v(t,r);if(!s)return e;let o=s.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,i=>i.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,i=>i.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,i=>i.replace(/[^\r\n]/g," "));for(let i of o.matchAll(/[A-Za-z_$][\w$]*/g))e.add(i[0]);return e})}function Y(t,r,e){return I(t,r,s=>Me(t,r,s),()=>ve(t,r,e))}function ve(t,r,e){return ze(e).flatMap(s=>Qe(t,r,s.clause,s.specifier,s.start,s.end,e))}function Me(t,r,e){let s=$e(t,r,e),n=[];for(let o of e.rootNode.descendantsOfType("import_statement"))n.push(...qe(t,r,e,o,s));return n}function $e(t,r,e){let s=g(e,new Set(["import_statement"]));if(me(r))for(let n of Se(t,r))s.add(n);return s}function qe(t,r,e,s,n){let o=Xe(s);if(!o)return[];let i=E(t,r,o),a=y(s,"import_clause");return a?Ue(e,a,i,n,Be(s.text)):[D("*",i)]}function Ue(t,r,e,s,n){let o=[];for(let i of r.namedChildren)if(i.type==="identifier")o.push(We(i.text,e,s,n));else if(i.type==="namespace_import"){let a=Fe(t,i,e,s,n);a&&o.push(a)}else i.type==="named_imports"&&o.push(...Je(i,e,s,n));return o}function We(t,r,e,s){return f("default",t,r,e,"default",{isTypeOnly:s})}function Fe(t,r,e,s,n){let i=y(r,"identifier")?.text??"";if(!i)return null;let a=Ve(t,i);return O("*",e,{localName:i,usedMembers:a,isTypeOnly:n,used:a.length>0||s.has(i)})}function Je(t,r,e,s){let n=[];for(let o of t.namedChildren){if(o.type!=="import_specifier")continue;let i=o.namedChild(0),a=o.namedChild(1);if(!i)continue;let p=i.text,m=a?.text??p;n.push(f(p,m,r,e,"named",{isTypeOnly:s||He(o.text)}))}return n}function Xe(t){let r=y(t,"string");if(!r)return null;let e=y(r,"string_fragment");return e?e.text:null}function Be(t){return/^\s*import\s+type\b/.test(t)}function He(t){return/^\s*type\b/.test(t.trim())}function Ve(t,r){let e=new Set;for(let s of t.rootNode.descendantsOfType("member_expression")){let n=s.namedChild(0),o=s.namedChild(1);!n||!o||n.type!=="identifier"||n.text!==r||(o.type==="property_identifier"||o.type==="identifier")&&e.add(o.text)}return[...e]}function ze(t){let r=[],e=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let n of t.matchAll(e)){let o=n[0],i=n[1],a=n[2];!o||!a||typeof n.index!="number"||r.push({clause:i,specifier:a,start:n.index,end:n.index+o.length})}let s=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let n of t.matchAll(s)){let o=n[0],i=n[1];!o||!i||typeof n.index!="number"||r.push({clause:null,specifier:i,start:n.index,end:n.index+o.length})}return r.sort((n,o)=>n.start-o.start)}function Qe(t,r,e,s,n,o,i){let a=E(t,r,s),p=R(i,n,o);return e?Ge(e).map(c=>({...c,sourcePath:a})).map(c=>{if(c.kind==="namespace"){let l=M(p,c.localName);return O(c.importedName,c.sourcePath,{localName:c.localName,usedMembers:l,used:l.length>0||h(p,c.localName),isTypeOnly:c.isTypeOnly})}return c.kind==="side-effect"?D(c.importedName,c.sourcePath):$(c.importedName,c.localName??"",c.sourcePath,c.localName?h(p,c.localName):!1,c.kind,[],{isTypeOnly:c.isTypeOnly})}):[D("*",a)]}function Ge(t){let r=t.trim(),e=/^type\b/.test(r),s=r.replace(/^type\s+/,""),[n,o]=Ye(s),i=[];return n&&i.push(...he(n,e)),o&&i.push(...he(o,e)),i}function he(t,r){let e=t.trim();if(!e)return[];if(e.startsWith("{")){let s=e.slice(1,-1).trim();return s?x(s).map(n=>{let o=n.trim(),i=r||/^type\b/.test(o),a=o.replace(/^type\s+/,""),[p,m]=a.split(/\s+as\s+/);return{importedName:p.trim(),localName:(m??p).trim(),kind:"named",isTypeOnly:i}}):[]}return e.startsWith("* as ")?[{importedName:"*",localName:e.slice(5).trim(),kind:"namespace",isTypeOnly:r}]:[{importedName:"default",localName:e,kind:"default",isTypeOnly:r}]}function Ye(t){let r=0;for(let e=0;e<t.length;e++){let s=t[e];if(s==="{"&&r++,s==="}"&&r--,s===","&&r===0)return[t.slice(0,e).trim(),t.slice(e+1).trim()]}return[t.trim(),null]}function K(t,r,e){let s=C(t,r);return s?st(t,r,s):Ke(t,r,e)}function Ke(t,r,e){return[...Ze(t,r,e),...et(t,r,e),...tt(t,r,e)]}function Ze(t,r,e){let s=[],n=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[1]??"",a=o[2]??"",p=x(i).map(l=>rt(l.trim())).filter(l=>!!l),m=q(e,o.index),c=q(e,o.index+o[0].length-1);s.push({kind:"named",sourcePath:E(t,r,a),names:p,startLine:m,endLine:c})}return s}function et(t,r,e){let s=[],n=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[2]??"",a=q(e,o.index),p=q(e,o.index+o[0].length-1);s.push({kind:"star-as",sourcePath:E(t,r,i),names:[],startLine:a,endLine:p})}return s}function tt(t,r,e){let s=[],n=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[1]??"",a=q(e,o.index),p=q(e,o.index+o[0].length-1);s.push({kind:"star",sourcePath:E(t,r,i),names:[],startLine:a,endLine:p})}return s}function rt(t){if(!t)return null;let r=t.replace(/^type\s+/,"").trim();if(!r)return null;let e=r.match(/^(\w+)\s+as\s+(\w+)$/);if(e)return e[2]??null;let s=r.match(/^(\w+)$/);return s?s[1]??null:null}function q(t,r){let e=0;for(let s=0;s<r&&s<t.length;s++)t.charCodeAt(s)===10&&e++;return e}function st(t,r,e){let s=[];for(let n of e.rootNode.descendantsOfType("export_statement")){let o=nt(t,r,n);if(o===void 0)continue;let i=n.startPosition.row,a=n.endPosition.row,p=ot(n,o,i,a);s.push(p)}return s}function nt(t,r,e){let s=y(e,"string");if(!s)return;let n=y(s,"string_fragment");if(n)return E(t,r,n.text)}function ot(t,r,e,s){let n=y(t,"export_clause");if(n){let i=[];for(let a of n.namedChildren){if(a.type!=="export_specifier")continue;let p=a.namedChild(0),m=a.namedChild(1);p&&i.push((m??p).text)}return{kind:"named",sourcePath:r,names:i,startLine:e,endLine:s}}return y(t,"namespace_export")?{kind:"star-as",sourcePath:r,names:[],startLine:e,endLine:s}:{kind:"star",sourcePath:r,names:[],startLine:e,endLine:s}}function xe(t,r,e){return X(t,r,{java:s=>it(t,r,s),kotlin:s=>at(t,r,s),scala:s=>pt(t,r,s)},()=>N(e,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(s,n)=>{let o=s[1]?.trim();return o?ct(t,r,o,n):[]}))}function it(t,r,e){let s=g(e,new Set(["import_declaration"])),n=[];for(let o of e.rootNode.descendantsOfType("import_declaration")){let i=o.children.some(l=>l.type==="asterisk"),p=o.namedChildren.find(l=>l.type==="scoped_identifier")??o.namedChildren.find(l=>l.type==="identifier");if(!p)continue;let m=p.text;if(i){n.push(O("*",S(t,m,b)));continue}let c=m.split(".").pop()??m;n.push(f(c,c,S(t,m,b),s))}return n}function at(t,r,e){let s=g(e,new Set(["import_header","import_list"])),n=[];for(let o of e.rootNode.descendantsOfType("import_header")){let i=o.namedChildren.find(d=>d.type==="identifier");if(!i)continue;let a=o.namedChildren.some(d=>d.type==="wildcard_import"),p=o.namedChildren.find(d=>d.type==="import_alias");if(a){n.push(O("*",S(t,i.text,b)));continue}let m=i.text,c=m.split(".").pop()??m,u=p?.namedChild(0)?.text??c;n.push(f(c,u,S(t,m,b),s))}return n}function pt(t,r,e){let s=g(e,new Set(["import_declaration"])),n=[];for(let o of e.rootNode.descendantsOfType("import_declaration")){let i=o.namedChildren.find(l=>l.type==="namespace_selectors"||l.type==="namespace_wildcard"),a=o.namedChildren.filter(l=>l!==i&&(l.type==="identifier"||l.type==="stable_identifier")),p=a.map(l=>l.text).join(".");if(!p)continue;if(i?.type==="namespace_wildcard"){n.push(O("*",S(t,p,b)));continue}if(i?.type==="namespace_selectors"){for(let l of i.namedChildren)if(l.type==="arrow_renamed_identifier"){let[u,d]=l.namedChildren;if(!u)continue;let _=u.text,A=d?.text??_;if(_==="_")continue;n.push(f(_,A,S(t,`${p}.${_}`,b),s))}else if(l.type==="identifier"){let u=l.text;n.push(f(u,u,S(t,`${p}.${u}`,b),s))}continue}let m=a[a.length-1]?.text??p,c=a.slice(0,-1).map(l=>l.text).join(".")||p;n.push(f(m,m,S(t,c&&a.length>1?`${c}.${m}`:p,b),s))}return n}function ct(t,r,e,s){if(e.includes("{")&&e.includes("}")){let n=e.slice(0,e.indexOf("{")).replace(/\.$/,"").trim(),o=e.slice(e.indexOf("{")+1,e.lastIndexOf("}")).trim();return x(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[p,m]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),c=p?.trim();if(!c||c==="_")return[];let l=(m??c.split(".").pop()??c).trim(),u=c==="_"?n:`${n}.${c}`.replace(/\.\./g,".");return[P(t,r,s,u,c,l)]})}return[P(t,r,s,e,e.split(".").pop()??e,e.split(".").pop()??e)]}function Ne(t,r,e){return I(t,r,s=>mt(t,r,s),()=>N(e,/^[ \t]*use\s+(.+?)\s*;$/gm,(s,n)=>{let o=s[1]?.trim();return o?x(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[p,m]=a.split(/\s+as\s+/i),c=p?.trim()??a,l=c.split("\\").pop()??c,u=(m??l).trim();return[P(t,r,n,c,l,u,S(t,c.replace(/\\/g,"."),U))]}):[]}))}function mt(t,r,e){let s=g(e,new Set(["namespace_use_declaration"])),n=[],o=(i,a,p)=>{n.push(f(a,p,S(t,i.replace(/\\/g,"."),U),s))};for(let i of e.rootNode.descendantsOfType("namespace_use_declaration")){let a=i.namedChildren.find(p=>p.type==="namespace_use_group");if(a){let p=i.namedChildren.find(m=>m.type==="namespace_name")?.text??"";for(let m of a.namedChildren){if(m.type!=="namespace_use_clause")continue;let{importedName:c,localName:l,qualified:u}=ye(m,p);c&&o(u,c,l)}continue}for(let p of i.namedChildren){if(p.type!=="namespace_use_clause")continue;let{importedName:m,localName:c,qualified:l}=ye(p,"");m&&o(l,m,c)}}return n}function ye(t,r){let e=t.namedChildren.find(m=>m.type==="qualified_name"),s=t.namedChildren.filter(m=>m.type==="name"),n="";e?n=e.text:s.length>=1&&(n=s[0].text);let o=e&&s.length>0?s[s.length-1]:null,i=n.split("\\").pop()??n,a=o?.text??i,p=r?`${r}\\${n}`:n;return{importedName:i,localName:a,qualified:p}}function be(t,r,e){return I(t,r,s=>lt(t,r,s),()=>dt(e).flatMap(s=>gt(t,r,s,e)))}function lt(t,r,e){let s=g(e,new Set(["import_statement","import_from_statement"])),n=[];for(let o of e.rootNode.descendantsOfType("import_statement"))for(let i of o.namedChildren){let a=Ie(i);if(!a)continue;let p=W(t,r,a.qualifiedName);n.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:p,kind:"namespace",used:s.has(a.localName),usedMembers:[]})}for(let o of e.rootNode.descendantsOfType("import_from_statement")){let i=o.namedChild(0);if(!i)continue;let a=ut(i);if(a===null)continue;let p=W(t,r,a);for(let m=1;m<o.namedChildCount;m+=1){let c=o.namedChild(m);if(c.type==="wildcard_import"){n.push({importedName:"*",localName:null,sourcePath:p,kind:"side-effect",used:!0,usedMembers:[]});continue}let l=Ie(c);l&&n.push({importedName:l.qualifiedName,localName:l.localName,sourcePath:p,kind:"named",used:s.has(l.localName),usedMembers:[]})}}return n}function Ie(t){if(t.type==="aliased_import"){let r=t.namedChild(0),e=t.namedChild(1);return!r||!e?null:{qualifiedName:r.text,localName:e.text}}if(t.type==="dotted_name"){let r=t.text;return{qualifiedName:r,localName:r.split(".")[0]??r}}return t.type==="identifier"?{qualifiedName:t.text,localName:t.text}:null}function ut(t){if(t.type==="dotted_name")return t.text;if(t.type==="relative_import"){let r=y(t,"import_prefix")?.text??"",e=y(t,"dotted_name")?.text??"";return`${r}${e}`}return null}function dt(t){let r=t.split(`
1
+ import{a as te,b as re,c as b,d as se,e as ne,f as oe,g as j,h as ie,i as U,j as ae,k as pe,l as E,m as W,n as T,o as V,p as z,q as S,r as Q,s as J,u as R,v as h,w as M,x as G}from"./chunk-WEJYUS5O.js";import{a as v,c as ce,d as me,e as C}from"./chunk-OH5HIAID.js";import{c as L}from"./chunk-VDZL45XI.js";import{basename as le}from"path";var Oe=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function x(t){let r=[],e=0,s=0;for(let n=0;n<t.length;n++){let o=t[n];(o==="{"||o==="["||o==="(")&&e++,(o==="}"||o==="]"||o===")")&&e--,o===","&&e===0&&(r.push(t.slice(s,n)),s=n+1)}return r.push(t.slice(s)),r}function y(t,r){for(let e of t.namedChildren)if(e.type===r)return e;return null}function g(t,r){let e=new Set,s=(n,o)=>{let i=o||r.has(n.type);!i&&Oe.has(n.type)&&e.add(n.text);for(let a of n.children)s(a,i)};return s(t.rootNode,!1),e}function P(t,r,e,s,n,o,i){return{importedName:n,localName:o,sourcePath:i??S(t,s,pe(r)),kind:"named",used:h(e,o),usedMembers:[]}}function f(t,r,e,s,n="named",o={}){return{importedName:t,localName:r,sourcePath:e,kind:n,used:s.has(r),usedMembers:[],isTypeOnly:o.isTypeOnly}}function $(t,r,e,s,n="named",o=[],i={}){return{importedName:t,localName:r,sourcePath:e,kind:n,used:s,usedMembers:o,isTypeOnly:i.isTypeOnly}}function D(t,r){return{importedName:t,localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]}}function O(t,r,e={}){return{importedName:t,localName:e.localName??null,sourcePath:r,kind:"namespace",used:e.used??!0,usedMembers:e.usedMembers??[],isTypeOnly:e.isTypeOnly}}function N(t,r,e){let s=[];for(let n of t.matchAll(r)){let o=n[0];if(!o||typeof n.index!="number")continue;let i=R(t,n.index,n.index+o.length);for(let a of e(n,i))s.push(a)}return s}function I(t,r,e,s){let n=C(t,r);if(n){let o=e(n);if(o)return o}return s()}function X(t,r,e,s){let n=C(t,r),o=ce(r),i=o?e[o]:void 0;return n&&i?i(n):s()}function ue(t,r,e){return I(t,r,s=>Ae(t,r,s),()=>ke(t,r,e))}function ke(t,r,e){return N(e,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(s,n)=>{let o=s[1]?.trim();if(!o)return[];let i=le(o).replace(/\.[^.]+$/,"");return[$(o,i,z(t,r,o),h(n,i))]})}function Ae(t,r,e){let s=g(e,new Set(["preproc_include"])),n=[];for(let o of e.rootNode.descendantsOfType("preproc_include")){let i=null;for(let p of o.namedChildren){if(p.type==="system_lib_string"){i=p.text.replace(/^<|>$/g,"");break}if(p.type==="string_literal"){i=p.namedChildren.find(c=>c.type==="string_content")?.text??p.text.replace(/^"|"$/g,"");break}}if(!i)continue;let a=le(i).replace(/\.[^.]+$/,"");n.push(f(i,a,z(t,r,i),s))}return n}function de(t,r,e){let s=[];for(let n of e.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let o=n[1]?.trim(),i=n[2]?.trim()??null,a=n[0];if(!o||!a||typeof n.index!="number")continue;let p=R(e,n.index,n.index+a.length);s.push({importedName:o,localName:i,sourcePath:Q(t,r,o),kind:i?"namespace":"side-effect",used:i?h(p,i):!0,usedMembers:i?M(p,i):[]})}return s}function fe(t,r,e){let s=[];for(let n of e.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let o=n[1]?.trim();o&&s.push({specifier:o,sourcePath:Q(t,r,o)})}return s}function ge(t,r,e){return X(t,r,{csharp:s=>Le(t,r,s),vb:s=>we(t,r,s)},()=>{let s=ae(r)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return N(e,s,(n,o)=>{let i=n[1]?.trim();if(!i)return[];let[a,p]=i.split(/\s*=\s*/),m=!!p,c=(m?p:a)?.trim()??i,l=c.split(".").pop()??c,u=m?a?.trim()??l:l;return[P(t,r,o,c,l,u,S(t,c,j))]})})}function we(t,r,e){let s=g(e,new Set(["imports_statement"])),n=[];for(let o of e.rootNode.descendantsOfType("imports_statement")){let i=o.namedChildren.filter(u=>u.type==="namespace_name");if(i.length===0)continue;let a=i[i.length-1],p=i.length>1?i[0]:null,m=a.text,c=m.split(".").pop()??m,l=p?.text??c;n.push(f(c,l,S(t,m,j),s,p?"namespace":"named"))}return n}function Le(t,r,e){let s=g(e,new Set(["using_directive"])),n=[];for(let o of e.rootNode.descendantsOfType("using_directive")){let i=o.namedChildren;if(i.length===0)continue;let a=null,p;i.length>=2&&i[0].type==="identifier"&&(i[1].type==="qualified_name"||i[1].type==="identifier")?(a=i[0],p=i[1]):p=i[i.length-1];let m=p.text,c=m.split(".").pop()??m,l=a?.text??c;n.push(f(c,l,S(t,m,j),s,a?"namespace":"named"))}return n}var je=L("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function Se(t,r){return je.get(t,r,()=>{let e=new Set,s=v(t,r);if(!s)return e;let o=s.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,i=>i.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,i=>i.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,i=>i.replace(/[^\r\n]/g," "));for(let i of o.matchAll(/[A-Za-z_$][\w$]*/g))e.add(i[0]);return e})}function Y(t,r,e){return I(t,r,s=>Me(t,r,s),()=>ve(t,r,e))}function ve(t,r,e){return ze(e).flatMap(s=>Qe(t,r,s.clause,s.specifier,s.start,s.end,e))}function Me(t,r,e){let s=$e(t,r,e),n=[];for(let o of e.rootNode.descendantsOfType("import_statement"))n.push(...qe(t,r,e,o,s));return n}function $e(t,r,e){let s=g(e,new Set(["import_statement"]));if(me(r))for(let n of Se(t,r))s.add(n);return s}function qe(t,r,e,s,n){let o=Xe(s);if(!o)return[];let i=E(t,r,o),a=y(s,"import_clause");return a?Ue(e,a,i,n,Be(s.text)):[D("*",i)]}function Ue(t,r,e,s,n){let o=[];for(let i of r.namedChildren)if(i.type==="identifier")o.push(We(i.text,e,s,n));else if(i.type==="namespace_import"){let a=Fe(t,i,e,s,n);a&&o.push(a)}else i.type==="named_imports"&&o.push(...Je(i,e,s,n));return o}function We(t,r,e,s){return f("default",t,r,e,"default",{isTypeOnly:s})}function Fe(t,r,e,s,n){let i=y(r,"identifier")?.text??"";if(!i)return null;let a=Ve(t,i);return O("*",e,{localName:i,usedMembers:a,isTypeOnly:n,used:a.length>0||s.has(i)})}function Je(t,r,e,s){let n=[];for(let o of t.namedChildren){if(o.type!=="import_specifier")continue;let i=o.namedChild(0),a=o.namedChild(1);if(!i)continue;let p=i.text,m=a?.text??p;n.push(f(p,m,r,e,"named",{isTypeOnly:s||He(o.text)}))}return n}function Xe(t){let r=y(t,"string");if(!r)return null;let e=y(r,"string_fragment");return e?e.text:null}function Be(t){return/^\s*import\s+type\b/.test(t)}function He(t){return/^\s*type\b/.test(t.trim())}function Ve(t,r){let e=new Set;for(let s of t.rootNode.descendantsOfType("member_expression")){let n=s.namedChild(0),o=s.namedChild(1);!n||!o||n.type!=="identifier"||n.text!==r||(o.type==="property_identifier"||o.type==="identifier")&&e.add(o.text)}return[...e]}function ze(t){let r=[],e=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let n of t.matchAll(e)){let o=n[0],i=n[1],a=n[2];!o||!a||typeof n.index!="number"||r.push({clause:i,specifier:a,start:n.index,end:n.index+o.length})}let s=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let n of t.matchAll(s)){let o=n[0],i=n[1];!o||!i||typeof n.index!="number"||r.push({clause:null,specifier:i,start:n.index,end:n.index+o.length})}return r.sort((n,o)=>n.start-o.start)}function Qe(t,r,e,s,n,o,i){let a=E(t,r,s),p=R(i,n,o);return e?Ge(e).map(c=>({...c,sourcePath:a})).map(c=>{if(c.kind==="namespace"){let l=M(p,c.localName);return O(c.importedName,c.sourcePath,{localName:c.localName,usedMembers:l,used:l.length>0||h(p,c.localName),isTypeOnly:c.isTypeOnly})}return c.kind==="side-effect"?D(c.importedName,c.sourcePath):$(c.importedName,c.localName??"",c.sourcePath,c.localName?h(p,c.localName):!1,c.kind,[],{isTypeOnly:c.isTypeOnly})}):[D("*",a)]}function Ge(t){let r=t.trim(),e=/^type\b/.test(r),s=r.replace(/^type\s+/,""),[n,o]=Ye(s),i=[];return n&&i.push(...he(n,e)),o&&i.push(...he(o,e)),i}function he(t,r){let e=t.trim();if(!e)return[];if(e.startsWith("{")){let s=e.slice(1,-1).trim();return s?x(s).map(n=>{let o=n.trim(),i=r||/^type\b/.test(o),a=o.replace(/^type\s+/,""),[p,m]=a.split(/\s+as\s+/);return{importedName:p.trim(),localName:(m??p).trim(),kind:"named",isTypeOnly:i}}):[]}return e.startsWith("* as ")?[{importedName:"*",localName:e.slice(5).trim(),kind:"namespace",isTypeOnly:r}]:[{importedName:"default",localName:e,kind:"default",isTypeOnly:r}]}function Ye(t){let r=0;for(let e=0;e<t.length;e++){let s=t[e];if(s==="{"&&r++,s==="}"&&r--,s===","&&r===0)return[t.slice(0,e).trim(),t.slice(e+1).trim()]}return[t.trim(),null]}function K(t,r,e){let s=C(t,r);return s?st(t,r,s):Ke(t,r,e)}function Ke(t,r,e){return[...Ze(t,r,e),...et(t,r,e),...tt(t,r,e)]}function Ze(t,r,e){let s=[],n=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[1]??"",a=o[2]??"",p=x(i).map(l=>rt(l.trim())).filter(l=>!!l),m=q(e,o.index),c=q(e,o.index+o[0].length-1);s.push({kind:"named",sourcePath:E(t,r,a),names:p,startLine:m,endLine:c})}return s}function et(t,r,e){let s=[],n=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[2]??"",a=q(e,o.index),p=q(e,o.index+o[0].length-1);s.push({kind:"star-as",sourcePath:E(t,r,i),names:[],startLine:a,endLine:p})}return s}function tt(t,r,e){let s=[],n=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of e.matchAll(n)){if(typeof o.index!="number")continue;let i=o[1]??"",a=q(e,o.index),p=q(e,o.index+o[0].length-1);s.push({kind:"star",sourcePath:E(t,r,i),names:[],startLine:a,endLine:p})}return s}function rt(t){if(!t)return null;let r=t.replace(/^type\s+/,"").trim();if(!r)return null;let e=r.match(/^(\w+)\s+as\s+(\w+)$/);if(e)return e[2]??null;let s=r.match(/^(\w+)$/);return s?s[1]??null:null}function q(t,r){let e=0;for(let s=0;s<r&&s<t.length;s++)t.charCodeAt(s)===10&&e++;return e}function st(t,r,e){let s=[];for(let n of e.rootNode.descendantsOfType("export_statement")){let o=nt(t,r,n);if(o===void 0)continue;let i=n.startPosition.row,a=n.endPosition.row,p=ot(n,o,i,a);s.push(p)}return s}function nt(t,r,e){let s=y(e,"string");if(!s)return;let n=y(s,"string_fragment");if(n)return E(t,r,n.text)}function ot(t,r,e,s){let n=y(t,"export_clause");if(n){let i=[];for(let a of n.namedChildren){if(a.type!=="export_specifier")continue;let p=a.namedChild(0),m=a.namedChild(1);p&&i.push((m??p).text)}return{kind:"named",sourcePath:r,names:i,startLine:e,endLine:s}}return y(t,"namespace_export")?{kind:"star-as",sourcePath:r,names:[],startLine:e,endLine:s}:{kind:"star",sourcePath:r,names:[],startLine:e,endLine:s}}function xe(t,r,e){return X(t,r,{java:s=>it(t,r,s),kotlin:s=>at(t,r,s),scala:s=>pt(t,r,s)},()=>N(e,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(s,n)=>{let o=s[1]?.trim();return o?ct(t,r,o,n):[]}))}function it(t,r,e){let s=g(e,new Set(["import_declaration"])),n=[];for(let o of e.rootNode.descendantsOfType("import_declaration")){let i=o.children.some(l=>l.type==="asterisk"),p=o.namedChildren.find(l=>l.type==="scoped_identifier")??o.namedChildren.find(l=>l.type==="identifier");if(!p)continue;let m=p.text;if(i){n.push(O("*",S(t,m,b)));continue}let c=m.split(".").pop()??m;n.push(f(c,c,S(t,m,b),s))}return n}function at(t,r,e){let s=g(e,new Set(["import_header","import_list"])),n=[];for(let o of e.rootNode.descendantsOfType("import_header")){let i=o.namedChildren.find(d=>d.type==="identifier");if(!i)continue;let a=o.namedChildren.some(d=>d.type==="wildcard_import"),p=o.namedChildren.find(d=>d.type==="import_alias");if(a){n.push(O("*",S(t,i.text,b)));continue}let m=i.text,c=m.split(".").pop()??m,u=p?.namedChild(0)?.text??c;n.push(f(c,u,S(t,m,b),s))}return n}function pt(t,r,e){let s=g(e,new Set(["import_declaration"])),n=[];for(let o of e.rootNode.descendantsOfType("import_declaration")){let i=o.namedChildren.find(l=>l.type==="namespace_selectors"||l.type==="namespace_wildcard"),a=o.namedChildren.filter(l=>l!==i&&(l.type==="identifier"||l.type==="stable_identifier")),p=a.map(l=>l.text).join(".");if(!p)continue;if(i?.type==="namespace_wildcard"){n.push(O("*",S(t,p,b)));continue}if(i?.type==="namespace_selectors"){for(let l of i.namedChildren)if(l.type==="arrow_renamed_identifier"){let[u,d]=l.namedChildren;if(!u)continue;let _=u.text,A=d?.text??_;if(_==="_")continue;n.push(f(_,A,S(t,`${p}.${_}`,b),s))}else if(l.type==="identifier"){let u=l.text;n.push(f(u,u,S(t,`${p}.${u}`,b),s))}continue}let m=a[a.length-1]?.text??p,c=a.slice(0,-1).map(l=>l.text).join(".")||p;n.push(f(m,m,S(t,c&&a.length>1?`${c}.${m}`:p,b),s))}return n}function ct(t,r,e,s){if(e.includes("{")&&e.includes("}")){let n=e.slice(0,e.indexOf("{")).replace(/\.$/,"").trim(),o=e.slice(e.indexOf("{")+1,e.lastIndexOf("}")).trim();return x(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[p,m]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),c=p?.trim();if(!c||c==="_")return[];let l=(m??c.split(".").pop()??c).trim(),u=c==="_"?n:`${n}.${c}`.replace(/\.\./g,".");return[P(t,r,s,u,c,l)]})}return[P(t,r,s,e,e.split(".").pop()??e,e.split(".").pop()??e)]}function Ne(t,r,e){return I(t,r,s=>mt(t,r,s),()=>N(e,/^[ \t]*use\s+(.+?)\s*;$/gm,(s,n)=>{let o=s[1]?.trim();return o?x(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[p,m]=a.split(/\s+as\s+/i),c=p?.trim()??a,l=c.split("\\").pop()??c,u=(m??l).trim();return[P(t,r,n,c,l,u,S(t,c.replace(/\\/g,"."),U))]}):[]}))}function mt(t,r,e){let s=g(e,new Set(["namespace_use_declaration"])),n=[],o=(i,a,p)=>{n.push(f(a,p,S(t,i.replace(/\\/g,"."),U),s))};for(let i of e.rootNode.descendantsOfType("namespace_use_declaration")){let a=i.namedChildren.find(p=>p.type==="namespace_use_group");if(a){let p=i.namedChildren.find(m=>m.type==="namespace_name")?.text??"";for(let m of a.namedChildren){if(m.type!=="namespace_use_clause")continue;let{importedName:c,localName:l,qualified:u}=ye(m,p);c&&o(u,c,l)}continue}for(let p of i.namedChildren){if(p.type!=="namespace_use_clause")continue;let{importedName:m,localName:c,qualified:l}=ye(p,"");m&&o(l,m,c)}}return n}function ye(t,r){let e=t.namedChildren.find(m=>m.type==="qualified_name"),s=t.namedChildren.filter(m=>m.type==="name"),n="";e?n=e.text:s.length>=1&&(n=s[0].text);let o=e&&s.length>0?s[s.length-1]:null,i=n.split("\\").pop()??n,a=o?.text??i,p=r?`${r}\\${n}`:n;return{importedName:i,localName:a,qualified:p}}function be(t,r,e){return I(t,r,s=>lt(t,r,s),()=>dt(e).flatMap(s=>gt(t,r,s,e)))}function lt(t,r,e){let s=g(e,new Set(["import_statement","import_from_statement"])),n=[];for(let o of e.rootNode.descendantsOfType("import_statement"))for(let i of o.namedChildren){let a=Ie(i);if(!a)continue;let p=W(t,r,a.qualifiedName);n.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:p,kind:"namespace",used:s.has(a.localName),usedMembers:[]})}for(let o of e.rootNode.descendantsOfType("import_from_statement")){let i=o.namedChild(0);if(!i)continue;let a=ut(i);if(a===null)continue;let p=W(t,r,a);for(let m=1;m<o.namedChildCount;m+=1){let c=o.namedChild(m);if(c.type==="wildcard_import"){n.push({importedName:"*",localName:null,sourcePath:p,kind:"side-effect",used:!0,usedMembers:[]});continue}let l=Ie(c);l&&n.push({importedName:l.qualifiedName,localName:l.localName,sourcePath:p,kind:"named",used:s.has(l.localName),usedMembers:[]})}}return n}function Ie(t){if(t.type==="aliased_import"){let r=t.namedChild(0),e=t.namedChild(1);return!r||!e?null:{qualifiedName:r.text,localName:e.text}}if(t.type==="dotted_name"){let r=t.text;return{qualifiedName:r,localName:r.split(".")[0]??r}}return t.type==="identifier"?{qualifiedName:t.text,localName:t.text}:null}function ut(t){if(t.type==="dotted_name")return t.text;if(t.type==="relative_import"){let r=y(t,"import_prefix")?.text??"",e=y(t,"dotted_name")?.text??"";return`${r}${e}`}return null}function dt(t){let r=t.split(`
2
2
  `),e=[],s=0;for(let n=0;n<r.length;n++){let o=r[n],i=o.trimStart(),a=s;if(s+=o.length+1,!i.startsWith("import ")&&!i.startsWith("from "))continue;let p=o,m=a+o.length,c=G(o);for(;n+1<r.length&&(c>0||p.trimEnd().endsWith("\\"));){n++;let u=r[n];p+=`
3
3
  ${u}`,m+=1+u.length,c+=G(u),s+=u.length+1}let l=ft(p);l&&e.push({...l,start:a,end:m})}return e}function ft(t){let r=t.replace(/\\\s*\n/g," ").trim();if(r.startsWith("import "))return{kind:"import",module:null,clause:r.slice(7).trim()};let e=r.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!e)return null;let s=e[2].trim();return s.startsWith("(")&&s.endsWith(")")&&(s=s.slice(1,-1).trim()),{kind:"from",module:e[1],clause:s}}function gt(t,r,e,s){let n=R(s,e.start,e.end),o=e.clause.replace(/\n/g," ").trim();if(e.kind==="import")return x(o).flatMap(p=>{let m=p.trim().replace(/,$/,"");if(!m)return[];let[c,l]=m.split(/\s+as\s+/),u=c.trim(),d=(l??u.split(".")[0]??u).trim(),_=W(t,r,u),A=M(n,d);return[{importedName:u,localName:d,sourcePath:_,kind:"namespace",used:h(n,d)||A.length>0,usedMembers:A}]});let i=e.module?W(t,r,e.module):null,a=[];for(let p of x(o)){let m=p.trim().replace(/,$/,"");if(!m)continue;if(m==="*"){a.push({importedName:"*",localName:null,sourcePath:i,kind:"side-effect",used:!0,usedMembers:[]});continue}let[c,l]=m.split(/\s+as\s+/),u=(l??c).trim();a.push({importedName:c.trim(),localName:u,sourcePath:i,kind:"named",used:h(n,u),usedMembers:[]})}return a}import{basename as St}from"path";function Pe(t,r,e){return I(t,r,s=>xt(t,r,s),()=>ht(t,r,e))}function ht(t,r,e){return N(e,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(s,n)=>{let o=s[1],i=s[2];if(!o||!i)return[];let a=o==="require_relative"?V(t,r,i):null;if(a){let p=_e(i);return[$(p,p,a,h(n,p))]}return[D(i,a)]})}function xt(t,r,e){let s=g(e,new Set([])),n=[],o=new Set(["require","require_relative","load"]);for(let i of e.rootNode.descendantsOfType("call")){let a=i.namedChild(0);if(!a||a.type!=="identifier"||!o.has(a.text))continue;let m=i.namedChildren.find(d=>d.type==="argument_list")?.namedChild(0);if(!m||m.type!=="string")continue;let l=m.namedChildren.find(d=>d.type==="string_content")?.text;if(!l)continue;let u=a.text==="require_relative"?V(t,r,l):null;if(u){let d=_e(l);n.push(f(d,d,u,s))}else n.push(D(l,u))}return n}function _e(t){return St(t).replace(/\.[^.]+$/,"").split("_").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}function Ee(t,r,e){return I(t,r,s=>yt(t,r,s),()=>N(e,/^[ \t]*use\s+(.+?)\s*;$/gm,(s,n)=>{let o=s[1]?.trim();return o?Nt(t,r,o,n):[]}))}function yt(t,r,e){let s=g(e,new Set(["use_declaration"])),n=[];for(let o of e.rootNode.descendantsOfType("use_declaration")){let i=o.namedChild(0);if(i)for(let a of F(i,"")){if(!a.importedName||a.importedName==="*")continue;let p=T(t,r,a.qualifiedName)??T(t,r,a.qualifiedName.split("::").slice(0,-1).join("::"));n.push(f(a.importedName,a.localName,p,s))}}return n}function F(t,r){switch(t.type){case"identifier":case"super":case"self":case"crate":{let e=t.text;return[{qualifiedName:B(r,e),importedName:e,localName:e}]}case"scoped_identifier":{let e=t.text,s=e.split("::").pop()??e;return[{qualifiedName:B(r,e),importedName:s,localName:s}]}case"scoped_use_list":{let e=t.namedChild(0),s=t.namedChild(1);if(!e||!s)return[];let n=B(r,e.text),o=[];for(let i of s.namedChildren)o.push(...F(i,n));return o}case"use_list":{let e=[];for(let s of t.namedChildren)e.push(...F(s,r));return e}case"use_as_clause":{let e=t.namedChild(0),s=t.namedChild(1);if(!e||!s)return[];let n=F(e,r),o=s.text;return n.map(i=>({...i,localName:o}))}case"use_wildcard":{let e=t.namedChild(0),s=e?e.text:"";return[{qualifiedName:B(r,`${s}::*`),importedName:"*",localName:"*"}]}default:return[]}}function B(t,r){return t?r?`${t}::${r}`:t:r}function Nt(t,r,e,s){let n=e.trim();if(n.includes("{")&&n.includes("}")){let c=n.slice(0,n.indexOf("{")).replace(/::$/,"").trim(),l=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return x(l).flatMap(u=>{let d=u.trim();if(!d||d==="self")return[];let[_,A]=d.split(/\s+as\s+/),w=_?.trim();if(!w)return[];let Ce=(A??w.split("::").pop()??w).trim(),De=`${c}::${w}`.replace(/::::/g,"::");return[P(t,r,s,De,w.split("::").pop()??w,Ce,T(t,r,c))]})}let[o,i]=n.split(/\s+as\s+/),a=o?.trim()??n,p=(i??a.split("::").pop()??a).trim(),m=T(t,r,a)??T(t,r,a.split("::").slice(0,-1).join("::"));return[P(t,r,s,a,a.split("::").pop()??a,p,m)]}function Te(t,r,e){let s=C(t,r);if(s)return It(t,r,s);let n=[];for(let o of e.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let i=o[1]?.trim();i&&n.push(...Pt(t,r,i))}return n}function It(t,r,e){let s=[];for(let n of e.rootNode.descendantsOfType("use_declaration")){if(!bt(n))continue;let o=n.namedChildren.find(i=>i.type!=="visibility_modifier");if(o)for(let i of F(o,""))i.importedName&&s.push(Z(t,r,i.qualifiedName))}return s}function bt(t){for(let r of t.children)if(r.type==="visibility_modifier"&&r.text.startsWith("pub"))return!0;return!1}function Pt(t,r,e){let s=e.trim();if(s.includes("{")&&s.includes("}")){let n=s.slice(0,s.indexOf("{")).replace(/::$/,"").trim(),o=s.slice(s.indexOf("{")+1,s.lastIndexOf("}")).trim();return x(o).flatMap(i=>{let a=i.trim();if(!a||a==="self")return[];let[p]=a.split(/\s+as\s+/),m=`${n}::${p?.trim()??a}`.replace(/::::/g,"::");return[Z(t,r,m)]})}return[Z(t,r,s)]}function Z(t,r,e){return{specifier:e,sourcePath:T(t,r,e)??T(t,r,e.split("::").slice(0,-1).join("::"))}}function k({language:t,extensions:r,imports:e,parseImports:s}){return{language:t,extensions:r,capabilities:{imports:e},parseImports:s}}function Re(t,r){let e=r.toLowerCase();for(let s of t)for(let n of s.extensions)if(e.endsWith(n))return s;return null}var _t={language:"javascript",extensions:te,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:Y,parseReExports:K},Et=k({language:"python",extensions:re,imports:"ast-with-regex-fallback",parseImports:be}),Tt=k({language:"jvm",extensions:b,imports:"ast-dispatch-with-regex-fallback",parseImports:xe}),Rt={language:"rust",extensions:se,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:Ee,parseExports:Te},Ct=k({language:"ruby",extensions:ne,imports:"ast-with-regex-fallback",parseImports:Pe}),Dt=k({language:"c/cpp",extensions:oe,imports:"ast-with-regex-fallback",parseImports:ue}),Ot=k({language:"dotnet",extensions:j,imports:"ast-dispatch-with-regex-fallback",parseImports:ge}),kt={language:"dart",extensions:ie,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:de,parseExports:fe},At=k({language:"php",extensions:U,imports:"ast-with-regex-fallback",parseImports:Ne}),wt=[_t,Et,Tt,Rt,Ct,Dt,Ot,kt,At];function H(t){return Re(wt,t)}var ee={clearGroups:["whole-project","source-file"]},Lt=L("source-imports",ee),jt=L("source-exports",ee),vt=L("source-reexports",ee);function Yr(t,r){let e=J(r);return vt.get(t,e,()=>{let s=H(e);if(!s?.parseReExports)return[];let n=v(t,e);return n?s.parseReExports(t,e,n):[]})}function Kr(t,r){let e=J(r);return Lt.get(t,e,()=>{let s=H(e);if(!s)return[];let n=v(t,e);return n?s.parseImports(t,e,n):[]})}function Zr(t,r){let e=J(r);return jt.get(t,e,()=>{let s=H(e);if(!s?.parseExports)return[];let n=v(t,e);return n?s.parseExports(t,e,n):[]})}export{Yr as a,Kr as b,Zr as c};
4
- //# sourceMappingURL=chunk-APLCSDXL.js.map
4
+ //# sourceMappingURL=chunk-FVVT7GV6.js.map
@@ -0,0 +1,2 @@
1
+ import{a as j,d as v}from"./chunk-R3G6ERW7.js";import{b as k,c as A,d as w}from"./chunk-ISCKLDSS.js";import{existsSync as F,readFileSync as U}from"fs";import{join as C}from"path";var S=/\.(?:md|mdx|rst|txt)$/i;function _(e){return/(?:^|\/)(?:docs\/plans|plans|adrs?|rfcs?|decisions|changelogs?|archive|reports?)\//i.test(e)||/(?:^|\/)CHANGELOG\.(?:md|mdx|rst|txt)$/i.test(e)}var H=3,L=/[A-Za-z0-9_@-]+(?:\/[A-Za-z0-9_.@-]+)+\.[A-Za-z0-9]{1,6}\b/g;function B(e,t={}){let{doc:s,limit:f=20,minCoupling:a=H}=t,n=j(e);if(!n)return{available:!1,commitsAnalyzed:0,docsScanned:0,findings:[]};let c=v(e)??new Set,d=new Map,g=new Map,p=new Set;for(let o of n.commits){let h=[...new Set(o.files)],m=h.filter(r=>S.test(r)),y=h.filter(r=>!S.test(r));for(let r of h){p.add(r);let l=d.get(r)??[];l.push(o.timestamp),d.set(r,l)}for(let r of m){let l=g.get(r);l||(l=new Map,g.set(r,l));for(let i of y)l.set(i,(l.get(i)??0)+1)}}let R=[...c].filter(o=>S.test(o)),z=M(c),D=[];for(let o of R){if(s!==void 0&&!o.includes(s)||s===void 0&&!E(e,o)||s!==void 0&&!F(C(e.config.projectRoot,o)))continue;let h=Math.max(0,...d.get(o)??[]),m=new Map,{resolved:y,broken:r}=N(e,o,c,z,p);for(let i of y){if(i===o||S.test(i))continue;let u=(d.get(i)??[]).filter(b=>b>h).length;u!==0&&m.set(i,{file:i,evidence:"reference",coChanges:0,changesSinceDocUpdate:u})}for(let[i,u]of g.get(o)??[]){if(u<a||!c.has(i))continue;let b=(d.get(i)??[]).filter(T=>T>h).length;if(b===0)continue;let x=m.get(i);x?(x.evidence="both",x.coChanges=u):m.set(i,{file:i,evidence:"co-change",coChanges:u,changesSinceDocUpdate:b})}if(m.size===0&&r.length===0)continue;let l=[...m.values()].sort((i,u)=>u.changesSinceDocUpdate-i.changesSinceDocUpdate);D.push({doc:o,docLastChangedAt:h,staleness:l.reduce((i,u)=>i+u.changesSinceDocUpdate,0)+r.length*10,subjects:l.slice(0,8),brokenReferences:r})}return D.sort((o,h)=>h.staleness-o.staleness),{available:!0,commitsAnalyzed:n.commits.length,docsScanned:R.length,findings:D.slice(0,f)}}function J(e,t){let s=v(e)??new Set,f=M(s),a=[];for(let n of s){if(!E(e,n))continue;let{resolved:c}=N(e,n,s,f,new Set),d=[...c].filter(g=>t.has(g));d.length>0&&a.push({doc:n,cited:d.sort()})}return a}function E(e,t){return S.test(t)&&!_(t)&&F(C(e.config.projectRoot,t))}function M(e){let t=new Map;for(let s of e){let f=s.split("/");for(let a of[2,3]){if(f.length<a)continue;let n=f.slice(-a).join("/"),c=t.get(n)??[];c.push(s),t.set(n,c)}}return t}function N(e,t,s,f,a){let n=new Set,c=new Set,d=I(e,t);if(!d)return{resolved:n,broken:[]};for(let g of d){if(s.has(g)){n.add(g);continue}let p=f.get(g);if(p&&p.length===1){n.add(p[0]);continue}p&&p.length>1||a.has(g)&&c.add(g)}return{resolved:n,broken:[...c]}}function I(e,t){let s;try{s=U(C(e.config.projectRoot,t),"utf-8")}catch{return null}let f=k(e,t,s),a=A(e,"doc-path-tokens",t,f);if(a!==null)try{return JSON.parse(a)}catch{}let n=[...new Set([...s.matchAll(L)].map(c=>c[0].replace(/^\.?\//,"")))];return w(e,"doc-path-tokens",t,f,JSON.stringify(n)),n}export{_ as a,B as b,J as c};
2
+ //# sourceMappingURL=chunk-HXXRN77A.js.map
@@ -1,4 +1,4 @@
1
- import{o as f}from"./chunk-6ZFKI5EP.js";import{a as d}from"./chunk-7I6KNKE3.js";import{c as s,g as u,o as m,p as g}from"./chunk-SOGLYIJ4.js";import{a as c}from"./chunk-WQFOZIID.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{o as f}from"./chunk-VGBSY6N7.js";import{a as d}from"./chunk-4MHT7LKP.js";import{c as s,g as u,o as m,p as g}from"./chunk-O6KCZPJQ.js";import{a as c}from"./chunk-OH5HIAID.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-NK7TQQG4.js.map
4
+ //# sourceMappingURL=chunk-IC3RC3KJ.js.map
@@ -0,0 +1,22 @@
1
+ import{c as p}from"./chunk-VDZL45XI.js";import{createHash as u}from"crypto";import{createRequire as h}from"module";import{dirname as T,join as g}from"path";import v from"better-sqlite3";var m=h(import.meta.url),N="evidence.db",c=new WeakMap,f=p("evidence-content-hash",{clearGroups:["whole-project","source-file"]});function C(){for(let t of["../package.json","../../package.json"])try{return m(t).version}catch{}return"0.0.0"}var s=C();function _(t){return u("sha256").update(t).digest("hex")}function O(t,n,e){return f.get(t,n,()=>_(e))}function E(t,n){process.env.SCIP_QUERY_DEBUG&&console.error(`evidence-cache: ${t}: ${n instanceof Error?n.message:String(n)}`)}function l(t){if(c.has(t))return c.get(t)??null;let n=null;try{let e=new v(g(T(t.config.dbPath),N));e.pragma("journal_mode = WAL"),e.pragma("busy_timeout = 5000"),e.pragma("synchronous = NORMAL"),e.exec(`
2
+ CREATE TABLE IF NOT EXISTS file_evidence (
3
+ kind TEXT NOT NULL,
4
+ relative_path TEXT NOT NULL,
5
+ content_hash TEXT NOT NULL,
6
+ version TEXT NOT NULL,
7
+ payload TEXT NOT NULL,
8
+ PRIMARY KEY (kind, relative_path)
9
+ );
10
+ CREATE TABLE IF NOT EXISTS semantic_callees (
11
+ relative_path TEXT NOT NULL,
12
+ symbol TEXT NOT NULL,
13
+ content_hash TEXT NOT NULL,
14
+ deps_digest TEXT NOT NULL,
15
+ version TEXT NOT NULL,
16
+ payload TEXT NOT NULL,
17
+ PRIMARY KEY (relative_path, symbol)
18
+ );
19
+ `),n={evidence:e,readFileEvidence:e.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),writeFileEvidence:e.prepare("INSERT OR REPLACE INTO file_evidence (kind, relative_path, content_hash, version, payload) VALUES (?, ?, ?, ?, ?)"),readCallees:e.prepare(`SELECT payload FROM semantic_callees
20
+ WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),writeCallees:e.prepare(`INSERT OR REPLACE INTO semantic_callees
21
+ (relative_path, symbol, content_hash, deps_digest, version, payload) VALUES (?, ?, ?, ?, ?, ?)`),dropStaleCallees:e.prepare("DELETE FROM semantic_callees WHERE relative_path = ? AND content_hash != ?")}}catch(e){E("disabled (open failed)",e)}return c.set(t,n),n}function d(t,n,e){E(`disabled (${n})`,e),c.set(t,null)}function A(t,n,e,a){let i=l(t);if(!i)return null;try{return i.readFileEvidence.get(n,e,a,s)?.payload??null}catch(r){return d(t,"file_evidence read",r),null}}function R(t,n,e,a,i){let r=l(t);if(r)try{r.writeFileEvidence.run(n,e,a,s,i)}catch(o){d(t,"file_evidence write",o)}}function w(t,n,e,a,i){let r=l(t);if(!r)return null;try{return r.readCallees.get(n,e,a,i,s)?.payload??null}catch(o){return d(t,"semantic_callees read",o),null}}function F(t,n){if(n.length===0)return;let e=l(t);if(e)try{e.evidence.transaction(()=>{for(let a of n)e.dropStaleCallees.run(a.relativePath,a.contentHash),e.writeCallees.run(a.relativePath,a.symbol,a.contentHash,a.depsDigest,s,a.payload)})()}catch(a){d(t,"semantic_callees write",a)}}export{_ as a,O as b,A as c,R as d,w as e,F as f};
22
+ //# sourceMappingURL=chunk-ISCKLDSS.js.map
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-ZOT3WUZW.js";import{u as e}from"./chunk-O6KCZPJQ.js";function l(t,s){let o=r(t,s);return e(t,o).map(({relativePath:n,...a})=>a)}export{l as a};
2
+ //# sourceMappingURL=chunk-ITHQJZTG.js.map
@@ -1,4 +1,4 @@
1
- import{b as c}from"./chunk-APLCSDXL.js";import{a}from"./chunk-NN3O7TPH.js";import{c as d}from"./chunk-VDZL45XI.js";var g=d("file-dep-graph",{clearGroups:["whole-project"]});function p(e,i){return g.get(e,i??"",()=>{let s=new Map,n=new Set(a(e,{includeIgnored:!1})),r=(t,o)=>f(e,s,n,t,o);for(let t of m(e,i))r(t.from_file,t.to_file);for(let t of n)if(!(i&&!t.includes(i)))for(let o of c(e,t))o.sourcePath&&r(t,o.sourcePath);return s})}function m(e,i){let s=i?`AND d1.relative_path LIKE '%${i}%'`:"";return e.all(`SELECT DISTINCT
1
+ import{b as c}from"./chunk-FVVT7GV6.js";import{a}from"./chunk-NN3O7TPH.js";import{c as d}from"./chunk-VDZL45XI.js";var g=d("file-dep-graph",{clearGroups:["whole-project"]});function p(e,i){return g.get(e,i??"",()=>{let s=new Map,n=new Set(a(e,{includeIgnored:!1})),r=(t,o)=>f(e,s,n,t,o);for(let t of m(e,i))r(t.from_file,t.to_file);for(let t of n)if(!(i&&!t.includes(i)))for(let o of c(e,t))o.sourcePath&&r(t,o.sourcePath);return s})}function m(e,i){let s=i?`AND d1.relative_path LIKE '%${i}%'`:"";return e.all(`SELECT DISTINCT
2
2
  d1.relative_path AS from_file,
3
3
  d2.relative_path AS to_file
4
4
  FROM mentions m
@@ -17,4 +17,4 @@ import{b as c}from"./chunk-APLCSDXL.js";import{a}from"./chunk-NN3O7TPH.js";impor
17
17
  AND m.role != 1
18
18
  ${e.pathExclusionsFor("d1","d2")}
19
19
  ${s}`)}function f(e,i,s,n,r){if(n===r||e.isIgnored(n)||e.isIgnored(r)||!s.has(r))return;let t=i.get(n);t||(t=new Set,i.set(n,t)),t.add(r)}export{p as a};
20
- //# sourceMappingURL=chunk-RIXOMSOR.js.map
20
+ //# sourceMappingURL=chunk-IVAIPXNO.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,e as T,f as k}from"./chunk-TQTVM27C.js";import{a as C}from"./chunk-RIXOMSOR.js";import{b as V,c as j,d as G}from"./chunk-EAU4RDFG.js";import{c as B}from"./chunk-PCMVXWDC.js";import{a as K,k as I,l as O}from"./chunk-6ZFKI5EP.js";import{c as M}from"./chunk-PBGTMPJ7.js";import{f as P,g as N,i as A,j as w,r as E,t as q}from"./chunk-SOGLYIJ4.js";import{b as h,c as m,d as v,f as x,k as b}from"./chunk-WQFOZIID.js";import{a as L}from"./chunk-NN3O7TPH.js";function H(i,e,t){let a=e.identifierResolution==="strict"?I:O;for(let n of e.paths)if(!(!m(n)&&!(e.includeVueSfc&&v(n)))&&!i.isIgnored(n)&&!e.skipPath?.(n))try{let l=(r,c,p,d)=>{if(e.candidateNames&&!e.candidateNames.has(r))return;let y=e.resolveTargets?e.resolveTargets({sourceFile:n,name:r,kind:c,defaultTargets:d}):d();for(let S of y)t({sourceFile:n,name:r,target:S,occurrences:p,kind:c})},f=K(i,n);for(let[r,c]of f)l(r,"identifier",c.length,()=>a(i,n,r));for(let r of b(i,n,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let c=r.kind==="cross-language-dispatch"?()=>I(i,n,r.name):()=>a(i,n,r.name);l(r.name,r.kind,r.occurrences,c)}}finally{e.afterPath?.(n)}}var W=class{constructor(e){this.db=e}db;scopedDefinitions(e){return q(this.db,e)}definitionsForFile(e){return E(this.db,e)}productionCallableDefinitions(e={}){let{scope:t,minLoc:a=1,maxLoc:n=Number.POSITIVE_INFINITY,excludeSymbol:o,excludeEntrySurfaces:l=!1,excludeTypesFiles:f=!1,excludeRootedSymbols:r=!1,requireFunctionLikeSymbol:c=!1,requireCallableSymbol:p=!1,excludeRustTraitImplMembers:d=!1,includeSuppressed:y=!1,sortByLocDesc:S=!1}=e,g=[];for(let s of this.scopedDefinitions(t)){let u=s.relativePath;if(this.db.isIgnored(u)||l&&T(this.db,u)||!Y(s,{requireFunctionLikeSymbol:c,requireCallableSymbol:p})||o!==void 0&&s.symbol===o)continue;let F=D(s);F<a||F>n||f&&_(u)||r&&k(this.db,s.symbol,u)||d&&A(s.symbol)||R(u)!=="test"&&(w(s.symbol)||!y&&h(this.db,u,s.startLine)||g.push(s))}return S?g.sort((s,u)=>D(u)-D(s)):g}calleeMap(e,t={}){return B(this.db,e,t)}crossFileCallerMap(e,t={}){return V(this.db,e,t)}sourceFallbackCallerFiles(e){return j(this.db,e)}callerFileMap(e,t={}){return G(this.db,e,t)}frameworkReferencedSymbolIds(e){let t=new Map;for(let n of e){if(!n.leaf)continue;let o=t.get(n.leaf)??[];o.push(n.symbolId),t.set(n.leaf,o)}let a=new Set;for(let n of L(this.db,{includeIgnored:!1}))if(m(n)==="rust")for(let{name:o}of b(this.db,n,{includeRustAttributeNames:!0}))for(let l of t.get(o)??[])a.add(l);return a}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let a=new Map(e.map(o=>[o.symbolId,o.symbol])),n=this.calleeMap(e,t);return new Set([...n.entries()].filter(([o,l])=>{let f=a.get(o);return l.some(r=>r.symbol!==f)}).map(([o])=>o))}fileDependencyGraph(e){return C(this.db,e)}fileKind(e){return R(e)}hasSuppressionComment(e){return h(this.db,e.relativePath,e.startLine)}sourceFiles(){return M(this.db)}scanSourceReferences(e,t){H(this.db,e,t)}callableSignature(e){let t=x(this.db,e.relativePath)?.callables.find(a=>a.startLine===e.startLine&&a.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};function Y(i,e){return e.requireCallableSymbol?P(i.symbol):e.requireFunctionLikeSymbol?N(i.symbol):i.isFunctionLike}function D(i){return i.endLine-i.startLine+1}function _(i){return(i.split("/").pop()??"").includes("types")}export{W as a};
2
- //# sourceMappingURL=chunk-NO2TPMCQ.js.map
1
+ import{a as R,e as T,f as k}from"./chunk-QYKKTYBN.js";import{b as V,c as j,d as G}from"./chunk-VDZIEDJB.js";import{c as B}from"./chunk-5QJIEYFB.js";import{a as K,k as I,l as O}from"./chunk-VGBSY6N7.js";import{a as C}from"./chunk-IVAIPXNO.js";import{c as M}from"./chunk-PBGTMPJ7.js";import{f as P,g as N,i as A,j as w,r as E,t as q}from"./chunk-O6KCZPJQ.js";import{b as h,c as m,d as v,f as x,k as b}from"./chunk-OH5HIAID.js";import{a as L}from"./chunk-NN3O7TPH.js";function H(i,e,t){let a=e.identifierResolution==="strict"?I:O;for(let n of e.paths)if(!(!m(n)&&!(e.includeVueSfc&&v(n)))&&!i.isIgnored(n)&&!e.skipPath?.(n))try{let l=(r,c,p,d)=>{if(e.candidateNames&&!e.candidateNames.has(r))return;let y=e.resolveTargets?e.resolveTargets({sourceFile:n,name:r,kind:c,defaultTargets:d}):d();for(let S of y)t({sourceFile:n,name:r,target:S,occurrences:p,kind:c})},f=K(i,n);for(let[r,c]of f)l(r,"identifier",c.length,()=>a(i,n,r));for(let r of b(i,n,{includeCrossLanguageDispatchNames:e.includeCrossLanguageDispatchNames,includeRustAttributeNames:e.includeRustAttributeNames})){let c=r.kind==="cross-language-dispatch"?()=>I(i,n,r.name):()=>a(i,n,r.name);l(r.name,r.kind,r.occurrences,c)}}finally{e.afterPath?.(n)}}var W=class{constructor(e){this.db=e}db;scopedDefinitions(e){return q(this.db,e)}definitionsForFile(e){return E(this.db,e)}productionCallableDefinitions(e={}){let{scope:t,minLoc:a=1,maxLoc:n=Number.POSITIVE_INFINITY,excludeSymbol:o,excludeEntrySurfaces:l=!1,excludeTypesFiles:f=!1,excludeRootedSymbols:r=!1,requireFunctionLikeSymbol:c=!1,requireCallableSymbol:p=!1,excludeRustTraitImplMembers:d=!1,includeSuppressed:y=!1,sortByLocDesc:S=!1}=e,g=[];for(let s of this.scopedDefinitions(t)){let u=s.relativePath;if(this.db.isIgnored(u)||l&&T(this.db,u)||!Y(s,{requireFunctionLikeSymbol:c,requireCallableSymbol:p})||o!==void 0&&s.symbol===o)continue;let F=D(s);F<a||F>n||f&&_(u)||r&&k(this.db,s.symbol,u)||d&&A(s.symbol)||R(u)!=="test"&&(w(s.symbol)||!y&&h(this.db,u,s.startLine)||g.push(s))}return S?g.sort((s,u)=>D(u)-D(s)):g}calleeMap(e,t={}){return B(this.db,e,t)}crossFileCallerMap(e,t={}){return V(this.db,e,t)}sourceFallbackCallerFiles(e){return j(this.db,e)}callerFileMap(e,t={}){return G(this.db,e,t)}frameworkReferencedSymbolIds(e){let t=new Map;for(let n of e){if(!n.leaf)continue;let o=t.get(n.leaf)??[];o.push(n.symbolId),t.set(n.leaf,o)}let a=new Set;for(let n of L(this.db,{includeIgnored:!1}))if(m(n)==="rust")for(let{name:o}of b(this.db,n,{includeRustAttributeNames:!0}))for(let l of t.get(o)??[])a.add(l);return a}symbolsWithNonSelfCallees(e,t={}){if(e.length===0)return new Set;let a=new Map(e.map(o=>[o.symbolId,o.symbol])),n=this.calleeMap(e,t);return new Set([...n.entries()].filter(([o,l])=>{let f=a.get(o);return l.some(r=>r.symbol!==f)}).map(([o])=>o))}fileDependencyGraph(e){return C(this.db,e)}fileKind(e){return R(e)}hasSuppressionComment(e){return h(this.db,e.relativePath,e.startLine)}sourceFiles(){return M(this.db)}scanSourceReferences(e,t){H(this.db,e,t)}callableSignature(e){let t=x(this.db,e.relativePath)?.callables.find(a=>a.startLine===e.startLine&&a.endLine===e.endLine);return t?{paramCount:t.paramCount}:null}};function Y(i,e){return e.requireCallableSymbol?P(i.symbol):e.requireFunctionLikeSymbol?N(i.symbol):i.isFunctionLike}function D(i){return i.endLine-i.startLine+1}function _(i){return(i.split("/").pop()??"").includes("types")}export{W as a};
2
+ //# sourceMappingURL=chunk-IW7ASGVF.js.map
@@ -1,2 +1,2 @@
1
- import{a as p,f as h}from"./chunk-R3G6ERW7.js";import{a as c}from"./chunk-TQTVM27C.js";import{a as d}from"./chunk-RIXOMSOR.js";import{existsSync as A}from"fs";import{join as S}from"path";function T(e){return m.test(e)}var m=/(?:^|\/)(?:package-lock\.json|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|CHANGELOG(?:\.[a-z]+)?|.*\.map)$|(?:^|\/)(?:dist|build|out|node_modules)\//i;function j(e,i,t={}){let{minTogether:o=4,minConfidence:r=.6,limit:a=30}=t,u=p(e),s=i!==void 0,f=h(e,{minTogether:s?Math.min(o,2):o,minConfidence:s?0:r});if(!u||!f)return{available:!1,commitsAnalyzed:0,findings:[]};let C=d(e),y=t.includeLinked===!0||s,l=[];for(let n of f){if(m.test(n.fileA)||m.test(n.fileB)||!b(e,n.fileA)||!b(e,n.fileB)||s&&!n.fileA.includes(i)&&!n.fileB.includes(i)||!s&&(c(n.fileA)==="test"||c(n.fileB)==="test"||k(n.fileA,n.fileB)))continue;let g=x(C,n.fileA,n.fileB);if(!(!y&&g)&&(l.push({...n,structurallyLinked:g}),l.length>=a))break}return{available:!0,commitsAnalyzed:u.commits.length,findings:l}}function b(e,i){return A(S(e.config.projectRoot,i))}function k(e,i){let t=e.lastIndexOf("/"),o=i.lastIndexOf("/");if(e.slice(0,t)!==i.slice(0,o))return!1;let r=e.slice(t+1).split(".")[0],a=i.slice(o+1).split(".")[0];return r!==""&&r===a}function x(e,i,t){return e.get(i)?.has(t)===!0||e.get(t)?.has(i)===!0}export{T as a,j as b};
2
- //# sourceMappingURL=chunk-I66MQD5U.js.map
1
+ import{a as p,f as h}from"./chunk-R3G6ERW7.js";import{a as c}from"./chunk-QYKKTYBN.js";import{a as d}from"./chunk-IVAIPXNO.js";import{existsSync as A}from"fs";import{join as S}from"path";function T(e){return m.test(e)}var m=/(?:^|\/)(?:package-lock\.json|pnpm-lock\.yaml|yarn\.lock|Cargo\.lock|CHANGELOG(?:\.[a-z]+)?|.*\.map)$|(?:^|\/)(?:dist|build|out|node_modules)\//i;function j(e,i,t={}){let{minTogether:o=4,minConfidence:r=.6,limit:a=30}=t,u=p(e),s=i!==void 0,f=h(e,{minTogether:s?Math.min(o,2):o,minConfidence:s?0:r});if(!u||!f)return{available:!1,commitsAnalyzed:0,findings:[]};let C=d(e),y=t.includeLinked===!0||s,l=[];for(let n of f){if(m.test(n.fileA)||m.test(n.fileB)||!b(e,n.fileA)||!b(e,n.fileB)||s&&!n.fileA.includes(i)&&!n.fileB.includes(i)||!s&&(c(n.fileA)==="test"||c(n.fileB)==="test"||k(n.fileA,n.fileB)))continue;let g=x(C,n.fileA,n.fileB);if(!(!y&&g)&&(l.push({...n,structurallyLinked:g}),l.length>=a))break}return{available:!0,commitsAnalyzed:u.commits.length,findings:l}}function b(e,i){return A(S(e.config.projectRoot,i))}function k(e,i){let t=e.lastIndexOf("/"),o=i.lastIndexOf("/");if(e.slice(0,t)!==i.slice(0,o))return!1;let r=e.slice(t+1).split(".")[0],a=i.slice(o+1).split(".")[0];return r!==""&&r===a}function x(e,i,t){return e.get(i)?.has(t)===!0||e.get(t)?.has(i)===!0}export{T as a,j as b};
2
+ //# sourceMappingURL=chunk-JODYQDE4.js.map
@@ -1,2 +1,2 @@
1
- import{a as D}from"./chunk-NO2TPMCQ.js";import{n as A}from"./chunk-6ZFKI5EP.js";import{a as d,c as h,e as y}from"./chunk-64UY7VTR.js";import{c as S}from"./chunk-SOGLYIJ4.js";function F(e,n={}){let{samples:o=50,scope:r,maxDisagreements:l=5}=n,s=new D(e),i=C(s.productionCallableDefinitions({scope:r,minLoc:2,requireFunctionLikeSymbol:!0}),o);if(i.length===0||!R(e,i))return{available:!1,sampleSize:i.length,oracleCoverage:0,scores:[],topDisagreements:[]};let c={references:v(),callees:v()},a=[],g=0,T=y(e,i);for(let t of i){let u=f(t,h(e,t).map(m=>m.file)),b=f(t,(T.get(t.symbolId)??[]).map(m=>m.file));if(u.size===0&&b.size===0)continue;g+=1;let Q=f(t,A(e,t).map(m=>m.file)),I=f(t,(s.calleeMap([t],{semantic:!1}).get(t.symbolId)??[]).map(m=>m.file));x(c.references,t,"references",Q,u,a),x(c.callees,t,"callees",I,b,a)}return a.sort((t,u)=>u.cheapOnly.length+u.oracleOnly.length-(t.cheapOnly.length+t.oracleOnly.length)),{available:!0,sampleSize:i.length,oracleCoverage:i.length>0?p(g/i.length):0,scores:["references","callees"].map(t=>O(t,c[t])),topDisagreements:a.slice(0,l)}}function v(){return{comparedSymbols:0,agreed:0,cheapTotal:0,oracleTotal:0}}function C(e,n){let o=[...e].sort((s,i)=>s.symbolId-i.symbolId);if(o.length<=n)return o;let r=o.length/n,l=[];for(let s=0;s<n;s++)l.push(o[Math.floor(s*r)]);return l}function R(e,n){let o=n[0];if(!o)return!1;try{return d(e,o.relativePath).availability().available}catch{return!1}}function f(e,n){let o=new Set;for(let r of n)r!==e.relativePath&&o.add(r);return o}function x(e,n,o,r,l,s){if(r.size===0&&l.size===0)return;e.comparedSymbols+=1,e.cheapTotal+=r.size,e.oracleTotal+=l.size;let i=[],c=[];for(let a of r)l.has(a)?e.agreed+=1:i.push(a);for(let a of l)r.has(a)||c.push(a);(i.length>0||c.length>0)&&s.push({symbol:S(n.symbol),question:o,cheapOnly:i,oracleOnly:c})}var z={references:!0,callees:!1};function O(e,n){let o=n.oracleTotal>0?n.agreed/n.oracleTotal:1,r=n.cheapTotal-n.agreed;return{question:e,comparedSymbols:n.comparedSymbols,precision:z[e]&&n.cheapTotal>0?p(n.agreed/n.cheapTotal):null,recall:p(o),unverified:r}}function p(e){return Math.round(e*1e3)/1e3}export{F as a};
2
- //# sourceMappingURL=chunk-HDA2V5DC.js.map
1
+ import{a as D}from"./chunk-IW7ASGVF.js";import{n as A}from"./chunk-VGBSY6N7.js";import{b as d,d as h,f as y}from"./chunk-ZF6P2NAT.js";import{c as S}from"./chunk-O6KCZPJQ.js";function F(e,n={}){let{samples:o=50,scope:r,maxDisagreements:l=5}=n,s=new D(e),i=C(s.productionCallableDefinitions({scope:r,minLoc:2,requireFunctionLikeSymbol:!0}),o);if(i.length===0||!R(e,i))return{available:!1,sampleSize:i.length,oracleCoverage:0,scores:[],topDisagreements:[]};let c={references:v(),callees:v()},a=[],g=0,T=y(e,i);for(let t of i){let u=f(t,h(e,t).map(m=>m.file)),b=f(t,(T.get(t.symbolId)??[]).map(m=>m.file));if(u.size===0&&b.size===0)continue;g+=1;let Q=f(t,A(e,t).map(m=>m.file)),I=f(t,(s.calleeMap([t],{semantic:!1}).get(t.symbolId)??[]).map(m=>m.file));x(c.references,t,"references",Q,u,a),x(c.callees,t,"callees",I,b,a)}return a.sort((t,u)=>u.cheapOnly.length+u.oracleOnly.length-(t.cheapOnly.length+t.oracleOnly.length)),{available:!0,sampleSize:i.length,oracleCoverage:i.length>0?p(g/i.length):0,scores:["references","callees"].map(t=>O(t,c[t])),topDisagreements:a.slice(0,l)}}function v(){return{comparedSymbols:0,agreed:0,cheapTotal:0,oracleTotal:0}}function C(e,n){let o=[...e].sort((s,i)=>s.symbolId-i.symbolId);if(o.length<=n)return o;let r=o.length/n,l=[];for(let s=0;s<n;s++)l.push(o[Math.floor(s*r)]);return l}function R(e,n){let o=n[0];if(!o)return!1;try{return d(e,o.relativePath).availability().available}catch{return!1}}function f(e,n){let o=new Set;for(let r of n)r!==e.relativePath&&o.add(r);return o}function x(e,n,o,r,l,s){if(r.size===0&&l.size===0)return;e.comparedSymbols+=1,e.cheapTotal+=r.size,e.oracleTotal+=l.size;let i=[],c=[];for(let a of r)l.has(a)?e.agreed+=1:i.push(a);for(let a of l)r.has(a)||c.push(a);(i.length>0||c.length>0)&&s.push({symbol:S(n.symbol),question:o,cheapOnly:i,oracleOnly:c})}var z={references:!0,callees:!1};function O(e,n){let o=n.oracleTotal>0?n.agreed/n.oracleTotal:1,r=n.cheapTotal-n.agreed;return{question:e,comparedSymbols:n.comparedSymbols,precision:z[e]&&n.cheapTotal>0?p(n.agreed/n.cheapTotal):null,recall:p(o),unverified:r}}function p(e){return Math.round(e*1e3)/1e3}export{F as a};
2
+ //# sourceMappingURL=chunk-L2KFPRMA.js.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-V76FCF5F.js";import{a as m}from"./chunk-MX6F756F.js";import{a as d}from"./chunk-NO2TPMCQ.js";import{c as u}from"./chunk-SOGLYIJ4.js";function w(n,a={}){let{scope:e,minLoc:r=10,minCallees:o=6,limit:t=20,scanLimit:i}=a,s=new d(n);return f({candidates:()=>s.productionCallableDefinitions({scope:e,minLoc:r,excludeTypesFiles:!0,requireFunctionLikeSymbol:!0,sortByLocDesc:!0}),scanLimit:i,prepare:l=>s.calleeMap(l,{semantic:a.semantic!==!1}),evaluate:(l,c)=>g(l,c.get(l.symbolId)??[],o),orderResults:(l,c)=>c.clusters.length-l.clusters.length||c.loc-l.loc,limit:t})}function g(n,a,e){let r=new Set(a.map(s=>s.symbol));if(r.size<e)return null;let o=b(r,a),t=p(r,o);if(t.length<2)return null;let i=h(t,o);return i.length===0?null:{symbol:n.symbol,shortName:u(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:m(n),totalCallees:r.size,clusters:i}}function b(n,a){let e=new Map;for(let o of n)e.set(o,new Set);let r=new Map;for(let o of a){let t=r.get(o.chunkId);t||(t=new Set,r.set(o.chunkId,t)),t.add(o.symbol)}for(let o of r.values()){let t=[...o];for(let i=0;i<t.length;i++)for(let s=i+1;s<t.length;s++)e.get(t[i]).add(t[s]),e.get(t[s]).add(t[i])}return e}function p(n,a){let e=new Set,r=[];for(let o of n){if(e.has(o))continue;let t=new Set,i=[o];for(;i.length>0;){let s=i.pop();if(!e.has(s)){e.add(s),t.add(s);for(let l of a.get(s)??[])e.has(l)||i.push(l)}}r.push(t)}return r}function h(n,a){return n.filter(e=>e.size>=3).map(e=>C(e,n,a)).filter(e=>e.isolation>.5).sort((e,r)=>r.isolation-e.isolation)}function C(n,a,e){let r=new Set;for(let s of a)if(s!==n)for(let l of s)r.add(l);let o=0;for(let s of n)for(let l of e.get(s)??[])r.has(l)&&o++;let t=n.size*r.size,i=t>0?1-o/t:1;return{callees:[...n].map(u),isolation:i}}export{w as a};
2
- //# sourceMappingURL=chunk-U254PV4S.js.map
1
+ import{a as f}from"./chunk-V76FCF5F.js";import{a as m}from"./chunk-MX6F756F.js";import{a as d}from"./chunk-IW7ASGVF.js";import{c as u}from"./chunk-O6KCZPJQ.js";function w(n,a={}){let{scope:e,minLoc:r=10,minCallees:o=6,limit:t=20,scanLimit:i}=a,s=new d(n);return f({candidates:()=>s.productionCallableDefinitions({scope:e,minLoc:r,excludeTypesFiles:!0,requireFunctionLikeSymbol:!0,sortByLocDesc:!0}),scanLimit:i,prepare:l=>s.calleeMap(l,{semantic:a.semantic!==!1}),evaluate:(l,c)=>g(l,c.get(l.symbolId)??[],o),orderResults:(l,c)=>c.clusters.length-l.clusters.length||c.loc-l.loc,limit:t})}function g(n,a,e){let r=new Set(a.map(s=>s.symbol));if(r.size<e)return null;let o=b(r,a),t=p(r,o);if(t.length<2)return null;let i=h(t,o);return i.length===0?null:{symbol:n.symbol,shortName:u(n.symbol),relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:m(n),totalCallees:r.size,clusters:i}}function b(n,a){let e=new Map;for(let o of n)e.set(o,new Set);let r=new Map;for(let o of a){let t=r.get(o.chunkId);t||(t=new Set,r.set(o.chunkId,t)),t.add(o.symbol)}for(let o of r.values()){let t=[...o];for(let i=0;i<t.length;i++)for(let s=i+1;s<t.length;s++)e.get(t[i]).add(t[s]),e.get(t[s]).add(t[i])}return e}function p(n,a){let e=new Set,r=[];for(let o of n){if(e.has(o))continue;let t=new Set,i=[o];for(;i.length>0;){let s=i.pop();if(!e.has(s)){e.add(s),t.add(s);for(let l of a.get(s)??[])e.has(l)||i.push(l)}}r.push(t)}return r}function h(n,a){return n.filter(e=>e.size>=3).map(e=>C(e,n,a)).filter(e=>e.isolation>.5).sort((e,r)=>r.isolation-e.isolation)}function C(n,a,e){let r=new Set;for(let s of a)if(s!==n)for(let l of s)r.add(l);let o=0;for(let s of n)for(let l of e.get(s)??[])r.has(l)&&o++;let t=n.size*r.size,i=t>0?1-o/t:1;return{callees:[...n].map(u),isolation:i}}export{w as a};
2
+ //# sourceMappingURL=chunk-MCW36F2D.js.map
@@ -1,3 +1,3 @@
1
- import{a as d}from"./chunk-7I6KNKE3.js";import{a as g,c as m}from"./chunk-SOGLYIJ4.js";function _(n,f){let a=d(n,f);if(!a)return[];let t=n.get(`SELECT symbol, enclosing_symbol FROM global_symbols
1
+ import{a as d}from"./chunk-4MHT7LKP.js";import{a as g,c as m}from"./chunk-O6KCZPJQ.js";function _(n,f){let a=d(n,f);if(!a)return[];let t=n.get(`SELECT symbol, enclosing_symbol FROM global_symbols
2
2
  WHERE id = ? LIMIT 1`,a.symbolId);if(!t)return[];let o=[{symbol:t.symbol,shortName:m(t.symbol),depth:0}],e=t.enclosing_symbol,r=1,c=new Set([t.symbol]);for(;e&&!c.has(e)&&r<20;){c.add(e);let s=n.get("SELECT symbol, enclosing_symbol FROM global_symbols WHERE symbol = ?",e);if(!s)break;o.push({symbol:s.symbol,shortName:m(s.symbol),depth:r}),e=s.enclosing_symbol,r++}if(o.length>1)return o;let y=g(t.symbol);if("kind"in y)return o;let l=y.descriptors;if(l.length<=1)return o;let b=[o[0]];for(let s=l.length-2,h=1;s>=0;s--,h++){let p=l.slice(0,s+1).map(i=>i.suffix==="method"?`${i.name}()`:i.name.replace(/\.(ts|tsx|js|jsx|mjs|cjs|py|pyi|rs|java|scala|kt|kts|rb|go|cs|vb|dart|php|c|cc|cpp|cxx|h|hpp)$/,"")).join(":");b.push({symbol:p,shortName:p,depth:h})}return b}export{_ as a};
3
- //# sourceMappingURL=chunk-SDGCKEB7.js.map
3
+ //# sourceMappingURL=chunk-MN75T4UB.js.map
@@ -1,4 +1,4 @@
1
- import{a as s}from"./chunk-WC43FMAB.js";function m(e,d){let i=s(e,d);return i?e.all(`SELECT DISTINCT d2.relative_path
1
+ import{a as s}from"./chunk-ZOT3WUZW.js";function m(e,d){let i=s(e,d);return i?e.all(`SELECT DISTINCT d2.relative_path
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
@@ -30,4 +30,4 @@ import{a as s}from"./chunk-WC43FMAB.js";function m(e,d){let i=s(e,d);return i?e.
30
30
  WHERE d2.relative_path = ?
31
31
  AND d1.relative_path != ?
32
32
  ORDER BY d1.relative_path`,i,i).filter(t=>!e.isIgnored(t.relative_path)).map(t=>({relativePath:t.relative_path})):[]}export{m as a,o as b};
33
- //# sourceMappingURL=chunk-AGW2MVIO.js.map
33
+ //# sourceMappingURL=chunk-NC4IUW25.js.map
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-NO2TPMCQ.js";import{a as S}from"./chunk-TQTVM27C.js";import{b as h}from"./chunk-64UY7VTR.js";import{b as d}from"./chunk-APLCSDXL.js";import{a as y}from"./chunk-NN3O7TPH.js";import f from"path";function l(e){let n=e.replace(/\\/g,"/").split("/").filter(Boolean);return n.length<=1?"(root)":n.length>=3&&["src","lib","app","server","client"].includes(n[0])?`${n[0]}/${n[1]}`:n[0]}function p(e,t){if(e===t)return"ok";let n=g(e),i=g(t);return n&&i?v(n,i)?"ok":"violation":w(e,t)}function D(e,t){let n=g(l(e)),i=g(l(t));return!!n&&!!i}function g(e){return/^src\/([^/]+)$/.exec(e)?.[1]??null}function v(e,t){return t==="domain"?!0:e==="domain"?!1:{analysis:new Set(["domain","source","storage","symbols"]),core:new Set(["analysis","domain","resolution","source","storage","symbols"]),"language-parsers":new Set(["domain","resolution","source","storage"]),queries:new Set(["analysis","core","domain","language-parsers","resolution","semantic","source","storage","symbols"]),reindex:new Set(["domain","language-parsers","resolution","runtime","semantic","source","storage","symbols"]),resolution:new Set(["domain","source","storage","symbols"]),runtime:new Set(["domain","queries","reindex","resolution","semantic","source","storage","symbols"]),semantic:new Set(["domain","resolution","storage","symbols"]),source:new Set(["domain","storage"]),storage:new Set(["domain","source"]),symbols:new Set(["analysis","domain","language-parsers","resolution","semantic","source","storage"])}[e]?.has(t)??!1}function w(e,t){if(t==="shared")return"ok";let n={app:new Set(["core","shared","ui"]),core:new Set(["shared"]),infra:new Set(["core","shared"]),ui:new Set(["core","shared"])};return n[e]?n[e].has(t)?"ok":"violation":null}function G(e,t){let{scope:n,minDeviation:i=5}=t??{},r=t?.semantic!==!1,c=new m(e).fileDependencyGraph(n),a=O(e,n);return _([...R(e,c,a,{semantic:r}),...k(c),...I(c,i)])}function R(e,t,n,i){let r=[];for(let[s,c]of t){if(u(s))continue;let a=n.get(s)??new Set;for(let o of c)if(!u(o)&&!a.has(o)){if(i.semantic&&L(e,s,o)||A(e,s,o)||T(e,s,o)||F(o)||j(e,s,o)||V(o))continue;r.push({file:s,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o})}}return r}function k(e){let t=[],n=$(e);for(let[i,r]of e){if(u(i))continue;let s=l(i);for(let c of r){if(u(c))continue;let a=l(c);if(s===a)continue;(p(s,a)??n.get(`${s}->${a}`))==="violation"&&t.push({file:i,kind:"layer-violation",description:`Imports from ${a}/ (${c}) \u2014 may cross architectural boundary`,dep:c,detail:`${s}/ should not depend on ${a}/`})}}return t}function I(e,t){let n=[];for(let[i,r]of M(e)){let s=r.filter(a=>!u(a));if(s.length<t)continue;let c=x(e,s);for(let a of s)for(let o of e.get(a)??[])u(o)||(c.get(o)??0)===1&&f.dirname(o)!==i&&f.dirname(o)!==f.dirname(i)&&(D(a,o)||n.push({file:a,kind:"pattern-deviation",description:`Only file in ${i}/ that depends on ${o}`,dep:o}))}return n}function _(e){return{results:e,unusedImports:e.filter(t=>t.kind==="unused-import").length,layerViolations:e.filter(t=>t.kind==="layer-violation").length,patternDeviations:e.filter(t=>t.kind==="pattern-deviation").length}}function M(e){let t=new Map;for(let n of e.keys()){let i=f.dirname(n),r=t.get(i);r||(r=[],t.set(i,r)),r.push(n)}return t}function x(e,t){let n=new Map;for(let i of t)for(let r of e.get(i)??[])u(r)||n.set(r,(n.get(r)??0)+1);return n}function O(e,t){let n=new Map;return E(e,n,t),P(e,n),n}function E(e,t,n){for(let i of N(e,n))b(e,t,i.from_file,i.to_file)}function N(e,t){let n=t?`AND d1.relative_path LIKE '%${t}%'`:"";return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
1
+ import{a as m}from"./chunk-IW7ASGVF.js";import{a as S}from"./chunk-QYKKTYBN.js";import{c as h}from"./chunk-ZF6P2NAT.js";import{b as d}from"./chunk-FVVT7GV6.js";import{a as y}from"./chunk-NN3O7TPH.js";import f from"path";function l(e){let n=e.replace(/\\/g,"/").split("/").filter(Boolean);return n.length<=1?"(root)":n.length>=3&&["src","lib","app","server","client"].includes(n[0])?`${n[0]}/${n[1]}`:n[0]}function p(e,t){if(e===t)return"ok";let n=g(e),i=g(t);return n&&i?v(n,i)?"ok":"violation":w(e,t)}function D(e,t){let n=g(l(e)),i=g(l(t));return!!n&&!!i}function g(e){return/^src\/([^/]+)$/.exec(e)?.[1]??null}function v(e,t){return t==="domain"?!0:e==="domain"?!1:{analysis:new Set(["domain","source","storage","symbols"]),core:new Set(["analysis","domain","resolution","source","storage","symbols"]),"language-parsers":new Set(["domain","resolution","source","storage"]),queries:new Set(["analysis","core","domain","language-parsers","resolution","semantic","source","storage","symbols"]),reindex:new Set(["domain","language-parsers","resolution","runtime","semantic","source","storage","symbols"]),resolution:new Set(["domain","source","storage","symbols"]),runtime:new Set(["domain","queries","reindex","resolution","semantic","source","storage","symbols"]),semantic:new Set(["domain","resolution","storage","symbols"]),source:new Set(["domain","storage"]),storage:new Set(["domain","source"]),symbols:new Set(["analysis","domain","language-parsers","resolution","semantic","source","storage"])}[e]?.has(t)??!1}function w(e,t){if(t==="shared")return"ok";let n={app:new Set(["core","shared","ui"]),core:new Set(["shared"]),infra:new Set(["core","shared"]),ui:new Set(["core","shared"])};return n[e]?n[e].has(t)?"ok":"violation":null}function G(e,t){let{scope:n,minDeviation:i=5}=t??{},r=t?.semantic!==!1,c=new m(e).fileDependencyGraph(n),a=O(e,n);return _([...R(e,c,a,{semantic:r}),...k(c),...I(c,i)])}function R(e,t,n,i){let r=[];for(let[s,c]of t){if(u(s))continue;let a=n.get(s)??new Set;for(let o of c)if(!u(o)&&!a.has(o)){if(i.semantic&&L(e,s,o)||A(e,s,o)||T(e,s,o)||F(o)||j(e,s,o)||V(o))continue;r.push({file:s,kind:"unused-import",description:`Depends on ${o} but references none of its symbols`,dep:o})}}return r}function k(e){let t=[],n=$(e);for(let[i,r]of e){if(u(i))continue;let s=l(i);for(let c of r){if(u(c))continue;let a=l(c);if(s===a)continue;(p(s,a)??n.get(`${s}->${a}`))==="violation"&&t.push({file:i,kind:"layer-violation",description:`Imports from ${a}/ (${c}) \u2014 may cross architectural boundary`,dep:c,detail:`${s}/ should not depend on ${a}/`})}}return t}function I(e,t){let n=[];for(let[i,r]of M(e)){let s=r.filter(a=>!u(a));if(s.length<t)continue;let c=x(e,s);for(let a of s)for(let o of e.get(a)??[])u(o)||(c.get(o)??0)===1&&f.dirname(o)!==i&&f.dirname(o)!==f.dirname(i)&&(D(a,o)||n.push({file:a,kind:"pattern-deviation",description:`Only file in ${i}/ that depends on ${o}`,dep:o}))}return n}function _(e){return{results:e,unusedImports:e.filter(t=>t.kind==="unused-import").length,layerViolations:e.filter(t=>t.kind==="layer-violation").length,patternDeviations:e.filter(t=>t.kind==="pattern-deviation").length}}function M(e){let t=new Map;for(let n of e.keys()){let i=f.dirname(n),r=t.get(i);r||(r=[],t.set(i,r)),r.push(n)}return t}function x(e,t){let n=new Map;for(let i of t)for(let r of e.get(i)??[])u(r)||n.set(r,(n.get(r)??0)+1);return n}function O(e,t){let n=new Map;return E(e,n,t),P(e,n),n}function E(e,t,n){for(let i of N(e,n))b(e,t,i.from_file,i.to_file)}function N(e,t){let n=t?`AND d1.relative_path LIKE '%${t}%'`:"";return e.all(`SELECT DISTINCT d1.relative_path AS from_file, d2.relative_path AS to_file
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
@@ -15,4 +15,4 @@ import{a as m}from"./chunk-NO2TPMCQ.js";import{a as S}from"./chunk-TQTVM27C.js";
15
15
  AND m.role != 1
16
16
  ${e.pathExclusionsFor("d1","d2")}
17
17
  ${n}`)}function P(e,t){new m(e).scanSourceReferences({paths:y(e,{includeIgnored:!1}),includeRustAttributeNames:!0,identifierResolution:"permissive"},i=>{i.target.relativePath!==i.sourceFile&&(e.isIgnored(i.target.relativePath)||b(e,t,i.sourceFile,i.target.relativePath))})}function b(e,t,n,i){if(e.isIgnored(n)||e.isIgnored(i))return;let r=t.get(n);r||(r=new Set,t.set(n,r)),r.add(i)}function $(e){let t=new Map;for(let[i,r]of e){if(u(i))continue;let s=l(i);for(let c of r){if(u(c))continue;let a=l(c);if(s===a||p(s,a))continue;let o=`${s}->${a}`;t.set(o,(t.get(o)??0)+1)}}let n=new Map;for(let[i,r]of t)n.set(i,r<=2?"violation":"ok");return n}function F(e){return e.includes("types")||e.endsWith(".d.ts")}function L(e,t,n){let i=h(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.some(r=>r.isUsed)}function A(e,t,n){let i=d(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.some(r=>r.used)}function T(e,t,n){let i=d(e,t).filter(r=>r.sourcePath===n);return i.length>0&&i.every(r=>r.isTypeOnly===!0)}function V(e){return e.endsWith(".vue")}function j(e,t,n){let i=d(e,t).filter(r=>r.sourcePath===n);return i.length===0?!1:i.every(r=>r.kind==="side-effect"||r.kind==="namespace"&&r.usedMembers.length===0&&!r.used)}function u(e){let t=S(e);return!!(t==="entry"||t==="barrel"||t==="test"||t==="worker"||J(f.basename(e)))}function J(e){return!!(e==="index.ts"||e==="index.js"||e==="cli.ts"||e==="main.ts"||e==="main.rs"||e.includes("worker.")||e.includes("postinstall.")||e==="health.ts"||e==="health.js")}export{G as a};
18
- //# sourceMappingURL=chunk-2DVVHNC3.js.map
18
+ //# sourceMappingURL=chunk-NGI4V4AB.js.map
@@ -1,4 +1,4 @@
1
- import{a as h,h as S}from"./chunk-WQFOZIID.js";import{a as x}from"./chunk-NN3O7TPH.js";import{c as y}from"./chunk-VDZL45XI.js";var v={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function d(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let t=e.split(" ");if(t.length<4)return{scheme:t[0]??"",manager:t[1]??"",packageName:t[2]??"",version:"",descriptors:[],raw:e};let n=t[0],i=t[1],r=e.slice(n.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=F(r);return{scheme:n,manager:i,packageName:s,version:o,descriptors:c,raw:e}}function m(e){let t=d(e);if("kind"in t)return null;for(let n=t.descriptors.length-2;n>=0;n--){let i=t.descriptors[n];if(i?.suffix==="type")return i.name}return null}function F(e){let t=[],n=0;for(;n<e.length;){if(e[n]==="["){let s=e.indexOf("]",n+1);if(s===-1){t.push({name:e.slice(n+1),suffix:"type-param"});break}t.push({name:e.slice(n+1,s),suffix:"type-param"}),n=s+1;continue}if(e[n]==="("&&(t.length===0||n===0||D(e[n-1]))){let s=e.indexOf(")",n+1);if(s!==-1&&e[s+1]!=="."){t.push({name:e.slice(n+1,s),suffix:"parameter"}),n=s+1;continue}}let i;if(e[n]==="`"){let s=e.indexOf("`",n+1);if(s===-1){i=e.slice(n+1),t.push({name:i,suffix:"term"});break}i=e.slice(n+1,s),n=s+1}else{let s=n;for(;n<e.length&&!D(e[n]);)n++;i=e.slice(s,n)}if(n>=e.length){i&&t.push({name:i,suffix:"term"});break}let r=e[n];if(r==="("){let s=e.indexOf(")",n+1);s!==-1&&e[s+1]==="."?(t.push({name:i,suffix:"method"}),n=s+2):s!==-1?(t.push({name:i,suffix:"method"}),n=s+1):(t.push({name:i,suffix:"term"}),n++)}else{let s=v[r];s&&t.push({name:i,suffix:s}),n+=1}}return t}function D(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function _(e){let t=d(e);if("kind"in t&&t.kind==="local")return`local:${t.id}`;let n=t;if(n.descriptors.length===0)return n.raw;let i=[];for(let r of n.descriptors){let s=w(r);s&&i.push(s)}return i.join(":")}function w(e){let t=e.suffix==="namespace"?C(e.name):e.name;return t?e.suffix==="method"?`${t}()`:t:""}function C(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 L(e){let t=d(e);if("kind"in t&&t.kind==="local")return t.id;let n=t;return n.descriptors.length===0?"":n.descriptors[n.descriptors.length-1].name}function f(e){let t=d(e);if("kind"in t&&t.kind==="local")return null;let n=t;return n.descriptors[n.descriptors.length-1]?.suffix??null}function te(e){return e.endsWith("().")||f(e)==="method"}function I(e){let t=f(e);return t==="method"||t==="term"}function re(e){return f(e)==="namespace"}var A=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function ie(e){return A.test(e)}var T=new Set(["test","tests","_tests"]);function se(e){let t=d(e);if("kind"in t)return!1;for(let n=0;n<t.descriptors.length-1;n+=1){let i=t.descriptors[n];if(i?.suffix==="namespace"&&i.name&&T.has(i.name))return!0}return!1}function oe(e,t){let n=d(e),i=d(t);if("kind"in n||"kind"in i)return!1;let r=n.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 ae(e,t){let n=d(e),i=d(t);if("kind"in n||"kind"in i)return!1;let r=n.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 ce(e,t){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.end_line, d.relative_path, gs.display_name, gs.documentation
1
+ import{a as h,h as S}from"./chunk-OH5HIAID.js";import{a as x}from"./chunk-NN3O7TPH.js";import{c as y}from"./chunk-VDZL45XI.js";var v={"/":"namespace","#":"type",".":"term","[":"type-param",":":"meta","!":"macro"};function d(e){if(e.startsWith("local "))return{kind:"local",id:e.slice(6),raw:e};let t=e.split(" ");if(t.length<4)return{scheme:t[0]??"",manager:t[1]??"",packageName:t[2]??"",version:"",descriptors:[],raw:e};let n=t[0],i=t[1],r=e.slice(n.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=F(r);return{scheme:n,manager:i,packageName:s,version:o,descriptors:c,raw:e}}function m(e){let t=d(e);if("kind"in t)return null;for(let n=t.descriptors.length-2;n>=0;n--){let i=t.descriptors[n];if(i?.suffix==="type")return i.name}return null}function F(e){let t=[],n=0;for(;n<e.length;){if(e[n]==="["){let s=e.indexOf("]",n+1);if(s===-1){t.push({name:e.slice(n+1),suffix:"type-param"});break}t.push({name:e.slice(n+1,s),suffix:"type-param"}),n=s+1;continue}if(e[n]==="("&&(t.length===0||n===0||D(e[n-1]))){let s=e.indexOf(")",n+1);if(s!==-1&&e[s+1]!=="."){t.push({name:e.slice(n+1,s),suffix:"parameter"}),n=s+1;continue}}let i;if(e[n]==="`"){let s=e.indexOf("`",n+1);if(s===-1){i=e.slice(n+1),t.push({name:i,suffix:"term"});break}i=e.slice(n+1,s),n=s+1}else{let s=n;for(;n<e.length&&!D(e[n]);)n++;i=e.slice(s,n)}if(n>=e.length){i&&t.push({name:i,suffix:"term"});break}let r=e[n];if(r==="("){let s=e.indexOf(")",n+1);s!==-1&&e[s+1]==="."?(t.push({name:i,suffix:"method"}),n=s+2):s!==-1?(t.push({name:i,suffix:"method"}),n=s+1):(t.push({name:i,suffix:"term"}),n++)}else{let s=v[r];s&&t.push({name:i,suffix:s}),n+=1}}return t}function D(e){return e==="/"||e==="#"||e==="."||e==="("||e==="["||e===":"||e==="!"}function _(e){let t=d(e);if("kind"in t&&t.kind==="local")return`local:${t.id}`;let n=t;if(n.descriptors.length===0)return n.raw;let i=[];for(let r of n.descriptors){let s=w(r);s&&i.push(s)}return i.join(":")}function w(e){let t=e.suffix==="namespace"?C(e.name):e.name;return t?e.suffix==="method"?`${t}()`:t:""}function C(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 L(e){let t=d(e);if("kind"in t&&t.kind==="local")return t.id;let n=t;return n.descriptors.length===0?"":n.descriptors[n.descriptors.length-1].name}function f(e){let t=d(e);if("kind"in t&&t.kind==="local")return null;let n=t;return n.descriptors[n.descriptors.length-1]?.suffix??null}function te(e){return e.endsWith("().")||f(e)==="method"}function I(e){let t=f(e);return t==="method"||t==="term"}function re(e){return f(e)==="namespace"}var A=/^rust-analyzer\b.*[\s/]impl#\[[^\]]+\]\[[^\]]+\]/;function ie(e){return A.test(e)}var T=new Set(["test","tests","_tests"]);function se(e){let t=d(e);if("kind"in t)return!1;for(let n=0;n<t.descriptors.length-1;n+=1){let i=t.descriptors[n];if(i?.suffix==="namespace"&&i.name&&T.has(i.name))return!0}return!1}function oe(e,t){let n=d(e),i=d(t);if("kind"in n||"kind"in i)return!1;let r=n.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 ae(e,t){let n=d(e),i=d(t);if("kind"in n||"kind"in i)return!1;let r=n.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 ce(e,t){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.end_line, 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
@@ -59,4 +59,4 @@ import{a as h,h as S}from"./chunk-WQFOZIID.js";import{a as x}from"./chunk-NN3O7T
59
59
  ${e.symbolNoiseFor("gs")}
60
60
  GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
61
61
  ORDER BY start_line, end_line`,t)}function J(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,endLine:e.end_line,relativePath:e.relative_path,leaf:L(e.symbol),parentTypeName:m(e.symbol),isFunctionLike:I(e.symbol),isTypeLike:f(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function De(e,t={}){return W(e,t.scope)}function W(e,t){return x(e,{scope:t,includeIgnored:!1}).flatMap(n=>g(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function _e(e,t,n={}){if(t.length===0)return[];let i=t.flatMap(r=>g(e,r)).filter(r=>!e.isIgnored(r.relativePath));return n.onlyDocumented&&(i=i.filter(r=>r.documentation!==null&&r.documentation!=="")),n.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:_(r.symbol),signature:N(O(r.documentation)),relativePath:r.relativePath,enclosingSymbol:r.enclosingSymbol}))}function Le(e,t){let n=null;for(let i of e)i.startLine>t||i.endLine<t||(!n||i.endLine-i.startLine<n.endLine-n.startLine)&&(n=i);return n}function Ie(e,t){let n=g(e,t.relative_path).find(i=>i.symbolId===t.id);return n?{symbolId:n.symbolId,symbol:n.symbol,documentId:n.documentId,startLine:n.startLine,endLine:n.endLine,relativePath:n.relativePath}:{symbolId:t.id,symbol:t.symbol,documentId:t.document_id,startLine:t.start_line,endLine:t.end_line,relativePath:t.relative_path}}function H(e,t,n){let i=h(e,t),r=S(e,t);return r?X(n,r,i):i?z(n,i):n}function z(e,t){let n=t.split(/\r?\n/),i=U(e,n),r=Y(e,i),s=Z(r,n);return G(e,s)}function U(e,t){let n=e.some(r=>b(r.symbol))?q(t):null,i=new Map;for(let r of e)i.set(r.symbolId,V(t,n,r));return i}function Y(e,t){return e.filter(n=>b(n.symbol)).map(n=>({definition:n,startLine:t.get(n.symbolId)??n.startLine})).sort((n,i)=>n.startLine-i.startLine||n.definition.startLine-i.definition.startLine||n.definition.symbol.localeCompare(i.definition.symbol))}function Z(e,t){let n=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):t.length-1;n.set(r.definition.symbolId,{startLine:r.startLine,endLine:ee(t,r.definition,r.startLine,o)})}return n}function G(e,t){return e.map(n=>{let i=t.get(n.symbolId);return i?{...n,startLine:i.startLine,endLine:i.endLine}:n})}function X(e,t,n=null){let i=new Map;for(let r of t){let s=i.get(r.name);s?s.push(r):i.set(r.name,[r])}return e.map(r=>{if(!K(r)||!r.leaf)return E(r,n);let s=i.get(r.leaf);if(!s||s.length===0)return E(r,n);let o=s[0],a=Math.abs(o.startLine-r.startLine);for(let c=1;c<s.length;c+=1){let l=s[c],u=Math.abs(l.startLine-r.startLine);u<a&&(o=l,a=u)}return{...r,startLine:o.startLine,endLine:o.endLine}})}function K(e){return b(e.symbol)?!0:f(e.symbol)==="term"&&m(e.symbol)===null}function E(e,t){if(!t||!e.leaf||f(e.symbol)!=="term"||m(e.symbol)!==null)return e;let n=e.leaf.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${n}\\b`),s=t.split(/\r?\n/).findIndex(o=>i.test(o));return s>=0?{...e,startLine:s,endLine:s}:e}function V(e,t,n){if(!b(n.symbol))return n.startLine;let i=Math.max(0,Math.min(n.startLine,e.length-1));if(!t)return i;let r=t.get(n.leaf);if(!r||r.length===0)return i;let s=null;for(let o of r){let a=Math.abs(o-n.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??i}function q(e){let t=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,n=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,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 u of c.matchAll(t))u[1]&&o(u[1],a);for(let u of c.matchAll(n))u[1]&&o(u[1],a);let l=c.match(i);l?.[1]&&o(l[1],a);for(let u of c.matchAll(r))u[1]&&o(u[1],a)}return s}function ee(e,t,n,i){let r=Math.max(n,Math.min(e.length-1,i)),s=Math.max(n,Math.min(r,t.endLine)),o=0,a=0,c=!1;for(let l=n;l<=r;l+=1){let u=ne(e[l]??"");for(let p of u)p==="{"?(o+=1,c=!0):p==="}"?o=Math.max(0,o-1):p==="("?a+=1:p===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=s)return l}return s}function ne(e){let t="",n=null,i=!1;for(let r=0;r<e.length;r+=1){let s=e[r],o=e[r+1];if(!n&&s==="/"&&o==="/"){t+=" ".repeat(e.length-r);break}if(n){if(i){i=!1,t+=" ";continue}if(s==="\\"){i=!0,t+=" ";continue}s===n&&(n=null),t+=" ";continue}if(s==='"'||s==="'"||s==="`"){n=s,t+=" ";continue}t+=s}return t}function b(e){return e.includes("().")}function Re(e){let t=d(e);if("kind"in t)return[];let n=[];for(let i=t.descriptors.length-2;i>=0;i-=1){let r=t.descriptors[i];r?.suffix==="type"&&r.name&&n.push(r.name)}return n}export{d as a,m as b,_ as c,L as d,f as e,te as f,I as g,re as h,ie as i,se as j,oe as k,ae as l,ce as m,ue as n,N as o,O as p,$ as q,g as r,De as s,W as t,_e as u,Le as v,Ie as w,Re as x};
62
- //# sourceMappingURL=chunk-SOGLYIJ4.js.map
62
+ //# sourceMappingURL=chunk-O6KCZPJQ.js.map
@@ -0,0 +1,6 @@
1
+ import{a as k,b as y,e as L,f as E}from"./chunk-UIWAZ2NT.js";import{c as q}from"./chunk-MX6F756F.js";import{a as F}from"./chunk-IW7ASGVF.js";import{a as N}from"./chunk-5QJIEYFB.js";import{a as A}from"./chunk-4MHT7LKP.js";import{c as p,d as M,g as R}from"./chunk-O6KCZPJQ.js";import{a as z}from"./chunk-OH5HIAID.js";import{d as w}from"./chunk-VDZL45XI.js";function ue(e,n,i={}){let{minSimilarity:r=.4,limit:s=20}=i,l=V(e,n,{semantic:i.semantic!==!1});if(!l)return[];if(!R(l.symbol))return[];let t=U(e,l,r,{scanLimit:i.scanLimit,semantic:i.semantic!==!1});return t.length>0?t.slice(0,s):H(e,n,{minSimilarity:r,limit:s})}function U(e,n,i,r){let s=I(e,{minCallees:3,excludeSymbol:n.symbol,scanLimit:r.scanLimit,semantic:r.semantic}),l=L([n,...s].map(o=>o.callees)),t=[];for(let o of s){if(o.callees.size<3)continue;let a=$(n,o,l,{minSimilarity:i,requireSignificantShared:1,requireSharedCount:0});a&&t.push(a)}return t.sort((o,a)=>a.similarity-o.similarity),t}function $(e,n,i,r){let{similarity:s,significantShared:l}=E(e.callees,n.callees,i);if(s<r.minSimilarity)return null;let t=k(e.callees,n.callees).size;if(l.length<r.requireSignificantShared&&t<r.requireSharedCount)return null;let o=l.length>0?l:[...k(e.callees,n.callees)];return{symbolA:e.symbol,shortNameA:p(e.symbol),fileA:e.file,symbolB:n.symbol,shortNameB:p(n.symbol),fileB:n.file,similarity:s,similarityBasis:"callees",sharedCallees:o.map(p),uniqueToA:[...y(e.callees,n.callees)].map(p),uniqueToB:[...y(n.callees,e.callees)].map(p)}}function be(e,n={}){let{minSimilarity:i=.5,limit:r=20,scope:s,minCallees:l=4,crossFileOnly:t=!1,scanLimit:o}=n,a=I(e,{minCallees:l,scope:s,scanLimit:o,semantic:n.semantic!==!1}),c=L(a.map(u=>u.callees)),m=new Map;for(let u of a)for(let b of u.callees)m.set(b,(m.get(b)??0)+1);let h=Math.max(8,Math.ceil(Math.sqrt(a.length))),x=new Map;for(let u=0;u<a.length;u+=1)for(let b of a[u].callees){if((m.get(b)??0)>h)continue;let g=x.get(b);g||(g=[],x.set(b,g)),g.push(u)}let C=[],P=new Set;e:for(let u=0;u<a.length;u+=1){let b=a[u],g=new Set;for(let D of b.callees){let S=x.get(D);if(S)for(let f of S)f>u&&g.add(f)}for(let D of g){let S=`${u}|${D}`;if(P.has(S))continue;P.add(S);let f=a[D];if(t&&b.file===f.file)continue;if(b.paramCount>=0&&f.paramCount>=0){let _=Math.abs(b.paramCount-f.paramCount),O=Math.max(2,Math.ceil(Math.max(b.paramCount,f.paramCount)*.5));if(_>O)continue}let B=$(b,f,c,{minSimilarity:i,requireSignificantShared:2,requireSharedCount:4});if(B&&(C.push(B),C.length>r*5))break e}}return C.sort((u,b)=>b.similarity-u.similarity),C.slice(0,r)}var G=["ScipDatabase#all","ScipDatabase#get","ScipDatabase#prepare","ScipDatabase#pathExclusionsFor","ScipDatabase#isIgnored","ScipDatabase#symbolNoiseFor","PerDbValue#get","PerDbValue#has",":storage:db:ScipDatabase:all",":storage:db:ScipDatabase:get",":storage:db:ScipDatabase:prepare",":storage:db:ScipDatabase:pathExclusionsFor",":storage:db:ScipDatabase:isIgnored",":storage:db:ScipDatabase:symbolNoiseFor",":storage:per-db-cache:PerDbValue:get",":storage:per-db-cache:PerDbValue:has"];function V(e,n,i){let r=A(e,n),s=new F(e);if(!r)return null;let l=N(e,r,{semantic:i.semantic});return{symbol:r.symbol,file:r.relativePath,callees:T(l.map(t=>t.symbol)),paramCount:s.callableSignature(r)?.paramCount??-1}}var Z=w("callee-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]});function I(e,n){let{minCallees:i,scope:r,excludeSymbol:s,scanLimit:l}=n,t=n.semantic!==!1,o=Z.get(e,()=>new Map),a=`${i}|${r??""}|${l??""}|${t}`,c=o.get(a);return c||(c=W(e,{minCallees:i,scope:r,scanLimit:l,semantic:t}),o.set(a,c)),s===void 0?c:c.filter(m=>m.symbol!==s)}function W(e,n){let{minCallees:i,scope:r,scanLimit:s,semantic:l}=n,t=new F(e),o=q(t.productionCallableDefinitions({scope:r,minLoc:5,sortByLocDesc:typeof s=="number"&&s>0}),s),a=t.calleeMap(o,{semantic:l});return o.map(c=>({symbol:c.symbol,file:c.relativePath,callees:T((a.get(c.symbolId)??[]).map(m=>m.symbol)),paramCount:t.callableSignature(c)?.paramCount??-1})).filter(c=>c.callees.size>=i)}function T(e){return new Set([...e].filter(n=>!K(n)))}function K(e){return G.some(n=>e.includes(n))}function H(e,n,i){let r=J(e,n);if(!r||r.tokens.size<3)return[];let s=i.minSimilarity>=.5?i.minSimilarity:.3,l=[];for(let t of Y(e)){if(t.symbol===r.symbol||t.tokens.size<3)continue;let o=k(r.tokens,t.tokens);if(o.size<2)continue;let a=new Set([...r.tokens,...t.tokens]),c=a.size>0?o.size/a.size:0;c<s||l.push({symbolA:r.symbol,shortNameA:p(r.symbol),fileA:r.file,symbolB:t.symbol,shortNameB:p(t.symbol),fileB:t.file,similarity:c,similarityBasis:"source-tokens",sharedCallees:[...o].sort(),uniqueToA:[...y(r.tokens,t.tokens)].sort(),uniqueToB:[...y(t.tokens,r.tokens)].sort()})}return l.sort((t,o)=>o.similarity-t.similarity||t.shortNameB.localeCompare(o.shortNameB)),l.slice(0,i.limit)}function J(e,n){let i=A(e,n);if(!i||!R(i.symbol))return null;let r=Q(e,i);return r?{symbol:i.symbol,file:i.relativePath,tokens:r}:null}function Q(e,n){let i=M(n.symbol),r=v(e,n.relativePath,n.startLine,n.endLine,i),s=j(r,i);return s.size>0?s:null}var X=w("source-fingerprint-corpus",{clearGroups:["whole-project","definition-catalog"]});function Y(e){return X.get(e,()=>ee(e))}function ee(e){return new F(e).productionCallableDefinitions().map(i=>({symbol:i.symbol,file:i.relativePath,tokens:j(v(e,i.relativePath,i.startLine,i.endLine,i.leaf),i.leaf)})).filter(i=>i.tokens.size>0)}function v(e,n,i,r,s){let l=z(e,n);if(!l)return"";let t=l.split(`
2
+ `);if(r>=i&&r-i<=12)return t.slice(i,r+1).join(`
3
+ `);let o=[new RegExp(`\\bdef\\s+${d(s)}\\b`),new RegExp(`\\bfun\\s+${d(s)}\\b`),new RegExp(`\\bfn\\s+${d(s)}\\b`),new RegExp(`\\bfunction\\s+${d(s)}\\b`),new RegExp(`\\b${d(s)}\\s*\\(`)],a=t.findIndex(c=>o.some(m=>m.test(c)));if(a>=0){let c=a;for(let m=a+1;m<t.length&&m<=a+8;m++){let h=t[m]??"";if(m>a&&te(h)||(c=m,h.trim()===""&&m>a+1))break}return t.slice(a,c+1).join(`
4
+ `)}return t.slice(i,Math.min(t.length,i+8)).join(`
5
+ `)}function j(e,n){if(!e)return new Set;let i=new Set(["public","private","protected","final","static","class","def","fun","fn","function","return","string","bool","boolean","void","unit","self","this","new","const","let","var","end","pub"]),r=ie(n),l=e.replace(/["'`]/g," ").replace(/\b\d+\b/g," NUM ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[^A-Za-z0-9_]+/g," ").replace(/_/g," ").toLowerCase().split(/\s+/).map(t=>t.trim()).filter(t=>t.length>1).filter(t=>!i.has(t)).filter(t=>!r.has(t));return new Set(l)}function ie(e){return new Set(e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[^A-Za-z0-9_]+|_/).map(n=>n.toLowerCase()).filter(n=>n.length>1))}function te(e){return/^\s*(?:def|fun|fn|function|class|trait|module|object|enum|interface|public|private|protected)\b/.test(e)}function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{ue as a,be as b,I as c,T as d};
6
+ //# sourceMappingURL=chunk-OAI5GEIN.js.map
@@ -0,0 +1,4 @@
1
+ import{b as F,c as k,d as R}from"./chunk-ISCKLDSS.js";import{c as w,e as b}from"./chunk-VDZL45XI.js";import{existsSync as X,readFileSync as $}from"fs";import{join as Z}from"path";var ee=w("source-text",{clearGroups:["whole-project","source-file"]});function g(e,t){let r=t.replace(/\\/g,"/");return ee.get(e,r,()=>{let n=Z(e.config.projectRoot,r);return X(n)?$(n,"utf-8"):""})}var te=/scip-query[\s:-]*ignore[\s:-]*(?:dead(?:-code)?|stale|wrapper|passthrough|drift|extract)?/i;function Qe(e,t,r){if(r<=0)return!1;let n=g(e,t);if(!n)return!1;let s=n.split(`
2
+ `);for(let a=r-1;a>=0&&a>=r-5;a-=1){let i=(s[a]??"").trim();if(i!==""){if(te.test(i))return!0;if(!i.startsWith("//")&&!i.startsWith("*")&&!i.startsWith("/*")&&!i.startsWith("@")&&!i.startsWith("#"))return!1}}return!1}import{extname as T}from"path";var re={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb"};function h(e){return re[T(e).toLowerCase()]??null}function C(e){return T(e).toLowerCase()===".vue"}import{createRequire as ne}from"module";var f=ne(import.meta.url),x=null,j=!1;function se(){if(j)return null;if(x)return x;try{return x=f("tree-sitter"),x}catch{return j=!0,null}}var E=new Map,N=new Set;function ae(e){if(N.has(e))return null;let t=E.get(e);if(t)return t;let r;try{switch(e){case"rust":r=f("tree-sitter-rust");break;case"typescript":r=f("tree-sitter-typescript").typescript;break;case"tsx":r=f("tree-sitter-typescript").tsx;break;case"javascript":r=f("tree-sitter-javascript");break;case"python":r=f("tree-sitter-python");break;case"java":r=f("tree-sitter-java");break;case"kotlin":r=f("tree-sitter-kotlin");break;case"scala":r=f("tree-sitter-scala");break;case"ruby":r=f("tree-sitter-ruby");break;case"c":r=f("tree-sitter-c");break;case"cpp":r=f("tree-sitter-cpp");break;case"csharp":r=f("tree-sitter-c-sharp");break;case"php":r=f("tree-sitter-php").php;break;case"vb":{let n=f("tree-sitter-vb-dotnet");r=n.language??n;break}}}catch{return N.add(e),null}return E.set(e,r),r}var D=new Map;function ie(e){let t=D.get(e);if(t)return t;let r=ae(e);if(!r)return null;let n=se();if(!n)return null;let s=new n;try{s.setLanguage(r)}catch{return N.add(e),null}return D.set(e,s),s}function oe(e,t){return e.parse(n=>n>=t.length?null:t.slice(n,Math.min(t.length,n+16384)))}function L(e,t){let r=ie(e);if(!r)return null;try{return oe(r,t)}catch{return null}}function I(e){let t=[],r=/<script\b([^>]*)>([\s\S]*?)<\/script>/g;for(let o of e.matchAll(r))typeof o.index=="number"&&t.push({tagOpen:o[1]??"",body:o[2]??"",openIdx:o.index+(o[0].length-(o[2]?.length??0)-9)});if(t.length===0)return null;let n=t.find(o=>/\bsetup\b/.test(o.tagOpen))??t[0],a=n.tagOpen.match(/\blang\s*=\s*["']?([\w-]+)/)?.[1]?.toLowerCase(),i=a==="ts"||a==="typescript"?"typescript":a==="tsx"?"tsx":"javascript";return{body:n.body,startLine:ce(e,n.openIdx),language:i}}function ce(e,t){let r=0;for(let n=0;n<t&&n<e.length;n++)e.charCodeAt(n)===10&&r++;return r}var M=b("ast-trees",{clearGroups:["whole-project","source-file"]});function _(e,t){if(C(t))return ue(e,t);let r=h(t);if(!r)return null;let n=g(e,t);return n?M.get(e,t,n,()=>L(r,n)):null}function ue(e,t){let r=g(e,t);return r?M.get(e,t,r,()=>{let n=I(r);if(!n)return null;let s=`
3
+ `.repeat(n.startLine)+n.body;return L(n.language,s)}):null}function S(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var le=new Set(["function_declaration","method_definition","method_signature","function_signature"]);function H(e,t){let r=fe(e,t);if(r)return{name:r.name,startLine:r.definitionNode.startPosition.row,endLine:r.definitionNode.endPosition.row,paramCount:O(r.functionNode),params:v(r.functionNode),paramsEndLine:P(r.functionNode),isLiteralPassthrough:B(r.functionNode,t)};if(!pe(e.type,t))return null;let n=e.childForFieldName("name")??e.namedChildren.find(s=>s.type==="identifier"||s.type==="property_identifier");return n?{name:n.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:O(e),params:v(e),paramsEndLine:P(e),isLiteralPassthrough:B(e,t)}:null}function Q(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function v(e){let t=Q(e);if(!t)return[];let r=[];for(let n of t.namedChildren){if(S(n))continue;if(n.type==="identifier"){r.push({name:n.text,simple:!0});continue}let s=n.namedChildren.some(o=>o.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(n.text),a=n.childForFieldName("pattern");if(!s&&a&&a.type==="identifier"){r.push({name:a.text,simple:!0});continue}let i=n.namedChildren.find(o=>o.type==="identifier");r.push({name:a?.type==="identifier"?a.text:i?.text??"",simple:!1})}return r}function P(e){let t=Q(e);return t?t.endPosition.row:e.startPosition.row}function pe(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?le.has(e):!1}function fe(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let r=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1);return!r||!n||n.type!=="arrow_function"&&n.type!=="function_expression"?null:{name:r.text,definitionNode:e,functionNode:n}}if(e.type==="public_field_definition"){let r=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1);return!r||!n||n.type!=="arrow_function"&&n.type!=="function_expression"?null:{name:r.text,definitionNode:e,functionNode:n}}return null}function O(e){let t=e.namedChildren.find(n=>n.type==="parameters"||n.type==="formal_parameters");if(!t)return 0;let r=0;for(let n of t.namedChildren)S(n)||(r+=1);return r}function B(e,t){let r=e.namedChildren.find(l=>l.type==="block"||l.type==="statement_block");if(!r)return!1;let n=r.namedChildren.filter(l=>!S(l));if(n.length!==1)return!1;let s=n[0],a=null;if(s.type==="return_statement"||s.type==="expression_statement"?a=s.namedChild(0)??null:t==="rust"&&(s.type==="call_expression"||s.type==="macro_invocation")&&(a=s),!a)return!1;let i=t==="python"?"call":"call_expression";if(a.type!==i)return!1;let o=a.namedChildren.find(l=>l.type==="arguments"||l.type==="argument_list");if(!o)return!1;let u=o.namedChildren.filter(l=>!S(l)),c=e.namedChildren.find(l=>l.type==="parameters"||l.type==="formal_parameters");if(!c)return!1;let p=[];for(let l of c.namedChildren){if(l.type==="identifier"){p.push(l.text);continue}let d=l.namedChildren.find(J=>J.type==="identifier");d&&p.push(d.text)}if(u.length!==p.length)return!1;for(let l=0;l<p.length;l+=1){let d=u[l];if(d.type!=="identifier"||d.text!==p[l])return!1}return!0}function z(e,t){let r=me(e,t);if(!r)return null;let n=y(r);return n?{calleeLeaf:n,memberAccess:de(r),line:e.startPosition.row}:null}function me(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return e.childForFieldName("function")??e.namedChild(0);if(e.type==="new_expression")return e.childForFieldName("constructor")??e.namedChild(0)}return null}function de(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function y(e){switch(e.type){case"identifier":case"type_identifier":case"property_identifier":case"shorthand_property_identifier":return e.text;case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?y(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?y(t):null}case"super":case"self":case"this":return null;default:return null}}var ge=new Set(["identifier","type_identifier","field_identifier"]),ye=new Set(["identifier"]),he=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),Se=new Set(["rust","python"]),be=/\{([^{}]*)\}/g,xe=/\b([A-Za-z_][\w]*)\b/g;function V(e,t){return Ce(t).has(e.type)}function G(e,t){return Se.has(t)&&e.type==="string_content"}function A(e){let t=0;for(let n of e.values()){let s=n[n.length-1];s!==void 0&&s>t&&(t=s)}let r=new Array(t+1);for(let n=0;n<=t;n+=1)r[n]=new Set;for(let[n,s]of e)for(let a of s)r[a].add(n);return r}function Ce(e){return e==="rust"?ge:e==="python"?ye:he}function U(e,t){let r=e.startPosition.row;for(let n of e.text.matchAll(be)){let s=n[1]??"";for(let a of s.matchAll(xe))a[1]&&t(a[1],r)}}var Ne=[/\bdefault\s*=\s*"([^"]+)"/g,/\bwith\s*=\s*"([^"]+)"/g,/\bserialize_with\s*=\s*"([^"]+)"/g,/\bdeserialize_with\s*=\s*"([^"]+)"/g,/\bskip_serializing_if\s*=\s*"([^"]+)"/g,/\bgetter\s*=\s*"([^"]+)"/g,/\brename_all_with\s*=\s*"([^"]+)"/g,/\bschema_with\s*=\s*"([^"]+)"/g],Le=/^#!?\[\s*serde\s*\(/,_e=/^#!?\[\s*schemars\s*\(/,Ae=/^#!?\[\s*validate\s*\(/,we=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function W(e,t,r){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let n=e.childForFieldName("function")??e.namedChild(0);if(!n)return;let s=y(n);if(!s||!we.has(s))return;let a=e.namedChildren.find(u=>u.type==="arguments");if(!a)return;let i=a.namedChild(0);if(!i||i.type!=="string")return;let o=i.namedChildren.find(u=>u.type==="string_fragment");o&&r.add(o.text)}function Y(e,t){let r=Le.test(e),n=_e.test(e),s=Ae.test(e);if(!(!r&&!n&&!s))for(let a of Ne){a.lastIndex=0;let i;for(;(i=a.exec(e))!==null;){let o=i[1],u=o.split("::").pop()??o;u==="is_none"&&/\bOption\b/.test(o)||u==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(o)||u&&t.add(u)}}}function K(e,t){let r=new Map,n=(i,o)=>{if(i===o)return;let u=r.get(i);u||(u=new Set,r.set(i,u)),u.add(o)},s=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),a=(i,o)=>{let u=c=>{s.has(c.type)&&c.text!==o&&n(c.text,o);for(let p of c.children)u(p)};for(let c of i.children)u(c)};if(t==="rust")for(let i of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let o=i.namedChildren.find(c=>c.type==="type_identifier")?.text;if(!o)continue;let u=i.namedChildren.find(c=>c.type==="field_declaration_list"||c.type==="enum_variant_list"||c.type==="ordered_field_declaration_list");u&&a(u,o),i.type==="type_item"&&a(i,o)}else if(t==="python")for(let i of e.rootNode.descendantsOfType("class_definition")){let o=i.namedChildren.find(c=>c.type==="identifier")?.text;if(!o)continue;let u=i.namedChildren.find(c=>c.type==="block");if(u)for(let c of u.descendantsOfType("type"))for(let p of c.descendantsOfType("identifier"))p.text!==o&&n(p.text,o)}else for(let i of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let o=i.namedChildren.find(u=>u.type==="type_identifier")?.text;o&&a(i,o)}return r}var Fe=b("source-facts",{clearGroups:["whole-project","source-file"]});function m(e,t){let r=h(t);if(!r)return null;let n=g(e,t);return n?Fe.get(e,t,n,()=>ke(e,t,r,n)):null}function ke(e,t,r,n){let s=F(e,t,n),a=k(e,"source-facts",t,s);if(a){let u=Te(a);if(u&&u.language===r)return u}let i=_(e,t);if(!i)return null;let o=De(i,r);return R(e,"source-facts",t,s,Re(o)),o}function Re(e){let t={language:e.language,callables:e.callables,callSites:e.callSites,typeContainerMap:[...e.typeContainerMap.entries()].map(([r,n])=>[r,[...n]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function Te(e){try{let t=JSON.parse(e),r=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,typeContainerMap:new Map(t.typeContainerMap.map(([n,s])=>[n,new Set(s)])),identifierLineMap:r,identifiersByLine:A(r),fileIdentifiers:new Set(r.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function je(e,t,r,n){let s=m(e,t);return s?Ee(s,r,n)?.isLiteralPassthrough??!0:!0}function Ee(e,t,r){return e.callables.find(n=>n.startLine===t&&n.endLine===r)??null}function De(e,t){let r=[],n=[],s=new Set,a=new Set,i=new Map,o=(c,p)=>{let l=i.get(c);if(!l){i.set(c,[p]);return}l[l.length-1]!==p&&l.push(p)},u=c=>{let p=H(c,t);p&&r.push(p);let l=z(c,t);l&&n.push(l),W(c,t,a),t==="rust"&&(c.type==="attribute_item"||c.type==="inner_attribute_item")&&Y(c.text,s),V(c,t)&&o(c.text,c.startPosition.row),G(c,t)&&U(c,o);for(let d of c.children)u(d)};return u(e.rootNode),{language:t,callables:r,callSites:n,typeContainerMap:K(e,t),identifierLineMap:i,identifiersByLine:A(i),fileIdentifiers:new Set(i.keys()),rustAttrReferencedNames:s,crossLanguageDispatchNames:a}}var q=new Set(["rust","typescript","tsx","javascript","python"]);function Ie(e,t){let r=m(e,t);return!r||!q.has(r.language)?null:r.callables.map(n=>({name:n.name,startLine:n.startLine,endLine:n.endLine}))}function Me(e,t){let r=m(e,t);return!r||!q.has(r.language)?null:r.callSites}function ve(e,t){return m(e,t)?.typeContainerMap??new Map}function Pe(e,t,r={}){let n=m(e,t);if(!n)return[];let s=[];if(r.includeCrossLanguageDispatchNames)for(let a of n.crossLanguageDispatchNames)s.push({name:a,kind:"cross-language-dispatch",occurrences:1});if(r.includeRustAttributeNames&&n.language==="rust")for(let a of n.rustAttrReferencedNames)s.push({name:a,kind:"rust-attribute",occurrences:1});return s}export{g as a,Qe as b,h as c,C as d,_ as e,m as f,je as g,Ie as h,Me as i,ve as j,Pe as k};
4
+ //# sourceMappingURL=chunk-OH5HIAID.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-RIXOMSOR.js";function j(e,s={}){let{minSimilarity:t=.5,limit:n=15,scope:i,minChainLength:r=3,maxChainLength:l=8}=s,a=c(e,i),o=y(a,r,l);if(o.length===0)return[];let f=d(o);return f.length<2?[]:S(x(f,t,n),n)}function d(e){let s=m(e),t=[];for(let n of e){let i=n.filter(r=>!s.has(r));i.length>=2&&t.push({original:n,filtered:i})}return t}function m(e){let{nodeFreq:s,tailFreq:t}=p(e),n=e.length*.9,i=e.length*.8,r=new Set;for(let[a,o]of s)o>n&&r.add(a);for(let[a,o]of t)o>i&&r.add(a);let l=["index.ts","index.js","cli.ts","main.ts","health.ts","health.js"];for(let a of s.keys()){let o=a.split("/").pop()??"";l.includes(o)&&r.add(a)}return r}function p(e){let s=new Map,t=new Map;for(let n of e){let i=new Set;for(let r of n)i.has(r)||(s.set(r,(s.get(r)??0)+1),i.add(r));for(let r=Math.max(0,n.length-2);r<n.length;r++)t.set(n[r],(t.get(n[r])??0)+1)}return{nodeFreq:s,tailFreq:t}}function x(e,s,t){let n=[];for(let i=0;i<e.length;i++){for(let r=i+1;r<e.length;r++){let l=b(e[i],e[r],s);l&&n.push(l)}if(n.length>t*10)break}return n.sort((i,r)=>Math.abs(r.similarity-i.similarity)>.01?r.similarity-i.similarity:i.divergencePoints.length-r.divergencePoints.length),n}function b(e,s,t){if(!C(e.filtered,s.filtered))return null;let{distance:n,ops:i}=A(e.filtered,s.filtered),r=Math.max(e.filtered.length,s.filtered.length);if(r===0)return null;let l=1-n/r;if(l<t||n===0)return null;let a=i.filter(f=>f.type==="substitute").map(f=>({index:f.indexA,nodeA:e.filtered[f.indexA],nodeB:s.filtered[f.indexB]}));return a.length===0||i.filter(f=>f.type==="match").length<2?null:{chainA:e.original,chainB:s.original,similarity:l,editDistance:n,divergencePoints:a,commonPrefix:F(e.original,s.original),commonSuffix:B(e.original,s.original)}}function C(e,s){let t=new Set(e);return s.some(n=>t.has(n))}function S(e,s){let t=[];for(let n of e)if(t.some(r=>h(n.chainA,r.chainA)&&h(n.chainB,r.chainB))||t.push(n),t.length>=s)break;return t}function y(e,s,t){let n=[];for(let r of e.keys()){if(n.length>=500)break;g(e,r,[r],new Set([r]),s,t,n,500)}return n}function g(e,s,t,n,i,r,l,a){if(l.length>=a)return;if(t.length>=r){t.length>=i&&l.push([...t]);return}let o=e.get(s);if(!o||o.size===0){t.length>=i&&l.push([...t]);return}let f=!1;for(let u of o)if(!n.has(u)&&(n.add(u),t.push(u),g(e,u,t,n,i,r,l,a),t.pop(),n.delete(u),f=!0,l.length>=a))return;!f&&t.length>=i&&l.push([...t])}function A(e,s){let t=e.length,n=s.length,i=Array.from({length:t+1},()=>Array(n+1).fill(0));for(let o=0;o<=t;o++)i[o][0]=o;for(let o=0;o<=n;o++)i[0][o]=o;for(let o=1;o<=t;o++)for(let f=1;f<=n;f++)e[o-1]===s[f-1]?i[o][f]=i[o-1][f-1]:i[o][f]=1+Math.min(i[o-1][f],i[o][f-1],i[o-1][f-1]);let r=[],l=t,a=n;for(;l>0||a>0;)l>0&&a>0&&e[l-1]===s[a-1]?(r.unshift({type:"match",indexA:l-1,indexB:a-1}),l--,a--):l>0&&a>0&&i[l][a]===i[l-1][a-1]+1?(r.unshift({type:"substitute",indexA:l-1,indexB:a-1}),l--,a--):a>0&&i[l][a]===i[l][a-1]+1?(r.unshift({type:"insert",indexA:l,indexB:a-1}),a--):(r.unshift({type:"delete",indexA:l-1,indexB:a}),l--);return{distance:i[t][n],ops:r}}function F(e,s){let t=[];for(let n=0;n<Math.min(e.length,s.length)&&e[n]===s[n];n++)t.push(e[n]);return t}function B(e,s){let t=[],n=e.length-1,i=s.length-1;for(;n>=0&&i>=0&&e[n]===s[i];)t.unshift(e[n]),n--,i--;return t}function h(e,s){if(e.length>s.length)return!1;let t=s.join("\u2192"),n=e.join("\u2192");return t.includes(n)}export{j as a};
2
- //# sourceMappingURL=chunk-NGLRXEWN.js.map
1
+ import{a as c}from"./chunk-IVAIPXNO.js";function j(e,s={}){let{minSimilarity:t=.5,limit:n=15,scope:i,minChainLength:r=3,maxChainLength:l=8}=s,a=c(e,i),o=y(a,r,l);if(o.length===0)return[];let f=d(o);return f.length<2?[]:S(x(f,t,n),n)}function d(e){let s=m(e),t=[];for(let n of e){let i=n.filter(r=>!s.has(r));i.length>=2&&t.push({original:n,filtered:i})}return t}function m(e){let{nodeFreq:s,tailFreq:t}=p(e),n=e.length*.9,i=e.length*.8,r=new Set;for(let[a,o]of s)o>n&&r.add(a);for(let[a,o]of t)o>i&&r.add(a);let l=["index.ts","index.js","cli.ts","main.ts","health.ts","health.js"];for(let a of s.keys()){let o=a.split("/").pop()??"";l.includes(o)&&r.add(a)}return r}function p(e){let s=new Map,t=new Map;for(let n of e){let i=new Set;for(let r of n)i.has(r)||(s.set(r,(s.get(r)??0)+1),i.add(r));for(let r=Math.max(0,n.length-2);r<n.length;r++)t.set(n[r],(t.get(n[r])??0)+1)}return{nodeFreq:s,tailFreq:t}}function x(e,s,t){let n=[];for(let i=0;i<e.length;i++){for(let r=i+1;r<e.length;r++){let l=b(e[i],e[r],s);l&&n.push(l)}if(n.length>t*10)break}return n.sort((i,r)=>Math.abs(r.similarity-i.similarity)>.01?r.similarity-i.similarity:i.divergencePoints.length-r.divergencePoints.length),n}function b(e,s,t){if(!C(e.filtered,s.filtered))return null;let{distance:n,ops:i}=A(e.filtered,s.filtered),r=Math.max(e.filtered.length,s.filtered.length);if(r===0)return null;let l=1-n/r;if(l<t||n===0)return null;let a=i.filter(f=>f.type==="substitute").map(f=>({index:f.indexA,nodeA:e.filtered[f.indexA],nodeB:s.filtered[f.indexB]}));return a.length===0||i.filter(f=>f.type==="match").length<2?null:{chainA:e.original,chainB:s.original,similarity:l,editDistance:n,divergencePoints:a,commonPrefix:F(e.original,s.original),commonSuffix:B(e.original,s.original)}}function C(e,s){let t=new Set(e);return s.some(n=>t.has(n))}function S(e,s){let t=[];for(let n of e)if(t.some(r=>h(n.chainA,r.chainA)&&h(n.chainB,r.chainB))||t.push(n),t.length>=s)break;return t}function y(e,s,t){let n=[];for(let r of e.keys()){if(n.length>=500)break;g(e,r,[r],new Set([r]),s,t,n,500)}return n}function g(e,s,t,n,i,r,l,a){if(l.length>=a)return;if(t.length>=r){t.length>=i&&l.push([...t]);return}let o=e.get(s);if(!o||o.size===0){t.length>=i&&l.push([...t]);return}let f=!1;for(let u of o)if(!n.has(u)&&(n.add(u),t.push(u),g(e,u,t,n,i,r,l,a),t.pop(),n.delete(u),f=!0,l.length>=a))return;!f&&t.length>=i&&l.push([...t])}function A(e,s){let t=e.length,n=s.length,i=Array.from({length:t+1},()=>Array(n+1).fill(0));for(let o=0;o<=t;o++)i[o][0]=o;for(let o=0;o<=n;o++)i[0][o]=o;for(let o=1;o<=t;o++)for(let f=1;f<=n;f++)e[o-1]===s[f-1]?i[o][f]=i[o-1][f-1]:i[o][f]=1+Math.min(i[o-1][f],i[o][f-1],i[o-1][f-1]);let r=[],l=t,a=n;for(;l>0||a>0;)l>0&&a>0&&e[l-1]===s[a-1]?(r.unshift({type:"match",indexA:l-1,indexB:a-1}),l--,a--):l>0&&a>0&&i[l][a]===i[l-1][a-1]+1?(r.unshift({type:"substitute",indexA:l-1,indexB:a-1}),l--,a--):a>0&&i[l][a]===i[l][a-1]+1?(r.unshift({type:"insert",indexA:l,indexB:a-1}),a--):(r.unshift({type:"delete",indexA:l-1,indexB:a}),l--);return{distance:i[t][n],ops:r}}function F(e,s){let t=[];for(let n=0;n<Math.min(e.length,s.length)&&e[n]===s[n];n++)t.push(e[n]);return t}function B(e,s){let t=[],n=e.length-1,i=s.length-1;for(;n>=0&&i>=0&&e[n]===s[i];)t.unshift(e[n]),n--,i--;return t}function h(e,s){if(e.length>s.length)return!1;let t=s.join("\u2192"),n=e.join("\u2192");return t.includes(n)}export{j as a};
2
+ //# sourceMappingURL=chunk-OLCKSG3Y.js.map
@@ -1,2 +1,2 @@
1
- import{c as p}from"./chunk-PBGTMPJ7.js";import{a as i}from"./chunk-WQFOZIID.js";import{d as a}from"./chunk-VDZL45XI.js";var g=/scip-query[\s:-]*ignore[\s:-]*(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar)?/gi,y=a("suppression-inventory",{clearGroups:["whole-project"]});function b(e){return y.get(e,()=>d(e))}function d(e){let r={dead:0,stale:0,wrapper:0,passthrough:0,drift:0,extract:0,similar:0,uncategorized:0},t=new Map,n=0;for(let o of p(e)){let s=i(e,o);if(!(!s||!s.includes("scip-query")))for(let c of s.matchAll(g)){n+=1,t.set(o,(t.get(o)??0)+1);let u=l(c[1]);r[u]+=1}}return{total:n,byCategory:r,byFile:t}}function l(e){if(!e)return"uncategorized";let r=e.toLowerCase();return r==="dead-code"?"dead":r}export{b as a};
2
- //# sourceMappingURL=chunk-JTCEWV7Q.js.map
1
+ import{c as p}from"./chunk-PBGTMPJ7.js";import{a as i}from"./chunk-OH5HIAID.js";import{d as a}from"./chunk-VDZL45XI.js";var g=/scip-query[\s:-]*ignore[\s:-]*(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar)?/gi,y=a("suppression-inventory",{clearGroups:["whole-project"]});function b(e){return y.get(e,()=>d(e))}function d(e){let r={dead:0,stale:0,wrapper:0,passthrough:0,drift:0,extract:0,similar:0,uncategorized:0},t=new Map,n=0;for(let o of p(e)){let s=i(e,o);if(!(!s||!s.includes("scip-query")))for(let c of s.matchAll(g)){n+=1,t.set(o,(t.get(o)??0)+1);let u=l(c[1]);r[u]+=1}}return{total:n,byCategory:r,byFile:t}}function l(e){if(!e)return"uncategorized";let r=e.toLowerCase();return r==="dead-code"?"dead":r}export{b as a};
2
+ //# sourceMappingURL=chunk-OXKEUWMJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-NO2TPMCQ.js";import{a as h}from"./chunk-PCMVXWDC.js";import{o as S}from"./chunk-6ZFKI5EP.js";import{a as d,b}from"./chunk-7I6KNKE3.js";import{c as m,v as y}from"./chunk-SOGLYIJ4.js";function v(e,o,l={}){let{direction:c="backward",maxDepth:s=3}=l,r=d(e,o);return r?c==="backward"?w(e,r,s,{semantic:l.semantic!==!1}):M(e,r,{semantic:l.semantic!==!1}):null}function w(e,o,l,c){let s=[],r=new Set([o.symbol]),t=[o];for(let n=1;n<=l&&t.length!==0;n++){let i=[];for(let p of t){let g=h(e,p,{semantic:c.semantic});for(let a of g){if(r.has(a.symbol))continue;r.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function M(e,o,l){let c=new Set,s=[],r=new u(e);for(let t of S(e,o,{semantic:l.semantic})){if(s.length>=30)break;let n=t.enclosingSymbol??y(r.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{v as a};
2
- //# sourceMappingURL=chunk-LBAMALDV.js.map
1
+ import{a as u}from"./chunk-IW7ASGVF.js";import{a as h}from"./chunk-5QJIEYFB.js";import{o as S}from"./chunk-VGBSY6N7.js";import{a as d,b}from"./chunk-4MHT7LKP.js";import{c as m,v as y}from"./chunk-O6KCZPJQ.js";function v(e,o,l={}){let{direction:c="backward",maxDepth:s=3}=l,r=d(e,o);return r?c==="backward"?w(e,r,s,{semantic:l.semantic!==!1}):M(e,r,{semantic:l.semantic!==!1}):null}function w(e,o,l,c){let s=[],r=new Set([o.symbol]),t=[o];for(let n=1;n<=l&&t.length!==0;n++){let i=[];for(let p of t){let g=h(e,p,{semantic:c.semantic});for(let a of g){if(r.has(a.symbol))continue;r.add(a.symbol),s.push({symbol:a.symbol,shortName:m(a.symbol),file:a.file,relationship:n===1?"referenced within definition (callee)":`depth ${n} callee`});let f=b(e,a.symbol);f&&!e.isIgnored(f.relativePath)&&i.push(f)}}t=i}return{symbol:o.symbol,shortName:m(o.symbol),direction:"backward",connectedSymbols:s}}function M(e,o,l){let c=new Set,s=[],r=new u(e);for(let t of S(e,o,{semantic:l.semantic})){if(s.length>=30)break;let n=t.enclosingSymbol??y(r.definitionsForFile(t.file),t.line)?.symbol??null;if(!n||n===o.symbol)continue;let i=b(e,n);!i||e.isIgnored(i.relativePath)||c.has(i.symbol)||(c.add(i.symbol),s.push({symbol:i.symbol,shortName:m(i.symbol),file:i.relativePath,relationship:`references target at ${t.file}:${t.line+1}`}))}return s.sort((t,n)=>t.file.localeCompare(n.file)),{symbol:o.symbol,shortName:m(o.symbol),direction:"forward",connectedSymbols:s}}export{v as a};
2
+ //# sourceMappingURL=chunk-PRVDXGSK.js.map
@@ -1,4 +1,4 @@
1
- import{a as t}from"./chunk-WC43FMAB.js";function r(e,n,o){let d=t(e,n)??n,s=t(e,o)??o,m=e.get(`SELECT COUNT(DISTINCT gs.id) AS shared
1
+ import{a as t}from"./chunk-ZOT3WUZW.js";function r(e,n,o){let d=t(e,n)??n,s=t(e,o)??o,m=e.get(`SELECT COUNT(DISTINCT gs.id) AS shared
2
2
  FROM global_symbols gs
3
3
  WHERE (
4
4
  -- Defined in file1, referenced in file2
@@ -53,4 +53,4 @@ import{a as t}from"./chunk-WC43FMAB.js";function r(e,n,o){let d=t(e,n)??n,s=t(e,
53
53
  GROUP BY def_d.id, ref_d.id
54
54
  ORDER BY shared DESC
55
55
  LIMIT ?`,o).filter(i=>!e.isIgnored(i.file1)&&!e.isIgnored(i.file2)).map(i=>({file1:i.file1,file2:i.file2,sharedSymbols:i.shared}))}export{r as a,c as b};
56
- //# sourceMappingURL=chunk-46ILZVMX.js.map
56
+ //# sourceMappingURL=chunk-QJWN6LA5.js.map
@@ -1,2 +1,2 @@
1
- import{d as m}from"./chunk-MX6F756F.js";import{a as b}from"./chunk-EAU4RDFG.js";import{a as g}from"./chunk-PCMVXWDC.js";import{o as y}from"./chunk-6ZFKI5EP.js";import{a as c}from"./chunk-7I6KNKE3.js";import{c as r}from"./chunk-SOGLYIJ4.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-BCFED24F.js.map
1
+ import{d as m}from"./chunk-MX6F756F.js";import{a as b}from"./chunk-VDZIEDJB.js";import{a as g}from"./chunk-5QJIEYFB.js";import{o as y}from"./chunk-VGBSY6N7.js";import{a as c}from"./chunk-4MHT7LKP.js";import{c as r}from"./chunk-O6KCZPJQ.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-QKO474FG.js.map
@@ -1,6 +1,6 @@
1
- import{a as b}from"./chunk-RIXOMSOR.js";import{c as p}from"./chunk-PBGTMPJ7.js";import{f as g}from"./chunk-WQFOZIID.js";import{d as u}from"./chunk-VDZL45XI.js";import{readFileSync as j}from"fs";import{join as m}from"path";var k={files:new Set,pathPrefixes:[]},l=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,y=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,P=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],w=u("package-surface",{clearGroups:["whole-project"]});function E(t){return w.get(t,()=>v(t.config.projectRoot))}function S(t,r){let e=E(t);return e.files.has(r)?!0:e.pathPrefixes.some(s=>r.startsWith(s))}function v(t){let r=D(t);if(!r)return k;let e=new Set,s=[];for(let i of $(r))R(i,e,s);return{files:e,pathPrefixes:s}}function D(t){try{let r=j(m(t,"package.json"),"utf-8"),e=JSON.parse(r);return e&&typeof e=="object"?e:null}catch{return null}}function $(t){let r=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&r.push(t[s]);let e=t.bin;if(typeof e=="string")r.push(e);else if(e&&typeof e=="object")for(let s of Object.values(e))typeof s=="string"&&r.push(s);return x(t.exports,r),r}function x(t,r){if(typeof t=="string"){r.push(t);return}if(!(!t||typeof t!="object"))for(let e of Object.values(t))x(e,r)}function R(t,r,e){let s=t.replace(/\\/g,"/").replace(/^\.\//,"");if(s===""||s.startsWith(".."))return;let i=s.indexOf("*");if(i>=0){let o=s.slice(0,i);for(let a of h(o))a!==""&&e.push(a);return}let n=s.replace(y,"");for(let o of h(n)){o===n&&o===s&&r.add(s);for(let a of P)r.add(o+a)}r.add(s)}function h(t){let r=[t];return l.test(t)&&(r.push(t.replace(l,"src/")),r.push(t.replace(l,""))),r}function f(t){let r=c(t);return W(r)?"test":B(r)?"worker":A(r)?"entry":I(r)?"barrel":"source"}function T(t){return f(t)==="barrel"}function _(t){return F.get(t,()=>{let r=b(t),e=p(t).filter(n=>{let o=f(n);return o==="entry"||o==="worker"}),s=new Set,i=new Set;for(;e.length>0;){let n=e.shift();if(!s.has(n)){s.add(n),f(n)==="barrel"&&i.add(n);for(let o of r.get(n)??[])s.has(o)||e.push(o)}}return i})}var F=u("live-barrels",{clearGroups:["whole-project"]});function N(t,r){return _(t).has(c(r))}function Q(t){let r=_(t);return p(t).filter(e=>T(e)&&!r.has(e)&&!O(t,e))}function O(t,r){let e=c(r),s=g(t,e)?.callables;return s&&s.length>0?!0:(t.get(`SELECT COUNT(*) AS n
1
+ import{a as b}from"./chunk-IVAIPXNO.js";import{c as p}from"./chunk-PBGTMPJ7.js";import{f as g}from"./chunk-OH5HIAID.js";import{d as u}from"./chunk-VDZL45XI.js";import{readFileSync as j}from"fs";import{join as m}from"path";var k={files:new Set,pathPrefixes:[]},l=/^(?:dist|build|lib|out|output|esm|cjs|umd)\//,y=/\.(?:d\.ts|d\.mts|d\.cts|ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,P=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"],w=u("package-surface",{clearGroups:["whole-project"]});function E(t){return w.get(t,()=>v(t.config.projectRoot))}function S(t,r){let e=E(t);return e.files.has(r)?!0:e.pathPrefixes.some(s=>r.startsWith(s))}function v(t){let r=D(t);if(!r)return k;let e=new Set,s=[];for(let i of $(r))R(i,e,s);return{files:e,pathPrefixes:s}}function D(t){try{let r=j(m(t,"package.json"),"utf-8"),e=JSON.parse(r);return e&&typeof e=="object"?e:null}catch{return null}}function $(t){let r=[];for(let s of["main","module","types","browser"])typeof t[s]=="string"&&r.push(t[s]);let e=t.bin;if(typeof e=="string")r.push(e);else if(e&&typeof e=="object")for(let s of Object.values(e))typeof s=="string"&&r.push(s);return x(t.exports,r),r}function x(t,r){if(typeof t=="string"){r.push(t);return}if(!(!t||typeof t!="object"))for(let e of Object.values(t))x(e,r)}function R(t,r,e){let s=t.replace(/\\/g,"/").replace(/^\.\//,"");if(s===""||s.startsWith(".."))return;let i=s.indexOf("*");if(i>=0){let o=s.slice(0,i);for(let a of h(o))a!==""&&e.push(a);return}let n=s.replace(y,"");for(let o of h(n)){o===n&&o===s&&r.add(s);for(let a of P)r.add(o+a)}r.add(s)}function h(t){let r=[t];return l.test(t)&&(r.push(t.replace(l,"src/")),r.push(t.replace(l,""))),r}function f(t){let r=c(t);return W(r)?"test":B(r)?"worker":A(r)?"entry":I(r)?"barrel":"source"}function T(t){return f(t)==="barrel"}function _(t){return F.get(t,()=>{let r=b(t),e=p(t).filter(n=>{let o=f(n);return o==="entry"||o==="worker"}),s=new Set,i=new Set;for(;e.length>0;){let n=e.shift();if(!s.has(n)){s.add(n),f(n)==="barrel"&&i.add(n);for(let o of r.get(n)??[])s.has(o)||e.push(o)}}return i})}var F=u("live-barrels",{clearGroups:["whole-project"]});function N(t,r){return _(t).has(c(r))}function Q(t){let r=_(t);return p(t).filter(e=>T(e)&&!r.has(e)&&!O(t,e))}function O(t,r){let e=c(r),s=g(t,e)?.callables;return s&&s.length>0?!0:(t.get(`SELECT COUNT(*) AS n
2
2
  FROM defn_enclosing_ranges der
3
3
  JOIN documents d ON d.id = der.document_id
4
4
  WHERE d.relative_path = ?
5
5
  AND der.end_line - der.start_line >= 2`,e)?.n??0)>0}function Y(t,r){let e=f(r);return e==="entry"||e==="worker"||N(t,r)}function Z(t,r,e){let s=c(e);if(S(t,s))return!0;let i=t.config.entryRoots;return i?!!(i.files?.some(n=>c(n)===s)||i.pathPrefixes?.some(n=>s.startsWith(c(n)))||i.qualifiedVars?.some(n=>C(r,n))||i.symbolPatterns?.some(n=>{try{return new RegExp(n).test(r)}catch{return!1}})):!1}function W(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 B(t){return/(?:^|\/)[^/]*worker\.(?:ts|tsx|js|mjs|cjs|rs|py|go)$/.test(t)}function A(t){let r=t.split("/"),e=r[r.length-1]??t;return e==="cli.ts"||e==="cli.js"||e==="postinstall.ts"||e==="postinstall.js"||e==="main.ts"||e==="main.js"||e==="main.rs"||e==="main.go"||e==="main.py"||e==="build.rs"||e==="lib.rs"||/\bsrc\/bin\/[^/]+\.rs$/.test(t)||/(?:^|\/)examples\/[^/]+\.rs$/.test(t)||/(?:^|\/)tests\/[^/]+\.rs$/.test(t)||/(?:^|\/)benches\/[^/]+\.rs$/.test(t)?!0:e==="index.ts"||e==="index.js"?/(?:^|\/)(?:apps|services)\/[^/]+\/src\/index\.(?:ts|js)$/.test(t)?!0:r.length<=2:!1}function I(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 c(t){return t.replace(/\\/g,"/")}function C(t,r){let e=r.lastIndexOf("/");if(e<0)return!1;let s=r.slice(0,e),i=r.slice(e+1);return t.includes(d(s)+"/")&&t.includes(d(i)+".")}function d(t){return/^[A-Za-z0-9_$+-]+$/.test(t)?t:"`"+t.replace(/`/g,"``")+"`"}export{f as a,T as b,N as c,Q as d,Y as e,Z as f};
6
- //# sourceMappingURL=chunk-TQTVM27C.js.map
6
+ //# sourceMappingURL=chunk-QYKKTYBN.js.map
@@ -1,4 +1,4 @@
1
- import{a as N}from"./chunk-EAU4RDFG.js";import{a as I,b as S}from"./chunk-7I6KNKE3.js";import{c as h,e as b,r as p,v as g}from"./chunk-SOGLYIJ4.js";function x(o,s,r={}){let{maxDepth:c=5,scope:a}=r,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let i=[];for(let y of t)for(let n of D(o,y,a)){let d=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(d))continue;m.add(d),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&i.push(n.symbolMatch)}t=i}return u.sort((e,i)=>e.depth-i.depth||e.file.localeCompare(i.file)),u}function D(o,s,r){let c=N(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!r||t.file.includes(r)),a=new Set(c.map(t=>t.file)),l=[];for(let t of M(o,s,r)){if(a.has(t))continue;let e=p(o,t),i=e.length>0?g(e,e[0].startLine):null;l.push({symbol:i?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=S(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:h(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!_(e.symbol))continue;let i=`${e.symbolId}|${e.relativePath}`;m.has(i)||(m.add(i),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function M(o,s,r){let c=r?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return r&&a.push(`%${r}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
1
+ import{a as N}from"./chunk-VDZIEDJB.js";import{a as I,b as S}from"./chunk-4MHT7LKP.js";import{c as h,e as b,r as p,v as g}from"./chunk-O6KCZPJQ.js";function x(o,s,r={}){let{maxDepth:c=5,scope:a}=r,l=I(o,s);if(!l)return[];let u=[],f=new Set([l.symbolId]),m=new Set,t=[l];for(let e=1;e<=c&&t.length!==0;e++){let i=[];for(let y of t)for(let n of D(o,y,a)){let d=`${n.file}|${n.shortName}`;if(n.symbolId!==null){if(f.has(n.symbolId))continue;f.add(n.symbolId)}else if(m.has(d))continue;m.add(d),u.push({symbol:n.symbol,shortName:n.shortName,file:n.file,depth:e}),n.symbolId!==null&&n.symbolMatch&&i.push(n.symbolMatch)}t=i}return u.sort((e,i)=>e.depth-i.depth||e.file.localeCompare(i.file)),u}function D(o,s,r){let c=N(o,s,{limit:500}).filter(t=>!o.isIgnored(t.file)).filter(t=>!r||t.file.includes(r)),a=new Set(c.map(t=>t.file)),l=[];for(let t of M(o,s,r)){if(a.has(t))continue;let e=p(o,t),i=e.length>0?g(e,e[0].startLine):null;l.push({symbol:i?.symbol??t,file:t})}let u=[...c,...l],f=[],m=new Set;for(let t of u){let e=S(o,t.symbol);if(!e){let y=`${t.file}|${t.symbol}`;if(m.has(y))continue;m.add(y),f.push({symbolId:null,symbol:t.symbol,shortName:h(t.symbol),file:t.file,symbolMatch:null});continue}if(e.symbolId===s.symbolId||o.isIgnored(e.relativePath)||!_(e.symbol))continue;let i=`${e.symbolId}|${e.relativePath}`;m.has(i)||(m.add(i),f.push({symbolId:e.symbolId,symbol:e.symbol,shortName:h(e.symbol),file:e.relativePath,symbolMatch:e}))}return f}function M(o,s,r){let c=r?"AND consumer_d.relative_path LIKE ?":"",a=[s.symbolId,s.documentId];return r&&a.push(`%${r}%`),new Set(o.all(`SELECT DISTINCT consumer_d.relative_path
2
2
  FROM mentions m
3
3
  JOIN chunks c ON m.chunk_id = c.id
4
4
  JOIN documents consumer_d ON consumer_d.id = c.document_id
@@ -7,4 +7,4 @@ import{a as N}from"./chunk-EAU4RDFG.js";import{a as I,b as S}from"./chunk-7I6KNK
7
7
  AND c.document_id != ?
8
8
  ${o.pathExclusionsFor("consumer_d")}
9
9
  ${c}`,...a).map(l=>l.relative_path).filter(l=>!o.isIgnored(l)))}function _(o){let s=b(o);return s==="method"||s==="type"||o.endsWith("().")}export{x as a};
10
- //# sourceMappingURL=chunk-UUDYI3FF.js.map
10
+ //# sourceMappingURL=chunk-R6XDPWJA.js.map
@@ -1,2 +1,2 @@
1
- import{d as i}from"./chunk-MX6F756F.js";import{a as m}from"./chunk-EAU4RDFG.js";import{a}from"./chunk-PCMVXWDC.js";import{a as r}from"./chunk-7I6KNKE3.js";import{c as o}from"./chunk-SOGLYIJ4.js";function S(s,n,c={}){let e=r(s,n);if(!e)return null;let t=c.semantic!==!1,y=m(s,e,{limit:50,semantic:t}),b=i(a(s,e,{limit:50,additive:!0,callableOnly:!0,semantic:t}));return{symbol:e.symbol,shortName:o(e.symbol),callers:y.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file})),callees:b.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file}))}}export{S as a};
2
- //# sourceMappingURL=chunk-D43L5PQF.js.map
1
+ import{d as i}from"./chunk-MX6F756F.js";import{a as m}from"./chunk-VDZIEDJB.js";import{a}from"./chunk-5QJIEYFB.js";import{a as r}from"./chunk-4MHT7LKP.js";import{c as o}from"./chunk-O6KCZPJQ.js";function S(s,n,c={}){let e=r(s,n);if(!e)return null;let t=c.semantic!==!1,y=m(s,e,{limit:50,semantic:t}),b=i(a(s,e,{limit:50,additive:!0,callableOnly:!0,semantic:t}));return{symbol:e.symbol,shortName:o(e.symbol),callers:y.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file})),callees:b.map(l=>({symbol:l.symbol,shortName:o(l.symbol),file:l.file}))}}export{S as a};
2
+ //# sourceMappingURL=chunk-SCEMECW7.js.map
@@ -1,2 +1,2 @@
1
- import{a as b}from"./chunk-V76FCF5F.js";import{a as g}from"./chunk-NO2TPMCQ.js";import{a as d}from"./chunk-6ZFKI5EP.js";import{c as p}from"./chunk-SOGLYIJ4.js";import{c as u,f as c}from"./chunk-WQFOZIID.js";function T(t,r={}){let{scope:l,limit:s=30,scanLimit:f}=r,o=r.files===void 0?null:new Set(r.files),L=new g(t);return b({candidates:()=>L.productionCallableDefinitions({scope:l,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}).filter(e=>h(e.relativePath)&&(o===null||o.has(e.relativePath))),scanLimit:f,evaluate:e=>{let n=c(t,e.relativePath)?.callables.find(a=>a.startLine===e.startLine&&a.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(a=>!a.simple)||n.paramsEndLine>=n.endLine)return null;let y=d(t,e.relativePath),m=[];for(let a=n.params.length-1;a>=0;a--){let i=n.params[a];if(i.name===""||i.name.startsWith("_")||P(y.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function h(t){let r=u(t);return r==="typescript"||r==="tsx"||r==="javascript"}function P(t,r,l){return t?t.some(s=>s>r&&s<=l):!1}export{T as a};
2
- //# sourceMappingURL=chunk-2Y2WIJI4.js.map
1
+ import{a as b}from"./chunk-V76FCF5F.js";import{a as g}from"./chunk-IW7ASGVF.js";import{a as d}from"./chunk-VGBSY6N7.js";import{c as p}from"./chunk-O6KCZPJQ.js";import{c as o,f as c}from"./chunk-OH5HIAID.js";function T(t,r={}){let{scope:l,limit:s=30,scanLimit:f}=r,u=r.files===void 0?null:new Set(r.files),L=new g(t);return b({candidates:()=>L.productionCallableDefinitions({scope:l,minLoc:2,excludeRootedSymbols:!0,requireFunctionLikeSymbol:!0}).filter(e=>h(e.relativePath)&&(u===null||u.has(e.relativePath))),scanLimit:f,evaluate:e=>{let n=c(t,e.relativePath)?.callables.find(a=>a.startLine===e.startLine&&a.endLine===e.endLine);if(!n||n.params.length===0||n.params.some(a=>!a.simple)||n.paramsEndLine>=n.endLine)return null;let y=d(t,e.relativePath),m=[];for(let a=n.params.length-1;a>=0;a--){let i=n.params[a];if(i.name===""||i.name.startsWith("_")||P(y.get(i.name),n.paramsEndLine,n.endLine))break;m.unshift(i.name)}return m.length===0?null:{symbol:e.symbol,shortName:p(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,paramCount:n.paramCount,unusedTrailing:m}},orderResults:(e,n)=>n.unusedTrailing.length-e.unusedTrailing.length||e.file.localeCompare(n.file)||e.startLine-n.startLine,limit:s})}function h(t){let r=o(t);return r==="typescript"||r==="tsx"||r==="javascript"}function P(t,r,l){return t?t.some(s=>s>r&&s<=l):!1}export{T as a};
2
+ //# sourceMappingURL=chunk-SJR4SB7B.js.map