scip-query 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/dist/augment-vue-worker.js +1 -1
- package/dist/by-kind-4IYG2SKW.js +2 -0
- package/dist/call-graph-WQNXMNNN.js +2 -0
- package/dist/{chunk-AQDWTCDC.js → chunk-25GWKRUZ.js} +2 -2
- package/dist/chunk-2BTJALUS.js +454 -0
- package/dist/chunk-2KVU55CW.js +11 -0
- package/dist/{chunk-BBWPOMGU.js → chunk-2OXVP5U5.js} +2 -2
- package/dist/{chunk-D5W4UZY5.js → chunk-2RE5OCHZ.js} +2 -2
- package/dist/{chunk-2I3RSUWX.js → chunk-2XCGSDIT.js} +2 -2
- package/dist/{chunk-V7LQZTTZ.js → chunk-2YC7YNKT.js} +2 -2
- package/dist/chunk-3QXC54FQ.js +3 -0
- package/dist/{chunk-32A42O5B.js → chunk-3TJY6M3B.js} +2 -2
- package/dist/chunk-42W3LFUK.js +13 -0
- package/dist/chunk-44T4DUAA.js +2 -0
- package/dist/chunk-4GAQ6FI4.js +43 -0
- package/dist/{chunk-4S4DF62J.js → chunk-4HE7MVWD.js} +2 -2
- package/dist/{chunk-TGWNNMPF.js → chunk-4TQU4TX2.js} +2 -2
- package/dist/{chunk-SKUMCCC5.js → chunk-56NQAEPJ.js} +2 -2
- package/dist/chunk-57N6LN2A.js +3 -0
- package/dist/{chunk-LPGDO2XA.js → chunk-5H5WTJSD.js} +2 -2
- package/dist/{chunk-EA4SH4U5.js → chunk-5YRQIE2B.js} +2 -2
- package/dist/{chunk-O2RM7E7L.js → chunk-5ZMBRQFC.js} +4 -4
- package/dist/{chunk-ICHBVITH.js → chunk-6HRZQLOI.js} +2 -2
- package/dist/{chunk-WULAPQUD.js → chunk-6NC3YSPY.js} +2 -2
- package/dist/{chunk-IDPLC3FI.js → chunk-6VEFRPTD.js} +2 -2
- package/dist/{chunk-IOKWFRFQ.js → chunk-7C26EKLZ.js} +2 -2
- package/dist/{chunk-S3RTPPLQ.js → chunk-7IQXARSQ.js} +2 -2
- package/dist/chunk-7JYHQAH2.js +22 -0
- package/dist/chunk-7KSO2OAP.js +2 -0
- package/dist/{chunk-2ZBMOQGG.js → chunk-7U2YQSDE.js} +2 -2
- package/dist/{chunk-EKZRF57O.js → chunk-7XA3OM44.js} +2 -2
- package/dist/{chunk-4EXFZP6H.js → chunk-7XZGZBSQ.js} +2 -2
- package/dist/chunk-7YQOCABQ.js +2 -0
- package/dist/chunk-A77SCPW2.js +3 -0
- package/dist/chunk-AK3PYTIK.js +5 -0
- package/dist/chunk-AMIMMNA4.js +11 -0
- package/dist/{chunk-MOBF2GH6.js → chunk-AQ2PORIO.js} +2 -2
- package/dist/{chunk-YUFWLWIC.js → chunk-ARVO6TTW.js} +2 -2
- package/dist/chunk-AUY5BL74.js +2 -0
- package/dist/{chunk-RGCJ4646.js → chunk-AYPDH2LU.js} +2 -2
- package/dist/{chunk-73Z33VFI.js → chunk-AZS7YPCB.js} +2 -2
- package/dist/{chunk-SYUNTKO2.js → chunk-BDGTPN27.js} +2 -2
- package/dist/{chunk-BATIVRU2.js → chunk-BDHFVH2M.js} +2 -2
- package/dist/chunk-BECZLYNU.js +8 -0
- package/dist/chunk-BJT7LSPK.js +3 -0
- package/dist/{chunk-6SWA6B24.js → chunk-BTVKZGWT.js} +2 -2
- package/dist/{chunk-QD7IFBCR.js → chunk-BUTEIZKP.js} +2 -2
- package/dist/{chunk-UZFCZ7SJ.js → chunk-BVFYEEBH.js} +2 -2
- package/dist/{chunk-ICUQONOG.js → chunk-BWVQP3LB.js} +2 -2
- package/dist/chunk-BYDAFMSR.js +57 -0
- package/dist/{chunk-BHE44MHT.js → chunk-C76O5MDS.js} +2 -2
- package/dist/chunk-C7IJMOFP.js +134 -0
- package/dist/{chunk-CN2WGM7D.js → chunk-CBBHFNLX.js} +2 -2
- package/dist/{chunk-COTMS5KM.js → chunk-CKRWA452.js} +2 -2
- package/dist/{chunk-ANWGXPPN.js → chunk-CLG6DWVS.js} +2 -2
- package/dist/chunk-D2MVJSP4.js +21 -0
- package/dist/chunk-D35XIZGN.js +2 -0
- package/dist/{chunk-U7DR7MJD.js → chunk-DEAB5TGT.js} +2 -2
- package/dist/{chunk-6GJAP4OE.js → chunk-DJAO2OZJ.js} +2 -2
- package/dist/chunk-DKM723YF.js +79 -0
- package/dist/{chunk-4IIMPWMR.js → chunk-DPWKKNKI.js} +2 -2
- package/dist/chunk-E44IVWIJ.js +367 -0
- package/dist/chunk-EDMB6SSO.js +7 -0
- package/dist/{chunk-KWARB5FZ.js → chunk-EELG7D3Q.js} +2 -2
- package/dist/chunk-EELPBR7E.js +3 -0
- package/dist/chunk-EETGXQY7.js +3 -0
- package/dist/chunk-ENWQWA2R.js +2 -0
- package/dist/{chunk-HUZNZ3H2.js → chunk-ERCYGVAM.js} +2 -2
- package/dist/{chunk-WSG3DK5H.js → chunk-EWWY2ZFL.js} +2 -2
- package/dist/chunk-F24G5NBE.js +3 -0
- package/dist/{chunk-XRXCANFQ.js → chunk-F24QUEQP.js} +2 -2
- package/dist/{chunk-KFK7GF5C.js → chunk-FBCVASUG.js} +2 -2
- package/dist/{chunk-35IW3P4H.js → chunk-FELGD32K.js} +2 -2
- package/dist/{chunk-UNORWZIJ.js → chunk-FFJQZG6J.js} +5 -5
- package/dist/{chunk-5SE323LF.js → chunk-FGNCOQUX.js} +2 -2
- package/dist/chunk-FKGQOTKD.js +2 -0
- package/dist/chunk-GDRJB3SB.js +3 -0
- package/dist/chunk-GH5YSGZL.js +5 -0
- package/dist/{chunk-X7PJJYKX.js → chunk-GIQ6CSL4.js} +2 -2
- package/dist/{chunk-2RP27XLR.js → chunk-GPGRZJ3R.js} +2 -2
- package/dist/{chunk-IYV2YBHM.js → chunk-GQIDEID3.js} +2 -2
- package/dist/chunk-GRX7JOXQ.js +2 -0
- package/dist/{chunk-H46QMB7E.js → chunk-GVOMSPGL.js} +2 -2
- package/dist/{chunk-KTRGJLY7.js → chunk-GY7CCCEZ.js} +2 -2
- package/dist/{chunk-VNKYRJKN.js → chunk-H7CG6LOE.js} +2 -2
- package/dist/chunk-HCVJR2V4.js +3 -0
- package/dist/chunk-HG722PO7.js +3 -0
- package/dist/{chunk-LHTT5C3Z.js → chunk-HISEUIL2.js} +2 -2
- package/dist/{chunk-K5MZYZV7.js → chunk-HXOU4XNH.js} +2 -2
- package/dist/chunk-I6UTXNHU.js +6 -0
- package/dist/{chunk-I7PFL5P3.js → chunk-IJMD6BRI.js} +2 -2
- package/dist/{chunk-XXJ7WL3F.js → chunk-IKVNEGTW.js} +2 -2
- package/dist/chunk-IMKZEXZG.js +2 -0
- package/dist/chunk-ISIQLPJ2.js +61 -0
- package/dist/{chunk-DEUGHURX.js → chunk-ISWFRGJ6.js} +2 -2
- package/dist/chunk-IW5XQG5G.js +2 -0
- package/dist/chunk-IXESDH3J.js +2 -0
- package/dist/{chunk-FGB567HK.js → chunk-JAT6C3VX.js} +2 -2
- package/dist/{chunk-7TWP3MCP.js → chunk-JFQBRL3J.js} +2 -2
- package/dist/{chunk-Q7HB7BFJ.js → chunk-JHH5SCZ3.js} +2 -2
- package/dist/{chunk-ZHSARYVS.js → chunk-JJ62MTQH.js} +2 -2
- package/dist/chunk-JT6XX7QY.js +8 -0
- package/dist/{chunk-5H7IWVXJ.js → chunk-JUN5DOAK.js} +2 -2
- package/dist/{chunk-DOPCR5BY.js → chunk-K3XFWJI2.js} +2 -2
- package/dist/{chunk-Y4XQ7LES.js → chunk-KFOYCQAJ.js} +1 -1
- package/dist/{chunk-N5C65OFK.js → chunk-KFVSJX25.js} +2 -2
- package/dist/chunk-KK7GPALL.js +28 -0
- package/dist/{chunk-DHKBIOXF.js → chunk-KQHJEU6V.js} +2 -2
- package/dist/{chunk-WB6LGCFB.js → chunk-KZYID5KV.js} +2 -2
- package/dist/{chunk-KW6B5OL4.js → chunk-LO5JSW2C.js} +2 -2
- package/dist/{chunk-ZW44MCJM.js → chunk-LRI5OMPE.js} +2 -2
- package/dist/{chunk-HG5YI7PV.js → chunk-LXQUF2RP.js} +2 -2
- package/dist/{chunk-TM5XEDDR.js → chunk-MHIEP7EG.js} +2 -2
- package/dist/{chunk-FHV7NMFU.js → chunk-MSR2QRUE.js} +2 -2
- package/dist/chunk-N7FP5H5U.js +57 -0
- package/dist/{chunk-3653GTR7.js → chunk-NEIQPFBI.js} +2 -2
- package/dist/chunk-NK3JMP22.js +2 -0
- package/dist/{chunk-7IOAZRVL.js → chunk-NRBNAECH.js} +2 -2
- package/dist/{chunk-HGKEAP7F.js → chunk-NVSZNESQ.js} +2 -2
- package/dist/{chunk-R2MOKIVO.js → chunk-OJNK5ALA.js} +2 -2
- package/dist/{chunk-RFWAUHVW.js → chunk-OPSAW5DT.js} +2 -2
- package/dist/chunk-OTSPRVNW.js +2 -0
- package/dist/chunk-OXYAWIEA.js +2 -0
- package/dist/chunk-OZETODHH.js +2 -0
- package/dist/chunk-PBUH2P5S.js +3 -0
- package/dist/{chunk-QBANU5BQ.js → chunk-PIFTZEEM.js} +2 -2
- package/dist/{chunk-CKDOY6JA.js → chunk-PLJUQFQN.js} +2 -2
- package/dist/{chunk-JVZNWJBH.js → chunk-PLYUVM4F.js} +2 -2
- package/dist/chunk-PXXYQK55.js +2 -0
- package/dist/{chunk-WZQFY5S7.js → chunk-Q55NF3ZG.js} +2 -2
- package/dist/{chunk-OVPS2ILI.js → chunk-Q5TA4OY4.js} +2 -2
- package/dist/{chunk-OUB4J26T.js → chunk-Q6T2CAJL.js} +2 -2
- package/dist/chunk-Q7GBK5T7.js +81 -0
- package/dist/chunk-QKT4UI2Y.js +2 -0
- package/dist/{chunk-PIZY2GX6.js → chunk-QLBSG7U5.js} +2 -2
- package/dist/chunk-QWKHW6VZ.js +2 -0
- package/dist/{chunk-E7BJXRNV.js → chunk-R6M456QG.js} +2 -2
- package/dist/{chunk-MJNV7OCG.js → chunk-RDULNRSJ.js} +2 -2
- package/dist/{chunk-SSSJO4RG.js → chunk-RHHCLWQ6.js} +2 -2
- package/dist/chunk-RNKPYYYE.js +4 -0
- package/dist/{chunk-IXJ26KJJ.js → chunk-RPL3ARU7.js} +2 -2
- package/dist/{chunk-3EX7DNBC.js → chunk-RYOYJMGF.js} +2 -2
- package/dist/chunk-SB25YMEQ.js +2 -0
- package/dist/chunk-SV2LEFVM.js +2 -0
- package/dist/{chunk-ZBNL3QCY.js → chunk-SVHTMVA4.js} +3 -3
- package/dist/{chunk-6IEVHGWG.js → chunk-SWK4XPUS.js} +2 -2
- package/dist/chunk-T6QD2ZQB.js +43 -0
- package/dist/{chunk-VETXXOYU.js → chunk-TAYD3AE7.js} +2 -2
- package/dist/chunk-TD7VKJ2Y.js +117 -0
- package/dist/{chunk-UQ7XPRWU.js → chunk-TH6IC56G.js} +2 -2
- package/dist/{chunk-XVDMJMES.js → chunk-TKDNDQA7.js} +2 -2
- package/dist/{chunk-CSDDOUA4.js → chunk-TNG2FYS5.js} +2 -2
- package/dist/chunk-TQZV7KV4.js +2 -0
- package/dist/{chunk-AJVMVE7X.js → chunk-TUQIPUDS.js} +2 -2
- package/dist/chunk-TUSPIVZ3.js +4 -0
- package/dist/{chunk-ORBKAUCH.js → chunk-U2N2KE7A.js} +2 -2
- package/dist/{chunk-3PII3JI5.js → chunk-UAQ4T73O.js} +2 -2
- package/dist/{chunk-OFY4HTMI.js → chunk-UDY7MIAW.js} +2 -2
- package/dist/{chunk-WKPZCQLI.js → chunk-URSGGIZX.js} +2 -2
- package/dist/{chunk-UL4VJUMD.js → chunk-UT7TADJX.js} +2 -2
- package/dist/chunk-V4NG5OMS.js +554 -0
- package/dist/{chunk-2H4IAJHO.js → chunk-VMWUV6WB.js} +2 -2
- package/dist/{chunk-46JLFIGA.js → chunk-VTCIYFEK.js} +2 -2
- package/dist/chunk-VU6LIWHT.js +2 -0
- package/dist/chunk-VUSKPCUB.js +2 -0
- package/dist/{chunk-URMZLV2N.js → chunk-VXJJTQYE.js} +2 -2
- package/dist/{chunk-IPAL6DP2.js → chunk-VZ7NXSHV.js} +2 -2
- package/dist/{chunk-FUG6RPYY.js → chunk-WHADK6OS.js} +2 -2
- package/dist/chunk-WN3TCGJ4.js +2 -0
- package/dist/{chunk-B7ECWJAZ.js → chunk-WOOAY3PA.js} +2 -2
- package/dist/chunk-WRQXLNYE.js +9 -0
- package/dist/chunk-WSLEJSFR.js +2 -0
- package/dist/chunk-WYZIHUPZ.js +16 -0
- package/dist/{chunk-ZYREOING.js → chunk-XE33FV5W.js} +2 -2
- package/dist/chunk-XFMVKFSF.js +2 -0
- package/dist/{chunk-BBEDPVPB.js → chunk-XGGBK66W.js} +2 -2
- package/dist/{chunk-OFUBXBYX.js → chunk-XJX6LGHL.js} +2 -2
- package/dist/{chunk-Z3GCK3PD.js → chunk-XN22RGSR.js} +2 -2
- package/dist/{chunk-HWLCBKFE.js → chunk-XSWYJCAK.js} +2 -2
- package/dist/{chunk-IGKKTHJR.js → chunk-XU75YQN4.js} +2 -2
- package/dist/{chunk-E4EJBGDZ.js → chunk-Y2VM4CJC.js} +2 -2
- package/dist/{chunk-U7LRSQG6.js → chunk-Y334QQU5.js} +2 -2
- package/dist/{chunk-APLKXICZ.js → chunk-YAGYMBEX.js} +2 -2
- package/dist/{chunk-XITQLISP.js → chunk-YIHNPKWD.js} +2 -2
- package/dist/chunk-YXPUP5G2.js +11 -0
- package/dist/{chunk-6BJ7SOY7.js → chunk-Z2AWCTN6.js} +2 -2
- package/dist/{chunk-PHSPBQM6.js → chunk-Z2PZVKPR.js} +2 -2
- package/dist/{chunk-QXR5QPSF.js → chunk-ZAZGGSM3.js} +2 -2
- package/dist/{chunk-5236NQV3.js → chunk-ZGW4HLPD.js} +2 -2
- package/dist/chunk-ZOXKSQQB.js +2 -0
- package/dist/{chunk-BD6CV7PN.js → chunk-ZPASRBLF.js} +2 -2
- package/dist/{chunk-DMUGTKMD.js → chunk-ZYM4HOFA.js} +2 -2
- package/dist/{chunk-4ILHWBYF.js → chunk-ZZ3Z7D56.js} +2 -2
- package/dist/cli-main.js +4 -4
- package/dist/{code-CczEvHui.d.ts → code-B17qEMbt.d.ts} +1 -1
- package/dist/code-EQJFDT6I.js +2 -0
- package/dist/code-result-json-7UWIWBOO.js +2 -0
- package/dist/command-descriptors-ORNTVNYV.js +342 -0
- package/dist/{config-types-Cm-VSEBb.d.ts → config-types-B9B60MiR.d.ts} +10 -0
- package/dist/dataflow-6VL54GX5.js +2 -0
- package/dist/{db-LKJXAlNS.d.ts → db-BwIVAYNB.d.ts} +1 -1
- package/dist/dependence-slice-DT2NUHD2.js +2 -0
- package/dist/deps-DB7H5IKC.js +2 -0
- package/dist/direct-navigation-O3LUAYWQ.js +3 -0
- package/dist/entry-map-6K62RV3D.js +2 -0
- package/dist/files-MSLD7MO6.js +2 -0
- package/dist/{graph-evidence-CbUPCSKV.d.ts → graph-evidence-Bjyky2V4.d.ts} +1 -1
- package/dist/{health-Wl5G_LRt.d.ts → health-CPp2Jf1Z.d.ts} +1 -1
- package/dist/hierarchy-IVBXAKFA.js +2 -0
- package/dist/imports-FRAVZ3Y2.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/members-KJOJDYGO.js +2 -0
- package/dist/methods-2AYABBT3.js +2 -0
- package/dist/output-continuation-command-JHMPH6NC.js +3 -0
- package/dist/{output-pagination-VAWOGX4R.js → output-pagination-3OFL2MJV.js} +2 -2
- package/dist/project-reindex-HYO4WD7Z.js +3 -0
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/anchors.d.ts +2 -2
- package/dist/queries/anchors.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +3 -3
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +13 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/context.d.ts +2 -2
- package/dist/queries/context.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +2 -2
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/dependence-slice.d.ts +3 -3
- package/dist/queries/dependence-slice.js +1 -1
- package/dist/queries/dependency-depth.d.ts +2 -2
- package/dist/queries/dependency-depth.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/entry-map.d.ts +2 -2
- package/dist/queries/entry-map.js +1 -1
- package/dist/queries/evidence.d.ts +3 -3
- package/dist/queries/evidence.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/files.js +1 -1
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +5 -5
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +2 -2
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/reference-neighborhood.d.ts +2 -2
- package/dist/queries/reference-neighborhood.js +1 -1
- package/dist/queries/reference-reachability.d.ts +2 -2
- package/dist/queries/reference-reachability.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/source-inspection.d.ts +4 -4
- package/dist/queries/source-inspection.js +1 -1
- package/dist/queries/source-search.d.ts +2 -2
- package/dist/queries/source-search.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system-map.d.ts +2 -2
- package/dist/queries/system-map.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +2 -2
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/value-flow.d.ts +3 -3
- package/dist/queries/value-flow.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- 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-ARMA6XUJ.js +2 -0
- package/dist/refs-pagination-VUGIWN6U.js +2 -0
- package/dist/reindex-worker.js +125 -66
- package/dist/reindex.d.ts +5 -3
- package/dist/reindex.js +135 -76
- package/dist/runtime.d.ts +5 -5
- 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/{scip-cli-CppzF5MK.d.ts → scip-cli-H-n59izO.d.ts} +1 -1
- package/dist/slice-YOB5YFAM.js +2 -0
- package/dist/surface-VY5EFWTW.js +2 -0
- package/dist/symbol-resolution-DGQN4XIV.js +2 -0
- package/dist/system-2KQ3QD2P.js +2 -0
- package/dist/trace-HTIPTXAE.js +2 -0
- package/dist/typescript-mailbox-worker.js +1 -1
- package/dist/value-flow-5FV3VQI7.js +2 -0
- package/dist/watch-server.js +3 -3
- package/docs/CLI_JSON_OUTPUT.md +2 -2
- package/docs/COMMAND_REFERENCE.md +2 -2
- package/docs/schemas/project-config.schema.json +11 -1
- package/package.json +6 -5
- package/skills/scip-explore/SKILL.md +73 -3
- package/skills/scip-explore/agents/openai.yaml +3 -3
- package/skills/scip-explore/references/delegated-exploration.md +51 -0
- package/skills/scip-explore/references/external-evidence.md +72 -0
- package/skills/scip-explore/references/information-model.md +51 -0
- package/skills/scip-explore/scripts/capture-evidence.mjs +666 -0
- package/skills/scip-query/SKILL.md +22 -1
- package/dist/by-kind-CI3O6PQG.js +0 -2
- package/dist/call-graph-6QTUTXH7.js +0 -2
- package/dist/chunk-2COFMIVK.js +0 -60
- package/dist/chunk-35ELD3RM.js +0 -2
- package/dist/chunk-3FQ3KMCD.js +0 -2
- package/dist/chunk-3VLJ2DCA.js +0 -2
- package/dist/chunk-4DCKBY6T.js +0 -5
- package/dist/chunk-4N6QSEMZ.js +0 -10
- package/dist/chunk-4OE2JO6I.js +0 -2
- package/dist/chunk-4UUCUASK.js +0 -554
- package/dist/chunk-54EOGFBR.js +0 -2
- package/dist/chunk-5IZTXSOL.js +0 -117
- package/dist/chunk-5ZJH6DDE.js +0 -2
- package/dist/chunk-63MBA7EG.js +0 -3
- package/dist/chunk-6T7H2AFY.js +0 -3
- package/dist/chunk-7COHFNJK.js +0 -38
- package/dist/chunk-7HU2IJ2T.js +0 -3
- package/dist/chunk-7PPYXENX.js +0 -2
- package/dist/chunk-AA7K3XLM.js +0 -21
- package/dist/chunk-AUP6YI5M.js +0 -2
- package/dist/chunk-CA5RE6H7.js +0 -2
- package/dist/chunk-CT5SI2I4.js +0 -2
- package/dist/chunk-D5EKVZPI.js +0 -2
- package/dist/chunk-DMQ7ZKJG.js +0 -81
- package/dist/chunk-ELNRLMC5.js +0 -29
- package/dist/chunk-F7WQ337U.js +0 -308
- package/dist/chunk-FEQIQ26E.js +0 -2
- package/dist/chunk-FN6EJM6Q.js +0 -2
- package/dist/chunk-FTSQNONX.js +0 -2
- package/dist/chunk-G2F6T5BV.js +0 -2
- package/dist/chunk-G6OGPXJW.js +0 -9
- package/dist/chunk-GFLTPNWV.js +0 -3
- package/dist/chunk-GTDP2SKQ.js +0 -2
- package/dist/chunk-HEOMG7IM.js +0 -8
- package/dist/chunk-I3U2FN2T.js +0 -13
- package/dist/chunk-IUJ3ZFEE.js +0 -7
- package/dist/chunk-LXLD46LH.js +0 -21
- package/dist/chunk-MEI3PTUK.js +0 -2
- package/dist/chunk-MO226P4Q.js +0 -4
- package/dist/chunk-MYUKI5VN.js +0 -4
- package/dist/chunk-OIRWZIYL.js +0 -38
- package/dist/chunk-OIVZ7PW6.js +0 -438
- package/dist/chunk-PNISDVYC.js +0 -3
- package/dist/chunk-PQOL42AW.js +0 -2
- package/dist/chunk-PUVZNFVY.js +0 -11
- package/dist/chunk-PZEI2TVL.js +0 -4
- package/dist/chunk-Q2J2VZZT.js +0 -2
- package/dist/chunk-QDCCHMVZ.js +0 -2
- package/dist/chunk-QLQBZOJH.js +0 -3
- package/dist/chunk-S73HBCGI.js +0 -11
- package/dist/chunk-SDPA5DKN.js +0 -210
- package/dist/chunk-SEUJVWT2.js +0 -3
- package/dist/chunk-SF7X6QNW.js +0 -2
- package/dist/chunk-SWFAFA4G.js +0 -49
- package/dist/chunk-T6FRID7Y.js +0 -3
- package/dist/chunk-TNOHGHZQ.js +0 -2
- package/dist/chunk-U2GPTA5U.js +0 -3
- package/dist/chunk-URTX2BEA.js +0 -6
- package/dist/chunk-VGRUM7JI.js +0 -3
- package/dist/chunk-VWLIOEEF.js +0 -11
- package/dist/chunk-WK4FD4PG.js +0 -2
- package/dist/chunk-X434XZAI.js +0 -2
- package/dist/chunk-YIEFEPG6.js +0 -16
- package/dist/chunk-YRVERHJR.js +0 -49
- package/dist/chunk-ZD3Z54IW.js +0 -2
- package/dist/chunk-ZDVDSDFG.js +0 -4
- package/dist/code-EQL6ZBLH.js +0 -2
- package/dist/code-result-json-6E4J6LGZ.js +0 -2
- package/dist/command-descriptors-QH3G2OVD.js +0 -346
- package/dist/dataflow-2BLMUZBP.js +0 -2
- package/dist/dependence-slice-MGAJDZXB.js +0 -2
- package/dist/deps-GQMUYVKW.js +0 -2
- package/dist/direct-navigation-6RUJKLAV.js +0 -3
- package/dist/entry-map-V2NQP5JU.js +0 -2
- package/dist/files-VM53I4IU.js +0 -2
- package/dist/hierarchy-D553WRSZ.js +0 -2
- package/dist/imports-DOZAJWLW.js +0 -2
- package/dist/members-HE67475K.js +0 -2
- package/dist/methods-K5JK4PPH.js +0 -2
- package/dist/output-continuation-command-LKBUTNRL.js +0 -3
- package/dist/project-reindex-4ARU6QCM.js +0 -3
- package/dist/refs-NBHKL4UQ.js +0 -2
- package/dist/refs-pagination-BBVTIHMH.js +0 -2
- package/dist/slice-U6S6LBSB.js +0 -2
- package/dist/surface-C7SS5CDQ.js +0 -2
- package/dist/symbol-resolution-3FVEKDTJ.js +0 -2
- package/dist/system-6K2NOO5C.js +0 -2
- package/dist/trace-II5K2TMH.js +0 -2
- package/dist/value-flow-MKFUUE5B.js +0 -2
package/dist/chunk-SDPA5DKN.js
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import{d as Zt}from"./chunk-DOPCR5BY.js";import{a as nn,b as h,c as fe,d as rn,e as me,f as _e}from"./chunk-VWLIOEEF.js";import{b as K,c as sn,d as on,e as we,g as ut}from"./chunk-DRENNWRG.js";import{a as at,b as ct,e as lt}from"./chunk-HGFDYOVB.js";import{da as en,ea as tn,h as Ae,z as N}from"./chunk-4DCKBY6T.js";var Ar=h("source-text",{clearGroups:["whole-project","source-file"]}),wr=h("source-lines",{clearGroups:["whole-project","source-file"]});function b(e,t){let n=t.replace(/\\/g,"/");return Ar.get(e,n,()=>{try{return en(e.config.projectRoot,n,{inputKind:"indexed source file"})}catch(r){if(tn(r))return"";throw r}})}function ac(e){if(e.length===0)return[];let t=e.split(`
|
|
2
|
-
`);return e.endsWith(`
|
|
3
|
-
`)&&t.pop(),t}function pt(e,t){let n=t.replace(/\\/g,"/");return wr.get(e,n,()=>{let r=b(e,n);return r?r.split(`
|
|
4
|
-
`):[]})}var Or=/^\s*(?:\/\/|#|\/\*+|\*)\s*scip-query[\s:-]*ignore(?:[\s:-]+(dead(?:-code)?|stale|wrapper|passthrough|drift|extract|similar|twin))?\b/i;function jr(e){let t=Or.exec(e);return t?t[1]??"":null}function cc(e,t,n){return Mr(e,t,n).length>0}function Mr(e,t,n){if(n<=0)return[];let r=pt(e,t);if(r.length===0)return[];let i=[];for(let s=n-1;s>=0&&s>=n-5;s-=1){let o=(r[s]??"").trim();if(o==="")continue;let a=jr(o);if(a!==null){i.push(a);continue}if(!o.startsWith("//")&&!o.startsWith("*")&&!o.startsWith("/*")&&!o.startsWith("@")&&!o.startsWith("#"))return i}return i}import{extname as an}from"path";var $r={".rs":"rust",".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"tsx",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".pyi":"python",".java":"java",".kt":"kotlin",".kts":"kotlin",".scala":"scala",".sc":"scala",".rb":"ruby",".c":"c",".h":"c",".cc":"cpp",".cpp":"cpp",".cxx":"cpp",".hpp":"cpp",".hh":"cpp",".hxx":"cpp",".cs":"csharp",".php":"php",".vb":"vb",".clj":"clojure",".cljs":"clojure",".cljc":"clojure"};function z(e){return $r[an(e).toLowerCase()]??null}function q(e){return an(e).toLowerCase()===".vue"}import{createHash as Br}from"crypto";import{existsSync as Vr,mkdirSync as Ur}from"fs";import{dirname as cn,join as Wr}from"path";import dt from"better-sqlite3";var Hr="evidence.db";var Xr=["source-facts","definition-exclusions","doc-path-tokens","react-component-behavior-profiles"],ft=new Set(Xr),Kr=25e4,zr=512*1024*1024,qr=6e4,Oe=new WeakMap,Jr=h("evidence-content-hash",{clearGroups:["whole-project","source-file"]}),Qr=h("evidence-project-fingerprint",{clearGroups:["whole-project"]}),T="evidence-v1",ge="version NOT LIKE 'evidence-%'";function je(e){return Br("sha256").update(e).digest("hex")}function J(e,t,n){return Jr.get(e,t,()=>je(n))}function Ce(e){return Qr.get(e,"current",()=>{try{if(!e.generation.metadataRaw)return null;let t=Zt(e.generation.metadataRaw);if(t.kind!=="legacy"&&t.kind!=="supported"||!t.capabilities.usableForEvidenceCache)return null;let n=t.metadata,r=[...n.indexedLanguages??[]].sort();return je(JSON.stringify({fingerprint:n.fingerprint,indexedLanguages:r,status:n.status}))}catch(t){return te("project fingerprint unavailable",t),null}})}function te(e,t){process.env.SCIP_QUERY_DEBUG&&console.error(`evidence-cache: ${e}: ${t instanceof Error?t.message:String(t)}`)}function M(e){if(Oe.has(e))return Oe.get(e)??null;let t=null;try{let n=new dt(Wr(cn(e.config.dbPath),Hr));n.pragma("journal_mode = WAL"),n.pragma("busy_timeout = 5000"),n.pragma("synchronous = NORMAL"),n.exec(`
|
|
5
|
-
CREATE TABLE IF NOT EXISTS file_evidence (
|
|
6
|
-
kind TEXT NOT NULL,
|
|
7
|
-
relative_path TEXT NOT NULL,
|
|
8
|
-
content_hash TEXT NOT NULL,
|
|
9
|
-
version TEXT NOT NULL,
|
|
10
|
-
payload TEXT NOT NULL,
|
|
11
|
-
PRIMARY KEY (kind, relative_path)
|
|
12
|
-
);
|
|
13
|
-
CREATE TABLE IF NOT EXISTS project_evidence (
|
|
14
|
-
kind TEXT NOT NULL,
|
|
15
|
-
cache_key TEXT NOT NULL,
|
|
16
|
-
project_fingerprint TEXT NOT NULL,
|
|
17
|
-
version TEXT NOT NULL,
|
|
18
|
-
payload TEXT NOT NULL,
|
|
19
|
-
PRIMARY KEY (kind, cache_key)
|
|
20
|
-
);
|
|
21
|
-
CREATE TABLE IF NOT EXISTS semantic_callees (
|
|
22
|
-
relative_path TEXT NOT NULL,
|
|
23
|
-
symbol TEXT NOT NULL,
|
|
24
|
-
content_hash TEXT NOT NULL,
|
|
25
|
-
deps_digest TEXT NOT NULL,
|
|
26
|
-
version TEXT NOT NULL,
|
|
27
|
-
payload TEXT NOT NULL,
|
|
28
|
-
PRIMARY KEY (relative_path, symbol)
|
|
29
|
-
);
|
|
30
|
-
CREATE TABLE IF NOT EXISTS semantic_references (
|
|
31
|
-
relative_path TEXT NOT NULL,
|
|
32
|
-
symbol TEXT NOT NULL,
|
|
33
|
-
project_fingerprint TEXT NOT NULL,
|
|
34
|
-
version TEXT NOT NULL,
|
|
35
|
-
payload TEXT NOT NULL,
|
|
36
|
-
PRIMARY KEY (relative_path, symbol)
|
|
37
|
-
);
|
|
38
|
-
`),t={evidence:n,shared:Yr(e.config.sharedEvidenceDbPath),readFileEvidence:n.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),readLegacyFileEvidence:n.prepare(`SELECT payload FROM file_evidence
|
|
39
|
-
WHERE kind = ? AND relative_path = ? AND content_hash = ? AND ${ge}
|
|
40
|
-
ORDER BY version DESC
|
|
41
|
-
LIMIT 1`),writeFileEvidence:n.prepare("INSERT OR REPLACE INTO file_evidence (kind, relative_path, content_hash, version, payload) VALUES (?, ?, ?, ?, ?)"),readProjectEvidence:n.prepare("SELECT payload FROM project_evidence WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND version = ?"),readLegacyProjectEvidence:n.prepare(`SELECT payload FROM project_evidence
|
|
42
|
-
WHERE kind = ? AND cache_key = ? AND project_fingerprint = ? AND ${ge}
|
|
43
|
-
ORDER BY version DESC
|
|
44
|
-
LIMIT 1`),writeProjectEvidence:n.prepare("INSERT OR REPLACE INTO project_evidence (kind, cache_key, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)"),readCallees:n.prepare(`SELECT payload FROM semantic_callees
|
|
45
|
-
WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCallees:n.prepare(`SELECT payload FROM semantic_callees
|
|
46
|
-
WHERE relative_path = ? AND symbol = ? AND content_hash = ? AND deps_digest = ? AND ${ge}
|
|
47
|
-
ORDER BY version DESC
|
|
48
|
-
LIMIT 1`),readCalleesForFile:n.prepare(`SELECT symbol, payload FROM semantic_callees
|
|
49
|
-
WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND version = ?`),readLegacyCalleesForFile:n.prepare(`SELECT symbol, payload FROM semantic_callees
|
|
50
|
-
WHERE relative_path = ? AND content_hash = ? AND deps_digest = ? AND ${ge}
|
|
51
|
-
ORDER BY symbol, version DESC`),writeCallees:n.prepare(`INSERT OR REPLACE INTO semantic_callees
|
|
52
|
-
(relative_path, symbol, content_hash, deps_digest, version, payload) VALUES (?, ?, ?, ?, ?, ?)`),dropStaleCallees:n.prepare("DELETE FROM semantic_callees WHERE relative_path = ? AND content_hash != ?"),readReferences:n.prepare(`SELECT payload FROM semantic_references
|
|
53
|
-
WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferences:n.prepare(`SELECT payload FROM semantic_references
|
|
54
|
-
WHERE relative_path = ? AND symbol = ? AND project_fingerprint = ? AND ${ge}
|
|
55
|
-
ORDER BY version DESC
|
|
56
|
-
LIMIT 1`),readReferencesForFile:n.prepare(`SELECT symbol, payload FROM semantic_references
|
|
57
|
-
WHERE relative_path = ? AND project_fingerprint = ? AND version = ?`),readLegacyReferencesForFile:n.prepare(`SELECT symbol, payload FROM semantic_references
|
|
58
|
-
WHERE relative_path = ? AND project_fingerprint = ? AND ${ge}
|
|
59
|
-
ORDER BY symbol, version DESC`),writeReferences:n.prepare(`INSERT OR REPLACE INTO semantic_references
|
|
60
|
-
(relative_path, symbol, project_fingerprint, version, payload) VALUES (?, ?, ?, ?, ?)`),dropStaleReferences:n.prepare("DELETE FROM semantic_references WHERE relative_path = ? AND project_fingerprint != ?")}}catch(n){te("disabled (open failed)",n)}return Oe.set(e,t),t}function $(e,t,n){te(`disabled (${t})`,n),Oe.set(e,null)}function Yr(e){if(!e)return null;try{Ur(cn(e),{recursive:!0});let t=new dt(e);return t.pragma("journal_mode = WAL"),t.pragma("busy_timeout = 250"),t.pragma("synchronous = NORMAL"),t.exec(`
|
|
61
|
-
CREATE TABLE IF NOT EXISTS file_evidence (
|
|
62
|
-
kind TEXT NOT NULL,
|
|
63
|
-
relative_path TEXT NOT NULL,
|
|
64
|
-
content_hash TEXT NOT NULL,
|
|
65
|
-
version TEXT NOT NULL,
|
|
66
|
-
payload TEXT NOT NULL,
|
|
67
|
-
last_accessed_at INTEGER NOT NULL,
|
|
68
|
-
PRIMARY KEY (kind, relative_path, content_hash, version)
|
|
69
|
-
);
|
|
70
|
-
CREATE INDEX IF NOT EXISTS idx_file_evidence_lru
|
|
71
|
-
ON file_evidence(last_accessed_at, kind, relative_path, content_hash, version);
|
|
72
|
-
`),{evidence:t,readFileEvidence:t.prepare("SELECT payload FROM file_evidence WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?"),writeFileEvidence:t.prepare(`INSERT INTO file_evidence (kind, relative_path, content_hash, version, payload, last_accessed_at)
|
|
73
|
-
VALUES (?, ?, ?, ?, ?, ?)
|
|
74
|
-
ON CONFLICT(kind, relative_path, content_hash, version)
|
|
75
|
-
DO UPDATE SET payload = excluded.payload, last_accessed_at = excluded.last_accessed_at`),touchFileEvidence:t.prepare(`UPDATE file_evidence
|
|
76
|
-
SET last_accessed_at = ?
|
|
77
|
-
WHERE kind = ? AND relative_path = ? AND content_hash = ? AND version = ?
|
|
78
|
-
AND last_accessed_at < ?`)}}catch(t){return te("shared cache disabled (open failed)",t),null}}function mt(e,t,n){te(`shared cache disabled (${t})`,n);try{e.shared?.evidence.close()}catch{}e.shared=null}function Sc(e,t={}){if(!Vr(e))return null;let n;try{n=new dt(e),n.pragma("busy_timeout = 50"),n.exec(`CREATE INDEX IF NOT EXISTS idx_file_evidence_lru
|
|
79
|
-
ON file_evidence(last_accessed_at, kind, relative_path, content_hash, version)`),n.pragma("wal_checkpoint(TRUNCATE)");let r=n.prepare("SELECT COUNT(*) AS count FROM file_evidence").get().count,i=t.maxRows??Kr,s=t.budgetBytes??zr,o=Number(n.pragma("page_size",{simple:!0})),a=Number(n.pragma("page_count",{simple:!0})),c=Number(n.pragma("freelist_count",{simple:!0})),l=Math.max(0,a-c)*o,u=r>0&&l>s?Math.min(r,Math.ceil((l-s)/Math.max(1,l/r))):0,p=Math.max(r-i,u);return p>0&&(n.prepare(`DELETE FROM file_evidence WHERE rowid IN (
|
|
80
|
-
SELECT rowid FROM file_evidence ORDER BY last_accessed_at ASC, rowid ASC LIMIT ?
|
|
81
|
-
)`).run(p),n.pragma("wal_checkpoint(TRUNCATE)")),{deletedRows:p,remainingRows:r-p}}catch(r){return te("shared cache maintenance skipped",r),null}finally{try{n?.close()}catch{}}}function ln(e,t,n,r){let i=M(e);if(!i)return null;try{let s=i.readFileEvidence.get(t,n,r,T)??i.readLegacyFileEvidence.get(t,n,r);if(s?.payload!==void 0)return s.payload;if(!ft.has(t)||!i.shared)return null;try{let o=i.shared.readFileEvidence.get(t,n,r,T);return o?.payload!==void 0&&Gr(i.shared,t,n,r),o?.payload??null}catch(o){return mt(i,"file_evidence read",o),null}}catch(s){return $(e,"file_evidence read",s),null}}function Gr(e,t,n,r){let i=Date.now();try{e.touchFileEvidence.run(i,t,n,r,T,i-qr)}catch(s){te("shared file_evidence recency touch skipped",s)}}function un(e,t,n,r,i){let s=M(e);if(s)try{if(s.writeFileEvidence.run(t,n,r,T,i),ft.has(t)&&s.shared)try{s.shared.writeFileEvidence.run(t,n,r,T,i,Date.now())}catch(o){mt(s,"file_evidence write",o)}}catch(o){$(e,"file_evidence write",o)}}function pn(e,t){if(t.length===0)return;let n=M(e);if(n)try{n.evidence.transaction(()=>{for(let i of t)n.writeFileEvidence.run(i.kind,i.relativePath,i.contentHash,T,i.payload)})();let r=t.filter(i=>ft.has(i.kind));if(r.length>0&&n.shared)try{n.shared.evidence.transaction(()=>{for(let i of r)n.shared.writeFileEvidence.run(i.kind,i.relativePath,i.contentHash,T,i.payload,Date.now())})()}catch(i){mt(n,"file_evidence batch write",i)}}catch(r){$(e,"file_evidence batch write",r)}}function dn(e,t,n,r){let i=M(e);if(!i)return null;try{return(i.readProjectEvidence.get(t,n,r,T)??i.readLegacyProjectEvidence.get(t,n,r))?.payload??null}catch(s){return $(e,"project_evidence read",s),null}}function fn(e,t,n,r,i){let s=M(e);if(s)try{s.writeProjectEvidence.run(t,n,r,T,i)}catch(o){$(e,"project_evidence write",o)}}function xc(e,t,n,r){let i=M(e);if(!i)return new Map;try{let s=i.readCalleesForFile.all(t,n,r,T),o=i.readLegacyCalleesForFile.all(t,n,r);return mn([...o,...s])}catch(s){return $(e,"semantic_callees bulk read",s),new Map}}function bc(e,t,n){let r=M(e);if(!r)return new Map;try{let i=r.readReferencesForFile.all(t,n,T),s=r.readLegacyReferencesForFile.all(t,n);return mn([...s,...i])}catch(i){return $(e,"semantic_references bulk read",i),new Map}}function mn(e){let t=new Map;for(let n of e)t.set(n.symbol,n.payload);return t}function Ec(e,t){if(t.length===0)return;let n=M(e);if(n)try{n.evidence.transaction(()=>{let r=new Set;for(let i of t){let s=`${i.relativePath}\0${i.contentHash}`;r.has(s)||(r.add(s),n.dropStaleCallees.run(i.relativePath,i.contentHash)),n.writeCallees.run(i.relativePath,i.symbol,i.contentHash,i.depsDigest,T,i.payload)}})()}catch(r){$(e,"semantic_callees write",r)}}function Nc(e,t){if(t.length===0)return;let n=M(e);if(n)try{n.evidence.transaction(()=>{let r=new Set;for(let i of t){let s=`${i.relativePath}\0${i.projectFingerprint}`;r.has(s)||(r.add(s),n.dropStaleReferences.run(i.relativePath,i.projectFingerprint)),n.writeReferences.run(i.relativePath,i.symbol,i.projectFingerprint,T,i.payload)}})()}catch(r){$(e,"semantic_references write",r)}}var Zr=[_("source-facts",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/source-facts.ts"}),_("file-definitions",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/symbols/definition-catalog.ts"}),_("definition-exclusions",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/framework-patterns.ts"}),_("doc-path-tokens",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-products.test.ts",owner:"tests/storage/evidence-cache.test.ts"}),_("doc-path-evidence",{dependsOn:["content-hash","git-history","git-head","tool-version"],keyParts:["kind","relativePath","contentHash","trackedFiles","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/cleanup/doc-drift.ts"}),_("source-imports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),_("source-reexports",{dependsOn:["content-hash","import-resolution-fingerprint","config","tool-version"],keyParts:["kind","relativePath","contentHash","importResolutionFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/language-parsers/index.ts"}),_("source-fingerprints",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/definition-catalog.test.ts",owner:"src/queries/cleanup/similar.ts"}),_("consumer-file-usage",{dependsOn:["content-hash","project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","contentHash","projectFingerprint","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/queries/internal/consumer-evidence.ts"}),_("react-component-behavior-profiles",{dependsOn:["content-hash","tool-version"],keyParts:["kind","relativePath","contentHash","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/source/react-profile.ts"}),_("git-file-adds",{dependsOn:["git-head","git-history","tool-version"],keyParts:["kind","cacheKey","head","historyWindow","payloadVersion"],stalenessTest:"tests/storage/evidence-cache.test.ts",owner:"src/analysis/git-history.ts"}),_("typescript-reference-fragments",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-reference-fragments.test.ts",owner:"src/semantic/typescript/reference-fragment-shadow.ts"}),_("typescript-import-usage",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),_("typescript-signatures",{dependsOn:["content-hash","transitive-deps-digest","config","tool-version"],keyParts:["kind","relativePath","semanticIdentity","payloadVersion"],stalenessTest:"tests/semantic/typescript/typescript-semantic-provider.test.ts",owner:"src/semantic/shared-primitives.ts"}),Me("file-dependency-graph",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","scope","projectFingerprint","payloadVersion"],stalenessTest:"tests/symbols/file-dep-graph.test.ts",owner:"src/symbols/graph/file-dep-graph.ts"}),Me("semantic-import-usage",{dependsOn:["project-fingerprint","indexed-language-set","import-resolution-fingerprint","tool-version"],keyParts:["kind","relativePath","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),Me("semantic-signatures",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","relativePath","symbol","projectFingerprint","language","semanticEngine","payloadVersion"],stalenessTest:"tests/semantic/rust/rust-semantic-cache-gate.test.ts",owner:"src/semantic/shared-primitives.ts"}),Me("health-semantic-prewarm",{dependsOn:["project-fingerprint","indexed-language-set","tool-version"],keyParts:["kind","scope","cliVersion","projectFingerprint","payloadVersion"],stalenessTest:"tests/runtime/cli-support.test.ts",owner:"src/runtime/cli-support.ts"})];function ne(e){let t=new Map;return{kind:e.kind,read(n,r,i){let s=!1,o=0,a;if(at()){let c=Ce(n);if(c){let l=`${c}\0${r}\0${i}`;a=t.get(l),a||(a=ct(["evidence-product-file-read-v1",e.kind,c,r,i]),t.set(l,a))}}return lt("evidence-product.file.read",()=>{let c=ln(n,e.kind,r,i);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return s=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"file",kind:e.kind,available:!0,hit:s,payloadBytes:o}))},write(n,r,i,s){un(n,e.kind,r,i,e.serialize(s))},writeBatch(n,r){pn(n,r.map(i=>({kind:e.kind,relativePath:i.relativePath,contentHash:i.contentHash,payload:e.serialize(i.value)})))}}}function vc(e){let t=new Map;return{kind:e.kind,read(n,r,i){let s=!1,o=0,a;if(at()){let c=`${i}\0${r}`;a=t.get(c),a||(a=ct(["evidence-product-project-read-v1",e.kind,i,r]),t.set(c,a))}return lt("evidence-product.project.read",()=>{let c=dn(n,e.kind,r,i);if(c===null)return null;o=c.length;try{let l=e.deserialize(c);return s=l!==null,l}catch{return null}},()=>({...a?{workIdentity:a,workOutcome:"computed"}:{},scope:"project",kind:e.kind,available:!0,hit:s,payloadBytes:o}))},write(n,r,i,s){fn(n,e.kind,r,i,e.serialize(s))}}}function re(e){let t=Zr.find(n=>n.kind===e);if(!t)throw new Error(`missing evidence product manifest entry for ${e}`);return t.invalidation}function _(e,t){return{scope:"file",kind:e,invalidation:{scope:"file",...t}}}function Me(e,t){return{scope:"project",kind:e,invalidation:{scope:"project",...t}}}import{createRequire as ei}from"module";var E=ei(import.meta.url),$e=null,gn=!1;function ti(){if(gn)return null;if($e)return $e;try{return $e=E("tree-sitter"),$e}catch{return gn=!0,null}}var yn=new Map,Be=new Set;function ni(e){if(Be.has(e))return null;let t=yn.get(e);if(t)return t;let n;try{switch(e){case"rust":n=E("tree-sitter-rust");break;case"typescript":n=E("tree-sitter-typescript").typescript;break;case"tsx":n=E("tree-sitter-typescript").tsx;break;case"javascript":n=E("tree-sitter-javascript");break;case"python":n=E("tree-sitter-python");break;case"java":n=E("tree-sitter-java");break;case"kotlin":n=E("tree-sitter-kotlin");break;case"scala":n=E("tree-sitter-scala");break;case"ruby":n=E("tree-sitter-ruby");break;case"c":n=E("tree-sitter-c");break;case"cpp":n=E("tree-sitter-cpp");break;case"csharp":n=E("tree-sitter-c-sharp");break;case"php":n=E("tree-sitter-php").php;break;case"vb":{let r=E("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return Be.add(e),null}}catch{return Be.add(e),null}return yn.set(e,n),n}var hn=new Map;function ri(e){let t=hn.get(e);if(t)return t;let n=ni(e);if(!n)return null;let r=ti();if(!r)return null;let i=new r;try{i.setLanguage(n)}catch{return Be.add(e),null}return hn.set(e,i),i}function ii(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function Ie(e,t){let n=ri(e);if(!n)return null;try{return ii(n,t)}catch{return null}}import{createRequire as si}from"module";import{posix as gt}from"path";var Oc=rn("vue-sfc-units"),oi=si(import.meta.url),ai;function ci(){return ai??=oi("@vue/compiler-sfc")}function li(...e){return ci().parse(...e)}function ui(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function pi(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function bn(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let i;try{i=li(n,{filename:t})}catch(o){return r.errors.push(xn(o)),r}r.errors.push(...i.errors.map(xn));let{descriptor:s}=i;return s.template&&(r.template=Ve(e,t,"template",s.template)),s.script&&r.scripts.push(Sn(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push(Sn(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(o=>Ve(e,t,"style",o)),r.customBlocks=s.customBlocks.map(o=>Ve(e,t,"custom",o)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(o=>o?.errors??[])),r}function Sn(e,t,n,r){let i=Ve(e,t,"script",n);return{...i,kind:"script",setup:r,astLanguage:pi(i.lang)}}function Ve(e,t,n,r){let i=fi(r.attrs),s=typeof i.lang=="string"?i.lang:null,o=typeof i.src=="string"?i.src:typeof r.src=="string"?r.src:void 0;if(o){let c=di(t,o);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:o,attrs:i,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${o}`]};let l=b(e,c),u=l?Math.max(0,l.split(`
|
|
82
|
-
`).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:o,attrs:i,lang:s,body:l,startLine:0,endLine:u,errors:l?[]:[`Vue ${n} block source not found: ${c}`]}}let a=Math.max(0,r.loc.start.line-1);return{kind:n,ownerPath:t,sourcePath:t,external:!1,attrs:i,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function di(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=ui(gt.normalize(gt.join(gt.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function fi(e){return{...e}}function xn(e){return e instanceof Error?e.message:String(e)}function Te(e,t,n){let i=bn(e,t,n).scripts.filter(o=>o.astLanguage&&o.body.length>0),s=i[0]?.astLanguage;return s?{body:i.map(o=>`${`
|
|
83
|
-
`.repeat(o.startLine)}${o.body}`).join(`
|
|
84
|
-
`),startLine:0,language:s}:null}var En=me("ast-trees",{clearGroups:["whole-project","source-file"]});function B(e,t){if(q(t))return mi(e,t);let n=z(t);if(!n)return null;let r=b(e,t);return r?En.get(e,t,r,()=>Ie(n,r)):null}function Le(e,t,n){if(q(t)){let s=Te(e,t,n);if(!s)return null;let o=Ie(s.language,`
|
|
85
|
-
`.repeat(s.startLine)+s.body);return o?{tree:o,language:s.language}:null}let r=z(t);if(!r)return null;let i=Ie(r,n);return i?{tree:i,language:r}:null}function mi(e,t){let n=b(e,t);return n?En.get(e,t,n,()=>{let r=Te(e,t,n);if(!r)return null;let i=`
|
|
86
|
-
`.repeat(r.startLine)+r.body;return Ie(r.language,i)}):null}function ve(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var vn=["function_declaration","generator_function_declaration","method_definition","method_signature","function_signature"],gi=new Set(vn),yi=[...vn,"variable_declarator","public_field_definition"],hi=["function_item","function_signature_item"],Si=["function_definition"],xi=[],Nn=new Set(["arrow_function","function_expression","generator_function"]);function Dn(e){return e==="rust"?hi:e==="python"?Si:e==="typescript"||e==="tsx"||e==="javascript"?yi:xi}function Ue(e,t){let n=Ei(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:Tn(n.functionNode),params:_n(n.functionNode),paramsEndLine:Cn(n.functionNode),isLiteralPassthrough:Ln(n.functionNode,t)};if(!bi(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(i=>i.type==="identifier"||i.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:Tn(e),params:_n(e),paramsEndLine:Cn(e),isLiteralPassthrough:Ln(e,t)}:null}function Rn(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function _n(e){let t=Rn(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(ve(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let i=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),s=r.childForFieldName("pattern");if(!i&&s&&s.type==="identifier"){n.push({name:s.text,simple:!0});continue}let o=r.namedChildren.find(a=>a.type==="identifier");n.push({name:s?.type==="identifier"?s.text:o?.text??"",simple:!1})}return n}function Cn(e){let t=Rn(e);return t?t.endPosition.row:e.startPosition.row}function bi(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?gi.has(e):!1}function Ei(e,t){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript")return null;if(e.type==="variable_declarator"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let i=In(r);return i?{name:n.text,definitionNode:e,functionNode:i}:null}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(!n||!r)return null;let i=In(r);return i?{name:n.text,definitionNode:e,functionNode:i}:null}return null}function In(e){if(Nn.has(e.type))return e;if(e.type!=="call_expression"||(e.childForFieldName("function")??e.namedChild(0))?.type!=="call_expression")return null;let r=((e.childForFieldName("arguments")??e.namedChildren.find(i=>i.type==="arguments"))?.namedChildren??[]).filter(i=>Nn.has(i.type));return r.length===1?r[0]:null}function Tn(e){let t=e.namedChildren.find(r=>r.type==="parameters"||r.type==="formal_parameters");if(!t)return 0;let n=0;for(let r of t.namedChildren)ve(r)||(n+=1);return n}function Ln(e,t){let n=e.namedChildren.find(p=>p.type==="block"||p.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(p=>!ve(p));if(r.length!==1)return!1;let i=r[0],s=null;if(i.type==="return_statement"||i.type==="expression_statement"?s=i.namedChild(0)??null:t==="rust"&&(i.type==="call_expression"||i.type==="macro_invocation")&&(s=i),!s)return!1;let o=t==="python"?"call":"call_expression";if(s.type!==o)return!1;let a=s.namedChildren.find(p=>p.type==="arguments"||p.type==="argument_list");if(!a)return!1;let c=a.namedChildren.filter(p=>!ve(p)),l=e.namedChildren.find(p=>p.type==="parameters"||p.type==="formal_parameters");if(!l)return!1;let u=[];for(let p of l.namedChildren){if(p.type==="identifier"){u.push(p.text);continue}let d=p.namedChildren.find(f=>f.type==="identifier");d&&u.push(d.text)}if(c.length!==u.length)return!1;for(let p=0;p<u.length;p+=1){let d=c[p];if(d.type!=="identifier"||d.text!==u[p])return!1}return!0}function qc(e,t){return e.filter(n=>n.startLine<=t&&n.endLine>=t).sort((n,r)=>n.endLine-n.startLine-(r.endLine-r.startLine)||n.startLine-r.startLine)[0]??null}function kn(e,t){let n=_i(e,t);if(!n)return null;let r=ie(n);if(!r)return null;let i=Ci(n);return{calleeLeaf:r,calleeQualifier:i?Ni(n):void 0,calleeText:n.text,memberAccess:i,line:e.startPosition.row}}function Ni(e){return(e.childForFieldName("object")??e.childForFieldName("value")??e.namedChild(0)??void 0)?.text||void 0}function _i(e,t){if(t==="rust")return e.type==="call_expression"?e.childForFieldName("function")??e.namedChild(0):e.type==="macro_invocation"?e.childForFieldName("macro")??e.namedChild(0):null;if(t==="python")return e.type!=="call"?null:e.childForFieldName("function")??e.namedChild(0);if(t==="typescript"||t==="tsx"||t==="javascript"){if(e.type==="call_expression")return e.childForFieldName("function")??e.namedChild(0);if(e.type==="new_expression")return e.childForFieldName("constructor")??e.namedChild(0)}return null}function Ci(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function ie(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"private_property_identifier":case"shorthand_property_identifier":return e.text.replace(/^#/u,"");case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?ie(t):null}case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?ie(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?ie(t):null}case"super":case"self":case"this":return null;default:return null}}var Ii=new Set(["identifier","type_identifier","field_identifier"]),Ti=new Set(["identifier"]),Li=new Set(["identifier","property_identifier","type_identifier","shorthand_property_identifier","shorthand_property_identifier_pattern"]),vi=new Set(["rust","python"]),Di=/\{([^{}]*)\}/g,Ri=/\b([A-Za-z_][\w]*)\b/g;function Fn(e,t){return ki(t).has(e.type)}function Pn(e,t){return vi.has(t)&&e.type==="string_content"}function yt(e){let t=0;for(let r of e.values()){let i=r[r.length-1];i!==void 0&&i>t&&(t=i)}let n=new Array(t+1);for(let r=0;r<=t;r+=1)n[r]=new Set;for(let[r,i]of e)for(let s of i)n[s].add(r);return n}function ki(e){return e==="rust"?Ii:e==="python"?Ti:Li}function An(e,t){let n=e.startPosition.row;for(let r of e.text.matchAll(Di)){let i=r[1]??"";for(let s of i.matchAll(Ri))s[1]&&t(s[1],n)}}var Fi=[/\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],Pi=/^#!?\[\s*serde\s*\(/,Ai=/^#!?\[\s*schemars\s*\(/,wi=/^#!?\[\s*validate\s*\(/,Oi=new Set(["invoke","invokeTauriCommand","listen","once","emit","subscribe","dispatch","sendCommand","callRust"]);function wn(e,t,n){if(t!=="typescript"&&t!=="tsx"&&t!=="javascript"||e.type!=="call_expression")return;let r=e.childForFieldName("function")??e.namedChild(0);if(!r)return;let i=ie(r);if(!i||!Oi.has(i))return;let s=e.namedChildren.find(c=>c.type==="arguments");if(!s)return;let o=s.namedChild(0);if(!o||o.type!=="string")return;let a=o.namedChildren.find(c=>c.type==="string_fragment");a&&n.add(a.text)}function On(e,t){let n=Pi.test(e),r=Ai.test(e),i=wi.test(e);if(!(!n&&!r&&!i))for(let s of Fi){s.lastIndex=0;let o;for(;(o=s.exec(e))!==null;){let a=o[1],c=a.split("::").pop()??a;c==="is_none"&&/\bOption\b/.test(a)||c==="is_empty"&&/\b(String|Vec|HashMap|BTreeMap|HashSet|BTreeSet)\b/.test(a)||c&&t.add(c)}}}function jn(e,t){let n=new Map,r=(o,a)=>{if(o===a)return;let c=n.get(o);c||(c=new Set,n.set(o,c)),c.add(a)},i=t==="python"?new Set(["identifier"]):new Set(["type_identifier"]),s=(o,a)=>{let c=l=>{i.has(l.type)&&l.text!==a&&r(l.text,a);for(let u of l.children)c(u)};for(let l of o.children)c(l)};if(t==="rust")for(let o of e.rootNode.descendantsOfType(["struct_item","enum_item","union_item","type_item"])){let a=o.namedChildren.find(l=>l.type==="type_identifier")?.text;if(!a)continue;let c=o.namedChildren.find(l=>l.type==="field_declaration_list"||l.type==="enum_variant_list"||l.type==="ordered_field_declaration_list");c&&s(c,a),o.type==="type_item"&&s(o,a)}else if(t==="python")for(let o of e.rootNode.descendantsOfType("class_definition")){let a=o.namedChildren.find(u=>u.type==="identifier")?.text;if(!a)continue;let c=o.childForFieldName("superclasses");c&&s(c,a);let l=o.namedChildren.find(u=>u.type==="block");if(l)for(let u of l.descendantsOfType("type"))for(let p of u.descendantsOfType("identifier"))p.text!==a&&r(p.text,a)}else for(let o of e.rootNode.descendantsOfType(["interface_declaration","type_alias_declaration","class_declaration"])){let a=o.namedChildren.find(c=>c.type==="type_identifier")?.text;a&&s(o,a)}return n}var ji=new Map([["defn","function"],["defn-","function"],["defmacro","macro"],["defmacro-","macro"],["defmethod","method"]]),ht=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 Mn(e){let t=[],n=[],r=[],i=new Map,s=[],o=0,a=0,c=(l,u)=>{let p=i.get(l);if(!p){i.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)};for(;a<e.length;){let l=e[a];if(l===`
|
|
87
|
-
`){o+=1,a+=1;continue}if(/\s|,/.test(l)){a+=1;continue}if(l===";"){a=He(e,a);continue}if(l==='"'){let x=Re(e,a,o);o=x.line,a=x.index;continue}if(l==="("||l==="["||l==="{"){s.push({kind:l,startLine:o,endLine:o,headTokens:[],tokens:[],children:[]}),a+=1;continue}if(l===")"||l==="]"||l==="}"){let x=s.pop();x&&(x.endLine=o,Mi(x,{callables:t,callSites:n,clojureMembers:r,recordIdentifier:c}),s[s.length-1]?.children.push(x)),a+=1;continue}if(St(l)){a+=1;continue}let u=o,p=a;for(;a<e.length&&!xt(e[a]);)a+=1;let d=e.slice(p,a);if(!d)continue;let f={text:d,line:u};$i(s[s.length-1],f),c(R(d),u)}return{language:"clojure",callables:t,callSites:n,clojureMembers:r,typeContainerMap:new Map,identifierLineMap:i,identifiersByLine:Hi(i),fileIdentifiers:new Set(i.keys()),rustAttrReferencedNames:new Set,crossLanguageDispatchNames:new Set}}function Mi(e,t){if(e.kind!=="("||e.headTokens.length===0)return;let n=e.headTokens[0],r=R(n.text),i=ji.get(n.text);if(i){let o=e.headTokens[1];if(o){let a=R(o.text);t.recordIdentifier(a,o.line),t.callables.push({name:a,startLine:e.startLine,endLine:e.endLine,paramCount:0,params:[],paramsEndLine:o.line,isLiteralPassthrough:!1,clojureKind:i})}}if(Bi(e,t),!r||ht.has(n.text)||ht.has(r)||r.startsWith(":"))return;let s=Wi(n.text);t.callSites.push({calleeLeaf:s.leaf,calleeQualifier:s.qualifier,calleeText:s.text,memberAccess:!1,line:n.line})}function $i(e,t){e&&(e.headTokens.length<2&&e.headTokens.push(t),e.tokens.length<200&&e.tokens.push(t))}function Bi(e,t){let n=R(e.tokens[0]?.text??"");if(n==="defprotocol"){let r=R(e.tokens[1]?.text??"");if(!r)return;for(let i of We(e))De(t,r,"protocol",i,"protocol-method");return}if(n==="defrecord"||n==="deftype"){let r=R(e.tokens[1]?.text??"");if(!r)return;let i=n==="defrecord"?"record":"type",s=n==="defrecord"?"record-method":"type-method";for(let o of We(e))De(t,r,i,o,s);return}if(n==="extend-type"){let r=R(e.tokens[1]?.text??"");if(!r)return;for(let i of We(e))De(t,r,"extension",i,"extension-method");return}if(n==="extend-protocol"){let r=R(e.tokens[1]?.text??"");for(let i of We(e)){r&&De(t,r,"extension",i,"extension-method");let s=Ui(e,i.startLine);s&&s!==r&&De(t,s,"extension",i,"extension-method")}}}function We(e){return e.children.filter(Vi)}function Vi(e){if(e.kind!=="(")return!1;let t=R(e.tokens[0]?.text??"");return!!(t&&!ht.has(t)&&!t.startsWith(":"))}function De(e,t,n,r,i){let s=r.tokens[0],o=R(s?.text??"");!s||!o||(e.recordIdentifier(o,s.line),e.clojureMembers.push({ownerName:t,ownerKind:n,memberName:o,memberKind:i,startLine:r.startLine,endLine:r.endLine}))}function Ui(e,t){let n=null;for(let r=2;r<e.tokens.length;r+=1){let i=e.tokens[r];if(i.line>t)break;let s=R(i.text);s&&!s.startsWith(":")&&(n=s)}return n}function R(e){return e.replace(/^#?['`~@]+/,"").split("/").pop()?.replace(/^\./,"")??""}function Wi(e){let t=e.replace(/^#?['`~@]+/,""),n=t.lastIndexOf("/"),r=R(t);if(n<=0)return{leaf:r,text:t};let i=t.slice(0,n);return{leaf:r,qualifier:i,text:t}}function He(e,t){let n=t;for(;n<e.length&&e[n]!==`
|
|
88
|
-
`;)n+=1;return n}function Re(e,t,n){let r=t+1,i=n;for(;r<e.length;){let s=e[r];if(s==="\\"){r+=2;continue}if(s===`
|
|
89
|
-
`&&(i+=1),r+=1,s==='"')break}return{index:r,line:i}}function St(e){return e==="'"||e==="`"||e==="~"||e==="@"||e==="^"||e==="#"}function xt(e){return/\s|,/.test(e)||e==="("||e===")"||e==="["||e==="]"||e==="{"||e==="}"||e==='"'||e===";"}function Hi(e){let t=[];for(let[n,r]of e)for(let i of r)t[i]??=new Set,t[i].add(n);return t}var $n=6,Xi=me("source-facts",{clearGroups:["whole-project","source-file"]}),bt=ne({kind:"source-facts",invalidation:re("source-facts"),serialize:qi,deserialize:Ji});function ye(e,t){return Et(e,t).facts}function Et(e,t){let n=b(e,t);if(!n)return{facts:null};let r=Ki(e,t,n);return r?Xi.get(e,t,n,()=>zi(e,t,r,n)):{facts:null}}function Ki(e,t,n){return q(t)?Te(e,t,n)?.language??null:z(t)}function zi(e,t,n,r){let i=J(e,t,r),s=bt.read(e,t,i);if(s&&s.language===n)return{facts:s};if(n==="clojure"){let c=Mn(r);return bt.write(e,t,i,c),{facts:c}}let o=B(e,t);if(!o)return{facts:null,unavailable:{language:n,reason:"parser-unavailable"}};let a=Qi(o,n);return bt.write(e,t,i,a),{facts:a}}function qi(e){let t={version:$n,language:e.language,callables:e.callables,callSites:e.callSites,clojureMembers:e.clojureMembers,typeContainerMap:[...e.typeContainerMap.entries()].map(([n,r])=>[n,[...r]]),identifierLineMap:[...e.identifierLineMap.entries()],rustAttrReferencedNames:[...e.rustAttrReferencedNames],crossLanguageDispatchNames:[...e.crossLanguageDispatchNames]};return JSON.stringify(t)}function Ji(e){try{let t=JSON.parse(e);if(t.version!==$n||t.language==="clojure"&&(t.clojureMembers===void 0||t.callSites.some(r=>r.calleeText===void 0)))return null;let n=new Map(t.identifierLineMap);return{language:t.language,callables:t.callables,callSites:t.callSites,clojureMembers:t.clojureMembers??[],typeContainerMap:new Map(t.typeContainerMap.map(([r,i])=>[r,new Set(i)])),identifierLineMap:n,identifiersByLine:yt(n),fileIdentifiers:new Set(n.keys()),rustAttrReferencedNames:new Set(t.rustAttrReferencedNames),crossLanguageDispatchNames:new Set(t.crossLanguageDispatchNames)}}catch{return null}}function Qi(e,t){let n=[],r=[],i=new Set,s=new Set,o=new Map,a=(l,u)=>{let p=o.get(l);if(!p){o.set(l,[u]);return}p[p.length-1]!==u&&p.push(u)},c=l=>{let u=Ue(l,t);u&&n.push(u);let p=kn(l,t);p&&r.push(p),wn(l,t,s),t==="rust"&&(l.type==="attribute_item"||l.type==="inner_attribute_item")&&On(l.text,i),Fn(l,t)&&a(l.text,l.startPosition.row),Pn(l,t)&&An(l,a);for(let d of l.children)c(d)};return c(e.rootNode),{language:t,callables:n,callSites:r,clojureMembers:[],typeContainerMap:jn(e,t),identifierLineMap:o,identifiersByLine:yt(o),fileIdentifiers:new Set(o.keys()),rustAttrReferencedNames:i,crossLanguageDispatchNames:s}}function Nt(e,t){t(e);for(let n of e.namedChildren)Nt(n,t)}function Yi(e,t,n){let r=null;return Nt(e,i=>{!/(?:function|method|lambda)/u.test(i.type)&&i.type!=="arrow_function"||i.startPosition.row>t||i.endPosition.row<n||(!r||i.endIndex-i.startIndex<r.endIndex-r.startIndex)&&(r=i)}),r}function Bn(e,t,n){if(e.startPosition.row>t||e.endPosition.row<n)return null;for(let r of e.namedChildren){let i=Bn(r,t,n);if(i)return i}return e}function Gi(e){let t=e;for(;["as_expression","satisfies_expression","type_assertion","parenthesized_expression"].includes(t.type)&&t.namedChildren.length>0;)t=t.namedChildren[0];return t}function _t(e){if(e.type==="identifier")return e.text;let t=e.childForFieldName("name")??e.childForFieldName("pattern");return t?_t(t):e.namedChildren.find(n=>n.type==="identifier")?.text??null}function Zi(e){return(e.childForFieldName("parameters")??e.namedChildren.find(n=>/parameters/u.test(n.type)))?.namedChildren.map(_t)??[]}var Vn=new Set(["rust","typescript","tsx","javascript","python","clojure"]),es=new Set(["rust","typescript","tsx","javascript","python"]);function Ct(e,t){let n=ye(e,t);return!n||!Vn.has(n.language)?null:n.callables.map(r=>({name:r.name,startLine:r.startLine,endLine:r.endLine}))}function ts(e,t){if(!es.has(t))return null;let n=[];for(let r of e.descendantsOfType([...Dn(t)])){let i=Ue(r,t);i&&n.push({name:i.name,startLine:i.startLine,endLine:i.endLine})}return n}function ns(e,t){let n=ye(e,t);return!n||!Vn.has(n.language)?null:n.callSites}function Un(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}import{createRequire as fs}from"module";import{existsSync as ae}from"fs";import{basename as Hn,dirname as L,extname as V,join as k,relative as se,resolve as S,sep as ms}from"path";import{existsSync as Tt,readdirSync as rs,statSync as is}from"fs";import{join as he,relative as ss}from"path";function Wn(e){let t=os(e)??us(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let i of t)for(let s of ps(e,i)){if(r.has(s))continue;r.add(s);let o=ds(e,s);o&&n.push(o)}return n}function os(e){let t=he(e,"pnpm-workspace.yaml");if(!Tt(t))return null;try{return as(Ae(t,"pnpm workspace manifest"))}catch{return null}}function as(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let i=cs(r);if(!n){/^packages\s*:\s*$/.test(i.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(i);if(s){let o=ls(s[1].trim());o&&t.push(o);continue}if(i.trim()!=="")break}return t}function cs(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function ls(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function us(e){let t=he(e,"package.json");if(!Tt(t))return null;try{let n=JSON.parse(Ae(t,"workspace package manifest"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function ps(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let o=he(e,t);return It(o)?[o]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),i=t.slice(n+1).replace(/^\//,""),s=he(e,r||".");return It(s)?rs(s).map(o=>he(s,o,i)).filter(It):[]}function It(e){try{return is(e).isDirectory()}catch{return!1}}function ds(e,t){let n=he(t,"package.json");if(!Tt(n))return null;try{let r=JSON.parse(Ae(n,"workspace package manifest"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:ss(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}var gs=fe("indexed-paths",{clearGroups:[]}),ys=fe("indexed-path-digest",{clearGroups:[]}),hs=h("tsconfig-alias-config",{clearGroups:["whole-project"]}),Ss=h("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),xs=fs(import.meta.url),ke;function bs(){if(ke!==void 0)return ke;try{ke=xs("typescript")}catch{ke=null}return ke}var Es=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],Ns=fe("workspace-packages",{clearGroups:["whole-project"]}),oe=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],Xe=[".py",".pyi"],v=[".java",".scala",".kt",".kts"],Ke=[".rs"],ze=[".rb"],qe=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Q=[".cs",".vb"],Je=[".dart"],ce=[".php"],Se=[".clj",".cljs",".cljc"],_s=new Set(oe),Lt=new Set(Xe),Xn=new Set(v),vt=new Set(Ke),Dt=new Set(ze),Kn=new Set(qe),zn=new Set(Q),Rt=new Set(Je),qn=new Set(ce),Jn=new Set(Se),Cs=[{extensions:oe,lookup:_s},{extensions:Xe,lookup:Lt},{extensions:v,lookup:Xn},{extensions:Ke,lookup:vt},{extensions:ze,lookup:Dt},{extensions:qe,lookup:Kn},{extensions:Q,lookup:zn},{extensions:Je,lookup:Rt},{extensions:ce,lookup:qn},{extensions:Se,lookup:Jn}];function U(e,t){return t.has(V(e).toLowerCase())}function Is(e){return U(e,Lt)}function Ts(e){return U(e,Xn)}function Ls(e){return U(e,vt)}function vs(e){return U(e,Dt)}function Ds(e){return U(e,Kn)}function Rs(e){return U(e,zn)}function Qn(e){return V(e).toLowerCase()===".vb"}function ks(e){return U(e,Rt)}function Fs(e){return U(e,qn)}function Ps(e){return U(e,Jn)}function kt(e){let t=V(e).toLowerCase();for(let n of Cs)if(n.lookup.has(t))return n.extensions;return oe}function As(e){return Ts(e)||Rs(e)||Fs(e)}function Y(e,t,n){return Is(t)?xe(e,t,n):Ls(t)?W(e,t,n):vs(t)?Qe(e,t,n):Ds(t)?Ye(e,t,n):As(t)?g(e,n.replace(/\\/g,"."),kt(t)):ks(t)?Ge(e,t,n):Ps(t)?Ft(e,n):ws(e,t,n)}function ws(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return Os(e,t,n)??Ms(e,n);let r=L(k(e.config.projectRoot,t)),i=S(r,n),s=H(e);for(let o of At(i)){let a=N(se(e.config.projectRoot,o));if(s.has(a)||ae(o))return a}return N(se(e.config.projectRoot,i))}function Os(e,t,n){let r=Hs(e,t);if(!r)return null;let i=H(e);for(let s of js(r,n)){let o=S(r.baseUrl,s);for(let a of At(o)){let c=N(se(e.config.projectRoot,a));if(i.has(c)||ae(a))return c}}return null}function js(e,t){let n=[];for(let[r,i]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...i);continue}let o=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(o)||!t.endsWith(a)||t.length<o.length+a.length)continue;let c=t.slice(o.length,t.length-a.length);for(let l of i)n.push(l.includes("*")?l.replace("*",c):l)}return n}function Ms(e,t){let n=Bs($s(e),t);if(!n)return null;let r=H(e);for(let i of Vs(n)){let s=S(e.config.projectRoot,n.pkg.relativeDir,i);for(let o of At(s)){let a=N(se(e.config.projectRoot,o));if(r.has(a)||ae(o))return a}}return null}function $s(e){return Ns.get(e,()=>Wn(e.config.projectRoot))}function Bs(e,t){let n=null;for(let r of e){let i=null;t===r.name?i="":t.startsWith(`${r.name}/`)&&(i=t.slice(r.name.length+1)),i!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:i})}return n}function Vs(e){let t=[],n=Us(e.pkg.exports,e.subpath);if(n){let r=Ws(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function Us(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return Yn(e[n])}function Yn(e){if(typeof e=="string")return e;if(!e||typeof e!="object")return null;let t=e;for(let n of["types","import","default","require","node"]){let r=Yn(t[n]);if(r)return r}return null}function Ws(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function Hs(e,t){let n=N(L(t));return Ss.get(e,n,()=>Xs(e,n))}function Xs(e,t){let n=bs();if(!n)return null;let r=S(e.config.projectRoot),i=S(r,t);for(;i===r||i.startsWith(r+ms);){for(let o of Es){let a=k(i,o);if(!ae(a))continue;let c=hs.get(e,a,()=>Ks(n,a));if(c)return c}let s=L(i);if(s===i)break;i=s}return null}function Ks(e,t){try{let n=e.readConfigFile(t,e.sys.readFile);if(n.error||!n.config)return null;let r=e.parseJsonConfigFileContent(n.config,e.sys,L(t)),i=r.options.paths;return!i||Object.keys(i).length===0?null:{baseUrl:r.options.baseUrl?S(L(t),r.options.baseUrl):L(t),paths:i}}catch{return null}}function xe(e,t,n){let r=H(e),i;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let o=s[1].length,a=s[2].replace(/^\./,""),c=L(k(e.config.projectRoot,t));for(let l=1;l<o;l++)c=L(c);i=a?S(c,a.replace(/\./g,"/")):c}else i=S(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of zs(i)){let o=N(se(e.config.projectRoot,s));if(r.has(o)||ae(s))return o}return null}function W(e,t,n){if(!n)return null;let r=n.replace(/\s+as\s+.+$/,"").trim();if(!r.startsWith("crate::")&&!r.startsWith("self::")&&!r.startsWith("super::"))return null;let i=L(k(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=S(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=S(i,r.slice(6).replace(/::/g,"/")):s=S(L(i),r.slice(7).replace(/::/g,"/")),Pt(e,qs(s))}function Qe(e,t,n){let r=L(k(e.config.projectRoot,t)),i=S(r,n);return Pt(e,Js(i))}function Ye(e,t,n){let r=L(k(e.config.projectRoot,t)),i=[S(r,n),S(e.config.projectRoot,n),S(e.config.projectRoot,"include",n),S(e.config.projectRoot,"src",n)];return Pt(e,i)}function g(e,t,n){let r=H(e),i=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=i.replace(/\./g,"/"),o=i.split(".").pop()??i;for(let c of n){let l=`${s}${c}`,u=[...r].find(p=>p.endsWith(l));if(u)return u}for(let c of n){let l=[...r].find(u=>Hn(u)===`${o}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(V(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${o}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function Ge(e,t,n){let r=H(e);if(n.startsWith("package:")){let o=n.slice(8),a=o.indexOf("/");if(a<0)return null;let c=o.slice(a+1),l=N(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let i=L(k(e.config.projectRoot,t)),s=S(i,n);for(let o of Qs(s)){let a=N(se(e.config.projectRoot,o));if(r.has(a)||ae(o))return a}return null}function Ft(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=H(e);for(let i of Se){let s=`${n}${i}`,o=[...r].find(a=>a.endsWith(s));if(o)return o}for(let i of Se){let s=[...r].find(o=>Hn(o)===`${n.split("/").pop()}${i}`);if(s)return s}return null}function zs(e){let t=V(e);return Lt.has(t)?[e]:[`${e}.py`,`${e}.pyi`,k(e,"__init__.py"),k(e,"__init__.pyi")]}function Pt(e,t){let n=H(e);for(let r of t){let i=N(se(e.config.projectRoot,r));if(n.has(i)||ae(r))return i}return null}function qs(e){let t=V(e);return vt.has(t)?[e]:[`${e}.rs`,k(e,"mod.rs")]}function Js(e){let t=V(e);return Dt.has(t)?[e]:[`${e}.rb`,k(e,"index.rb")]}function Qs(e){let t=V(e);return Rt.has(t)?[e]:[`${e}.dart`,e]}function At(e){let t=V(e),n=new Set;if(t){n.add(e);for(let r of oe)n.add(e.slice(0,-t.length)+r)}else for(let r of oe)n.add(`${e}${r}`),n.add(k(e,`index${r}`));return[...n]}function H(e){return gs.get(e,()=>new Set(_e(e,{includeIgnored:!1}).map(N)))}function wt(e){return ys.get(e,()=>je([...H(e)].sort().join(`
|
|
90
|
-
`)))}function be(e){return typeof e=="object"&&e!==null}function Al(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")?e:null}function Ys(e,t,n={}){let r=ye(e,t);if(!r)return[];let i=[];if(n.includeCrossLanguageDispatchNames)for(let s of r.crossLanguageDispatchNames)i.push({name:s,kind:"cross-language-dispatch",occurrences:1});if(n.includeRustAttributeNames&&r.language==="rust")for(let s of r.rustAttrReferencedNames)i.push({name:s,kind:"rust-attribute",occurrences:1});return i}import{basename as Gn}from"path";function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Gs(e){return e.replace(/'''[\s\S]*?'''/g,G).replace(/"""[\s\S]*?"""/g,G).replace(/#.*$/gm,G).replace(/\/\/.*$/gm,G).replace(/\/\*[\s\S]*?\*\//g,G).replace(/`(?:\\[\s\S]|[^`])*`/g,G).replace(/'(?:\\.|[^'\\\r\n])*'/g,G).replace(/"(?:\\.|[^"\\\r\n])*"/g,G)}function G(e){return e.replace(/[^\r\n]/g," ")}var tu=me("stripped-lines",{clearGroups:["whole-project","source-file"]});nn({name:"stripped-source-singleton",groups:["whole-project","source-file"],clearAll:()=>{Ze=null,Fe=""},clearFile:()=>{Ze=null,Fe=""}});var Ze=null,Fe="";function Zs(e){return Ze===e||(Ze=e,Fe=Gs(e)),Fe}function Z(e,t,n){let r=Zs(e);return`${r.slice(0,t)}${" ".repeat(n-t)}${r.slice(n)}`}function C(e,t){return new RegExp(`\\b${O(t)}\\b`,"m").test(e)}function Ee(e,t){let n=new Set,r=new RegExp(`\\b${O(t)}\\s*\\.\\s*([A-Za-z_$][\\w$]*)`,"g");for(let i of e.matchAll(r)){let s=i[1];s&&n.add(s)}return[...n]}function Ot(e){let t=0;for(let n of e)n==="("&&(t+=1),n===")"&&(t-=1);return t}var eo=new Set(["identifier","type_identifier","property_identifier","shorthand_property_identifier","field_identifier"]);function I(e){let t=[],n=0,r=0;for(let i=0;i<e.length;i++){let s=e[i];(s==="{"||s==="["||s==="(")&&n++,(s==="}"||s==="]"||s===")")&&n--,s===","&&n===0&&(t.push(e.slice(r,i)),r=i+1)}return t.push(e.slice(r)),t}function D(e,t){for(let n of e.namedChildren)if(n.type===t)return n;return null}function y(e,t){let n=new Set,r=(i,s)=>{let o=s||t.has(i.type);!o&&eo.has(i.type)&&n.add(i.text);for(let a of i.children)r(a,o)};return r(e.rootNode,!1),n}function w(e,t,n,r,i,s,o){return{importedName:i,localName:s,sourcePath:o??g(e,r,kt(t)),kind:"named",used:C(n,s),usedMembers:[]}}function m(e,t,n,r,i="named",s={}){return{importedName:e,localName:t,sourcePath:n,kind:i,used:r.has(t),usedMembers:[],isTypeOnly:s.isTypeOnly}}function X(e,t,n,r,i="named",s=[],o={}){return{importedName:e,localName:t,sourcePath:n,kind:i,used:r,usedMembers:s,isTypeOnly:o.isTypeOnly}}function le(e,t){return{importedName:e,localName:null,sourcePath:t,kind:"side-effect",used:!0,usedMembers:[]}}function ue(e,t,n={}){return{importedName:e,localName:n.localName??null,sourcePath:t,kind:"namespace",used:n.used??!0,usedMembers:n.usedMembers??[],isTypeOnly:n.isTypeOnly}}function F(e,t,n){let r=[];for(let i of e.matchAll(t)){let s=i[0];if(!s||typeof i.index!="number")continue;let o=Z(e,i.index,i.index+s.length);for(let a of n(i,o))r.push(a)}return r}function P(e,t,n,r,i){let s=Le(e,t,i)?.tree??null;if(s){let o=n(s);if(o)return o}return r()}function et(e,t,n,r,i){let s=Le(e,t,i)?.tree??null,o=z(t),a=o?n[o]:void 0;return s&&a?a(s):r()}function Zn(e,t,n){return P(e,t,r=>no(e,t,r),()=>to(e,t,n),n)}function to(e,t,n){return F(n,/^[ \t]*#include\s+[<"]([^">]+)[">]\s*$/gm,(r,i)=>{let s=r[1]?.trim();if(!s)return[];let o=Gn(s).replace(/\.[^.]+$/,"");return[X(s,o,Ye(e,t,s),C(i,o))]})}function no(e,t,n){let r=y(n,new Set(["preproc_include"])),i=[];for(let s of n.rootNode.descendantsOfType("preproc_include")){let o=null;for(let c of s.namedChildren){if(c.type==="system_lib_string"){o=c.text.replace(/^<|>$/g,"");break}if(c.type==="string_literal"){o=c.namedChildren.find(u=>u.type==="string_content")?.text??c.text.replace(/^"|"$/g,"");break}}if(!o)continue;let a=Gn(o).replace(/\.[^.]+$/,"");i.push(m(o,a,Ye(e,t,o),r))}return i}var ro=new Set([":require",":require-macros",":use"]),$t=String.raw`A-Za-z0-9_$*+!?.<>=-`;function tr(e,t,n){let r=go(n);if(!r)return[];let i=mo(n,r.start,r.end),s=[];for(let o of r.children.slice(2)){if(o.type!=="list"||o.children.length===0)continue;let a=A(o.children[0]);if(a){if(ro.has(a)){for(let c of oo(o.children.slice(1)))s.push(...so(e,c,i));continue}if(a===":import")for(let c of co(o.children.slice(1)))s.push(c)}}return s}function io(e){return e.type==="list"&&A(e.children[0])==="ns"}function so(e,t,n){let r=Ft(e,t.namespace),i=t.alias??t.namespace,s=uo(n,i),o=[{importedName:t.namespace,localName:i,sourcePath:r,kind:"namespace",used:t.refers.length>0||t.referAll||s.length>0||po(n,t.namespace),usedMembers:s}];t.referAll&&o.push({importedName:"*",localName:null,sourcePath:r,kind:"side-effect",used:!0,usedMembers:[]});for(let a of t.refers)o.push({importedName:a,localName:a,sourcePath:r,kind:"named",used:fo(n,a),usedMembers:[]});return o}function oo(e){return e.flatMap(t=>tt(t,null))}function tt(e,t){if(e.type==="atom")return e.text.startsWith(":")?[]:[{namespace:Mt(t,e.text),alias:null,refers:[],referAll:!1}];if(e.type==="vector")return e.children.length>0&&A(e.children[0])===null?e.children.flatMap(n=>tt(n,t)):ao(e,t);if(e.type==="list"&&e.children.length>0){let n=A(e.children[0]);return n?!n||n.startsWith(":")?[]:e.children.slice(1).flatMap(r=>tt(r,Mt(t,n))):e.children.flatMap(r=>tt(r,t))}return[]}function ao(e,t){let n=A(e.children[0]);if(!n||n.startsWith(":"))return[];let r={namespace:Mt(t,n),alias:null,refers:[],referAll:!1};for(let i=1;i<e.children.length;i+=1){let s=A(e.children[i]);if(!s?.startsWith(":"))continue;let o=e.children[i+1];if((s===":as"||s===":as-alias")&&o){r.alias=A(o),i+=1;continue}s===":refer"&&o&&(A(o)===":all"?r.referAll=!0:(o.type==="vector"||o.type==="list")&&r.refers.push(...o.children.map(A).filter(lo)),i+=1)}return[r]}function co(e){let t=[];for(let n of e){if(n.type==="atom"){let i=n.text.split(".").pop()??n.text;t.push(X(i,i,null,!0));continue}if(n.type!=="vector")continue;let r=A(n.children[0]);if(r)for(let i of n.children.slice(1)){let s=A(i);s&&t.push(X(`${r}.${s}`,s,null,!0))}}return t}function Mt(e,t){return e?`${e}.${t}`:t}function A(e){return e?.type==="atom"?e.text:null}function lo(e){return!!(e&&!e.startsWith(":"))}function uo(e,t){let n=new Set,r=new RegExp(`${Bt()}${O(t)}\\s*/\\s*([${$t}]+)`,"g");for(let i of e.matchAll(r)){let s=i[1];s&&n.add(s)}return[...n]}function po(e,t){return new RegExp(`${Bt()}${O(t)}\\s*/`,"m").test(e)}function fo(e,t){return new RegExp(`${Bt()}${O(t)}(?![${$t}])`,"m").test(e)}function Bt(){return`(?<![${$t}])`}function mo(e,t,n){let r="",i=0;for(;i<e.length;){if(i>=t&&i<n){r+=e[i]===`
|
|
91
|
-
`?`
|
|
92
|
-
`:" ",i+=1;continue}let s=e[i];if(s===";"){let o=He(e,i);r+=er(e.slice(i,o)),i=o;continue}if(s==='"'){let o=Re(e,i,0).index;r+=er(e.slice(i,o)),i=o;continue}r+=s,i+=1}return r}function go(e){let t=0;for(;t<e.length&&(t=Vt(e,t),!(t>=e.length));){let n=nt(e,t);if(!n){t+=1;continue}if(io(n.form))return n.form;t=n.index}return null}function nt(e,t){let n=Vt(e,t);if(e.startsWith("#?@",n)||e.startsWith("#?",n))return yo(e,n);if(e.startsWith("#_",n)){let i=nt(e,n+2);return i?{form:{type:"atom",text:"",start:n,end:i.index},index:i.index}:null}for(;St(e[n]);)n+=1;let r=e[n];return r?r==="("?jt(e,n,"list",")"):r==="["?jt(e,n,"vector","]"):r==="{"?jt(e,n,"map","}"):r==='"'?{form:{type:"atom",text:"",start:n,end:Re(e,n,0).index},index:Re(e,n,0).index}:So(e,n):null}function yo(e,t){let n=e.startsWith("#?@",t)?3:2,r=nt(e,t+n);return r?{form:{type:"list",children:r.form.type==="list"||r.form.type==="vector"||r.form.type==="map"?ho(r.form.children):[],start:t,end:r.index},index:r.index}:null}function ho(e){let t=[];for(let n=0;n<e.length;n+=2){let r=A(e[n]),i=e[n+1];r?.startsWith(":")&&i&&t.push(i)}return t}function jt(e,t,n,r){let i=[],s=t+1;for(;s<e.length;){if(s=Vt(e,s),e[s]===r)return{form:{type:n,children:i,start:t,end:s+1},index:s+1};let o=nt(e,s);if(!o){s+=1;continue}o.form.type==="atom"&&o.form.text===""||i.push(o.form),s=o.index}return{form:{type:n,children:i,start:t,end:e.length},index:e.length}}function So(e,t){let n=t;for(;n<e.length&&!xt(e[n]);)n+=1;return{form:{type:"atom",text:e.slice(t,n),start:t,end:n},index:n}}function Vt(e,t){let n=t;for(;n<e.length;){let r=e[n];if(/\s|,/.test(r)){n+=1;continue}if(r===";"){n=He(e,n);continue}break}return n}function er(e){return e.replace(/[^\r\n]/g," ")}function nr(e,t,n){let r=[];for(let i of n.matchAll(/^[ \t]*import\s+['"]([^'"]+)['"](?:\s+as\s+([A-Za-z_]\w*))?[\s\S]*?;$/gm)){let s=i[1]?.trim(),o=i[2]?.trim()??null,a=i[0];if(!s||!a||typeof i.index!="number")continue;let c=Z(n,i.index,i.index+a.length);r.push({importedName:s,localName:o,sourcePath:Ge(e,t,s),kind:o?"namespace":"side-effect",used:o?C(c,o):!0,usedMembers:o?Ee(c,o):[]})}return r}function rr(e,t,n){let r=[];for(let i of n.matchAll(/^[ \t]*export\s+['"]([^'"]+)['"][\s\S]*?;$/gm)){let s=i[1]?.trim();s&&r.push({specifier:s,sourcePath:Ge(e,t,s)})}return r}function ir(e,t,n){return et(e,t,{csharp:r=>bo(e,t,r),vb:r=>xo(e,t,r)},()=>{let r=Qn(t)?/^[ \t]*Imports\s+(.+?)\s*$/gm:/^[ \t]*using\s+(.+?)\s*;$/gm;return F(n,r,(i,s)=>{let o=i[1]?.trim();if(!o)return[];let[a,c]=o.split(/\s*=\s*/),l=!!c,u=(l?c:a)?.trim()??o,p=u.split(".").pop()??u,d=l?a?.trim()??p:p;return[w(e,t,s,u,p,d,g(e,u,Q))]})},n)}function xo(e,t,n){let r=y(n,new Set(["imports_statement"])),i=[];for(let s of n.rootNode.descendantsOfType("imports_statement")){let o=s.namedChildren.filter(d=>d.type==="namespace_name");if(o.length===0)continue;let a=o[o.length-1],c=o.length>1?o[0]:null,l=a.text,u=l.split(".").pop()??l,p=c?.text??u;i.push(m(u,p,g(e,l,Q),r,c?"namespace":"named"))}return i}function bo(e,t,n){let r=y(n,new Set(["using_directive"])),i=[];for(let s of n.rootNode.descendantsOfType("using_directive")){let o=s.namedChildren;if(o.length===0)continue;let a=null,c;o.length>=2&&o[0].type==="identifier"&&(o[1].type==="qualified_name"||o[1].type==="identifier")?(a=o[0],c=o[1]):c=o[o.length-1];let l=c.text,u=l.split(".").pop()??l,p=a?.text??u;i.push(m(u,p,g(e,l,Q),r,a?"namespace":"named"))}return i}var Eo=h("vue-non-script-identifiers",{clearGroups:["whole-project","source-file"]});function sr(e,t){return Eo.get(e,t,()=>{let n=new Set,r=b(e,t);if(!r)return n;let s=r.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g,o=>o.replace(/[^\r\n]/g," ")).replace(/<!--[\s\S]*?-->/g,o=>o.replace(/[^\r\n]/g," ")).replace(/\/\*[\s\S]*?\*\//g,o=>o.replace(/[^\r\n]/g," "));for(let o of s.matchAll(/[A-Za-z_$][\w$]*/g))n.add(o[0]);return n})}function Ut(e,t,n){return P(e,t,r=>_o(e,t,r),()=>No(e,t,n),n)}function No(e,t,n){return Ao(n).flatMap(r=>wo(e,t,r.clause,r.specifier,r.start,r.end,n))}function _o(e,t,n){let r=Co(e,t,n),i=[];for(let s of n.rootNode.descendantsOfType("import_statement"))i.push(...Io(e,t,n,s,r));return i}function Co(e,t,n){let r=y(n,new Set(["import_statement"]));if(q(t))for(let i of sr(e,t))r.add(i);return r}function Io(e,t,n,r,i){let s=Ro(r);if(!s)return[];let o=Y(e,t,s),a=D(r,"import_clause");return a?To(n,a,o,i,ko(r.text)):[le("*",o)]}function To(e,t,n,r,i){let s=[];for(let o of t.namedChildren)if(o.type==="identifier")s.push(Lo(o.text,n,r,i));else if(o.type==="namespace_import"){let a=vo(e,o,n,r,i);a&&s.push(a)}else o.type==="named_imports"&&s.push(...Do(o,n,r,i));return s}function Lo(e,t,n,r){return m("default",e,t,n,"default",{isTypeOnly:r})}function vo(e,t,n,r,i){let o=D(t,"identifier")?.text??"";if(!o)return null;let a=Po(e,o);return ue("*",n,{localName:o,usedMembers:a,isTypeOnly:i,used:a.length>0||r.has(o)})}function Do(e,t,n,r){let i=[];for(let s of e.namedChildren){if(s.type!=="import_specifier")continue;let o=s.namedChild(0),a=s.namedChild(1);if(!o)continue;let c=o.text,l=a?.text??c;i.push(m(c,l,t,n,"named",{isTypeOnly:r||Fo(s.text)}))}return i}function Ro(e){let t=D(e,"string");if(!t)return null;let n=D(t,"string_fragment");return n?n.text:null}function ko(e){return/^\s*import\s+type\b/.test(e)}function Fo(e){return/^\s*type\b/.test(e.trim())}function Po(e,t){let n=new Set;for(let r of e.rootNode.descendantsOfType("member_expression")){let i=r.namedChild(0),s=r.namedChild(1);!i||!s||i.type!=="identifier"||i.text!==t||(s.type==="property_identifier"||s.type==="identifier")&&n.add(s.text)}return[...n]}function Ao(e){let t=[],n=/^[ \t]*import\s+([\s\S]*?)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of e.matchAll(n)){let s=i[0],o=i[1],a=i[2];!s||!a||typeof i.index!="number"||t.push({clause:o,specifier:a,start:i.index,end:i.index+s.length})}let r=/^[ \t]*import\s+['"]([^'"]+)['"]\s*;?/gm;for(let i of e.matchAll(r)){let s=i[0],o=i[1];!s||!o||typeof i.index!="number"||t.push({clause:null,specifier:o,start:i.index,end:i.index+s.length})}return t.sort((i,s)=>i.start-s.start)}function wo(e,t,n,r,i,s,o){let a=Y(e,t,r),c=Z(o,i,s);return n?Oo(n).map(u=>({...u,sourcePath:a})).map(u=>{if(u.kind==="namespace"){let p=Ee(c,u.localName);return ue(u.importedName,u.sourcePath,{localName:u.localName,usedMembers:p,used:p.length>0||C(c,u.localName),isTypeOnly:u.isTypeOnly})}return u.kind==="side-effect"?le(u.importedName,u.sourcePath):X(u.importedName,u.localName??"",u.sourcePath,u.localName?C(c,u.localName):!1,u.kind,[],{isTypeOnly:u.isTypeOnly})}):[le("*",a)]}function Oo(e){let t=e.trim(),n=/^type\b/.test(t),r=t.replace(/^type\s+/,""),[i,s]=jo(r),o=[];return i&&o.push(...or(i,n)),s&&o.push(...or(s,n)),o}function or(e,t){let n=e.trim();if(!n)return[];if(n.startsWith("{")){let r=n.slice(1,-1).trim();return r?I(r).map(i=>{let s=i.trim(),o=t||/^type\b/.test(s),a=s.replace(/^type\s+/,""),[c,l]=a.split(/\s+as\s+/);return{importedName:c.trim(),localName:(l??c).trim(),kind:"named",isTypeOnly:o}}):[]}return n.startsWith("* as ")?[{importedName:"*",localName:n.slice(5).trim(),kind:"namespace",isTypeOnly:t}]:[{importedName:"default",localName:n,kind:"default",isTypeOnly:t}]}function jo(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r==="{"&&t++,r==="}"&&t--,r===","&&t===0)return[e.slice(0,n).trim(),e.slice(n+1).trim()]}return[e.trim(),null]}function Wt(e,t,n){let r=B(e,t);return r?Wo(e,t,r):Mo(e,t,n)}function Mo(e,t,n){return[...$o(e,t,n),...Bo(e,t,n),...Vo(e,t,n)]}function $o(e,t,n){let r=[],i=/^[ \t]*export\s+(?:type\s+)?\{([\s\S]*?)\}\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[1]??"",a=s[2]??"",c=I(o).map(p=>Uo(p.trim())).filter(p=>!!p),l=Ne(n,s.index),u=Ne(n,s.index+s[0].length-1);r.push({kind:"named",sourcePath:Y(e,t,a),names:c,startLine:l,endLine:u})}return r}function Bo(e,t,n){let r=[],i=/^[ \t]*export\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[2]??"",a=Ne(n,s.index),c=Ne(n,s.index+s[0].length-1);r.push({kind:"star-as",sourcePath:Y(e,t,o),names:s[1]?[s[1]]:[],startLine:a,endLine:c})}return r}function Vo(e,t,n){let r=[],i=/^[ \t]*export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?/gm;for(let s of n.matchAll(i)){if(typeof s.index!="number")continue;let o=s[1]??"",a=Ne(n,s.index),c=Ne(n,s.index+s[0].length-1);r.push({kind:"star",sourcePath:Y(e,t,o),names:[],startLine:a,endLine:c})}return r}function Uo(e){if(!e)return null;let t=e.replace(/^type\s+/,"").trim();if(!t)return null;let n=t.match(/^(\w+)\s+as\s+(\w+)$/);if(n)return n[2]??null;let r=t.match(/^(\w+)$/);return r?r[1]??null:null}function Ne(e,t){let n=0;for(let r=0;r<t&&r<e.length;r++)e.charCodeAt(r)===10&&n++;return n}function Wo(e,t,n){let r=[];for(let i of n.rootNode.descendantsOfType("export_statement")){let s=Ho(e,t,i);if(s===void 0)continue;let o=i.startPosition.row,a=i.endPosition.row,c=Xo(i,s,o,a);r.push(c)}return r}function Ho(e,t,n){let r=D(n,"string");if(!r)return;let i=D(r,"string_fragment");if(i)return Y(e,t,i.text)}function Xo(e,t,n,r){let i=D(e,"export_clause");if(i){let o=[];for(let a of i.namedChildren){if(a.type!=="export_specifier")continue;let c=a.namedChild(0),l=a.namedChild(1);c&&o.push((l??c).text)}return{kind:"named",sourcePath:t,names:o,startLine:n,endLine:r}}let s=D(e,"namespace_export");if(s){let o=s.namedChildren.find(a=>a.type==="identifier"||a.type==="type_identifier")?.text;return{kind:"star-as",sourcePath:t,names:o?[o]:[],startLine:n,endLine:r}}return{kind:"star",sourcePath:t,names:[],startLine:n,endLine:r}}function ar(e,t,n){return et(e,t,{java:r=>Ko(e,t,r),kotlin:r=>zo(e,t,r),scala:r=>qo(e,t,r)},()=>F(n,/^[ \t]*import\s+(?:static\s+)?(.+?)\s*;?$/gm,(r,i)=>{let s=r[1]?.trim();return s?Jo(e,t,s,i):[]}),n)}function Ko(e,t,n){let r=y(n,new Set(["import_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("import_declaration")){let o=s.children.some(p=>p.type==="asterisk"),c=s.namedChildren.find(p=>p.type==="scoped_identifier")??s.namedChildren.find(p=>p.type==="identifier");if(!c)continue;let l=c.text;if(o){i.push(ue("*",g(e,l,v)));continue}let u=l.split(".").pop()??l;i.push(m(u,u,g(e,l,v),r))}return i}function zo(e,t,n){let r=y(n,new Set(["import_header","import_list"])),i=[];for(let s of n.rootNode.descendantsOfType("import_header")){let o=s.namedChildren.find(f=>f.type==="identifier");if(!o)continue;let a=s.namedChildren.some(f=>f.type==="wildcard_import"),c=s.namedChildren.find(f=>f.type==="import_alias");if(a){i.push(ue("*",g(e,o.text,v)));continue}let l=o.text,u=l.split(".").pop()??l,d=c?.namedChild(0)?.text??u;i.push(m(u,d,g(e,l,v),r))}return i}function qo(e,t,n){let r=y(n,new Set(["import_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("import_declaration")){let o=s.namedChildren.find(p=>p.type==="namespace_selectors"||p.type==="namespace_wildcard"),a=s.namedChildren.filter(p=>p!==o&&(p.type==="identifier"||p.type==="stable_identifier")),c=a.map(p=>p.text).join(".");if(!c)continue;if(o?.type==="namespace_wildcard"){i.push(ue("*",g(e,c,v)));continue}if(o?.type==="namespace_selectors"){for(let p of o.namedChildren)if(p.type==="arrow_renamed_identifier"){let[d,f]=p.namedChildren;if(!d)continue;let x=d.text,pe=f?.text??x;if(x==="_")continue;i.push(m(x,pe,g(e,`${c}.${x}`,v),r))}else if(p.type==="identifier"){let d=p.text;i.push(m(d,d,g(e,`${c}.${d}`,v),r))}continue}let l=a[a.length-1]?.text??c,u=a.slice(0,-1).map(p=>p.text).join(".")||c;i.push(m(l,l,g(e,u&&a.length>1?`${u}.${l}`:c,v),r))}return i}function Jo(e,t,n,r){if(n.includes("{")&&n.includes("}")){let i=n.slice(0,n.indexOf("{")).replace(/\.$/,"").trim(),s=n.slice(n.indexOf("{")+1,n.lastIndexOf("}")).trim();return I(s).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.includes("=>")?a.split(/\s*=>\s*/):a.split(/\s+as\s+/),u=c?.trim();if(!u||u==="_")return[];let p=(l??u.split(".").pop()??u).trim(),d=u==="_"?i:`${i}.${u}`.replace(/\.\./g,".");return[w(e,t,r,d,u,p)]})}return[w(e,t,r,n,n.split(".").pop()??n,n.split(".").pop()??n)]}function lr(e,t,n){return P(e,t,r=>Qo(e,t,r),()=>F(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,i)=>{let s=r[1]?.trim();return s?I(s).flatMap(o=>{let a=o.trim();if(!a)return[];let[c,l]=a.split(/\s+as\s+/i),u=c?.trim()??a,p=u.split("\\").pop()??u,d=(l??p).trim();return[w(e,t,i,u,p,d,g(e,u.replace(/\\/g,"."),ce))]}):[]}),n)}function Qo(e,t,n){let r=y(n,new Set(["namespace_use_declaration"])),i=[],s=(o,a,c)=>{i.push(m(a,c,g(e,o.replace(/\\/g,"."),ce),r))};for(let o of n.rootNode.descendantsOfType("namespace_use_declaration")){let a=o.namedChildren.find(c=>c.type==="namespace_use_group");if(a){let c=o.namedChildren.find(l=>l.type==="namespace_name")?.text??"";for(let l of a.namedChildren){if(l.type!=="namespace_use_clause")continue;let{importedName:u,localName:p,qualified:d}=cr(l,c);u&&s(d,u,p)}continue}for(let c of o.namedChildren){if(c.type!=="namespace_use_clause")continue;let{importedName:l,localName:u,qualified:p}=cr(c,"");l&&s(p,l,u)}}return i}function cr(e,t){let n=e.namedChildren.find(l=>l.type==="qualified_name"),r=e.namedChildren.filter(l=>l.type==="name"),i="";n?i=n.text:r.length>=1&&(i=r[0].text);let s=n&&r.length>0?r[r.length-1]:null,o=i.split("\\").pop()??i,a=s?.text??o,c=t?`${t}\\${i}`:i;return{importedName:o,localName:a,qualified:c}}function pr(e,t,n){return P(e,t,r=>Yo(e,t,r),()=>Zo(n).flatMap(r=>ta(e,t,r,n)),n)}function Yo(e,t,n){let r=y(n,new Set(["import_statement","import_from_statement"])),i=[];for(let s of n.rootNode.descendantsOfType("import_statement"))for(let o of s.namedChildren){let a=ur(o);if(!a)continue;let c=xe(e,t,a.qualifiedName);i.push({importedName:a.qualifiedName,localName:a.localName,sourcePath:c,kind:"namespace",used:r.has(a.localName),usedMembers:[]})}for(let s of n.rootNode.descendantsOfType("import_from_statement")){let o=s.namedChild(0);if(!o)continue;let a=Go(o);if(a===null)continue;let c=xe(e,t,a);for(let l=1;l<s.namedChildCount;l+=1){let u=s.namedChild(l);if(u.type==="wildcard_import"){i.push({importedName:"*",localName:null,sourcePath:c,kind:"side-effect",used:!0,usedMembers:[]});continue}let p=ur(u);p&&i.push({importedName:p.qualifiedName,localName:p.localName,sourcePath:c,kind:"named",used:r.has(p.localName),usedMembers:[]})}}return i}function ur(e){if(e.type==="aliased_import"){let t=e.namedChild(0),n=e.namedChild(1);return!t||!n?null:{qualifiedName:t.text,localName:n.text}}if(e.type==="dotted_name"){let t=e.text;return{qualifiedName:t,localName:t.split(".")[0]??t}}return e.type==="identifier"?{qualifiedName:e.text,localName:e.text}:null}function Go(e){if(e.type==="dotted_name")return e.text;if(e.type==="relative_import"){let t=D(e,"import_prefix")?.text??"",n=D(e,"dotted_name")?.text??"";return`${t}${n}`}return null}function Zo(e){let t=e.split(`
|
|
93
|
-
`),n=[],r=0;for(let i=0;i<t.length;i++){let s=t[i],o=s.trimStart(),a=r;if(r+=s.length+1,!o.startsWith("import ")&&!o.startsWith("from "))continue;let c=s,l=a+s.length,u=Ot(s);for(;i+1<t.length&&(u>0||c.trimEnd().endsWith("\\"));){i++;let d=t[i];c+=`
|
|
94
|
-
${d}`,l+=1+d.length,u+=Ot(d),r+=d.length+1}let p=ea(c);p&&n.push({...p,start:a,end:l})}return n}function ea(e){let t=e.replace(/\\\s*\n/g," ").trim();if(t.startsWith("import "))return{kind:"import",module:null,clause:t.slice(7).trim()};let n=t.match(/^from\s+([.\w]+)\s+import\s+([\s\S]+)$/);if(!n)return null;let r=n[2].trim();return r.startsWith("(")&&r.endsWith(")")&&(r=r.slice(1,-1).trim()),{kind:"from",module:n[1],clause:r}}function ta(e,t,n,r){let i=Z(r,n.start,n.end),s=n.clause.replace(/\n/g," ").trim();if(n.kind==="import")return I(s).flatMap(c=>{let l=c.trim().replace(/,$/,"");if(!l)return[];let[u,p]=l.split(/\s+as\s+/),d=u.trim(),f=(p??d.split(".")[0]??d).trim(),x=xe(e,t,d),pe=Ee(i,f);return[{importedName:d,localName:f,sourcePath:x,kind:"namespace",used:C(i,f)||pe.length>0,usedMembers:pe}]});let o=n.module?xe(e,t,n.module):null,a=[];for(let c of I(s)){let l=c.trim().replace(/,$/,"");if(!l)continue;if(l==="*"){a.push({importedName:"*",localName:null,sourcePath:o,kind:"side-effect",used:!0,usedMembers:[]});continue}let[u,p]=l.split(/\s+as\s+/),d=(p??u).trim();a.push({importedName:u.trim(),localName:d,sourcePath:o,kind:"named",used:C(i,d),usedMembers:[]})}return a}import{basename as na}from"path";function dr(e,t,n){return P(e,t,r=>ia(e,t,r),()=>ra(e,t,n),n)}function ra(e,t,n){return F(n,/^[ \t]*(require_relative|require)\s+["']([^"']+)["']\s*$/gm,(r,i)=>{let s=r[1],o=r[2];if(!s||!o)return[];let a=s==="require_relative"?Qe(e,t,o):null;if(a){let c=fr(o);return[X(c,c,a,C(i,c))]}return[le(o,a)]})}function ia(e,t,n){let r=y(n,new Set([])),i=[],s=new Set(["require","require_relative","load"]);for(let o of n.rootNode.descendantsOfType("call")){let a=o.namedChild(0);if(!a||a.type!=="identifier"||!s.has(a.text))continue;let l=o.namedChildren.find(f=>f.type==="argument_list")?.namedChild(0);if(!l||l.type!=="string")continue;let p=l.namedChildren.find(f=>f.type==="string_content")?.text;if(!p)continue;let d=a.text==="require_relative"?Qe(e,t,p):null;if(d){let f=fr(p);i.push(m(f,f,d,r))}else i.push(le(p,d))}return i}function fr(e){return Un(na(e).replace(/\.[^.]+$/,""),/_/)}function mr(e,t,n){return P(e,t,r=>sa(e,t,r),()=>F(n,/^[ \t]*use\s+(.+?)\s*;$/gm,(r,i)=>{let s=r[1]?.trim();return s?oa(e,t,s,i):[]}),n)}function sa(e,t,n){let r=y(n,new Set(["use_declaration"])),i=[];for(let s of n.rootNode.descendantsOfType("use_declaration")){let o=s.namedChild(0);if(o)for(let a of Pe(o,"")){if(!a.importedName||a.importedName==="*")continue;let c=W(e,t,a.qualifiedName)??W(e,t,a.qualifiedName.split("::").slice(0,-1).join("::"));i.push(m(a.importedName,a.localName,c,r))}}return i}function Pe(e,t){switch(e.type){case"identifier":case"super":case"crate":{let n=e.text;return[{qualifiedName:rt(t,n),importedName:n,localName:n}]}case"self":{let n=t.split("::").filter(Boolean).pop()??"self";return[{qualifiedName:t||"self",importedName:n,localName:n}]}case"scoped_identifier":{let n=e.text,r=n.split("::").pop()??n;return[{qualifiedName:rt(t,n),importedName:r,localName:r}]}case"scoped_use_list":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let i=rt(t,n.text),s=[];for(let o of r.namedChildren)s.push(...Pe(o,i));return s}case"use_list":{let n=[];for(let r of e.namedChildren)n.push(...Pe(r,t));return n}case"use_as_clause":{let n=e.namedChild(0),r=e.namedChild(1);if(!n||!r)return[];let i=Pe(n,t),s=r.text;return i.map(o=>({...o,localName:s}))}case"use_wildcard":{let n=e.namedChild(0),r=n?n.text:"";return[{qualifiedName:rt(t,`${r}::*`),importedName:"*",localName:"*"}]}default:return[]}}function rt(e,t){return e?t?`${e}::${t}`:e:t}function oa(e,t,n,r){let i=n.trim();if(i.includes("{")&&i.includes("}")){let u=i.slice(0,i.indexOf("{")).replace(/::$/,"").trim(),p=i.slice(i.indexOf("{")+1,i.lastIndexOf("}")).trim();return I(p).flatMap(d=>{let f=d.trim();if(!f)return[];if(f==="self"){let ot=u.split("::").filter(Boolean).pop();return ot?[w(e,t,r,u,ot,ot)]:[]}let[x,pe]=f.split(/\s+as\s+/),de=x?.trim();if(!de)return[];let Fr=(pe??de.split("::").pop()??de).trim(),Pr=`${u}::${de}`.replace(/::::/g,"::");return[w(e,t,r,Pr,de.split("::").pop()??de,Fr,W(e,t,u))]})}let[s,o]=i.split(/\s+as\s+/),a=s?.trim()??i,c=(o??a.split("::").pop()??a).trim(),l=W(e,t,a)??W(e,t,a.split("::").slice(0,-1).join("::"));return[w(e,t,r,a,a.split("::").pop()??a,c,l)]}function gr(e,t,n){let r=B(e,t);if(r)return aa(e,t,r);let i=[];for(let s of n.matchAll(/^[ \t]*pub\s+use\s+(.+?)\s*;$/gm)){let o=s[1]?.trim();o&&i.push(...la(e,t,o))}return i}function aa(e,t,n){let r=[];for(let i of n.rootNode.descendantsOfType("use_declaration")){if(!ca(i))continue;let s=i.namedChildren.find(o=>o.type!=="visibility_modifier");if(s)for(let o of Pe(s,""))o.importedName&&r.push(Ht(e,t,o.qualifiedName))}return r}function ca(e){for(let t of e.children)if(t.type==="visibility_modifier"&&t.text.startsWith("pub"))return!0;return!1}function la(e,t,n){let r=n.trim();if(r.includes("{")&&r.includes("}")){let i=r.slice(0,r.indexOf("{")).replace(/::$/,"").trim(),s=r.slice(r.indexOf("{")+1,r.lastIndexOf("}")).trim();return I(s).flatMap(o=>{let a=o.trim();if(!a||a==="self")return[];let[c]=a.split(/\s+as\s+/),l=`${i}::${c?.trim()??a}`.replace(/::::/g,"::");return[Ht(e,t,l)]})}return[Ht(e,t,r)]}function Ht(e,t,n){return{specifier:n,sourcePath:W(e,t,n)??W(e,t,n.split("::").slice(0,-1).join("::"))}}function ee({language:e,extensions:t,imports:n,parseImports:r}){return{language:e,extensions:t,capabilities:{imports:n},parseImports:r}}function yr(e,t){let n=t.toLowerCase();for(let r of e)for(let i of r.extensions)if(n.endsWith(i))return r;return null}var ua={language:"javascript",extensions:oe,capabilities:{imports:"ast-with-regex-fallback",reExports:"ast-with-regex-fallback"},parseImports:Ut,parseReExports:Wt},pa=ee({language:"python",extensions:Xe,imports:"ast-with-regex-fallback",parseImports:pr}),da=ee({language:"jvm",extensions:v,imports:"ast-dispatch-with-regex-fallback",parseImports:ar}),fa={language:"rust",extensions:Ke,capabilities:{imports:"ast-with-regex-fallback",exports:"ast-with-regex-fallback"},parseImports:mr,parseExports:gr},ma=ee({language:"ruby",extensions:ze,imports:"ast-with-regex-fallback",parseImports:dr}),ga=ee({language:"c/cpp",extensions:qe,imports:"ast-with-regex-fallback",parseImports:Zn}),ya=ee({language:"dotnet",extensions:Q,imports:"ast-dispatch-with-regex-fallback",parseImports:ir}),ha={language:"dart",extensions:Je,capabilities:{imports:"regex-only",exports:"regex-only"},parseImports:nr,parseExports:rr},Sa=ee({language:"php",extensions:ce,imports:"ast-with-regex-fallback",parseImports:lr}),xa=ee({language:"clojure",extensions:Se,imports:"regex-only",parseImports:tr}),ba=[ua,pa,da,fa,ma,ga,ya,ha,Sa,xa];function Xt(e){return yr(ba,e)}var Kt={clearGroups:["whole-project","source-file"]},Ea=h("source-imports",Kt),Lp=h("source-exports",Kt),Na=h("source-reexports",Kt),hr=ne({kind:"source-imports",invalidation:re("source-imports"),serialize:_a,deserialize:Ca}),Sr=ne({kind:"source-reexports",invalidation:re("source-reexports"),serialize:Ia,deserialize:Ta});function xr(e,t){let n=N(t);return Na.get(e,n,()=>{let r=Xt(n);if(!r?.parseReExports)return[];let i=b(e,n);if(!i)return[];let s=J(e,n,i),o=wt(e),a=Sr.read(e,n,s);if(a?.resolutionFingerprint===o)return a.reExports;let c=r.parseReExports(e,n,i);return Sr.write(e,n,s,{resolutionFingerprint:o,reExports:c}),c})}function zt(e,t){let n=N(t);return Ea.get(e,n,()=>{let r=Xt(n);if(!r)return[];let i=b(e,n);if(!i)return[];let s=J(e,n,i),o=wt(e),a=hr.read(e,n,s);if(a?.resolutionFingerprint===o)return a.imports;let c=r.parseImports(e,n,i);return hr.write(e,n,s,{parserVersion:2,resolutionFingerprint:o,imports:c}),c})}function vp(e,t,n){let r=zt(e,t).filter(i=>i.kind==="named"&&i.isTypeOnly!==!0&&i.localName===n&&i.sourcePath!==null);return r.length===1?r[0]:null}function _a(e){return JSON.stringify(e)}function Ca(e){try{let t=JSON.parse(e);return!be(t)||t.parserVersion!==2||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.imports)?null:{parserVersion:2,resolutionFingerprint:t.resolutionFingerprint,imports:t.imports}}catch{return null}}function Ia(e){return JSON.stringify(e)}function Ta(e){try{let t=JSON.parse(e);return!be(t)||typeof t.resolutionFingerprint!="string"||!Array.isArray(t.reExports)?null:{resolutionFingerprint:t.resolutionFingerprint,reExports:t.reExports}}catch{return null}}function Rp(e,t){return e.all(`SELECT gs.id, gs.symbol, der.document_id, der.start_line, der.start_char, der.end_line, der.end_char, d.relative_path, gs.display_name, gs.documentation
|
|
95
|
-
FROM global_symbols gs
|
|
96
|
-
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
97
|
-
JOIN documents d ON der.document_id = d.id
|
|
98
|
-
WHERE ${t.where}
|
|
99
|
-
${e.pathExclusionsFor("d")}
|
|
100
|
-
${Er(t.orderBy)}
|
|
101
|
-
${Nr(t.limit)}`,...t.params??[])}function kp(e,t){return e.all(`SELECT
|
|
102
|
-
gs.id,
|
|
103
|
-
gs.symbol,
|
|
104
|
-
c.document_id,
|
|
105
|
-
MIN(c.start_line) AS start_line,
|
|
106
|
-
0 AS start_char,
|
|
107
|
-
MAX(c.end_line) AS end_line,
|
|
108
|
-
0 AS end_char,
|
|
109
|
-
d.relative_path,
|
|
110
|
-
gs.display_name,
|
|
111
|
-
gs.documentation
|
|
112
|
-
FROM global_symbols gs
|
|
113
|
-
JOIN mentions m ON m.symbol_id = gs.id
|
|
114
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
115
|
-
JOIN documents d ON c.document_id = d.id
|
|
116
|
-
WHERE m.role = 1
|
|
117
|
-
AND ${t.where}
|
|
118
|
-
${e.pathExclusionsFor("d")}
|
|
119
|
-
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path, gs.display_name, gs.documentation
|
|
120
|
-
${Er(t.orderBy)}
|
|
121
|
-
${Nr(t.limit)}`,...t.params??[])}function Er(e){return e?`ORDER BY ${e}`:""}function Nr(e){return typeof e=="number"?`LIMIT ${e}`:""}function _r(e){return!e||!e.trim()?null:e.replace(/^```\w*\s*/,"").replace(/\s*```$/,"").replace(/^\(method\)\s*/,"").replace(/^\(property\)\s*/,"").replace(/^\(function\)\s*/,"").replace(/^\(class\)\s*/,"").replace(/^\(interface\)\s*/,"").replace(/^\(enum\)\s*/,"").replace(/^\(type alias\)\s*/,"").replace(/^\(const\)\s*/,"").replace(/^\(var\)\s*/,"").trim()||null}function Cr(e){if(!e)return null;let t=br(e);if(t)return t.replace(/\n/g," ");let n=e.indexOf("|");if(n===-1)return e.replace(/\n/g," ");let r=e.slice(n+1);return(br(r)??r).replace(/\n/g," ")}function br(e){return/^```(?:\w+)?\s*\n?([\s\S]*?)\n?```/.exec(e.trimStart())?.[1]?.trim()||null}function it(e){return{forFile(t,n){return Ir(e,t,n)},forFiles(t,n){let r=new Map;for(let i of t)r.set(i,Ir(e,i,n));return r}}}function Ir(e,t,n){let r={file:t},i=n.facts||n.identifiers;if(n.text&&(r.text=b(e,t)),n.lines&&(r.lines=pt(e,t)),n.ast&&(r.ast=B(e,t)),n.imports&&(r.imports=zt(e,t)),n.reexports&&(r.reexports=xr(e,t)),i){let s=Et(e,t),o=s.facts;n.facts&&(r.facts=o),s.unavailable&&(r.sourceFactsUnavailable=s.unavailable),n.identifiers&&o&&(r.identifiers=o.fileIdentifiers,r.identifierLineMap=o.identifierLineMap)}return r}function La(e,t={}){if(K(e.symbol)!==null)return t.includeClassMemberFallbacks===!0;let i=(e.documentation??"").replace(/^```\w*\s*/,"").replace(/\s*```$/,"").trim();return/^(?:var|let|const|function|class|interface|type|enum)\b/.test(i)}function qt(e,t,n={}){let r=new Map;for(let s of t)e.length>0&&!La(s,{includeClassMemberFallbacks:n.includeClassMemberFallbacks})||r.set(s.id,s);for(let s of e)r.set(s.id,s);let i=[...r.values()];return n.sort?i.sort((s,o)=>s.start_line-o.start_line||s.end_line-o.end_line||s.symbol.localeCompare(o.symbol)):i}var va=h("file-definitions",{clearGroups:["definition-catalog"]}),Da=fe("scoped-matched-definitions",{clearGroups:["definition-catalog"]}),Ra=h("file-function-like-definitions",{clearGroups:["definition-catalog"]}),Tr=new WeakMap;function Qt(e,t,n={},r){return n.includeClassMemberFallbacks?Jt(e,t,void 0,{includeClassMemberFallbacks:!0},r):va.get(e,t,()=>{let i=j(r,"evidence-read",()=>Rr(e,t));if(i)return i;let s=Jt(e,t,void 0,n,r);return j(r,"evidence-write",()=>{let o=Ce(e),a=it(e).forFile(t,{text:!0}).text;o&&a&&Dr.write(e,t,J(e,t,a),{projectFingerprint:o,definitions:s.map(c=>({...c}))})}),s})}function ka(e,t){return Ra.get(e,t,()=>{let n=Rr(e,t);return n?n.filter(r=>r.isFunctionLike):Jt(e,t,r=>r.isFunctionLike)})}var Dr=ne({kind:"file-definitions",invalidation:re("file-definitions"),serialize:Fa,deserialize:Pa});function Rr(e,t){let n=Ce(e);if(!n)return null;let r=it(e).forFile(t,{text:!0}).text;if(!r)return null;let i=Dr.read(e,t,J(e,t,r));return i?Aa(i,n,t):null}function Fa(e){return JSON.stringify(e)}function Pa(e){try{let t=JSON.parse(e);return!be(t)||typeof t.projectFingerprint!="string"||!Array.isArray(t.definitions)?null:{projectFingerprint:t.projectFingerprint,definitions:t.definitions}}catch{return null}}function Aa(e,t,n){if(e.projectFingerprint!==t)return null;let r=[];for(let i of e.definitions){let s=wa(i,n);if(!s)return null;r.push(s)}return r}function wa(e,t){return!be(e)||typeof e.symbolId!="number"||typeof e.symbol!="string"||typeof e.documentId!="number"||typeof e.startLine!="number"||typeof e.startChar!="number"&&e.startChar!==void 0||typeof e.endLine!="number"||typeof e.endChar!="number"&&e.endChar!==void 0||e.relativePath!==t||typeof e.leaf!="string"||typeof e.parentTypeName!="string"&&e.parentTypeName!==null||typeof e.isFunctionLike!="boolean"||typeof e.isTypeLike!="boolean"||typeof e.kind!="number"&&e.kind!==null||typeof e.documentation!="string"&&e.documentation!==null||typeof e.enclosingSymbol!="string"&&e.enclosingSymbol!==null?null:{symbolId:e.symbolId,symbol:e.symbol,documentId:e.documentId,startLine:e.startLine,startChar:e.startChar,endLine:e.endLine,endChar:e.endChar,relativePath:e.relativePath,leaf:e.leaf,parentTypeName:e.parentTypeName,isFunctionLike:e.isFunctionLike,isTypeLike:e.isTypeLike,kind:e.kind,documentation:e.documentation,enclosingSymbol:e.enclosingSymbol}}function Jt(e,t,n,r={},i){let s=j(i,"primary-rows",()=>Oa(e,t)),o=j(i,"fallback-rows",()=>ja(e,t)),a=j(i,"merge-rows",()=>qt(s,o,{sort:!0,includeClassMemberFallbacks:r.includeClassMemberFallbacks}).map(Yt));return n&&(a=a.filter(n)),j(i,"range-correction",()=>Gt(e,t,a,i,r.rangeCorrectionEvidence))}function j(e,t,n){return e?e(t,n):n()}function Oa(e,t){return e.all(`SELECT
|
|
122
|
-
gs.id,
|
|
123
|
-
gs.symbol,
|
|
124
|
-
der.document_id,
|
|
125
|
-
der.start_line,
|
|
126
|
-
der.start_char,
|
|
127
|
-
der.end_line,
|
|
128
|
-
der.end_char,
|
|
129
|
-
d.relative_path,
|
|
130
|
-
gs.display_name,
|
|
131
|
-
gs.kind,
|
|
132
|
-
gs.documentation,
|
|
133
|
-
gs.enclosing_symbol
|
|
134
|
-
FROM global_symbols gs
|
|
135
|
-
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
136
|
-
JOIN documents d ON der.document_id = d.id
|
|
137
|
-
WHERE d.relative_path = ?
|
|
138
|
-
${e.symbolNoiseFor("gs")}
|
|
139
|
-
ORDER BY der.start_line, der.end_line`,t)}function ja(e,t){return e.all(`SELECT
|
|
140
|
-
gs.id,
|
|
141
|
-
gs.symbol,
|
|
142
|
-
c.document_id,
|
|
143
|
-
MIN(c.start_line) AS start_line,
|
|
144
|
-
0 AS start_char,
|
|
145
|
-
MAX(c.end_line) AS end_line,
|
|
146
|
-
0 AS end_char,
|
|
147
|
-
d.relative_path,
|
|
148
|
-
gs.display_name,
|
|
149
|
-
gs.kind,
|
|
150
|
-
gs.documentation,
|
|
151
|
-
gs.enclosing_symbol
|
|
152
|
-
FROM global_symbols gs
|
|
153
|
-
JOIN mentions m ON m.symbol_id = gs.id
|
|
154
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
155
|
-
JOIN documents d ON c.document_id = d.id
|
|
156
|
-
WHERE d.relative_path = ?
|
|
157
|
-
AND m.role = 1
|
|
158
|
-
${e.symbolNoiseFor("gs")}
|
|
159
|
-
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
160
|
-
ORDER BY start_line, end_line`,t)}function Yt(e){return{symbolId:e.id,symbol:e.symbol,documentId:e.document_id,startLine:e.start_line,startChar:e.start_char??0,endLine:e.end_line,endChar:e.end_char??0,relativePath:e.relative_path,leaf:on(e.symbol),parentTypeName:K(e.symbol),isFunctionLike:ut(e.symbol),isTypeLike:we(e.symbol)==="type",kind:e.kind??null,documentation:e.documentation??null,enclosingSymbol:e.enclosing_symbol??null}}function Gp(e,t={}){return Ma(e,t.scope)}function Ma(e,t){return _e(e,{scope:t,includeIgnored:!1}).flatMap(n=>Qt(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function Zp(e,t){return _e(e,{scope:t,includeIgnored:!1}).flatMap(n=>ka(e,n)).filter(n=>!e.isIgnored(n.relativePath))}function ed(e,t){let n=Da.get(e,()=>new WeakMap),r=n.get(t.symbolMatches);r||(r=new Map,n.set(t.symbolMatches,r));let i=JSON.stringify({scope:t.scope??null,sqlPrefilter:t.sqlPrefilter??null}),s=r.get(i);if(s)return[...s];let o=Lr($a(e,t.scope,t.sqlPrefilter)),a=Lr(Ba(e,t.scope,t.sqlPrefilter)),c=new Set([...o.keys(),...a.keys()]),l=[];for(let u of[...c].sort()){if(e.isIgnored(u))continue;let p=qt(o.get(u)??[],a.get(u)??[],{sort:!0}).filter(d=>t.symbolMatches(d.symbol));p.length!==0&&l.push(...Gt(e,u,p.map(Yt)))}return r.set(i,l),[...l]}function $a(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",i=n?`AND ${kr("gs",n)}`:"",s=t?[`%${t}%`]:[];return e.all(`SELECT
|
|
161
|
-
gs.id,
|
|
162
|
-
gs.symbol,
|
|
163
|
-
der.document_id,
|
|
164
|
-
der.start_line,
|
|
165
|
-
der.start_char,
|
|
166
|
-
der.end_line,
|
|
167
|
-
der.end_char,
|
|
168
|
-
d.relative_path,
|
|
169
|
-
gs.display_name,
|
|
170
|
-
gs.kind,
|
|
171
|
-
gs.documentation,
|
|
172
|
-
gs.enclosing_symbol
|
|
173
|
-
FROM global_symbols gs
|
|
174
|
-
JOIN defn_enclosing_ranges der ON gs.id = der.symbol_id
|
|
175
|
-
JOIN documents d ON der.document_id = d.id
|
|
176
|
-
WHERE 1 = 1
|
|
177
|
-
${e.pathExclusionsFor("d")}
|
|
178
|
-
${r}
|
|
179
|
-
${i}
|
|
180
|
-
${e.symbolNoiseFor("gs")}
|
|
181
|
-
ORDER BY d.relative_path, der.start_line, der.end_line`,...s)}function Ba(e,t,n){let r=t?"AND d.relative_path LIKE ?":"",i=n?`AND ${kr("gs",n)}`:"",s=t?[`%${t}%`]:[];return e.all(`SELECT
|
|
182
|
-
gs.id,
|
|
183
|
-
gs.symbol,
|
|
184
|
-
c.document_id,
|
|
185
|
-
MIN(c.start_line) AS start_line,
|
|
186
|
-
0 AS start_char,
|
|
187
|
-
MAX(c.end_line) AS end_line,
|
|
188
|
-
0 AS end_char,
|
|
189
|
-
d.relative_path,
|
|
190
|
-
gs.display_name,
|
|
191
|
-
gs.kind,
|
|
192
|
-
gs.documentation,
|
|
193
|
-
gs.enclosing_symbol
|
|
194
|
-
FROM global_symbols gs
|
|
195
|
-
JOIN mentions m ON m.symbol_id = gs.id
|
|
196
|
-
JOIN chunks c ON m.chunk_id = c.id
|
|
197
|
-
JOIN documents d ON c.document_id = d.id
|
|
198
|
-
WHERE m.role = 1
|
|
199
|
-
AND NOT EXISTS (
|
|
200
|
-
SELECT 1
|
|
201
|
-
FROM defn_enclosing_ranges existing_der
|
|
202
|
-
WHERE existing_der.symbol_id = gs.id
|
|
203
|
-
)
|
|
204
|
-
${e.pathExclusionsFor("d")}
|
|
205
|
-
${r}
|
|
206
|
-
${i}
|
|
207
|
-
${e.symbolNoiseFor("gs")}
|
|
208
|
-
GROUP BY gs.id, gs.symbol, c.document_id, d.relative_path
|
|
209
|
-
ORDER BY d.relative_path, start_line, end_line`,...s)}function Va(e){return`(${e}.symbol LIKE '%().' OR ${e}.symbol LIKE '%()')`}function kr(e,t){return t==="callable"?Va(e):Ua(e)}function Ua(e){return`(${e}.symbol LIKE '%.' OR ${e}.symbol LIKE '%()')`}function Lr(e){let t=new Map;for(let n of e){let r=t.get(n.relative_path);r?r.push(n):t.set(n.relative_path,[n])}return t}function td(e,t,n={}){if(t.length===0)return[];let r=t.flatMap(i=>Qt(e,i)).filter(i=>!e.isIgnored(i.relativePath));return n.onlyDocumented&&(r=r.filter(i=>i.documentation!==null&&i.documentation!=="")),n.sort&&(r=r.sort((i,s)=>i.relativePath.localeCompare(s.relativePath)||i.startLine-s.startLine||i.endLine-s.endLine)),r.map(i=>({startLine:i.startLine,endLine:i.endLine,symbol:i.symbol,shortName:sn(i.symbol),signature:_r(Cr(i.documentation)),relativePath:i.relativePath,enclosingSymbol:i.enclosingSymbol}))}function Wa(e){let t=new Map,n=e.map((r,i)=>({definition:r,index:i,span:r.endLine-r.startLine})).sort((r,i)=>r.span-i.span||r.index-i.index);for(let{definition:r}of n)for(let i=r.startLine;i<=r.endLine;i+=1)t.has(i)||t.set(i,r);return t}function nd(e,t){let n=Tr.get(e);return n||(n=Wa(e),Tr.set(e,n)),n.get(t)??null}function rd(e,t){let n=Qt(e,t.relative_path).find(r=>r.symbolId===t.id)??(K(t.symbol)===null||!ut(t.symbol)?void 0:Gt(e,t.relative_path,[Yt(t)])[0]);return n?{symbolId:n.symbolId,symbol:n.symbol,documentId:n.documentId,startLine:n.startLine,startChar:n.startChar,endLine:n.endLine,endChar:n.endChar,relativePath:n.relativePath}:{symbolId:t.id,symbol:t.symbol,documentId:t.document_id,startLine:t.start_line,startChar:t.start_char??0,endLine:t.end_line,endChar:t.end_char??0,relativePath:t.relative_path}}function Gt(e,t,n,r,i){let s=j(r,"range-correction.source-text",()=>i?i.source:it(e).forFile(t,{text:!0}).text),o=j(r,"range-correction.callable-sites",()=>i?i.callables:Ct(e,t));return o?j(r,"range-correction.ast-correction",()=>Ja(n,o,s)):s?j(r,"range-correction.regex-fallback",()=>Ha(n,s)):n}function Ha(e,t){let n=t.split(/\r?\n/),r=Xa(e,n),i=Ka(e,r),s=za(i,n);return qa(e,s)}function Xa(e,t){let n=e.some(i=>st(i.symbol))?nc(t):null,r=new Map;for(let i of e)r.set(i.symbolId,tc(t,n,i));return r}function Ka(e,t){return e.filter(n=>st(n.symbol)).map(n=>({definition:n,startLine:t.get(n.symbolId)??n.startLine})).sort((n,r)=>n.startLine-r.startLine||n.definition.startLine-r.definition.startLine||n.definition.symbol.localeCompare(r.definition.symbol))}function za(e,t){let n=new Map;for(let r=0;r<e.length;r+=1){let i=e[r],s=e[r+1],o=s?Math.max(i.startLine,s.startLine-1):t.length-1;n.set(i.definition.symbolId,{startLine:i.startLine,endLine:rc(t,i.definition,i.startLine,o)})}return n}function qa(e,t){return e.map(n=>{let r=t.get(n.symbolId);return r?{...n,startLine:r.startLine,endLine:r.endLine}:n})}function Ja(e,t,n=null){let r=new Map;for(let i of t){let s=r.get(i.name);s?s.push(i):r.set(i.name,[i])}return e.map(i=>{if(!ec(i)||!i.leaf)return vr(i,n);let s=r.get(i.leaf);if(!s||s.length===0)return vr(i,n);let o=n?Qa(i,s,n):null;if(o)return{...i,startLine:o.startLine,endLine:o.endLine};let a=s[0],c=Math.abs(a.startLine-i.startLine);for(let l=1;l<s.length;l+=1){let u=s[l],p=Math.abs(u.startLine-i.startLine);p<c&&(a=u,c=p)}return{...i,startLine:a.startLine,endLine:a.endLine}})}function Qa(e,t,n){let r=Ya(e.symbol);if(!r)return null;let i=n.split(/\r?\n/),s=new RegExp(`\\b${O(r)}\\b`);for(let o of t){let a=Ga(i,o.startLine);if(a&&s.test(a))return o}return null}function Ya(e){return e.match(/\/impl#\[([^\]]+)\]/)?.[1]??null}function Ga(e,t){for(let n=t;n>=0;n-=1){let r=e[n]?.trim()??"";if(r){if(/^impl\b/.test(r))return Za(e,n,t);if(/^(?:struct|enum|trait|mod)\b/.test(r))return null}}return null}function Za(e,t,n){let r=[];for(let i=t;i<=n;i+=1){let s=e[i]??"";if(r.push(s),s.includes("{"))break}return r.join(" ")}function ec(e){return st(e.symbol)?!0:we(e.symbol)==="term"&&K(e.symbol)===null}function vr(e,t){if(!t||!e.leaf||we(e.symbol)!=="term"||K(e.symbol)!==null)return e;let n=O(e.leaf),r=new RegExp(`\\b(?:export\\s+)?(?:const|let|var)\\s+${n}\\b`),s=t.split(/\r?\n/).findIndex(o=>r.test(o));return s>=0?{...e,startLine:s,endLine:s}:e}function tc(e,t,n){if(!st(n.symbol))return n.startLine;let r=Math.max(0,Math.min(n.startLine,e.length-1));if(!t)return r;let i=t.get(n.leaf);if(!i||i.length===0)return r;let s=null;for(let o of i){let a=Math.abs(o-n.startLine);(!s||a<s.distance)&&(s={line:o,distance:a})}return s?.line??r}function nc(e){let t=/\b(?:function|def|fn)\s+([A-Za-z_$][\w$]*)/g,n=/\b([A-Za-z_$][\w$]*)\s*[:=]\s*(?:async\s*)?(?:function\b|\()/g,r=/^\s*(?:(?:export|public|private|protected|static|readonly|async|abstract|get|set)\s+)*([A-Za-z_$][\w$]*)\s*(?:<[^(]*>)?\s*\(/,i=/\b([A-Za-z_$][\w$]*)\s*\(/g,s=new Map,o=(a,c)=>{let l=s.get(a);if(!l){s.set(a,[c]);return}l[l.length-1]!==c&&l.push(c)};for(let a=0;a<e.length;a+=1){let c=e[a]??"";for(let u of c.matchAll(t))u[1]&&o(u[1],a);for(let u of c.matchAll(n))u[1]&&o(u[1],a);let l=c.match(r);l?.[1]&&o(l[1],a);for(let u of c.matchAll(i))u[1]&&o(u[1],a)}return s}function rc(e,t,n,r){let i=Math.max(n,Math.min(e.length-1,r)),s=Math.max(n,Math.min(i,t.endLine)),o=0,a=0,c=!1;for(let l=n;l<=i;l+=1){let u=ic(e[l]??"");for(let p of u)p==="{"?(o+=1,c=!0):p==="}"?o=Math.max(0,o-1):p==="("?a+=1:p===")"&&(a=Math.max(0,a-1));if(c&&o===0||!c&&a===0&&l>=s)return l}return s}function ic(e){let t="",n=null,r=!1;for(let i=0;i<e.length;i+=1){let s=e[i],o=e[i+1];if(!n&&s==="/"&&o==="/"){t+=" ".repeat(e.length-i);break}if(n){if(r){r=!1,t+=" ";continue}if(s==="\\"){r=!0,t+=" ";continue}s===n&&(n=null),t+=" ";continue}if(s==='"'||s==="'"||s==="`"){n=s,t+=" ";continue}t+=s}return t}function st(e){return e.includes("().")}export{je as a,J as b,Ce as c,Sc as d,xc as e,bc as f,Ec as g,Nc as h,ne as i,vc as j,re as k,Wn as l,ps as m,Y as n,Al as o,b as p,ac as q,pt as r,cc as s,O as t,Gs as u,z as v,q as w,Nt as x,Yi as y,Bn as z,Gi as A,_t as B,Zi as C,B as D,ie as E,qc as F,ye as G,Ct as H,ts as I,ns as J,Ys as K,rt as L,xr as M,zt as N,vp as O,it as P,Rp as Q,kp as R,_r as S,Cr as T,qt as U,Qt as V,Gp as W,Ma as X,Zp as Y,ed as Z,td as _,Wa as $,nd as aa,rd as ba};
|
|
210
|
-
//# sourceMappingURL=chunk-SDPA5DKN.js.map
|
package/dist/chunk-SEUJVWT2.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{B as ye,q as ae,t as O,u as B,v as ue,x as me,y as U}from"./chunk-SF7X6QNW.js";import{V as v,W as he,l as le,m as fe,n as K,o as pe,t as de}from"./chunk-SDPA5DKN.js";import{b as ce,f as j}from"./chunk-VWLIOEEF.js";import{k as V,l as Se,n as $,o as be}from"./chunk-G6OGPXJW.js";import{d as w,e as ge}from"./chunk-DRENNWRG.js";import{c as oe}from"./chunk-H5EXS3HM.js";import{a as A,e as F}from"./chunk-HGFDYOVB.js";import{$ as se,ea as _,h as re}from"./chunk-4DCKBY6T.js";import{join as _e}from"path";var Me=3,Ke=2,Ve="typescript-semantic";function Mt(o){let e=_e(o,Ve),n=Se(e);return{...n,requestDir:n.legacyRequestDir}}function It(o){return ae(o)}function xt(o){let e=JSON.parse(o),n=e.protocolVersion,t=n===Ke;if(!t&&n!==Me||typeof e.id!="string"||typeof e.generation!="string"||typeof e.deadlineAtMs!="number"||!Number.isFinite(e.deadlineAtMs)||e.profileEnvironment!==void 0&&!oe(e.profileEnvironment)||!e.request||!$e(e.request)||!t&&(e.mailboxVersion!==V||typeof e.operationKey!="string"||!/^[a-f0-9]{64}$/.test(e.operationKey)||e.id!==be(e.operationKey)||typeof e.clientId!="string"||!e.clientId||typeof e.enqueuedAtMs!="number"||!Number.isFinite(e.enqueuedAtMs)||e.deadlineAtMs<e.enqueuedAtMs))throw new Error("TypeScript semantic service received an invalid mailbox request.");if(!t){let r=e,s=$("typescript-semantic-v3",{generation:r.generation,profileEnvironment:r.profileEnvironment,request:r.request});if(r.operationKey!==s)throw new Error("TypeScript semantic service received a mismatched mailbox operation identity.");return r}let i=$("typescript-semantic-v2",{id:e.id,generation:e.generation,request:e.request});return{protocolVersion:Me,mailboxVersion:V,id:e.id,operationKey:i,clientId:"legacy-v2",enqueuedAtMs:e.deadlineAtMs,deadlineAtMs:e.deadlineAtMs,generation:e.generation,...e.profileEnvironment?{profileEnvironment:e.profileEnvironment}:{},request:e.request}}function $e(o){if(!o||typeof o!="object"||!("kind"in o))return!1;let e=o;switch(e.kind){case"availability":return!0;case"import-usage":return typeof e.file=="string";case"reference-fragments":return pe(e.files)!==null;case"references":return Ie(e.definitions)&&(e.exact===void 0||typeof e.exact=="boolean");case"callees":return Ie(e.definitions);case"signature":return xe(e.definition);default:return!1}}function Ie(o){return Array.isArray(o)&&o.every(xe)}function xe(o){if(!o||typeof o!="object")return!1;let e=o;return typeof e.symbolId=="number"&&typeof e.documentId=="number"&&typeof e.symbol=="string"&&typeof e.relativePath=="string"&&typeof e.leaf=="string"&&typeof e.startLine=="number"&&typeof e.endLine=="number"}import{existsSync as E}from"fs";import b from"path";var W=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"];function z(o,e){let t=e?b.dirname(b.join(o,e)):o,i=b.resolve(o);for(;t.startsWith(i);){for(let s of W){let a=b.join(t,s);if(E(a))return a}let r=b.dirname(t);if(r===t)break;t=r}for(let r of W){let s=b.join(o,r);if(E(s))return s}return null}function Fe(o){let e=o.config.projectRoot,n=new Set(We(e,o.config.semantic?.typescript?.tsconfigs)),t=j(o,{includeIgnored:!1,extensions:O});for(let i of t){let r=z(e,i);r&&n.add(b.resolve(r))}if(n.size===0){let i=z(e);i&&n.add(b.resolve(i))}return[...n].filter(i=>!Te(e,i)).sort((i,r)=>i.localeCompare(r))}function We(o,e=[]){let n=new Set;for(let t of e){let i=b.isAbsolute(t)?t:b.join(o,t);E(i)&&n.add(b.resolve(i))}for(let t of ze(o))for(let i of W){let r=b.join(t,i);E(r)&&n.add(b.resolve(r))}if(n.size===0){let t=z(o);t&&n.add(b.resolve(t))}return[...n].filter(t=>!Te(o,t)).sort((t,i)=>t.localeCompare(i))}function ze(o){let e=b.join(o,"package.json");if(!E(e))return[];let n;try{n=JSON.parse(re(e,"project package manifest"))}catch{return[]}return(Array.isArray(n.workspaces)?n.workspaces:n.workspaces?.packages??[]).flatMap(i=>fe(o,i))}function Te(o,e){let n=b.relative(o,e).replace(/\\/g,"/");return n.startsWith("..")||n.includes("/node_modules/")||n.startsWith("node_modules/")||n.includes("/dist/")||n.startsWith("dist/")}import{performance as m}from"perf_hooks";function I(o,e,n){if(o.has(e))return o.get(e);let t=n();return o.set(e,t),t}import Re from"path";import{realpathSync as ke}from"fs";function Ye(o,e){return o.getReferences().map(n=>{let t=n.getNode();return q(t,e)})}function Ge(o){let e=o;return typeof e.findReferences=="function"?e.findReferences():[]}function Ce(o,e,n,t){let i=[];for(let r of Ge(o))for(let s of Ye(r,t))s.file===e.relativePath&&s.line>=e.startLine&&s.line<=e.endLine||i.push(s);for(let r of n)i.push(r);return P(i)}function Ne(o,e,n,t){let i=[],r=n?.getStart();for(let s of o.getReferences()){let a=s.getNode();L(t,a.getSourceFile().getFilePath())===e&&(r!==void 0&&a.getStart()===r||i.push({location:q(a,t),node:a}))}return i}function q(o,e){let n=o.getSourceFile(),t=n.getLineAndColumnAtPos(o.getStart());return{file:L(e,n.getFilePath())??n.getBaseName(),line:t.line-1,column:t.column-1}}function ve(o,e,n){let t=o.getSourceFile(),i=G(t,o),r=o.getText(),s=new RegExp(`\\b${de(r)}\\b`,"g"),a=t.getFullText().split(`
|
|
2
|
-
`),c=[];for(let l=0;l<a.length;l++){if(l===i)continue;let f=a[l]??"";s.lastIndex=0;let p;for(;(p=s.exec(f))!==null;)c.push({file:e,line:l,column:p.index})}return P(c.filter(l=>L(n,Re.join(n,l.file))===e))}function Y(o){for(let e=o;e;e=e.getParent()){let n=e.getKindName();if(n.includes("Type")||n==="InterfaceDeclaration"||n==="TypeAliasDeclaration")return!0;if(n==="CallExpression"||n==="NewExpression"||n==="ExpressionStatement")return!1}return!1}function G(o,e){return o.getLineAndColumnAtPos(e.getStart()).line-1}function P(o){let e=new Set,n=[];for(let t of o){let i=`${t.file}:${t.line}:${t.column}`;e.has(i)||(e.add(i),n.push(t))}return n}function L(o,e){let n=o||process.cwd(),t=De(n,e);if(t)return t;try{return De(ke(n),ke(e))}catch{return null}}function De(o,e){let n=Re.relative(o,e).replace(/\\/g,"/");return!n||n===".."||n.startsWith("../")?null:n}function Pe(o,e,n,t){let i=Xe(e,t);return i.size===0?new Map:Je(o,n,i)}function Xe(o,e){let n=new Map;for(let t of v(o,e)){let i=w(t.symbol)??t.leaf;if(!i)continue;let r=n.get(i);r||(r=[],n.set(i,r)),r.push(t)}return n}function Je(o,e,n){let t=new Map,i=new Map;return e.forEachDescendant(r=>{for(let s of Qe(o,r)){let a=n.get(s);if(!a)continue;let c=G(e,r);for(let l of a){if(c<l.startLine-1||c>l.endLine+1)continue;let f=Math.abs(c-l.startLine),p=i.get(l.symbolId);p!==void 0&&p<=f||(i.set(l.symbolId,f),t.set(l.symbolId,r))}}}),t}function Qe(o,e){let n=[],t=i=>{i&&!n.includes(i)&&n.push(i)};if("getNameNode"in e&&typeof e.getNameNode=="function"){let i=e.getNameNode();t(i?.getText())}if("getName"in e&&typeof e.getName=="function"){let i=e.getName();t(i)}return o.Node.isIdentifier(e)&&t(e.getText()),n}var Ze=ce("ts-definition-leaf-candidates",{clearGroups:["definition-catalog"]});function Le(o,e,n,t){let i=Q(o,e),r=X(i.get(t)??[],n);if(r)return r;let s=[];for(let a of i.values())for(let c of a)((c.leaf||w(c.symbol)||"").includes(t)||c.symbol.includes(t))&&s.push(c);return X(s,n)}function J(o,e,n,t){return X(Q(o,e).get(t)??[],n)}function we(o,e){let n=new Map;for(let[t,i]of Q(o,e)){let r=i[0];r&&n.set(t,r)}return n}function Q(o,e){return Ze.get(o,e,()=>{let n=new Map;for(let t of v(o,e)){let i=t.leaf||w(t.symbol);if(!i)continue;let r=n.get(i);r||(r=[],n.set(i,r)),r.push({...t,leaf:i})}for(let t of n.values())t.sort((i,r)=>i.startLine-r.startLine||i.endLine-r.endLine||i.symbolId-r.symbolId);return n})}function X(o,e){let n=null,t=Number.POSITIVE_INFINITY;for(let i of o){let r=Math.abs(i.startLine-e);(r<t||r===t&&n&&i.startLine<n.startLine)&&(n=i,t=r)}return n}import et from"path";import{realpathSync as tt}from"fs";function Ee(o,e){let n=new Map,t=null,i=null,r=()=>(i??=j(o,{extensions:O}),i),s=()=>(t??=F("typescript.source-file-index",()=>nt(o.config.projectRoot,e,r()),()=>({projects:e.length,indexedDocuments:r().length})),t),a=c=>B(c)?I(n,c,()=>{let l=Ae(o.config.projectRoot,c);if(!l)return null;for(let{project:f,sourceFiles:p}of s()){let d=p.get(l)??null;if(d||(d=f.addSourceFileAtPathIfExists(l)??null,d&&Z(p,d)),d)return{project:f,sourceFile:d}}return null}):null;return{sourceFile:c=>a(c)?.sourceFile??null,sourceFileMatch:a,indexedTypeScriptLikeDocuments:r}}function nt(o,e,n){let t=e.map(({project:i})=>{let r=new Map;for(let s of i.getSourceFiles())Z(r,s);return{project:i,sourceFiles:r}});for(let i of n){let r=Ae(o,i);if(r)for(let s of t){if(s.sourceFiles.has(r))break;let a=s.project.addSourceFileAtPathIfExists(r)??null;if(a){Z(s.sourceFiles,a);break}}}return t}function Z(o,e){let n=ee(e.getFilePath());o.set(n,e);try{o.set(ee(tt(n)),e)}catch(t){if(!_(t))throw t}}function Ae(o,e){try{return ee(se(o,e,{inputKind:"indexed TypeScript source file"}).absolutePath)}catch(n){if(!_(n))throw n;return null}}function ee(o){return et.resolve(o)}function te(o,e){for(let n of o)if(e===n.name||e.startsWith(`${n.name}/`))return n.name;return null}function je(o){let e=`${o.relativeDir}/src`;return[`${e}/index.ts`,`${e}/index.tsx`,`${e}/index.mts`,`${e}/index.cts`]}var it=32;function gn(o,e){let n=F("typescript.provider.load",()=>ue());if(!n)return U("ts-morph is not installed");let t=F("typescript.provider.tsconfig-discovery",()=>Fe(o));if(t.length===0)return U("no tsconfig found");try{let i=F("typescript.provider.project-bundles",()=>me(n,t),()=>({tsconfigs:t.length}));return rt(o,n,i)}catch(i){return U(i instanceof Error?i.message:String(i),t[0],t)}}function rt(o,e,n,t={}){return F("typescript.provider.construct",()=>new ne(o,e,n),()=>({tsconfigs:n.length,reusedProjects:t.reusedProjects===!0}))}var ne=class{constructor(e,n,t){this.db=e;this.tsMorph=n;this.projects=t;this.workspacePackages=le(e.config.projectRoot),this.sourceFiles=Ee(e,t)}db;tsMorph;projects;language="typescript";importUsageCache=new Map;referencesCache=new Map;calleesCache=new Map;fileCalleesCache=new Map;signatureCache=new Map;definitionNodeCache=new Map;fileDefinitionNodeCache=new Map;indexedDefinitionLeafCache=new Map;compilerCheckerCache=new WeakMap;packageImportReferenceIndex=null;packageExportIndex=null;workspacePackages;sourceFiles;availability(){return{available:!0,tsconfigPath:this.projects[0]?.tsconfigPath,tsconfigPaths:this.projects.map(e=>e.tsconfigPath)}}importUsage(e){return I(this.importUsageCache,e,()=>{let n=this.sourceFiles.sourceFile(e);if(!n)return[];let t=st();return F("typescript.import-usage.file",()=>this.importUsageForSourceFile(e,n,t),()=>({file:e,...t}))})}referencesFor(e){return I(this.referencesCache,e.symbolId,()=>{let n=this.nodeForDefinition(e);return this.referencesForDefinitionNode(e,n)})}referencesForDefinitions(e,n={}){let t=new Map,i=A(),r=[];for(let f of e){let p=this.referencesCache.get(f.symbolId);p?t.set(f.symbolId,p):r.push(f)}if(r.length===0)return t;let s=r,a=n.exact?[]:r.filter(f=>!Be(f));if(a.length>=it){let f=this.referencesForDefinitionsBySymbolScan(a);for(let p of a){let d=f.get(p.symbolId)??[];this.referencesCache.set(p.symbolId,d),t.set(p.symbolId,d)}if(s=r.filter(p=>Be(p)),s.length===0)return t}let c=new Map;for(let f of s){let p=c.get(f.relativePath);p?p.push(f):c.set(f.relativePath,[f])}let l=[];for(let[f,p]of c){let d=Ue();F("typescript.references-map.file",()=>{let S=this.definitionNodesForFile(f);for(let y of p){i&&(d.cacheMisses+=1);let h=S.get(y.symbolId)??null;i&&(h?d.nodeHits+=1:d.nodeMisses+=1);try{let u=this.referencesForDefinitionNode(y,h,i?d:void 0);this.referencesCache.set(y.symbolId,u),t.set(y.symbolId,u)}catch{d.preciseSearchFailures+=1,l.push(y)}}},()=>({relativePath:f,definitions:p.length,...qe(d)}))}if(l.length>0){let f=this.referencesForDefinitionsBySymbolScan(l);for(let p of l){let d=f.get(p.symbolId)??[];this.referencesCache.set(p.symbolId,d),t.set(p.symbolId,d)}}return t}referenceFragmentsForFiles(e){let n=he(this.db).filter(r=>B(r.relativePath)),t=e.filter(r=>this.sourceFiles.sourceFile(r)!==null),i=this.referencesForDefinitionsBySymbolScan(n,t);return ye(n,i,t)}referencesForDefinitionsBySymbolScan(e,n){let t=A(),i=Ue(),r=new Map,s=new Set(e.map(c=>c.symbolId)),a=new Map(e.map(c=>[c.symbolId,c]));for(let c of e)r.set(c.symbolId,[]);return F("typescript.references-map.inverted-scan",()=>{let c=t?m.now():0,l=n?this.packageImportReferencesForFiles(n):this.packageImportReferences();for(let u of e){let g=l.get(u.symbolId)??[];if(g.length>0){let T=r.get(u.symbolId)??[];T.push(...g),r.set(u.symbolId,T)}t&&(i.packageReferenceCount+=g.length)}t&&(i.packageRefsMs+=m.now()-c);let f=new Map,p=new Map,d=this.hierarchyTargetsForDefinitions(e),S=new Set(e.map(u=>u.leaf).filter(Boolean)),y=t?m.now():0;for(let u of n??this.sourceFiles.indexedTypeScriptLikeDocuments()){if(this.db.isIgnored(u))continue;let g=this.sourceFiles.sourceFile(u);g&&(t&&(i.scanFiles+=1),this.addReferencesFromSourceFileScan(g,u,s,a,d,S,f,p,r,t?i:void 0))}t&&(i.scanMs+=m.now()-y);let h=t?m.now():0;this.addHierarchyMemberReferences(e,r,t?i:void 0),t&&(i.hierarchyMs+=m.now()-h);for(let[u,g]of r){let T=P(g);r.set(u,T),t&&(i.referenceCount+=T.length)}},()=>({definitions:e.length,...qe(i)})),r}addReferencesFromSourceFileScan(e,n,t,i,r,s,a,c,l,f){let p=this.compilerCheckerForSourceFile(e),d=e.compilerNode,S=lt(e),y=h=>{if(this.tsMorph.ts.isIdentifier(h)){if(f&&(f.identifiers+=1),!s.has(h.text)&&!S.has(h.text)){this.tsMorph.ts.forEachChild(h,y);return}let u=this.compilerReferenceSymbol(p,h,f);if(u){let g;a.has(u)?g=a.get(u)??null:(g=this.referenceDefinitionFromCompilerSymbol(u),a.set(u,g)),f&&(g?f.targetHits+=1:f.targetMisses+=1);let T=I(c,u,()=>this.compilerSymbolKeys(u)),C=null,k=null,N=g&&t.has(g.symbolId)?i.get(g.symbolId):void 0;if(N&&(C=H(d,h),!Oe(N,n,C))){let R=d.getLineAndCharacterOfPosition(h.getStart(d));k={file:n,line:R.line,column:R.character};let D=l.get(N.symbolId)??[];D.push(k),l.set(N.symbolId,D),f&&(f.requestedHits+=1)}for(let R of T)for(let D of r.get(R)?.values()??[]){if(C??=H(d,h),Oe(D,n,C))continue;if(!k){let x=d.getLineAndCharacterOfPosition(h.getStart(d));k={file:n,line:x.line,column:x.character}}let M=l.get(D.symbolId)??[];M.push(k),l.set(D.symbolId,M),f&&(f.requestedHits+=1)}}}this.tsMorph.ts.forEachChild(h,y)};y(d)}hierarchyTargetsForDefinitions(e){let n=new Map;for(let t of e){let i=this.nodeForDefinition(t),r=i?.compilerNode;if(!r||!this.isHierarchyMethod(r))continue;let s=r.parent;if(!this.isHierarchyContainer(s))continue;let a=this.compilerCheckerForSourceFile(i.getSourceFile()),c=a.getSymbolAtLocation(r.name);if(c)for(let l of this.hierarchyMemberSymbols(a,s,c))for(let f of this.compilerSymbolKeys(l)){let p=n.get(f)??new Map;p.set(t.symbolId,t),n.set(f,p)}}return n}hierarchyMemberSymbols(e,n,t){let i=new Set,r=new Set,s=(a,c,l)=>{if(!r.has(a)){r.add(a),i.add(c);for(let f of l){let p=f.getProperty(t.name);p&&s(f,p,this.hierarchyAncestorTypesForType(e,f))}}};return s(e.getTypeAtLocation(n),t,this.hierarchyAncestorTypes(e,n)),i}addHierarchyMemberReferences(e,n,t){let i=new Map;for(let r of e){let s=this.nodeForDefinition(r),a=s?.compilerNode;if(!a||!this.isHierarchyMethod(a))continue;let c=a.parent;if(!this.isHierarchyContainer(c))continue;let l=this.compilerCheckerForSourceFile(s.getSourceFile()),f=l.getSymbolAtLocation(a.name);if(!f)continue;let p=a.getSourceFile(),d=p.getLineAndCharacterOfPosition(a.name.getStart(p)),S={definition:r,location:{file:r.relativePath,line:d.line,column:d.character}},y=n.get(r.symbolId)??[];for(let u of this.hierarchyMemberSymbols(l,c,f))if(u!==f)for(let g of this.compilerSymbolLocations(u))y.push(g),t&&(t.hierarchyReferences+=1);n.set(r.symbolId,y);let h=this.hierarchyRootMemberSymbols(l,c,f);for(let u of h){let g=i.get(u)??new Map;g.set(r.symbolId,S),i.set(u,g)}t&&(t.hierarchyDefinitions+=1)}for(let r of i.values())if(!(r.size<2)){t&&(t.hierarchyFamilies+=1);for(let{definition:s}of r.values()){let a=n.get(s.symbolId)??[];for(let c of r.values())c.definition.symbolId!==s.symbolId&&(a.push(c.location),t&&(t.hierarchyReferences+=1));n.set(s.symbolId,a)}}}hierarchyRootMemberSymbols(e,n,t){let i=new Set,r=new Set,s=(a,c,l)=>{if(r.has(a))return;r.add(a);let f=!1;for(let p of l){let d=p.getProperty(t.name);d&&(f=!0,s(p,d,this.hierarchyAncestorTypesForType(e,p)))}if(!f)for(let p of this.compilerSymbolKeys(c))i.add(p)};return s(e.getTypeAtLocation(n),t,this.hierarchyAncestorTypes(e,n)),i}compilerSymbolKeys(e){return(e.declarations??[]).map(n=>{let t=n.getSourceFile();return`${t.fileName}\0${n.getStart(t)}\0${e.name}`})}compilerSymbolLocations(e){let n=[];for(let t of e.declarations??[]){let i=t.getSourceFile(),r=L(this.db.config.projectRoot,i.fileName);if(!r)continue;let s=t.name,a=i.getLineAndCharacterOfPosition((s??t).getStart(i));n.push({file:r,line:a.line,column:a.character})}return n}baseTypes(e,n){try{return e.getBaseTypes(n)??[]}catch{return[]}}hierarchyAncestorTypes(e,n){let t=new Set(this.hierarchyAncestorTypesForType(e,e.getTypeAtLocation(n)));for(let i of n.heritageClauses??[])for(let r of i.types)t.add(e.getTypeAtLocation(r));return[...t]}hierarchyAncestorTypesForType(e,n){let t=new Set(this.baseTypes(e,n));for(let i of n.getSymbol()?.declarations??[])if(this.isHierarchyContainer(i))for(let r of i.heritageClauses??[])for(let s of r.types)t.add(e.getTypeAtLocation(s));return[...t]}isHierarchyMethod(e){return this.tsMorph.ts.isMethodDeclaration(e)||this.tsMorph.ts.isMethodSignature(e)}isHierarchyContainer(e){return this.tsMorph.ts.isClassDeclaration(e)||this.tsMorph.ts.isClassExpression(e)||this.tsMorph.ts.isInterfaceDeclaration(e)}compilerReferenceSymbol(e,n,t){t&&(t.symbolLookups+=1);let i=e.getSymbolAtLocation(n);if(i){if((i.flags&this.tsMorph.ts.SymbolFlags.Alias)===0)return i;try{return t&&(t.aliasResolutions+=1),e.getAliasedSymbol(i)}catch{return i}}}calleesFor(e){return I(this.calleesCache,e.symbolId,()=>I(this.fileCalleesCache,e.relativePath,()=>this.calleeMapForFile(e.relativePath)).get(e.symbolId)??[])}calleesForDefinitions(e){let n=new Map,t=new Map;for(let i of e){let r=t.get(i.relativePath);r?r.push(i):t.set(i.relativePath,[i])}for(let[i,r]of t){let s=this.fileCalleesCache.get(i),a=new Set(r.map(l=>l.symbolId)),c=s??this.calleeMapForFile(i,a);for(let l of r){let f=c.get(l.symbolId)??[];this.calleesCache.set(l.symbolId,f),n.set(l.symbolId,f)}}return n}referencesForDefinitionNode(e,n,t){let i=t?m.now():0,r=this.packageImportReferencesForDefinition(e);if(t&&(t.packageRefsMs+=m.now()-i,t.packageReferenceCount+=r.length),!n)return r;let s=t?m.now():0,a=Ce(n,e,r,this.db.config.projectRoot);return t&&(t.semanticRefsMs+=m.now()-s,t.referenceCount+=a.length),a}signatureFor(e){return I(this.signatureCache,e.symbolId,()=>{let n=this.nodeForDefinition(e);if(!n||!this.tsMorph.Node.isFunctionDeclaration(n)&&!this.tsMorph.Node.isMethodDeclaration(n)&&!this.tsMorph.Node.isArrowFunction(n)&&!this.tsMorph.Node.isFunctionExpression(n)&&!this.tsMorph.Node.isConstructorDeclaration(n))return null;let t=n.getType().getCallSignatures()[0];if(!t)return null;let i=t.getParameters().map(s=>{let a=s.getDeclarations()[0],c=a?s.getTypeAtLocation(a).getText(a):s.getValueDeclaration()?.getType().getText()??"unknown";return He(c)}),r=t.getReturnType().getText(n);return`(${i.join(",")})=>${He(r)}`})}importUsageForSourceFile(e,n,t){let i=[],r=new Map;for(let s of n.getImportDeclarations()){t.declarations+=1;let a=K(this.db,e,s.getModuleSpecifierValue()),c=s.getImportClause()?.isTypeOnly()??!1;for(let l of ie(s)){t.entries+=1;let f=c?null:l.identifier?.getSymbol()?.compilerSymbol??null;!c&&l.identifier&&(f?t.bindingSymbols+=1:t.missingBindingSymbols+=1);let p={sourcePath:a,entry:l,typeOnlyDeclaration:c,bindingSymbol:f,references:[]};if(i.push(p),c||!l.localName||!f)continue;let d=r.get(l.localName);d?d.push(p):r.set(l.localName,[p])}}return r.size>0&&n.forEachDescendant(s=>{if(s.getKindName()!=="Identifier")return;let a=r.get(s.getText());if(!a||at(s))return;t.scannedIdentifiers+=1;let c=s.getSymbol()?.compilerSymbol;if(t.symbolLookups+=1,!!c){for(let l of a)if(l.bindingSymbol===c){l.references.push({location:q(s,this.db.config.projectRoot),node:s}),t.matchedReferences+=1;break}}}),i.map(s=>s.typeOnlyDeclaration?ot(e,s.sourcePath,s.entry):s.entry.identifier&&!s.bindingSymbol?(t.fallbackEntries+=1,this.valueImportUsageForEntry(e,s.sourcePath,s.entry)):this.valueImportUsageFromLocations(e,s.sourcePath,s.entry,s.references))}valueImportUsageForEntry(e,n,t){let i=t.identifier?t.identifier.findReferences():[],r=[];for(let s of i)for(let a of Ne(s,e,t.identifier,this.db.config.projectRoot))r.push(a);return this.valueImportUsageFromLocations(e,n,t,r)}valueImportUsageFromLocations(e,n,t,i){let r=i.some(c=>!Y(c.node)),s=i.some(c=>Y(c.node)),a=t.isTypeOnly;return{importer:e,sourcePath:n,importedName:t.importedName,localName:t.localName,kind:t.kind,isTypeOnly:a,isUsed:a||i.length>0,isTypeUsed:a||s,isValueUsed:r,references:i.map(c=>c.location)}}packageImportReferencesForDefinition(e){return this.packageImportReferences().get(e.symbolId)??[]}packageImportReferencesForFiles(e){let n=new Map,t=new Set;for(let r of e){let s=this.sourceFiles.sourceFile(r);if(s)for(let a of s.getImportDeclarations()){let c=te(this.workspacePackages,a.getModuleSpecifierValue());c&&t.add(c)}}if(t.size===0)return n;let i=this.packageExportsForNames(t);for(let r of e)this.addPackageImportReferencesForDocument(n,i,r);for(let[r,s]of n)n.set(r,P(s));return n}packageImportReferences(){if(this.packageImportReferenceIndex)return this.packageImportReferenceIndex;let e=new Map,n=this.packageExports();for(let t of this.sourceFiles.indexedTypeScriptLikeDocuments())this.addPackageImportReferencesForDocument(e,n,t);for(let[t,i]of e)e.set(t,P(i));return this.packageImportReferenceIndex=e,e}addPackageImportReferencesForDocument(e,n,t){if(this.db.isIgnored(t))return;let i=this.sourceFiles.sourceFileMatch(t);if(i)for(let r of i.sourceFile.getImportDeclarations())this.addPackageImportReferencesForDeclaration(e,n,t,r)}addPackageImportReferencesForDeclaration(e,n,t,i){let r=te(this.workspacePackages,i.getModuleSpecifierValue());if(!r)return;let s=n.get(r);if(s)for(let a of ie(i)){if(a.kind!=="named"||!a.identifier)continue;let c=s.get(a.importedName);if(!c||c.size===0)continue;let l=ve(a.identifier,t,this.db.config.projectRoot);l.length>0&&ut(e,c,l)}}packageExports(){return this.packageExportIndex?this.packageExportIndex:(this.packageExportIndex=this.packageExportsForNames(new Set(this.workspacePackages.map(e=>e.name))),this.packageExportIndex)}packageExportsForNames(e){let n=new Map;for(let t of this.workspacePackages){if(!e.has(t.name))continue;let i=new Map;for(let r of je(t))this.collectPackageExports(t,r,i,new Set);i.size>0&&n.set(t.name,i)}return n}collectPackageExports(e,n,t,i){if(i.has(n))return;i.add(n);let r=this.sourceFiles.sourceFile(n);if(r)for(let s of r.getExportDeclarations()){let a=s.getModuleSpecifierValue(),c=a?K(this.db,n,a):n;if(!c||!c.startsWith(`${e.relativeDir}/src/`))continue;let l=s.getNamedExports();if(l.length===0){if(s.isNamespaceExport())continue;this.collectPackageExports(e,c,t,i);continue}for(let f of l){let p=f.getNameNode().getText(),d=f.getAliasNode()?.getText()??p,S=this.indexedDefinitionByLeaf(c,p);if(!S)continue;let y=t.get(d);y||(y=new Set,t.set(d,y)),y.add(S.symbolId)}}}indexedDefinitionByLeaf(e,n){return I(this.indexedDefinitionLeafCache,e,()=>we(this.db,e)).get(n)??null}nodeForDefinition(e){return I(this.definitionNodeCache,e.symbolId,()=>this.definitionNodesForFile(e.relativePath).get(e.symbolId)??null)}definitionNodesForFile(e){return I(this.fileDefinitionNodeCache,e,()=>{let n=this.sourceFiles.sourceFile(e);return n?Pe(this.tsMorph,this.db,n,e):new Map})}referenceDefinitionFromCompilerSymbol(e){return this.definitionFromCompilerSymbol(e,void 0,!0)}definitionFromCompilerSymbol(e,n,t=!1){let i=e.name,r=n?m.now():0,s=e.declarations??[];n&&(n.declarationsMs+=m.now()-r,n.declarationChecks+=s.length);for(let a of s){let c=n?m.now():0,l=a.getSourceFile(),f=L(this.db.config.projectRoot,l.fileName),p=l.getLineAndCharacterOfPosition(a.getStart(l)).line;if(n&&(n.declarationLocationMs+=m.now()-c),!f||this.db.isIgnored(f))continue;let d=n?m.now():0,S=this.compilerDeclarationName(a),y=t?J(this.db,f,p,i)??(S&&S!==i?J(this.db,f,p,S):null):Le(this.db,f,p,i);if(n&&(n.indexedLookupMs+=m.now()-d),y)return{symbolId:y.symbolId,symbol:y.symbol,file:y.relativePath,line:y.startLine}}return null}compilerDeclarationName(e){let n=e.name;return n&&this.tsMorph.ts.isIdentifier(n)?n.text:null}calleeMapForFile(e,n){let t=A(),i=0,r=0,s=0,a=0,c=0,l=0,f=0,p=0,d=t?pt():void 0;return F("typescript.callee-map.file",()=>{let S=t?m.now():0,y=this.sourceFiles.sourceFile(e);if(t&&(c=Math.round(m.now()-S)),!y)return new Map;let h=t?m.now():0,u=v(this.db,e).sort((M,x)=>M.startLine-x.startLine||x.endLine-M.endLine);if(t&&(l=Math.round(m.now()-h)),i=u.length,u.length===0)return new Map;let g=new Map,T=t?m.now():0,C=this.compilerCheckerForSourceFile(y),k=y.compilerNode;t&&(f=Math.round(m.now()-T));let N=new Map,R=M=>{if(this.tsMorph.ts.isCallExpression(M)||this.tsMorph.ts.isNewExpression(M)){t&&(r+=1);let x=this.semanticCalleeForCallNode(C,k,u,M,N,n,d);x&&(t&&(s+=1),ct(g,x.callerId,x.target))}this.tsMorph.ts.forEachChild(M,R)},D=t?m.now():0;R(k),t&&(p=Math.round(m.now()-D));for(let[M,x]of g)g.set(M,mt(x));return a=g.size,g},()=>({relativePath:e,definitions:i,callNodes:r,resolvedCallees:s,outputRows:a,requestedDefinitions:n?.size??i,sourceFileLookupMs:c,definitionsLoadMs:l,checkerLookupMs:f,traversalMs:p,...d?dt(d):{}}))}semanticCalleeForCallNode(e,n,t,i,r,s,a){let c=a?m.now():0,l=ft(t,H(n,i));if(a&&(a.callerLookupMs+=m.now()-c),!l)return null;if(s&&!s.has(l.symbolId))return a&&(a.skippedUnrequestedCallers+=1),null;let f=i.expression,p=this.compilerSymbolForExpression(e,f,a),d=null;if(p)if(a&&(a.targetSymbolHits+=1),r.has(p))a&&(a.compilerSymbolCacheHits+=1),d=r.get(p)??null;else{a&&(a.compilerSymbolCacheMisses+=1);let S=a?m.now():0;d=this.definitionFromCompilerSymbol(p,a),a&&(a.targetLookupMs+=m.now()-S),r.set(p,d)}else a&&(a.targetMisses+=1);return d?{callerId:l.symbolId,target:{symbol:d.symbol,file:d.file,line:d.line,callsiteLine:H(n,i)}}:null}compilerSymbolForExpression(e,n,t){let i=t?m.now():0,r=e.getSymbolAtLocation(n);if(t&&(t.expressionSymbolMs+=m.now()-i),r)return r;t&&(t.typeFallbacks+=1);let s=t?m.now():0,a=e.getTypeAtLocation(n).getSymbol();return t&&(t.typeSymbolMs+=m.now()-s),a}compilerCheckerForSourceFile(e){let n=e.getProject(),t=this.compilerCheckerCache.get(n);return t||(t=n.getTypeChecker().compilerObject,this.compilerCheckerCache.set(n,t)),t}};function ie(o){let e=[],n=o.getDefaultImport();n&&e.push({identifier:n,importedName:"default",localName:n.getText(),kind:"default",isTypeOnly:o.getImportClause()?.isTypeOnly()??!1});let t=o.getNamespaceImport();t&&e.push({identifier:t,importedName:"*",localName:t.getText(),kind:"namespace",isTypeOnly:o.getImportClause()?.isTypeOnly()??!1});for(let i of o.getNamedImports()){let r=i.getNameNode(),a=i.getAliasNode()??(r.getKindName()==="Identifier"?r:null);e.push({identifier:a,importedName:r.getText(),localName:a?.getText()??r.getText(),kind:"named",isTypeOnly:i.isTypeOnly()||(o.getImportClause()?.isTypeOnly()??!1)})}return e.length===0&&e.push({identifier:null,importedName:"*",localName:null,kind:"side-effect",isTypeOnly:!1}),e}function ot(o,e,n){return{importer:o,sourcePath:e,importedName:n.importedName,localName:n.localName,kind:n.kind,isTypeOnly:!0,isUsed:!0,isTypeUsed:!0,isValueUsed:!1,references:[]}}function st(){return{declarations:0,entries:0,bindingSymbols:0,missingBindingSymbols:0,scannedIdentifiers:0,symbolLookups:0,matchedReferences:0,fallbackEntries:0}}function at(o){for(let e=o;e;e=e.getParent())if(e.getKindName()==="ImportDeclaration")return!0;return!1}function ct(o,e,n){let t=o.get(e);t||(t=[],o.set(e,t)),t.push(n)}function lt(o){let e=new Set;for(let n of o.getImportDeclarations())for(let t of ie(n))t.localName&&e.add(t.localName);return e}function ft(o,e){let n=null;for(let t of o)e<t.startLine||e>t.endLine||(!n||t.startLine>=n.startLine)&&(n=t);return n}function H(o,e){return o.getLineAndCharacterOfPosition(e.getStart(o)).line}function Oe(o,e,n){return e===o.relativePath&&n>=o.startLine&&n<=o.endLine}function Be(o){return o.symbol.includes("#")?ge(o.symbol)==="type"&&o.relativePath.endsWith(".d.ts"):!1}function pt(){return{callerLookupMs:0,expressionSymbolMs:0,typeSymbolMs:0,targetLookupMs:0,declarationsMs:0,declarationLocationMs:0,indexedLookupMs:0,compilerSymbolCacheHits:0,compilerSymbolCacheMisses:0,targetSymbolHits:0,targetMisses:0,typeFallbacks:0,declarationChecks:0,skippedUnrequestedCallers:0}}function dt(o){return{...o,callerLookupMs:Math.round(o.callerLookupMs),expressionSymbolMs:Math.round(o.expressionSymbolMs),typeSymbolMs:Math.round(o.typeSymbolMs),targetLookupMs:Math.round(o.targetLookupMs),declarationsMs:Math.round(o.declarationsMs),declarationLocationMs:Math.round(o.declarationLocationMs),indexedLookupMs:Math.round(o.indexedLookupMs)}}function Ue(){return{cacheHits:0,cacheMisses:0,nodeHits:0,nodeMisses:0,scanFiles:0,identifiers:0,symbolLookups:0,aliasResolutions:0,targetHits:0,targetMisses:0,requestedHits:0,scanMs:0,packageRefsMs:0,semanticRefsMs:0,packageReferenceCount:0,referenceCount:0,preciseSearchFailures:0,hierarchyDefinitions:0,hierarchyFamilies:0,hierarchyReferences:0,hierarchyMs:0}}function qe(o){return{...o,scanMs:Math.round(o.scanMs),packageRefsMs:Math.round(o.packageRefsMs),semanticRefsMs:Math.round(o.semanticRefsMs),hierarchyMs:Math.round(o.hierarchyMs)}}function ut(o,e,n){for(let t of e){let i=o.get(t)??[];i.push(...n),o.set(t,i)}}function mt(o){let e=new Set,n=[];for(let t of o){let i=`${t.symbol}|${t.file}|${t.line}|${t.callsiteLine??""}`;e.has(i)||(e.add(i),n.push(t))}return n}function He(o){return o.replace(/\s+/g," ").replace(/\bimport\("[^"]+"\)\./g,"").trim()}export{Me as a,Mt as b,It as c,xt as d,Fe as e,gn as f,rt as g};
|
|
3
|
-
//# sourceMappingURL=chunk-SEUJVWT2.js.map
|
package/dist/chunk-SF7X6QNW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as w,f as E}from"./chunk-DOPCR5BY.js";import{a as A,c as k,g as v}from"./chunk-G6OGPXJW.js";import{a as G,b as L,c as q,d as F}from"./chunk-3VLJ2DCA.js";import{h as u,k as M}from"./chunk-4DCKBY6T.js";function K(t,e){return t.reason instanceof Error?t.reason:new Error(e)}function Ee(t,e){if(t?.aborted)throw K(t,e)}import{join as J}from"path";var U=t=>{if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t.pid;return typeof e=="number"&&Number.isSafeInteger(e)&&e>0?{pid:e}:null};function Te(t,e={}){return h(J(t,"gc.lock"),e)}function h(t,e={}){let n=e.waitMs??0,r=e.pollMs??10,i=e.now??F,o=i()+n;do{let a=Y(t,e.directoryDurability);if(a)return W(a);let l=o-i();if(l<=0)return null;X(Math.min(r,l))}while(i()<=o);return null}function Y(t,e){let n=k(t,{kind:"generic",parseLegacy:U,...e?{directoryDurability:e}:{}});return n.kind==="acquired"?n.lock:null}function W(t){return{release:()=>{t.release()}}}function X(t){let e=new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));Atomics.wait(e,0,0,t)}import{createHash as Z,randomUUID as ee}from"crypto";import{existsSync as m,mkdirSync as te,readdirSync as ne,rmSync as D,statSync as C}from"fs";import{basename as re,dirname as S,join as c}from"path";var ie=1,oe=1,ae=".scipquery-generations",se="manifest.json",N="readers",ce="gc.lock",le=128,g=new Map,_={pid:process.pid,now:()=>new Date,randomToken:()=>ee(),isProcessAlive:A,readProcessIdentity:q};function p(t){return c(S(t),ae)}function de(t){return c(p(t),ce)}function Ve(t,e=_){let n=h(de(t.dbPath),{waitMs:5e3,directoryDurability:"recoverable"});if(!n)throw new Error("SQLite generation retention is busy; retry opening the index.");let r;try{let i=ye(t);if(i.source!=="immutable")return{generation:i,release(){}};let o=e.randomToken();if(!/^[A-Za-z0-9._-]+$/.test(o))throw new Error("SQLite generation reader token is unsafe.");let a=c(p(t.dbPath),N);te(a,{recursive:!0}),r=c(a,`${e.pid}-${o}.json`);let l=e.readProcessIdentity(e.pid);v(r,{version:1,token:o,generationIdentity:i.identity,pid:e.pid,...l?{processIdentity:l}:{},acquiredAt:e.now().toISOString()},{spacing:2,trailingNewline:!0});let d=!1;return{generation:i,release(){d||!r||(d=!0,D(r,{force:!0}))}}}finally{n.release()}}function Ke(t,e,n=_,r={}){let i=c(p(t),N);if(!m(i))return{protectedGenerations:new Set,activeLeases:0,staleLeasesRemoved:0,malformedLeases:0};let o=new Set,a=0,l=0,d=0;for(let f of ne(i,{withFileTypes:!0})){if(!f.isFile()||!f.name.endsWith(".json"))continue;let y=c(i,f.name),s;try{s=ue(JSON.parse(u(y,"SQLite generation reader lease")))}catch{s=null}if(!s){d+=1;for(let V of e)o.add(V);continue}if(!fe(s,n)){r.removeStale!==!1&&(D(y,{force:!0}),l+=1);continue}a+=1,o.add(s.generationIdentity)}return{protectedGenerations:o,activeLeases:a,staleLeasesRemoved:l,malformedLeases:d}}function ue(t){if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t,n=e.processIdentity===void 0?null:G(e.processIdentity);return e.version!==1||typeof e.token!="string"||e.token.trim()===""||typeof e.generationIdentity!="string"||!/^[a-f0-9]{64}$/.test(e.generationIdentity)||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0||typeof e.acquiredAt!="string"||!Number.isFinite(Date.parse(e.acquiredAt))||e.processIdentity!==void 0&&(!n||n.pid!==e.pid)?null:{version:1,token:e.token,generationIdentity:e.generationIdentity,pid:e.pid,...n?{processIdentity:n}:{},acquiredAt:e.acquiredAt}}function fe(t,e){if(!e.isProcessAlive(t.pid))return!1;if(!t.processIdentity)return!0;let n=e.readProcessIdentity(t.pid);return n===null||L(t.processIdentity,n)}function $(t){try{let e=JSON.parse(u(c(p(t),"state.json"),"SQLite generation state"));return he(e)?e:null}catch{return null}}function me(t,e){return pe(p(t),e)}function pe(t,e){try{let n=JSON.parse(u(c(t,e,se),"SQLite generation manifest"));return Re(n,e)?n:null}catch{return null}}function ye(t){let e=$(t.dbPath);if(e){let n=be(t,e.currentGeneration);if(n)return n;if(e.artifactSet==="immutable-v1")throw new Error(`Published SQLite generation ${e.currentGeneration} is missing or invalid.`)}if(m(c(S(t.dbPath),"index.lock")))throw new Error("Legacy SQLite publication is in progress; retry after the reindex lock is released.");return Se(t,e?.currentGeneration)}function Je(t){let e=$(t);if(e)return e.currentGeneration;try{let n=c(S(t),"meta.json"),r=m(n)?u(n,"reindex metadata"):void 0;return O(t,r)}catch{return null}}function ge(t){return E(w(t))??t}function be(t,e){try{let n=c(p(t.dbPath),e),r=me(t.dbPath,e);if(!r)return null;let i=I(n,r.database),o=r.index?I(n,r.index):void 0,a=r.metadata?I(n,r.metadata):void 0;return!P(i,r.database)||r.index&&(!o||!P(o,r.index))||r.metadata&&(!a||!P(a,r.metadata))?null:{identity:e,databasePath:i,...o?{indexPath:o}:{},...a?{metadataPath:a,metadataRaw:u(a,"reindex metadata")}:{},source:"immutable"}}catch{return null}}function Se(t,e){let n=j(t.dbPath),r=c(S(t.dbPath),"meta.json"),i=m(r)?u(r,"reindex metadata"):void 0,o=m(t.indexPath)?t.indexPath:void 0;return{identity:e??O(t.dbPath,i),databasePath:t.dbPath,...o?{indexPath:o}:{},...i===void 0?{}:{metadataPath:r,metadataRaw:i},source:"legacy",databaseFileIdentity:n}}function O(t,e){let n=Z("sha256").update("sqlite-generation-legacy-v1\0");return e!==void 0&&n.update(ge(e)),n.update(`\0${j(t)}`),n.digest("hex")}function j(t){let e=C(t);return`${e.dev}:${e.ino}:${e.size}:${e.mtimeMs}`}function I(t,e){if(re(e.file)!==e.file||e.file==="."||e.file==="..")throw new Error("SQLite generation manifest contains an unsafe artifact path");return c(t,e.file)}function P(t,e){if(!m(t))return!1;let n=T(t);if(!n||n.size!==e.size)return!1;let r=`${t}\0${e.sha256}\0${n.identity}`;if(g.has(r))return!0;let i=M(t,{inputKind:"immutable SQLite generation artifact",maxBytes:e.size}),o=T(t);if(!o||o.identity!==n.identity||i!==e.sha256)return!1;for(g.set(r,!0);g.size>le;){let a=g.keys().next().value;if(a===void 0)break;g.delete(a)}return!0}function T(t){let e=C(t,{bigint:!0});return e.isFile()?{identity:`${e.dev}:${e.ino}:${e.size}:${e.mtimeNs}:${e.ctimeNs}`,size:Number(e.size)}:null}function Re(t,e){return t.version===oe&&t.identity===e&&x(t.database)&&(t.index===void 0||x(t.index))&&(t.metadata===void 0||x(t.metadata))}function x(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.file=="string"&&!!e.file&&Number.isSafeInteger(e.size)&&(e.size??-1)>=0&&typeof e.sha256=="string"&&/^[a-f0-9]{64}$/.test(e.sha256)}function he(t){return t.version===ie&&typeof t.currentGeneration=="string"&&!!t.currentGeneration&&typeof t.publishedAt=="string"&&Number.isFinite(Date.parse(t.publishedAt))&&(t.artifactSet===void 0||t.artifactSet==="immutable-v1")&&Ie(t.stableMirrors)&&Pe(t.previousGeneration)&&xe(t.publication)}function Ie(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t;return typeof e.databaseFileIdentity=="string"&&!!e.databaseFileIdentity&&(e.indexFileIdentity===void 0||typeof e.indexFileIdentity=="string"&&!!e.indexFileIdentity)}function Pe(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t;return typeof e.generationIdentity=="string"&&!!e.generationIdentity&&typeof e.databasePath=="string"&&!!e.databasePath&&(e.metadataPath===void 0||typeof e.metadataPath=="string"&&!!e.metadataPath)}function xe(t){if(t===void 0)return!0;if(!t||typeof t!="object")return!1;let e=t,n=[e.converterDurationMs,e.affectedDocumentCount,e.changedDocumentCount,e.producerDurationMs,e.materializationDurationMs,e.patchDurationMs].filter(r=>r!==void 0);return(e.mode==="incremental"||e.mode==="full")&&e.validation==="passed"&&e.converterDurationMs!==void 0&&n.every(r=>typeof r=="number"&&Number.isFinite(r)&&r>=0)&&(e.scipCompanion===void 0||e.scipCompanion==="current"||e.scipCompanion==="deferred")&&(e.typescriptOverlayGeneration===void 0||typeof e.typescriptOverlayGeneration=="string"&&!!e.typescriptOverlayGeneration)&&(e.scipCompanion!=="deferred"||!!e.typescriptOverlayGeneration)&&(e.fallbackReason===void 0||typeof e.fallbackReason=="string")}var Me=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function Ye(t){let e=t.toLowerCase();return Me.some(n=>e.endsWith(n))}import{createRequire as Ge}from"module";var Q=Ge(import.meta.url),b,R;function Le(){if(b!==void 0)return b;try{b=Q("ts-morph")}catch{b=null}return b}function Ze(){if(R)return R;let t=Le();if(!t)return"ts-morph:unavailable";let e="unknown";try{e=Q("ts-morph/package.json").version??"unknown"}catch{}return R=`ts-morph:${e}:typescript:${t.ts.version}`,R}function et(t,e){return e.map(n=>({tsconfigPath:n,project:new t.Project({tsConfigFilePath:n,skipFileDependencyResolution:!0})}))}function tt(t,e,n){return{language:"typescript",availability:()=>({available:!1,reason:t,tsconfigPath:e,tsconfigPaths:n}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}function rt(t,e){let n=new Map(t.map(i=>[i.symbol,i])),r=new Map(t.map(i=>[i.symbolId,[]]));for(let i of e.values())for(let o of i){let a=n.get(o.targetSymbol);a&&r.get(a.symbolId).push(o.location)}for(let[i,o]of r)r.set(i,qe(o));return r}function it(t,e,n){let r=B(t,e),i=B(t,n),o=[...r].filter(s=>!i.has(s)).sort(),a=[...i].filter(s=>!r.has(s)).sort(),l=z(t,e),d=z(t,n),f=[...l].filter(s=>!d.has(s)).sort(),y=[...d].filter(s=>!l.has(s)).sort();return{passed:o.length===0&&a.length===0,expectedCount:r.size,actualCount:i.size,missing:o,extra:a,callerFiles:{passed:f.length===0&&y.length===0,expectedCount:l.size,actualCount:d.size,missing:f,extra:y}}}function z(t,e){let n=new Set;for(let r of t)for(let i of e.get(r.symbolId)??[])i.file!==r.relativePath&&n.add(`${r.symbol}\0${i.file}`);return n}function ot(t,e,n){let r=new Set(n),i=new Map(n.map(o=>[o,[]]));for(let o of t)for(let a of e.get(o.symbolId)??[])r.has(a.file)&&i.get(a.file).push({targetSymbol:o.symbol,location:a});for(let[o,a]of i)i.set(o,we(a));return i}function B(t,e){let n=new Set;for(let r of t)for(let i of e.get(r.symbolId)??[])n.add(`${r.symbol}\0${i.file}\0${i.line}\0${i.column}`);return n}function qe(t){let e=new Map;for(let n of t)e.set(`${n.file}\0${n.line}\0${n.column}`,n);return[...e.values()].sort(H)}function we(t){let e=new Map;for(let n of t){let{location:r}=n;e.set(`${n.targetSymbol}\0${r.file}\0${r.line}\0${r.column}`,n)}return[...e.values()].sort((n,r)=>n.targetSymbol.localeCompare(r.targetSymbol)||H(n.location,r.location))}function H(t,e){return t.file.localeCompare(e.file)||t.line-e.line||t.column-e.column}export{K as a,Ee as b,Te as c,h as d,ie as e,oe as f,ae as g,se as h,p as i,de as j,Ve as k,Ke as l,$ as m,me as n,pe as o,ye as p,Je as q,ge as r,j as s,Me as t,Ye as u,Le as v,Ze as w,et as x,tt as y,rt as z,it as A,ot as B};
|
|
2
|
-
//# sourceMappingURL=chunk-SF7X6QNW.js.map
|