scip-query 0.23.0 → 0.24.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.
- package/CHANGELOG.md +244 -1
- package/README.md +2 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-H3P6BR5G.js +2 -0
- package/dist/call-graph-VTG2CUOQ.js +2 -0
- package/dist/call-graph-evidence-BociKRpF.d.ts +19 -0
- package/dist/chunk-2BMSSRBH.js +2 -0
- package/dist/{chunk-WIWY3CRX.js → chunk-2GJSD5GY.js} +2 -2
- package/dist/{chunk-W5OXRYGE.js → chunk-2M2LSIMY.js} +3 -3
- package/dist/{chunk-2LDBDR6J.js → chunk-2N6WBNDC.js} +2 -2
- package/dist/{chunk-HOENASQM.js → chunk-2USA3S3P.js} +2 -2
- package/dist/chunk-2VAHDDLM.js +133 -0
- package/dist/chunk-2XWIUW5Z.js +455 -0
- package/dist/chunk-3D4BOXW6.js +20 -0
- package/dist/{chunk-BBCIS4DX.js → chunk-3LO4FST5.js} +2 -2
- package/dist/chunk-3WTY4LP2.js +3 -0
- package/dist/{chunk-UXW33INU.js → chunk-3Z5AMSK6.js} +2 -2
- package/dist/{chunk-4ILJCCXV.js → chunk-44IETFOU.js} +2 -2
- package/dist/chunk-4FR6GQIT.js +2 -0
- package/dist/chunk-4KBTHJLP.js +2 -0
- package/dist/{chunk-SSK6LDPC.js → chunk-5BIKR67W.js} +2 -2
- package/dist/{chunk-IHGQTTVW.js → chunk-5PROPLHI.js} +2 -2
- package/dist/{chunk-TA3QKLLU.js → chunk-5V7EPTII.js} +2 -2
- package/dist/{chunk-JS4PGXMV.js → chunk-62LPZCBQ.js} +2 -2
- package/dist/{chunk-DBRSYFXR.js → chunk-64O2JHQA.js} +2 -2
- package/dist/chunk-6D4F5VWG.js +10 -0
- package/dist/{chunk-BHVUJOCQ.js → chunk-6ERFBC3X.js} +2 -2
- package/dist/{chunk-ILTDAWEF.js → chunk-6ILKOOGH.js} +2 -2
- package/dist/chunk-6MFXCMZC.js +2 -0
- package/dist/chunk-6O7FACKB.js +2 -0
- package/dist/{chunk-XDQMU3BT.js → chunk-6TS3KOXR.js} +2 -2
- package/dist/{chunk-YI2AWIHC.js → chunk-76QOU4PK.js} +2 -2
- package/dist/{chunk-7CYG22FH.js → chunk-7DUI77BN.js} +2 -2
- package/dist/{chunk-IDFEUFKS.js → chunk-7F7T6DCR.js} +2 -2
- package/dist/chunk-7H6VHWWJ.js +2 -0
- package/dist/chunk-7HXT6YLU.js +5 -0
- package/dist/{chunk-DIRJWYBM.js → chunk-7R4V5ES6.js} +4 -4
- package/dist/{chunk-SZHGTCPP.js → chunk-7RIRIADH.js} +2 -2
- package/dist/chunk-7ZLWLOGT.js +2 -0
- package/dist/{chunk-M2O5NY6W.js → chunk-A4WEAK35.js} +2 -2
- package/dist/chunk-AADQLOQ4.js +38 -0
- package/dist/{chunk-OLNV6I6U.js → chunk-AN76MGUE.js} +2 -2
- package/dist/chunk-ANLNLY66.js +2 -0
- package/dist/chunk-ATXPTSEI.js +81 -0
- package/dist/{chunk-YPWBKGFU.js → chunk-AX7IDVFT.js} +2 -2
- package/dist/chunk-B7MPDEAK.js +3 -0
- package/dist/chunk-BBB5FBX4.js +2 -0
- package/dist/{chunk-6I6L7Z62.js → chunk-BHKK5RJY.js} +2 -2
- package/dist/chunk-BJWFVAA5.js +2 -0
- package/dist/{chunk-UHFYCMZO.js → chunk-BKZYTLGE.js} +2 -2
- package/dist/chunk-BL6DCHQP.js +2 -0
- package/dist/{chunk-TEBQMNVI.js → chunk-BOW7SSQH.js} +2 -2
- package/dist/{chunk-OWOOWNJ5.js → chunk-C4RHHCKL.js} +2 -2
- package/dist/{chunk-N2ZSIIGR.js → chunk-C7C6AKAT.js} +6 -6
- package/dist/chunk-CD6M6LS2.js +16 -0
- package/dist/chunk-CFE6PSG6.js +2 -0
- package/dist/{chunk-6V5CNXL6.js → chunk-CFNIGQMT.js} +2 -2
- package/dist/{chunk-GUFSG5TX.js → chunk-CKBUBRYD.js} +2 -2
- package/dist/{chunk-4WNW27SX.js → chunk-CZW5MZ5B.js} +2 -2
- package/dist/chunk-DBBZ63ZX.js +2 -0
- package/dist/{chunk-HCXEQRFF.js → chunk-DBN7DMJB.js} +2 -2
- package/dist/{chunk-6PQNKL3G.js → chunk-DUULLZHZ.js} +2 -2
- package/dist/{chunk-Z4CDXYNQ.js → chunk-DV5Y5NOS.js} +2 -2
- package/dist/chunk-DZOIKCTM.js +3 -0
- package/dist/chunk-E4PKTOL3.js +2 -0
- package/dist/{chunk-EG2CPZMJ.js → chunk-E65ELFKU.js} +2 -2
- package/dist/{chunk-CNO7TOKL.js → chunk-E7QR35ST.js} +2 -2
- package/dist/{chunk-3D3QG236.js → chunk-EFSXAINW.js} +2 -2
- package/dist/{chunk-IL676XCC.js → chunk-EHVEIEQN.js} +2 -2
- package/dist/{chunk-BE7ZZTMC.js → chunk-EHYDXE3Z.js} +2 -2
- package/dist/{chunk-LXABEJX3.js → chunk-EP63Y6LD.js} +2 -2
- package/dist/{chunk-QU5XRYB5.js → chunk-EPX6NQN6.js} +2 -2
- package/dist/{chunk-FESCRNVV.js → chunk-ETC674NS.js} +2 -2
- package/dist/{chunk-OSSESPDX.js → chunk-F5GSBHC6.js} +2 -2
- package/dist/chunk-FH3DGXC6.js +2 -0
- package/dist/{chunk-YEN6CYC7.js → chunk-FI7VGOR4.js} +2 -2
- package/dist/chunk-FJF6VO2P.js +2 -0
- package/dist/{chunk-FRUSVINH.js → chunk-FLMTCX5R.js} +2 -2
- package/dist/chunk-FVFDOIM3.js +2 -0
- package/dist/{chunk-PJFGPYTU.js → chunk-G2HU5WRN.js} +2 -2
- package/dist/{chunk-FIQRSHVM.js → chunk-G4ALYS4J.js} +2 -2
- package/dist/{chunk-UVGEWT4Y.js → chunk-G56I7K4W.js} +2 -2
- package/dist/{chunk-WOIKCX6A.js → chunk-GC4DG2V5.js} +2 -2
- package/dist/chunk-GG45PK4S.js +4 -0
- package/dist/{chunk-XBGWL66K.js → chunk-GHNPACNP.js} +2 -2
- package/dist/{chunk-IICPE7B2.js → chunk-GINH3YQU.js} +2 -2
- package/dist/{chunk-HLZTEXRA.js → chunk-GTZZVLKJ.js} +2 -2
- package/dist/chunk-GXXW5ZHH.js +2 -0
- package/dist/{chunk-B5D7QPBE.js → chunk-HAXXKRTD.js} +2 -2
- package/dist/chunk-HEZWBAZY.js +2 -0
- package/dist/chunk-HMEWLMML.js +2 -0
- package/dist/{chunk-QUU5OBVK.js → chunk-HOBOVYPO.js} +2 -2
- package/dist/{chunk-XGZEP6GR.js → chunk-HRFQ6GW5.js} +2 -2
- package/dist/{chunk-MPQ4OTBM.js → chunk-HX4X7KG3.js} +2 -2
- package/dist/{chunk-FDLOBR6P.js → chunk-HYT2R7LX.js} +2 -2
- package/dist/chunk-IKQVBVQL.js +40 -0
- package/dist/chunk-J6GLBBRK.js +4 -0
- package/dist/{chunk-ZTI4SBFV.js → chunk-J7A4PWFX.js} +2 -2
- package/dist/{chunk-OSR2GEHQ.js → chunk-JCSAZ35V.js} +2 -2
- package/dist/{chunk-ESIQ66Z7.js → chunk-JDU2IV3A.js} +2 -2
- package/dist/chunk-JFMI5SGB.js +4 -0
- package/dist/{chunk-W6STWDQI.js → chunk-JJP37RGX.js} +2 -2
- package/dist/chunk-JZ2A7LDM.js +5 -0
- package/dist/chunk-KNLQGXVH.js +80 -0
- package/dist/chunk-KVQCECPR.js +2 -0
- package/dist/{chunk-SQXRS7BG.js → chunk-KXXORBZ2.js} +2 -2
- package/dist/{chunk-DIUFNHRJ.js → chunk-L5KYH6U3.js} +2 -2
- package/dist/chunk-L6XHYJPZ.js +21 -0
- package/dist/{chunk-2GRUZAQF.js → chunk-L7KTFEAV.js} +2 -2
- package/dist/{chunk-QBE3YX64.js → chunk-LDXHR5EL.js} +2 -2
- package/dist/{chunk-HEHOQQKH.js → chunk-MHGDSBFX.js} +2 -2
- package/dist/{chunk-PWWAJSKV.js → chunk-MLQVVDG3.js} +2 -2
- package/dist/chunk-MOKUWRHO.js +3 -0
- package/dist/{chunk-VQILFTEH.js → chunk-MPYAPMNE.js} +2 -2
- package/dist/{chunk-UICY4GTQ.js → chunk-MV6SPXCR.js} +2 -2
- package/dist/{chunk-HYO3NP5Q.js → chunk-MZPXPSUJ.js} +2 -2
- package/dist/{chunk-VZRNID6A.js → chunk-N55KIE46.js} +2 -2
- package/dist/{chunk-YF5IB2LF.js → chunk-NB4D3BNM.js} +2 -2
- package/dist/{chunk-VVZSBTSU.js → chunk-NGKBOT6G.js} +2 -2
- package/dist/{chunk-NJITK2GP.js → chunk-NJGKXKQF.js} +2 -2
- package/dist/chunk-NJQISBL4.js +8 -0
- package/dist/{chunk-T4N4P2K5.js → chunk-NJT3ZEKY.js} +2 -2
- package/dist/{chunk-FPYLNQPT.js → chunk-NKMKZP6A.js} +2 -2
- package/dist/chunk-NODFZ6ED.js +2 -0
- package/dist/{chunk-BRV7PIFF.js → chunk-NSM5IEVW.js} +2 -2
- package/dist/{chunk-3WR4E3A3.js → chunk-NTGUVNR2.js} +2 -2
- package/dist/{chunk-VUPHCS7Y.js → chunk-NU3KFF2O.js} +2 -2
- package/dist/chunk-NWLVNU66.js +557 -0
- package/dist/{chunk-D4N5SQ2M.js → chunk-NYKZMCRC.js} +2 -2
- package/dist/{chunk-VNLGKHS6.js → chunk-O6BUXZEH.js} +2 -2
- package/dist/chunk-ODPDP7A4.js +3 -0
- package/dist/{chunk-JTQVMR42.js → chunk-OHIV323X.js} +2 -2
- package/dist/chunk-OIAPEKMT.js +3 -0
- package/dist/chunk-OIOC5EHF.js +3 -0
- package/dist/{chunk-YBGKCQIS.js → chunk-ONPPQM4G.js} +2 -2
- package/dist/{chunk-64BFSI5I.js → chunk-OUHEZBYI.js} +2 -2
- package/dist/{chunk-L6PJPETJ.js → chunk-OVGYW7UD.js} +2 -2
- package/dist/{chunk-I55I7XXP.js → chunk-OYKU4B3Y.js} +2 -2
- package/dist/{chunk-J66VOFW6.js → chunk-POBJ6FR2.js} +2 -2
- package/dist/{chunk-CWFP7GM5.js → chunk-PSZPMMWN.js} +2 -2
- package/dist/chunk-PXTRBKRK.js +3 -0
- package/dist/{chunk-HKGFPJ4T.js → chunk-Q5JRIHT3.js} +2 -2
- package/dist/{chunk-P42EIXTA.js → chunk-Q7ATHARX.js} +2 -2
- package/dist/{chunk-JYR66JN5.js → chunk-Q7CSKIDM.js} +2 -2
- package/dist/{chunk-TRNAEQ6P.js → chunk-QBQE7ZJ5.js} +2 -2
- package/dist/{chunk-DULC3QFP.js → chunk-QH22UIXP.js} +2 -2
- package/dist/chunk-QXCKQTKR.js +60 -0
- package/dist/{chunk-ODDUPDP7.js → chunk-RBAD4GJ2.js} +5 -5
- package/dist/{chunk-IZDPJ2QI.js → chunk-RMDPFPNW.js} +2 -2
- package/dist/chunk-ROPJDEJZ.js +4 -0
- package/dist/{chunk-EKV5HX33.js → chunk-RVZC6TJE.js} +2 -2
- package/dist/{chunk-XFA4SSO3.js → chunk-S4QZBKSR.js} +2 -2
- package/dist/{chunk-D2DHWI3D.js → chunk-SCPMZ73U.js} +2 -2
- package/dist/{chunk-PZL5T7SU.js → chunk-SIAP5RGI.js} +2 -2
- package/dist/{chunk-7IWV2EG3.js → chunk-SIX4RFR3.js} +2 -2
- package/dist/{chunk-DYGHBZ2N.js → chunk-SKKXTABJ.js} +2 -2
- package/dist/{chunk-F7DY272B.js → chunk-SSRFUQBD.js} +2 -2
- package/dist/chunk-SYVJEEUJ.js +3 -0
- package/dist/{chunk-FGA2U4OR.js → chunk-T3CZAZSI.js} +2 -2
- package/dist/chunk-T3I6NHBH.js +2 -0
- package/dist/{chunk-EQHFIL6T.js → chunk-T6DWDI5E.js} +2 -2
- package/dist/chunk-T6HRIROJ.js +7 -0
- package/dist/{chunk-GSP44ENC.js → chunk-TAA7HXHE.js} +2 -2
- package/dist/{chunk-BQGB4HBD.js → chunk-TJ2JQYT3.js} +2 -2
- package/dist/{chunk-XPDPNWTQ.js → chunk-TULNMD5T.js} +19 -19
- package/dist/chunk-U2FPY5XA.js +3 -0
- package/dist/chunk-U3SXIMII.js +38 -0
- package/dist/{chunk-NOGJXYFO.js → chunk-U6KCHXJ4.js} +2 -2
- package/dist/chunk-UH3XSKS5.js +9 -0
- package/dist/{chunk-AFHTBORT.js → chunk-UIFUZVCC.js} +2 -2
- package/dist/{chunk-7BWFZPPZ.js → chunk-UXKURIVI.js} +2 -2
- package/dist/{chunk-2E7CX53V.js → chunk-V2RBODHL.js} +2 -2
- package/dist/{chunk-KLFEXGQA.js → chunk-VBKUWB6N.js} +2 -2
- package/dist/{chunk-WUN6KBHV.js → chunk-VBV6ALJE.js} +2 -2
- package/dist/{chunk-GZIUDL6G.js → chunk-VDGFWCQV.js} +2 -2
- package/dist/chunk-VDSDOEWF.js +2 -0
- package/dist/{chunk-WDNVY4E7.js → chunk-VZPWVCLN.js} +2 -2
- package/dist/chunk-WDSFQDPN.js +2 -0
- package/dist/{chunk-CIYLO6SI.js → chunk-WFA35BGR.js} +2 -2
- package/dist/{chunk-LMZ5PRUV.js → chunk-WLMP3OCW.js} +2 -2
- package/dist/{chunk-3SVF22I5.js → chunk-WSA52GOR.js} +2 -2
- package/dist/{chunk-VMPRET3I.js → chunk-X3YVZAKZ.js} +2 -2
- package/dist/{chunk-GYIZ4NXB.js → chunk-X6OGVFIT.js} +2 -2
- package/dist/{chunk-6HFCYNYE.js → chunk-XKXTR6ZI.js} +2 -2
- package/dist/{chunk-6VVV4WRR.js → chunk-Y5DFAW5W.js} +2 -2
- package/dist/chunk-YSYPDRD5.js +3 -0
- package/dist/{chunk-TQPCBMWT.js → chunk-ZFVPWH62.js} +2 -2
- package/dist/chunk-ZGIHTH27.js +2 -0
- package/dist/{chunk-OR2E3AGZ.js → chunk-ZGIQN2SX.js} +2 -2
- package/dist/{chunk-WNTFFKAX.js → chunk-ZHG4WAHR.js} +2 -2
- package/dist/{chunk-DTZCKZEU.js → chunk-ZKB2XUEN.js} +2 -2
- package/dist/chunk-ZLMXIQLC.js +21 -0
- package/dist/chunk-ZMCQIHI4.js +2 -0
- package/dist/cli-main.js +2 -2
- package/dist/code-TAVIKWJI.js +2 -0
- package/dist/code-result-json-5FEFQCAQ.js +2 -0
- package/dist/{command-descriptors-P34VABY5.js → command-descriptors-7BKH53Y3.js} +124 -124
- package/dist/dataflow-GFBTVDH3.js +2 -0
- package/dist/dependence-slice-GWGQCODG.js +2 -0
- package/dist/deps-4QHVDPYA.js +2 -0
- package/dist/direct-navigation-4UBC6HNW.js +3 -0
- package/dist/entry-map-QCTF4RVY.js +2 -0
- package/dist/files-M2UBF5HJ.js +2 -0
- package/dist/frontend-profile-roles-D7eCum8P.d.ts +10 -0
- package/dist/{health-CPp2Jf1Z.d.ts → health-BI2a9WPy.d.ts} +60 -2
- package/dist/hierarchy-2UIHRLW4.js +2 -0
- package/dist/imports-WIE3YZOB.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/members-YKD636DA.js +2 -0
- package/dist/methods-VDF4IMYG.js +2 -0
- package/dist/output-continuation-command-4UMDOOLO.js +3 -0
- package/dist/output-pagination-2GME6OPY.js +19 -0
- package/dist/postinstall.js +1 -1
- package/dist/project-reindex-XEQTRCV5.js +3 -0
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +1 -1
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -0
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +20 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -0
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +28 -1
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +1 -1
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +50 -23
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +1 -1
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +4 -3
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +9 -1
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +19 -3
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +22 -3
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +17 -3
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +7 -1
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +1 -1
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +22 -6
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +16 -1
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/query-service-fastpath.js +5 -5
- package/dist/query-service-server.js +2 -2
- package/dist/refs-JNK5CLM7.js +2 -0
- package/dist/refs-pagination-6BLRYGMV.js +2 -0
- package/dist/reindex-worker.js +10 -10
- package/dist/reindex.js +18 -18
- package/dist/runtime.js +4 -4
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/slice-PHPVNCWX.js +2 -0
- package/dist/surface-MQX5MPIV.js +2 -0
- package/dist/{symbol-resolution-WD5EU5JE.js → symbol-resolution-DBLVXLBC.js} +2 -2
- package/dist/system-JOPKV4OG.js +2 -0
- package/dist/trace-I2P2YFH4.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-JJVMF7NP.js +2 -0
- package/dist/watch-server.js +3 -3
- package/docs/COMMAND_REFERENCE.md +2 -2
- package/docs/DETECTOR_GUIDE.md +51 -12
- package/docs/accuracy-audit-checklist.md +36 -13
- package/docs/locality-analyzer-design.md +9 -9
- package/package.json +2 -2
- package/skills/conductor/SKILL.md +110 -0
- package/skills/conductor/agents/openai.yaml +4 -0
- package/skills/principal-maintainability-review/SKILL.md +273 -0
- package/skills/principal-maintainability-review/agents/openai.yaml +4 -0
- package/skills/scip-calibrate/SKILL.md +102 -0
- package/skills/scip-calibrate/agents/openai.yaml +4 -0
- package/skills/scip-claim-audit/SKILL.md +113 -0
- package/skills/scip-claim-audit/agents/openai.yaml +4 -0
- package/skills/scip-probe-reachability/SKILL.md +93 -0
- package/skills/scip-probe-reachability/agents/openai.yaml +4 -0
- package/skills/scip-root-cause/SKILL.md +160 -0
- package/skills/scip-root-cause/agents/openai.yaml +4 -0
- package/skills/scip-system-compression/SKILL.md +252 -0
- package/skills/scip-system-compression/agents/openai.yaml +4 -0
- package/skills/scip-system-compression/references/compression-atlas.md +116 -0
- package/skills/scip-system-compression/references/compression-patterns.md +87 -0
- package/skills/scip-twin-drift/SKILL.md +109 -0
- package/skills/scip-twin-drift/agents/openai.yaml +4 -0
- package/dist/by-kind-XI2CSWEY.js +0 -2
- package/dist/call-graph-UONR6JR5.js +0 -2
- package/dist/call-graph-evidence-lZa2dwQA.d.ts +0 -11
- package/dist/chunk-2R3V3PSD.js +0 -4
- package/dist/chunk-2WC2OEDO.js +0 -4
- package/dist/chunk-3FHOF22C.js +0 -21
- package/dist/chunk-3JKSW6LJ.js +0 -2
- package/dist/chunk-3L2ZBPEX.js +0 -133
- package/dist/chunk-3PJABJSU.js +0 -2
- package/dist/chunk-4FTZ4P5G.js +0 -2
- package/dist/chunk-4UX2F3JX.js +0 -2
- package/dist/chunk-5ENOG4VP.js +0 -61
- package/dist/chunk-66DVSJQG.js +0 -455
- package/dist/chunk-AVRYW5OZ.js +0 -2
- package/dist/chunk-BDUVI7TO.js +0 -3
- package/dist/chunk-CEEZJXEF.js +0 -2
- package/dist/chunk-CJZXN4NU.js +0 -2
- package/dist/chunk-COF23M5F.js +0 -2
- package/dist/chunk-DHUIOLDT.js +0 -2
- package/dist/chunk-DRENNWRG.js +0 -2
- package/dist/chunk-E5R6AQ73.js +0 -40
- package/dist/chunk-E73UNJTF.js +0 -38
- package/dist/chunk-EVFUMY4R.js +0 -3
- package/dist/chunk-FBN2FGXG.js +0 -2
- package/dist/chunk-FFRKR4EQ.js +0 -2
- package/dist/chunk-GAS2LJMP.js +0 -3
- package/dist/chunk-HVF5VBG6.js +0 -2
- package/dist/chunk-JGKUET5J.js +0 -3
- package/dist/chunk-JWTGMPIT.js +0 -80
- package/dist/chunk-KFOYCQAJ.js +0 -9
- package/dist/chunk-KYSDI3GE.js +0 -5
- package/dist/chunk-LDVT66YM.js +0 -2
- package/dist/chunk-LQRQN2XA.js +0 -2
- package/dist/chunk-MNV5FSBW.js +0 -3
- package/dist/chunk-MV3CDXPI.js +0 -38
- package/dist/chunk-N5B2NILC.js +0 -5
- package/dist/chunk-NOYBFVJA.js +0 -554
- package/dist/chunk-NWQXSFFU.js +0 -3
- package/dist/chunk-OLIWTZI3.js +0 -3
- package/dist/chunk-PP7KNN7L.js +0 -2
- package/dist/chunk-PU7T5QYQ.js +0 -2
- package/dist/chunk-QGVTFRY2.js +0 -7
- package/dist/chunk-QOJONDS7.js +0 -2
- package/dist/chunk-RBLQNW26.js +0 -20
- package/dist/chunk-RTQ7NEKG.js +0 -81
- package/dist/chunk-TPFHAQ2G.js +0 -2
- package/dist/chunk-TQZV7KV4.js +0 -2
- package/dist/chunk-TY7CRN3Z.js +0 -2
- package/dist/chunk-W7CXK74K.js +0 -2
- package/dist/chunk-WB3WYIRE.js +0 -4
- package/dist/chunk-WK46TNUM.js +0 -3
- package/dist/chunk-WYCTJDVR.js +0 -2
- package/dist/chunk-XRYABF57.js +0 -8
- package/dist/chunk-YPWHBBIS.js +0 -2
- package/dist/chunk-YSH6U3L4.js +0 -3
- package/dist/chunk-YU5DZUZI.js +0 -10
- package/dist/chunk-YWO5DDRC.js +0 -16
- package/dist/chunk-ZF5KHH7C.js +0 -2
- package/dist/chunk-ZOHS7AQV.js +0 -21
- package/dist/code-MI6F2TTU.js +0 -2
- package/dist/code-result-json-FXALY4HE.js +0 -2
- package/dist/dataflow-4KEMJPC6.js +0 -2
- package/dist/dependence-slice-R7FPWD5M.js +0 -2
- package/dist/deps-7EMQUYUT.js +0 -2
- package/dist/direct-navigation-6YO234F2.js +0 -3
- package/dist/entry-map-KOOLR26E.js +0 -2
- package/dist/files-OPIPJIGZ.js +0 -2
- package/dist/hierarchy-QPD2CAER.js +0 -2
- package/dist/imports-M6HUXRXC.js +0 -2
- package/dist/members-I5MEFOCT.js +0 -2
- package/dist/methods-5JYGGHXA.js +0 -2
- package/dist/output-continuation-command-UPQAAKBP.js +0 -3
- package/dist/output-pagination-3OFL2MJV.js +0 -19
- package/dist/project-reindex-UKKQ5PLS.js +0 -3
- package/dist/refs-PSU4JZZW.js +0 -2
- package/dist/refs-pagination-JG6CJMRC.js +0 -2
- package/dist/slice-HYRATV64.js +0 -2
- package/dist/surface-VTGDYWF5.js +0 -2
- package/dist/system-LRQNFOR2.js +0 -2
- package/dist/trace-F4B6OLL4.js +0 -2
- package/dist/value-flow-VRPZY72V.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{M as T,P as g,R as h,S as m,T as d,U as p}from"./chunk-
|
|
1
|
+
import{M as T,P as g,R as h,S as m,T as d,U as p}from"./chunk-JZ2A7LDM.js";var G=new Set(["aix","android","darwin","freebsd","haiku","linux","openbsd","sunos","win32","cygwin","netbsd"]);function j(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let r=e;return r.version!==1||typeof r.pid!="number"||!Number.isSafeInteger(r.pid)||r.pid<=0||typeof r.platform!="string"||!G.has(r.platform)||typeof r.startToken!="string"||r.startToken.trim()===""?null:{version:1,pid:r.pid,platform:r.platform,startToken:r.startToken}}function f(e,r){return e.version===r.version&&e.pid===r.pid&&e.platform===r.platform&&e.startToken===r.startToken}import{execFileSync as K}from"child_process";import{platform as Y}from"os";var q=1e3,x=16*1024,P;function D(e,r=F){if(!Number.isSafeInteger(e)||e<=0)return null;let t=e===process.pid&&r===F;if(t&&P)return{...P};try{let i=z(e,r);if(!i)return null;let n={version:1,pid:e,platform:r.platform,startToken:i};return t&&(P=n),{...n}}catch{return null}}function z(e,r){if(r.platform==="linux"||r.platform==="android")return H(r.readFile(`/proc/${e}/stat`));if(r.platform==="win32"){let t=`([DateTimeOffset](Get-Process -Id ${e} -ErrorAction Stop).StartTime).ToUnixTimeMilliseconds()`;return I(r.run("powershell.exe",["-NoProfile","-NonInteractive","-Command",t]))}return r.platform==="darwin"||r.platform==="freebsd"||r.platform==="openbsd"||r.platform==="netbsd"?I(r.run("ps",["-p",String(e),"-o","lstart="])):null}function H(e){let r=e.lastIndexOf(")");if(r<0)return null;let i=e.slice(r+1).trim().split(/\s+/)[19];return i&&/^\d+$/.test(i)?i:null}function I(e){let r=e.trim();return r===""?null:r}var F={platform:Y(),readFile(e){return T(e,{maxBytes:x,inputKind:"process identity pseudo-file"})},run(e,r){return K(e,[...r],{encoding:"utf8",timeout:q,maxBuffer:x,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}};function De(e){try{return process.kill(e,0),!0}catch(r){return typeof r=="object"&&r!==null&&"code"in r&&r.code==="EPERM"}}function Ee(){return performance.now()}import{randomUUID as re}from"crypto";import{closeSync as te,existsSync as ne,fsyncSync as ie,linkSync as oe,mkdirSync as se,openSync as ae,renameSync as le,unlinkSync as ce,writeSync as ue}from"fs";import{dirname as E}from"path";import{chmodSync as X,constants as V,copyFileSync as Q}from"fs";import{dirname as Z}from"path";var R=Object.freeze({...h,copyFile:(e,r)=>Q(e,r,V.COPYFILE_FICLONE),chmodFile:(e,r)=>X(e,r)});function ee(e,r,t={}){let i=t.runtime??R,n=Z(r),s=m(n,i);i.copyFile(e,r),t.mode!==void 0&&i.chmodFile(r,t.mode);let o=i.openFile(r,"r");try{i.syncFile(o)}finally{i.closeFile(o)}return p(s,d(n,i))}var M=Object.freeze({platform:process.platform,randomToken:()=>re(),pathExists:e=>ne(e),makeDirectory:e=>se(e,{recursive:!0}),openFile:(e,r,t)=>ae(e,r,t),writeFile:(e,r,t,i)=>ue(e,r,t,i),syncFile:e=>ie(e),closeFile:e=>te(e),renameFile:(e,r)=>le(e,r),linkFile:(e,r)=>oe(e,r),removeFile:e=>ce(e)});function S(e,r,t={}){let i=t.durability??"visibility",n=t.runtime??M,s=E(e),o=i==="durable"?m(s,n):(n.makeDirectory(s),"not-requested"),l=`${e}.tmp-${n.randomToken()}`,u=typeof r=="string"?Buffer.from(r):r,a,c=!1;try{a=n.openFile(l,"wx",t.mode??384),c=!0,g(a,u,n,"atomic file"),i==="durable"&&n.syncFile(a),n.closeFile(a),a=void 0,n.renameFile(l,e),c=!1;let b=i==="durable"?p(o,d(s,n)):"not-requested";return A(i,b)}finally{if(a!==void 0)try{n.closeFile(a)}catch{}if(c)try{n.removeFile(l)}catch{}}}function We(e,r,t={}){let i=t.durability??"visibility",n=t.runtime??M;if(!n.linkFile)throw new Error("Exclusive atomic file publication requires hard-link support.");let s=E(e),o=i==="durable"?m(s,n):(n.makeDirectory(s),"not-requested"),l=`${e}.tmp-${n.randomToken()}`,u=typeof r=="string"?Buffer.from(r):r,a,c=!1;try{a=n.openFile(l,"wx",t.mode??384),c=!0,g(a,u,n,"exclusive atomic file"),i==="durable"&&n.syncFile(a),n.closeFile(a),a=void 0,n.linkFile(l,e);let b=i==="durable"?d(s,n):"not-requested";n.removeFile(l),c=!1;let $=i==="durable"?p(o,b,d(s,n)):"not-requested";return A(i,$)}finally{if(a!==void 0)try{n.closeFile(a)}catch{}if(c)try{n.removeFile(l)}catch{}}}function A(e,r){return{requestedDurability:e,achievedDurability:e==="visibility"?"visibility":r==="synced"?"directory-durable":"file-flushed",directorySync:r}}function je(e,r,t={}){S(e,v(r,t),{durability:"visibility",runtime:t.runtime})}function Ke(e,r,t={}){return S(e,v(r,t),{durability:"durable",runtime:t.runtime})}function v(e,r){let t=JSON.stringify(e,null,r.spacing);return r.trailingNewline?`${t}
|
|
2
2
|
`:t}import{execFileSync as O,spawnSync as ze}from"child_process";import{platform as de}from"os";import{resolve as me}from"path";var k=de()==="win32";function Ve(e){let r=k?"where":"which";try{return O(r,[e],{stdio:"pipe",timeout:1e4,killSignal:"SIGKILL"}),!0}catch{return!1}}var pe=/\.(?:c|m)?js$/i,fe=/\.(?:exe|com)$/i;function Qe(e,r){return pe.test(e)?{binary:process.execPath,args:[e,...r]}:{binary:e,args:[...r]}}function ye(e,r){return O(e,r,{stdio:["ignore","pipe","ignore"],encoding:"utf8",timeout:1e4,killSignal:"SIGKILL"})}function Ze(e,r={}){let t=r.isWindows??k,i=r.lookup??ye,n;try{n=i(t?"where":"which",[e])}catch{return null}let s=n.split(/\r?\n/).map(o=>o.trim()).filter(Boolean);if(!t){let o=s[0];return o?me(o):null}return s.find(o=>fe.test(o))??null}import{execFileSync as C}from"child_process";import{platform as be}from"os";var L=1e3,B=2*1024*1024,ge=25;function ir(e,r,t=U){let i=t.readIdentity(e),n=new Map;return i&&n.set(e,i),{rootPid:e,rootIdentity:i,ownsProcessGroup:r,knownMembers:n}}async function or(e,r,t=U){if(!e.rootIdentity){let u=await y(e,r.gracefulMs+r.forceMs,t);return{reaped:u,reason:u?"terminated":"identity-unavailable",detail:u?void 0:`Could not establish the birth identity of process ${e.rootPid}.`}}let i=W(e,t);if(i==="mismatch")return{reaped:!1,reason:"identity-mismatch",detail:`Process ${e.rootPid} no longer has the identity owned by this runner.`};if(i==="exited"&&!J(e,t))return{reaped:!0,reason:"terminated"};if(t.platform==="win32"){try{t.terminateWindowsTree(e.rootPid)}catch(a){let c=await y(e,r.forceMs,t);return{reaped:c,reason:c?"terminated":"signal-failed",detail:c?void 0:w(a)}}let u=await y(e,r.forceMs,t);return{reaped:u,reason:u?"terminated":"deadline"}}let n=N(e,"SIGTERM",t);if(await y(e,r.gracefulMs,t))return{reaped:!0,reason:"terminated"};let o=N(e,"SIGKILL",t);return await y(e,r.forceMs,t)?{reaped:!0,reason:"terminated"}:o?{reaped:!1,reason:o.reason,detail:o.detail}:n?{reaped:!1,reason:n.reason,detail:n.detail}:{reaped:!1,reason:"deadline",detail:`Process tree ${e.rootPid} did not exit before its termination deadline.`}}function W(e,r){let t=r.readIdentity(e.rootPid);if(!t)return"exited";if(!e.rootIdentity||!f(e.rootIdentity,t))return"mismatch";e.knownMembers.set(e.rootPid,t);for(let i of r.listDescendantPids(e.rootPid)){let n=r.readIdentity(i);n&&e.knownMembers.set(i,n)}return"owned"}function N(e,r,t){let i=W(e,t);if(i==="mismatch")return{reason:"identity-mismatch",detail:`Process ${e.rootPid} changed identity before ${r}.`};if(i==="owned"&&e.ownsProcessGroup)try{return t.signal(-e.rootPid,r),null}catch(s){if(!_(s))return{reason:"signal-failed",detail:w(s)}}let n=null;for(let s of e.knownMembers.values()){let o=t.readIdentity(s.pid);if(!(!o||!f(s,o)))try{t.signal(s.pid,r)}catch(l){!_(l)&&n===null&&(n=w(l))}}return n===null?null:{reason:"signal-failed",detail:n}}async function y(e,r,t){let i=t.now()+r;for(;J(e,t);){if(t.now()>=i)return!1;await t.sleep(Math.min(ge,Math.max(1,i-t.now())))}return!0}function J(e,r){if(!e.rootIdentity&&r.isProcessAlive(e.rootPid))return!0;for(let t of e.knownMembers.values()){let i=r.readIdentity(t.pid);if(i&&f(t,i))return!0}return!!(e.ownsProcessGroup&&r.isProcessGroupAlive(e.rootPid))}function Pe(e){let r=Se(!1),t=new Map;for(let o of r.split(/\r?\n/)){let l=/^\s*(\d+)\s+(\d+)\s*$/.exec(o);if(!l)continue;let u=Number(l[1]),a=Number(l[2]),c=t.get(a)??[];c.push(u),t.set(a,c)}let i=[],n=[...t.get(e)??[]],s=new Set;for(;n.length>0;){let o=n.pop();s.has(o)||(s.add(o),i.push(o),n.push(...t.get(o)??[]))}return i}function Se(e){return C("ps",["-axo",e?"pid=,ppid=,rss=":"pid=,ppid="],{encoding:"utf8",timeout:L,maxBuffer:B,env:{...process.env,LC_ALL:"C",LANG:"C"},stdio:["ignore","pipe","ignore"]})}function _(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ESRCH"}function w(e){return e instanceof Error?e.message:String(e)}var U={platform:be(),now:Date.now,readIdentity:D,isProcessAlive(e){try{return process.kill(e,0),!0}catch(r){return typeof r=="object"&&r!==null&&"code"in r&&r.code==="EPERM"}},isProcessGroupAlive(e){if(this.platform==="win32")return!1;try{return process.kill(-e,0),!0}catch(r){return typeof r=="object"&&r!==null&&"code"in r&&r.code==="EPERM"}},listDescendantPids(e){if(this.platform==="win32")return[];try{return Pe(e)}catch{return[]}},signal(e,r){process.kill(e,r)},terminateWindowsTree(e){C("taskkill.exe",["/PID",String(e),"/T","/F"],{timeout:L,maxBuffer:B,stdio:"ignore",windowsHide:!0})},async sleep(e){await new Promise(r=>setTimeout(r,e))}};export{j as a,f as b,D as c,De as d,Ee as e,ee as f,S as g,We as h,je as i,Ke as j,Ve as k,Qe as l,Ze as m,ir as n,or as o};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-QBQE7ZJ5.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as ee,b as ne,c as te}from"./chunk-VMPRET3I.js";import{a as Q}from"./chunk-3WR4E3A3.js";import{c as Z}from"./chunk-MNV5FSBW.js";import{a as z,b as W,c as J}from"./chunk-CIYLO6SI.js";import{a as Y,d as w}from"./chunk-M2O5NY6W.js";import{d as K}from"./chunk-BRV7PIFF.js";import{a as V,d as X}from"./chunk-6VVV4WRR.js";import{h as H}from"./chunk-VUPHCS7Y.js";import{d as E}from"./chunk-BOJ5SVE2.js";import{a as F,b as x}from"./chunk-NJITK2GP.js";import{y as G}from"./chunk-ODDUPDP7.js";import{k as U}from"./chunk-FESCRNVV.js";import{createHash as ue}from"crypto";var le=6,ve=12,be=48,Ce=2e4,ie=12,L=Number.MAX_SAFE_INTEGER,ye=["definition","callers","callees"],N={search:12,"exact-source":24,definition:24,caller:8,callee:8,"production-reference":6,"test-reference":2,dependency:6,consumer:6};function rn(e,t){if(t.cursor)throw new Error("Inspect no longer accepts semantic packet cursors. Run the original inspect selectors again.");let n=xe(t),r=Ee(e,n),i=r.candidates.sort((c,h)=>O(c,h));n.view==="behavior"&&Re(e,i),ke(e,i),n.view==="behavior"&&we(e,i);let o=ee(i.map(c=>T(c,n.view)),n.evidenceBudgets,(c,h)=>O(c.candidate,h.candidate)),{selected:u,omitted:a}=ne(o.selected,n.maxUnits,n.maxCharacters,(c,h)=>O(c.candidate,h.candidate),n.view==="source"),l=u.map(c=>c.candidate),s=[...o.omitted,...a].map(c=>c.candidate),d=l.map(Ae),m=W(l.map(c=>c.kind==="source"?c.bindingClosure:void 0),l.filter(c=>c.kind==="source").map(c=>({relativePath:c.relativePath,startLine:c.startLine,endLine:c.endLine}))),p=d.reduce((c,h)=>c+(h.kind==="source"?qe(h.source):0),0),g=d.reduce((c,h)=>c+(h.kind==="source"?h.source.length:0),0),y=d.reduce((c,h)=>c+pe(h,n.view),0),v=d.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).map(De),b=i.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).length,fe=d.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).length,k=r.searches.map(c=>Me(c,i,l)),ge=Fe(s),A=r.locations.every(c=>c.matched)&&r.evidence.every(c=>c.kind==="matched")&&r.searches.every(c=>Te(c.textCoverage))&&s.every(c=>!c.roles.some(h=>h==="location"||h==="definition")),D=k.reduce((c,h)=>c+h.omittedMatches,0),$=s.length===0&&D===0,B=$?void 0:me(n,!0),j=$e(n,s),Se=Le($,A,s.length+D,j,k,B),q=i.filter(c=>n.view==="behavior"&&c.kind==="source"&&c.roles.some(h=>h==="location"||h==="definition"||h==="search")).map(c=>({id:`inspect:${c.relativePath}:${c.startLine}-${c.endLine}`,label:c.ownerShort??`${c.relativePath}:${c.startLine+1}`,file:c.relativePath,startLine:c.startLine,endLine:c.endLine})),M=q.length>0?Z(e,q):void 0;return{searches:k,evidence:r.evidence,locations:r.locations,slices:v,candidateSlices:b,omittedSlices:b-fe,maxSlices:b,maxTotalLines:p,units:d,candidateUnits:i.length,omittedUnits:s.length,maxUnits:n.maxUnits,maxCharacters:n.maxCharacters,returnedLines:p,returnedCharacters:g,returnedViewCharacters:y,view:n.view,omissionGroups:j,packetCoverage:{mode:$?"complete":"bounded",candidateUnits:i.length,returnedUnits:d.length,omittedUnits:s.length,omittedByRole:ge,exactSelectorsComplete:A,maxUnits:n.maxUnits,maxCharacters:n.maxCharacters,channels:Oe(i,l,n.evidenceBudgets,n.view),...B?{expansionCommand:B}:{}},stoppingSummary:Se,...M&&M.candidateAnchors>0?{causalFrontier:M}:{},bindingClosure:m,continuation:null}}function Le(e,t,n,r,i,o){let u=f([...r.map(a=>a.drillCommand),...i.flatMap(a=>a.exactFollowup?[a.exactFollowup]:[]),...o?[o]:[]]);return e&&t?{queryStatus:"selection-complete",status:"stop-ready",openEvidence:0,guidance:"All evidence requested by this inspect query was materialized.",drillCommands:[]}:t?{queryStatus:"frontier-accounted",status:"relevance-check-required",openEvidence:n,guidance:"Withheld evidence is accounted for by recoverable groups; drill the groups relevant to the current decision.",drillCommands:u}:{queryStatus:"coverage-incomplete",status:"exact-evidence-withheld",openEvidence:n,guidance:"A requested identity, exact source unit, or current-text coverage requirement is unresolved; drill before relying on it.",drillCommands:u}}function xe(e){let t=E(e.searches),n=E(e.symbols),r=E(e.locations),i=t.length+n.length+r.length;if(i===0)throw new Error("inspect requires at least one --search, --symbol, or --at selector.");if(i>24)throw new RangeError(`inspect accepts at most ${24} selectors; received ${i}.`);let o=e.evidence??{};if(e.unitLines!==void 0&&C(e.unitLines,"unitLines"),e.totalLines!==void 0&&C(e.totalLines,"totalLines"),e.sliceLimit!==void 0&&C(e.sliceLimit,"sliceLimit"),e.maxCharacters!==void 0&&C(e.maxCharacters,"maxCharacters"),e.maxUnits!==void 0&&C(e.maxUnits,"maxUnits"),e.view!==void 0&&e.view!=="source"&&e.view!=="behavior")throw new Error(`Unknown inspect view: ${String(e.view)}. Use source or behavior.`);if(e.full&&(e.searchLimit!==void 0||e.maxUnits!==void 0||e.maxCharacters!==void 0||e.evidenceBudgets!==void 0))throw new Error("full inspect cannot be combined with searchLimit, maxUnits, maxCharacters, or evidenceBudgets.");let u=e.full??!1;return{searches:t,symbols:n,locations:r,...e.scope?.trim()?{scope:e.scope.trim()}:{},context:ae(e.context??le,"context"),searchLimit:C(e.searchLimit??(u?L:ve),"searchLimit"),maxUnits:C(u?L:e.maxUnits??be,"maxUnits"),maxCharacters:C(u?L:e.maxCharacters??Ce,"maxCharacters"),evidenceBudgets:u?Ue():Ie(e.evidenceBudgets??N),view:e.view??"source",evidence:{...o.parts?{parts:[...o.parts]}:n.length>0?{parts:[...ye]}:{},...o.referenceContext!==void 0?{referenceContext:ae(o.referenceContext,"referenceContext")}:{},relatedSourceLines:o.relatedSourceLines??60,...o.semantic!==void 0?{semantic:o.semantic}:{}}}}function Ie(e){let t={...N};for(let[n,r]of Object.entries(e)){if(!(n in t))throw new Error(`Unknown inspect evidence channel: ${n}.`);if(!Number.isSafeInteger(r)||(r??-1)<0)throw new RangeError(`Evidence budget ${n} must be a non-negative safe integer; received ${r}.`);t[n]=r}return t}function Ue(){return Object.fromEntries(Object.keys(N).map(e=>[e,L]))}function Ee(e,t){let n=[],r=0,i=te(e,t.searches,{scope:t.scope,context:0,limit:t.searchLimit,ranking:"structural"}).map((s,d)=>({pattern:t.searches[d],result:s,matches:s.matches})),o=Math.max(0,...i.map(s=>s.matches.length));for(let s=0;s<o;s+=1)for(let d of i){let m=d.matches[s];if(!m)continue;let p=w(e,m.relativePath,m.focusLine,L,t.context);p&&I(e,n,p,"search",`search:${d.pattern}`,m.ownerSymbol,m.ownerShort,1,r++)}let u=i.map(({pattern:s,result:d})=>{let m=d.omittedMatches>0?de(s,t.scope):void 0,p=d.fileCoverage??[],g=_e(s,p,t.scope);return{pattern:s,matchingLines:d.matchingLines,returnedMatches:d.matches.length,omittedMatches:d.omittedMatches,matchingFiles:p.length,returnedFiles:p.filter(y=>y.returnedMatches>0).length,omittedFiles:p.filter(y=>y.returnedMatches===0).length,candidateUnits:0,selectedUnits:0,omittedUnits:0,scopeHints:g.slice(0,ie),omittedScopeHints:Math.max(0,g.length-ie),textCoverage:d.textCoverage,...m?{exactFollowup:m}:{}}}),a=t.locations.map(s=>{let d=je(s),m=d?K(e,d.path):null,p=m?w(e,m,d.line-1,L,t.context):null;return p&&I(e,n,p,"location",`at:${s}`,null,null,0,r++),{target:s,matched:p!==null}}),l=t.symbols.map(s=>Q(e,s,t.evidence));for(let s of l)if(s.kind==="matched"){if(s.definition){let d=w(e,s.definition.relativePath,s.definition.startLine,L,t.context);d&&I(e,n,d,"definition",`definition:${s.shortName}`,s.symbol,s.shortName,0,r++)}for(let d of s.referenceWindows){let m=d.references[0];I(e,n,{...d,focusLine:m?.line??d.startLine,unitType:null,unitStartLine:d.startLine,unitEndLine:d.endLine,omittedLines:0},"reference",`reference:${s.shortName}`,m?.enclosingSymbol??null,m?.enclosingShort??null,x(d.relativePath)==="test"?5:4,r++,d.references.map(p=>p.line),s.symbol)}for(let d of s.callers)re(e,n,d,"caller",s,2,r++);for(let d of s.callees)re(e,n,d,"callee",s,3,r++);for(let d of s.dependencies)oe(e,n,"dependency",s.file,d.relativePath,s.symbol,t.context,6,r++);for(let d of s.consumers)oe(e,n,"consumer",d.relativePath,s.file,s.symbol,t.context,7,r++)}return{searches:u,evidence:l,locations:a,candidates:n}}function O(e,t){return e.priority-t.priority||t.roles.length-e.roles.length||t.reasons.length-e.reasons.length||F(x(e.relativePath))-F(x(t.relativePath))||e.sequence-t.sequence}function T(e,t){return{candidate:e,priority:e.priority,sequence:e.sequence,relativePath:e.relativePath,fileKind:x(e.relativePath),evidenceCharacters:pe(e,t),roles:e.roles,reasons:e.reasons,symbols:e.symbols,behaviorSignals:e.kind==="source"?e.behavior?.signals??[]:[],channel:_(e)}}function _(e){let t=e.roles;return t.includes("location")?"exact-source":t.includes("definition")?"definition":t.includes("caller")?"caller":t.includes("callee")?"callee":t.includes("reference")?x(e.relativePath)==="test"?"test-reference":"production-reference":t.includes("dependency")?"dependency":t.includes("consumer")?"consumer":"search"}function we(e,t){let n=t.filter(i=>i.kind==="source"),r=H(e,{files:f(n.map(i=>i.relativePath))});for(let i of n){i.behavior=V(e,i.relativePath,i.startLine,i.endLine,i.focusLines)??void 0;let o=r.filter(a=>a.source.file===i.relativePath&&a.source.startLine<=i.endLine&&a.source.endLine>=i.startLine),u=o.filter(a=>!Pe(a,o)).map(a=>({observationId:a.id,protocol:a.protocol,action:a.action,role:a.role,strength:a.strength,resolution:a.resolution,line:a.source.startLine,endLine:a.source.endLine,keyParts:a.keyParts.map(l=>({name:l.name,value:l.value,evidence:l.evidence})),derivation:{kind:a.derivation.kind,rule:a.derivation.rule,sourceSpans:a.derivation.sourceSpans.length}}));i.runtimeFacts=u.length>0?u:void 0}}function Pe(e,t){if(e.strength!=="candidate"||e.protocol!=="http")return!1;let n=e.keyParts.find(i=>i.name==="path")?.value,r=e.keyParts.find(i=>i.name==="method")?.value;return n?t.some(i=>{if(i===e||i.action!==e.action||i.role!==e.role||i.source.startLine!==e.source.startLine||i.derivation.rule!=="http.mount-prefix")return!1;let o=i.keyParts.find(a=>a.name==="path")?.value,u=i.keyParts.find(a=>a.name==="method")?.value;return!!(o&&o!==n&&o.endsWith(n)&&(!r||r===u))}):!1}function Re(e,t){for(let n of t){if(n.kind!=="source")continue;let r=X(e,n.relativePath,n.startLine,n.endLine,n.focusLines);r.startLine===n.startLine&&r.endLine===n.endLine||(n.startLine=r.startLine,n.endLine=r.endLine,n.source=U(e,n.relativePath).slice(r.startLine,r.endLine+1).join(`
|
|
1
|
+
import{a as ee,b as ne,c as te}from"./chunk-X3YVZAKZ.js";import{a as Q}from"./chunk-NTGUVNR2.js";import{c as Z}from"./chunk-PXTRBKRK.js";import{a as z,b as W,c as J}from"./chunk-WFA35BGR.js";import{a as Y,d as w}from"./chunk-A4WEAK35.js";import{d as K}from"./chunk-NSM5IEVW.js";import{a as V,d as X}from"./chunk-Y5DFAW5W.js";import{h as H}from"./chunk-NU3KFF2O.js";import{d as E}from"./chunk-BOJ5SVE2.js";import{a as F,b as x}from"./chunk-FLMTCX5R.js";import{y as G}from"./chunk-RBAD4GJ2.js";import{k as U}from"./chunk-ETC674NS.js";import{createHash as ue}from"crypto";var le=6,ve=12,be=48,Ce=2e4,ie=12,L=Number.MAX_SAFE_INTEGER,ye=["definition","callers","callees"],N={search:12,"exact-source":24,definition:24,caller:8,callee:8,"production-reference":6,"test-reference":2,dependency:6,consumer:6};function rn(e,t){if(t.cursor)throw new Error("Inspect no longer accepts semantic packet cursors. Run the original inspect selectors again.");let n=xe(t),r=Ee(e,n),i=r.candidates.sort((c,h)=>O(c,h));n.view==="behavior"&&Re(e,i),ke(e,i),n.view==="behavior"&&we(e,i);let o=ee(i.map(c=>T(c,n.view)),n.evidenceBudgets,(c,h)=>O(c.candidate,h.candidate)),{selected:u,omitted:a}=ne(o.selected,n.maxUnits,n.maxCharacters,(c,h)=>O(c.candidate,h.candidate),n.view==="source"),l=u.map(c=>c.candidate),s=[...o.omitted,...a].map(c=>c.candidate),d=l.map(Ae),m=W(l.map(c=>c.kind==="source"?c.bindingClosure:void 0),l.filter(c=>c.kind==="source").map(c=>({relativePath:c.relativePath,startLine:c.startLine,endLine:c.endLine}))),p=d.reduce((c,h)=>c+(h.kind==="source"?qe(h.source):0),0),g=d.reduce((c,h)=>c+(h.kind==="source"?h.source.length:0),0),y=d.reduce((c,h)=>c+pe(h,n.view),0),v=d.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).map(De),b=i.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).length,fe=d.filter(c=>c.kind==="source"&&(c.roles.includes("search")||c.roles.includes("location"))).length,k=r.searches.map(c=>Me(c,i,l)),ge=Fe(s),A=r.locations.every(c=>c.matched)&&r.evidence.every(c=>c.kind==="matched")&&r.searches.every(c=>Te(c.textCoverage))&&s.every(c=>!c.roles.some(h=>h==="location"||h==="definition")),D=k.reduce((c,h)=>c+h.omittedMatches,0),$=s.length===0&&D===0,B=$?void 0:me(n,!0),j=$e(n,s),Se=Le($,A,s.length+D,j,k,B),q=i.filter(c=>n.view==="behavior"&&c.kind==="source"&&c.roles.some(h=>h==="location"||h==="definition"||h==="search")).map(c=>({id:`inspect:${c.relativePath}:${c.startLine}-${c.endLine}`,label:c.ownerShort??`${c.relativePath}:${c.startLine+1}`,file:c.relativePath,startLine:c.startLine,endLine:c.endLine})),M=q.length>0?Z(e,q):void 0;return{searches:k,evidence:r.evidence,locations:r.locations,slices:v,candidateSlices:b,omittedSlices:b-fe,maxSlices:b,maxTotalLines:p,units:d,candidateUnits:i.length,omittedUnits:s.length,maxUnits:n.maxUnits,maxCharacters:n.maxCharacters,returnedLines:p,returnedCharacters:g,returnedViewCharacters:y,view:n.view,omissionGroups:j,packetCoverage:{mode:$?"complete":"bounded",candidateUnits:i.length,returnedUnits:d.length,omittedUnits:s.length,omittedByRole:ge,exactSelectorsComplete:A,maxUnits:n.maxUnits,maxCharacters:n.maxCharacters,channels:Oe(i,l,n.evidenceBudgets,n.view),...B?{expansionCommand:B}:{}},stoppingSummary:Se,...M&&M.candidateAnchors>0?{causalFrontier:M}:{},bindingClosure:m,continuation:null}}function Le(e,t,n,r,i,o){let u=f([...r.map(a=>a.drillCommand),...i.flatMap(a=>a.exactFollowup?[a.exactFollowup]:[]),...o?[o]:[]]);return e&&t?{queryStatus:"selection-complete",status:"stop-ready",openEvidence:0,guidance:"All evidence requested by this inspect query was materialized.",drillCommands:[]}:t?{queryStatus:"frontier-accounted",status:"relevance-check-required",openEvidence:n,guidance:"Withheld evidence is accounted for by recoverable groups; drill the groups relevant to the current decision.",drillCommands:u}:{queryStatus:"coverage-incomplete",status:"exact-evidence-withheld",openEvidence:n,guidance:"A requested identity, exact source unit, or current-text coverage requirement is unresolved; drill before relying on it.",drillCommands:u}}function xe(e){let t=E(e.searches),n=E(e.symbols),r=E(e.locations),i=t.length+n.length+r.length;if(i===0)throw new Error("inspect requires at least one --search, --symbol, or --at selector.");if(i>24)throw new RangeError(`inspect accepts at most ${24} selectors; received ${i}.`);let o=e.evidence??{};if(e.unitLines!==void 0&&C(e.unitLines,"unitLines"),e.totalLines!==void 0&&C(e.totalLines,"totalLines"),e.sliceLimit!==void 0&&C(e.sliceLimit,"sliceLimit"),e.maxCharacters!==void 0&&C(e.maxCharacters,"maxCharacters"),e.maxUnits!==void 0&&C(e.maxUnits,"maxUnits"),e.view!==void 0&&e.view!=="source"&&e.view!=="behavior")throw new Error(`Unknown inspect view: ${String(e.view)}. Use source or behavior.`);if(e.full&&(e.searchLimit!==void 0||e.maxUnits!==void 0||e.maxCharacters!==void 0||e.evidenceBudgets!==void 0))throw new Error("full inspect cannot be combined with searchLimit, maxUnits, maxCharacters, or evidenceBudgets.");let u=e.full??!1;return{searches:t,symbols:n,locations:r,...e.scope?.trim()?{scope:e.scope.trim()}:{},context:ae(e.context??le,"context"),searchLimit:C(e.searchLimit??(u?L:ve),"searchLimit"),maxUnits:C(u?L:e.maxUnits??be,"maxUnits"),maxCharacters:C(u?L:e.maxCharacters??Ce,"maxCharacters"),evidenceBudgets:u?Ue():Ie(e.evidenceBudgets??N),view:e.view??"source",evidence:{...o.parts?{parts:[...o.parts]}:n.length>0?{parts:[...ye]}:{},...o.referenceContext!==void 0?{referenceContext:ae(o.referenceContext,"referenceContext")}:{},relatedSourceLines:o.relatedSourceLines??60,...o.semantic!==void 0?{semantic:o.semantic}:{}}}}function Ie(e){let t={...N};for(let[n,r]of Object.entries(e)){if(!(n in t))throw new Error(`Unknown inspect evidence channel: ${n}.`);if(!Number.isSafeInteger(r)||(r??-1)<0)throw new RangeError(`Evidence budget ${n} must be a non-negative safe integer; received ${r}.`);t[n]=r}return t}function Ue(){return Object.fromEntries(Object.keys(N).map(e=>[e,L]))}function Ee(e,t){let n=[],r=0,i=te(e,t.searches,{scope:t.scope,context:0,limit:t.searchLimit,ranking:"structural"}).map((s,d)=>({pattern:t.searches[d],result:s,matches:s.matches})),o=Math.max(0,...i.map(s=>s.matches.length));for(let s=0;s<o;s+=1)for(let d of i){let m=d.matches[s];if(!m)continue;let p=w(e,m.relativePath,m.focusLine,L,t.context);p&&I(e,n,p,"search",`search:${d.pattern}`,m.ownerSymbol,m.ownerShort,1,r++)}let u=i.map(({pattern:s,result:d})=>{let m=d.omittedMatches>0?de(s,t.scope):void 0,p=d.fileCoverage??[],g=_e(s,p,t.scope);return{pattern:s,matchingLines:d.matchingLines,returnedMatches:d.matches.length,omittedMatches:d.omittedMatches,matchingFiles:p.length,returnedFiles:p.filter(y=>y.returnedMatches>0).length,omittedFiles:p.filter(y=>y.returnedMatches===0).length,candidateUnits:0,selectedUnits:0,omittedUnits:0,scopeHints:g.slice(0,ie),omittedScopeHints:Math.max(0,g.length-ie),textCoverage:d.textCoverage,...m?{exactFollowup:m}:{}}}),a=t.locations.map(s=>{let d=je(s),m=d?K(e,d.path):null,p=m?w(e,m,d.line-1,L,t.context):null;return p&&I(e,n,p,"location",`at:${s}`,null,null,0,r++),{target:s,matched:p!==null}}),l=t.symbols.map(s=>Q(e,s,t.evidence));for(let s of l)if(s.kind==="matched"){if(s.definition){let d=w(e,s.definition.relativePath,s.definition.startLine,L,t.context);d&&I(e,n,d,"definition",`definition:${s.shortName}`,s.symbol,s.shortName,0,r++)}for(let d of s.referenceWindows){let m=d.references[0];I(e,n,{...d,focusLine:m?.line??d.startLine,unitType:null,unitStartLine:d.startLine,unitEndLine:d.endLine,omittedLines:0},"reference",`reference:${s.shortName}`,m?.enclosingSymbol??null,m?.enclosingShort??null,x(d.relativePath)==="test"?5:4,r++,d.references.map(p=>p.line),s.symbol)}for(let d of s.callers)re(e,n,d,"caller",s,2,r++);for(let d of s.callees)re(e,n,d,"callee",s,3,r++);for(let d of s.dependencies)oe(e,n,"dependency",s.file,d.relativePath,s.symbol,t.context,6,r++);for(let d of s.consumers)oe(e,n,"consumer",d.relativePath,s.file,s.symbol,t.context,7,r++)}return{searches:u,evidence:l,locations:a,candidates:n}}function O(e,t){return e.priority-t.priority||t.roles.length-e.roles.length||t.reasons.length-e.reasons.length||F(x(e.relativePath))-F(x(t.relativePath))||e.sequence-t.sequence}function T(e,t){return{candidate:e,priority:e.priority,sequence:e.sequence,relativePath:e.relativePath,fileKind:x(e.relativePath),evidenceCharacters:pe(e,t),roles:e.roles,reasons:e.reasons,symbols:e.symbols,behaviorSignals:e.kind==="source"?e.behavior?.signals??[]:[],channel:_(e)}}function _(e){let t=e.roles;return t.includes("location")?"exact-source":t.includes("definition")?"definition":t.includes("caller")?"caller":t.includes("callee")?"callee":t.includes("reference")?x(e.relativePath)==="test"?"test-reference":"production-reference":t.includes("dependency")?"dependency":t.includes("consumer")?"consumer":"search"}function we(e,t){let n=t.filter(i=>i.kind==="source"),r=H(e,{files:f(n.map(i=>i.relativePath))});for(let i of n){i.behavior=V(e,i.relativePath,i.startLine,i.endLine,i.focusLines)??void 0;let o=r.filter(a=>a.source.file===i.relativePath&&a.source.startLine<=i.endLine&&a.source.endLine>=i.startLine),u=o.filter(a=>!Pe(a,o)).map(a=>({observationId:a.id,protocol:a.protocol,action:a.action,role:a.role,strength:a.strength,resolution:a.resolution,line:a.source.startLine,endLine:a.source.endLine,keyParts:a.keyParts.map(l=>({name:l.name,value:l.value,evidence:l.evidence})),derivation:{kind:a.derivation.kind,rule:a.derivation.rule,sourceSpans:a.derivation.sourceSpans.length}}));i.runtimeFacts=u.length>0?u:void 0}}function Pe(e,t){if(e.strength!=="candidate"||e.protocol!=="http")return!1;let n=e.keyParts.find(i=>i.name==="path")?.value,r=e.keyParts.find(i=>i.name==="method")?.value;return n?t.some(i=>{if(i===e||i.action!==e.action||i.role!==e.role||i.source.startLine!==e.source.startLine||i.derivation.rule!=="http.mount-prefix")return!1;let o=i.keyParts.find(a=>a.name==="path")?.value,u=i.keyParts.find(a=>a.name==="method")?.value;return!!(o&&o!==n&&o.endsWith(n)&&(!r||r===u))}):!1}function Re(e,t){for(let n of t){if(n.kind!=="source")continue;let r=X(e,n.relativePath,n.startLine,n.endLine,n.focusLines);r.startLine===n.startLine&&r.endLine===n.endLine||(n.startLine=r.startLine,n.endLine=r.endLine,n.source=U(e,n.relativePath).slice(r.startLine,r.endLine+1).join(`
|
|
2
2
|
`),n.unitStartLine=r.startLine,n.unitEndLine=r.endLine,n.omittedLines=0)}}function ke(e,t){for(let n of t)n.kind==="source"&&(n.bindingClosure=z(e,n.relativePath,n.startLine,n.endLine))}function $e(e,t){let n=new Map;for(let r of t){let i=R(r.relativePath),o=_(r),u=[...r.roles].sort().join(","),a=r.kind==="path"?r.relationship:"",l=`${i}|${o}|${u}|${a}`,s=n.get(l)??[];s.push(r),n.set(l,s)}return[...n.entries()].map(([r,i])=>{let o=i[0],u=f(i.flatMap(l=>[...l.roles])).sort(),a=f(i.flatMap(l=>l.kind==="source"?l.behavior?.signals??[]:[])).sort();return{id:`g-${ue("sha256").update(r).digest("hex").slice(0,8)}`,scope:R(o.relativePath),channel:_(o),roles:u,behaviorSignals:a,candidateUnits:i.length,sourceCharacters:i.reduce((l,s)=>l+(s.kind==="source"?s.source.length:0),0),anchors:i.map(l=>({relativePath:l.relativePath,line:l.kind==="source"?l.focusLine:0,ownerShort:l.kind==="source"?l.ownerShort:null,roles:[...l.roles],behaviorSignals:l.kind==="source"?[...l.behavior?.signals??[]]:[]})),drillCommand:Be(e,i)}}).sort((r,i)=>i.candidateUnits-r.candidateUnits||i.sourceCharacters-r.sourceCharacters||r.scope.localeCompare(i.scope)||r.id.localeCompare(i.id))}function Be(e,t){let n=f(t.flatMap(o=>o.reasons.filter(u=>u.startsWith("search:")).map(u=>u.slice(7)))),r=R(t[0].relativePath);if(n.length>0&&t.every(o=>o.kind==="source"&&o.roles.includes("search"))){let o=["scip-query inspect"];for(let u of n)o.push(`--search ${S(u)}`);return o.push(`--scope ${S(r)}`,"--full"),e.view==="behavior"&&o.push("--view behavior"),o.join(" ")}let i=t.filter(o=>o.kind==="source");if(i.length>0&&i.length<=24){let o=["scip-query inspect"];for(let u of i)o.push(`--at ${S(`${u.relativePath}:${u.focusLine+1}`)}`);return e.view==="behavior"&&o.push("--view behavior"),o.join(" ")}return t.length===1&&t[0].kind==="path"?t[0].exactFollowup:me(e,!0)}function Me(e,t,n){let r=`search:${e.pattern}`,i=t.filter(a=>a.reasons.includes(r)).length,o=new Set(n),u=t.filter(a=>a.reasons.includes(r)&&o.has(a)).length;return{...e,candidateUnits:i,selectedUnits:u,omittedUnits:i-u}}function Fe(e){let t={};for(let n of e)for(let r of n.roles)t[r]=(t[r]??0)+1;return t}function Oe(e,t,n,r){let i=e.map(u=>T(u,r).channel),o=t.map(u=>T(u,r).channel);return Object.fromEntries(Object.keys(n).map(u=>{let a=i.filter(s=>s===u).length,l=o.filter(s=>s===u).length;return[u,{candidateUnits:a,returnedUnits:l,omittedUnits:a-l,maxUnits:n[u]}]}))}function Te(e){return!!(e&&e.skippedUnreadablePaths.length===0&&e.skippedOversizedPaths.length===0)}function _e(e,t,n){let r=new Map;for(let i of t){let o=R(i.relativePath),u=r.get(o)??{matchingLines:0,returnedMatches:0};u.matchingLines+=i.matchingLines,u.returnedMatches+=i.returnedMatches,r.set(o,u)}return[...r.entries()].map(([i,o])=>({scope:i,...o,exactFollowup:de(e,i||n)})).sort((i,o)=>o.matchingLines-i.matchingLines||o.returnedMatches-i.returnedMatches||i.scope.localeCompare(o.scope))}function R(e){let t=e.lastIndexOf("/");return t<0?e:e.slice(0,t)}function de(e,t){return`scip-query inspect --search ${S(e)}${t?` --scope ${S(t)}`:""} --full`}function me(e,t){let n=["scip-query inspect"];for(let r of e.searches)n.push(`--search ${S(r)}`);for(let r of e.symbols)n.push(`--symbol ${S(r)}`);for(let r of e.locations)n.push(`--at ${S(r)}`);return e.scope&&n.push(`--scope ${S(e.scope)}`),e.context!==le&&n.push(`--context ${e.context}`),e.evidence.parts&&n.push(`--include ${S(e.evidence.parts.join(","))}`),t&&n.push("--full"),e.view==="behavior"&&n.push("--view behavior"),n.join(" ")}function re(e,t,n,r,i,o,u){I(e,t,{...n,unitType:null,unitStartLine:n.startLine,unitEndLine:n.endLine+n.omittedLines},r,`${r}:${i.shortName}`,n.symbol,n.shortName,o,u,[n.focusLine],i.symbol)}function oe(e,t,n,r,i,o,u,a,l){let s=`${r} -> ${i}`,d=G(e,r).filter(b=>b.sourcePath===i),m=U(e,r),p=Ne(m,d,i),g=p===null?null:Y(e,r,p,Math.min(u,4));if(g){I(e,t,{...g,unitType:null,unitStartLine:g.startLine,unitEndLine:g.endLine,omittedLines:0},n,`${n}:${s}`,null,null,a,l,[g.focusLine],o);return}let y=`scip-query inspect --search ${S(he(i))} --scope ${S(r)}`,v=t.find(b=>b.kind==="path"&&b.relativePath===r&&b.relationship===s);if(v){v.roles=f([...v.roles,n]),v.reasons=f([...v.reasons,`${n}:${s}`]),v.symbols=f([...v.symbols,o]),v.priority=Math.min(v.priority,a);return}t.push({kind:"path",roles:[n],relativePath:r,relationship:s,reasons:[`${n}:${s}`],symbols:[o],exactFollowup:y,priority:a,sequence:l})}function Ne(e,t,n){let r=f(t.flatMap(l=>[l.importedName,l.localName??""]).filter(l=>l.length>1)),i=he(n).replace(/\.[^.]+$/u,""),o=f([...r,i]).filter(Boolean),u=/\b(?:from|import|include|require|use)\b/u,a=e.findIndex(l=>u.test(l)&&o.some(s=>l.includes(s)));return a>=0?a:null}function I(e,t,n,r,i,o,u,a,l,s=[n.focusLine],d){let m=t.find(p=>p.kind==="source"&&p.relativePath===n.relativePath&&p.startLine<=n.endLine&&n.startLine<=p.endLine);if(m){let p=Math.min(m.startLine,n.startLine),g=Math.max(m.endLine,n.endLine);m.startLine=p,m.endLine=g,m.source=U(e,n.relativePath).slice(p,g+1).join(`
|
|
3
3
|
`),m.focusLine=Math.min(m.focusLine,n.focusLine),m.focusLines=ce([...m.focusLines,...s]),m.unitStartLine=Math.min(m.unitStartLine,n.unitStartLine),m.unitEndLine=Math.max(m.unitEndLine,n.unitEndLine),m.omittedLines=Math.max(m.omittedLines,n.omittedLines),m.reasons=f([...m.reasons,i]),m.roles=f([...m.roles,r]),m.symbols=f([...m.symbols,...d?[d]:[]]),!m.ownerSymbol&&o&&(m.ownerSymbol=o),!m.ownerShort&&u&&(m.ownerShort=u),m.priority=Math.min(m.priority,a);return}t.push({kind:"source",...n,reasons:[i],focusLines:ce(s),ownerSymbol:o,ownerShort:u,roles:[r],symbols:d?[d]:[],priority:a,sequence:l})}function Ae(e){if(e.kind==="path"){let{priority:o,sequence:u,...a}=e;return{...a,id:se(a)}}let{priority:t,sequence:n,bindingClosure:r,...i}=e;return{...i,id:se(i),omittedCharacters:0}}function De(e){let{kind:t,id:n,roles:r,symbols:i,omittedCharacters:o,behavior:u,runtimeFacts:a,...l}=e;return l}function se(e){return ue("sha256").update(JSON.stringify(e)).digest("hex").slice(0,16)}function je(e){let t=e.match(/^(.+\.\w+):(\d+)$/u);if(!t)return null;let n=Number(t[2]);return Number.isSafeInteger(n)&&n>0?{path:t[1],line:n}:null}function f(e){return[...new Set(e)]}function ce(e){return f(e).sort((t,n)=>t-n)}function qe(e){return e.length===0?0:e.split(`
|
|
4
4
|
`).length}function pe(e,t){if(e.kind==="path")return e.relationship.length+e.exactFollowup.length;let n="bindingClosure"in e?J(e.bindingClosure):0,r=(e.runtimeFacts??[]).reduce((i,o)=>i+o.action.length+o.derivation.rule.length+o.keyParts.reduce((u,a)=>u+a.name.length+a.value.length+4,0)+24,0);return t!=="behavior"?e.source.length+n:e.behavior?e.behavior.lines.reduce((i,o)=>i+o.text.length+o.signals.join(",").length+12,0)+e.behavior.testCases.reduce((i,o)=>i+o.length+2,0)+r+n:e.source.length+n+r}function he(e){return e.split("/").at(-1)??e}function S(e){return`'${e.replaceAll("'","'\\''")}'`}function C(e,t){if(!Number.isSafeInteger(e)||e<=0)throw new RangeError(`${t} must be a positive safe integer; received ${e}`);return e}function ae(e,t){if(!Number.isSafeInteger(e)||e<0)throw new RangeError(`${t} must be a non-negative safe integer; received ${e}`);return e}export{rn as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-QH22UIXP.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{C as f,I as u}from"./chunk-JZ2A7LDM.js";import b from"ignore";import{existsSync as y,readdirSync as v}from"fs";import{dirname as d,isAbsolute as m,join as l,relative as T,resolve as S}from"path";function E(n){let t=b();return _(n,t)||t.add(F),{isIgnored:e=>g(t,n,e),filter:e=>e.filter(i=>!g(t,n,i))}}function _(n,t){let r=new Set,e=(s,a)=>{if(!(r.has(s)||!y(s)))try{let c=u(s,{maxBytes:f,inputKind:"gitignore file"});t.add(a?$(c,a):c),r.add(s)}catch{}},i=d(n),o=0;for(;i!==d(i)&&o<5&&(e(l(i,".gitignore"),""),!y(l(i,".git")));)i=d(i),o++;return h(n,"",t,e),r.size>0}function h(n,t,r,e){let i=t?l(n,t):n;e(l(i,".gitignore"),t);let o;try{o=v(i,{withFileTypes:!0})}catch{return}for(let s of o){if(!s.isDirectory()||s.name===".git")continue;let a=t?`${t}/${s.name}`:s.name;g(r,n,`${a}/`)||h(n,a,r,e)}}function $(n,t){let r=t.replaceAll("\\","/").replace(/\/+$/,"");return n.split(/\r?\n/).map(e=>A(e,r)).join(`
|
|
2
|
+
`)}function A(n,t){let r=n.trimStart();if(!r||r.startsWith("#"))return n;let e=n.slice(0,n.length-r.length),i=r.startsWith("!"),o=i?r.slice(1):r;if(!o||o.startsWith("#"))return n;let s=o.startsWith("/"),a=s?o.slice(1):o,p=(a.endsWith("/")?a.slice(0,-1):a).includes("/")||s?`${t}/${a}`:`${t}/**/${a}`;return`${e}${i?"!":""}${p}`}var F=`
|
|
3
|
+
# Dependencies
|
|
4
|
+
node_modules/
|
|
5
|
+
vendor/
|
|
6
|
+
.bundle/
|
|
7
|
+
|
|
8
|
+
# Build output
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
out/
|
|
12
|
+
target/
|
|
13
|
+
bin/
|
|
14
|
+
obj/
|
|
15
|
+
|
|
16
|
+
# Python
|
|
17
|
+
__pycache__/
|
|
18
|
+
*.pyc
|
|
19
|
+
*.pyo
|
|
20
|
+
.venv/
|
|
21
|
+
venv/
|
|
22
|
+
.env/
|
|
23
|
+
env/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
|
|
26
|
+
# Rust
|
|
27
|
+
target/
|
|
28
|
+
|
|
29
|
+
# Java / Kotlin / Scala
|
|
30
|
+
*.class
|
|
31
|
+
.gradle/
|
|
32
|
+
.mvn/
|
|
33
|
+
|
|
34
|
+
# C# / .NET
|
|
35
|
+
bin/
|
|
36
|
+
obj/
|
|
37
|
+
packages/
|
|
38
|
+
|
|
39
|
+
# Go
|
|
40
|
+
vendor/
|
|
41
|
+
|
|
42
|
+
# Dart
|
|
43
|
+
.dart_tool/
|
|
44
|
+
build/
|
|
45
|
+
|
|
46
|
+
# PHP
|
|
47
|
+
vendor/
|
|
48
|
+
|
|
49
|
+
# IDE / OS
|
|
50
|
+
.idea/
|
|
51
|
+
.vscode/
|
|
52
|
+
*.swp
|
|
53
|
+
*.swo
|
|
54
|
+
.DS_Store
|
|
55
|
+
Thumbs.db
|
|
56
|
+
|
|
57
|
+
# Type definitions (often noise in queries)
|
|
58
|
+
*.d.ts
|
|
59
|
+
`;function g(n,t,r){let e=x(t,r);if(!e)return!1;try{return n.ignores(e)}catch{return!1}}function x(n,t){if(!t||t===".")return null;if(!m(t)&&!t.startsWith(".."))return t.replaceAll("\\","/");let r=m(t)?t:S(n,t),e=T(n,r).replaceAll("\\","/");return!e||e==="."||e.startsWith("..")?null:e}export{E as a};
|
|
60
|
+
//# sourceMappingURL=chunk-QXCKQTKR.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{A as
|
|
1
|
+
import{A as G,B as Q,D as Qe,E as D,F as oe,G as Ze,H as be,I as et,J as ie,L as tt,e as qe,f as Ve,g as P,h as ze,i as We,j as He,k as q,l as Ke,m as K,n as Je,o as Xe,p as Ye,q as F,s as J,t as A,u as ge,v as Se,w as h,x as he,y as Ge,z as xe}from"./chunk-ZLMXIQLC.js";import{a as ye,c as X,e as Y,h as L}from"./chunk-ETC674NS.js";import{a as Ue,c as U,f as se,i as H}from"./chunk-KNLQGXVH.js";import{Ba as $e,Ca as Be,c as W}from"./chunk-JZ2A7LDM.js";function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qt(e){return e.replace(/'''[\s\S]*?'''/g,w).replace(/"""[\s\S]*?"""/g,w).replace(/#.*$/gm,w).replace(/\/\/.*$/gm,w).replace(/\/\*[\s\S]*?\*\//g,w).replace(/`(?:\\[\s\S]|[^`])*`/g,w).replace(/'(?:\\.|[^'\\\r\n])*'/g,w).replace(/"(?:\\.|[^"\\\r\n])*"/g,w)}function gs(e){return rt(e,{maskStrings:!1})}function Ss(e){return rt(e,{maskStrings:!0})}function rt(e,r){let t="",n=0,s=e.length;for(;n<s;){if(e[n]==="/"&&e[n+1]==="/"){let i=e.indexOf(`
|
|
2
2
|
`,n),a=i===-1?s:i;t+=Ne(e,n,a),n=a;continue}if(e[n]==="/"&&e[n+1]==="*"){let i=e.indexOf("*/",n+2),a=i===-1?s:i+2;t+=Ne(e,n,a),n=a;continue}let o=e[n];if(o==="`"||o==="'"||o==='"'){let i=o,a=n+1;for(;a<s;){if(e[a]==="\\"){a+=2;continue}if(e[a]===i){a+=1;break}if(i!=="`"&&e[a]===`
|
|
3
3
|
`)break;a+=1}t+=r.maskStrings?Ne(e,n,a):e.slice(n,a),n=a;continue}t+=o,n+=1}return t}function Ne(e,r,t){let n="";for(let s=r;s<t;s+=1)n+=e[s]===`
|
|
4
4
|
`?`
|
|
5
5
|
`:" ";return n}function w(e){return e.replace(/[^\r\n]/g," ")}var hs=se("stripped-lines",{clearGroups:["whole-project","source-file"]});Ue({name:"stripped-source-singleton",groups:["whole-project","source-file"],clearAll:()=>{ae=null,Z=""},clearFile:()=>{ae=null,Z=""}});var ae=null,Z="";function Vt(e){return ae===e||(ae=e,Z=qt(e)),Z}function k(e,r,t){let n=Vt(e);return`${n.slice(0,r)}${" ".repeat(t-r)}${n.slice(t)}`}function x(e,r){return new RegExp(`\\b${O(r)}\\b`,"m").test(e)}function V(e,r){let t=new Set,n=new RegExp(`\\b${O(r)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let s of e.matchAll(n)){let o=s[1];o&&t.add(o)}return[...t]}function Ie(e){let r=0;for(let t of e)t==="("&&(r+=1),t===")"&&(r-=1);return r}var nt=new WeakMap,st=new Set(["call_expression","call","decorator","pair","string","string_literal","template_string","variable_declarator"]);function zt(e,r){let t=Array.isArray(r)?r:[r];if(!t.every(o=>st.has(o)))return e.descendantsOfType(r);let n=Wt(e);return t.length===1?n.get(t[0])??[]:t.flatMap(o=>n.get(o)??[]).sort((o,i)=>o.startIndex-i.startIndex)}function _e(e,r){let t=e.walk(),n=0,s=!1;for(;!s;){if(r(t),t.gotoFirstChild()){n+=1;continue}for(;;){if(n===0){s=!0;break}if(t.gotoNextSibling())break;t.gotoParent(),n-=1}}}function Wt(e){let r=nt.get(e);if(r)return r;let t=new Map;return _e(e,n=>{let s=n.nodeType;if(!st.has(s))return;let o=t.get(s);o?o.push(n.currentNode):t.set(s,[n.currentNode])}),nt.set(e,t),t}function it(e,r){r(e);for(let t of e.namedChildren)it(t,r)}var Ht=/(?:function|method|lambda)/u,ot=new WeakMap;function Kt(e){let r=ot.get(e);if(r)return r;let t=[];return _e(e,n=>{if(!n.nodeIsNamed)return;let s=n.nodeType;(s==="arrow_function"||Ht.test(s))&&t.push(n.currentNode)}),ot.set(e,t),t}function Jt(e,r,t){let n=null;for(let s of Kt(e))s.startPosition.row>r||s.endPosition.row<t||(!n||s.endIndex-s.startIndex<n.endIndex-n.startIndex)&&(n=s);return n}function at(e,r,t){if(e.startPosition.row>r||e.endPosition.row<t)return null;for(let n of e.namedChildren){let s=at(n,r,t);if(s)return s}return e}function Xt(e){let r=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(r.type)&&r.namedChildren.length>0;)r=r.namedChildren[0];return r}function Ce(e){if(e.type==="identifier")return e.text;let r=e.childForFieldName("name")??e.childForFieldName("pattern");return r?Ce(r):e.namedChildren.find(t=>t.type==="identifier")?.text??null}function Yt(e){return(e.childForFieldName("parameters")??e.namedChildren.find(t=>/parameters/u.test(t.type)))?.namedChildren.map(Ce)??[]}var Gt=new Set(["if_statement","conditional_expression","ternary_expression","for_statement","for_in_statement","for_of_statement","while_statement","do_statement","switch_case","case_statement","catch_clause","except_clause","elif_clause","match_arm"]);function ct(e){return Gt.has(e.type)?1:e.type==="binary_expression"&&e.parent?.type!=="binary_expression"&&(e.text.includes("&&")||e.text.includes("||"))?Qt(e.text):0}function Qt(e){return(e.match(/&&|\|\|/g)??[]).length}var Zt=new Set(["identifier","type_identifier","field_identifier"]),er=new Set(["identifier"]),tr=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),rr=new Set(["rust","python"]),nr=/\{([^{}]*)\}/g,sr=/\b([A-Za-z_][\w]*)\b/g;function lt(e,r){return or(r).has(e.type)}function pt(e,r){return rr.has(r)&&e.type==="string_content"}function Pe(e){let r=0;for(let n of e.values()){let s=n[n.length-1];s!==void 0&&s>r&&(r=s)}let t=new Array(r+1);for(let n=0;n<=r;n+=1)t[n]=new Set;for(let[n,s]of e)for(let o of s)t[o].add(n);return t}function or(e){return e==="rust"?Zt:e==="python"?er:tr}function ut(e,r){let t=e.startPosition.row;for(let n of e.text.matchAll(nr)){let s=n[1]??"";for(let o of s.matchAll(sr))o[1]&&r(o[1],t)}}var ir=[/\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],ar=/^#!?\[\s*serde\s*\(/,cr=/^#!?\[\s*schemars\s*\(/,lr=/^#!?\[\s*validate\s*\(/,pr=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function mt(e,r,t){if(r!=="typescript"&&r!=="tsx"&&r!=="javascript"||e.type!=="call_expression")return;let n=e.childForFieldName("function")??e.namedChild(0);if(!n)return;let s=be(n);if(!s||!pr.has(s))return;let o=e.namedChildren.find(c=>c.type==="arguments");if(!o)return;let i=o.namedChild(0);if(!i||i.type!=="string")return;let a=i.namedChildren.find(c=>c.type==="string_fragment");a&&t.add(a.text)}function dt(e,r){let t=ar.test(e),n=cr.test(e),s=lr.test(e);if(!(!t&&!n&&!s))for(let o of ir){o.lastIndex=0;let i;for(;(i=o.exec(e))!==null;){let a=i[1],c=a.split("::").pop()??a;c==="is_none"&&/\bOption\b/.test(a)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(a)||c&&r.add(c)}}}function ft(e,r){let t=new Map,n=(i,a)=>{if(i===a)return;let c=t.get(i);c||(c=new Set,t.set(i,c)),c.add(a)},s=r==="python"?new Set(["identifier"]):new Set(["type_identifier"]),o=(i,a)=>{let c=p=>{s.has(p.type)&&p.text!==a&&n(p.text,a);for(let l of p.children)c(l)};for(let p of i.children)c(p)};if(r==="rust")for(let i of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let a=i.namedChildren.find(p=>p.type==="type_identifier")?.text;if(!a)continue;let c=i.namedChildren.find(p=>p.type==="field_declaration_list"||p.type==="enum_variant_list"||p.type==="ordered_field_declaration_list");c&&o(c,a),i.type==="type_item"&&o(i,a)}else if(r==="python")for(let i of e.rootNode.descendantsOfType("class_definition")){let a=i.namedChildren.find(l=>l.type==="identifier")?.text;if(!a)continue;let c=i.childForFieldName("superclasses");c&&o(c,a);let p=i.namedChildren.find(l=>l.type==="block");if(p)for(let l of p.descendantsOfType("type"))for(let u of l.descendantsOfType("identifier"))u.text!==a&&n(u.text,a)}else for(let i of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let a=i.namedChildren.find(c=>c.type==="type_identifier")?.text;a&&o(i,a)}return t}var ur=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),Te=new Set(["catch","comment","def","defprotocol","defrecord","deftype","defmethod","defmacro","defmacro-","defn","defn-","do","doseq","dotimes","fn","for","if","let","loop","ns","quote","recur","throw","try","extend-protocol","extend-type","when","when-let","when-not"]);function gt(e){let r=[],t=[],n=[],s=new Map,o=[],i=0,a=0,c=(p,l)=>{let u=s.get(p);if(!u){s.set(p,[l]);return}u[u.length-1]!==l&&u.push(l)};for(;a<e.length;){let p=e[a];if(p===`
|
|
6
6
|
`){i+=1,a+=1;continue}if(/\s|,/.test(p)){a+=1;continue}if(p===";"){a=le(e,a);continue}if(p==='"'){let f=te(e,a,i);i=f.line,a=f.index;continue}if(p==="("||p==="["||p==="{"){o.push({kind:p,startLine:i,endLine:i,headTokens:[],tokens:[],children:[]}),a+=1;continue}if(p===")"||p==="]"||p==="}"){let f=o.pop();f&&(f.endLine=i,mr(f,{callables:r,callSites:t,clojureMembers:n,recordIdentifier:c}),o[o.length-1]?.children.push(f)),a+=1;continue}if(Ee(p)){a+=1;continue}let l=i,u=a;for(;a<e.length&&!Re(e[a]);)a+=1;let m=e.slice(u,a);if(!m)continue;let d={text:m,line:l};dr(o[o.length-1],d),c(N(m),l)}return{language:"clojure",callables:r,callSites:t,clojureMembers:n,typeContainerMap:new Map,identifierLineMap:s,identifiersByLine:xr(s),fileIdentifiers:new Set(s.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function mr(e,r){if(e.kind!=="("||e.headTokens.length===0)return;let t=e.headTokens[0],n=N(t.text),s=ur.get(t.text);if(s){let i=e.headTokens[1];if(i){let a=N(i.text);r.recordIdentifier(a,i.line),r.callables.push({name:a,startLine:e.startLine,endLine:e.endLine,paramCount:0,params:[],paramsEndLine:i.line,isLiteralPassthrough:!1,clojureKind:s})}}if(fr(e,r),!n||Te.has(t.text)||Te.has(n)||n.startsWith(":"))return;let o=hr(t.text);r.callSites.push({calleeLeaf:o.leaf,calleeQualifier:o.qualifier,calleeText:o.text,memberAccess:!1,line:t.line})}function dr(e,r){e&&(e.headTokens.length<2&&e.headTokens.push(r),e.tokens.length<200&&e.tokens.push(r))}function fr(e,r){let t=N(e.tokens[0]?.text??"");if(t==="defprotocol"){let n=N(e.tokens[1]?.text??"");if(!n)return;for(let s of ce(e))ee(r,n,"protocol",s,"protocol-method");return}if(t==="defrecord"||t==="deftype"){let n=N(e.tokens[1]?.text??"");if(!n)return;let s=t==="defrecord"?"record":"type",o=t==="defrecord"?"record-method":"type-method";for(let i of ce(e))ee(r,n,s,i,o);return}if(t==="extend-type"){let n=N(e.tokens[1]?.text??"");if(!n)return;for(let s of ce(e))ee(r,n,"extension",s,"extension-method");return}if(t==="extend-protocol"){let n=N(e.tokens[1]?.text??"");for(let s of ce(e)){n&&ee(r,n,"extension",s,"extension-method");let o=Sr(e,s.startLine);o&&o!==n&&ee(r,o,"extension",s,"extension-method")}}}function ce(e){return e.children.filter(gr)}function gr(e){if(e.kind!=="(")return!1;let r=N(e.tokens[0]?.text??"");return!!(r&&!Te.has(r)&&!r.startsWith(":"))}function ee(e,r,t,n,s){let o=n.tokens[0],i=N(o?.text??"");!o||!i||(e.recordIdentifier(i,o.line),e.clojureMembers.push({ownerName:r,ownerKind:t,memberName:i,memberKind:s,startLine:n.startLine,endLine:n.endLine}))}function Sr(e,r){let t=null;for(let n=2;n<e.tokens.length;n+=1){let s=e.tokens[n];if(s.line>r)break;let o=N(s.text);o&&!o.startsWith(":")&&(t=o)}return t}function N(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function hr(e){let r=e.replace(/^#?['`~@]+/,""),t=r.lastIndexOf("/"),n=N(r);if(t<=0)return{leaf:n,text:r};let s=r.slice(0,t);return{leaf:n,qualifier:s,text:r}}function le(e,r){let t=r;for(;t<e.length&&e[t]!==`
|
|
7
7
|
`;)t+=1;return t}function te(e,r,t){let n=r+1,s=t;for(;n<e.length;){let o=e[n];if(o==="\\"){n+=2;continue}if(o===`
|
|
8
|
-
`&&(s+=1),n+=1,o==='"')break}return{index:n,line:s}}function Ee(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function Re(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function xr(e){let r=[];for(let[t,n]of e)for(let s of n)r[s]??=new Set,r[s].add(t);return r}var St=
|
|
8
|
+
`&&(s+=1),n+=1,o==='"')break}return{index:n,line:s}}function Ee(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function Re(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function xr(e){let r=[];for(let[t,n]of e)for(let s of n)r[s]??=new Set,r[s].add(t);return r}var St=9,br=se("source-facts",{clearGroups:["whole-project","source-file"]}),Fe=X({kind:"source-facts",invalidation:Y("source-facts"),serialize:Cr,deserialize:Pr});function E(e,r){return Nr(e,r).facts}function Nr(e,r){let t=L(e,r);if(!t)return{facts:null};let n=Ir(e,r,t);return n?br.get(e,r,t,()=>_r(e,r,n,t)):{facts:null}}function Ir(e,r,t){return Q(r)?Qe(e,r,t)?.language??null:G(r)}function _r(e,r,t,n){let s=H(e,r,n),o=Fe.read(e,r,s);if(o&&o.language===t)return{facts:o};if(t==="clojure"){let c=gt(n);return Fe.write(e,r,s,c),{facts:c}}let i=D(e,r);if(!i)return{facts:null,unavailable:{language:t,reason:"parser-unavailable"}};let a=Fr(i,t);return Fe.write(e,r,s,a),{facts:a}}function Cr(e){let r={version:St,language:e.language,callables:e.callables,callSites:e.callSites,clojureMembers:e.clojureMembers,typeContainerMap:[...e.typeContainerMap.entries()].map(([t,n])=>[t,[...n]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(r)}function Pr(e){try{let r=JSON.parse(e);if(r.version!==St||r.language==="clojure"&&(r.clojureMembers===void 0||r.callSites.some(n=>n.calleeText===void 0)))return null;let t=new Map(r.identifierLineMap);return{language:r.language,callables:r.callables,callSites:r.callSites,clojureMembers:r.clojureMembers??[],typeContainerMap:new Map(r.typeContainerMap.map(([n,s])=>[n,new Set(s)])),identifierLineMap:t,identifiersByLine:Pe(t),fileIdentifiers:new Set(t.keys()),rustAttrReferencedNames:new Set(r.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(r.crossLanguageDispatchNames)}}catch{return null}}function Tr(e,r,t,n){let s=E(e,r);return s?Rr(s,t,n)?.isLiteralPassthrough??!0:!0}function Er(e,r){return r.relativePath.includes(".clj-kondo/hooks/")?!0:E(e,r.relativePath)?.callables.find(n=>n.startLine===r.startLine&&n.endLine===r.endLine)?.clojureKind==="macro"}function Rr(e,r,t){return e.callables.find(n=>n.startLine===r&&n.endLine===t)??null}function Fr(e,r){let t=[],n=[],s=new Set,o=new Set,i=new Map,a=(l,u)=>{let m=i.get(l);if(!m){i.set(l,[u]);return}m[m.length-1]!==u&&m.push(u)},c=[],p=l=>{let u=ie(l,r);u&&(u.branches=0,t.push(u),c.push(u));let m=ct(l);if(m>0)for(let f of c)f.branches=(f.branches??0)+m;let d=Ze(l,r);d&&n.push(d),mt(l,r,o),r==="rust"&&(l.type==="attribute_item"||l.type==="inner_attribute_item")&&dt(l.text,s),lt(l,r)&&a(l.text,l.startPosition.row),pt(l,r)&&ut(l,a);for(let f of l.children)p(f);u&&c.pop()};return p(e.rootNode),{language:r,callables:t,callSites:n,clojureMembers:[],typeContainerMap:ft(e,r),identifierLineMap:i,identifiersByLine:Pe(i),fileIdentifiers:new Set(i.keys()),rustAttrReferencedNames:s,crossLanguageDispatchNames:o}}var ht=new Set(["rust","typescript","tsx","javascript","python","clojure"]),Ar=new Set(["rust","typescript","tsx","javascript","python"]);function Lr(e,r){let t=E(e,r);return!t||!ht.has(t.language)?null:t.callables.map(n=>({name:n.name,startLine:n.startLine,endLine:n.endLine}))}function wr(e,r){if(!Ar.has(r))return null;let t=[];for(let n of e.descendantsOfType([...et(r)])){let s=ie(n,r);s&&t.push({name:s.name,startLine:s.startLine,endLine:s.endLine})}return t}function kr(e,r){let t=E(e,r);return!t||!ht.has(t.language)?null:t.callSites}function jr(e,r){return E(e,r)?.typeContainerMap??new Map}function Dr(e,r,t={}){let n=E(e,r);if(!n)return[];let s=[];if(t.includeCrossLanguageDispatchNames)for(let o of n.crossLanguageDispatchNames)s.push({name:o,kind:"cross-language-dispatch",occurrences:1});if(t.includeRustAttributeNames&&n.language==="rust")for(let o of n.rustAttrReferencedNames)s.push({name:o,kind:"rust-attribute",occurrences:1});return s}import{basename as xt}from"path";var Or=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function y(e){let r=[],t=0,n=0;for(let s=0;s<e.length;s++){let o=e[s];(o==="{"||o==="["||o==="(")&&t++,(o==="}"||o==="]"||o===")")&&t--,o===","&&t===0&&(r.push(e.slice(n,s)),n=s+1)}return r.push(e.slice(n)),r}function b(e,r){for(let t of e.namedChildren)if(t.type===r)return t;return null}function S(e,r){let t=new Set,n=(s,o)=>{let i=o||r.has(s.type);!i&&Or.has(s.type)&&t.add(s.text);for(let a of s.children)n(a,i)};return n(e.rootNode,!1),t}function T(e,r,t,n,s,o,i){return{importedName:s,localName:o,sourcePath:i??h(e,n,Ye(r)),kind:"named",used:x(t,o),usedMembers:[]}}function g(e,r,t,n,s="named",o={}){return{importedName:e,localName:r,sourcePath:t,kind:s,used:n.has(r),usedMembers:[],isTypeOnly:o.isTypeOnly}}function R(e,r,t,n,s="named",o=[],i={}){return{importedName:e,localName:r,sourcePath:t,kind:s,used:n,usedMembers:o,isTypeOnly:i.isTypeOnly}}function M(e,r){return{importedName:e,localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]}}function v(e,r,t={}){return{importedName:e,localName:t.localName??null,sourcePath:r,kind:"namespace",used:t.used??!0,usedMembers:t.usedMembers??[],isTypeOnly:t.isTypeOnly}}function I(e,r,t){let n=[];for(let s of e.matchAll(r)){let o=s[0];if(!o||typeof s.index!="number")continue;let i=k(e,s.index,s.index+o.length);for(let a of t(s,i))n.push(a)}return n}function _(e,r,t,n,s){let o=oe(e,r,s);if(o){let i=t(o);if(i)return i}return n()}function pe(e,r,t,n,s){let o=oe(e,r,s),i=G(r),a=i?t[i]:void 0;return o&&a?a(o):n()}function yt(e,r,t){return _(e,r,n=>vr(e,r,n),()=>Mr(e,r,t),t)}function Mr(e,r,t){return I(t,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(n,s)=>{let o=n[1]?.trim();if(!o)return[];let i=xt(o).replace(/\.[^.]+$/,"");return[R(o,i,Se(e,r,o),x(s,i))]})}function vr(e,r,t){let n=S(t,new Set(["preproc_include"])),s=[];for(let o of t.rootNode.descendantsOfType("preproc_include")){let i=null;for(let c of o.namedChildren){if(c.type==="system_lib_string"){i=c.text.replace(/^<|>$/g,"");break}if(c.type==="string_literal"){i=c.namedChildren.find(l=>l.type==="string_content")?.text??c.text.replace(/^"|"$/g,"");break}}if(!i)continue;let a=xt(i).replace(/\.[^.]+$/,"");s.push(g(i,a,Se(e,r,i),n))}return s}var $r=new Set([":require",":require-macros",":use"]),we=String.raw`A-Za-z0-9_$*+!?.<>=-`;function Nt(e,r,t){let n=Yr(t);if(!n)return[];let s=Xr(t,n.start,n.end),o=[];for(let i of n.children.slice(2)){if(i.type!=="list"||i.children.length===0)continue;let a=C(i.children[0]);if(a){if($r.has(a)){for(let c of qr(i.children.slice(1)))o.push(...Ur(e,c,s));continue}if(a===":import")for(let c of zr(i.children.slice(1)))o.push(c)}}return o}function Br(e){return e.type==="list"&&C(e.children[0])==="ns"}function Ur(e,r,t){let n=Ge(e,r.namespace),s=r.alias??r.namespace,o=Hr(t,s),i=[{importedName:r.namespace,localName:s,sourcePath:n,kind:"namespace",used:r.refers.length>0||r.referAll||o.length>0||Kr(t,r.namespace),usedMembers:o}];r.referAll&&i.push({importedName:"*",localName:null,sourcePath:n,kind:"side-effect",used:!0,usedMembers:[]});for(let a of r.refers)i.push({importedName:a,localName:a,sourcePath:n,kind:"named",used:Jr(t,a),usedMembers:[]});return i}function qr(e){return e.flatMap(r=>ue(r,null))}function ue(e,r){if(e.type==="atom")return e.text.startsWith(":")?[]:[{namespace:Le(r,e.text),alias:null,refers:[],referAll:!1}];if(e.type==="vector")return e.children.length>0&&C(e.children[0])===null?e.children.flatMap(t=>ue(t,r)):Vr(e,r);if(e.type==="list"&&e.children.length>0){let t=C(e.children[0]);return t?!t||t.startsWith(":")?[]:e.children.slice(1).flatMap(n=>ue(n,Le(r,t))):e.children.flatMap(n=>ue(n,r))}return[]}function Vr(e,r){let t=C(e.children[0]);if(!t||t.startsWith(":"))return[];let n={namespace:Le(r,t),alias:null,refers:[],referAll:!1};for(let s=1;s<e.children.length;s+=1){let o=C(e.children[s]);if(!o?.startsWith(":"))continue;let i=e.children[s+1];if((o===":as"||o===":as-alias")&&i){n.alias=C(i),s+=1;continue}o===":refer"&&i&&(C(i)===":all"?n.referAll=!0:(i.type==="vector"||i.type==="list")&&n.refers.push(...i.children.map(C).filter(Wr)),s+=1)}return[n]}function zr(e){let r=[];for(let t of e){if(t.type==="atom"){let s=t.text.split(".").pop()??t.text;r.push(R(s,s,null,!0));continue}if(t.type!=="vector")continue;let n=C(t.children[0]);if(n)for(let s of t.children.slice(1)){let o=C(s);o&&r.push(R(`${n}.${o}`,o,null,!0))}}return r}function Le(e,r){return e?`${e}.${r}`:r}function C(e){return e?.type==="atom"?e.text:null}function Wr(e){return!!(e&&!e.startsWith(":"))}function Hr(e,r){let t=new Set,n=new RegExp(`${ke()}${O(r)}\\s*/\\s*([${we}]+)`,"g");for(let s of e.matchAll(n)){let o=s[1];o&&t.add(o)}return[...t]}function Kr(e,r){return new RegExp(`${ke()}${O(r)}\\s*/`,"m").test(e)}function Jr(e,r){return new RegExp(`${ke()}${O(r)}(?![${we}])`,"m").test(e)}function ke(){return`(?<![${we}])`}function Xr(e,r,t){let n="",s=0;for(;s<e.length;){if(s>=r&&s<t){n+=e[s]===`
|
|
9
9
|
`?`
|
|
10
|
-
`:" ",s+=1;continue}let o=e[s];if(o===";"){let i=le(e,s);n+=bt(e.slice(s,i)),s=i;continue}if(o==='"'){let i=te(e,s,0).index;n+=bt(e.slice(s,i)),s=i;continue}n+=o,s+=1}return n}function Yr(e){let r=0;for(;r<e.length&&(r=De(e,r),!(r>=e.length));){let t=me(e,r);if(!t){r+=1;continue}if(Br(t.form))return t.form;r=t.index}return null}function me(e,r){let t=De(e,r);if(e.startsWith("#?@",t)||e.startsWith("#?",t))return Gr(e,t);if(e.startsWith("#_",t)){let s=me(e,t+2);return s?{form:{type:"atom",text:"",start:t,end:s.index},index:s.index}:null}for(;Ee(e[t]);)t+=1;let n=e[t];return n?n==="("?Ae(e,t,"list",")"):n==="["?Ae(e,t,"vector","]"):n==="{"?Ae(e,t,"map","}"):n==='"'?{form:{type:"atom",text:"",start:t,end:te(e,t,0).index},index:te(e,t,0).index}:Zr(e,t):null}function Gr(e,r){let t=e.startsWith("#?@",r)?3:2,n=me(e,r+t);return n?{form:{type:"list",children:n.form.type==="list"||n.form.type==="vector"||n.form.type==="map"?Qr(n.form.children):[],start:r,end:n.index},index:n.index}:null}function Qr(e){let r=[];for(let t=0;t<e.length;t+=2){let n=C(e[t]),s=e[t+1];n?.startsWith(":")&&s&&r.push(s)}return r}function Ae(e,r,t,n){let s=[],o=r+1;for(;o<e.length;){if(o=De(e,o),e[o]===n)return{form:{type:t,children:s,start:r,end:o+1},index:o+1};let i=me(e,o);if(!i){o+=1;continue}i.form.type==="atom"&&i.form.text===""||s.push(i.form),o=i.index}return{form:{type:t,children:s,start:r,end:e.length},index:e.length}}function Zr(e,r){let t=r;for(;t<e.length&&!Re(e[t]);)t+=1;return{form:{type:"atom",text:e.slice(r,t),start:r,end:t},index:t}}function De(e,r){let t=r;for(;t<e.length;){let n=e[t];if(/\s|,/.test(n)){t+=1;continue}if(n===";"){t=le(e,t);continue}break}return t}function bt(e){return e.replace(/[^\r\n]/g," ")}function It(e,r,t){let n=[];for(let s of t.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let o=s[1]?.trim(),i=s[2]?.trim()??null,a=s[0];if(!o||!a||typeof s.index!="number")continue;let c=k(t,s.index,s.index+a.length);n.push({importedName:o,localName:i,sourcePath:he(e,r,o),kind:i?"namespace":"side-effect",used:i?x(c,i):!0,usedMembers:i?V(c,i):[]})}return n}function _t(e,r,t){let n=[];for(let s of t.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let o=s[1]?.trim();o&&n.push({specifier:o,sourcePath:he(e,r,o)})}return n}function Ct(e,r,t){return pe(e,r,{csharp:n=>tn(e,r,n),vb:n=>en(e,r,n)},()=>{let n=Xe(r)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return I(t,n,(s,o)=>{let i=s[1]?.trim();if(!i)return[];let[a,c]=i.split(/\s*=\s*/),p=!!c,l=(p?c:a)?.trim()??i,u=l.split(".").pop()??l,m=p?a?.trim()??u:u;return[T(e,r,o,l,u,m,h(e,l,q))]})},t)}function en(e,r,t){let n=S(t,new Set(["imports_statement"])),s=[];for(let o of t.rootNode.descendantsOfType("imports_statement")){let i=o.namedChildren.filter(m=>m.type==="namespace_name");if(i.length===0)continue;let a=i[i.length-1],c=i.length>1?i[0]:null,p=a.text,l=p.split(".").pop()??p,u=c?.text??l;s.push(g(l,u,h(e,p,q),n,c?"namespace":"named"))}return s}function tn(e,r,t){let n=S(t,new Set(["using_directive"])),s=[];for(let o of t.rootNode.descendantsOfType("using_directive")){let i=o.namedChildren;if(i.length===0)continue;let a=null,c;i.length>=2&&i[0].type==="identifier"&&(i[1].type==="qualified_name"||i[1].type==="identifier")?(a=i[0],c=i[1]):c=i[i.length-1];let p=c.text,l=p.split(".").pop()??p,u=a?.text??l;s.push(g(l,u,h(e,p,q),n,a?"namespace":"named"))}return s}var rn=U("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function Pt(e,r){return rn.get(e,r,()=>{let t=new Set,n=L(e,r);if(!n)return t;let o=n.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))t.add(i[0]);return t})}function je(e,r,t){return _(e,r,n=>sn(e,r,n),()=>nn(e,r,t),t)}function nn(e,r,t){return Sn(t).flatMap(n=>hn(e,r,n.clause,n.specifier,n.start,n.end,t))}function sn(e,r,t){let n=on(e,r,t),s=[];for(let o of t.rootNode.descendantsOfType("import_statement"))s.push(...an(e,r,t,o,n));return s}function on(e,r,t){let n=S(t,new Set(["import_statement"]));if(Q(r))for(let s of Pt(e,r))n.add(s);return n}function an(e,r,t,n,s){let o=mn(n);if(!o)return[];let i=F(e,r,o),a=b(n,"import_clause");return a?cn(t,a,i,s,dn(n.text)):[M("*",i)]}function cn(e,r,t,n,s){let o=[];for(let i of r.namedChildren)if(i.type==="identifier")o.push(ln(i.text,t,n,s));else if(i.type==="namespace_import"){let a=pn(e,i,t,n,s);a&&o.push(a)}else i.type==="named_imports"&&o.push(...un(i,t,n,s));return o}function ln(e,r,t,n){return g("default",e,r,t,"default",{isTypeOnly:n})}function pn(e,r,t,n,s){let i=b(r,"identifier")?.text??"";if(!i)return null;let a=gn(e,i);return v("*",t,{localName:i,usedMembers:a,isTypeOnly:s,used:a.length>0||n.has(i)})}function un(e,r,t,n){let s=[];for(let o of e.namedChildren){if(o.type!=="import_specifier")continue;let i=o.namedChild(0),a=o.namedChild(1);if(!i)continue;let c=i.text,p=a?.text??c;s.push(g(c,p,r,t,"named",{isTypeOnly:n||fn(o.text)}))}return s}function mn(e){let r=b(e,"string");if(!r)return null;let t=b(r,"string_fragment");return t?t.text:null}function dn(e){return/^\s*import\s+type\b/.test(e)}function fn(e){return/^\s*type\b/.test(e.trim())}function gn(e,r){let t=new Set;for(let n of e.rootNode.descendantsOfType("member_expression")){let s=n.namedChild(0),o=n.namedChild(1);!s||!o||s.type!=="identifier"||s.text!==r||(o.type==="property_identifier"||o.type==="identifier")&&t.add(o.text)}return[...t]}function Sn(e){let r=[],t=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(t)){let o=s[0],i=s[1],a=s[2];!o||!a||typeof s.index!="number"||r.push({clause:i,specifier:a,start:s.index,end:s.index+o.length})}let n=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(n)){let o=s[0],i=s[1];!o||!i||typeof s.index!="number"||r.push({clause:null,specifier:i,start:s.index,end:s.index+o.length})}return r.sort((s,o)=>s.start-o.start)}function hn(e,r,t,n,s,o,i){let a=F(e,r,n),c=k(i,s,o);return t?xn(t).map(l=>({...l,sourcePath:a})).map(l=>{if(l.kind==="namespace"){let u=V(c,l.localName);return v(l.importedName,l.sourcePath,{localName:l.localName,usedMembers:u,used:u.length>0||x(c,l.localName),isTypeOnly:l.isTypeOnly})}return l.kind==="side-effect"?M(l.importedName,l.sourcePath):R(l.importedName,l.localName??"",l.sourcePath,l.localName?x(c,l.localName):!1,l.kind,[],{isTypeOnly:l.isTypeOnly})}):[M("*",a)]}function xn(e){let r=e.trim(),t=/^type\b/.test(r),n=r.replace(/^type\s+/,""),[s,o]=yn(n),i=[];return s&&i.push(...Tt(s,t)),o&&i.push(...Tt(o,t)),i}function Tt(e,r){let t=e.trim();if(!t)return[];if(t.startsWith("{")){let n=t.slice(1,-1).trim();return n?y(n).map(s=>{let o=s.trim(),i=r||/^type\b/.test(o),a=o.replace(/^type\s+/,""),[c,p]=a.split(/\s+as\s+/);return{importedName:c.trim(),localName:(p??c).trim(),kind:"named",isTypeOnly:i}}):[]}return t.startsWith("* as ")?[{importedName:"*",localName:t.slice(5).trim(),kind:"namespace",isTypeOnly:r}]:[{importedName:"default",localName:t,kind:"default",isTypeOnly:r}]}function yn(e){let r=0;for(let t=0;t<e.length;t++){let n=e[t];if(n==="{"&&r++,n==="}"&&r--,n===","&&r===0)return[e.slice(0,t).trim(),e.slice(t+1).trim()]}return[e.trim(),null]}function Oe(e,r,t){let n=j(e,r);return n?Pn(e,r,n):bn(e,r,t)}function bn(e,r,t){return[...Nn(e,r,t),...In(e,r,t),..._n(e,r,t)]}function Nn(e,r,t){let n=[],s=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[1]??"",a=o[2]??"",c=y(i).map(u=>Cn(u.trim())).filter(u=>!!u),p=z(t,o.index),l=z(t,o.index+o[0].length-1);n.push({kind:"named",sourcePath:F(e,r,a),names:c,startLine:p,endLine:l})}return n}function In(e,r,t){let n=[],s=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[2]??"",a=z(t,o.index),c=z(t,o.index+o[0].length-1);n.push({kind:"star-as",sourcePath:F(e,r,i),names:o[1]?[o[1]]:[],startLine:a,endLine:c})}return n}function _n(e,r,t){let n=[],s=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[1]??"",a=z(t,o.index),c=z(t,o.index+o[0].length-1);n.push({kind:"star",sourcePath:F(e,r,i),names:[],startLine:a,endLine:c})}return n}function Cn(e){if(!e)return null;let r=e.replace(/^type\s+/,"").trim();if(!r)return null;let t=r.match(/^(\w+)\s+as\s+(\w+)$/);if(t)return t[2]??null;let n=r.match(/^(\w+)$/);return n?n[1]??null:null}function z(e,r){let t=0;for(let n=0;n<r&&n<e.length;n++)e.charCodeAt(n)===10&&t++;return t}function Pn(e,r,t){let n=[];for(let s of t.rootNode.descendantsOfType("export_statement")){let o=Tn(e,r,s);if(o===void 0)continue;let i=s.startPosition.row,a=s.endPosition.row,c=En(s,o,i,a);n.push(c)}return n}function Tn(e,r,t){let n=b(t,"string");if(!n)return;let s=b(n,"string_fragment");if(s)return F(e,r,s.text)}function En(e,r,t,n){let s=b(e,"export_clause");if(s){let i=[];for(let a of s.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),p=a.namedChild(1);c&&i.push((p??c).text)}return{kind:"named",sourcePath:r,names:i,startLine:t,endLine:n}}let o=b(e,"namespace_export");if(o){let i=o.namedChildren.find(a=>a.type==="identifier"||a.type==="type_identifier")?.text;return{kind:"star-as",sourcePath:r,names:i?[i]:[],startLine:t,endLine:n}}return{kind:"star",sourcePath:r,names:[],startLine:t,endLine:n}}function Et(e,r,t){return pe(e,r,{java:n=>Rn(e,r,n),kotlin:n=>Fn(e,r,n),scala:n=>An(e,r,n)},()=>I(t,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(n,s)=>{let o=n[1]?.trim();return o?Ln(e,r,o,s):[]}),t)}function Rn(e,r,t){let n=S(t,new Set(["import_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("import_declaration")){let i=o.children.some(u=>u.type==="asterisk"),c=o.namedChildren.find(u=>u.type==="scoped_identifier")??o.namedChildren.find(u=>u.type==="identifier");if(!c)continue;let p=c.text;if(i){s.push(v("*",h(e,p,P)));continue}let l=p.split(".").pop()??p;s.push(g(l,l,h(e,p,P),n))}return s}function Fn(e,r,t){let n=S(t,new Set(["import_header","import_list"])),s=[];for(let o of t.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"),c=o.namedChildren.find(d=>d.type==="import_alias");if(a){s.push(v("*",h(e,i.text,P)));continue}let p=i.text,l=p.split(".").pop()??p,m=c?.namedChild(0)?.text??l;s.push(g(l,m,h(e,p,P),n))}return s}function An(e,r,t){let n=S(t,new Set(["import_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("import_declaration")){let i=o.namedChildren.find(u=>u.type==="namespace_selectors"||u.type==="namespace_wildcard"),a=o.namedChildren.filter(u=>u!==i&&(u.type==="identifier"||u.type==="stable_identifier")),c=a.map(u=>u.text).join(".");if(!c)continue;if(i?.type==="namespace_wildcard"){s.push(v("*",h(e,c,P)));continue}if(i?.type==="namespace_selectors"){for(let u of i.namedChildren)if(u.type==="arrow_renamed_identifier"){let[m,d]=u.namedChildren;if(!m)continue;let f=m.text,$=d?.text??f;if(f==="_")continue;s.push(g(f,$,h(e,`${c}.${f}`,P),n))}else if(u.type==="identifier"){let m=u.text;s.push(g(m,m,h(e,`${c}.${m}`,P),n))}continue}let p=a[a.length-1]?.text??c,l=a.slice(0,-1).map(u=>u.text).join(".")||c;s.push(g(p,p,h(e,l&&a.length>1?`${l}.${p}`:c,P),n))}return s}function Ln(e,r,t,n){if(t.includes("{")&&t.includes("}")){let s=t.slice(0,t.indexOf("{")).replace(/\.$/,"").trim(),o=t.slice(t.indexOf("{")+1,t.lastIndexOf("}")).trim();return y(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[c,p]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),l=c?.trim();if(!l||l==="_")return[];let u=(p??l.split(".").pop()??l).trim(),m=l==="_"?s:`${s}.${l}`.replace(/\.\./g,".");return[T(e,r,n,m,l,u)]})}return[T(e,r,n,t,t.split(".").pop()??t,t.split(".").pop()??t)]}function Ft(e,r,t){return _(e,r,n=>wn(e,r,n),()=>I(t,/^[ \t]*use\s+(.+?)\s*;$/gm,(n,s)=>{let o=n[1]?.trim();return o?y(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[c,p]=a.split(/\s+as\s+/i),l=c?.trim()??a,u=l.split("\\").pop()??l,m=(p??u).trim();return[T(e,r,s,l,u,m,h(e,l.replace(/\\/g,"."),K))]}):[]}),t)}function wn(e,r,t){let n=S(t,new Set(["namespace_use_declaration"])),s=[],o=(i,a,c)=>{s.push(g(a,c,h(e,i.replace(/\\/g,"."),K),n))};for(let i of t.rootNode.descendantsOfType("namespace_use_declaration")){let a=i.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=i.namedChildren.find(p=>p.type==="namespace_name")?.text??"";for(let p of a.namedChildren){if(p.type!=="namespace_use_clause")continue;let{importedName:l,localName:u,qualified:m}=Rt(p,c);l&&o(m,l,u)}continue}for(let c of i.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:p,localName:l,qualified:u}=Rt(c,"");p&&o(u,p,l)}}return s}function Rt(e,r){let t=e.namedChildren.find(p=>p.type==="qualified_name"),n=e.namedChildren.filter(p=>p.type==="name"),s="";t?s=t.text:n.length>=1&&(s=n[0].text);let o=t&&n.length>0?n[n.length-1]:null,i=s.split("\\").pop()??s,a=o?.text??i,c=r?`${r}\\${s}`:s;return{importedName:i,localName:a,qualified:c}}function Lt(e,r,t){return _(e,r,n=>kn(e,r,n),()=>jn(t).flatMap(n=>Mn(e,r,n,t)),t)}function kn(e,r,t){let n=S(t,new Set(["import_statement","import_from_statement"])),s=[];for(let o of t.rootNode.descendantsOfType("import_statement"))for(let i of o.namedChildren){let a=At(i);if(!a)continue;let c=J(e,r,a.qualifiedName);s.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:n.has(a.localName),usedMembers:[]})}for(let o of t.rootNode.descendantsOfType("import_from_statement")){let i=o.namedChild(0);if(!i)continue;let a=Dn(i);if(a===null)continue;let c=J(e,r,a);for(let p=1;p<o.namedChildCount;p+=1){let l=o.namedChild(p);if(l.type==="wildcard_import"){s.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let u=At(l);u&&s.push({importedName:u.qualifiedName,localName:u.localName,sourcePath:c,kind:"named",used:n.has(u.localName),usedMembers:[]})}}return s}function At(e){if(e.type==="aliased_import"){let r=e.namedChild(0),t=e.namedChild(1);return!r||!t?null:{qualifiedName:r.text,localName:t.text}}if(e.type==="dotted_name"){let r=e.text;return{qualifiedName:r,localName:r.split(".")[0]??r}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function Dn(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let r=b(e,"import_prefix")?.text??"",t=b(e,"dotted_name")?.text??"";return`${r}${t}`}return null}function jn(e){let r=e.split(`
|
|
10
|
+
`:" ",s+=1;continue}let o=e[s];if(o===";"){let i=le(e,s);n+=bt(e.slice(s,i)),s=i;continue}if(o==='"'){let i=te(e,s,0).index;n+=bt(e.slice(s,i)),s=i;continue}n+=o,s+=1}return n}function Yr(e){let r=0;for(;r<e.length&&(r=je(e,r),!(r>=e.length));){let t=me(e,r);if(!t){r+=1;continue}if(Br(t.form))return t.form;r=t.index}return null}function me(e,r){let t=je(e,r);if(e.startsWith("#?@",t)||e.startsWith("#?",t))return Gr(e,t);if(e.startsWith("#_",t)){let s=me(e,t+2);return s?{form:{type:"atom",text:"",start:t,end:s.index},index:s.index}:null}for(;Ee(e[t]);)t+=1;let n=e[t];return n?n==="("?Ae(e,t,"list",")"):n==="["?Ae(e,t,"vector","]"):n==="{"?Ae(e,t,"map","}"):n==='"'?{form:{type:"atom",text:"",start:t,end:te(e,t,0).index},index:te(e,t,0).index}:Zr(e,t):null}function Gr(e,r){let t=e.startsWith("#?@",r)?3:2,n=me(e,r+t);return n?{form:{type:"list",children:n.form.type==="list"||n.form.type==="vector"||n.form.type==="map"?Qr(n.form.children):[],start:r,end:n.index},index:n.index}:null}function Qr(e){let r=[];for(let t=0;t<e.length;t+=2){let n=C(e[t]),s=e[t+1];n?.startsWith(":")&&s&&r.push(s)}return r}function Ae(e,r,t,n){let s=[],o=r+1;for(;o<e.length;){if(o=je(e,o),e[o]===n)return{form:{type:t,children:s,start:r,end:o+1},index:o+1};let i=me(e,o);if(!i){o+=1;continue}i.form.type==="atom"&&i.form.text===""||s.push(i.form),o=i.index}return{form:{type:t,children:s,start:r,end:e.length},index:e.length}}function Zr(e,r){let t=r;for(;t<e.length&&!Re(e[t]);)t+=1;return{form:{type:"atom",text:e.slice(r,t),start:r,end:t},index:t}}function je(e,r){let t=r;for(;t<e.length;){let n=e[t];if(/\s|,/.test(n)){t+=1;continue}if(n===";"){t=le(e,t);continue}break}return t}function bt(e){return e.replace(/[^\r\n]/g," ")}function It(e,r,t){let n=[];for(let s of t.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let o=s[1]?.trim(),i=s[2]?.trim()??null,a=s[0];if(!o||!a||typeof s.index!="number")continue;let c=k(t,s.index,s.index+a.length);n.push({importedName:o,localName:i,sourcePath:he(e,r,o),kind:i?"namespace":"side-effect",used:i?x(c,i):!0,usedMembers:i?V(c,i):[]})}return n}function _t(e,r,t){let n=[];for(let s of t.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let o=s[1]?.trim();o&&n.push({specifier:o,sourcePath:he(e,r,o)})}return n}function Ct(e,r,t){return pe(e,r,{csharp:n=>tn(e,r,n),vb:n=>en(e,r,n)},()=>{let n=Xe(r)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return I(t,n,(s,o)=>{let i=s[1]?.trim();if(!i)return[];let[a,c]=i.split(/\s*=\s*/),p=!!c,l=(p?c:a)?.trim()??i,u=l.split(".").pop()??l,m=p?a?.trim()??u:u;return[T(e,r,o,l,u,m,h(e,l,q))]})},t)}function en(e,r,t){let n=S(t,new Set(["imports_statement"])),s=[];for(let o of t.rootNode.descendantsOfType("imports_statement")){let i=o.namedChildren.filter(m=>m.type==="namespace_name");if(i.length===0)continue;let a=i[i.length-1],c=i.length>1?i[0]:null,p=a.text,l=p.split(".").pop()??p,u=c?.text??l;s.push(g(l,u,h(e,p,q),n,c?"namespace":"named"))}return s}function tn(e,r,t){let n=S(t,new Set(["using_directive"])),s=[];for(let o of t.rootNode.descendantsOfType("using_directive")){let i=o.namedChildren;if(i.length===0)continue;let a=null,c;i.length>=2&&i[0].type==="identifier"&&(i[1].type==="qualified_name"||i[1].type==="identifier")?(a=i[0],c=i[1]):c=i[i.length-1];let p=c.text,l=p.split(".").pop()??p,u=a?.text??l;s.push(g(l,u,h(e,p,q),n,a?"namespace":"named"))}return s}var rn=U("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function Pt(e,r){return rn.get(e,r,()=>{let t=new Set,n=L(e,r);if(!n)return t;let o=n.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))t.add(i[0]);return t})}function De(e,r,t){return _(e,r,n=>sn(e,r,n),()=>nn(e,r,t),t)}function nn(e,r,t){return Sn(t).flatMap(n=>hn(e,r,n.clause,n.specifier,n.start,n.end,t))}function sn(e,r,t){let n=on(e,r,t),s=[];for(let o of t.rootNode.descendantsOfType("import_statement"))s.push(...an(e,r,t,o,n));return s}function on(e,r,t){let n=S(t,new Set(["import_statement"]));if(Q(r))for(let s of Pt(e,r))n.add(s);return n}function an(e,r,t,n,s){let o=mn(n);if(!o)return[];let i=F(e,r,o),a=b(n,"import_clause");return a?cn(t,a,i,s,dn(n.text)):[M("*",i)]}function cn(e,r,t,n,s){let o=[];for(let i of r.namedChildren)if(i.type==="identifier")o.push(ln(i.text,t,n,s));else if(i.type==="namespace_import"){let a=pn(e,i,t,n,s);a&&o.push(a)}else i.type==="named_imports"&&o.push(...un(i,t,n,s));return o}function ln(e,r,t,n){return g("default",e,r,t,"default",{isTypeOnly:n})}function pn(e,r,t,n,s){let i=b(r,"identifier")?.text??"";if(!i)return null;let a=gn(e,i);return v("*",t,{localName:i,usedMembers:a,isTypeOnly:s,used:a.length>0||n.has(i)})}function un(e,r,t,n){let s=[];for(let o of e.namedChildren){if(o.type!=="import_specifier")continue;let i=o.namedChild(0),a=o.namedChild(1);if(!i)continue;let c=i.text,p=a?.text??c;s.push(g(c,p,r,t,"named",{isTypeOnly:n||fn(o.text)}))}return s}function mn(e){let r=b(e,"string");if(!r)return null;let t=b(r,"string_fragment");return t?t.text:null}function dn(e){return/^\s*import\s+type\b/.test(e)}function fn(e){return/^\s*type\b/.test(e.trim())}function gn(e,r){let t=new Set;for(let n of e.rootNode.descendantsOfType("member_expression")){let s=n.namedChild(0),o=n.namedChild(1);!s||!o||s.type!=="identifier"||s.text!==r||(o.type==="property_identifier"||o.type==="identifier")&&t.add(o.text)}return[...t]}function Sn(e){let r=[],t=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(t)){let o=s[0],i=s[1],a=s[2];!o||!a||typeof s.index!="number"||r.push({clause:i,specifier:a,start:s.index,end:s.index+o.length})}let n=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of e.matchAll(n)){let o=s[0],i=s[1];!o||!i||typeof s.index!="number"||r.push({clause:null,specifier:i,start:s.index,end:s.index+o.length})}return r.sort((s,o)=>s.start-o.start)}function hn(e,r,t,n,s,o,i){let a=F(e,r,n),c=k(i,s,o);return t?xn(t).map(l=>({...l,sourcePath:a})).map(l=>{if(l.kind==="namespace"){let u=V(c,l.localName);return v(l.importedName,l.sourcePath,{localName:l.localName,usedMembers:u,used:u.length>0||x(c,l.localName),isTypeOnly:l.isTypeOnly})}return l.kind==="side-effect"?M(l.importedName,l.sourcePath):R(l.importedName,l.localName??"",l.sourcePath,l.localName?x(c,l.localName):!1,l.kind,[],{isTypeOnly:l.isTypeOnly})}):[M("*",a)]}function xn(e){let r=e.trim(),t=/^type\b/.test(r),n=r.replace(/^type\s+/,""),[s,o]=yn(n),i=[];return s&&i.push(...Tt(s,t)),o&&i.push(...Tt(o,t)),i}function Tt(e,r){let t=e.trim();if(!t)return[];if(t.startsWith("{")){let n=t.slice(1,-1).trim();return n?y(n).map(s=>{let o=s.trim(),i=r||/^type\b/.test(o),a=o.replace(/^type\s+/,""),[c,p]=a.split(/\s+as\s+/);return{importedName:c.trim(),localName:(p??c).trim(),kind:"named",isTypeOnly:i}}):[]}return t.startsWith("* as ")?[{importedName:"*",localName:t.slice(5).trim(),kind:"namespace",isTypeOnly:r}]:[{importedName:"default",localName:t,kind:"default",isTypeOnly:r}]}function yn(e){let r=0;for(let t=0;t<e.length;t++){let n=e[t];if(n==="{"&&r++,n==="}"&&r--,n===","&&r===0)return[e.slice(0,t).trim(),e.slice(t+1).trim()]}return[e.trim(),null]}function Oe(e,r,t){let n=D(e,r);return n?Pn(e,r,n):bn(e,r,t)}function bn(e,r,t){return[...Nn(e,r,t),...In(e,r,t),..._n(e,r,t)]}function Nn(e,r,t){let n=[],s=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[1]??"",a=o[2]??"",c=y(i).map(u=>Cn(u.trim())).filter(u=>!!u),p=z(t,o.index),l=z(t,o.index+o[0].length-1);n.push({kind:"named",sourcePath:F(e,r,a),names:c,startLine:p,endLine:l})}return n}function In(e,r,t){let n=[],s=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[2]??"",a=z(t,o.index),c=z(t,o.index+o[0].length-1);n.push({kind:"star-as",sourcePath:F(e,r,i),names:o[1]?[o[1]]:[],startLine:a,endLine:c})}return n}function _n(e,r,t){let n=[],s=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let o of t.matchAll(s)){if(typeof o.index!="number")continue;let i=o[1]??"",a=z(t,o.index),c=z(t,o.index+o[0].length-1);n.push({kind:"star",sourcePath:F(e,r,i),names:[],startLine:a,endLine:c})}return n}function Cn(e){if(!e)return null;let r=e.replace(/^type\s+/,"").trim();if(!r)return null;let t=r.match(/^(\w+)\s+as\s+(\w+)$/);if(t)return t[2]??null;let n=r.match(/^(\w+)$/);return n?n[1]??null:null}function z(e,r){let t=0;for(let n=0;n<r&&n<e.length;n++)e.charCodeAt(n)===10&&t++;return t}function Pn(e,r,t){let n=[];for(let s of t.rootNode.descendantsOfType("export_statement")){let o=Tn(e,r,s);if(o===void 0)continue;let i=s.startPosition.row,a=s.endPosition.row,c=En(s,o,i,a);n.push(c)}return n}function Tn(e,r,t){let n=b(t,"string");if(!n)return;let s=b(n,"string_fragment");if(s)return F(e,r,s.text)}function En(e,r,t,n){let s=b(e,"export_clause");if(s){let i=[];for(let a of s.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),p=a.namedChild(1);c&&i.push((p??c).text)}return{kind:"named",sourcePath:r,names:i,startLine:t,endLine:n}}let o=b(e,"namespace_export");if(o){let i=o.namedChildren.find(a=>a.type==="identifier"||a.type==="type_identifier")?.text;return{kind:"star-as",sourcePath:r,names:i?[i]:[],startLine:t,endLine:n}}return{kind:"star",sourcePath:r,names:[],startLine:t,endLine:n}}function Et(e,r,t){return pe(e,r,{java:n=>Rn(e,r,n),kotlin:n=>Fn(e,r,n),scala:n=>An(e,r,n)},()=>I(t,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(n,s)=>{let o=n[1]?.trim();return o?Ln(e,r,o,s):[]}),t)}function Rn(e,r,t){let n=S(t,new Set(["import_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("import_declaration")){let i=o.children.some(u=>u.type==="asterisk"),c=o.namedChildren.find(u=>u.type==="scoped_identifier")??o.namedChildren.find(u=>u.type==="identifier");if(!c)continue;let p=c.text;if(i){s.push(v("*",h(e,p,P)));continue}let l=p.split(".").pop()??p;s.push(g(l,l,h(e,p,P),n))}return s}function Fn(e,r,t){let n=S(t,new Set(["import_header","import_list"])),s=[];for(let o of t.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"),c=o.namedChildren.find(d=>d.type==="import_alias");if(a){s.push(v("*",h(e,i.text,P)));continue}let p=i.text,l=p.split(".").pop()??p,m=c?.namedChild(0)?.text??l;s.push(g(l,m,h(e,p,P),n))}return s}function An(e,r,t){let n=S(t,new Set(["import_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("import_declaration")){let i=o.namedChildren.find(u=>u.type==="namespace_selectors"||u.type==="namespace_wildcard"),a=o.namedChildren.filter(u=>u!==i&&(u.type==="identifier"||u.type==="stable_identifier")),c=a.map(u=>u.text).join(".");if(!c)continue;if(i?.type==="namespace_wildcard"){s.push(v("*",h(e,c,P)));continue}if(i?.type==="namespace_selectors"){for(let u of i.namedChildren)if(u.type==="arrow_renamed_identifier"){let[m,d]=u.namedChildren;if(!m)continue;let f=m.text,$=d?.text??f;if(f==="_")continue;s.push(g(f,$,h(e,`${c}.${f}`,P),n))}else if(u.type==="identifier"){let m=u.text;s.push(g(m,m,h(e,`${c}.${m}`,P),n))}continue}let p=a[a.length-1]?.text??c,l=a.slice(0,-1).map(u=>u.text).join(".")||c;s.push(g(p,p,h(e,l&&a.length>1?`${l}.${p}`:c,P),n))}return s}function Ln(e,r,t,n){if(t.includes("{")&&t.includes("}")){let s=t.slice(0,t.indexOf("{")).replace(/\.$/,"").trim(),o=t.slice(t.indexOf("{")+1,t.lastIndexOf("}")).trim();return y(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[c,p]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),l=c?.trim();if(!l||l==="_")return[];let u=(p??l.split(".").pop()??l).trim(),m=l==="_"?s:`${s}.${l}`.replace(/\.\./g,".");return[T(e,r,n,m,l,u)]})}return[T(e,r,n,t,t.split(".").pop()??t,t.split(".").pop()??t)]}function Ft(e,r,t){return _(e,r,n=>wn(e,r,n),()=>I(t,/^[ \t]*use\s+(.+?)\s*;$/gm,(n,s)=>{let o=n[1]?.trim();return o?y(o).flatMap(i=>{let a=i.trim();if(!a)return[];let[c,p]=a.split(/\s+as\s+/i),l=c?.trim()??a,u=l.split("\\").pop()??l,m=(p??u).trim();return[T(e,r,s,l,u,m,h(e,l.replace(/\\/g,"."),K))]}):[]}),t)}function wn(e,r,t){let n=S(t,new Set(["namespace_use_declaration"])),s=[],o=(i,a,c)=>{s.push(g(a,c,h(e,i.replace(/\\/g,"."),K),n))};for(let i of t.rootNode.descendantsOfType("namespace_use_declaration")){let a=i.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=i.namedChildren.find(p=>p.type==="namespace_name")?.text??"";for(let p of a.namedChildren){if(p.type!=="namespace_use_clause")continue;let{importedName:l,localName:u,qualified:m}=Rt(p,c);l&&o(m,l,u)}continue}for(let c of i.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:p,localName:l,qualified:u}=Rt(c,"");p&&o(u,p,l)}}return s}function Rt(e,r){let t=e.namedChildren.find(p=>p.type==="qualified_name"),n=e.namedChildren.filter(p=>p.type==="name"),s="";t?s=t.text:n.length>=1&&(s=n[0].text);let o=t&&n.length>0?n[n.length-1]:null,i=s.split("\\").pop()??s,a=o?.text??i,c=r?`${r}\\${s}`:s;return{importedName:i,localName:a,qualified:c}}function Lt(e,r,t){return _(e,r,n=>kn(e,r,n),()=>Dn(t).flatMap(n=>Mn(e,r,n,t)),t)}function kn(e,r,t){let n=S(t,new Set(["import_statement","import_from_statement"])),s=[];for(let o of t.rootNode.descendantsOfType("import_statement"))for(let i of o.namedChildren){let a=At(i);if(!a)continue;let c=J(e,r,a.qualifiedName);s.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:n.has(a.localName),usedMembers:[]})}for(let o of t.rootNode.descendantsOfType("import_from_statement")){let i=o.namedChild(0);if(!i)continue;let a=jn(i);if(a===null)continue;let c=J(e,r,a);for(let p=1;p<o.namedChildCount;p+=1){let l=o.namedChild(p);if(l.type==="wildcard_import"){s.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let u=At(l);u&&s.push({importedName:u.qualifiedName,localName:u.localName,sourcePath:c,kind:"named",used:n.has(u.localName),usedMembers:[]})}}return s}function At(e){if(e.type==="aliased_import"){let r=e.namedChild(0),t=e.namedChild(1);return!r||!t?null:{qualifiedName:r.text,localName:t.text}}if(e.type==="dotted_name"){let r=e.text;return{qualifiedName:r,localName:r.split(".")[0]??r}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function jn(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let r=b(e,"import_prefix")?.text??"",t=b(e,"dotted_name")?.text??"";return`${r}${t}`}return null}function Dn(e){let r=e.split(`
|
|
11
11
|
`),t=[],n=0;for(let s=0;s<r.length;s++){let o=r[s],i=o.trimStart(),a=n;if(n+=o.length+1,!i.startsWith("import ")&&!i.startsWith("from "))continue;let c=o,p=a+o.length,l=Ie(o);for(;s+1<r.length&&(l>0||c.trimEnd().endsWith("\\"));){s++;let m=r[s];c+=`
|
|
12
|
-
${m}`,p+=1+m.length,l+=Ie(m),n+=m.length+1}let u=On(c);u&&t.push({...u,start:a,end:p})}return t}function On(e){let r=e.replace(/\\\s*\n/g," ").trim();if(r.startsWith("import "))return{kind:"import",module:null,clause:r.slice(7).trim()};let t=r.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!t)return null;let n=t[2].trim();return n.startsWith("(")&&n.endsWith(")")&&(n=n.slice(1,-1).trim()),{kind:"from",module:t[1],clause:n}}function Mn(e,r,t,n){let s=k(n,t.start,t.end),o=t.clause.replace(/\n/g," ").trim();if(t.kind==="import")return y(o).flatMap(c=>{let p=c.trim().replace(/,$/,"");if(!p)return[];let[l,u]=p.split(/\s+as\s+/),m=l.trim(),d=(u??m.split(".")[0]??m).trim(),f=J(e,r,m),$=V(s,d);return[{importedName:m,localName:d,sourcePath:f,kind:"namespace",used:x(s,d)||$.length>0,usedMembers:$}]});let i=t.module?J(e,r,t.module):null,a=[];for(let c of y(o)){let p=c.trim().replace(/,$/,"");if(!p)continue;if(p==="*"){a.push({importedName:"*",localName:null,sourcePath:i,kind:"side-effect",used:!0,usedMembers:[]});continue}let[l,u]=p.split(/\s+as\s+/),m=(u??l).trim();a.push({importedName:l.trim(),localName:m,sourcePath:i,kind:"named",used:x(s,m),usedMembers:[]})}return a}import{basename as vn}from"path";function wt(e,r,t){return _(e,r,n=>Bn(e,r,n),()=>$n(e,r,t),t)}function $n(e,r,t){return I(t,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(n,s)=>{let o=n[1],i=n[2];if(!o||!i)return[];let a=o==="require_relative"?ge(e,r,i):null;if(a){let c=kt(i);return[R(c,c,a,x(s,c))]}return[M(i,a)]})}function Bn(e,r,t){let n=S(t,new Set([])),s=[],o=new Set(["require","require_relative","load"]);for(let i of t.rootNode.descendantsOfType("call")){let a=i.namedChild(0);if(!a||a.type!=="identifier"||!o.has(a.text))continue;let p=i.namedChildren.find(d=>d.type==="argument_list")?.namedChild(0);if(!p||p.type!=="string")continue;let u=p.namedChildren.find(d=>d.type==="string_content")?.text;if(!u)continue;let m=a.text==="require_relative"?ge(e,r,u):null;if(m){let d=kt(u);s.push(g(d,d,m,n))}else s.push(M(u,m))}return s}function kt(e){return tt(vn(e).replace(/\.[^.]+$/,""),/_/)}function
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
${m}`,p+=1+m.length,l+=Ie(m),n+=m.length+1}let u=On(c);u&&t.push({...u,start:a,end:p})}return t}function On(e){let r=e.replace(/\\\s*\n/g," ").trim();if(r.startsWith("import "))return{kind:"import",module:null,clause:r.slice(7).trim()};let t=r.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!t)return null;let n=t[2].trim();return n.startsWith("(")&&n.endsWith(")")&&(n=n.slice(1,-1).trim()),{kind:"from",module:t[1],clause:n}}function Mn(e,r,t,n){let s=k(n,t.start,t.end),o=t.clause.replace(/\n/g," ").trim();if(t.kind==="import")return y(o).flatMap(c=>{let p=c.trim().replace(/,$/,"");if(!p)return[];let[l,u]=p.split(/\s+as\s+/),m=l.trim(),d=(u??m.split(".")[0]??m).trim(),f=J(e,r,m),$=V(s,d);return[{importedName:m,localName:d,sourcePath:f,kind:"namespace",used:x(s,d)||$.length>0,usedMembers:$}]});let i=t.module?J(e,r,t.module):null,a=[];for(let c of y(o)){let p=c.trim().replace(/,$/,"");if(!p)continue;if(p==="*"){a.push({importedName:"*",localName:null,sourcePath:i,kind:"side-effect",used:!0,usedMembers:[]});continue}let[l,u]=p.split(/\s+as\s+/),m=(u??l).trim();a.push({importedName:l.trim(),localName:m,sourcePath:i,kind:"named",used:x(s,m),usedMembers:[]})}return a}import{basename as vn}from"path";function wt(e,r,t){return _(e,r,n=>Bn(e,r,n),()=>$n(e,r,t),t)}function $n(e,r,t){return I(t,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(n,s)=>{let o=n[1],i=n[2];if(!o||!i)return[];let a=o==="require_relative"?ge(e,r,i):null;if(a){let c=kt(i);return[R(c,c,a,x(s,c))]}return[M(i,a)]})}function Bn(e,r,t){let n=S(t,new Set([])),s=[],o=new Set(["require","require_relative","load"]);for(let i of t.rootNode.descendantsOfType("call")){let a=i.namedChild(0);if(!a||a.type!=="identifier"||!o.has(a.text))continue;let p=i.namedChildren.find(d=>d.type==="argument_list")?.namedChild(0);if(!p||p.type!=="string")continue;let u=p.namedChildren.find(d=>d.type==="string_content")?.text;if(!u)continue;let m=a.text==="require_relative"?ge(e,r,u):null;if(m){let d=kt(u);s.push(g(d,d,m,n))}else s.push(M(u,m))}return s}function kt(e){return tt(vn(e).replace(/\.[^.]+$/,""),/_/)}function jt(e,r,t){return _(e,r,n=>Un(e,r,n),()=>I(t,/^[ \t]*use\s+(.+?)\s*;$/gm,(n,s)=>{let o=n[1]?.trim();return o?qn(e,r,o,s):[]}),t)}function Un(e,r,t){let n=S(t,new Set(["use_declaration"])),s=[];for(let o of t.rootNode.descendantsOfType("use_declaration")){let i=o.namedChild(0);if(i)for(let a of re(i,"")){if(!a.importedName||a.importedName==="*")continue;let c=A(e,r,a.qualifiedName)??A(e,r,a.qualifiedName.split("::").slice(0,-1).join("::"));s.push(g(a.importedName,a.localName,c,n))}}return s}function re(e,r){switch(e.type){case"identifier":case"super":case"crate":{let t=e.text;return[{qualifiedName:de(r,t),importedName:t,localName:t}]}case"self":{let t=r.split("::").filter(Boolean).pop()??"self";return[{qualifiedName:r||"self",importedName:t,localName:t}]}case"scoped_identifier":{let t=e.text,n=t.split("::").pop()??t;return[{qualifiedName:de(r,t),importedName:n,localName:n}]}case"scoped_use_list":{let t=e.namedChild(0),n=e.namedChild(1);if(!t||!n)return[];let s=de(r,t.text),o=[];for(let i of n.namedChildren)o.push(...re(i,s));return o}case"use_list":{let t=[];for(let n of e.namedChildren)t.push(...re(n,r));return t}case"use_as_clause":{let t=e.namedChild(0),n=e.namedChild(1);if(!t||!n)return[];let s=re(t,r),o=n.text;return s.map(i=>({...i,localName:o}))}case"use_wildcard":{let t=e.namedChild(0),n=t?t.text:"";return[{qualifiedName:de(r,`${n}::*`),importedName:"*",localName:"*"}]}default:return[]}}function de(e,r){return e?r?`${e}::${r}`:e:r}function qn(e,r,t,n){let s=t.trim();if(s.includes("{")&&s.includes("}")){let l=s.slice(0,s.indexOf("{")).replace(/::$/,"").trim(),u=s.slice(s.indexOf("{")+1,s.lastIndexOf("}")).trim();return y(u).flatMap(m=>{let d=m.trim();if(!d)return[];if(d==="self"){let fe=l.split("::").filter(Boolean).pop();return fe?[T(e,r,n,l,fe,fe)]:[]}let[f,$]=d.split(/\s+as\s+/),B=f?.trim();if(!B)return[];let Bt=($??B.split("::").pop()??B).trim(),Ut=`${l}::${B}`.replace(/::::/g,"::");return[T(e,r,n,Ut,B.split("::").pop()??B,Bt,A(e,r,l))]})}let[o,i]=s.split(/\s+as\s+/),a=o?.trim()??s,c=(i??a.split("::").pop()??a).trim(),p=A(e,r,a)??A(e,r,a.split("::").slice(0,-1).join("::"));return[T(e,r,n,a,a.split("::").pop()??a,c,p)]}function Dt(e,r,t){let n=D(e,r);if(n)return Vn(e,r,n);let s=[];for(let o of t.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let i=o[1]?.trim();i&&s.push(...Wn(e,r,i))}return s}function Vn(e,r,t){let n=[];for(let s of t.rootNode.descendantsOfType("use_declaration")){if(!zn(s))continue;let o=s.namedChildren.find(i=>i.type!=="visibility_modifier");if(o)for(let i of re(o,""))i.importedName&&n.push(Me(e,r,i.qualifiedName))}return n}function zn(e){for(let r of e.children)if(r.type==="visibility_modifier"&&r.text.startsWith("pub"))return!0;return!1}function Wn(e,r,t){let n=t.trim();if(n.includes("{")&&n.includes("}")){let s=n.slice(0,n.indexOf("{")).replace(/::$/,"").trim(),o=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return y(o).flatMap(i=>{let a=i.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),p=`${s}::${c?.trim()??a}`.replace(/::::/g,"::");return[Me(e,r,p)]})}return[Me(e,r,n)]}function Me(e,r,t){return{specifier:t,sourcePath:A(e,r,t)??A(e,r,t.split("::").slice(0,-1).join("::"))}}function j({language:e,extensions:r,imports:t,parseImports:n}){return{language:e,extensions:r,capabilities:{imports:t},parseImports:n}}function Ot(e,r){let t=r.toLowerCase();for(let n of e)for(let s of n.extensions)if(t.endsWith(s))return n;return null}var Hn={language:"javascript",extensions:qe,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:De,parseReExports:Oe},Kn=j({language:"python",extensions:Ve,imports:"ast-with-regex-fallback",parseImports:Lt}),Jn=j({language:"jvm",extensions:P,imports:"ast-dispatch-with-regex-fallback",parseImports:Et}),Xn={language:"rust",extensions:ze,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:jt,parseExports:Dt},Yn=j({language:"ruby",extensions:We,imports:"ast-with-regex-fallback",parseImports:wt}),Gn=j({language:"c/cpp",extensions:He,imports:"ast-with-regex-fallback",parseImports:yt}),Qn=j({language:"dotnet",extensions:q,imports:"ast-dispatch-with-regex-fallback",parseImports:Ct}),Zn={language:"dart",extensions:Ke,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:It,parseExports:_t},es=j({language:"php",extensions:K,imports:"ast-with-regex-fallback",parseImports:Ft}),ts=j({language:"clojure",extensions:Je,imports:"regex-only",parseImports:Nt}),rs=[Hn,Kn,Jn,Xn,Yn,Gn,Qn,Zn,es,ts];function ne(e){return Ot(rs,e)}var ve={clearGroups:["whole-project","source-file"]},ns=U("source-imports",ve),ss=U("source-exports",ve),os=U("source-reexports",ve),Mt=X({kind:"source-imports",invalidation:Y("source-imports"),serialize:as,deserialize:cs}),vt=X({kind:"source-reexports",invalidation:Y("source-reexports"),serialize:ls,deserialize:ps});function Li(e,r){let t=W(r);return os.get(e,t,()=>{let n=ne(t);if(!n?.parseReExports)return[];let s=L(e,t);if(!s)return[];let o=H(e,t,s),i=xe(e),a=vt.read(e,t,o);if(a?.resolutionFingerprint===i)return a.reExports;let c=n.parseReExports(e,t,s);return vt.write(e,t,o,{resolutionFingerprint:i,reExports:c}),c})}function is(e,r){let t=W(r);return ns.get(e,t,()=>{let n=ne(t);if(!n)return[];let s=L(e,t);return s?$t(e,t,s,n):[]})}function wi(e,r){let t=W(r),n=ne(t);if(!n)return[];let s;try{s=$e(e.config.projectRoot,t,{inputKind:"indexed source file"})}catch(o){if(Be(o))return[];throw o}return $t(e,t,s,n)}function $t(e,r,t,n){let s=H(e,r,t),o=xe(e),i=Mt.read(e,r,s);if(i?.resolutionFingerprint===o)return i.imports;let a=n.parseImports(e,r,t);return Mt.write(e,r,s,{parserVersion:2,resolutionFingerprint:o,imports:a}),a}function ki(e,r,t){let n=is(e,r).filter(s=>s.kind==="named"&&s.isTypeOnly!==!0&&s.localName===t&&s.sourcePath!==null);return n.length===1?n[0]:null}function ji(e,r){let t=W(r);return ss.get(e,t,()=>{let n=ne(t);if(!n?.parseExports)return[];let s=L(e,t);return s?n.parseExports(e,t,s):[]})}function as(e){return JSON.stringify(e)}function cs(e){try{let r=JSON.parse(e);return!ye(r)||r.parserVersion!==2||typeof r.resolutionFingerprint!="string"||!Array.isArray(r.imports)?null:{parserVersion:2,resolutionFingerprint:r.resolutionFingerprint,imports:r.imports}}catch{return null}}function ls(e){return JSON.stringify(e)}function ps(e){try{let r=JSON.parse(e);return!ye(r)||typeof r.resolutionFingerprint!="string"||!Array.isArray(r.reExports)?null:{resolutionFingerprint:r.resolutionFingerprint,reExports:r.reExports}}catch{return null}}export{O as a,qt as b,gs as c,Ss as d,Ie as e,zt as f,it as g,Jt as h,at as i,Xt as j,Ce as k,Yt as l,ct as m,E as n,Nr as o,Tr as p,Er as q,Lr as r,wr as s,kr as t,jr as u,Dr as v,de as w,Li as x,is as y,wi as z,ki as A,ji as B};
|
|
13
|
+
//# sourceMappingURL=chunk-RBAD4GJ2.js.map
|