scip-query 0.19.4 → 0.19.6
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 +75 -1
- package/README.md +242 -49
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-2YU7I3QO.js → chunk-24QNP7MN.js} +2 -2
- package/dist/{chunk-CNKAGUPL.js → chunk-26X7KCJR.js} +2 -2
- package/dist/{chunk-GPBBJ5Y4.js → chunk-273W2U4Y.js} +3 -3
- package/dist/{chunk-7GXM52MI.js → chunk-2CVXCGL4.js} +2 -2
- package/dist/{chunk-ABMYA4TN.js → chunk-2EZSOTSY.js} +2 -2
- package/dist/{chunk-HKEHS2AS.js → chunk-2GSQR6YA.js} +2 -2
- package/dist/{chunk-FECYOO5O.js → chunk-2OXVAGGT.js} +2 -2
- package/dist/chunk-2ZOCHAL2.js +8 -0
- package/dist/{chunk-QGXBRIM5.js → chunk-336DC5NJ.js} +2 -2
- package/dist/chunk-35SQLYCQ.js +2 -0
- package/dist/{chunk-VXQNNXJE.js → chunk-3OIKRYU5.js} +2 -2
- package/dist/{chunk-52ZYCAEO.js → chunk-47X75ZKH.js} +2 -2
- package/dist/{chunk-NPKYOIFM.js → chunk-4CGVLUDP.js} +2 -2
- package/dist/chunk-4RI4BJGT.js +8 -0
- package/dist/{chunk-P2PC2WGR.js → chunk-52HQTTPB.js} +2 -2
- package/dist/{chunk-YNRNA5LK.js → chunk-5OC3HWP5.js} +2 -2
- package/dist/{chunk-STOL2BTL.js → chunk-6XFC7PQ5.js} +2 -2
- package/dist/{chunk-J77UIT3I.js → chunk-6XHTISLI.js} +2 -2
- package/dist/chunk-6YTSKJJ3.js +2 -0
- package/dist/{chunk-BTEE5NZQ.js → chunk-7E3TH5ZN.js} +2 -2
- package/dist/{chunk-X6D5IC6I.js → chunk-7LABSJSR.js} +2 -2
- package/dist/chunk-7Q6VYYCH.js +2 -0
- package/dist/{chunk-FWUUZTIO.js → chunk-A43URCQ3.js} +2 -2
- package/dist/chunk-A63U2W3P.js +3 -0
- package/dist/{chunk-3MJ5YA4Y.js → chunk-ADFSIJP2.js} +2 -2
- package/dist/chunk-AOLE4DYM.js +6 -0
- package/dist/chunk-APMMR5Y2.js +2 -0
- package/dist/chunk-B5MHCHP3.js +107 -0
- package/dist/{chunk-4RSI5EMG.js → chunk-CSTYYXKC.js} +2 -2
- package/dist/{chunk-25LPM4DG.js → chunk-CYJM7CYF.js} +2 -2
- package/dist/{chunk-S44IULR6.js → chunk-DD5BOU5I.js} +2 -2
- package/dist/{chunk-YGAGTIDK.js → chunk-DGMCFMPG.js} +7 -7
- package/dist/{chunk-UOAV44HR.js → chunk-E2ZXPB7J.js} +2 -2
- package/dist/{chunk-IZKFSVBV.js → chunk-EVOC5I5I.js} +2 -2
- package/dist/{chunk-XTX6QHOF.js → chunk-F42A3AKG.js} +2 -2
- package/dist/{chunk-Q4IIEGXJ.js → chunk-FHCTEANE.js} +2 -2
- package/dist/{chunk-3SVWW4PN.js → chunk-FKGN4A4E.js} +2 -2
- package/dist/{chunk-IG7N5ZIK.js → chunk-FQTPPXNA.js} +2 -2
- package/dist/{chunk-F6O7AAC3.js → chunk-G4UQL4CP.js} +2 -2
- package/dist/chunk-GA64UPMI.js +6 -0
- package/dist/{chunk-ZXJYMGD3.js → chunk-GK3GRUJX.js} +2 -2
- package/dist/chunk-HEBAY673.js +2 -0
- package/dist/chunk-HELS7KFF.js +2 -0
- package/dist/{chunk-B5NLK2B3.js → chunk-IPDCSB6N.js} +2 -2
- package/dist/{chunk-M7MTH5NR.js → chunk-IYAOX36F.js} +2 -2
- package/dist/{chunk-YVVCVR2L.js → chunk-J7VT2CRB.js} +2 -2
- package/dist/{chunk-4333ETTV.js → chunk-JELJLXEE.js} +2 -2
- package/dist/{chunk-LBMJEAEW.js → chunk-JERWGHQT.js} +2 -2
- package/dist/chunk-JJJCO4QC.js +945 -0
- package/dist/{chunk-6E7UTQY7.js → chunk-JZNLMHWY.js} +2 -2
- package/dist/{chunk-R4FQGQ4X.js → chunk-K42M2KWT.js} +2 -2
- package/dist/{chunk-H7UKLTWJ.js → chunk-KLVJABXA.js} +2 -2
- package/dist/chunk-KP4KBDVF.js +3 -0
- package/dist/{chunk-RV2FQIX3.js → chunk-LMFVTUW2.js} +2 -2
- package/dist/chunk-LRTP3DKL.js +3 -0
- package/dist/{chunk-U6WNH5GC.js → chunk-MGBJHRFB.js} +2 -2
- package/dist/{chunk-QDV6RDCP.js → chunk-MLGTCX56.js} +2 -2
- package/dist/{chunk-54HA4ZXH.js → chunk-N3SE646F.js} +2 -2
- package/dist/{chunk-KP6XRY5Z.js → chunk-NBRUH7OE.js} +2 -2
- package/dist/{chunk-M7AIS73L.js → chunk-NN4ZIRPK.js} +2 -2
- package/dist/{chunk-I5RJM53C.js → chunk-NQLSSVOB.js} +2 -2
- package/dist/{chunk-4SALD7RU.js → chunk-OBKDTVZ3.js} +2 -2
- package/dist/{chunk-GBQ5NYPR.js → chunk-OHWZKLVA.js} +6 -6
- package/dist/{chunk-6NSFJYRC.js → chunk-OP3MTFJR.js} +2 -2
- package/dist/{chunk-EOOJGLDU.js → chunk-OQ2A4G2G.js} +2 -2
- package/dist/{chunk-DLWR3NUU.js → chunk-P6HBYNBE.js} +2 -2
- package/dist/{chunk-QVWS2VWZ.js → chunk-PC44K7RF.js} +2 -2
- package/dist/{chunk-A2EZV2UM.js → chunk-QBYYWGAT.js} +2 -2
- package/dist/{chunk-QRGV2F7L.js → chunk-QHKUY4FW.js} +2 -2
- package/dist/chunk-QHRL4LKM.js +2 -0
- package/dist/{chunk-I5AWSI2G.js → chunk-QQWOFXNW.js} +2 -2
- package/dist/{chunk-WQTAC523.js → chunk-RBFFD4V2.js} +2 -2
- package/dist/{chunk-SOAT6NLA.js → chunk-RJHCPSZ7.js} +2 -2
- package/dist/{chunk-VGRICIQI.js → chunk-RWRLUZ6U.js} +2 -2
- package/dist/{chunk-4T3LTWUS.js → chunk-S2GP3CU3.js} +2 -2
- package/dist/{chunk-HEXVUYFQ.js → chunk-SHKZ7OVJ.js} +2 -2
- package/dist/{chunk-NSS46APD.js → chunk-TFUU5MQQ.js} +2 -2
- package/dist/{chunk-IUFDSKGG.js → chunk-TYQ76QHQ.js} +2 -2
- package/dist/{chunk-NRCXJDHL.js → chunk-U5CNPPTZ.js} +2 -2
- package/dist/{chunk-MITTUCEH.js → chunk-UQK5CRUK.js} +2 -2
- package/dist/{chunk-XLTP42QA.js → chunk-UUJBLG6J.js} +2 -2
- package/dist/chunk-UXP636P5.js +144 -0
- package/dist/{chunk-64RFXJT5.js → chunk-VEVBIAOJ.js} +6 -6
- package/dist/chunk-VKRQDBW5.js +9 -0
- package/dist/{chunk-C7NIYIQ4.js → chunk-VOQFGC2W.js} +4 -4
- package/dist/{chunk-DZ74OMG6.js → chunk-VP542C25.js} +2 -2
- package/dist/{chunk-Q3AFUTGB.js → chunk-WMXRRBII.js} +2 -2
- package/dist/{chunk-ZGZUZ7XE.js → chunk-WXAAURU7.js} +2 -2
- package/dist/chunk-X3NLZHPA.js +20 -0
- package/dist/{chunk-WER3B7MI.js → chunk-XF3KLXN3.js} +2 -2
- package/dist/{chunk-NH5ALKPW.js → chunk-XVJ3V7LM.js} +2 -2
- package/dist/{chunk-4XTA5OMB.js → chunk-YGQN3XGZ.js} +2 -2
- package/dist/{chunk-CFMXJPHH.js → chunk-YHXBD52M.js} +2 -2
- package/dist/{chunk-7B3UPBVA.js → chunk-YLVE3SXZ.js} +2 -2
- package/dist/{chunk-YIJ7ZAA4.js → chunk-YTUD45PU.js} +2 -2
- package/dist/{chunk-VTKGCT3V.js → chunk-YWB2EBNB.js} +2 -2
- package/dist/{chunk-UKZBVX4U.js → chunk-Z2LHPIOM.js} +2 -2
- package/dist/chunk-Z5QQPJ3U.js +30 -0
- package/dist/{chunk-NZL2DBT7.js → chunk-ZLJLE6LK.js} +2 -2
- package/dist/{chunk-XYADIZHU.js → chunk-ZTTISZ7J.js} +2 -2
- package/dist/cli.js +3 -3
- package/dist/command-descriptors-SJDZ7QGR.js +617 -0
- package/dist/{config-types-D20KuvvZ.d.ts → config-types-BWQ5xPGI.d.ts} +4 -0
- package/dist/{db-G_II8yXU.d.ts → db-B0r1o7Vt.d.ts} +18 -1
- package/dist/direct-navigation-HTKOZEOM.js +3 -0
- package/dist/{health-oblXYgkF.d.ts → health-CFnlCiTz.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/postinstall.js +1 -1
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.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 +2 -2
- 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 +2 -2
- package/dist/queries/complexity.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 +3 -3
- 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/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-gate.d.ts +30 -2
- package/dist/queries/diff-gate.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/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/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 +17 -3
- 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 +3 -3
- 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/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/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/stats.js +1 -1
- 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.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 +3 -3
- 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/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/reindex-worker.js +23 -24
- package/dist/reindex.d.ts +10 -4
- package/dist/reindex.js +33 -38
- package/dist/runtime.d.ts +167 -11
- package/dist/runtime.js +3 -2
- 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-kRpaexVJ.d.ts → scip-cli-DCvnlZCu.d.ts} +5 -1
- package/dist/watch-server.js +5 -5
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/AI_FAILURE_MODES.md +18 -18
- package/docs/API_EVOLUTION.md +71 -0
- package/docs/CLI_JSON_OUTPUT.md +83 -0
- package/docs/COMMAND_REFERENCE.md +10 -8
- package/docs/COMMITTED_RECORD_COMPATIBILITY.md +117 -0
- package/docs/CONFIGURATION_WRITE_SAFETY.md +130 -0
- package/docs/DETECTOR_GUIDE.md +47 -47
- package/docs/DURABILITY.md +103 -0
- package/docs/INDEX_GENERATIONS.md +121 -0
- package/docs/LOCK_PROTOCOL.md +133 -0
- package/docs/MAILBOX_LIFECYCLE.md +197 -0
- package/docs/REINDEX_METADATA_COMPATIBILITY.md +84 -0
- package/docs/RUST_DURABLE_SESSION_PROTOCOL.md +126 -0
- package/docs/TELEMETRY_RETENTION.md +72 -0
- package/docs/TIME_SEMANTICS.md +77 -0
- package/docs/WATCH_REFRESH_REQUESTS.md +110 -0
- package/docs/WINDOWS_SIDECAR_RELEASE.md +298 -0
- package/docs/analyzer-validation-ledger.md +24 -23
- package/docs/schemas/cli-json-envelope.schema.json +53 -0
- package/docs/schemas/npm-release-state.schema.json +146 -0
- package/docs/schemas/outcome-event-record.schema.json +39 -0
- package/docs/schemas/project-config.schema.json +247 -0
- package/docs/schemas/suppression-record.schema.json +31 -0
- package/docs/schemas/windows-sidecar-provenance.schema.json +137 -0
- package/package.json +15 -5
- package/scripts/build-scip-windows.mjs +180 -61
- package/scripts/scip-windows-provenance.mjs +364 -0
- package/scripts/verify-scip-windows.mjs +29 -0
- package/skills/_shared/SKILL.md +91 -242
- package/skills/_shared/agents/openai.yaml +1 -1
- package/skills/_shared/references/agent-contract-catalog.md +105 -0
- package/skills/_shared/references/command-catalog.md +118 -0
- package/skills/_shared/references/detector-precision-and-diffgate.md +59 -0
- package/skills/_shared/references/evidence-and-dead-code.md +25 -0
- package/skills/scip-audit/SKILL.md +76 -0
- package/skills/scip-audit/agents/openai.yaml +4 -0
- package/skills/scip-audit/references/claims.md +98 -0
- package/skills/scip-audit/references/cleanup.md +101 -0
- package/skills/scip-audit/references/directory.md +222 -0
- package/skills/scip-audit/references/frontend.md +130 -0
- package/skills/scip-audit/references/integrity.md +154 -0
- package/skills/scip-audit/references/maintainability.md +162 -0
- package/skills/scip-audit/references/twin-drift.md +104 -0
- package/skills/scip-diagnose/SKILL.md +52 -0
- package/skills/scip-diagnose/agents/openai.yaml +4 -0
- package/skills/scip-diagnose/references/debug.md +117 -0
- package/skills/{scip-probe-reachability/SKILL.md → scip-diagnose/references/probe-reachability.md} +12 -27
- package/skills/scip-diagnose/references/root-cause.md +145 -0
- package/skills/scip-diagnose/references/triage.md +119 -0
- package/skills/scip-explore/SKILL.md +53 -84
- package/skills/scip-explore/agents/openai.yaml +2 -2
- package/skills/scip-explore/references/diagrams.md +40 -0
- package/skills/scip-explore/references/language-playbook.md +49 -0
- package/skills/scip-improve/SKILL.md +56 -0
- package/skills/scip-improve/agents/openai.yaml +4 -0
- package/skills/scip-improve/references/cleanup-batches.md +53 -0
- package/skills/scip-improve/references/directory-moves.md +53 -0
- package/skills/scip-improve/references/doc-reconcile.md +30 -0
- package/skills/scip-improve/references/frontend-extraction.md +39 -0
- package/skills/scip-improve/references/maintainability-mechanism.md +43 -0
- package/skills/scip-improve/references/twin-drift.md +35 -0
- package/skills/scip-plan/SKILL.md +68 -0
- package/skills/scip-plan/agents/openai.yaml +4 -0
- package/skills/scip-plan/references/api-impact.md +19 -0
- package/skills/scip-plan/references/conductor.md +41 -0
- package/skills/scip-plan/references/high-assurance.md +43 -0
- package/skills/scip-plan/references/hyper-optimization.md +50 -0
- package/skills/scip-plan/references/tla-model.md +88 -0
- package/skills/scip-query/SKILL.md +52 -97
- package/skills/scip-query/agents/openai.yaml +2 -2
- package/skills/scip-setup/SKILL.md +65 -176
- package/skills/scip-setup/agents/openai.yaml +3 -3
- package/skills/scip-setup/references/bootstrap-workflow.md +120 -0
- package/skills/scip-setup/references/language-verification.md +61 -0
- package/skills/scip-setup/references/lifecycle-commands.md +119 -0
- package/skills/scip-setup/references/per-repo-triage.md +24 -0
- package/skills/scip-verify/SKILL.md +123 -70
- package/skills/scip-verify/agents/openai.yaml +2 -2
- package/skills/scip-verify/references/calibrate-detectors.md +170 -0
- package/dist/chunk-2CTX5CMX.js +0 -4
- package/dist/chunk-2Y373BDD.js +0 -2
- package/dist/chunk-C2QSK7E7.js +0 -2
- package/dist/chunk-D4U5Q3FT.js +0 -7
- package/dist/chunk-K2ERX4UT.js +0 -3
- package/dist/chunk-KHE7J5ZN.js +0 -3
- package/dist/chunk-L7SPDE73.js +0 -84
- package/dist/chunk-LHMNRHGV.js +0 -3
- package/dist/chunk-LM72NQ7T.js +0 -3
- package/dist/chunk-MSWVMDAH.js +0 -122
- package/dist/chunk-NH7WNNQC.js +0 -20
- package/dist/chunk-OMPZHGHO.js +0 -2
- package/dist/chunk-SVLTAG5O.js +0 -927
- package/dist/chunk-U7DSEKOM.js +0 -30
- package/dist/chunk-V27BEQJN.js +0 -7
- package/dist/chunk-VMNZB6WI.js +0 -4
- package/dist/chunk-XBN5VO53.js +0 -2
- package/dist/chunk-ZAIILQNP.js +0 -5
- package/dist/command-descriptors-MFU4BCJ7.js +0 -612
- package/dist/direct-navigation-MRMQFIRB.js +0 -3
- package/skills/scip-api-impact/SKILL.md +0 -139
- package/skills/scip-api-impact/agents/openai.yaml +0 -4
- package/skills/scip-calibrate/SKILL.md +0 -131
- package/skills/scip-calibrate/agents/openai.yaml +0 -4
- package/skills/scip-claim-audit/SKILL.md +0 -106
- package/skills/scip-claim-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-audit/SKILL.md +0 -126
- package/skills/scip-cleanup-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-improve/SKILL.md +0 -84
- package/skills/scip-cleanup-improve/agents/openai.yaml +0 -4
- package/skills/scip-concrete-plan/SKILL.md +0 -262
- package/skills/scip-concrete-plan/agents/openai.yaml +0 -4
- package/skills/scip-conductor/SKILL.md +0 -133
- package/skills/scip-conductor/agents/openai.yaml +0 -4
- package/skills/scip-debug/SKILL.md +0 -130
- package/skills/scip-debug/agents/openai.yaml +0 -4
- package/skills/scip-diagram/SKILL.md +0 -110
- package/skills/scip-diagram/agents/openai.yaml +0 -4
- package/skills/scip-directory-architecture/SKILL.md +0 -254
- package/skills/scip-directory-architecture/agents/openai.yaml +0 -4
- package/skills/scip-doc-reconcile/SKILL.md +0 -89
- package/skills/scip-doc-reconcile/agents/openai.yaml +0 -4
- package/skills/scip-hyper-optimization/SKILL.md +0 -156
- package/skills/scip-hyper-optimization/agents/openai.yaml +0 -4
- package/skills/scip-integrity-audit/SKILL.md +0 -152
- package/skills/scip-integrity-audit/agents/openai.yaml +0 -4
- package/skills/scip-language-playbook/SKILL.md +0 -106
- package/skills/scip-language-playbook/agents/openai.yaml +0 -4
- package/skills/scip-maintainability/SKILL.md +0 -158
- package/skills/scip-maintainability/agents/openai.yaml +0 -4
- package/skills/scip-probe-reachability/agents/openai.yaml +0 -4
- package/skills/scip-react-maintainability/SKILL.md +0 -101
- package/skills/scip-react-maintainability/agents/openai.yaml +0 -4
- package/skills/scip-root-cause/SKILL.md +0 -150
- package/skills/scip-root-cause/agents/openai.yaml +0 -4
- package/skills/scip-tla-model-system/SKILL.md +0 -148
- package/skills/scip-tla-model-system/agents/openai.yaml +0 -4
- package/skills/scip-triage-issue/SKILL.md +0 -126
- package/skills/scip-triage-issue/agents/openai.yaml +0 -4
- package/skills/scip-twin-drift/SKILL.md +0 -107
- package/skills/scip-twin-drift/agents/openai.yaml +0 -4
- package/skills/scip-vue-maintainability/SKILL.md +0 -107
- package/skills/scip-vue-maintainability/agents/openai.yaml +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as l}from"./chunk-
|
|
1
|
+
import{b as l}from"./chunk-N3SE646F.js";import{c as a}from"./chunk-XVJ3V7LM.js";import{d as i,g as n}from"./chunk-ZTTISZ7J.js";function _(e,r){let t=l(e,r);return t.length===0?[]:m([...d(e,t),...c(e,t)]).filter(o=>!e.isIgnored(o.relative_path)).map(u)}function d(e,r){let t=r.map(()=>"?").join(", ");return e.all(`SELECT DISTINCT d1.relative_path, gs.symbol
|
|
2
2
|
FROM mentions m
|
|
3
3
|
JOIN chunks c ON m.chunk_id = c.id
|
|
4
4
|
JOIN documents d1 ON c.document_id = d1.id
|
|
@@ -26,4 +26,4 @@ import{b as l}from"./chunk-54HA4ZXH.js";import{c as a}from"./chunk-NH5ALKPW.js";
|
|
|
26
26
|
AND ${e.localSymbolPredicate}
|
|
27
27
|
${e.pathExclusionsFor("d1")}
|
|
28
28
|
ORDER BY d1.relative_path`,...r,...r,...r)}function c(e,r){let t=new a(e);return r.flatMap(o=>t.definitionsForFile(o).filter(s=>n(s.symbol)).map(s=>({relative_path:o,symbol:s.symbol})))}function m(e){let r=new Set;return e.filter(t=>{let o=`${t.relative_path}|${t.symbol}`;return r.has(o)?!1:(r.add(o),!0)})}function u(e){return{consumer:e.relative_path,symbol:e.symbol,shortName:i(e.symbol)}}export{_ as a};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-CYJM7CYF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as H}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R,b as H}from"./chunk-MGBJHRFB.js";import{a as B,b,c as y,e as h,f as k}from"./chunk-B3X6KU75.js";import{a as p,b as g}from"./chunk-KMVGRIO2.js";import{N as v}from"./chunk-DGMCFMPG.js";function V(e,s={}){let{minSimilarity:m=.45,minSharedBehaviors:i=6,limit:o=20,scope:c,scanLimit:n,filePattern:d,focusFiles:f}=s,l=v(e).reactProfiles({scope:c,minBehaviorTokens:Math.max(3,i),scanLimit:n}).map(r=>({file:r.file,component:r.name,tokens:r.behaviorTokens,profile:r})),t=R(l,r=>r.tokens);return H({profiles:l,limit:o,filePattern:d,focusFiles:f,candidateIndex:t,profile:{name:"react-hook-candidates"},compare:(r,a)=>C(r,a,m,i),sort:(r,a)=>a.similarity-r.similarity||r.fileA.localeCompare(a.fileA)||r.componentA.localeCompare(a.componentA)||r.fileB.localeCompare(a.fileB)||r.componentB.localeCompare(a.componentB)})}function C(e,s,m,i){let o=p(e.tokens,s.tokens);if(o.size<i||!E(o))return null;let c=b(e.tokens,s.tokens);if(c<m)return null;let n=h(o,"hook:"),d=h(o,"react-hook:"),f=h(o,"effect:"),l=h(o,"state:"),t=h(o,"request:"),r=h(o,"handler:"),a=h(o,"handler-verb:"),u=A({sharedHooks:n,sharedReactHooks:d,sharedEffects:f,sharedState:l,sharedRequests:t,sharedHandlers:r,sharedHandlerVerbs:a});return{fileA:e.file,componentA:e.component,fileB:s.file,componentB:s.component,similarity:c,tokenCountA:e.tokens.size,tokenCountB:s.tokens.size,sharedTokens:k(o),sharedHooks:n,sharedReactHooks:d,sharedEffects:f,sharedState:l,sharedRequests:t,sharedHandlers:r,sharedHandlerVerbs:a,evidenceClass:u.evidenceClass,actionTier:u.actionTier,evidenceClassReasons:u.reasons,recommendation:u.recommendation,uniqueToA:k(g(e.tokens,s.tokens)).slice(0,25),uniqueToB:k(g(s.tokens,e.tokens)).slice(0,25),reason:P({sharedHooks:n,sharedReactHooks:d,sharedEffects:f,sharedState:l,sharedRequests:t,sharedHandlers:r,sharedHandlerVerbs:a}),locA:e.profile.loc,locB:s.profile.loc}}function A(e){return B({genericWords:q,stripPrefixes:w,primitiveGroups:[{values:e.sharedReactHooks,reasonPrefix:"shared React primitives",bucket:"generic"},{values:e.sharedEffects,reasonPrefix:"shared lifecycle primitive",bucket:"generic"}],nameGroups:[{names:e.sharedHooks,label:"shared hook",fallbackBucket:"shared-abstraction"},{names:e.sharedRequests,label:"shared request",fallbackBucket:"generic"},{names:e.sharedState,label:"shared state",fallbackBucket:"generic"},{names:e.sharedHandlers,label:"shared handler",fallbackBucket:"generic"},{names:e.sharedHandlerVerbs,label:"shared action verb",fallbackBucket:"generic"}],recommendation:S})}function S(e){switch(e){case"domain-behavior":return"Review for a shared hook, controller, or feature module around the named domain behavior.";case"mixed":return"Separate generic React mechanics from domain-specific behavior before extracting a shared hook.";case"shared-abstraction":return"Review the existing shared hook usage first; extract only if duplicated behavior remains outside it.";case"generic-workflow-scaffolding":return"Treat as support evidence for a repeated workflow shape, not direct hook-extraction evidence."}}function E(e){let s=0,m=0,i=0,o=0,c=0,n=0,d=0;for(let t of e)t.startsWith("hook:")?s+=1:t.startsWith("react-hook:")?m+=1:t.startsWith("effect:")?i+=1:t.startsWith("request:")?o+=1:t.startsWith("handler:")||t.startsWith("handler-verb:")?c+=1:t.startsWith("state:")?n+=1:t.startsWith("state-hook:")&&(d+=1);let f=n+d,l=s+m+i+o+c+f;return y([{name:"requests",count:o},{name:"customHooks",count:s},{name:"namedStates",count:n},{name:"handlers",count:c},{name:"effects",count:i},{name:"reactHooks",count:m},{name:"namedBehavior",count:l}],[{min:{requests:1,namedBehavior:4},reason:"shared request workflow"},{min:{customHooks:1,requests:1,namedBehavior:5},reason:"shared custom hook and request workflow"},{min:{customHooks:1,namedStates:1,namedBehavior:5},reason:"shared custom hook and state"},{min:{customHooks:1,handlers:2,namedBehavior:5},reason:"shared custom hook and handlers"},{min:{namedStates:1,handlers:2,effects:1,namedBehavior:5},reason:"shared stateful effects"},{min:{namedStates:1,handlers:2,reactHooks:2,namedBehavior:5},reason:"shared stateful React primitives"}]).pass}function P(e){let s=[];return e.sharedHooks.length&&s.push(`shared hooks: ${e.sharedHooks.join(", ")}`),e.sharedReactHooks.length&&s.push(`shared React hooks: ${e.sharedReactHooks.join(", ")}`),e.sharedEffects.length&&s.push(`shared effects: ${e.sharedEffects.join(", ")}`),e.sharedState.length&&s.push(`shared state: ${e.sharedState.join(", ")}`),e.sharedRequests.length&&s.push(`shared requests: ${e.sharedRequests.join(", ")}`),e.sharedHandlers.length&&s.push(`shared handlers: ${e.sharedHandlers.slice(0,6).join(", ")}`),e.sharedHandlerVerbs.length&&s.push(`shared action verbs: ${e.sharedHandlerVerbs.slice(0,6).join(", ")}`),s.join("; ")||"shared React behavior profile"}var q=new Set(["add","apply","async","callback","cancel","change","clear","close","create","data","delete","draft","edit","effect","error","fetch","filter","form","handle","has","is","item","items","load","loader","loading","memo","name","open","reducer","refresh","ref","remove","request","reset","resource","row","rows","save","saving","search","select","selected","state","store","submit","toggle","update","use","value"]),w=[/^use(?=[A-Z])/,/^handle(?=[A-Z])/,/^is(?=[A-Z])/,/^has(?=[A-Z])/];export{V as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DD5BOU5I.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`).length}function pe(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let o;try{o=
|
|
1
|
+
import{E as Fe,G as Pe,H as g,I as Ee,l as B,m as M,n as L,o as ke,p as Te,q as _e,x as Le,y}from"./chunk-B5MHCHP3.js";import{a as q}from"./chunk-64MNV6AB.js";import{isAbsolute as jt,relative as Vt}from"path";function we(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function v(e){return e.replace(/\\/g,"/")}function Io(e,t){return we(e)===we(t)}function Bo(e,t){let n=Vt(e,t);return n===""||!n.startsWith("..")&&!jt(n)}import{existsSync as ce,readFileSync as le,readdirSync as It,statSync as Bt}from"fs";import{join as w,relative as $t}from"path";function Ae(e){let t=Ot(e)??zt(e);if(!t||t.length===0)return[];let n=[],r=new Set;for(let o of t)for(let s of Mt(e,o)){if(r.has(s))continue;r.add(s);let i=qt(e,s);i&&n.push(i)}return n}function Ot(e){let t=w(e,"pnpm-workspace.yaml");if(!ce(t))return null;try{return Dt(le(t,"utf8"))}catch{return null}}function Dt(e){let t=[],n=!1;for(let r of e.split(/\r?\n/)){let o=Wt(r);if(!n){/^packages\s*:\s*$/.test(o.trim())&&(n=!0);continue}let s=/^\s+-\s*(.+)$/.exec(o);if(s){let i=Ut(s[1].trim());i&&t.push(i);continue}if(o.trim()!=="")break}return t}function Wt(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function Ut(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function zt(e){let t=w(e,"package.json");if(!ce(t))return null;try{let n=JSON.parse(le(t,"utf8"));return n.workspaces?Array.isArray(n.workspaces)?n.workspaces:n.workspaces.packages??[]:null}catch{return null}}function Mt(e,t){if(!t||t.startsWith("!")||t.includes("node_modules"))return[];if(!t.includes("*")){let i=w(e,t);return ae(i)?[i]:[]}let n=t.indexOf("*"),r=t.slice(0,n).replace(/\/$/,""),o=t.slice(n+1).replace(/^\//,""),s=w(e,r||".");return ae(s)?It(s).map(i=>w(s,i,o)).filter(ae):[]}function ae(e){try{return Bt(e).isDirectory()}catch{return!1}}function qt(e,t){let n=w(t,"package.json");if(!ce(n))return null;try{let r=JSON.parse(le(n,"utf8"));return typeof r.name!="string"||r.name.length===0?null:{name:r.name,relativeDir:$t(e,t).replace(/\\/g,"/"),exports:r.exports}}catch{return null}}import{extname as Re}from"path";var Xt={".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 X(e){return Xt[Re(e).toLowerCase()]??null}function je(e){return Re(e).toLowerCase()===".vue"}import{createRequire as Ht}from"module";var d=Ht(import.meta.url),H=null,Ve=!1;function Jt(){if(Ve)return null;if(H)return H;try{return H=d("tree-sitter"),H}catch{return Ve=!0,null}}var Ie=new Map,J=new Set;function Zt(e){if(J.has(e))return null;let t=Ie.get(e);if(t)return t;let n;try{switch(e){case"rust":n=d("tree-sitter-rust");break;case"typescript":n=d("tree-sitter-typescript").typescript;break;case"tsx":n=d("tree-sitter-typescript").tsx;break;case"javascript":n=d("tree-sitter-javascript");break;case"python":n=d("tree-sitter-python");break;case"java":n=d("tree-sitter-java");break;case"kotlin":n=d("tree-sitter-kotlin");break;case"scala":n=d("tree-sitter-scala");break;case"ruby":n=d("tree-sitter-ruby");break;case"c":n=d("tree-sitter-c");break;case"cpp":n=d("tree-sitter-cpp");break;case"csharp":n=d("tree-sitter-c-sharp");break;case"php":n=d("tree-sitter-php").php;break;case"vb":{let r=d("tree-sitter-vb-dotnet");n=r.language??r;break}case"clojure":return J.add(e),null}}catch{return J.add(e),null}return Ie.set(e,n),n}var Be=new Map;function Gt(e){let t=Be.get(e);if(t)return t;let n=Zt(e);if(!n)return null;let r=Jt();if(!r)return null;let o=new r;try{o.setLanguage(n)}catch{return J.add(e),null}return Be.set(e,o),o}function Kt(e,t){return e.parse(r=>r>=t.length?null:t.slice(r,Math.min(t.length,r+16384)))}function $(e,t){let n=Gt(e);if(!n)return null;try{return Kt(n,t)}catch{return null}}import{posix as ue}from"path";import{parse as Qt}from"@vue/compiler-sfc";var Yt=L("vue-sfc-units");function A(e,t){let n=De(t),r=g(e,n);return Yt.get(e,n,r,()=>pe(e,n,r))}function De(e){return e.replace(/\\/g,"/").replace(/^\.\//,"")}function en(e){let t=e?.toLowerCase();return!t||t==="js"||t==="javascript"||t==="jsx"?"javascript":t==="ts"||t==="typescript"?"typescript":t==="tsx"?"tsx":null}function F(e){return!e||e.body.length===0?0:e.body.split(`
|
|
2
|
+
`).length}function pe(e,t,n){let r={relativePath:t,template:null,scripts:[],styles:[],customBlocks:[],errors:[]};if(!n)return r;let o;try{o=Qt(n,{filename:t})}catch(i){return r.errors.push(Oe(i)),r}r.errors.push(...o.errors.map(Oe));let{descriptor:s}=o;return s.template&&(r.template=Z(e,t,"template",s.template)),s.script&&r.scripts.push($e(e,t,s.script,!1)),s.scriptSetup&&r.scripts.push($e(e,t,s.scriptSetup,!0)),r.styles=s.styles.map(i=>Z(e,t,"style",i)),r.customBlocks=s.customBlocks.map(i=>Z(e,t,"custom",i)),r.errors.push(...[r.template,...r.scripts,...r.styles,...r.customBlocks].flatMap(i=>i?.errors??[])),r}function $e(e,t,n,r){let o=Z(e,t,"script",n);return{...o,kind:"script",setup:r,astLanguage:en(o.lang)}}function Z(e,t,n,r){let o=nn(r.attrs),s=typeof o.lang=="string"?o.lang:null,i=typeof o.src=="string"?o.src:typeof r.src=="string"?r.src:void 0;if(i){let c=tn(t,i);if(!c)return{kind:n,ownerPath:t,sourcePath:t,external:!0,src:i,attrs:o,lang:s,body:"",startLine:0,endLine:0,errors:[`Could not resolve Vue ${n} block source: ${i}`]};let l=g(e,c),f=l?Math.max(0,l.split(`
|
|
3
3
|
`).length-1):0;return{kind:n,ownerPath:t,sourcePath:c,external:!0,src:i,attrs:o,lang:s,body:l,startLine:0,endLine:f,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:o,lang:s,body:r.content,startLine:a,endLine:Math.max(a,r.loc.end.line-1),errors:[]}}function tn(e,t){let n=t.split(/[?#]/,1)[0];if(!n||n.startsWith("/")||n.includes("://"))return null;let r=De(ue.normalize(ue.join(ue.dirname(e),n)));return r===".."||r.startsWith("../")?null:r}function nn(e){return{...e}}function Oe(e){return e instanceof Error?e.message:String(e)}function We(e,t,n){let o=pe(e,t,n).scripts.filter(i=>i.astLanguage&&i.body.length>0),s=o[0]?.astLanguage;return s?{body:o.map(i=>`${`
|
|
4
4
|
`.repeat(i.startLine)}${i.body}`).join(`
|
|
5
5
|
`),startLine:0,language:s}:null}var Ue=ke("ast-trees",{clearGroups:["whole-project","source-file"]});function ze(e,t){if(je(t))return rn(e,t);let n=X(t);if(!n)return null;let r=g(e,t);return r?Ue.get(e,t,r,()=>$(n,r)):null}function rn(e,t){let n=g(e,t);return n?Ue.get(e,t,n,()=>{let r=We(e,t,n);if(!r)return null;let o=`
|
|
6
|
-
`.repeat(r.startLine)+r.body;return $(r.language,o)}):null}import{readdirSync as on}from"fs";import{execFileSync as sn}from"child_process";import{extname as G,join as an}from"path";var cn=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".clj",".cljs",".cljc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],us=[".vue"],Me=[".tsx",".jsx"],qe=[".vue"],ln=[...Me,...qe],un=new Set(Me),pn=new Set(qe),Xe=new Set(cn.map(e=>e.toLowerCase())),fn=[...Xe].sort().join(","),He=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);function O(e,t={}){let n=t.includeIndexed??!0,r=t.includeAuxiliary??!0,o=t.extensions?.map(c=>c.toLowerCase()),s=o?new Set(o):Xe,i=o?[...s].sort().join(","):fn,a=`${n?"1":"0"}|${r?"1":"0"}|${i}`;return mn.get(e,a,()=>{let c=new Set;if(n)for(let l of q(e,{includeIgnored:!1}))s.has(G(l).toLowerCase())&&c.add(l);if(r)for(let l of dn(e.config.projectRoot,s))e.isIgnored(l)||n&&c.has(l)||c.add(l);return[...c].sort()})}function ps(e,t={}){let n=!1,r=!1;for(let o of O(e,{extensions:ln})){if(t.scope&&!o.includes(t.scope))continue;let s=G(o).toLowerCase();if(n||=un.has(s),r||=pn.has(s),n&&r)break}return{react:n,vue:r}}var mn=
|
|
7
|
-
`)){let s=o.trim();s&&(hn(s)||t.has(G(s).toLowerCase())&&r.add(s))}return r}catch{return null}}function hn(e){return e.split("/").some(t=>He.has(t))}function Sn(e,t){let n=new Set,r=o=>{let s=o?an(e,o):e,i;try{i=on(s,{withFileTypes:!0})}catch{return}for(let a of i)if(!He.has(a.name)){if(a.isDirectory()){r(o?`${o}/${a.name}`:a.name);continue}t.has(G(a.name).toLowerCase())&&n.add(o?`${o}/${a.name}`:a.name)}};return r(""),n}import{extname as Nn}from"path";function K(e,t){let n=yn(e,t);if(!n)return null;let r=Q(n);return r?{calleeLeaf:r,memberAccess:xn(n),line:e.startPosition.row}:null}function yn(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 xn(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function Q(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"shorthand_property_identifier":return e.text;case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?Q(t):null}case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?Q(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?Q(t):null}case"super":case"self":case"this":return null;default:return null}}var vn=new Set(["children","className","data","e","err","error","ev","event","false","id","idx","index","item","key","null","props","res","result","state","style","true","undefined","val","value"]);function Y(e){return e.length<=2||vn.has(e)}var bn=[".tsx",".jsx"],Je=new Set(["useActionState","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useOptimistic","useReducer","useRef","useState","useSyncExternalStore","useTransition"]),Cn=new Set(["useEffect","useInsertionEffect","useLayoutEffect"]),kn=new Set(["useActionState","useOptimistic","useReducer","useRef","useState"]),Tn=new Set(["useLocation","useNavigate","useParams","useSearchParams","useTranslation"]),_n=new Set(["axios","fetch","gql","graphql","mutate","query","request","useMutation","useQuery","useSuspenseQuery"]),Ln=new Set(["add","apply","cancel","change","clear","close","create","delete","fetch","filter","handle","load","open","refresh","remove","render","reset","save","select","submit","toggle","update"]),Fn=new Set(["aria-hidden","className","clipRule","d","fill","fillRule","height","role","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","viewBox","width","xmlns"]),Pn=L("react-component-behavior-profiles"),Ze=Fe({kind:"react-component-behavior-profiles",invalidation:Pe("react-component-behavior-profiles"),serialize:Rn,deserialize:jn});function Ye(e,t={}){let n=O(e,{extensions:bn}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).flatMap(o=>me(e,o)).filter(o=>(t.minJsxTokens===void 0||o.jsxTokens.size>=t.minJsxTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function me(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return Pn.get(e,n,r,()=>En(e,n,r)).map(An)}function En(e,t,n){let r=_e(e,t,n),o=Ze.read(e,t,r);if(o)return o;let s=wn(e,t);return Ze.write(e,t,r,s),s}function wn(e,t){let n=Bn(t);if(!n)return[];let r=ze(e,t);if(!r)return[];let o=Ee(e,t).length;return In(r.rootNode,n).filter(i=>i.kind==="hook"||de(i.bodyNode)).map(i=>{let a=Mn(i.bodyNode),c=Zn(i.bodyNode,n);return{file:t,name:i.name,kind:i.kind,startLine:i.node.startPosition.row,endLine:i.node.endPosition.row,loc:Math.max(1,i.node.endPosition.row-i.node.startPosition.row+1),fileLines:o,jsxTokens:a.tokens,behaviorTokens:c.tokens,componentNames:C(a.componentNames),nativeTags:C(a.nativeTags),propNames:C(a.propNames),eventNames:C(a.eventNames),hookNames:C(c.hookNames),requestNames:C(c.requestNames),stateNames:C(c.stateNames),effectNames:C(c.effectNames),handlerNames:C(c.handlerNames)}})}function An(e){return{...e,jsxTokens:new Set(e.jsxTokens),behaviorTokens:new Set(e.behaviorTokens),componentNames:[...e.componentNames],nativeTags:[...e.nativeTags],propNames:[...e.propNames],eventNames:[...e.eventNames],hookNames:[...e.hookNames],requestNames:[...e.requestNames],stateNames:[...e.stateNames],effectNames:[...e.effectNames],handlerNames:[...e.handlerNames]}}function Rn(e){return JSON.stringify(e.map(t=>({...t,jsxTokens:[...t.jsxTokens],behaviorTokens:[...t.behaviorTokens]})))}function jn(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=[];for(let r of t){let o=Vn(r);if(!o)return null;n.push(o)}return n}catch{return null}}function Vn(e){if(!Le(e))return null;let{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:c,behaviorTokens:l,componentNames:f,nativeTags:u,propNames:N,eventNames:V,hookNames:se,requestNames:ie,stateNames:m,effectNames:b,handlerNames:B}=e;if(typeof t!="string"||typeof n!="string"||r!=="component"&&r!=="hook"||!ee(o)||!ee(s)||!ee(i)||!ee(a))return null;let S={jsxTokens:y(c),behaviorTokens:y(l),componentNames:y(f),nativeTags:y(u),propNames:y(N),eventNames:y(V),hookNames:y(se),requestNames:y(ie),stateNames:y(m),effectNames:y(b),handlerNames:y(B)};return Object.values(S).some(Rt=>Rt===null)?null:{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:new Set(S.jsxTokens),behaviorTokens:new Set(S.behaviorTokens),componentNames:S.componentNames,nativeTags:S.nativeTags,propNames:S.propNames,eventNames:S.eventNames,hookNames:S.hookNames,requestNames:S.requestNames,stateNames:S.stateNames,effectNames:S.effectNames,handlerNames:S.handlerNames}}function ee(e){return typeof e=="number"&&Number.isFinite(e)}function Bn(e){let t=Nn(e).toLowerCase();return t!==".tsx"&&t!==".jsx"?null:X(e)}function In(e,t){let n=[],r=new Set,o=s=>{let i=$n(s);if(i&&(!Un(s)||i.kind==="component")){let a=`${i.name}:${i.node.startIndex}:${i.node.endIndex}`;r.has(a)||(r.add(a),n.push(i))}for(let a of s.namedChildren)o(a)};return(t==="tsx"||t==="javascript")&&o(e),n}function $n(e){if(e.type==="class_declaration"){let s=fe(e);if(!s||!/^[A-Z]/.test(s))return null;let i=On(e);return!i||!Dn(e)&&!de(i)?null:{name:s,kind:"component",node:e,bodyNode:i}}if(e.type==="function_declaration"){let s=fe(e);return!s||!Ge(s)?null:{name:s,kind:Qe(s),node:e,bodyNode:e}}if(e.type!=="variable_declarator")return null;let t=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1),r=D(t);if(!r||!n||!Ge(r))return null;let o=Wn(n);return o?{name:r,kind:Qe(r),node:e,bodyNode:o}:null}function On(e){for(let t of e.namedChildren)if(t.type==="class_body")for(let n of t.namedChildren){if(n.type!=="method_definition")continue;if((n.childForFieldName("name")??n.namedChild(0))?.text==="render")return n}return null}function Dn(e){return/\b(?:React\.)?(?:Pure)?Component\b/.test(e.text)}function Ge(e){return/^[A-Z]/.test(e)||/^use[A-Z0-9_]/.test(e)}function Qe(e){return/^use[A-Z0-9_]/.test(e)?"hook":"component"}function Wn(e){if(e.type==="arrow_function"||e.type==="function_expression")return e;if(e.type!=="call_expression")return null;let t=zn(e);return t!=="memo"&&t!=="forwardRef"?null:e.namedChildren.find(o=>o.type==="arguments")?.namedChildren.find(o=>o.type==="arrow_function"||o.type==="function_expression")??null}function Un(e){let t=e.parent;for(;t;){if(t.type==="function_declaration"||t.type==="function_expression"||t.type==="arrow_function"||t.type==="method_definition")return!0;t=t.parent}return!1}function fe(e){return D(e.childForFieldName("name")??e.namedChild(0))}function zn(e){let t=e.childForFieldName("function")??e.namedChild(0);return t?t.text.split(".").pop()??t.text:null}function de(e){return e.type.startsWith("jsx_")?!0:e.namedChildren.some(de)}function Mn(e){let t={tokens:new Set,componentNames:new Set,nativeTags:new Set,propNames:new Set,eventNames:new Set},n=r=>{r.type==="jsx_opening_element"||r.type==="jsx_self_closing_element"?qn(r,t):r.type==="jsx_element"&&r.text.trimStart().startsWith("<>")?t.tokens.add("jsx:fragment"):r.type==="jsx_expression"?Xn(r,t):r.type==="jsx_fragment"&&t.tokens.add("jsx:fragment");for(let o of r.children)n(o)};return n(e),t}function qn(e,t){let n=Hn(e),r=!1;if(n){let o=Ke(n),s=o==="Fragment"||o==="React.Fragment";r=er(o)&&!s,s?t.tokens.add("jsx:fragment"):r?(t.componentNames.add(o),t.tokens.add(`component:${o}`)):(t.nativeTags.add(o),t.tokens.add(`native:${o}`))}for(let o of e.namedChildren)if(o.type==="jsx_attribute"){let s=Jn(o);if(!s)continue;let i=Ke(s);if(i.startsWith("on")&&i.length>2){let a=i.slice(2).replace(/^[A-Z]/,c=>c.toLowerCase());t.eventNames.add(a),t.tokens.add(`event:${a}`)}else Fn.has(i)||(t.propNames.add(i),t.tokens.add(`${r?"prop":"native-prop"}:${i}`))}else o.type==="jsx_spread_attribute"&&t.tokens.add(et(o))}function Xn(e,t){let n=e.text;/^\{\s*\.\.\./.test(n)&&t.tokens.add(et(e)),tt(e)&&t.tokens.add("jsx:conditional"),(n.includes(".map(")||n.includes(".flatMap("))&&t.tokens.add("jsx:list");for(let r of tr(n))Y(r)||t.tokens.add(`binding:${r}`)}function et(e){let t=/^\{\s*\.\.\.\s*([^}]+)\s*\}$/.exec(e.text)?.[1],n=e.namedChildren.find(s=>s.type!=="comment"),r=t??n?.text??"",o=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.exec(r.trim())?.[0];return o?`prop:spread:${o}`:"prop:spread"}function tt(e){return e.type==="ternary_expression"||e.type==="conditional_expression"?!0:e.namedChildren.some(tt)}function Hn(e){for(let t of e.namedChildren)if(t.type==="identifier"||t.type==="jsx_identifier"||t.type==="property_identifier"||t.type==="member_expression"||t.type==="jsx_member_expression")return t.text;return/^<\s*([A-Za-z][\w$.]*)/.exec(e.text)?.[1]??null}function Jn(e){for(let t of e.namedChildren)if(t.type==="property_identifier"||t.type==="identifier"||t.type==="jsx_identifier")return t.text;return/^([A-Za-z_$][\w$:-]*)/.exec(e.text)?.[1]??null}function Zn(e,t){let n={tokens:new Set,hookNames:new Set,requestNames:new Set,stateNames:new Set,effectNames:new Set,handlerNames:new Set},r=o=>{if(o.type==="call_expression"){let s=K(o,t);s&&Gn(s.calleeLeaf,n)}else if(o.type==="variable_declarator")Kn(o,n);else if(o.type==="function_declaration"){let s=fe(o);s&&nt(s,n)}for(let s of o.namedChildren)r(s)};return r(e),n}function Gn(e,t){/^use[A-Z0-9_]/.test(e)&&(t.hookNames.add(e),!Je.has(e)&&!Tn.has(e)&&t.tokens.add(`hook:${e}`)),Je.has(e)&&t.tokens.add(`react-hook:${e}`),Cn.has(e)&&(t.effectNames.add(e),t.tokens.add(`effect:${e}`)),kn.has(e)&&t.tokens.add(`state-hook:${e}`),Qn(e)&&(t.requestNames.add(e),t.tokens.add(`request:${e}`))}function Qn(e){if(_n.has(e))return!0;let t=/^use([A-Z0-9_].*)$/.exec(e)?.[1];return t?/(Query|Mutation|Fetch|Resource)$/.test(t):!1}function Kn(e,t){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(n?.type==="array_pattern"&&r?.text.includes("useState")){let s=n.namedChildren.find(a=>D(a)),i=D(s);i&&(t.stateNames.add(i),t.tokens.add(`state:${i}`))}let o=D(n);o&&nt(o,t)}function nt(e,t){let n=Yn(e);!n||!Ln.has(n)||(t.handlerNames.add(e),t.tokens.add(`handler:${e}`),t.tokens.add(`handler-verb:${n}`))}function Yn(e){let t=e.startsWith("handle")&&e.length>6?e.slice(6).replace(/^[A-Z]/,n=>n.toLowerCase()):e;return/^[a-z]+/.exec(t)?.[0]??null}function er(e){return/^[A-Z]/.test(e)||e.includes(".")}function Ke(e){return e.replace(/^this\./,"").replace(/\$/g,".")}function D(e){return e&&(e.type==="identifier"||e.type==="property_identifier"||e.type==="shorthand_property_identifier"||/^[A-Za-z_$][\w$]*$/.test(e.text))?e.text:null}function tr(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];t.includes(r)||t.push(r)}return t}function C(e){return[...e].sort()}function W(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var nr=new Set(["function_declaration","method_definition","method_signature","function_signature"]);function at(e,t){let n=or(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:st(n.functionNode),params:rt(n.functionNode),paramsEndLine:ot(n.functionNode),isLiteralPassthrough:it(n.functionNode,t)};if(!rr(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(o=>o.type==="identifier"||o.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:st(e),params:rt(e),paramsEndLine:ot(e),isLiteralPassthrough:it(e,t)}:null}function ct(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function rt(e){let t=ct(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(W(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let o=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),s=r.childForFieldName("pattern");if(!o&&s&&s.type==="identifier"){n.push({name:s.text,simple:!0});continue}let i=r.namedChildren.find(a=>a.type==="identifier");n.push({name:s?.type==="identifier"?s.text:i?.text??"",simple:!1})}return n}function ot(e){let t=ct(e);return t?t.endPosition.row:e.startPosition.row}function rr(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?nr.has(e):!1}function or(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);return!n||!r||r.type!=="arrow_function"&&r.type!=="function_expression"?null:{name:n.text,definitionNode:e,functionNode:r}}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);return!n||!r||r.type!=="arrow_function"&&r.type!=="function_expression"?null:{name:n.text,definitionNode:e,functionNode:r}}return null}function st(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)W(r)||(n+=1);return n}function it(e,t){let n=e.namedChildren.find(u=>u.type==="block"||u.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(u=>!W(u));if(r.length!==1)return!1;let o=r[0],s=null;if(o.type==="return_statement"||o.type==="expression_statement"?s=o.namedChild(0)??null:t==="rust"&&(o.type==="call_expression"||o.type==="macro_invocation")&&(s=o),!s)return!1;let i=t==="python"?"call":"call_expression";if(s.type!==i)return!1;let a=s.namedChildren.find(u=>u.type==="arguments"||u.type==="argument_list");if(!a)return!1;let c=a.namedChildren.filter(u=>!W(u)),l=e.namedChildren.find(u=>u.type==="parameters"||u.type==="formal_parameters");if(!l)return!1;let f=[];for(let u of l.namedChildren){if(u.type==="identifier"){f.push(u.text);continue}let N=u.namedChildren.find(V=>V.type==="identifier");N&&f.push(N.text)}if(c.length!==f.length)return!1;for(let u=0;u<f.length;u+=1){let N=c[u];if(N.type!=="identifier"||N.text!==f[u])return!1}return!0}var sr=new Set(["ref","shallowRef","reactive","computed","watch","watchEffect"]),ir=new Set(["onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","onActivated","onDeactivated","onErrorCaptured"]),ar=new Set(["axios","fetch","runRequest","useAsyncData","useFetch","useResource"]),cr=new Set(["defineEmits","defineExpose","defineModel","defineOptions","defineProps","withDefaults"]),lr=new Set(["catch","for","function","if","return","switch","while"]);function ne(e){let t={imports:[],functions:[],calls:[],composables:[],stores:[],reactivity:[],lifecycle:[],requests:[],macros:[],lineCount:0,externalLineCount:0,externalScriptPaths:[],unresolvedScripts:[]};for(let n of e.scripts){t.lineCount+=F(n),n.external&&(t.externalLineCount+=F(n),t.externalScriptPaths.push(n.sourcePath));for(let o of n.errors)t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:o});if(!n.body||!n.astLanguage){n.astLanguage||t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:`Unsupported Vue script language: ${n.lang??"unknown"}`});continue}t.imports.push(...mr(n));let r=$(n.astLanguage,n.body);r?pr(n,r.rootNode,t):fr(n,t)}return ur(t),t.externalScriptPaths=ut(t.externalScriptPaths),t}function ur(e){e.composables=R(e,"composable"),e.stores=R(e,"store"),e.reactivity=R(e,"reactivity"),e.lifecycle=R(e,"lifecycle"),e.requests=R(e,"request"),e.macros=R(e,"macro")}function R(e,t){return ut(e.calls.filter(n=>n.categories.includes(t)).map(n=>n.name))}function pr(e,t,n){let r=new Set,o=new Set,s=i=>{let a=at(i,e.astLanguage);if(a){let l=`${a.name}:${a.startLine}:${a.endLine}`;o.has(l)||(o.add(l),n.functions.push({name:a.name,sourcePath:e.sourcePath,startLine:e.startLine+a.startLine,endLine:e.startLine+a.endLine,setup:e.setup}))}let c=K(i,e.astLanguage);if(c){let l=`${c.calleeLeaf}:${c.line}`;r.has(l)||(r.add(l),n.calls.push({name:c.calleeLeaf,sourcePath:e.sourcePath,line:e.startLine+c.line,categories:lt(c.calleeLeaf),setup:e.setup}))}for(let l of i.children)s(l)};s(t)}function fr(e,t){for(let n of e.body.matchAll(/\b([A-Za-z_$][\w$]*)\s*\(/g)){let r=n[1];!r||lr.has(r)||t.calls.push({name:r,sourcePath:e.sourcePath,line:e.startLine+te(e.body,n.index??0),categories:lt(r),setup:e.setup})}for(let n of e.body.matchAll(/\bfunction\s+([A-Za-z_$][\w$]*)\b/g)){let r=n[1];if(!r)continue;let o=e.startLine+te(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}for(let n of e.body.matchAll(/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/g)){let r=n[1];if(!r)continue;let o=e.startLine+te(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}}function mr(e){let t=[];for(let n of e.body.matchAll(/\bimport\s+(?:type\s+)?([^'";]+?)\s+from\s+['"]([^'"]+)['"]/g)){let r=n[1]?.trim(),o=n[2];if(!r||!o)continue;let s=e.startLine+te(e.body,n.index??0);for(let i of dr(r))t.push({local:i,source:o,sourcePath:e.sourcePath,line:s,setup:e.setup})}return t}function dr(e){let t=[],r=e.split(",").map(i=>i.trim()).filter(Boolean)[0];r&&!r.startsWith("{")&&!r.startsWith("*")&&t.push(r);let o=/\{([^}]*)\}/.exec(e)?.[1];if(o)for(let i of o.split(",")){let a=i.trim();if(!a)continue;let c=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(a)?.[1];t.push(c??a.replace(/^type\s+/,"").trim())}let s=/\*\s+as\s+([A-Za-z_$][\w$]*)/.exec(e)?.[1];return s&&t.push(s),t.filter(i=>/^[A-Za-z_$][\w$]*$/.test(i))}function lt(e){let t=["call"];return/^use[A-Z0-9_]/.test(e)&&t.push("composable"),/^use[A-Z0-9_].*Store$/.test(e)&&t.push("store"),sr.has(e)&&t.push("reactivity"),ir.has(e)&&t.push("lifecycle"),ar.has(e)&&t.push("request"),cr.has(e)&&t.push("macro"),t}function te(e,t){let n=0;for(let r=0;r<t&&r<e.length;r+=1)e.charCodeAt(r)===10&&(n+=1);return n}function ut(e){return[...new Set(e)].sort()}import{ElementTypes as gr,NodeTypes as ge,parse as hr}from"@vue/compiler-dom";import{parse as $s}from"@vue/compiler-sfc";function pt(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}var Sr=L("vue-template-facts"),yr=new Set(["component","keep-alive","slot","suspense","teleport","template","transition","transition-group"]),xr=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),vr=new Set(["div","span","template"]),Nr=new Set(["as","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function re(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return Sr.get(e,n,r,()=>br(n,A(e,n).template))}function br(e,t){let n={relativePath:e,template:t?{startLine:t.startLine,endLine:t.endLine}:null,componentTags:[],nativeTags:[],builtinTags:[],props:[],events:[],directives:[],slots:[],expressionIdentifiers:[],structuralTokens:[]};if(!t)return n;let r;try{r=hr(t.body,{comments:!1})}catch{return n}let o=new Set,s=i=>{i.trim()&&o.add(i)};return mt(r.children,t.startLine,n,s),n.structuralTokens=[...o].sort(),n}function mt(e,t,n,r){for(let o of e)if(o.type===ge.ELEMENT)Cr(o,t,n,r),mt(o.children,t,n,r);else if(o.type===ge.INTERPOLATION){r("interpolation");let s=he(o.content);s&&dt(s,t,o.loc.start.line,n,r)}}function Cr(e,t,n,r){let o=Er(e.tag),s={tag:e.tag,normalized:o,kind:Pr(e),startLine:j(t,e.loc.start.line),endLine:j(t,e.loc.end.line)};s.kind==="component"?(n.componentTags.push(s),r(`component:${o}`)):s.kind==="builtin"?(n.builtinTags.push(s),r(`builtin:${o}`)):(n.nativeTags.push(s),vr.has(e.tag)||r(`native:${e.tag}`));for(let i of e.props)kr(i,t,n,r)}function kr(e,t,n,r){if(e.type===ge.ATTRIBUTE){let a=e.value?.content??null,c=ft("prop",e.name,a,t,e.loc.start.line,e.loc.end.line);n.props.push(c),r(`prop:${e.name}`);return}let o=_r(e),s=he(e.exp),i=ft(Tr(e.name),o,s,t,e.loc.start.line,e.loc.end.line);switch(i.kind){case"prop":n.props.push(i),r(`prop:${o}`);break;case"event":n.events.push(i),r(`event:${o}`);break;case"slot":n.slots.push(i),r(`slot:${o}`);break;case"directive":n.directives.push(i),r(`directive:${o}`);break}s&&dt(s,t,e.loc.start.line,n,r)}function ft(e,t,n,r,o,s){return{kind:e,name:t,value:n,startLine:j(r,o),endLine:j(r,s)}}function Tr(e){switch(e){case"bind":case"model":return"prop";case"on":return"event";case"slot":return"slot";default:return"directive"}}function _r(e){let t=he(e.arg);return t||e.name}function he(e){if(!e)return null;let t=("content"in e&&typeof e.content=="string"?e.content:e.loc.source).trim();return t||null}function dt(e,t,n,r,o){for(let s of Lr(e)){let i={name:s,startLine:j(t,n),endLine:j(t,n)};r.expressionIdentifiers.push(i),o(`id:${s}`)}}function Lr(e){let t=new Set,n=Fr(e),r=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,o;for(;o=r.exec(n);){let s=o[0];Nr.has(s)||Y(s)||/^[A-Z_]+$/.test(s)||t.add(s)}return[...t].sort()}function Fr(e){return e.replace(/\/\*[\s\S]*?\*\//g," ").replace(/\/\/.*$/gm," ").replace(/`(?:\\[\s\S]|\$\{([^}]*)\}|[^`\\])*`/g,(t,n)=>n??" ").replace(/'(?:\\[\s\S]|[^'\\])*'/g," ").replace(/"(?:\\[\s\S]|[^"\\])*"/g," ")}function Pr(e){let t=e.tag;return e.tagType===gr.COMPONENT?"component":yr.has(t)?"builtin":xr.has(t)?"native":/^[A-Z]/.test(t)||t.includes("-")?"component":"native"}function Er(e){return pt(e,/[-_:]/)}function j(e,t){return e+Math.max(0,t-1)}import{createRequire as wr}from"module";import{existsSync as E}from"fs";import{basename as gt,dirname as h,extname as k,join as x,relative as P,resolve as p,sep as Ar}from"path";var Rr=M("indexed-paths",{clearGroups:[]}),jr=M("indexed-path-digest",{clearGroups:[]}),Vr=I("tsconfig-alias-config",{clearGroups:["whole-project"]}),Br=I("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),Ir=wr(import.meta.url),U;function $r(){if(U!==void 0)return U;try{U=Ir("typescript")}catch{U=null}return U}var Or=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],Dr=M("workspace-packages",{clearGroups:["whole-project"]}),z=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],ht=[".py",".pyi"],St=[".java",".scala",".kt",".kts"],yt=[".rs"],xt=[".rb"],vt=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Nt=[".cs",".vb"],bt=[".dart"],Ct=[".php"],oe=[".clj",".cljs",".cljc"],Wr=new Set(z),Se=new Set(ht),kt=new Set(St),ye=new Set(yt),xe=new Set(xt),Tt=new Set(vt),_t=new Set(Nt),ve=new Set(bt),Lt=new Set(Ct),Ft=new Set(oe),Ur=[{extensions:z,lookup:Wr},{extensions:ht,lookup:Se},{extensions:St,lookup:kt},{extensions:yt,lookup:ye},{extensions:xt,lookup:xe},{extensions:vt,lookup:Tt},{extensions:Nt,lookup:_t},{extensions:bt,lookup:ve},{extensions:Ct,lookup:Lt},{extensions:oe,lookup:Ft}];function T(e,t){return t.has(k(e).toLowerCase())}function zr(e){return T(e,Se)}function Mr(e){return T(e,kt)}function qr(e){return T(e,ye)}function Xr(e){return T(e,xe)}function Hr(e){return T(e,Tt)}function Jr(e){return T(e,_t)}function Ys(e){return k(e).toLowerCase()===".vb"}function Zr(e){return T(e,ve)}function Gr(e){return T(e,Lt)}function Qr(e){return T(e,Ft)}function Kr(e){let t=k(e).toLowerCase();for(let n of Ur)if(n.lookup.has(t))return n.extensions;return z}function Yr(e){return Mr(e)||Jr(e)||Gr(e)}function Pt(e,t,n){return zr(t)?fo(e,t,n):qr(t)?mo(e,t,n):Xr(t)?go(e,t,n):Hr(t)?ho(e,t,n):Yr(t)?So(e,n.replace(/\\/g,"."),Kr(t)):Zr(t)?yo(e,t,n):Qr(t)?xo(e,n):eo(e,t,n)}function eo(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return to(e,t,n)??ro(e,n);let r=h(x(e.config.projectRoot,t)),o=p(r,n),s=_(e);for(let i of be(o)){let a=v(P(e.config.projectRoot,i));if(s.has(a)||E(i))return a}return v(P(e.config.projectRoot,o))}function to(e,t,n){let r=lo(e,t);if(!r)return null;let o=_(e);for(let s of no(r,n)){let i=p(r.baseUrl,s);for(let a of be(i)){let c=v(P(e.config.projectRoot,a));if(o.has(c)||E(a))return c}}return null}function no(e,t){let n=[];for(let[r,o]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...o);continue}let i=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(i)||!t.endsWith(a)||t.length<i.length+a.length)continue;let c=t.slice(i.length,t.length-a.length);for(let l of o)n.push(l.includes("*")?l.replace("*",c):l)}return n}function ro(e,t){let n=so(oo(e),t);if(!n)return null;let r=_(e);for(let o of io(n)){let s=p(e.config.projectRoot,n.pkg.relativeDir,o);for(let i of be(s)){let a=v(P(e.config.projectRoot,i));if(r.has(a)||E(i))return a}}return null}function oo(e){return Dr.get(e,()=>Ae(e.config.projectRoot))}function so(e,t){let n=null;for(let r of e){let o=null;t===r.name?o="":t.startsWith(`${r.name}/`)&&(o=t.slice(r.name.length+1)),o!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:o})}return n}function io(e){let t=[],n=ao(e.pkg.exports,e.subpath);if(n){let r=co(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function ao(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return Et(e[n])}function Et(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=Et(t[n]);if(r)return r}return null}function co(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function lo(e,t){let n=v(h(t));return Br.get(e,n,()=>uo(e,n))}function uo(e,t){let n=$r();if(!n)return null;let r=p(e.config.projectRoot),o=p(r,t);for(;o===r||o.startsWith(r+Ar);){for(let i of Or){let a=x(o,i);if(!E(a))continue;let c=Vr.get(e,a,()=>po(n,a));if(c)return c}let s=h(o);if(s===o)break;o=s}return null}function po(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,h(t)),o=r.options.paths;return!o||Object.keys(o).length===0?null:{baseUrl:r.options.baseUrl?p(h(t),r.options.baseUrl):h(t),paths:o}}catch{return null}}function fo(e,t,n){let r=_(e),o;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let i=s[1].length,a=s[2].replace(/^\./,""),c=h(x(e.config.projectRoot,t));for(let l=1;l<i;l++)c=h(c);o=a?p(c,a.replace(/\./g,"/")):c}else o=p(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of vo(o)){let i=v(P(e.config.projectRoot,s));if(r.has(i)||E(s))return i}return null}function mo(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 o=h(x(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=p(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=p(o,r.slice(6).replace(/::/g,"/")):s=p(h(o),r.slice(7).replace(/::/g,"/")),Ne(e,No(s))}function go(e,t,n){let r=h(x(e.config.projectRoot,t)),o=p(r,n);return Ne(e,bo(o))}function ho(e,t,n){let r=h(x(e.config.projectRoot,t)),o=[p(r,n),p(e.config.projectRoot,n),p(e.config.projectRoot,"include",n),p(e.config.projectRoot,"src",n)];return Ne(e,o)}function So(e,t,n){let r=_(e),o=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=o.replace(/\./g,"/"),i=o.split(".").pop()??o;for(let c of n){let l=`${s}${c}`,f=[...r].find(u=>u.endsWith(l));if(f)return f}for(let c of n){let l=[...r].find(f=>gt(f)===`${i}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(k(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${i}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function yo(e,t,n){let r=_(e);if(n.startsWith("package:")){let i=n.slice(8),a=i.indexOf("/");if(a<0)return null;let c=i.slice(a+1),l=v(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let o=h(x(e.config.projectRoot,t)),s=p(o,n);for(let i of Co(s)){let a=v(P(e.config.projectRoot,i));if(r.has(a)||E(i))return a}return null}function xo(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=_(e);for(let o of oe){let s=`${n}${o}`,i=[...r].find(a=>a.endsWith(s));if(i)return i}for(let o of oe){let s=[...r].find(i=>gt(i)===`${n.split("/").pop()}${o}`);if(s)return s}return null}function vo(e){let t=k(e);return Se.has(t)?[e]:[`${e}.py`,`${e}.pyi`,x(e,"__init__.py"),x(e,"__init__.pyi")]}function Ne(e,t){let n=_(e);for(let r of t){let o=v(P(e.config.projectRoot,r));if(n.has(o)||E(r))return o}return null}function No(e){let t=k(e);return ye.has(t)?[e]:[`${e}.rs`,x(e,"mod.rs")]}function bo(e){let t=k(e);return xe.has(t)?[e]:[`${e}.rb`,x(e,"index.rb")]}function Co(e){let t=k(e);return ve.has(t)?[e]:[`${e}.dart`,e]}function be(e){let t=k(e),n=new Set;if(t){n.add(e);for(let r of z)n.add(e.slice(0,-t.length)+r)}else for(let r of z)n.add(`${e}${r}`),n.add(x(e,`index${r}`));return[...n]}function _(e){return Rr.get(e,()=>new Set(q(e,{includeIgnored:!1}).map(v)))}function ei(e){return jr.get(e,()=>Te([..._(e)].sort().join(`
|
|
8
|
-
`)))}var ko=new Set(["in","key","of"]),To=new Set(["computed","defineEmits","defineProps","reactive","ref","watch","watchEffect"]),_o=L("vue-component-behavior-profiles");function wt(e,t={}){let n=O(e,{extensions:[".vue"]}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).map(o=>Ce(e,o)).filter(o=>(t.minTemplateTokens===void 0||o.templateTokens.size>=t.minTemplateTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function Ce(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n),o=_o.get(e,n,r,()=>Lo(e,n,r));return Po(o)}function Lo(e,t,n){let r=A(e,t),o=re(e,t),s=ne(r),i=Ao(o),a=o.expressionIdentifiers.map(m=>m.name).filter(m=>!i.includes(m)).filter((m,b,
|
|
6
|
+
`.repeat(r.startLine)+r.body;return $(r.language,o)}):null}import{readdirSync as on}from"fs";import{execFileSync as sn}from"child_process";import{extname as G,join as an}from"path";var cn=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue",".rs",".py",".pyi",".java",".kt",".kts",".scala",".sc",".clj",".cljs",".cljc",".rb",".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx",".cs",".vb",".php",".dart"],us=[".vue"],Me=[".tsx",".jsx"],qe=[".vue"],ln=[...Me,...qe],un=new Set(Me),pn=new Set(qe),Xe=new Set(cn.map(e=>e.toLowerCase())),fn=[...Xe].sort().join(","),He=new Set(["node_modules",".git","target","dist","build",".next",".nuxt",".cache",".turbo",".nbb",".cpcache",".shadow-cljs","out","coverage",".scipquery-cache","__pycache__",".venv","venv",".idea",".vscode"]);function O(e,t={}){let n=t.includeIndexed??!0,r=t.includeAuxiliary??!0,o=t.extensions?.map(c=>c.toLowerCase()),s=o?new Set(o):Xe,i=o?[...s].sort().join(","):fn,a=`${n?"1":"0"}|${r?"1":"0"}|${i}`;return mn.get(e,a,()=>{let c=new Set;if(n)for(let l of q(e,{includeIgnored:!1}))s.has(G(l).toLowerCase())&&c.add(l);if(r)for(let l of dn(e.config.projectRoot,s))e.isIgnored(l)||n&&c.has(l)||c.add(l);return[...c].sort()})}function ps(e,t={}){let n=!1,r=!1;for(let o of O(e,{extensions:ln})){if(t.scope&&!o.includes(t.scope))continue;let s=G(o).toLowerCase();if(n||=un.has(s),r||=pn.has(s),n&&r)break}return{react:n,vue:r}}var mn=B("source-files",{clearGroups:[]});function dn(e,t){return gn(e,t)??Sn(e,t)}function gn(e,t){try{let n=sn("git",["ls-files","--cached","--others","--exclude-standard"],{cwd:e,encoding:"utf-8",timeout:1e4,killSignal:"SIGKILL",stdio:["ignore","pipe","ignore"]}),r=new Set;for(let o of n.split(`
|
|
7
|
+
`)){let s=o.trim();s&&(hn(s)||t.has(G(s).toLowerCase())&&r.add(s))}return r}catch{return null}}function hn(e){return e.split("/").some(t=>He.has(t))}function Sn(e,t){let n=new Set,r=o=>{let s=o?an(e,o):e,i;try{i=on(s,{withFileTypes:!0})}catch{return}for(let a of i)if(!He.has(a.name)){if(a.isDirectory()){r(o?`${o}/${a.name}`:a.name);continue}t.has(G(a.name).toLowerCase())&&n.add(o?`${o}/${a.name}`:a.name)}};return r(""),n}import{extname as Nn}from"path";function Q(e,t){let n=yn(e,t);if(!n)return null;let r=K(n);return r?{calleeLeaf:r,memberAccess:xn(n),line:e.startPosition.row}:null}function yn(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 xn(e){switch(e.type){case"field_expression":case"member_expression":case"attribute":return!0;default:return!1}}function K(e){switch(e.type){case"identifier":case"type_identifier":case"field_identifier":case"property_identifier":case"shorthand_property_identifier":return e.text;case"field_expression":case"member_expression":case"attribute":{let t=e.namedChild(e.namedChildCount-1);return t?K(t):null}case"generic_function":{let t=e.childForFieldName("function")??e.namedChild(0);return t?K(t):null}case"scoped_identifier":{let t=e.childForFieldName("name")??e.namedChild(e.namedChildCount-1);return t?K(t):null}case"super":case"self":case"this":return null;default:return null}}var vn=new Set(["children","className","data","e","err","error","ev","event","false","id","idx","index","item","key","null","props","res","result","state","style","true","undefined","val","value"]);function Y(e){return e.length<=2||vn.has(e)}var bn=[".tsx",".jsx"],Je=new Set(["useActionState","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useOptimistic","useReducer","useRef","useState","useSyncExternalStore","useTransition"]),Cn=new Set(["useEffect","useInsertionEffect","useLayoutEffect"]),kn=new Set(["useActionState","useOptimistic","useReducer","useRef","useState"]),Tn=new Set(["useLocation","useNavigate","useParams","useSearchParams","useTranslation"]),_n=new Set(["axios","fetch","gql","graphql","mutate","query","request","useMutation","useQuery","useSuspenseQuery"]),Ln=new Set(["add","apply","cancel","change","clear","close","create","delete","fetch","filter","handle","load","open","refresh","remove","render","reset","save","select","submit","toggle","update"]),Fn=new Set(["aria-hidden","className","clipRule","d","fill","fillRule","height","role","stroke","strokeLinecap","strokeLinejoin","strokeWidth","style","viewBox","width","xmlns"]),Pn=L("react-component-behavior-profiles"),Ze=Fe({kind:"react-component-behavior-profiles",invalidation:Pe("react-component-behavior-profiles"),serialize:Rn,deserialize:jn});function Ye(e,t={}){let n=O(e,{extensions:bn}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).flatMap(o=>me(e,o)).filter(o=>(t.minJsxTokens===void 0||o.jsxTokens.size>=t.minJsxTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function me(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return Pn.get(e,n,r,()=>En(e,n,r)).map(An)}function En(e,t,n){let r=_e(e,t,n),o=Ze.read(e,t,r);if(o)return o;let s=wn(e,t);return Ze.write(e,t,r,s),s}function wn(e,t){let n=In(t);if(!n)return[];let r=ze(e,t);if(!r)return[];let o=Ee(e,t).length;return Bn(r.rootNode,n).filter(i=>i.kind==="hook"||de(i.bodyNode)).map(i=>{let a=Mn(i.bodyNode),c=Zn(i.bodyNode,n);return{file:t,name:i.name,kind:i.kind,startLine:i.node.startPosition.row,endLine:i.node.endPosition.row,loc:Math.max(1,i.node.endPosition.row-i.node.startPosition.row+1),fileLines:o,jsxTokens:a.tokens,behaviorTokens:c.tokens,componentNames:C(a.componentNames),nativeTags:C(a.nativeTags),propNames:C(a.propNames),eventNames:C(a.eventNames),hookNames:C(c.hookNames),requestNames:C(c.requestNames),stateNames:C(c.stateNames),effectNames:C(c.effectNames),handlerNames:C(c.handlerNames)}})}function An(e){return{...e,jsxTokens:new Set(e.jsxTokens),behaviorTokens:new Set(e.behaviorTokens),componentNames:[...e.componentNames],nativeTags:[...e.nativeTags],propNames:[...e.propNames],eventNames:[...e.eventNames],hookNames:[...e.hookNames],requestNames:[...e.requestNames],stateNames:[...e.stateNames],effectNames:[...e.effectNames],handlerNames:[...e.handlerNames]}}function Rn(e){return JSON.stringify(e.map(t=>({...t,jsxTokens:[...t.jsxTokens],behaviorTokens:[...t.behaviorTokens]})))}function jn(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return null;let n=[];for(let r of t){let o=Vn(r);if(!o)return null;n.push(o)}return n}catch{return null}}function Vn(e){if(!Le(e))return null;let{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:c,behaviorTokens:l,componentNames:f,nativeTags:u,propNames:N,eventNames:V,hookNames:se,requestNames:ie,stateNames:m,effectNames:b,handlerNames:I}=e;if(typeof t!="string"||typeof n!="string"||r!=="component"&&r!=="hook"||!ee(o)||!ee(s)||!ee(i)||!ee(a))return null;let S={jsxTokens:y(c),behaviorTokens:y(l),componentNames:y(f),nativeTags:y(u),propNames:y(N),eventNames:y(V),hookNames:y(se),requestNames:y(ie),stateNames:y(m),effectNames:y(b),handlerNames:y(I)};return Object.values(S).some(Rt=>Rt===null)?null:{file:t,name:n,kind:r,startLine:o,endLine:s,loc:i,fileLines:a,jsxTokens:new Set(S.jsxTokens),behaviorTokens:new Set(S.behaviorTokens),componentNames:S.componentNames,nativeTags:S.nativeTags,propNames:S.propNames,eventNames:S.eventNames,hookNames:S.hookNames,requestNames:S.requestNames,stateNames:S.stateNames,effectNames:S.effectNames,handlerNames:S.handlerNames}}function ee(e){return typeof e=="number"&&Number.isFinite(e)}function In(e){let t=Nn(e).toLowerCase();return t!==".tsx"&&t!==".jsx"?null:X(e)}function Bn(e,t){let n=[],r=new Set,o=s=>{let i=$n(s);if(i&&(!Un(s)||i.kind==="component")){let a=`${i.name}:${i.node.startIndex}:${i.node.endIndex}`;r.has(a)||(r.add(a),n.push(i))}for(let a of s.namedChildren)o(a)};return(t==="tsx"||t==="javascript")&&o(e),n}function $n(e){if(e.type==="class_declaration"){let s=fe(e);if(!s||!/^[A-Z]/.test(s))return null;let i=On(e);return!i||!Dn(e)&&!de(i)?null:{name:s,kind:"component",node:e,bodyNode:i}}if(e.type==="function_declaration"){let s=fe(e);return!s||!Ge(s)?null:{name:s,kind:Ke(s),node:e,bodyNode:e}}if(e.type!=="variable_declarator")return null;let t=e.childForFieldName("name")??e.namedChild(0),n=e.childForFieldName("value")??e.namedChild(1),r=D(t);if(!r||!n||!Ge(r))return null;let o=Wn(n);return o?{name:r,kind:Ke(r),node:e,bodyNode:o}:null}function On(e){for(let t of e.namedChildren)if(t.type==="class_body")for(let n of t.namedChildren){if(n.type!=="method_definition")continue;if((n.childForFieldName("name")??n.namedChild(0))?.text==="render")return n}return null}function Dn(e){return/\b(?:React\.)?(?:Pure)?Component\b/.test(e.text)}function Ge(e){return/^[A-Z]/.test(e)||/^use[A-Z0-9_]/.test(e)}function Ke(e){return/^use[A-Z0-9_]/.test(e)?"hook":"component"}function Wn(e){if(e.type==="arrow_function"||e.type==="function_expression")return e;if(e.type!=="call_expression")return null;let t=zn(e);return t!=="memo"&&t!=="forwardRef"?null:e.namedChildren.find(o=>o.type==="arguments")?.namedChildren.find(o=>o.type==="arrow_function"||o.type==="function_expression")??null}function Un(e){let t=e.parent;for(;t;){if(t.type==="function_declaration"||t.type==="function_expression"||t.type==="arrow_function"||t.type==="method_definition")return!0;t=t.parent}return!1}function fe(e){return D(e.childForFieldName("name")??e.namedChild(0))}function zn(e){let t=e.childForFieldName("function")??e.namedChild(0);return t?t.text.split(".").pop()??t.text:null}function de(e){return e.type.startsWith("jsx_")?!0:e.namedChildren.some(de)}function Mn(e){let t={tokens:new Set,componentNames:new Set,nativeTags:new Set,propNames:new Set,eventNames:new Set},n=r=>{r.type==="jsx_opening_element"||r.type==="jsx_self_closing_element"?qn(r,t):r.type==="jsx_element"&&r.text.trimStart().startsWith("<>")?t.tokens.add("jsx:fragment"):r.type==="jsx_expression"?Xn(r,t):r.type==="jsx_fragment"&&t.tokens.add("jsx:fragment");for(let o of r.children)n(o)};return n(e),t}function qn(e,t){let n=Hn(e),r=!1;if(n){let o=Qe(n),s=o==="Fragment"||o==="React.Fragment";r=er(o)&&!s,s?t.tokens.add("jsx:fragment"):r?(t.componentNames.add(o),t.tokens.add(`component:${o}`)):(t.nativeTags.add(o),t.tokens.add(`native:${o}`))}for(let o of e.namedChildren)if(o.type==="jsx_attribute"){let s=Jn(o);if(!s)continue;let i=Qe(s);if(i.startsWith("on")&&i.length>2){let a=i.slice(2).replace(/^[A-Z]/,c=>c.toLowerCase());t.eventNames.add(a),t.tokens.add(`event:${a}`)}else Fn.has(i)||(t.propNames.add(i),t.tokens.add(`${r?"prop":"native-prop"}:${i}`))}else o.type==="jsx_spread_attribute"&&t.tokens.add(et(o))}function Xn(e,t){let n=e.text;/^\{\s*\.\.\./.test(n)&&t.tokens.add(et(e)),tt(e)&&t.tokens.add("jsx:conditional"),(n.includes(".map(")||n.includes(".flatMap("))&&t.tokens.add("jsx:list");for(let r of tr(n))Y(r)||t.tokens.add(`binding:${r}`)}function et(e){let t=/^\{\s*\.\.\.\s*([^}]+)\s*\}$/.exec(e.text)?.[1],n=e.namedChildren.find(s=>s.type!=="comment"),r=t??n?.text??"",o=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.exec(r.trim())?.[0];return o?`prop:spread:${o}`:"prop:spread"}function tt(e){return e.type==="ternary_expression"||e.type==="conditional_expression"?!0:e.namedChildren.some(tt)}function Hn(e){for(let t of e.namedChildren)if(t.type==="identifier"||t.type==="jsx_identifier"||t.type==="property_identifier"||t.type==="member_expression"||t.type==="jsx_member_expression")return t.text;return/^<\s*([A-Za-z][\w$.]*)/.exec(e.text)?.[1]??null}function Jn(e){for(let t of e.namedChildren)if(t.type==="property_identifier"||t.type==="identifier"||t.type==="jsx_identifier")return t.text;return/^([A-Za-z_$][\w$:-]*)/.exec(e.text)?.[1]??null}function Zn(e,t){let n={tokens:new Set,hookNames:new Set,requestNames:new Set,stateNames:new Set,effectNames:new Set,handlerNames:new Set},r=o=>{if(o.type==="call_expression"){let s=Q(o,t);s&&Gn(s.calleeLeaf,n)}else if(o.type==="variable_declarator")Qn(o,n);else if(o.type==="function_declaration"){let s=fe(o);s&&nt(s,n)}for(let s of o.namedChildren)r(s)};return r(e),n}function Gn(e,t){/^use[A-Z0-9_]/.test(e)&&(t.hookNames.add(e),!Je.has(e)&&!Tn.has(e)&&t.tokens.add(`hook:${e}`)),Je.has(e)&&t.tokens.add(`react-hook:${e}`),Cn.has(e)&&(t.effectNames.add(e),t.tokens.add(`effect:${e}`)),kn.has(e)&&t.tokens.add(`state-hook:${e}`),Kn(e)&&(t.requestNames.add(e),t.tokens.add(`request:${e}`))}function Kn(e){if(_n.has(e))return!0;let t=/^use([A-Z0-9_].*)$/.exec(e)?.[1];return t?/(Query|Mutation|Fetch|Resource)$/.test(t):!1}function Qn(e,t){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);if(n?.type==="array_pattern"&&r?.text.includes("useState")){let s=n.namedChildren.find(a=>D(a)),i=D(s);i&&(t.stateNames.add(i),t.tokens.add(`state:${i}`))}let o=D(n);o&&nt(o,t)}function nt(e,t){let n=Yn(e);!n||!Ln.has(n)||(t.handlerNames.add(e),t.tokens.add(`handler:${e}`),t.tokens.add(`handler-verb:${n}`))}function Yn(e){let t=e.startsWith("handle")&&e.length>6?e.slice(6).replace(/^[A-Z]/,n=>n.toLowerCase()):e;return/^[a-z]+/.exec(t)?.[0]??null}function er(e){return/^[A-Z]/.test(e)||e.includes(".")}function Qe(e){return e.replace(/^this\./,"").replace(/\$/g,".")}function D(e){return e&&(e.type==="identifier"||e.type==="property_identifier"||e.type==="shorthand_property_identifier"||/^[A-Za-z_$][\w$]*$/.test(e.text))?e.text:null}function tr(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];t.includes(r)||t.push(r)}return t}function C(e){return[...e].sort()}function W(e){return e.type==="comment"||e.type==="line_comment"||e.type==="block_comment"}var nr=new Set(["function_declaration","method_definition","method_signature","function_signature"]);function at(e,t){let n=or(e,t);if(n)return{name:n.name,startLine:n.definitionNode.startPosition.row,endLine:n.definitionNode.endPosition.row,paramCount:st(n.functionNode),params:rt(n.functionNode),paramsEndLine:ot(n.functionNode),isLiteralPassthrough:it(n.functionNode,t)};if(!rr(e.type,t))return null;let r=e.childForFieldName("name")??e.namedChildren.find(o=>o.type==="identifier"||o.type==="property_identifier");return r?{name:r.text,startLine:e.startPosition.row,endLine:e.endPosition.row,paramCount:st(e),params:rt(e),paramsEndLine:ot(e),isLiteralPassthrough:it(e,t)}:null}function ct(e){return e.namedChildren.find(t=>t.type==="parameters"||t.type==="formal_parameters")}function rt(e){let t=ct(e);if(!t)return[];let n=[];for(let r of t.namedChildren){if(W(r))continue;if(r.type==="identifier"){n.push({name:r.text,simple:!0});continue}let o=r.namedChildren.some(a=>a.type.endsWith("_modifier"))||/^\s*(?:public|private|protected|readonly|override)\b/.test(r.text),s=r.childForFieldName("pattern");if(!o&&s&&s.type==="identifier"){n.push({name:s.text,simple:!0});continue}let i=r.namedChildren.find(a=>a.type==="identifier");n.push({name:s?.type==="identifier"?s.text:i?.text??"",simple:!1})}return n}function ot(e){let t=ct(e);return t?t.endPosition.row:e.startPosition.row}function rr(e,t){return t==="rust"?e==="function_item"||e==="function_signature_item":t==="python"?e==="function_definition":t==="typescript"||t==="tsx"||t==="javascript"?nr.has(e):!1}function or(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);return!n||!r||r.type!=="arrow_function"&&r.type!=="function_expression"?null:{name:n.text,definitionNode:e,functionNode:r}}if(e.type==="public_field_definition"){let n=e.childForFieldName("name")??e.namedChild(0),r=e.childForFieldName("value")??e.namedChild(1);return!n||!r||r.type!=="arrow_function"&&r.type!=="function_expression"?null:{name:n.text,definitionNode:e,functionNode:r}}return null}function st(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)W(r)||(n+=1);return n}function it(e,t){let n=e.namedChildren.find(u=>u.type==="block"||u.type==="statement_block");if(!n)return!1;let r=n.namedChildren.filter(u=>!W(u));if(r.length!==1)return!1;let o=r[0],s=null;if(o.type==="return_statement"||o.type==="expression_statement"?s=o.namedChild(0)??null:t==="rust"&&(o.type==="call_expression"||o.type==="macro_invocation")&&(s=o),!s)return!1;let i=t==="python"?"call":"call_expression";if(s.type!==i)return!1;let a=s.namedChildren.find(u=>u.type==="arguments"||u.type==="argument_list");if(!a)return!1;let c=a.namedChildren.filter(u=>!W(u)),l=e.namedChildren.find(u=>u.type==="parameters"||u.type==="formal_parameters");if(!l)return!1;let f=[];for(let u of l.namedChildren){if(u.type==="identifier"){f.push(u.text);continue}let N=u.namedChildren.find(V=>V.type==="identifier");N&&f.push(N.text)}if(c.length!==f.length)return!1;for(let u=0;u<f.length;u+=1){let N=c[u];if(N.type!=="identifier"||N.text!==f[u])return!1}return!0}var sr=new Set(["ref","shallowRef","reactive","computed","watch","watchEffect"]),ir=new Set(["onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","onActivated","onDeactivated","onErrorCaptured"]),ar=new Set(["axios","fetch","runRequest","useAsyncData","useFetch","useResource"]),cr=new Set(["defineEmits","defineExpose","defineModel","defineOptions","defineProps","withDefaults"]),lr=new Set(["catch","for","function","if","return","switch","while"]);function ne(e){let t={imports:[],functions:[],calls:[],composables:[],stores:[],reactivity:[],lifecycle:[],requests:[],macros:[],lineCount:0,externalLineCount:0,externalScriptPaths:[],unresolvedScripts:[]};for(let n of e.scripts){t.lineCount+=F(n),n.external&&(t.externalLineCount+=F(n),t.externalScriptPaths.push(n.sourcePath));for(let o of n.errors)t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:o});if(!n.body||!n.astLanguage){n.astLanguage||t.unresolvedScripts.push({sourcePath:n.sourcePath,reason:`Unsupported Vue script language: ${n.lang??"unknown"}`});continue}t.imports.push(...mr(n));let r=$(n.astLanguage,n.body);r?pr(n,r.rootNode,t):fr(n,t)}return ur(t),t.externalScriptPaths=ut(t.externalScriptPaths),t}function ur(e){e.composables=R(e,"composable"),e.stores=R(e,"store"),e.reactivity=R(e,"reactivity"),e.lifecycle=R(e,"lifecycle"),e.requests=R(e,"request"),e.macros=R(e,"macro")}function R(e,t){return ut(e.calls.filter(n=>n.categories.includes(t)).map(n=>n.name))}function pr(e,t,n){let r=new Set,o=new Set,s=i=>{let a=at(i,e.astLanguage);if(a){let l=`${a.name}:${a.startLine}:${a.endLine}`;o.has(l)||(o.add(l),n.functions.push({name:a.name,sourcePath:e.sourcePath,startLine:e.startLine+a.startLine,endLine:e.startLine+a.endLine,setup:e.setup}))}let c=Q(i,e.astLanguage);if(c){let l=`${c.calleeLeaf}:${c.line}`;r.has(l)||(r.add(l),n.calls.push({name:c.calleeLeaf,sourcePath:e.sourcePath,line:e.startLine+c.line,categories:lt(c.calleeLeaf),setup:e.setup}))}for(let l of i.children)s(l)};s(t)}function fr(e,t){for(let n of e.body.matchAll(/\b([A-Za-z_$][\w$]*)\s*\(/g)){let r=n[1];!r||lr.has(r)||t.calls.push({name:r,sourcePath:e.sourcePath,line:e.startLine+te(e.body,n.index??0),categories:lt(r),setup:e.setup})}for(let n of e.body.matchAll(/\bfunction\s+([A-Za-z_$][\w$]*)\b/g)){let r=n[1];if(!r)continue;let o=e.startLine+te(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}for(let n of e.body.matchAll(/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:function\b|\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>)/g)){let r=n[1];if(!r)continue;let o=e.startLine+te(e.body,n.index??0);t.functions.push({name:r,sourcePath:e.sourcePath,startLine:o,endLine:o,setup:e.setup})}}function mr(e){let t=[];for(let n of e.body.matchAll(/\bimport\s+(?:type\s+)?([^'";]+?)\s+from\s+['"]([^'"]+)['"]/g)){let r=n[1]?.trim(),o=n[2];if(!r||!o)continue;let s=e.startLine+te(e.body,n.index??0);for(let i of dr(r))t.push({local:i,source:o,sourcePath:e.sourcePath,line:s,setup:e.setup})}return t}function dr(e){let t=[],r=e.split(",").map(i=>i.trim()).filter(Boolean)[0];r&&!r.startsWith("{")&&!r.startsWith("*")&&t.push(r);let o=/\{([^}]*)\}/.exec(e)?.[1];if(o)for(let i of o.split(",")){let a=i.trim();if(!a)continue;let c=/\bas\s+([A-Za-z_$][\w$]*)$/.exec(a)?.[1];t.push(c??a.replace(/^type\s+/,"").trim())}let s=/\*\s+as\s+([A-Za-z_$][\w$]*)/.exec(e)?.[1];return s&&t.push(s),t.filter(i=>/^[A-Za-z_$][\w$]*$/.test(i))}function lt(e){let t=["call"];return/^use[A-Z0-9_]/.test(e)&&t.push("composable"),/^use[A-Z0-9_].*Store$/.test(e)&&t.push("store"),sr.has(e)&&t.push("reactivity"),ir.has(e)&&t.push("lifecycle"),ar.has(e)&&t.push("request"),cr.has(e)&&t.push("macro"),t}function te(e,t){let n=0;for(let r=0;r<t&&r<e.length;r+=1)e.charCodeAt(r)===10&&(n+=1);return n}function ut(e){return[...new Set(e)].sort()}import{ElementTypes as gr,NodeTypes as ge,parse as hr}from"@vue/compiler-dom";import{parse as $s}from"@vue/compiler-sfc";function pt(e,t){return e.split(t).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}var Sr=L("vue-template-facts"),yr=new Set(["component","keep-alive","slot","suspense","teleport","template","transition","transition-group"]),xr=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),vr=new Set(["div","span","template"]),Nr=new Set(["as","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","if","import","in","instanceof","let","new","null","of","return","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function re(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n);return Sr.get(e,n,r,()=>br(n,A(e,n).template))}function br(e,t){let n={relativePath:e,template:t?{startLine:t.startLine,endLine:t.endLine}:null,componentTags:[],nativeTags:[],builtinTags:[],props:[],events:[],directives:[],slots:[],expressionIdentifiers:[],structuralTokens:[]};if(!t)return n;let r;try{r=hr(t.body,{comments:!1})}catch{return n}let o=new Set,s=i=>{i.trim()&&o.add(i)};return mt(r.children,t.startLine,n,s),n.structuralTokens=[...o].sort(),n}function mt(e,t,n,r){for(let o of e)if(o.type===ge.ELEMENT)Cr(o,t,n,r),mt(o.children,t,n,r);else if(o.type===ge.INTERPOLATION){r("interpolation");let s=he(o.content);s&&dt(s,t,o.loc.start.line,n,r)}}function Cr(e,t,n,r){let o=Er(e.tag),s={tag:e.tag,normalized:o,kind:Pr(e),startLine:j(t,e.loc.start.line),endLine:j(t,e.loc.end.line)};s.kind==="component"?(n.componentTags.push(s),r(`component:${o}`)):s.kind==="builtin"?(n.builtinTags.push(s),r(`builtin:${o}`)):(n.nativeTags.push(s),vr.has(e.tag)||r(`native:${e.tag}`));for(let i of e.props)kr(i,t,n,r)}function kr(e,t,n,r){if(e.type===ge.ATTRIBUTE){let a=e.value?.content??null,c=ft("prop",e.name,a,t,e.loc.start.line,e.loc.end.line);n.props.push(c),r(`prop:${e.name}`);return}let o=_r(e),s=he(e.exp),i=ft(Tr(e.name),o,s,t,e.loc.start.line,e.loc.end.line);switch(i.kind){case"prop":n.props.push(i),r(`prop:${o}`);break;case"event":n.events.push(i),r(`event:${o}`);break;case"slot":n.slots.push(i),r(`slot:${o}`);break;case"directive":n.directives.push(i),r(`directive:${o}`);break}s&&dt(s,t,e.loc.start.line,n,r)}function ft(e,t,n,r,o,s){return{kind:e,name:t,value:n,startLine:j(r,o),endLine:j(r,s)}}function Tr(e){switch(e){case"bind":case"model":return"prop";case"on":return"event";case"slot":return"slot";default:return"directive"}}function _r(e){let t=he(e.arg);return t||e.name}function he(e){if(!e)return null;let t=("content"in e&&typeof e.content=="string"?e.content:e.loc.source).trim();return t||null}function dt(e,t,n,r,o){for(let s of Lr(e)){let i={name:s,startLine:j(t,n),endLine:j(t,n)};r.expressionIdentifiers.push(i),o(`id:${s}`)}}function Lr(e){let t=new Set,n=Fr(e),r=/\b[A-Za-z_$][A-Za-z0-9_$]*\b/g,o;for(;o=r.exec(n);){let s=o[0];Nr.has(s)||Y(s)||/^[A-Z_]+$/.test(s)||t.add(s)}return[...t].sort()}function Fr(e){return e.replace(/\/\*[\s\S]*?\*\//g," ").replace(/\/\/.*$/gm," ").replace(/`(?:\\[\s\S]|\$\{([^}]*)\}|[^`\\])*`/g,(t,n)=>n??" ").replace(/'(?:\\[\s\S]|[^'\\])*'/g," ").replace(/"(?:\\[\s\S]|[^"\\])*"/g," ")}function Pr(e){let t=e.tag;return e.tagType===gr.COMPONENT?"component":yr.has(t)?"builtin":xr.has(t)?"native":/^[A-Z]/.test(t)||t.includes("-")?"component":"native"}function Er(e){return pt(e,/[-_:]/)}function j(e,t){return e+Math.max(0,t-1)}import{createRequire as wr}from"module";import{existsSync as E}from"fs";import{basename as gt,dirname as h,extname as k,join as x,relative as P,resolve as p,sep as Ar}from"path";var Rr=M("indexed-paths",{clearGroups:[]}),jr=M("indexed-path-digest",{clearGroups:[]}),Vr=B("tsconfig-alias-config",{clearGroups:["whole-project"]}),Ir=B("tsconfig-alias-config-for-dir",{clearGroups:["whole-project"]}),Br=wr(import.meta.url),U;function $r(){if(U!==void 0)return U;try{U=Br("typescript")}catch{U=null}return U}var Or=["tsconfig.json","tsconfig.app.json","tsconfig.node.json","tsconfig.base.json"],Dr=M("workspace-packages",{clearGroups:["whole-project"]}),z=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs",".vue"],ht=[".py",".pyi"],St=[".java",".scala",".kt",".kts"],yt=[".rs"],xt=[".rb"],vt=[".c",".h",".cc",".cpp",".cxx",".hpp",".hh",".hxx"],Nt=[".cs",".vb"],bt=[".dart"],Ct=[".php"],oe=[".clj",".cljs",".cljc"],Wr=new Set(z),Se=new Set(ht),kt=new Set(St),ye=new Set(yt),xe=new Set(xt),Tt=new Set(vt),_t=new Set(Nt),ve=new Set(bt),Lt=new Set(Ct),Ft=new Set(oe),Ur=[{extensions:z,lookup:Wr},{extensions:ht,lookup:Se},{extensions:St,lookup:kt},{extensions:yt,lookup:ye},{extensions:xt,lookup:xe},{extensions:vt,lookup:Tt},{extensions:Nt,lookup:_t},{extensions:bt,lookup:ve},{extensions:Ct,lookup:Lt},{extensions:oe,lookup:Ft}];function T(e,t){return t.has(k(e).toLowerCase())}function zr(e){return T(e,Se)}function Mr(e){return T(e,kt)}function qr(e){return T(e,ye)}function Xr(e){return T(e,xe)}function Hr(e){return T(e,Tt)}function Jr(e){return T(e,_t)}function Ys(e){return k(e).toLowerCase()===".vb"}function Zr(e){return T(e,ve)}function Gr(e){return T(e,Lt)}function Kr(e){return T(e,Ft)}function Qr(e){let t=k(e).toLowerCase();for(let n of Ur)if(n.lookup.has(t))return n.extensions;return z}function Yr(e){return Mr(e)||Jr(e)||Gr(e)}function Pt(e,t,n){return zr(t)?fo(e,t,n):qr(t)?mo(e,t,n):Xr(t)?go(e,t,n):Hr(t)?ho(e,t,n):Yr(t)?So(e,n.replace(/\\/g,"."),Qr(t)):Zr(t)?yo(e,t,n):Kr(t)?xo(e,n):eo(e,t,n)}function eo(e,t,n){if(!n.startsWith(".")&&!n.startsWith("/"))return to(e,t,n)??ro(e,n);let r=h(x(e.config.projectRoot,t)),o=p(r,n),s=_(e);for(let i of be(o)){let a=v(P(e.config.projectRoot,i));if(s.has(a)||E(i))return a}return v(P(e.config.projectRoot,o))}function to(e,t,n){let r=lo(e,t);if(!r)return null;let o=_(e);for(let s of no(r,n)){let i=p(r.baseUrl,s);for(let a of be(i)){let c=v(P(e.config.projectRoot,a));if(o.has(c)||E(a))return c}}return null}function no(e,t){let n=[];for(let[r,o]of Object.entries(e.paths)){let s=r.indexOf("*");if(s===-1){if(t!==r)continue;n.push(...o);continue}let i=r.slice(0,s),a=r.slice(s+1);if(!t.startsWith(i)||!t.endsWith(a)||t.length<i.length+a.length)continue;let c=t.slice(i.length,t.length-a.length);for(let l of o)n.push(l.includes("*")?l.replace("*",c):l)}return n}function ro(e,t){let n=so(oo(e),t);if(!n)return null;let r=_(e);for(let o of io(n)){let s=p(e.config.projectRoot,n.pkg.relativeDir,o);for(let i of be(s)){let a=v(P(e.config.projectRoot,i));if(r.has(a)||E(i))return a}}return null}function oo(e){return Dr.get(e,()=>Ae(e.config.projectRoot))}function so(e,t){let n=null;for(let r of e){let o=null;t===r.name?o="":t.startsWith(`${r.name}/`)&&(o=t.slice(r.name.length+1)),o!==null&&(!n||r.name.length>n.pkg.name.length)&&(n={pkg:r,subpath:o})}return n}function io(e){let t=[],n=ao(e.pkg.exports,e.subpath);if(n){let r=co(n);r&&t.push(r)}return t.push(e.subpath?`src/${e.subpath}`:"src/index"),t}function ao(e,t){if(!e||typeof e!="object")return null;let n=t===""?".":`./${t}`;return Et(e[n])}function Et(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=Et(t[n]);if(r)return r}return null}function co(e){let t=e.replace(/^\.\//,"");return t.startsWith("dist/")?`src/${t.slice(5)}`:null}function lo(e,t){let n=v(h(t));return Ir.get(e,n,()=>uo(e,n))}function uo(e,t){let n=$r();if(!n)return null;let r=p(e.config.projectRoot),o=p(r,t);for(;o===r||o.startsWith(r+Ar);){for(let i of Or){let a=x(o,i);if(!E(a))continue;let c=Vr.get(e,a,()=>po(n,a));if(c)return c}let s=h(o);if(s===o)break;o=s}return null}function po(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,h(t)),o=r.options.paths;return!o||Object.keys(o).length===0?null:{baseUrl:r.options.baseUrl?p(h(t),r.options.baseUrl):h(t),paths:o}}catch{return null}}function fo(e,t,n){let r=_(e),o;if(n.startsWith(".")){let s=n.match(/^(\.+)(.*)$/);if(!s)return null;let i=s[1].length,a=s[2].replace(/^\./,""),c=h(x(e.config.projectRoot,t));for(let l=1;l<i;l++)c=h(c);o=a?p(c,a.replace(/\./g,"/")):c}else o=p(e.config.projectRoot,n.replace(/\./g,"/"));for(let s of vo(o)){let i=v(P(e.config.projectRoot,s));if(r.has(i)||E(s))return i}return null}function mo(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 o=h(x(e.config.projectRoot,t)),s;return r.startsWith("crate::")?s=p(e.config.projectRoot,"src",r.slice(7).replace(/::/g,"/")):r.startsWith("self::")?s=p(o,r.slice(6).replace(/::/g,"/")):s=p(h(o),r.slice(7).replace(/::/g,"/")),Ne(e,No(s))}function go(e,t,n){let r=h(x(e.config.projectRoot,t)),o=p(r,n);return Ne(e,bo(o))}function ho(e,t,n){let r=h(x(e.config.projectRoot,t)),o=[p(r,n),p(e.config.projectRoot,n),p(e.config.projectRoot,"include",n),p(e.config.projectRoot,"src",n)];return Ne(e,o)}function So(e,t,n){let r=_(e),o=t.replace(/\\/g,".").replace(/::/g,".").replace(/^global::/,""),s=o.replace(/\./g,"/"),i=o.split(".").pop()??o;for(let c of n){let l=`${s}${c}`,f=[...r].find(u=>u.endsWith(l));if(f)return f}for(let c of n){let l=[...r].find(f=>gt(f)===`${i}${c}`);if(l)return l}let a=[...r].filter(c=>n.includes(k(c).toLowerCase())).filter(c=>c.includes(`/${s}/`)||c.includes(`/${i}/`)).sort((c,l)=>c.localeCompare(l));return a.length===1?a[0]:null}function yo(e,t,n){let r=_(e);if(n.startsWith("package:")){let i=n.slice(8),a=i.indexOf("/");if(a<0)return null;let c=i.slice(a+1),l=v(c.startsWith("lib/")?c:`lib/${c}`);return r.has(l)?l:null}let o=h(x(e.config.projectRoot,t)),s=p(o,n);for(let i of Co(s)){let a=v(P(e.config.projectRoot,i));if(r.has(a)||E(i))return a}return null}function xo(e,t){let n=t.replace(/-/g,"_").replace(/\./g,"/"),r=_(e);for(let o of oe){let s=`${n}${o}`,i=[...r].find(a=>a.endsWith(s));if(i)return i}for(let o of oe){let s=[...r].find(i=>gt(i)===`${n.split("/").pop()}${o}`);if(s)return s}return null}function vo(e){let t=k(e);return Se.has(t)?[e]:[`${e}.py`,`${e}.pyi`,x(e,"__init__.py"),x(e,"__init__.pyi")]}function Ne(e,t){let n=_(e);for(let r of t){let o=v(P(e.config.projectRoot,r));if(n.has(o)||E(r))return o}return null}function No(e){let t=k(e);return ye.has(t)?[e]:[`${e}.rs`,x(e,"mod.rs")]}function bo(e){let t=k(e);return xe.has(t)?[e]:[`${e}.rb`,x(e,"index.rb")]}function Co(e){let t=k(e);return ve.has(t)?[e]:[`${e}.dart`,e]}function be(e){let t=k(e),n=new Set;if(t){n.add(e);for(let r of z)n.add(e.slice(0,-t.length)+r)}else for(let r of z)n.add(`${e}${r}`),n.add(x(e,`index${r}`));return[...n]}function _(e){return Rr.get(e,()=>new Set(q(e,{includeIgnored:!1}).map(v)))}function ei(e){return jr.get(e,()=>Te([..._(e)].sort().join(`
|
|
8
|
+
`)))}var ko=new Set(["in","key","of"]),To=new Set(["computed","defineEmits","defineProps","reactive","ref","watch","watchEffect"]),_o=L("vue-component-behavior-profiles");function wt(e,t={}){let n=O(e,{extensions:[".vue"]}).filter(o=>!t.scope||o.includes(t.scope)).sort();return(typeof t.scanLimit=="number"&&t.scanLimit>0?n.slice(0,t.scanLimit):n).map(o=>Ce(e,o)).filter(o=>(t.minTemplateTokens===void 0||o.templateTokens.size>=t.minTemplateTokens)&&(t.minBehaviorTokens===void 0||o.behaviorTokens.size>=t.minBehaviorTokens))}function Ce(e,t){let n=t.replace(/\\/g,"/"),r=g(e,n),o=_o.get(e,n,r,()=>Lo(e,n,r));return Po(o)}function Lo(e,t,n){let r=A(e,t),o=re(e,t),s=ne(r),i=Ao(o),a=o.expressionIdentifiers.map(m=>m.name).filter(m=>!i.includes(m)).filter((m,b,I)=>I.indexOf(m)===b).sort(),c=o.componentTags.map(m=>m.normalized).filter((m,b,I)=>I.indexOf(m)===b).sort(),l=n?n.split(`
|
|
9
9
|
`).length:0,f=F(r.template),u=s.lineCount,N=r.styles.reduce((m,b)=>m+F(b),0),V=r.customBlocks.reduce((m,b)=>m+F(b),0),{lines:se,paths:ie}=Fo(e,t,s);return{file:t,sfc:r,templateFacts:o,scriptFacts:s,templateTokens:new Set(o.structuralTokens),behaviorTokens:wo(o,s,a),templateBindingNames:a,templateLocalNames:i,componentNames:c,sfcLines:l,totalLines:l+s.externalLineCount,templateLines:f,scriptLines:u,styleLines:N,externalScriptLines:s.externalLineCount,externalScriptPaths:s.externalScriptPaths,customBlockLines:V,delegatedComposableLines:se,delegatedComposablePaths:ie}}function Fo(e,t,n){let r=new Set;for(let i of n.composables){let a=n.imports.find(l=>l.local===i);if(!a)continue;let c=Pt(e,a.sourcePath,a.source);!c||c===t||r.add(c)}let o=[...r].sort();return{lines:o.reduce((i,a)=>{let c=g(e,a);return i+(c?c.split(`
|
|
10
|
-
`).length:0)},0),paths:o}}function Po(e){let t=Eo(e.scriptFacts);return{...e,scriptFacts:t,templateTokens:new Set(e.templateTokens),behaviorTokens:new Set(e.behaviorTokens),templateBindingNames:[...e.templateBindingNames],templateLocalNames:[...e.templateLocalNames],componentNames:[...e.componentNames],externalScriptPaths:t.externalScriptPaths,delegatedComposablePaths:[...e.delegatedComposablePaths]}}function Eo(e){return{...e,imports:e.imports.map(t=>({...t})),functions:e.functions.map(t=>({...t})),calls:e.calls.map(t=>({...t,categories:[...t.categories]})),composables:[...e.composables],stores:[...e.stores],reactivity:[...e.reactivity],lifecycle:[...e.lifecycle],requests:[...e.requests],macros:[...e.macros],externalScriptPaths:[...e.externalScriptPaths],unresolvedScripts:e.unresolvedScripts.map(t=>({...t}))}}function wo(e,t,n){let r=new Set;for(let o of t.composables)r.add(`composable:${o}`);for(let o of t.stores)r.add(`store:${o}`);for(let o of t.reactivity)r.add(`reactivity:${o}`);for(let o of t.lifecycle)r.add(`lifecycle:${o}`);for(let o of t.requests)r.add(`request:${o}`);for(let o of t.macros)r.add(`macro:${o}`);for(let o of t.functions){if(To.has(o.name))continue;r.add(`function:${o.name}`);let s=/^[a-z]+/.exec(o.name)?.[0]??null;s&&s.length>2&&s!==o.name&&r.add(`function-verb:${s}`)}for(let o of e.events)r.add(`template-event:${o.name}`);for(let o of n)r.add(`template-binding:${o}`);return r}function Ao(e){let t=new Set;for(let n of e.directives)if(n.name==="for"&&n.value)for(let r of Ro(n.value))t.add(r);for(let n of e.slots)if(n.value)for(let r of At(n.value))t.add(r);return[...t].sort()}function Ro(e){let t=/^(.*?)\s+(?:in|of)\s+/.exec(e.trim());return t?At(t[1]??""):[]}function At(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];ko.has(r)||t.push(r)}return t}function gi(e){return{capability:(t,n)=>jo(t,n),reactProfiles:(t={})=>Ye(e,t),reactProfilesForFile:t=>me(e,t),vueProfiles:(t={})=>wt(e,t),vueProfileForFile:t=>Ce(e,t),vueTemplateFacts:t=>re(e,t),vueScriptFacts:t=>ne(A(e,t))}}function jo(e,t){let n=e.startsWith("react-")?"react":"vue";if(t===void 0)return{slot:e,available:!0,framework:n};let r=t.replace(/\\/g,"/").toLowerCase();return n==="react"&&!r.endsWith(".tsx")&&!r.endsWith(".jsx")?{slot:e,available:!1,framework:n,reason:"React behavior profiles are only available for .tsx and .jsx files"}:n==="vue"&&!r.endsWith(".vue")?{slot:e,available:!1,framework:n,reason:"Vue behavior facts are only available for .vue files"}:{slot:e,available:!0,framework:n}}export{we as a,v as b,
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
10
|
+
`).length:0)},0),paths:o}}function Po(e){let t=Eo(e.scriptFacts);return{...e,scriptFacts:t,templateTokens:new Set(e.templateTokens),behaviorTokens:new Set(e.behaviorTokens),templateBindingNames:[...e.templateBindingNames],templateLocalNames:[...e.templateLocalNames],componentNames:[...e.componentNames],externalScriptPaths:t.externalScriptPaths,delegatedComposablePaths:[...e.delegatedComposablePaths]}}function Eo(e){return{...e,imports:e.imports.map(t=>({...t})),functions:e.functions.map(t=>({...t})),calls:e.calls.map(t=>({...t,categories:[...t.categories]})),composables:[...e.composables],stores:[...e.stores],reactivity:[...e.reactivity],lifecycle:[...e.lifecycle],requests:[...e.requests],macros:[...e.macros],externalScriptPaths:[...e.externalScriptPaths],unresolvedScripts:e.unresolvedScripts.map(t=>({...t}))}}function wo(e,t,n){let r=new Set;for(let o of t.composables)r.add(`composable:${o}`);for(let o of t.stores)r.add(`store:${o}`);for(let o of t.reactivity)r.add(`reactivity:${o}`);for(let o of t.lifecycle)r.add(`lifecycle:${o}`);for(let o of t.requests)r.add(`request:${o}`);for(let o of t.macros)r.add(`macro:${o}`);for(let o of t.functions){if(To.has(o.name))continue;r.add(`function:${o.name}`);let s=/^[a-z]+/.exec(o.name)?.[0]??null;s&&s.length>2&&s!==o.name&&r.add(`function-verb:${s}`)}for(let o of e.events)r.add(`template-event:${o.name}`);for(let o of n)r.add(`template-binding:${o}`);return r}function Ao(e){let t=new Set;for(let n of e.directives)if(n.name==="for"&&n.value)for(let r of Ro(n.value))t.add(r);for(let n of e.slots)if(n.value)for(let r of At(n.value))t.add(r);return[...t].sort()}function Ro(e){let t=/^(.*?)\s+(?:in|of)\s+/.exec(e.trim());return t?At(t[1]??""):[]}function At(e){let t=[];for(let n of e.matchAll(/\b[A-Za-z_$][\w$]*\b/g)){let r=n[0];ko.has(r)||t.push(r)}return t}function gi(e){return{capability:(t,n)=>jo(t,n),reactProfiles:(t={})=>Ye(e,t),reactProfilesForFile:t=>me(e,t),vueProfiles:(t={})=>wt(e,t),vueProfileForFile:t=>Ce(e,t),vueTemplateFacts:t=>re(e,t),vueScriptFacts:t=>ne(A(e,t))}}function jo(e,t){let n=e.startsWith("react-")?"react":"vue";if(t===void 0)return{slot:e,available:!0,framework:n};let r=t.replace(/\\/g,"/").toLowerCase();return n==="react"&&!r.endsWith(".tsx")&&!r.endsWith(".jsx")?{slot:e,available:!1,framework:n,reason:"React behavior profiles are only available for .tsx and .jsx files"}:n==="vue"&&!r.endsWith(".vue")?{slot:e,available:!1,framework:n,reason:"Vue behavior facts are only available for .vue files"}:{slot:e,available:!0,framework:n}}export{we as a,v as b,Io as c,Bo as d,Ae as e,Mt as f,z as g,ht as h,St as i,yt as j,xt as k,vt as l,Nt as m,bt as n,Ct as o,oe as p,Ys as q,Qr as r,Pt as s,fo as t,mo as u,go as v,ho as w,So as x,yo as y,xo as z,ei as A,X as B,je as C,We as D,ze as E,Q as F,K as G,at as H,pt as I,us as J,He as K,O as L,ps as M,gi as N};
|
|
11
|
+
//# sourceMappingURL=chunk-DGMCFMPG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as B,c as W,d as G,e as J,l as K}from"./chunk-
|
|
1
|
+
import{b as B,c as W,d as G,e as J,l as K}from"./chunk-JERWGHQT.js";import{d as Q,e as U}from"./chunk-MTDBHTSF.js";import{e as T,g as x,s as F,t as j,y as $,z as H}from"./chunk-ZTTISZ7J.js";import{k as v,p as P}from"./chunk-7LABSJSR.js";import{B as L,c as O}from"./chunk-DGMCFMPG.js";import{m as N}from"./chunk-B5MHCHP3.js";function Me(t,n,e={}){let o=Y(t,[n],{additive:e.additive,semantic:e.semantic,semanticEvidence:e.semanticEvidence}),l=e.callableOnly?(o.get(n.symbolId)??[]).filter(a=>x(a.symbol)||a.source==="ast-callsite"):o.get(n.symbolId)??[];return typeof e.limit=="number"?l.slice(0,e.limit):l}function Ie(t,n,e){return X(t,[n],e).get(n.symbolId)??[]}function X(t,n,e){let o=te(t)?ie(t,n,{semantic:e.semantic!==!1,semanticEvidence:e.semanticEvidence}):oe(t,e.semanticEvidence);return typeof e.limit!="number"?new Map(n.map(l=>[l.symbolId,o.get(l.symbolId)??[]])):new Map(n.map(l=>[l.symbolId,(o.get(l.symbolId)??[]).slice(0,e.limit)]))}var ee=N("caller-rows",{clearGroups:["whole-project"]}),ne=2e4;function te(t){return(t.get("SELECT COUNT(*) AS count FROM global_symbols")?.count??0)>ne}function oe(t,n){return ee.get(t,()=>{let e=j(t),o=Y(t,e,{semanticEvidence:n}),l=new Map;for(let s of e)l.set(s.symbol,s.symbolId);let a=new Map,c=new Map;for(let s of e){let d=o.get(s.symbolId);if(!(!d||d.length===0))for(let b of d){let r=l.get(b.symbol);if(r===void 0||r===s.symbolId)continue;let u=a.get(r);u||(u=[],a.set(r,u),c.set(r,new Set));let m=`${s.symbol}|${s.relativePath}`;c.get(r).has(m)||(c.get(r).add(m),u.push({symbol:s.symbol,file:s.relativePath,source:"caller-map-inversion"}))}}return a})}function ie(t,n,e){let o=e.semantic&&e.semanticEvidence?n.flatMap(s=>{let d=le(t,s);return d?[d]:[]}):[],l=new Map(o.map(s=>[s.symbolId,s])),a=e.semanticEvidence?.referenceMap(t,o)??new Map,c=new Map;for(let s of n){let d=[],b=new Set,r=m=>{if(m.symbol===s.symbol)return;let i=`${m.symbol}|${m.file}`;b.has(i)||(b.add(i),d.push(m))};for(let m of K(t,s))m.file!==s.relativePath&&r({symbol:m.enclosingSymbol??m.file,file:m.file,source:"resolved-reference"});let u=l.get(s.symbolId);if(u)for(let m of a.get(u.symbolId)??[]){if(m.file===s.relativePath||t.isIgnored(m.file))continue;let i=H(F(t,m.file),m.line);r({symbol:i?.symbol??m.file,file:m.file,source:"semantic-reference"})}c.set(s.symbolId,d)}return c}function le(t,n){let e=Q().join(", "),o=U().join(", ");return t.get(`SELECT
|
|
2
2
|
d.id AS documentId,
|
|
3
3
|
gs.id AS symbolId,
|
|
4
4
|
gs.symbol,
|
|
@@ -35,4 +35,4 @@ import{b as B,c as W,d as G,e as J,l as K}from"./chunk-LBMJEAEW.js";import{d as
|
|
|
35
35
|
) def_chunk ON def_chunk.symbol_id = gs.id
|
|
36
36
|
WHERE gs.id IN (${i.map(()=>"?").join(",")})`,...i,...i)),s=k([...n.map(i=>i.documentId),...c.flatMap(i=>i.document_id===null?[]:[i.document_id])]),d=new Map(s.flatMap(i=>t.all(`SELECT id, relative_path FROM documents
|
|
37
37
|
WHERE id IN (${i.map(()=>"?").join(",")})`,...i).map(p=>[p.id,p.relative_path]))),b=new Map;for(let i of c)b.has(i.symbol_id)||b.set(i.symbol_id,{symbol:i.symbol,file:i.document_id!==null?d.get(i.document_id)??"":""});let r=new Map,u=d,m=de(n);for(let[i,p]of m){let h=[...l.get(i)??[]].sort((f,g)=>f.start_line-g.start_line||f.end_line-g.end_line),Z=[...p].sort((f,g)=>f.startLine-g.startLine||f.endLine-g.endLine),C=new Set,M=0;for(let f of Z){for(;M<h.length&&h[M].start_line<=f.endLine;)C.add(h[M]),M+=1;for(let y of C)y.end_line<f.startLine&&C.delete(y);let g=new Set,A=[],R=null,q=()=>{if(R)return R;let y=u.get(f.documentId)??"",S=new Set;if(y){let w=B(t,y),I=Math.max(0,f.startLine),D=Math.min(w.length-1,f.endLine);for(let E=I;E<=D;E+=1)for(let z of w[E])S.add(z)}return R=S,S};for(let y of C){if(y.symbol_id===f.symbolId)continue;let S=b.get(y.symbol_id);if(!S)continue;if(!(y.start_line>=f.startLine&&y.end_line<=f.endLine)){if(!(y.start_line<=f.endLine&&y.end_line>=f.startLine))continue;let E=T(S.symbol);if(!E||!q().has(E))continue}let I=`${S.symbol}|${y.chunk_id}`;g.has(I)||(g.add(I),A.push({...S,chunkId:y.chunk_id,source:"scip-chunk"}))}r.set(f.symbolId,A)}}return r}var V=500;function k(t){let n=[...new Set(t)],e=[];for(let o=0;o<n.length;o+=V)e.push(n.slice(o,o+V));return e}function de(t){let n=new Map;for(let e of t){let o=n.get(e.documentId);o?o.push(e):n.set(e.documentId,[e])}return n}function ue(t){let n=new Map;for(let[e,o]of t){let l=[];for(let a of o)l.push({symbol:a.symbol,file:a.file,chunkId:-1,source:"semantic-callee"});n.set(e,l)}return n}export{Me as a,Ie as b,X as c,Y as d};
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-E2ZXPB7J.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as C,b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as C,b}from"./chunk-MGBJHRFB.js";import{a as P,c as y,e as r,f}from"./chunk-B3X6KU75.js";import{a as g,b as h,c as k}from"./chunk-KMVGRIO2.js";import{N as v}from"./chunk-DGMCFMPG.js";function L(e,i={}){let{minSimilarity:o=.62,minTokens:n=8,limit:c=20,scope:l,scanLimit:u,filePattern:m,focusFiles:d}=i,s=B(e,{scope:l,minTokens:n,scanLimit:u}),p=C(s,t=>t.tokens);return b({profiles:s,limit:c,filePattern:m,focusFiles:d,candidateIndex:p,profile:{name:"vue-component-duplicates"},compare:(t,a)=>V(t,a,o),sort:(t,a)=>a.similarity-t.similarity||t.fileA.localeCompare(a.fileA)||t.fileB.localeCompare(a.fileB)})}function B(e,i){return v(e).vueProfiles({scope:i.scope,minTemplateTokens:i.minTokens,scanLimit:i.scanLimit}).map(o=>({file:o.file,tokens:o.templateTokens,loc:T(o)}))}function T(e){return e.totalLines}function V(e,i,o){let n=g(e.tokens,i.tokens);if(n.size<6||!R(n))return null;let c=k(e.tokens,i.tokens);if(c<o)return null;let l=r(n,"component:"),u=r(n,"prop:"),m=r(n,"event:"),d=r(n,"directive:"),s=r(n,"slot:"),p=r(n,"id:"),t=S({sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p});return{fileA:e.file,fileB:i.file,similarity:c,tokenCountA:e.tokens.size,tokenCountB:i.tokens.size,sharedTokens:f(n),sharedComponents:l,sharedProps:u,sharedEvents:m,sharedDirectives:d,sharedSlots:s,sharedIdentifiers:p,evidenceClass:t.evidenceClass,actionTier:t.actionTier,evidenceClassReasons:t.reasons,recommendation:t.recommendation,uniqueToA:f(h(e.tokens,i.tokens)).slice(0,25),uniqueToB:f(h(i.tokens,e.tokens)).slice(0,25),locA:e.loc,locB:i.loc}}function R(e){let i=0,o=0;for(let n of e)n.startsWith("component:")&&(i+=1),(n.startsWith("prop:")||n.startsWith("event:")||n.startsWith("directive:")||n.startsWith("slot:"))&&(o+=1);return y([{name:"component",count:i},{name:"behavior",count:o}],[{min:{component:1},reason:"shared custom component"},{min:{behavior:3},reason:"shared Vue template structure"}]).pass}function S(e){return P({genericWords:x,primitiveGroups:[{values:e.sharedProps,reasonPrefix:"shared props",bucket:"generic"},{values:e.sharedEvents,reasonPrefix:"shared events",bucket:"generic"},{values:e.sharedDirectives,reasonPrefix:"shared directives",bucket:"generic"},{values:e.sharedSlots,reasonPrefix:"shared slots",bucket:"generic"}],nameGroups:[{names:e.sharedComponents,label:"shared component",fallbackBucket:"generic"},{names:e.sharedIdentifiers,label:"shared identifier",fallbackBucket:"generic"}],recommendation:w})}function w(e){switch(e){case"domain-behavior":case"mixed":return"Review for a shared component or feature-specific Vue primitive around the named domain structure.";case"shared-abstraction":return"Review the existing shared component usage first; extract only if duplicated structure remains outside it.";case"generic-workflow-scaffolding":return"Generic structural overlap \u2014 verify intent before consolidating."}}var x=new Set(["actions","app","button","card","content","container","dialog","field","form","header","input","item","label","layout","list","modal","page","panel","row","section","shell","table","text","toolbar","ui","value","view","wrapper"]);export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EVOC5I5I.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-UUJBLG6J.js";import{c as C}from"./chunk-ADFSIJP2.js";import{b as f,c as I}from"./chunk-XVJ3V7LM.js";import{h as d}from"./chunk-Z5QQPJ3U.js";import{d as h}from"./chunk-MTDBHTSF.js";import{d as g}from"./chunk-ZTTISZ7J.js";import{f as y}from"./chunk-7LABSJSR.js";var x=new Set(h());function N(e,n){let{scope:o,minLoc:r=10,limit:i=30,scanLimit:t}=n??{},s=new I(e);return M({candidates:()=>s.productionCallableDefinitions({scope:o,minLoc:r,requireFunctionLikeSymbol:!0,includeSuppressed:!0,sortByLocDesc:typeof t=="number"&&t>0}),scanLimit:t,filterCandidate:S,profile:{name:"complexity-hotspots"},prepare:a=>{let l=B(e,a),m=n?.semantic!==!1,c=m?d(e):null;c?.materializeReferences(a,{prefetchCallees:!0});let u=s.crossFileCallerMap(a,{semantic:!1});return{callerMap:c?f(u,c.callerMap(a)):u,calleeMap:s.calleeMap(a,{semantic:m}),languageByFile:l,clojureCallableIds:D(e,a,l),branchEstimates:C(e,a)}},evaluate:(a,l)=>L(a,l,r),orderResults:(a,l)=>l.score-a.score||l.loc-a.loc,limit:i})}function S(e){return e.symbol.startsWith("rust-analyzer ")?typeof e.kind=="number"&&x.has(e.kind):!0}function L(e,n,o){if(n.languageByFile.get(e.relativePath)==="clojure"&&!n.clojureCallableIds.has(e.symbolId))return null;let r=e.endLine-e.startLine+1;if(r<o)return null;let i=n.callerMap.get(e.symbolId)?.size??0,t=n.calleeMap.get(e.symbolId)??[],s=new Set,a=new Set;for(let p of t){let b=`${p.symbol}|${p.file}`;s.add(b),p.file!==e.relativePath&&a.add(b)}let l=a.size,m=s.size,c=n.branchEstimates.get(e.symbolId)??{branches:0,estimateBasis:"regex-fallback"},u=c.branches+1;return{symbol:e.symbol,shortName:g(e.symbol),file:e.relativePath,startLine:e.startLine,endLine:e.endLine,loc:r,fanIn:i,fanOut:l,calleeCount:m,branches:c.branches,estimateBasis:c.estimateBasis,score:Math.round(r/50*(i/5)*Math.max(l/5,1)*Math.max(u/5,1)*100)/100}}function B(e,n){let o=[...new Set(n.map(t=>t.relativePath))];if(o.length===0)return new Map;let r=o.map(()=>"?").join(", "),i=e.all(`SELECT relative_path, language
|
|
2
2
|
FROM documents
|
|
3
3
|
WHERE relative_path IN (${r})`,...o);return new Map(i.map(t=>[t.relative_path,t.language?.toLowerCase()??null]))}function D(e,n,o){let r=new Set,i=new Map;for(let t of n){if(o.get(t.relativePath)!=="clojure")continue;let s=i.get(t.relativePath);s||(s=new Set((y(e,t.relativePath)?.callables??[]).map(a=>`${a.name}:${a.startLine}`)),i.set(t.relativePath,s)),s.has(`${t.leaf}:${t.startLine}`)&&r.add(t.symbolId)}return r}export{N as a};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-F42A3AKG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-N3SE646F.js";import{a as r}from"./chunk-2OXVAGGT.js";import{a as l}from"./chunk-YLVE3SXZ.js";import{d as c}from"./chunk-ZTTISZ7J.js";function y(n,o){let e=r(n,o);if(!e)return[];let i=n.get(`SELECT COUNT(DISTINCT c.document_id) AS file_count
|
|
2
2
|
FROM mentions m
|
|
3
3
|
JOIN chunks c ON m.chunk_id = c.id
|
|
4
4
|
JOIN (
|
|
@@ -70,4 +70,4 @@ import{a as _}from"./chunk-54HA4ZXH.js";import{a as r}from"./chunk-FECYOO5O.js";
|
|
|
70
70
|
GROUP BY d.id
|
|
71
71
|
ORDER BY symbol_count DESC
|
|
72
72
|
LIMIT ?`,...m,e).filter(t=>!n.isIgnored(t.relative_path)).map(t=>({name:t.relative_path,count:t.symbol_count}))}export{y as a,b,p as c,I as d};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-FHCTEANE.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as R}from"./chunk-
|
|
1
|
+
import{c as R}from"./chunk-XVJ3V7LM.js";import{a as _,d as f}from"./chunk-WMXRRBII.js";import{d as l}from"./chunk-ZTTISZ7J.js";import{o as u,p,q as a}from"./chunk-7LABSJSR.js";import{H as m}from"./chunk-B5MHCHP3.js";import{a as d}from"./chunk-64MNV6AB.js";function $(e,o={}){let{scope:n,limit:r}=o,i=new R(e),t=D([...x(e,n),...O(e,i,n)]);return y(t),r?t.slice(0,r):t}function x(e,o){let n=[];for(let r of S(e,o)){if(e.isIgnored(r.barrel_path)||e.isIgnored(r.original_path)||f(e,r.barrel_path)||m(e,r.barrel_path)&&a(e,r.barrel_path).length===0)continue;let i=N(e,r),t=i?.barrel_consumers??0,s=i?.direct_consumers??0;t!==0||s!==0||n.push({barrelFile:r.barrel_path,symbol:r.symbol,shortName:l(r.symbol),originalFile:r.original_path,barrelConsumers:t,directConsumers:s,...b(e,r.barrel_path)})}return n}function S(e,o){let n=o?"AND barrel_d.relative_path LIKE ?":"",r=o?[`%${o}%`]:[];return e.all(`SELECT DISTINCT
|
|
2
2
|
barrel_d.id AS barrel_doc_id,
|
|
3
3
|
barrel_d.relative_path AS barrel_path,
|
|
4
4
|
gs.id AS symbol_id,
|
|
@@ -58,4 +58,4 @@ import{c as R}from"./chunk-NH5ALKPW.js";import{a as _,d as f}from"./chunk-Q3AFUT
|
|
|
58
58
|
${e.pathExclusionsFor("consumer_d")}
|
|
59
59
|
GROUP BY consumer_d.id
|
|
60
60
|
)`,o.barrel_doc_id,o.symbol_id,o.barrel_doc_id,o.original_doc_id)}function O(e,o,n){let r=[];for(let i of C(e,n))h(e,i,i)>0||r.push(...I(e,o,i));return r}function C(e,o){return d(e,{scope:o,includeIgnored:!1}).filter(n=>a(e,n).length>0||u(e,n).length>0)}function I(e,o,n){let r=a(e,n).filter(t=>t.sourcePath&&!e.isIgnored(t.sourcePath)).flatMap(t=>g(e,o,n,t.sourcePath,[A(t.specifier)])),i=u(e,n).filter(t=>t.sourcePath&&!e.isIgnored(t.sourcePath)).flatMap(t=>g(e,o,n,t.sourcePath,t.kind==="named"&&t.names.length>0?t.names:[t.kind==="star"?`* from ${t.sourcePath}`:`* namespace from ${t.sourcePath}`]));return[...r,...i]}function g(e,o,n,r,i){let t=o.definitionsForFile(r);return i.map(s=>{let c=t.find(E=>E.leaf===s);return{barrelFile:n,symbol:c?.symbol??`source-reexport:${n}:${s}`,shortName:c?l(c.symbol):s,originalFile:r,barrelConsumers:0,directConsumers:h(e,r,n),...b(e,n)}})}function A(e){return e.split("::").at(-1)?.split("/").at(-1)?.replace(/\.[^.]+$/,"")??e}function b(e,o){return _(e,o)?{actionTier:"signal",surfaceEvidence:["barrel file is declared on the package public surface"],recommendation:"Review the package API before removing this re-export; local consumers are zero, but external consumers may import through the public barrel."}:{actionTier:"direct",surfaceEvidence:[],recommendation:"Remove this unused re-export when the barrel is not part of an external API surface."}}function h(e,o,n){let r=new Set;for(let i of d(e,{includeIgnored:!1}))if(i!==n)for(let t of p(e,i))t.sourcePath===o&&r.add(i);return r.size}function D(e){let o=new Set,n=[];for(let r of e){let i=`${r.barrelFile}|${r.symbol}|${r.originalFile}`;o.has(i)||(o.add(i),n.push(r))}return n}function y(e){e.sort((o,n)=>n.directConsumers-o.directConsumers||o.barrelFile.localeCompare(n.barrelFile)||o.shortName.localeCompare(n.shortName))}export{$ as a};
|
|
61
|
-
//# sourceMappingURL=chunk-
|
|
61
|
+
//# sourceMappingURL=chunk-FKGN4A4E.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as P}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as P}from"./chunk-XVJ3V7LM.js";import{m as O,n as C}from"./chunk-JERWGHQT.js";import{h as x,k as v,o as T}from"./chunk-Z5QQPJ3U.js";import{d as A}from"./chunk-ZTTISZ7J.js";import{f as b}from"./chunk-7LABSJSR.js";import{B as g}from"./chunk-DGMCFMPG.js";function U(e,n={}){let{samples:o=50,scope:r,maxDisagreements:u=5}=n,l=new P(e),a=K(l.productionCallableDefinitions({scope:r,minLoc:2,requireFunctionLikeSymbol:!0}),o),c=z(e,a);if(a.length===0||!c)return{available:!1,sampleSize:a.length,oracleCoverage:0,scores:[],topDisagreements:[]};let t={references:Q(),callees:Q()},i=[],f=0,m=c==="semantic"?T(e,a):new Map,I=c==="source"?_(e,l,a):null;for(let s of a){let p=S(s,c==="semantic"?v(e,s).map(d=>d.file):[...I?.referencesBySymbolId.get(s.symbolId)??[]]),L=S(s,c==="semantic"?(m.get(s.symbolId)??[]).map(d=>d.file):[...I?.calleesBySymbolId.get(s.symbolId)??[]]);f+=1;let k=S(s,O(e,s,{semanticEvidence:C}).map(d=>d.file)),w=S(s,(l.calleeMap([s],{semantic:!1}).get(s.symbolId)??[]).map(d=>d.file)),R=y(c,"references"),B=y(c,"callees");M(t.references,s,"references",k,p,R,i),M(t.callees,s,"callees",w,L,B,i)}return i.sort((s,p)=>p.cheapOnly.length+p.oracleOnly.length-(s.cheapOnly.length+s.oracleOnly.length)),{available:!0,sampleSize:a.length,oracleCoverage:a.length>0?D(f/a.length):0,oracleKind:c,scores:["references","callees"].map(s=>F(s,t[s],c)),topDisagreements:i.slice(0,u)}}function Q(){return{comparedSymbols:0,agreed:0,cheapTotal:0,oracleTotal:0,skippedOraclePartial:0}}function K(e,n){let o=[...e].sort((l,a)=>l.symbolId-a.symbolId);if(o.length<=n)return o;let r=o.length/n,u=[];for(let l=0;l<n;l++)u.push(o[Math.floor(l*r)]);return u}function z(e,n){let o=n[0];if(!o)return null;if(h(e,o))return"source";try{if(x(e).capability("semantic-references",o.relativePath).available)return"semantic"}catch{}return n.some(r=>h(e,r))?"source":null}function S(e,n){let o=new Set;for(let r of n)r!==e.relativePath&&o.add(r);return o}function M(e,n,o,r,u,l,a){if(!l&&u.size===0){e.skippedOraclePartial+=1;return}e.comparedSymbols+=1,e.cheapTotal+=r.size,e.oracleTotal+=u.size;let c=[],t=[];for(let i of r)u.has(i)?e.agreed+=1:c.push(i);for(let i of u)r.has(i)||t.push(i);(c.length>0||t.length>0)&&a.push({symbol:A(n.symbol),question:o,cheapOnly:c,oracleOnly:t})}var E={references:!0,callees:!1};function F(e,n,o){let r=n.oracleTotal>0?n.agreed/n.oracleTotal:1,u=n.cheapTotal-n.agreed,l=y(o,e);return{question:e,comparedSymbols:n.comparedSymbols,precision:l&&n.cheapTotal>0?D(n.agreed/n.cheapTotal):null,recall:D(r),unverified:u,skippedOraclePartial:n.skippedOraclePartial}}function y(e,n){return e==="semantic"?E[n]:!1}function h(e,n){return g(n.relativePath)==="clojure"&&b(e,n.relativePath)!==null}function _(e,n,o){let r=new Map,u=new Map,l=o.filter(t=>h(e,t)),a=new Map;for(let t of l){let i=a.get(t.leaf)??[];i.push(t),a.set(t.leaf,i)}for(let t of n.sourceFiles()){if(g(t)!=="clojure")continue;let i=b(e,t);if(i)for(let f of i.fileIdentifiers)for(let m of a.get(f)??[])j(r,m.symbolId,t)}let c=new Map;for(let t of n.scopedDefinitions()){if(g(t.relativePath)!=="clojure")continue;let i=c.get(t.leaf)??[];i.push(t),c.set(t.leaf,i)}for(let t of l){let i=b(e,t.relativePath);if(i){for(let f of i.callSites)if(!(f.line<t.startLine||f.line>t.endLine))for(let m of c.get(f.calleeLeaf)??[])j(u,t.symbolId,m.relativePath)}}return{referencesBySymbolId:r,calleesBySymbolId:u}}function j(e,n,o){let r=e.get(n);if(r){r.add(o);return}e.set(n,new Set([o]))}function D(e){return Math.round(e*1e3)/1e3}export{U as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FQTPPXNA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{L as c}from"./chunk-DGMCFMPG.js";import{H as p,J as u,m as a}from"./chunk-B5MHCHP3.js";var l=a("suppression-inventory",{clearGroups:["whole-project"]});function b(e){return l.get(e,()=>f(e))}function f(e){let r={dead:0,stale:0,wrapper:0,passthrough:0,drift:0,extract:0,similar:0,twin:0,uncategorized:0},t=new Map,s=0;for(let o of c(e)){let n=p(e,o);if(!(!n||!n.includes("scip-query")))for(let g of n.split(/\r?\n/)){let i=u(g);if(i===null)continue;s+=1,t.set(o,(t.get(o)??0)+1);let y=d(i);r[y]+=1}}return{total:s,byCategory:r,byFile:t}}function d(e){if(!e)return"uncategorized";let r=e.toLowerCase();return r==="dead-code"?"dead":r}export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-G4UQL4CP.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as Z,c as ve,e as L,f as Ae,h as Te,k as ee,l as te,m as F}from"./chunk-A63U2W3P.js";import{a as N}from"./chunk-YLVE3SXZ.js";import{B as Y,E as Pe,G as Fe,a as he,b as Se,c as xe,f as k,h as Ie,m as Re,p as X}from"./chunk-B5MHCHP3.js";import{a as we}from"./chunk-64MNV6AB.js";import{b as Me,c as p}from"./chunk-35SQLYCQ.js";import{execFileSync as Ee}from"child_process";import{existsSync as ne,readFileSync as ot}from"fs";import{createRequire as st}from"module";import{platform as je}from"os";import{dirname as Be,join as C}from"path";var at=st(import.meta.url),Un={language:"rust",indexerBinary:"rust-analyzer",installUrl:"https://github.com/rust-lang/rust-analyzer"};function re(t){return[t.indexerBinary,...t.binaryAliases??[]]}function ct(t){let e=re(t);return e.length===1?e[0]:e.join(" or ")}function ie(t){for(let e of re(t))if(je()==="win32"){let n=ve(e);if(n)return n}else if(Z(e))return e;return lt(t)}function Kn(t){return ie(t)!==null||dt(t)}function dt(t){return De(t)!==null}function lt(t){let e=De(t);if(!e)return null;let r=JSON.parse(ot(e,"utf8")).bin;if(!r)return null;if(typeof r=="string")return C(Be(e),r);for(let i of re(t)){let o=r[i];if(o)return C(Be(e),o)}return null}function De(t){if(!t.bundledNpmPackage)return null;try{return at.resolve(`${t.bundledNpmPackage}/package.json`)}catch{return null}}function ut(t,e){for(let n of t.projectLocalBinaries??[]){let r=C(e,n);if(ne(r))return r}return null}function pt(t,e){return ut(t,e)??ie(t)}function Qn(t,e=process.env,n=t.indexerBinary){if(t.indexerBinary!=="scip-dotnet"||oe(n,e))return e;let r=ke(n,e);return r?{...e,DOTNET_ROOT:r}:e}function Xn(t,e){let n=ct(t),r=e?pt(t,e):ie(t);if(!r)return{language:t.language,binaryLabel:n,installed:!1,runnable:!1,resolvedBinary:null,installUrl:t.installUrl};if(t.indexerBinary!=="scip-dotnet")return{language:t.language,binaryLabel:n,installed:!0,runnable:!0,resolvedBinary:r};let i=ft(r);return{language:t.language,binaryLabel:n,installed:!0,runnable:i.runnable,resolvedBinary:r,installUrl:t.installUrl,note:i.note}}function ft(t){if(oe(t,process.env))return{runnable:!0};let e=ke(t,process.env);if(e)return{runnable:!0,note:`using .NET 9 runtime from ${e}`};let n=Ne(process.env);return{runnable:!1,note:n.length>0?`.NET 9 runtime still unavailable after checking ${n.join(", ")}`:"binary is present, but scip-dotnet still needs a .NET 9 runtime"}}function ke(t,e){for(let n of Ne(e))if(oe(t,{...e,DOTNET_ROOT:n}))return n;return null}function Ne(t){let e=[],n=t.DOTNET_ROOT;if(n&&ne(n)&&e.push(n),je()==="darwin"&&Z("brew"))try{let r=Ee("brew",["--prefix","dotnet@9"],{stdio:"pipe",env:t,timeout:1e4,killSignal:"SIGKILL"}).toString().trim(),i=C(r,"libexec");ne(i)&&!e.includes(i)&&e.push(i)}catch{}return e}function oe(t,e){try{return Ee(t,["--version"],{stdio:"pipe",env:e,timeout:1e4,killSignal:"SIGKILL"}),!0}catch{return!1}}function er(t,e,n={}){ee(t,Le(e,n),{durability:"visibility",runtime:n.runtime})}function tr(t,e,n={}){return ee(t,Le(e,n),{durability:"durable",runtime:n.runtime})}function Le(t,e){let n=JSON.stringify(t,null,e.spacing);return e.trailingNewline?`${n}
|
|
2
|
+
`:n}import{execFileSync as mt}from"child_process";import{createHash as Ce}from"crypto";import{lstatSync as gt,readdirSync as yt,readFileSync as bt,readlinkSync as ht,realpathSync as Oe}from"fs";import{isAbsolute as St,join as qe,relative as xt,sep as Mt}from"path";function It(t){return[...new Set((t??[]).map(e=>e.trim()).filter(Boolean))].sort((e,n)=>e.localeCompare(n))}function Rt(t){return(Ft(t)??vt(t)).filter(e=>e&&!_e(e)).sort()}function wt(t,e={}){let n=Rt(t).filter(i=>!e.language||Se(i,e.language,e.markerFiles)).filter(i=>!e.includePath||e.includePath(i)),r=Oe(t);return n.map(i=>{let o=qe(t,i);try{if(gt(o).isSymbolicLink()){let a=Oe(o),d=xt(r,a);if(d===".."||d.startsWith(`..${Mt}`)||St(d))throw new Error("external symlink");let u=ht(o);return{path:i,size:Buffer.byteLength(u),hash:Ce("sha256").update("symlink\0").update(u).digest("hex")}}let s=bt(o);return{path:i,size:s.byteLength,hash:Ce("sha256").update(s).digest("hex")}}catch{return{path:i,size:-1,hash:"unreadable"}}})}function cr(t,e,n){return{version:2,languages:[...e].sort(),pnpmWorkspaces:n.typescriptProjectMode!=="workspace"&&n.pnpmWorkspaces===!0,typescriptProjectMode:n.typescriptProjectMode??"single",typescriptProjects:It(n.typescriptProjects),clojureConfigPath:Pt(n.clojureConfigPath),files:wt(t)}}function Pt(t){return t?.trim()||void 0}function Ft(t){try{return mt("git",["-C",t,"ls-files","-co","--exclude-standard","--","."],{encoding:"utf-8",maxBuffer:50*1024*1024,stdio:["ignore","pipe","ignore"],timeout:3e4,killSignal:"SIGKILL"}).split(`
|
|
3
|
+
`).filter(Boolean)}catch{return null}}function vt(t){let e=[],n=[""];for(;n.length>0;){let r=n.pop(),i=r?qe(t,r):t,o;try{o=yt(i,{withFileTypes:!0})}catch{continue}for(let s of o){let a=r?`${r}/${s.name}`:s.name;if(s.isDirectory()){_e(a)||n.push(a);continue}e.push(a)}}return e}function _e(t){let e=t.split("/");return t==="meta.json"||e.some(n=>At.has(n))||t.endsWith(".db")||t.endsWith(".db-wal")||t.endsWith(".db-shm")||t.endsWith(".scip")}var At=new Set([".git","node_modules",".scipquery-cache",".scipquery-generations",".stryker-tmp","dist","build","coverage",".next",".nuxt","target"]);var Tt=[".ts",".tsx",".mts",".cts",".js",".jsx",".mjs",".cjs"];function O(t){let e=t.toLowerCase();return Tt.some(n=>e.endsWith(n))}function _(t){let e=q(t.projectFiles),n=new Set(e),r=new Map(t.snapshot.files.map(c=>[c.path,c])),i=t.snapshot.files.filter(c=>{let g=he(c.path,["typescript"]);return g==="config"||g==="ambient"}).map(c=>c.path),o=q([...e,...i]),s=o.find(c=>!r.has(c)),a=new Set(t.snapshot.files.map(c=>c.path)).size!==t.snapshot.files.length,d=!s&&o.some(c=>$e(r.get(c))),u=X(JSON.stringify({pnpmWorkspaces:t.snapshot.pnpmWorkspaces,typescriptProjectMode:t.snapshot.typescriptProjectMode,typescriptProjects:q(t.snapshot.typescriptProjects),membership:e})),l=new Map;return{identityFor(c,g){if(!n.has(c))return I("target-outside-project");if(a)return I("duplicate-input-path");if(s)return I("missing-input-fingerprint");if(d)return I("unreadable-input");let h=[],f,S;if(t.graph===null)h.push("dependency-graph-unavailable"),S="whole-project",f=o;else{let D=Et(c,t.graph,l);if(D.find(Q=>!r.has(Q)))return I("missing-input-fingerprint");if(f=q([...D,...i]),f.some(Q=>$e(r.get(Q))))return I("unreadable-input");S="dependency-closure"}let j=f.map(D=>jt(r.get(D)));return{version:1,key:X(JSON.stringify({version:1,engineIdentity:t.engineIdentity,schemaVersion:g,projectIdentity:u,inputs:j})),mode:S,inputFiles:f,reasons:h}}}}function Bt(t,e){let n=new Set,r=[t];for(let i=0;i<r.length;i+=1){let o=r[i];if(!(o===void 0||n.has(o))){n.add(o);for(let s of[...e.get(o)??[]].sort())n.has(s)||r.push(s)}}return[...n].sort()}function Et(t,e,n){let r=n.get(t);if(r)return r;let i=Bt(t,e);return n.set(t,i),i}function jt(t){return{path:t.path,size:t.size,hash:t.hash}}function $e(t){return t.size<0||t.hash==="unreadable"}function I(t){return{version:1,key:null,mode:"unkeyed",inputFiles:[],reasons:[t]}}function q(t){return[...new Set(t)].sort()}import{createRequire as Dt}from"module";var Ge=Dt(import.meta.url),v,$;function kt(){if(v!==void 0)return v;try{v=Ge("ts-morph")}catch{v=null}return v}function G(){if($)return $;let t=kt();if(!t)return"ts-morph:unavailable";let e="unknown";try{e=Ge("ts-morph/package.json").version??"unknown"}catch{}return $=`ts-morph:${e}:typescript:${t.ts.version}`,$}function gr(t,e){return e.map(n=>({tsconfigPath:n,project:new t.Project({tsConfigFilePath:n,skipFileDependencyResolution:!0})}))}function yr(t,e,n){return{language:"typescript",availability:()=>({available:!1,reason:t,tsconfigPath:e,tsconfigPaths:n}),importUsage:()=>[],referencesFor:()=>[],calleesFor:()=>[],signatureFor:()=>null}}var Nt=Re("typescript-semantic-identity-context",{clearGroups:["whole-project"]});function se(t,e,n){let r=Nt.get(t,()=>Lt(t));if(!r)return null;let i=`${n}\0${e}`,o=r.identities.get(i);if(o)return o;let s=r.builder.identityFor(e,n);return r.identities.set(i,s),s}function A(t){return we(t,{includeIgnored:!1}).filter(O).sort()}function Lt(t){try{if(!t.generation.metadataRaw)return null;let e=k(t.generation.metadataRaw);if(e.kind!=="legacy"&&e.kind!=="supported"||!e.capabilities.usableForEvidenceCache)return null;let n=xe(e.metadata.fingerprint);return n?{builder:_({projectFiles:A(t),snapshot:n,graph:N(t),engineIdentity:G()}),identities:new Map}:null}catch{return null}}function W(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 s=n.get(o.targetSymbol);s&&r.get(s.symbolId).push(o.location)}for(let[i,o]of r)r.set(i,Ct(o));return r}function ze(t,e,n){let r=Je(t,e),i=Je(t,n),o=[...r].filter(c=>!i.has(c)).sort(),s=[...i].filter(c=>!r.has(c)).sort(),a=We(t,e),d=We(t,n),u=[...a].filter(c=>!d.has(c)).sort(),l=[...d].filter(c=>!a.has(c)).sort();return{passed:o.length===0&&s.length===0,expectedCount:r.size,actualCount:i.size,missing:o,extra:s,callerFiles:{passed:u.length===0&&l.length===0,expectedCount:a.size,actualCount:d.size,missing:u,extra:l}}}function We(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 vr(t,e,n){let r=new Set(n),i=new Map(n.map(o=>[o,[]]));for(let o of t)for(let s of e.get(o.symbolId)??[])r.has(s.file)&&i.get(s.file).push({targetSymbol:o.symbol,location:s});for(let[o,s]of i)i.set(o,Ot(s));return i}function Je(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 Ct(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(He)}function Ot(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)||He(n.location,r.location))}function He(t,e){return t.file.localeCompare(e.file)||t.line-e.line||t.column-e.column}var ae="typescript-reference-fragment-v2",z=Pe({kind:"typescript-reference-fragments",invalidation:Fe("typescript-reference-fragments"),serialize:t=>JSON.stringify(t),deserialize:_t});function Cr(t,e,n,r=t){let i=A(t),o=_({projectFiles:i,snapshot:e,graph:N(t),engineIdentity:G()}),s=[...n].map(([a,d])=>({relativePath:a,contentHash:o.identityFor(a,ae).key,value:[...d]}));if(s.some(a=>a.contentHash===null))throw new Error("TypeScript reference fragment identity is unavailable for an affected document.");return z.writeBatch(r,s.map(a=>({...a,contentHash:a.contentHash}))),s.length}function Or(t,e,n,r){let i=e.filter(s=>O(s.relativePath));if(i.length===0)return J("no TypeScript definitions");let o=J("shadow did not run");return Y("typescript.reference-fragments.shadow",()=>{try{let s=r(i[0].relativePath);if(!s.availability().available||!s.referenceFragmentsForFiles)return o=J("TypeScript reference fragment provider is unavailable"),o;let a=A(t),d=new Set(a),u=s.referenceFragmentsForFiles(a),l=W(i,u),c=ze(i,qt(n,d),l);if(!c.passed)return o={state:"failing",files:a.length,keyedFiles:0,writtenFiles:0,...c},o;let g=[];for(let h of a){let f=se(t,h,ae);f?.key&&g.push({relativePath:h,contentHash:f.key,value:u.get(h)??[]})}return z.writeBatch(t,g),o={state:"passing",files:a.length,keyedFiles:g.length,writtenFiles:g.length,...c},o}catch(s){return o=J(s instanceof Error?s.message:String(s)),o}},()=>({...o}))}function qt(t,e){return new Map([...t].map(([n,r])=>[n,r.filter(i=>e.has(i.file))]))}function qr(t,e,n){if(e.length===0)return{references:new Map,files:0,cacheHits:0,cacheMisses:0,computedFiles:0};let r="fallback",i=0,o=0,s=0,a=0;return Y("typescript.reference-fragments.materialize",()=>{try{let d=A(t);i=d.length;let u=new Map,l=new Map,c=[];for(let f of d){let S=se(t,f,ae);if(!S?.key)return null;u.set(f,S.key);let j=z.read(t,f,S.key);j===null?(s+=1,c.push(f)):(o+=1,l.set(f,j))}if(s===0)return r="hit",{references:W(e,l),files:i,cacheHits:o,cacheMisses:s,computedFiles:a};let g=n(e[0].relativePath);if(!g.availability().available||!g.referenceFragmentsForFiles)return null;let h=g.referenceFragmentsForFiles(c);if(c.some(f=>!h.has(f)))return null;a=h.size,z.writeBatch(t,c.map(f=>({relativePath:f,contentHash:u.get(f),value:h.get(f)??[]})));for(let[f,S]of h)l.set(f,S);return r="computed",{references:W(e,l),files:i,cacheHits:o,cacheMisses:s,computedFiles:a}}catch{return null}},()=>({state:r,files:i,cacheHits:o,cacheMisses:s,computedFiles:a}))}function J(t){return{state:"unavailable",files:0,keyedFiles:0,writtenFiles:0,expectedCount:0,actualCount:0,missing:[],extra:[],reason:t}}function _t(t){try{let e=JSON.parse(t);return!Array.isArray(e)||!e.every($t)?null:e}catch{return null}}function $t(t){if(!t||typeof t!="object")return!1;let e=t,n=e.location;return typeof e.targetSymbol=="string"&&!!n&&typeof n.file=="string"&&typeof n.line=="number"&&typeof n.column=="number"}import{createHash as Gt}from"crypto";import{existsSync as H,readFileSync as V,statSync as ue}from"fs";import{basename as Wt,dirname as pe,join as M}from"path";var Jt=1,zt=1,Ht=".scipquery-generations",Vt="manifest.json";function fe(t){return M(pe(t),Ht)}function Ut(t){try{let e=JSON.parse(V(M(fe(t),"state.json"),"utf8"));return nn(e)?e:null}catch{return null}}function Kt(t,e){return Qt(fe(t),e)}function Qt(t,e){try{let n=JSON.parse(V(M(t,e,Vt),"utf8"));return tn(n,e)?n:null}catch{return null}}function zr(t){let e=Ut(t.dbPath);if(e){let n=Yt(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(H(M(pe(t.dbPath),"index.lock")))throw new Error("Legacy SQLite publication is in progress; retry after the reindex lock is released.");return Zt(t,e?.currentGeneration)}function Xt(t){return Ie(k(t))??t}function Yt(t,e){try{let n=M(fe(t.dbPath),e),r=Kt(t.dbPath,e);if(!r)return null;let i=ce(n,r.database),o=r.index?ce(n,r.index):void 0,s=r.metadata?ce(n,r.metadata):void 0;return!de(i,r.database)||r.index&&(!o||!de(o,r.index))||r.metadata&&(!s||!de(s,r.metadata))?null:{identity:e,databasePath:i,...o?{indexPath:o}:{},...s?{metadataPath:s,metadataRaw:V(s,"utf8")}:{},source:"immutable"}}catch{return null}}function Zt(t,e){let n=Ve(t.dbPath),r=M(pe(t.dbPath),"meta.json"),i=H(r)?V(r,"utf8"):void 0,o=H(t.indexPath)?t.indexPath:void 0;return{identity:e??en(t.dbPath,i),databasePath:t.dbPath,...o?{indexPath:o}:{},...i===void 0?{}:{metadataPath:r,metadataRaw:i},source:"legacy",databaseFileIdentity:n}}function en(t,e){let n=Gt("sha256").update("sqlite-generation-legacy-v1\0");return e!==void 0&&n.update(Xt(e)),n.update(`\0${Ve(t)}`),n.digest("hex")}function Ve(t){let e=ue(t);return`${e.dev}:${e.ino}:${e.size}:${e.mtimeMs}`}function ce(t,e){if(Wt(e.file)!==e.file||e.file==="."||e.file==="..")throw new Error("SQLite generation manifest contains an unsafe artifact path");return M(t,e.file)}function de(t,e){return H(t)&&ue(t).isFile()&&ue(t).size===e.size}function tn(t,e){return t.version===zt&&t.identity===e&&le(t.database)&&(t.index===void 0||le(t.index))&&(t.metadata===void 0||le(t.metadata))}function le(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 nn(t){return t.version===Jt&&typeof t.currentGeneration=="string"&&!!t.currentGeneration&&typeof t.publishedAt=="string"&&Number.isFinite(Date.parse(t.publishedAt))&&(t.artifactSet===void 0||t.artifactSet==="immutable-v1")&&rn(t.stableMirrors)&&on(t.previousGeneration)&&sn(t.publication)}function rn(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 on(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 sn(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")}import{createHash as an,randomUUID as Ye}from"crypto";import{existsSync as P,lstatSync as E,mkdirSync as cn,readFileSync as B,readdirSync as w,renameSync as Ze,rmSync as x}from"fs";import{basename as me,dirname as dn,join as m}from"path";function U(t){return Array.isArray(t)?`[${t.map(U).join(",")}]`:t&&typeof t=="object"?`{${Object.entries(t).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${JSON.stringify(e)}:${U(n)}`).join(",")}}`:JSON.stringify(t)}var ln=1,un=Object.freeze({maxItems:1024,maxBytes:512*1024*1024,maxItemBytes:64*1024*1024,maxBatch:16,claimLeaseMs:5*6e4,responseRetentionMs:10*6e4,deadLetterRetentionMs:1440*6e4,temporaryRetentionMs:6e4,cleanupBatch:64}),R=class extends Error{constructor(n,r,i,o){let s=n==="item-too-large"?`request is ${o} bytes; per-item limit is ${i.maxItemBytes}`:n==="item-capacity"?`mailbox has ${r.totalItems} retained items; limit is ${i.maxItems}`:n==="byte-capacity"?`mailbox retains ${r.totalBytes} bytes and the request adds ${o}; limit is ${i.maxBytes}`:"another writer held the admission coordinator through the bounded wait";super(`Mailbox backpressure: ${s}. Retry after the service drains or expires retained work.`);this.code=n;this.status=r;this.limits=i;this.attemptedBytes=o;this.name="MailboxBackpressureError"}code;status;limits;attemptedBytes},pn=".owner.json",fn={isProcessAlive:()=>!0,readProcessIdentity:()=>null};function ti(t){return{rootDir:t,pendingDir:m(t,"pending"),inflightDir:m(t,"inflight"),responseDir:m(t,"responses"),deadLetterDir:m(t,"dead-letter"),legacyRequestDir:m(t,"requests")}}function mn(t={}){let e={...un,...t};for(let[n,r]of Object.entries(e))if(!Number.isFinite(r)||r<=0||!Number.isInteger(r))throw new Error(`Mailbox limit ${n} must be a positive integer.`);return e}function et(t){for(let e of[t.pendingDir,t.inflightDir,t.responseDir,t.deadLetterDir,t.legacyRequestDir])cn(e,{recursive:!0})}function ni(t,e){return an("sha256").update(U({namespace:t,payload:e})).digest("hex")}function gn(t){if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Mailbox operation keys must be lowercase SHA-256 identities.");return`op-${t}`}function ri(t,e,n={}){let r=mn(n.limits),i=n.nowMs??Date.now();return et(t),Rn(e),bn(t,r,n.admissionLockTimeoutMs??2e3,n.monotonicNow??Te,()=>{yn(t,i,r);let o=m(t.pendingDir,`${e.id}.json`),s=m(t.responseDir,`${e.id}.json`),a=Ue(t,e.id);if(a){let c=Ke(a,e.operationKey,e.id);return{disposition:"duplicate",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:c.deadlineAtMs??e.deadlineAtMs}}let d=`${JSON.stringify(e)}
|
|
4
|
+
`,u=Buffer.byteLength(d),l=tt(t);if(u>r.maxItemBytes)throw new R("item-too-large",l,r,u);if(l.totalItems+1>r.maxItems)throw new R("item-capacity",l,r,u);if(l.totalBytes+u>r.maxBytes)throw new R("byte-capacity",l,r,u);n.onBeforePublish?.();try{return te(o,d,{durability:"durable"}),{disposition:"accepted",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:e.deadlineAtMs}}catch(c){if(c.code!=="EEXIST")throw c;let g=Ue(t,e.id);if(!g)throw c;let h=Ke(g,e.operationKey,e.id);return{disposition:"duplicate",requestId:e.id,responsePath:s,authoritativeDeadlineAtMs:h.deadlineAtMs??e.deadlineAtMs}}})}function yn(t,e,n,r=fn){let i={reclaimed:0,completedClaimsRemoved:0,responsesRemoved:0,deadLettersRemoved:0,temporaryFilesRemoved:0},o=n.cleanupBatch;for(let s of ye(t.inflightDir)){if(o<=0)break;let a=m(t.responseDir,`${s.requestId}.json`);if(P(a)){x(s.path,{force:!0}),i.completedClaimsRemoved++,o--;continue}if(s.claimExpiresAtMs>e||Mn(t,s.ownerId,r)!=="dead")continue;let d=m(t.pendingDir,s.originalFile);try{Ze(s.path,d),i.reclaimed++}catch(u){if(u.code!=="EEXIST")throw u;x(s.path,{force:!0})}F(dn(s.path)),F(t.pendingDir),o--}o=Qe(t.responseDir,o,(s,a)=>wn(s)??a+n.responseRetentionMs,e,()=>{i.responsesRemoved++}),o=Qe(t.deadLetterDir,o,(s,a)=>a+n.deadLetterRetentionMs,e,()=>{i.deadLettersRemoved++});for(let s of[t.pendingDir,t.inflightDir,t.responseDir,t.deadLetterDir,t.legacyRequestDir]){if(o<=0)break;for(let a of nt(s)){if(o<=0)break;me(a).includes(".tmp-")&&(E(a).mtimeMs+n.temporaryRetentionMs>e||(x(a,{force:!0}),i.temporaryFilesRemoved++,o--))}}return Pn(t.inflightDir),i}function tt(t){et(t);let e=[...T(t.pendingDir).map(d=>({path:d,pending:!0})),...T(t.legacyRequestDir).map(d=>({path:d,pending:!0}))],n=ye(t.inflightDir).map(d=>({path:d.path,pending:!1})),r=T(t.responseDir).map(d=>({path:d,pending:!1})),i=T(t.deadLetterDir).map(d=>({path:d,pending:!1})),o=[...e,...n,...r,...i],s=0,a;for(let d of e){let u=be(d.path);if(!u){s++;continue}let l=u.enqueuedAtMs??E(d.path).mtimeMs;a=a===void 0?l:Math.min(a,l)}return{pending:e.length,inflight:n.length,responses:r.length,deadLetters:i.length,invalid:s,totalItems:o.length,totalBytes:o.reduce((d,u)=>d+Fn(u.path),0),...a===void 0?{}:{oldestPendingAt:new Date(a).toISOString()}}}function bn(t,e,n,r,i){let o=m(t.rootDir,".admission.lock"),s=`${process.pid}-${Ye()}`,a=r()+Math.max(0,n);for(;!hn(t.rootDir,o,s);){if(Sn(o),r()>=a)throw new R("admission-busy",tt(t),e,0);Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,5)}try{return i()}finally{try{ge(o).ownerToken===s&&(x(o,{recursive:!0,force:!0}),F(t.rootDir))}catch{}}}function hn(t,e,n){let r=`${JSON.stringify({ownerToken:n,pid:process.pid,acquiredAtMs:Date.now()})}
|
|
5
|
+
`;try{return te(e,r,{durability:"durable"}),!0}catch(i){if(i.code==="EEXIST")return!1;try{ge(e).ownerToken===n&&(x(e,{force:!0}),F(t))}catch{}throw i}}function Sn(t){let e=null;try{let r=ge(t);typeof r.ownerToken=="string"&&Number.isSafeInteger(r.pid)&&Number(r.pid)>0&&(e=Number(r.pid))}catch{}if(e===null||xn(e))return;let n=`${t}.stale-${Ye()}`;try{Ze(t,n)}catch(r){let i=r.code;if(i==="ENOENT"||i==="EEXIST")return;throw r}x(n,{recursive:!0,force:!0})}function ge(t){try{return JSON.parse(B(t,"utf8"))}catch(e){if(e.code!=="EISDIR")throw e;return JSON.parse(B(m(t,"owner.json"),"utf8"))}}function xn(t){try{return process.kill(t,0),!0}catch(e){let n=e.code;return n==="EPERM"||n!=="ESRCH"}}function Mn(t,e,n){let r=In(m(t.inflightDir,rt(e),pn));if(!r)return"unknown";if(!n.isProcessAlive(r.pid))return"dead";if(!r.processIdentity)return"live";let i=n.readProcessIdentity(r.pid);return i?Ae(r.processIdentity,i)?"live":"dead":"unknown"}function In(t){try{let e=JSON.parse(B(t,"utf8"));if(e.version!==1||typeof e.ownerId!="string"||!e.ownerId||typeof e.pid!="number"||!Number.isSafeInteger(e.pid)||e.pid<=0)return null;let n=e.processIdentity===void 0?null:L(e.processIdentity);return e.processIdentity!==void 0&&(!n||n.pid!==e.pid)?null:{version:1,ownerId:e.ownerId,pid:e.pid,...n?{processIdentity:n}:{}}}catch{return null}}function Ue(t,e){for(let n of[m(t.pendingDir,`${e}.json`),m(t.legacyRequestDir,`${e}.json`),m(t.responseDir,`${e}.json`)])if(P(n))return n;for(let n of ye(t.inflightDir))if(n.requestId===e)return n.path;return null}function Ke(t,e,n){let r=be(t);if(!r||r.operationKey!==e)throw new Error(`Mailbox operation ${n} conflicts with an existing retained record.`);return r}function Rn(t){if(t.mailboxVersion!==ln||t.id!==gn(t.operationKey)||!t.clientId.trim()||!Number.isFinite(t.enqueuedAtMs)||!Number.isFinite(t.deadlineAtMs)||t.deadlineAtMs<t.enqueuedAtMs)throw new Error("Mailbox request has an invalid lifecycle identity.")}function ye(t){if(!P(t))return[];let e=[];for(let n of w(t,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=Xe(n.name);if(r===null)continue;let i=m(t,n.name);for(let o of w(i,{withFileTypes:!0})){if(!o.isFile()||!o.name.endsWith(".claim"))continue;let s=/^(.*)\.(\d+)\.claim$/.exec(o.name);if(!s)continue;let a=Xe(s[1]),d=Number(s[2]);if(a===null||me(a)!==a||!a.endsWith(".json")||!Number.isSafeInteger(d))continue;let u=m(i,o.name),l=be(u)??{id:me(a,".json")},c=E(u);e.push({requestId:l.id,ownerId:r,path:u,originalFile:a,claimedAtMs:c.mtimeMs,claimExpiresAtMs:d,byteLength:c.size,...l.operationKey?{operationKey:l.operationKey}:{},...l.clientId?{clientId:l.clientId}:{},...l.enqueuedAtMs===void 0?{}:{enqueuedAtMs:l.enqueuedAtMs},...l.deadlineAtMs===void 0?{}:{deadlineAtMs:l.deadlineAtMs},legacy:l.operationKey===void 0})}}return e.sort((n,r)=>n.claimedAtMs-r.claimedAtMs||n.path.localeCompare(r.path))}function be(t){try{let e=JSON.parse(B(t,"utf8"));return typeof e.id!="string"||!e.id?null:{id:e.id,...typeof e.operationKey=="string"?{operationKey:e.operationKey}:{},...typeof e.clientId=="string"?{clientId:e.clientId}:{},...typeof e.enqueuedAtMs=="number"?{enqueuedAtMs:e.enqueuedAtMs}:{},...typeof e.deadlineAtMs=="number"?{deadlineAtMs:e.deadlineAtMs}:{}}}catch{return null}}function wn(t){try{let e=JSON.parse(B(t,"utf8"));return typeof e.expiresAtMs=="number"&&Number.isFinite(e.expiresAtMs)?e.expiresAtMs:null}catch{return null}}function Qe(t,e,n,r,i){for(let o of T(t)){if(e<=0)break;let s=E(o);n(o,s.mtimeMs)>r||(x(o,{force:!0}),i(),e--)}return e}function T(t){return P(t)?w(t,{withFileTypes:!0}).filter(e=>e.isFile()).map(e=>m(t,e.name)).sort():[]}function nt(t){if(!P(t))return[];let e=[];for(let n of w(t,{withFileTypes:!0})){let r=m(t,n.name);n.isFile()?e.push(r):n.isDirectory()&&e.push(...nt(r))}return e.sort()}function Pn(t){if(P(t))for(let e of w(t,{withFileTypes:!0})){if(!e.isDirectory())continue;let n=m(t,e.name);w(n).some(r=>r.endsWith(".claim"))||x(n,{recursive:!0,force:!0})}}function Fn(t){try{return E(t).size}catch{return 0}}function rt(t){return Buffer.from(t,"utf8").toString("base64url")}function Xe(t){try{let e=Buffer.from(t,"base64url").toString("utf8");return rt(e)===t?e:null}catch{return null}}import{readFileSync as vn}from"fs";import{join as K}from"path";var An="watch.lock",Tn="watch-state.json",Bn="watch-activity.json",En="watch-refresh-requests";function di(t){return{lockPath:K(t,An),statePath:K(t,Tn),activityPath:K(t,Bn),refreshRequestsPath:K(t,En)}}function li(t){try{return jn(JSON.parse(vn(t,"utf8")))}catch{return null}}function jn(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==1||typeof e.protocolVersion!="number"||typeof e.pid!="number"||!Number.isInteger(e.pid)||e.pid<=0||typeof e.projectRoot!="string"||e.worktreeId!==void 0&&(typeof e.worktreeId!="string"||e.worktreeId.length===0)||typeof e.cliVersion!="string"||!b(e.startedAt)||!b(e.heartbeatAt)||!b(e.lastActivityAt)||!Dn(e.watcher)||e.idleDeadlineAt!==void 0&&!b(e.idleDeadlineAt))return null;if(e.processIdentity!==void 0){let n=L(e.processIdentity);if(!n||n.pid!==e.pid)return null;e.processIdentity=n}return e.indexGeneration!==void 0&&!/^[a-f0-9]{64}$/.test(e.indexGeneration)||e.lastError!==void 0&&!kn(e.lastError)||e.lastRefresh!==void 0&&!Nn(e.lastRefresh)||e.reindexActivity!==void 0&&!Ln(e.reindexActivity)||e.refreshRequests!==void 0&&!Cn(e.refreshRequests)||e.typescriptSemantic!==void 0&&!On(e.typescriptSemantic)||e.typescriptIndex!==void 0&&!qn(e.typescriptIndex)?null:e}function b(t){return Me(t)}function Dn(t){if(!t||typeof t!="object"||!("state"in t))return!1;let e=t;switch(e.state){case"idle":return!0;case"waiting":return y(e.changedFiles)&&y(e.reindexAt);case"indexing":return y(e.startedAt);case"cooldown":return y(e.until)&&typeof e.dirty=="boolean";case"draining":return y(e.startedAt)&&typeof e.reason=="string";default:return!1}}function kn(t){if(!t||typeof t!="object")return!1;let e=t;return b(e.at)&&typeof e.message=="string"}function Nn(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.trigger?.kind=="string"&&typeof e.result=="string"&&b(e.startedAt)&&b(e.completedAt)&&y(e.durationMs)}function Ln(t){if(!t||typeof t!="object")return!1;let e=t;return!b(e.windowStartedAt)||!b(e.windowEndedAt)||!p(e.runs)||!p(e.rebuilt)||!p(e.reused)||!p(e.failed)||!p(e.suppressed)||!y(e.estimatedLogicalOutputBytes)||e.estimatedLogicalOutputBytes<0||!e.byTrigger||typeof e.byTrigger!="object"?!1:Object.values(e.byTrigger).every(n=>n===void 0||p(n))}function Cn(t){if(!t||typeof t!="object")return!1;let e=t;return p(e.pending)&&p(e.claimed)&&p(e.completed)&&p(e.expired)&&p(e.invalid)&&(e.oldestPendingAt===void 0||b(e.oldestPendingAt))}function On(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&y(e.requests)&&y(e.sessionsCreated)&&y(e.sessionsReused)&&y(e.sessionsRefreshed)&&y(e.sessionsReplaced)&&y(e.projectsCreated)&&(e.lastRequestAt===void 0||b(e.lastRequestAt))&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||b(e.busyUntil))&&(e.mailbox===void 0||it(e.mailbox))}function qn(t){if(!t||typeof t!="object")return!1;let e=t;return typeof e.protocolVersion=="number"&&(e.state==="idle"||e.state==="ready"||e.state==="unavailable"||e.state==="error")&&p(e.requests)&&p(e.sessionsCreated)&&p(e.sessionsReplaced)&&p(e.initializations)&&p(e.programUpdates)&&p(e.documentsEmitted)&&p(e.documentsRemoved)&&(e.lastRequestAt===void 0||b(e.lastRequestAt))&&(e.lastDurationMs===void 0||y(e.lastDurationMs)&&e.lastDurationMs>=0)&&(e.lastError===void 0||typeof e.lastError=="string")&&(e.busyUntil===void 0||b(e.busyUntil))&&(e.mailbox===void 0||it(e.mailbox))}function it(t){if(!t||typeof t!="object")return!1;let e=t;return p(e.pending)&&p(e.inflight)&&p(e.responses)&&p(e.deadLetters)&&p(e.invalid)&&p(e.totalItems)&&y(e.totalBytes)&&e.totalBytes>=0&&e.totalItems===e.pending+e.inflight+e.responses+e.deadLetters&&(e.oldestPendingAt===void 0||b(e.oldestPendingAt))}function y(t){return typeof t=="number"&&Number.isFinite(t)}export{Jt as a,zt as b,Ht as c,Vt as d,fe as e,Ut as f,Kt as g,Qt as h,zr as i,Xt as j,Ve as k,Un as l,ct as m,ie as n,Kn as o,ut as p,Qn as q,Xn as r,U as s,er as t,tr as u,ln as v,ti as w,ni as x,gn as y,ri as z,It as A,wt as B,cr as C,di as D,li as E,Tt as F,O as G,kt as H,gr as I,yr as J,vr as K,_ as L,se as M,Cr as N,Or as O,qr as P};
|
|
6
|
+
//# sourceMappingURL=chunk-GA64UPMI.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-UUJBLG6J.js";import{c as m}from"./chunk-XVJ3V7LM.js";import{a as d}from"./chunk-BGBBVSH4.js";import{d as u}from"./chunk-ZTTISZ7J.js";function k(n,c={}){let{scope:e,minLoc:t=10,minCallees:a=6,limit:r=20,scanLimit:i}=c,o=new m(n);return g({candidates:()=>o.productionCallableDefinitions({scope:e,minLoc:t,excludeTypesFiles:!0,requireFunctionLikeSymbol:!0,sortByLocDesc:!0}),scanLimit:i,profile:{name:"extract-candidates"},prepare:s=>o.calleeMap(s,{semantic:c.semantic!==!1}),evaluate:(s,l)=>h(s,l.get(s.symbolId)??[],a),orderResults:(s,l)=>l.clusters.length-s.clusters.length||l.loc-s.loc,limit:r})}function h(n,c,e){let t=new Set(c.map(l=>l.symbol));if(t.size<e)return null;let a=S(t,c),r=y(t,a);if(r.length<2)return null;let i=C(r,a);if(i.length===0)return null;let o=u(n.symbol),s=p(o,t.size,r.length,i);return{symbol:n.symbol,shortName:o,relativePath:n.relativePath,startLine:n.startLine,endLine:n.endLine,loc:d(n),totalCallees:t.size,extractionKind:s.extractionKind,actionTier:"signal",evidenceReasons:s.evidenceReasons,recommendation:s.recommendation,clusters:i}}function p(n,c,e,t){let a=Math.max(...t.map(s=>s.callees.length)),r=Math.max(...t.map(s=>s.isolation)),i=[`${c} distinct callees across ${e} co-occurrence cluster(s)`,`${t.length} extractable cluster(s) passed size and isolation thresholds`,`largest extractable cluster has ${a} callees at ${Math.round(r*100)}% isolation`],o=f(n,c,e);return o!==null?{extractionKind:"workflow-orchestration",evidenceReasons:[...i,o],recommendation:"Review the isolated helper group as a possible private or feature-local helper, but keep the orchestration sequence together when it preserves the workflow."}:a>=6?{extractionKind:"broad-helper-cluster",evidenceReasons:[...i,"one isolated helper group is broad enough to deserve a named review"],recommendation:"Review whether the broad helper cluster has a stable concept name before extracting it; avoid creating a bag-of-helpers abstraction."}:{extractionKind:"cohesive-helper-cluster",evidenceReasons:i,recommendation:"Review the isolated callee group as a possible same-file or feature-local helper; extract only if the new name preserves the current behavior."}}function f(n,c,e){if(c>=10)return`callee breadth suggests orchestration: ${c} callees`;if(e>=4)return`multiple disconnected callee groups suggest orchestration: ${e} groups`;let t=b(n);return x.has(t)?`caller verb suggests orchestration: ${t}`:null}function b(n){return n.split(":").pop()?.replace(/\(\)$/,"").replace(/[^A-Za-z0-9_]/g,"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[_\s-]+/).filter(Boolean)[0]?.toLowerCase()??""}var x=new Set(["apply","build","check","collect","create","diff","execute","find","handle","load","prepare","process","render","resolve","run","select","sync","update","validate","verify","write"]);function S(n,c){let e=new Map;for(let a of n)e.set(a,new Set);let t=new Map;for(let a of c){let r=t.get(a.chunkId);r||(r=new Set,t.set(a.chunkId,r)),r.add(a.symbol)}for(let a of t.values()){let r=[...a];for(let i=0;i<r.length;i++)for(let o=i+1;o<r.length;o++)e.get(r[i]).add(r[o]),e.get(r[o]).add(r[i])}return e}function y(n,c){let e=new Set,t=[];for(let a of n){if(e.has(a))continue;let r=new Set,i=[a];for(;i.length>0;){let o=i.pop();if(!e.has(o)){e.add(o),r.add(o);for(let s of c.get(o)??[])e.has(s)||i.push(s)}}t.push(r)}return t}function C(n,c){return n.filter(e=>e.size>=3).map(e=>v(e,n,c)).filter(e=>e.isolation>.5).sort((e,t)=>t.isolation-e.isolation)}function v(n,c,e){let t=new Set;for(let o of c)if(o!==n)for(let s of o)t.add(s);let a=0;for(let o of n)for(let s of e.get(o)??[])t.has(s)&&a++;let r=n.size*t.size,i=r>0?1-a/r:1;return{callees:[...n].map(u),isolation:i}}export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GK3GRUJX.js.map
|