@codeyam/codeyam-cli 0.1.7 → 0.1.9
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/analyzer-template/.build-info.json +8 -8
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +9 -9
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +34 -3
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +14 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +27 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +78 -2
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +0 -33
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +19 -7
- package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +9 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +0 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +12 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +65 -28
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +83 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +0 -98
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +23 -4
- package/analyzer-template/packages/aws/package.json +2 -2
- package/analyzer-template/packages/database/index.ts +1 -0
- package/analyzer-template/packages/database/package.json +3 -3
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +8 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +93 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +31 -20
- package/analyzer-template/packages/database/src/lib/loadEntities.ts +0 -6
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +0 -5
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +94 -143
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +29 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
- package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/index.js +1 -0
- package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +25 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +76 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +23 -13
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +0 -6
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +76 -90
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +10 -0
- package/analyzer-template/packages/ui-components/package.json +1 -1
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/playwright/captureFromUrl.ts +89 -82
- package/analyzer-template/project/constructMockCode.ts +136 -43
- package/analyzer-template/project/reconcileMockDataKeys.ts +19 -14
- package/analyzer-template/project/start.ts +3 -0
- package/analyzer-template/project/startScenarioCapture.ts +9 -0
- package/analyzer-template/project/writeClientLogRoute.ts +125 -0
- package/analyzer-template/project/writeMockDataTsx.ts +17 -0
- package/analyzer-template/project/writeScenarioComponents.ts +36 -7
- package/analyzer-template/tsconfig.json +13 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +115 -34
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +17 -11
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +2 -0
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +5 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
- package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +12 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +29 -7
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +208 -11
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
- package/codeyam-cli/src/cli.js +2 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +45 -0
- package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +101 -47
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +17 -7
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +14 -2
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +3215 -0
- package/codeyam-cli/src/commands/editor.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +107 -45
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/data/techStacks.js +77 -0
- package/codeyam-cli/src/data/techStacks.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +144 -0
- package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
- package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js +127 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +855 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
- package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +304 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +542 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +520 -0
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +217 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +339 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +221 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +855 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +213 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +1742 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +107 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +101 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js +9 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
- package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +227 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +300 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +50 -4
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
- package/codeyam-cli/src/utils/analyzer.js +9 -0
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/analyzerFinalization.js +96 -0
- package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
- package/codeyam-cli/src/utils/backgroundServer.js +104 -12
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/buildFlags.js +4 -0
- package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
- package/codeyam-cli/src/utils/database.js +37 -2
- package/codeyam-cli/src/utils/database.js.map +1 -1
- package/codeyam-cli/src/utils/devModeEvents.js +40 -0
- package/codeyam-cli/src/utils/devModeEvents.js.map +1 -0
- package/codeyam-cli/src/utils/devServerState.js +71 -0
- package/codeyam-cli/src/utils/devServerState.js.map +1 -0
- package/codeyam-cli/src/utils/editorApi.js +73 -0
- package/codeyam-cli/src/utils/editorApi.js.map +1 -0
- package/codeyam-cli/src/utils/editorAudit.js +176 -0
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
- package/codeyam-cli/src/utils/editorCapture.js +102 -0
- package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
- package/codeyam-cli/src/utils/editorDevServer.js +197 -0
- package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js +44 -0
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
- package/codeyam-cli/src/utils/editorJournal.js +225 -0
- package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
- package/codeyam-cli/src/utils/editorLoaderHelpers.js +113 -0
- package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorMockState.js +248 -0
- package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js +135 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreview.js +132 -0
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js +112 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarios.js +332 -0
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js +173 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js +349 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js +158 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
- package/codeyam-cli/src/utils/fileMetadata.js +5 -0
- package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +25 -9
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +103 -0
- package/codeyam-cli/src/utils/git.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +55 -13
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
- package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
- package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
- package/codeyam-cli/src/utils/pathIgnoring.js +19 -7
- package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
- package/codeyam-cli/src/utils/project.js +15 -5
- package/codeyam-cli/src/utils/project.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
- package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +70 -1
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +7 -6
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/scenarioCoverage.js +75 -0
- package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
- package/codeyam-cli/src/utils/scenariosManifest.js +159 -0
- package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
- package/codeyam-cli/src/utils/serverState.js +57 -2
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +82 -11
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js +8 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/slugUtils.js +25 -0
- package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
- package/codeyam-cli/src/utils/syncMocksMiddleware.js +2 -2
- package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/testRunner.js +158 -0
- package/codeyam-cli/src/utils/testRunner.js.map +1 -0
- package/codeyam-cli/src/utils/webappDetection.js +35 -2
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +40 -0
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +567 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js +65 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/database.js +41 -27
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/git.js +397 -0
- package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
- package/codeyam-cli/src/webserver/backgroundServer.js +108 -18
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-CtmbP4Gl.js → CopyButton-BPXZwM4t.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-DlMph_Hm.js → EntityItem-BcgbViKV.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-B-0PjGOU.js → EntityTypeBadge-g3saevPb.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-DN9eiJAO.js → EntityTypeIcon-CQIG2qda.js} +9 -9
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-rE_fI2h2.js → InteractivePreview-DYFW3lDD.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CnatsCw2.js → LibraryFunctionPreview-DLeucoVX.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-CSP6DZrh.js → LoadingDots-BU_OAEMP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-CMK8Q7yk.js → LogViewer-ceAyBX-H.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-TCV_HBjy.js → ReportIssueModal-BzHcG7SE.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-CG2uh31y.js → SafeScreenshot-BED4B6sP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-CU_TDYd8.js → ScenarioViewer-Bd-hxofb.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-D7IoaWUW.js → TruncatedFilePath-C8OKAR5x.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{_index-B8z7mjR-.js → _index-DLxKhri3.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-DZu78RI1.js → activity.(_tab)-BcY3q6nt.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-web-links-Duc5hnl7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
- package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-Dm5RS9il.js → agent-transcripts-Bni3iiUj.js} +5 -5
- package/codeyam-cli/src/webserver/build/client/assets/api.dev-mode-events-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-audit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-capture-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-entry-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-refresh-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenarios-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-Bp5FLkd4.js → book-open-BYOypzCa.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-DQJA9f4o.js → chevron-down-C_Pmso5S.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-7VptmeIr.js → chunk-JZWAC4HX-C4pqxYJB.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-B6C4LY9o.js → circle-check-BVMi9VA5.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{copy-6nzYCu0G.js → copy-n2FB0_Sw.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CC6AbExI.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BsDh6TSF.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor-PBc_6L9R.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-4FzHlcNn.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-C6PQhwY5.js → entity._sha._-BsDXNp45.js} +9 -9
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-BgAqUtTZ.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-Bmshgrij.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-C7ysA4Jq.js → entity._sha_.edit._scenarioId-BMvVHNXU.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CU6EUArK.js → entry.client-DTvKq3TY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-EWpfFU4X.js → fileTableUtils-cPo8LiG3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-CrxAoWIL.js → files-BZrlFE1F.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-DdZcvjGh.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-B8vTTNy2.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-7-1FmlHo.js → index-10oVnAAH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-DuYcwYp_.js → index-BcvgDzbZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/index-yHOVb4rc.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/{labs-CPPVOSWB.js → labs-Zk7ryIM1.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BnDcD54R.js → loader-circle-DaAZ_H2w.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/manifest-65850841.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-9gnxSZlb.js +101 -0
- package/codeyam-cli/src/webserver/build/client/assets/{pause-DhQX2g22.js → pause-f5-1lKBt.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/root-BwX8YgFb.js +67 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DborVoKD.js → search-Di64LWVb.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{settings-BWunYSXt.js → settings-0OrEMU6J.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-BtrtCYJg.js → simulations-DWT-CvLy.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-Bs4NC-VZ.js → terminal-Br7MOqts.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DTf3Jojp.js → triangle-alert-BLdiCuG-.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BE43Hjti.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C14nCb1q.js +2 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-BsQb6rFd.js → useReportContext-O-jkvSPx.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-BOur3mUv.js → useToast-9FIWuYfK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
- package/codeyam-cli/src/webserver/build/server/assets/index-DEEQf4pi.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/init-CkWmyFY2.js +10 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BHi-9O8W.js +439 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/src/webserver/devServer.js +39 -5
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/editorProxy.js +877 -0
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +414 -0
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +230 -0
- package/codeyam-cli/src/webserver/server.js +258 -1
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +726 -0
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
- package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
- package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
- package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
- package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
- package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
- package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
- package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
- package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
- package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
- package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
- package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
- package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
- package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
- package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +147 -0
- package/codeyam-cli/templates/editor-step-hook.py +236 -0
- package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
- package/codeyam-cli/templates/expo-react-native/README.md +41 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app.json +18 -0
- package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
- package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
- package/codeyam-cli/templates/expo-react-native/global.css +3 -0
- package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
- package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
- package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
- package/codeyam-cli/templates/expo-react-native/package.json +38 -0
- package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
- package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
- package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
- package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
- package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
- package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
- package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
- package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +24 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +64 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +39 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +40 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +92 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/SUPABASE_SETUP.md +104 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
- package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +148 -0
- package/codeyam-cli/templates/{codeyam-memory.md → skills/codeyam-memory/SKILL.md} +215 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
- package/package.json +17 -10
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +22 -4
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +10 -2
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +21 -0
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
- package/packages/ai/src/lib/generateEntityScenarioData.js +57 -2
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlows.js +0 -11
- package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +13 -4
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/index.js +4 -2
- package/packages/analyze/src/lib/asts/index.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +8 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +0 -5
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +9 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +54 -27
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +65 -0
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +0 -40
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +18 -4
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/database/index.js +1 -0
- package/packages/database/index.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +5 -0
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +76 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/packages/database/src/lib/loadCommits.js +23 -13
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadEntities.js +0 -6
- package/packages/database/src/lib/loadEntities.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +76 -90
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/packages/types/src/enums/ProjectFramework.js +2 -0
- package/packages/types/src/enums/ProjectFramework.js.map +1 -1
- package/scripts/npm-post-install.cjs +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-C1rIyZdV.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-D-QUFOwe.js +0 -21
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DmzSmblj.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DVTcUnur.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-BVgNO76F.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/git-BldHtKeW.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/globals-CLmFdUae.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-717e346a.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/memory-0wMU4KXe.js +0 -93
- package/codeyam-cli/src/webserver/build/client/assets/root-DqfSDjyQ.js +0 -62
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-D_bDZyDU.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-DZp6rrQD.js +0 -2
- package/codeyam-cli/src/webserver/build/server/assets/index-B8jmgmn2.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-9OU4lmvL.js +0 -285
- package/scripts/finalize-analyzer.cjs +0 -13
- /package/codeyam-cli/templates/{codeyam-diagnose.md → commands/codeyam-diagnose.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-debug.md → skills/codeyam-debug/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-new-rule.md → skills/codeyam-new-rule/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-setup.md → skills/codeyam-setup/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-sim.md → skills/codeyam-sim/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-test.md → skills/codeyam-test/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-verify.md → skills/codeyam-verify/SKILL.md} +0 -0
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import{H as xr,j as s,r as I,w as _i,u as Oi,c as Bi,f as $i,L as Hi}from"./chunk-JZWAC4HX-7VptmeIr.js";import{u as Vi}from"./useReportContext-BsQb6rFd.js";import{c as Ne}from"./createLucideIcon-D-QUFOwe.js";import{T as yr,C as Jt}from"./terminal-Bs4NC-VZ.js";import{C as Oe,a as Qe}from"./copy-6nzYCu0G.js";import{C as br}from"./CopyButton-CtmbP4Gl.js";import{C as _t}from"./chevron-down-DQJA9f4o.js";import{S as kr}from"./search-DborVoKD.js";import{F as Ot,P as Ui}from"./pause-DhQX2g22.js";import{B as qi}from"./book-open-Bp5FLkd4.js";/**
|
|
2
|
-
* @license lucide-react v0.556.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Wi=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Yi=Ne("eye",Wi);/**
|
|
7
|
-
* @license lucide-react v0.556.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Qi=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],Xi=Ne("folder-tree",Qi);/**
|
|
12
|
-
* @license lucide-react v0.556.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Ki=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],wr=Ne("folder",Ki);/**
|
|
17
|
-
* @license lucide-react v0.556.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const Gi=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Bt=Ne("info",Gi);/**
|
|
22
|
-
* @license lucide-react v0.556.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const Ji=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Zi=Ne("pencil",Ji);/**
|
|
27
|
-
* @license lucide-react v0.556.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const el=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zt=Ne("plus",el);/**
|
|
32
|
-
* @license lucide-react v0.556.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const tl=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],nl=Ne("trash-2",tl);/**
|
|
37
|
-
* @license lucide-react v0.556.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const rl=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],tt=Ne("x",rl);function il(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ll=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ol=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,al={};function jn(e,t){return(al.jsx?ol:ll).test(e)}const sl=/[ \t\n\f\r]/g;function ul(e){return typeof e=="object"?e.type==="text"?Sn(e.value):!1:Sn(e)}function Sn(e){return e.replace(sl,"")===""}class nt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}nt.prototype.normal={};nt.prototype.property={};nt.prototype.space=void 0;function Cr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new nt(n,r,t)}function $t(e){return e.toLowerCase()}class fe{constructor(t,n){this.attribute=n,this.property=t}}fe.prototype.attribute="";fe.prototype.booleanish=!1;fe.prototype.boolean=!1;fe.prototype.commaOrSpaceSeparated=!1;fe.prototype.commaSeparated=!1;fe.prototype.defined=!1;fe.prototype.mustUseProperty=!1;fe.prototype.number=!1;fe.prototype.overloadedBoolean=!1;fe.prototype.property="";fe.prototype.spaceSeparated=!1;fe.prototype.space=void 0;let cl=0;const V=Ie(),ie=Ie(),Ht=Ie(),E=Ie(),te=Ie(),ze=Ie(),de=Ie();function Ie(){return 2**++cl}const Vt=Object.freeze(Object.defineProperty({__proto__:null,boolean:V,booleanish:ie,commaOrSpaceSeparated:de,commaSeparated:ze,number:E,overloadedBoolean:Ht,spaceSeparated:te},Symbol.toStringTag,{value:"Module"})),wt=Object.keys(Vt);class en extends fe{constructor(t,n,r,i){let o=-1;if(super(t,n),Nn(this,"space",i),typeof r=="number")for(;++o<wt.length;){const l=wt[o];Nn(this,wt[o],(r&Vt[l])===Vt[l])}}}en.prototype.defined=!0;function Nn(e,t,n){n&&(e[t]=n)}function Be(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new en(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[$t(r)]=r,n[$t(o.attribute)]=r}return new nt(t,n,e.space)}const vr=Be({properties:{ariaActiveDescendant:null,ariaAtomic:ie,ariaAutoComplete:null,ariaBusy:ie,ariaChecked:ie,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:te,ariaCurrent:null,ariaDescribedBy:te,ariaDetails:null,ariaDisabled:ie,ariaDropEffect:te,ariaErrorMessage:null,ariaExpanded:ie,ariaFlowTo:te,ariaGrabbed:ie,ariaHasPopup:null,ariaHidden:ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:te,ariaLevel:E,ariaLive:null,ariaModal:ie,ariaMultiLine:ie,ariaMultiSelectable:ie,ariaOrientation:null,ariaOwns:te,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:ie,ariaReadOnly:ie,ariaRelevant:null,ariaRequired:ie,ariaRoleDescription:te,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:ie,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function jr(e,t){return t in e?e[t]:t}function Sr(e,t){return jr(e,t.toLowerCase())}const hl=Be({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ze,acceptCharset:te,accessKey:te,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:te,autoFocus:V,autoPlay:V,blocking:te,capture:null,charSet:null,checked:V,cite:null,className:te,cols:E,colSpan:null,content:null,contentEditable:ie,controls:V,controlsList:te,coords:E|ze,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:Ht,draggable:ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:te,height:E,hidden:Ht,high:E,href:null,hrefLang:null,htmlFor:te,httpEquiv:te,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:te,itemRef:te,itemScope:V,itemType:te,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:V,optimum:E,pattern:null,ping:te,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:te,required:V,reversed:V,rows:E,rowSpan:E,sandbox:te,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:ie,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:te,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:ie,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:Sr}),fl=Be({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:de,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:te,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ze,g2:ze,glyphName:ze,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:de,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:te,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:de,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:de,rev:de,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:de,requiredFeatures:de,requiredFonts:de,requiredFormats:de,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:de,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:de,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:de,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jr}),Nr=Be({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Er=Be({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Sr}),Pr=Be({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),pl={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dl=/[A-Z]/g,En=/-[a-z]/g,ml=/^data[-\w.:]+$/i;function gl(e,t){const n=$t(t);let r=t,i=fe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ml.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(En,yl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!En.test(o)){let l=o.replace(dl,xl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=en}return new i(r,t)}function xl(e){return"-"+e.toLowerCase()}function yl(e){return e.charAt(1).toUpperCase()}const bl=Cr([vr,hl,Nr,Er,Pr],"html"),tn=Cr([vr,fl,Nr,Er,Pr],"svg");function kl(e){return e.join(" ").trim()}var Re={},Ct,Pn;function wl(){if(Pn)return Ct;Pn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
42
|
-
`,u="/",f="*",h="",d="comment",p="declaration";function m(C,y){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];y=y||{};var j=1,N=1;function A(L){var v=L.match(t);v&&(j+=v.length);var M=L.lastIndexOf(c);N=~M?L.length-M:N+L.length}function P(){var L={line:j,column:N};return function(v){return v.position=new b(L),q(),v}}function b(L){this.start=L,this.end={line:j,column:N},this.source=y.source}b.prototype.content=C;function R(L){var v=new Error(y.source+":"+j+":"+N+": "+L);if(v.reason=L,v.filename=y.source,v.line=j,v.column=N,v.source=C,!y.silent)throw v}function _(L){var v=L.exec(C);if(v){var M=v[0];return A(M),C=C.slice(M.length),v}}function q(){_(n)}function w(L){var v;for(L=L||[];v=F();)v!==!1&&L.push(v);return L}function F(){var L=P();if(!(u!=C.charAt(0)||f!=C.charAt(1))){for(var v=2;h!=C.charAt(v)&&(f!=C.charAt(v)||u!=C.charAt(v+1));)++v;if(v+=2,h===C.charAt(v-1))return R("End of comment missing");var M=C.slice(2,v-2);return N+=2,A(M),C=C.slice(v),N+=2,L({type:d,comment:M})}}function D(){var L=P(),v=_(r);if(v){if(F(),!_(i))return R("property missing ':'");var M=_(o),B=L({type:p,property:k(v[0].replace(e,h)),value:M?k(M[0].replace(e,h)):h});return _(l),B}}function Y(){var L=[];w(L);for(var v;v=D();)v!==!1&&(L.push(v),w(L));return L}return q(),Y()}function k(C){return C?C.replace(a,h):h}return Ct=m,Ct}var An;function Cl(){if(An)return Re;An=1;var e=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.default=n;const t=e(wl());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:f}=c;a?i(u,f,c):f&&(o=o||{},o[u]=f)}),o}return Re}var Ue={},Tn;function vl(){if(Tn)return Ue;Tn=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},c=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Ue.camelCase=c,Ue}var qe,In;function jl(){if(In)return qe;In=1;var e=qe&&qe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Cl()),n=vl();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,c){a&&c&&(l[(0,n.camelCase)(a,o)]=c)}),l}return r.default=r,qe=r,qe}var Sl=jl();const Nl=xr(Sl),Ar=Tr("end"),nn=Tr("start");function Tr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function El(e){const t=nn(e),n=Ar(e);if(t&&n)return{start:t,end:n}}function Xe(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fn(e.position):"start"in e||"end"in e?Fn(e):"line"in e||"column"in e?Ut(e):""}function Ut(e){return Rn(e&&e.line)+":"+Rn(e&&e.column)}function Fn(e){return Ut(e&&e.start)+"-"+Ut(e&&e.end)}function Rn(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Xe(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ae.prototype.file="";ae.prototype.name="";ae.prototype.reason="";ae.prototype.message="";ae.prototype.stack="";ae.prototype.column=void 0;ae.prototype.line=void 0;ae.prototype.ancestors=void 0;ae.prototype.cause=void 0;ae.prototype.fatal=void 0;ae.prototype.place=void 0;ae.prototype.ruleId=void 0;ae.prototype.source=void 0;const rn={}.hasOwnProperty,Pl=new Map,Al=/[A-Z]/g,Tl=new Set(["table","tbody","thead","tfoot","tr"]),Il=new Set(["td","th"]),Ir="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ol(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tn:bl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Fr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Fr(e,t,n){if(t.type==="element")return Rl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Dl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ml(e,t,n);if(t.type==="mdxjsEsm")return Ll(e,t);if(t.type==="root")return zl(e,t,n);if(t.type==="text")return _l(e,t)}function Rl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=tn,e.schema=i),e.ancestors.push(t);const o=Dr(e,t.tagName,!1),l=$l(e,t);let a=on(e,t);return Tl.has(t.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!ul(c):!0})),Rr(e,l,o,t),ln(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Dl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ze(e,t.position)}function Ll(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ze(e,t.position)}function Ml(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=tn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Dr(e,t.name,!0),l=Hl(e,t),a=on(e,t);return Rr(e,l,o,t),ln(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function zl(e,t,n){const r={};return ln(r,on(e,t)),e.create(t,e.Fragment,r,n)}function _l(e,t){return t.value}function Rr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ln(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ol(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function Bl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),c=nn(r);return t(i,o,l,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $l(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&rn.call(t.properties,i)){const o=Vl(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Il.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Hl(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ze(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Ze(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function on(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Pl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const u=i.get(c)||0;l=c+"-"+u,i.set(c,u+1)}}const a=Fr(e,o,l);a!==void 0&&n.push(a)}return n}function Vl(e,t,n){const r=gl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?il(n):kl(n)),r.property==="style"){let i=typeof n=="object"?n:Ul(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ql(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?pl[r.property]||r.property:r.attribute,n]}}function Ul(e,t){try{return Nl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ae("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Ir+"#cannot-parse-style-attribute",i}}function Dr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=jn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=jn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return rn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ze(e)}function Ze(e,t){const n=new ae("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ir+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ql(e){const t={};let n;for(n in e)rn.call(e,n)&&(t[Wl(n)]=e[n]);return t}function Wl(e){let t=e.replace(Al,Yl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Yl(e){return"-"+e.toLowerCase()}const vt={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ql={};function an(e,t){const n=Ql,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Lr(e,r,i)}function Lr(e,t,n){if(Xl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Dn(e.children,t,n)}return Array.isArray(e)?Dn(e,t,n):""}function Dn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Lr(e[i],t,n);return r.join("")}function Xl(e){return!!(e&&typeof e=="object")}const Ln=document.createElement("i");function sn(e){const t="&"+e+";";Ln.innerHTML=t;const n=Ln.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function me(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function ge(e,t){return e.length>0?(me(e,e.length,0,t),e):t}const Mn={}.hasOwnProperty;function Mr(e){const t={};let n=-1;for(;++n<e.length;)Kl(t,e[n]);return t}function Kl(e,t){let n;for(n in t){const i=(Mn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Mn.call(i,l)||(i[l]=[]);const a=o[l];Gl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Gl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);me(e,0,0,r)}function zr(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ye(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ce=Ee(/[A-Za-z]/),oe=Ee(/[\dA-Za-z]/),Jl=Ee(/[#-'*+\--9=?A-Z^-~]/);function ht(e){return e!==null&&(e<32||e===127)}const qt=Ee(/\d/),Zl=Ee(/[\dA-Fa-f]/),eo=Ee(/[!-/:-@[-`{-~]/);function O(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function U(e){return e===-2||e===-1||e===32}const mt=Ee(new RegExp("\\p{P}|\\p{S}","u")),Te=Ee(/\s/);function Ee(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $e(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&oe(e.charCodeAt(n+1))&&oe(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Q(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(c){return U(c)?(e.enter(n),a(c)):t(c)}function a(c){return U(c)&&o++<i?(e.consume(c),a):(e.exit(n),t(c))}}const to={tokenize:no};function no(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Q(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return O(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const ro={tokenize:io},zn={tokenize:lo};function io(e){const t=this,n=[];let r=0,i,o,l;return a;function a(N){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,c,u)(N)}return u(N)}function c(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&j();const A=t.events.length;let P=A,b;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){b=t.events[P][1].end;break}y(r);let R=A;for(;R<t.events.length;)t.events[R][1].end={...b},R++;return me(t.events,P+1,0,t.events.slice(A)),t.events.length=R,u(N)}return a(N)}function u(N){if(r===n.length){if(!i)return d(N);if(i.currentConstruct&&i.currentConstruct.concrete)return m(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zn,f,h)(N)}function f(N){return i&&j(),y(r),d(N)}function h(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,m(N)}function d(N){return t.containerState={},e.attempt(zn,p,m)(N)}function p(N){return r++,n.push([t.currentConstruct,t.containerState]),d(N)}function m(N){if(N===null){i&&j(),y(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),k(N)}function k(N){if(N===null){C(e.exit("chunkFlow"),!0),y(0),e.consume(N);return}return O(N)?(e.consume(N),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(N),k)}function C(N,A){const P=t.sliceStream(N);if(A&&P.push(null),N.previous=o,o&&(o.next=N),o=N,i.defineSkip(N.start),i.write(P),t.parser.lazy[N.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const R=t.events.length;let _=R,q,w;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(q){w=t.events[_][1].end;break}q=!0}for(y(r),b=R;b<t.events.length;)t.events[b][1].end={...w},b++;me(t.events,_+1,0,t.events.slice(R)),t.events.length=b}}function y(N){let A=n.length;for(;A-- >N;){const P=n[A];t.containerState=P[1],P[0].exit.call(t,e)}n.length=N}function j(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function lo(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _e(e){if(e===null||Z(e)||Te(e))return 1;if(mt(e))return 2}function gt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Wt={name:"attention",resolveAll:oo,tokenize:ao};function oo(e,t){let n=-1,r,i,o,l,a,c,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},d={...e[n][1].start};_n(h,-c),_n(d,c),l={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ge(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ge(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=ge(u,gt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ge(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=ge(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,me(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ao(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_e(r);let o;return l;function l(c){return o=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===o)return e.consume(c),a;const u=e.exit("attentionSequence"),f=_e(c),h=!f||f===2&&i||n.includes(c),d=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?h:h&&(i||!d)),u._close=!!(o===42?d:d&&(f||!h)),t(c)}}function _n(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const so={name:"autolink",tokenize:uo};function uo(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return ce(p)?(e.consume(p),l):p===64?n(p):u(p)}function l(p){return p===43||p===45||p===46||oe(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||oe(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ht(p)?n(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),f):Jl(p)?(e.consume(p),u):n(p)}function f(p){return oe(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||oe(p))&&r++<63){const m=p===45?d:h;return e.consume(p),m}return n(p)}}const rt={partial:!0,tokenize:co};function co(e,t,n){return r;function r(o){return U(o)?Q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||O(o)?t(o):n(o)}}const _r={continuation:{tokenize:fo},exit:po,name:"blockQuote",tokenize:ho};function ho(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return U(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function fo(e,t,n){const r=this;return i;function i(l){return U(l)?Q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(_r,t,n)(l)}}function po(e){e.exit("blockQuote")}const Or={name:"characterEscape",tokenize:mo};function mo(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return eo(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Br={name:"characterReference",tokenize:go};function go(e,t,n){const r=this;let i=0,o,l;return a;function a(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=oe,f(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=Zl,f):(e.enter("characterReferenceValue"),o=7,l=qt,f(h))}function f(h){if(h===59&&i){const d=e.exit("characterReferenceValue");return l===oe&&!sn(r.sliceSerialize(d))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(h)&&i++<o?(e.consume(h),f):n(h)}}const On={partial:!0,tokenize:yo},Bn={concrete:!0,name:"codeFenced",tokenize:xo};function xo(e,t,n){const r=this,i={partial:!0,tokenize:P};let o=0,l=0,a;return c;function c(b){return u(b)}function u(b){const R=r.events[r.events.length-1];return o=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?n(b):(e.exit("codeFencedFenceSequence"),U(b)?Q(e,h,"whitespace")(b):h(b))}function h(b){return b===null||O(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(On,k,A)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||O(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(b)):U(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,p,"whitespace")(b)):b===96&&b===a?n(b):(e.consume(b),d)}function p(b){return b===null||O(b)?h(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||O(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(b)):b===96&&b===a?n(b):(e.consume(b),m)}function k(b){return e.attempt(i,A,C)(b)}function C(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&U(b)?Q(e,j,"linePrefix",o+1)(b):j(b)}function j(b){return b===null||O(b)?e.check(On,k,A)(b):(e.enter("codeFlowValue"),N(b))}function N(b){return b===null||O(b)?(e.exit("codeFlowValue"),j(b)):(e.consume(b),N)}function A(b){return e.exit("codeFenced"),t(b)}function P(b,R,_){let q=0;return w;function w(v){return b.enter("lineEnding"),b.consume(v),b.exit("lineEnding"),F}function F(v){return b.enter("codeFencedFence"),U(v)?Q(b,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):D(v)}function D(v){return v===a?(b.enter("codeFencedFenceSequence"),Y(v)):_(v)}function Y(v){return v===a?(q++,b.consume(v),Y):q>=l?(b.exit("codeFencedFenceSequence"),U(v)?Q(b,L,"whitespace")(v):L(v)):_(v)}function L(v){return v===null||O(v)?(b.exit("codeFencedFence"),R(v)):_(v)}}}function yo(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const jt={name:"codeIndented",tokenize:ko},bo={partial:!0,tokenize:wo};function ko(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),Q(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?c(u):O(u)?e.attempt(bo,l,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||O(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),t(u)}}function wo(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):O(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Q(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):O(l)?i(l):n(l)}}const Co={name:"codeText",previous:jo,resolve:vo,tokenize:So};function vo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function jo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function So(e,t,n){let r=0,i,o;return l;function l(h){return e.enter("codeText"),e.enter("codeTextSequence"),a(h)}function a(h){return h===96?(e.consume(h),r++,a):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(o=e.enter("codeTextSequence"),i=0,f(h)):O(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||O(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(o.type="codeTextData",u(h))}}class No{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&We(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),We(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),We(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);We(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);We(this.left,n.reverse())}}}function We(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function $r(e){const t={};let n=-1,r,i,o,l,a,c,u;const f=new No(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Eo(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return me(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Eo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,c=[],u={};let f,h,d=-1,p=n,m=0,k=0;const C=[k];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),h&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(k=d+1,C.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):C.pop(),d=C.length;d--;){const y=a.slice(C[d],C[d+1]),j=o.pop();c.push([j,j+y.length-1]),e.splice(j,2,y)}for(c.reverse(),d=-1;++d<c.length;)u[m+c[d][0]]=m+c[d][1],m+=c[d][1]-c[d][0]-1;return u}const Po={resolve:To,tokenize:Io},Ao={partial:!0,tokenize:Fo};function To(e){return $r(e),e}function Io(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):O(a)?e.check(Ao,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Fo(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(l){if(l===null||O(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Hr(e,t,n,r,i,o,l,a,c){const u=c||Number.POSITIVE_INFINITY;let f=0;return h;function h(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),d):y===null||y===32||y===41||ht(y)?n(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),k(y))}function d(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),d(y)):y===null||y===60||O(y)?n(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function k(y){return!f&&(y===null||y===41||Z(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,k):y===41?(e.consume(y),f--,k):y===null||y===32||y===40||ht(y)?n(y):(e.consume(y),y===92?C:k)}function C(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function Vr(e,t,n,r,i,o){const l=this;let a=0,c;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):O(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||O(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),c||(c=!U(p)),p===92?d:h)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,h):h(p)}}function Ur(e,t,n,r,i,o){let l;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,c):n(d)}function c(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===l?(e.exit(o),c(l)):d===null?n(d):O(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===l||d===null||O(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?h:f)}function h(d){return d===l||d===92?(e.consume(d),f):f(d)}}function Ke(e,t){let n;return r;function r(i){return O(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):U(i)?Q(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Ro={name:"definition",tokenize:Lo},Do={partial:!0,tokenize:Mo};function Lo(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Vr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return Z(p)?Ke(e,u)(p):u(p)}function u(p){return Hr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(Do,h,h)(p)}function h(p){return U(p)?Q(e,d,"whitespace")(p):d(p)}function d(p){return p===null||O(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Mo(e,t,n){return r;function r(a){return Z(a)?Ke(e,i)(a):n(a)}function i(a){return Ur(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return U(a)?Q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||O(a)?t(a):n(a)}}const zo={name:"hardBreakEscape",tokenize:_o};function _o(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return O(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Oo={name:"headingAtx",resolve:Bo,tokenize:$o};function Bo(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},me(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function $o(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Z(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||O(f)?(e.exit("atxHeading"),t(f)):U(f)?Q(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||Z(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Ho=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$n=["pre","script","style","textarea"],Vo={concrete:!0,name:"htmlFlow",resolveTo:Wo,tokenize:Yo},Uo={partial:!0,tokenize:Xo},qo={partial:!0,tokenize:Qo};function Wo(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Yo(e,t,n){const r=this;let i,o,l,a,c;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),h}function h(x){return x===33?(e.consume(x),d):x===47?(e.consume(x),o=!0,k):x===63?(e.consume(x),i=3,r.interrupt?t:g):ce(x)?(e.consume(x),l=String.fromCharCode(x),C):n(x)}function d(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,a=0,m):ce(x)?(e.consume(x),i=4,r.interrupt?t:g):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:g):n(x)}function m(x){const G="CDATA[";return x===G.charCodeAt(a++)?(e.consume(x),a===G.length?r.interrupt?t:D:m):n(x)}function k(x){return ce(x)?(e.consume(x),l=String.fromCharCode(x),C):n(x)}function C(x){if(x===null||x===47||x===62||Z(x)){const G=x===47,re=l.toLowerCase();return!G&&!o&&$n.includes(re)?(i=1,r.interrupt?t(x):D(x)):Ho.includes(l.toLowerCase())?(i=6,G?(e.consume(x),y):r.interrupt?t(x):D(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?j(x):N(x))}return x===45||oe(x)?(e.consume(x),l+=String.fromCharCode(x),C):n(x)}function y(x){return x===62?(e.consume(x),r.interrupt?t:D):n(x)}function j(x){return U(x)?(e.consume(x),j):w(x)}function N(x){return x===47?(e.consume(x),w):x===58||x===95||ce(x)?(e.consume(x),A):U(x)?(e.consume(x),N):w(x)}function A(x){return x===45||x===46||x===58||x===95||oe(x)?(e.consume(x),A):P(x)}function P(x){return x===61?(e.consume(x),b):U(x)?(e.consume(x),P):N(x)}function b(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),c=x,R):U(x)?(e.consume(x),b):_(x)}function R(x){return x===c?(e.consume(x),c=null,q):x===null||O(x)?n(x):(e.consume(x),R)}function _(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||Z(x)?P(x):(e.consume(x),_)}function q(x){return x===47||x===62||U(x)?N(x):n(x)}function w(x){return x===62?(e.consume(x),F):n(x)}function F(x){return x===null||O(x)?D(x):U(x)?(e.consume(x),F):n(x)}function D(x){return x===45&&i===2?(e.consume(x),M):x===60&&i===1?(e.consume(x),B):x===62&&i===4?(e.consume(x),le):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),X):O(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Uo,se,Y)(x)):x===null||O(x)?(e.exit("htmlFlowData"),Y(x)):(e.consume(x),D)}function Y(x){return e.check(qo,L,se)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),v}function v(x){return x===null||O(x)?Y(x):(e.enter("htmlFlowData"),D(x))}function M(x){return x===45?(e.consume(x),g):D(x)}function B(x){return x===47?(e.consume(x),l="",K):D(x)}function K(x){if(x===62){const G=l.toLowerCase();return $n.includes(G)?(e.consume(x),le):D(x)}return ce(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),K):D(x)}function X(x){return x===93?(e.consume(x),g):D(x)}function g(x){return x===62?(e.consume(x),le):x===45&&i===2?(e.consume(x),g):D(x)}function le(x){return x===null||O(x)?(e.exit("htmlFlowData"),se(x)):(e.consume(x),le)}function se(x){return e.exit("htmlFlow"),t(x)}}function Qo(e,t,n){const r=this;return i;function i(l){return O(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Xo(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(rt,t,n)}}const Ko={name:"htmlText",tokenize:Go};function Go(e,t,n){const r=this;let i,o,l;return a;function a(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),c}function c(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),P):g===63?(e.consume(g),N):ce(g)?(e.consume(g),_):n(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),o=0,m):ce(g)?(e.consume(g),j):n(g)}function f(g){return g===45?(e.consume(g),p):n(g)}function h(g){return g===null?n(g):g===45?(e.consume(g),d):O(g)?(l=h,B(g)):(e.consume(g),h)}function d(g){return g===45?(e.consume(g),p):h(g)}function p(g){return g===62?M(g):g===45?d(g):h(g)}function m(g){const le="CDATA[";return g===le.charCodeAt(o++)?(e.consume(g),o===le.length?k:m):n(g)}function k(g){return g===null?n(g):g===93?(e.consume(g),C):O(g)?(l=k,B(g)):(e.consume(g),k)}function C(g){return g===93?(e.consume(g),y):k(g)}function y(g){return g===62?M(g):g===93?(e.consume(g),y):k(g)}function j(g){return g===null||g===62?M(g):O(g)?(l=j,B(g)):(e.consume(g),j)}function N(g){return g===null?n(g):g===63?(e.consume(g),A):O(g)?(l=N,B(g)):(e.consume(g),N)}function A(g){return g===62?M(g):N(g)}function P(g){return ce(g)?(e.consume(g),b):n(g)}function b(g){return g===45||oe(g)?(e.consume(g),b):R(g)}function R(g){return O(g)?(l=R,B(g)):U(g)?(e.consume(g),R):M(g)}function _(g){return g===45||oe(g)?(e.consume(g),_):g===47||g===62||Z(g)?q(g):n(g)}function q(g){return g===47?(e.consume(g),M):g===58||g===95||ce(g)?(e.consume(g),w):O(g)?(l=q,B(g)):U(g)?(e.consume(g),q):M(g)}function w(g){return g===45||g===46||g===58||g===95||oe(g)?(e.consume(g),w):F(g)}function F(g){return g===61?(e.consume(g),D):O(g)?(l=F,B(g)):U(g)?(e.consume(g),F):q(g)}function D(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,Y):O(g)?(l=D,B(g)):U(g)?(e.consume(g),D):(e.consume(g),L)}function Y(g){return g===i?(e.consume(g),i=void 0,v):g===null?n(g):O(g)?(l=Y,B(g)):(e.consume(g),Y)}function L(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||Z(g)?q(g):(e.consume(g),L)}function v(g){return g===47||g===62||Z(g)?q(g):n(g)}function M(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function B(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),K}function K(g){return U(g)?Q(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):X(g)}function X(g){return e.enter("htmlTextData"),l(g)}}const un={name:"labelEnd",resolveAll:ta,resolveTo:na,tokenize:ra},Jo={tokenize:ia},Zo={tokenize:la},ea={tokenize:oa};function ta(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&me(e,0,e.length,n),e}function na(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",c,t],["enter",u,t]],a=ge(a,e.slice(o+1,o+r+3)),a=ge(a,[["enter",f,t]]),a=ge(a,gt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=ge(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=ge(a,e.slice(l+1)),a=ge(a,[["exit",c,t]]),me(e,o,e.length,a),e}function ra(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(d){return o?o._inactive?h(d):(l=r.parser.defined.includes(ye(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),c):n(d)}function c(d){return d===40?e.attempt(Jo,f,l?f:h)(d):d===91?e.attempt(Zo,f,l?u:h)(d):l?f(d):h(d)}function u(d){return e.attempt(ea,f,h)(d)}function f(d){return t(d)}function h(d){return o._balanced=!0,n(d)}}function ia(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Z(h)?Ke(e,o)(h):o(h)}function o(h){return h===41?f(h):Hr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return Z(h)?Ke(e,c)(h):f(h)}function a(h){return n(h)}function c(h){return h===34||h===39||h===40?Ur(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return Z(h)?Ke(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function la(e,t,n){const r=this;return i;function i(a){return Vr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ye(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function oa(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const aa={name:"labelStartImage",resolveAll:un.resolveAll,tokenize:sa};function sa(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const ua={name:"labelStartLink",resolveAll:un.resolveAll,tokenize:ca};function ca(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const St={name:"lineEnding",tokenize:ha};function ha(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,t,"linePrefix")}}const ct={name:"thematicBreak",tokenize:fa};function fa(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||O(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),U(u)?Q(e,a,"whitespace")(u):a(u))}}const he={continuation:{tokenize:ga},exit:ya,name:"list",tokenize:ma},pa={partial:!0,tokenize:ba},da={partial:!0,tokenize:xa};function ma(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:qt(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(ct,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return qt(p)&&++l<10?(e.consume(p),c):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(rt,r.interrupt?n:f,e.attempt(pa,d,h))}function f(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function h(p){return U(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function ga(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(rt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!U(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(da,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(he,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function xa(e,t,n){const r=this;return Q(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function ya(e){e.exit(this.containerState.type)}function ba(e,t,n){const r=this;return Q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!U(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Hn={name:"setextUnderline",resolveTo:ka,tokenize:wa};function ka(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function wa(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),U(u)?Q(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||O(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Ca={tokenize:va};function va(e){const t=this,n=e.attempt(rt,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Po,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ja={resolveAll:Wr()},Sa=qr("string"),Na=qr("text");function qr(e){return{resolveAll:Wr(e==="text"?Ea:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),c}function c(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),c)}function u(f){if(f===null)return!0;const h=i[f];let d=-1;if(h)for(;++d<h.length;){const p=h[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Wr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Ea(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,c;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)c=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Pa={42:he,43:he,45:he,48:he,49:he,50:he,51:he,52:he,53:he,54:he,55:he,56:he,57:he,62:_r},Aa={91:Ro},Ta={[-2]:jt,[-1]:jt,32:jt},Ia={35:Oo,42:ct,45:[Hn,ct],60:Vo,61:Hn,95:ct,96:Bn,126:Bn},Fa={38:Br,92:Or},Ra={[-5]:St,[-4]:St,[-3]:St,33:aa,38:Br,42:Wt,60:[so,Ko],91:ua,92:[zo,Or],93:un,95:Wt,96:Co},Da={null:[Wt,ja]},La={null:[42,95]},Ma={null:[]},za=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:La,contentInitial:Aa,disable:Ma,document:Pa,flow:Ia,flowInitial:Ta,insideSpan:Da,string:Fa,text:Ra},Symbol.toStringTag,{value:"Module"}));function _a(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const c={attempt:R(P),check:R(b),consume:j,enter:N,exit:A,interrupt:R(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:m,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:h};let f=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function h(F){return l=ge(l,F),C(),l[l.length-1]!==null?[]:(_(t,0),u.events=gt(o,u.events,u),u.events)}function d(F,D){return Ba(p(F),D)}function p(F){return Oa(l,F)}function m(){const{_bufferIndex:F,_index:D,line:Y,column:L,offset:v}=r;return{_bufferIndex:F,_index:D,line:Y,column:L,offset:v}}function k(F){i[F.line]=F.column,w()}function C(){let F;for(;r._index<l.length;){const D=l[r._index];if(typeof D=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<D.length;)y(D.charCodeAt(r._bufferIndex));else y(D)}}function y(F){f=f(F)}function j(F){O(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,w()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=F}function N(F,D){const Y=D||{};return Y.type=F,Y.start=m(),u.events.push(["enter",Y,u]),a.push(Y),Y}function A(F){const D=a.pop();return D.end=m(),u.events.push(["exit",D,u]),D}function P(F,D){_(F,D.from)}function b(F,D){D.restore()}function R(F,D){return Y;function Y(L,v,M){let B,K,X,g;return Array.isArray(L)?se(L):"tokenize"in L?se([L]):le(L);function le(ne){return z;function z(H){const ee=H!==null&&ne[H],ue=H!==null&&ne.null,be=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(ue)?ue:ue?[ue]:[]];return se(be)(H)}}function se(ne){return B=ne,K=0,ne.length===0?M:x(ne[K])}function x(ne){return z;function z(H){return g=q(),X=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?re():ne.tokenize.call(D?Object.assign(Object.create(u),D):u,c,G,re)(H)}}function G(ne){return F(X,g),v}function re(ne){return g.restore(),++K<B.length?x(B[K]):M}}}function _(F,D){F.resolveAll&&!o.includes(F)&&o.push(F),F.resolve&&me(u.events,D,u.events.length-D,F.resolve(u.events.slice(D),u)),F.resolveTo&&(u.events=F.resolveTo(u.events,u))}function q(){const F=m(),D=u.previous,Y=u.currentConstruct,L=u.events.length,v=Array.from(a);return{from:L,restore:M};function M(){r=F,u.previous=D,u.currentConstruct=Y,u.events.length=L,a=v,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Oa(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ba(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
43
|
-
`;break}case-3:{l=`\r
|
|
44
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function $a(e){const r={constructs:Mr([za,...(e||{}).extensions||[]]),content:i(to),defined:[],document:i(ro),flow:i(Ca),lazy:{},string:i(Sa),text:i(Na)};return r;function i(o){return l;function l(a){return _a(r,o,a)}}}function Ha(e){for(;!$r(e););return e}const Vn=/[\0\t\n\r]/g;function Va(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const c=[];let u,f,h,d,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),h=0,t="",n&&(o.charCodeAt(0)===65279&&h++,n=void 0);h<o.length;){if(Vn.lastIndex=h,u=Vn.exec(o),d=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(d),!u){t=o.slice(h);break}if(p===10&&h===d&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<d&&(c.push(o.slice(h,d)),e+=d-h),p){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=d+1}return a&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Ua=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qa(e){return e.replace(Ua,Wa)}function Wa(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return zr(n.slice(o?2:1),o?16:10)}return sn(n)||e}const Yr={}.hasOwnProperty;function Ya(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Qa(n)(Ha($a(n).document().write(Va()(e,t,!0))))}function Qa(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Cn),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(bn),blockQuote:o(ue),characterEscape:q,characterReference:q,codeFenced:o(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(be,l),codeText:o(Ai,l),codeTextData:q,data:q,codeFlowValue:q,definition:o(Ti),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ii),hardBreakEscape:o(kn),hardBreakTrailing:o(kn),htmlFlow:o(wn,l),htmlFlowData:q,htmlText:o(wn,l),htmlTextData:q,image:o(Fi),label:l,link:o(Cn),listItem:o(Ri),listItemValue:d,listOrdered:o(vn,h),listUnordered:o(vn),paragraph:o(Di),reference:x,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(bn),strong:o(Li),thematicBreak:o(zi)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:ee,autolinkProtocol:H,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ne,characterReference:z,codeFenced:c(C),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:w,codeIndented:c(y),codeText:c(v),codeTextData:w,data:w,definition:c(),definitionDestinationString:A,definitionLabelString:j,definitionTitleString:N,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(Y),htmlFlowData:w,htmlText:c(L),htmlTextData:w,image:c(B),label:X,labelText:K,lineEnding:F,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:G,resourceDestinationString:g,resourceTitleString:le,resource:se,setextHeading:c(_),setextHeadingLineSequence:R,setextHeadingText:b,strong:c(),thematicBreak:c()}};Qr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(S){let T={type:"root",children:[]};const $={stack:[T],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},W=[];let J=-1;for(;++J<S.length;)if(S[J][1].type==="listOrdered"||S[J][1].type==="listUnordered")if(S[J][0]==="enter")W.push(J);else{const xe=W.pop();J=i(S,xe,J)}for(J=-1;++J<S.length;){const xe=t[S[J][0]];Yr.call(xe,S[J][1].type)&&xe[S[J][1].type].call(Object.assign({sliceSerialize:S[J][2].sliceSerialize},$),S[J][1])}if($.tokenStack.length>0){const xe=$.tokenStack[$.tokenStack.length-1];(xe[1]||Un).call($,void 0,xe[0])}for(T.position={start:Se(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:Se(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)T=t.transforms[J](T)||T;return T}function i(S,T,$){let W=T-1,J=-1,xe=!1,Pe,Ce,He,Ve;for(;++W<=$;){const pe=S[W];switch(pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pe[0]==="enter"?J++:J--,Ve=void 0;break}case"lineEndingBlank":{pe[0]==="enter"&&(Pe&&!Ve&&!J&&!He&&(He=W),Ve=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ve=void 0}if(!J&&pe[0]==="enter"&&pe[1].type==="listItemPrefix"||J===-1&&pe[0]==="exit"&&(pe[1].type==="listUnordered"||pe[1].type==="listOrdered")){if(Pe){let Fe=W;for(Ce=void 0;Fe--;){const ve=S[Fe];if(ve[1].type==="lineEnding"||ve[1].type==="lineEndingBlank"){if(ve[0]==="exit")continue;Ce&&(S[Ce][1].type="lineEndingBlank",xe=!0),ve[1].type="lineEnding",Ce=Fe}else if(!(ve[1].type==="linePrefix"||ve[1].type==="blockQuotePrefix"||ve[1].type==="blockQuotePrefixWhitespace"||ve[1].type==="blockQuoteMarker"||ve[1].type==="listItemIndent"))break}He&&(!Ce||He<Ce)&&(Pe._spread=!0),Pe.end=Object.assign({},Ce?S[Ce][1].start:pe[1].end),S.splice(Ce||W,0,["exit",Pe,pe[2]]),W++,$++}if(pe[1].type==="listItemPrefix"){const Fe={type:"listItem",_spread:!1,start:Object.assign({},pe[1].start),end:void 0};Pe=Fe,S.splice(W,0,["enter",Fe,pe[2]]),W++,$++,He=void 0,Ve=!0}}}return S[T][1]._spread=xe,$}function o(S,T){return $;function $(W){a.call(this,S(W),W),T&&T.call(this,W)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(S,T,$){this.stack[this.stack.length-1].children.push(S),this.stack.push(S),this.tokenStack.push([T,$||void 0]),S.position={start:Se(T.start),end:void 0}}function c(S){return T;function T($){S&&S.call(this,$),u.call(this,$)}}function u(S,T){const $=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==S.type&&(T?T.call(this,S,W[0]):(W[1]||Un).call(this,S,W[0]));else throw new Error("Cannot close `"+S.type+"` ("+Xe({start:S.start,end:S.end})+"): it’s not open");$.position.end=Se(S.end)}function f(){return an(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(S){if(this.data.expectingFirstListItemValue){const T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(S),10),this.data.expectingFirstListItemValue=void 0}}function p(){const S=this.resume(),T=this.stack[this.stack.length-1];T.lang=S}function m(){const S=this.resume(),T=this.stack[this.stack.length-1];T.meta=S}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S.replace(/(\r?\n|\r)$/g,"")}function j(S){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ye(this.sliceSerialize(S)).toLowerCase()}function N(){const S=this.resume(),T=this.stack[this.stack.length-1];T.title=S}function A(){const S=this.resume(),T=this.stack[this.stack.length-1];T.url=S}function P(S){const T=this.stack[this.stack.length-1];if(!T.depth){const $=this.sliceSerialize(S).length;T.depth=$}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function R(S){const T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(S).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function q(S){const $=this.stack[this.stack.length-1].children;let W=$[$.length-1];(!W||W.type!=="text")&&(W=Mi(),W.position={start:Se(S.start),end:void 0},$.push(W)),this.stack.push(W)}function w(S){const T=this.stack.pop();T.value+=this.sliceSerialize(S),T.position.end=Se(S.end)}function F(S){const T=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=T.children[T.children.length-1];$.position.end=Se(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(T.type)&&(q.call(this,S),w.call(this,S))}function D(){this.data.atHardBreak=!0}function Y(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function L(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function v(){const S=this.resume(),T=this.stack[this.stack.length-1];T.value=S}function M(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=T,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function B(){const S=this.stack[this.stack.length-1];if(this.data.inReference){const T=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=T,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function K(S){const T=this.sliceSerialize(S),$=this.stack[this.stack.length-2];$.label=qa(T),$.identifier=ye(T).toLowerCase()}function X(){const S=this.stack[this.stack.length-1],T=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const W=S.children;$.children=W}else $.alt=T}function g(){const S=this.resume(),T=this.stack[this.stack.length-1];T.url=S}function le(){const S=this.resume(),T=this.stack[this.stack.length-1];T.title=S}function se(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function G(S){const T=this.resume(),$=this.stack[this.stack.length-1];$.label=T,$.identifier=ye(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function re(S){this.data.characterReferenceType=S.type}function ne(S){const T=this.sliceSerialize(S),$=this.data.characterReferenceType;let W;$?(W=zr(T,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=sn(T);const J=this.stack[this.stack.length-1];J.value+=W}function z(S){const T=this.stack.pop();T.position.end=Se(S.end)}function H(S){w.call(this,S);const T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(S)}function ee(S){w.call(this,S);const T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(S)}function ue(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Ai(){return{type:"inlineCode",value:""}}function Ti(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ii(){return{type:"emphasis",children:[]}}function bn(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function wn(){return{type:"html",value:""}}function Fi(){return{type:"image",title:null,url:"",alt:null}}function Cn(){return{type:"link",title:null,url:"",children:[]}}function vn(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function Ri(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Di(){return{type:"paragraph",children:[]}}function Li(){return{type:"strong",children:[]}}function Mi(){return{type:"text",value:""}}function zi(){return{type:"thematicBreak"}}}function Se(e){return{line:e.line,column:e.column,offset:e.offset}}function Qr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qr(e,r):Xa(e,r)}}function Xa(e,t){let n;for(n in t)if(Yr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Un(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xe({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xe({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xe({start:t.start,end:t.end})+") is still open")}function Ka(e){const t=this;t.parser=n;function n(r){return Ya(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ga(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Ja(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
45
|
-
`}]}function Za(e,t){const n=t.value?t.value+`
|
|
46
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function es(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ts(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ns(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=$e(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function rs(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function is(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Xr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function ls(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Xr(e,t);const i={src:$e(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function os(e,t){const n={src:$e(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function as(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ss(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Xr(e,t);const i={href:$e(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function us(e,t){const n={href:$e(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cs(e,t,n){const r=e.all(t),i=n?hs(n):Kr(t),o={},l=[];if(typeof t.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
47
|
-
`}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
|
|
48
|
-
`});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function hs(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Kr(n[r])}return t}function Kr(e){const t=e.spread;return t??e.children.length>1}function fs(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function ps(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ds(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function ms(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gs(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=nn(t.children[1]),c=Ar(t.children[t.children.length-1]);a&&c&&(l.position={start:a,end:c}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function xs(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let c=-1;const u=[];for(;++c<a;){const h=t.children[c],d={},p=l?l[c]:void 0;p&&(d.align=p);let m={type:"element",tagName:o,properties:d,children:[]};h&&(m.children=e.all(h),e.patch(h,m),m=e.applyData(h,m)),u.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function ys(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qn=9,Wn=32;function bs(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Yn(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Yn(t.slice(i),i>0,!1)),o.join("")}function Yn(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===qn||o===Wn;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===qn||o===Wn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ks(e,t){const n={type:"text",value:bs(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ws(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Cs={blockquote:Ga,break:Ja,code:Za,delete:es,emphasis:ts,footnoteReference:ns,heading:rs,html:is,imageReference:ls,image:os,inlineCode:as,linkReference:ss,link:us,listItem:cs,list:fs,paragraph:ps,root:ds,strong:ms,table:gs,tableCell:ys,tableRow:xs,text:ks,thematicBreak:ws,toml:lt,yaml:lt,definition:lt,footnoteDefinition:lt};function lt(){}const Gr=-1,xt=0,Ge=1,ft=2,cn=3,hn=4,fn=5,pn=6,Jr=7,Zr=8,Qn=typeof self=="object"?self:globalThis,vs=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case xt:case Gr:return n(l,i);case Ge:{const a=n([],i);for(const c of l)a.push(r(c));return a}case ft:{const a=n({},i);for(const[c,u]of l)a[r(c)]=r(u);return a}case cn:return n(new Date(l),i);case hn:{const{source:a,flags:c}=l;return n(new RegExp(a,c),i)}case fn:{const a=n(new Map,i);for(const[c,u]of l)a.set(r(c),r(u));return a}case pn:{const a=n(new Set,i);for(const c of l)a.add(r(c));return a}case Jr:{const{name:a,message:c}=l;return n(new Qn[a](c),i)}case Zr:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new Qn[o](l),i)};return r},Xn=e=>vs(new Map,e)(0),De="",{toString:js}={},{keys:Ss}=Object,Ye=e=>{const t=typeof e;if(t!=="object"||!e)return[xt,t];const n=js.call(e).slice(8,-1);switch(n){case"Array":return[Ge,De];case"Object":return[ft,De];case"Date":return[cn,De];case"RegExp":return[hn,De];case"Map":return[fn,De];case"Set":return[pn,De];case"DataView":return[Ge,n]}return n.includes("Array")?[Ge,n]:n.includes("Error")?[Jr,n]:[ft,n]},ot=([e,t])=>e===xt&&(t==="function"||t==="symbol"),Ns=(e,t,n,r)=>{const i=(l,a)=>{const c=r.push(l)-1;return n.set(a,c),c},o=l=>{if(n.has(l))return n.get(l);let[a,c]=Ye(l);switch(a){case xt:{let f=l;switch(c){case"bigint":a=Zr,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([Gr],l)}return i([a,f],l)}case Ge:{if(c){let d=l;return c==="DataView"?d=new Uint8Array(l.buffer):c==="ArrayBuffer"&&(d=new Uint8Array(l)),i([c,[...d]],l)}const f=[],h=i([a,f],l);for(const d of l)f.push(o(d));return h}case ft:{if(c)switch(c){case"BigInt":return i([c,l.toString()],l);case"Boolean":case"Number":case"String":return i([c,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],h=i([a,f],l);for(const d of Ss(l))(e||!ot(Ye(l[d])))&&f.push([o(d),o(l[d])]);return h}case cn:return i([a,l.toISOString()],l);case hn:{const{source:f,flags:h}=l;return i([a,{source:f,flags:h}],l)}case fn:{const f=[],h=i([a,f],l);for(const[d,p]of l)(e||!(ot(Ye(d))||ot(Ye(p))))&&f.push([o(d),o(p)]);return h}case pn:{const f=[],h=i([a,f],l);for(const d of l)(e||!ot(Ye(d)))&&f.push(o(d));return h}}const{message:u}=l;return i([a,{name:c,message:u}],l)};return o},Kn=(e,{json:t,lossy:n}={})=>{const r=[];return Ns(!(t||n),!!t,new Map,r)(e),r},pt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xn(Kn(e,t)):structuredClone(e):(e,t)=>Xn(Kn(e,t));function Es(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ps(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function As(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Es,r=e.options.footnoteBackLabel||Ps,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const f=e.all(u),h=String(u.identifier).toUpperCase(),d=$e(h.toLowerCase());let p=0;const m=[],k=e.footnoteCounts.get(h);for(;k!==void 0&&++p<=k;){m.length>0&&m.push({type:"text",value:" "});let j=typeof n=="string"?n:n(c,p);typeof j=="string"&&(j={type:"text",value:j}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const j=C.children[C.children.length-1];j&&j.type==="text"?j.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...m)}else f.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(f,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...pt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
49
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
|
50
|
-
`}]}}const yt=(function(e){if(e==null)return Rs;if(typeof e=="function")return bt(e);if(typeof e=="object")return Array.isArray(e)?Ts(e):Is(e);if(typeof e=="string")return Fs(e);throw new Error("Expected function, string, or object as test")});function Ts(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=yt(e[n]);return bt(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Is(e){const t=e;return bt(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Fs(e){return bt(t);function t(n){return n&&n.type===e}}function bt(e){return t;function t(n,r,i){return!!(Ds(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Rs(){return!0}function Ds(e){return e!==null&&typeof e=="object"&&"type"in e}const ei=[],Ls=!0,Yt=!1,Ms="skip";function ti(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=yt(i),l=r?-1:1;a(e,void 0,[])();function a(c,u,f){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=ei,m,k,C;if((!t||o(c,u,f[f.length-1]||void 0))&&(p=zs(n(c,f)),p[0]===Yt))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==Ms)for(k=(r?y.children.length:-1)+l,C=f.concat(y);k>-1&&k<y.children.length;){const j=y.children[k];if(m=a(j,k,C)(),m[0]===Yt)return m;k=typeof m[1]=="number"?m[1]:k+l}}return p}}}function zs(e){return Array.isArray(e)?e:typeof e=="number"?[Ls,e]:e==null?ei:[e]}function dn(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),ti(e,o,a,i);function a(c,u){const f=u[u.length-1],h=f?f.children.indexOf(c):void 0;return l(c,h,f)}}const Qt={}.hasOwnProperty,_s={};function Os(e,t){const n=t||_s,r=new Map,i=new Map,o=new Map,l={...Cs,...n.handlers},a={all:u,applyData:$s,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:c,options:n,patch:Bs,wrap:Vs};return dn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();h.has(d)||h.set(d,f)}}),a;function c(f,h){const d=f.type,p=a.handlers[d];if(Qt.call(a.handlers,d)&&p)return p(a,f,h);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in f){const{children:k,...C}=f,y=pt(C);return y.children=a.all(f),y}return pt(f)}return(a.options.unknownHandler||Hs)(a,f,h)}function u(f){const h=[];if("children"in f){const d=f.children;let p=-1;for(;++p<d.length;){const m=a.one(d[p],f);if(m){if(p&&d[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Gn(m.value)),!Array.isArray(m)&&m.type==="element")){const k=m.children[0];k&&k.type==="text"&&(k.value=Gn(k.value))}Array.isArray(m)?h.push(...m):h.push(m)}}}return h}}function Bs(e,t){e.position&&(t.position=El(e))}function $s(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,pt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Hs(e,t){const n=t.data||{},r="value"in t&&!(Qt.call(n,"hProperties")||Qt.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vs(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
51
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
52
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
53
|
-
`}),n}function Gn(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Jn(e,t){const n=Os(e,t),r=n.one(e,void 0),i=As(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
54
|
-
`},i),o}function Us(e,t){return e&&"run"in e?async function(n,r){const i=Jn(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Jn(n,{file:r,...e||t})}}function Zn(e){if(e)throw e}var Nt,er;function qs(){if(er)return Nt;er=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!h)return!1;var d;for(d in u);return typeof d>"u"||e.call(u,d)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Nt=function c(){var u,f,h,d,p,m,k=arguments[0],C=1,y=arguments.length,j=!1;for(typeof k=="boolean"&&(j=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<y;++C)if(u=arguments[C],u!=null)for(f in u)h=a(k,f),d=a(u,f),k!==d&&(j&&d&&(o(d)||(p=i(d)))?(p?(p=!1,m=h&&i(h)?h:[]):m=h&&o(h)?h:{},l(k,{name:f,newValue:c(j,m,d)})):typeof d<"u"&&l(k,{name:f,newValue:d}));return k},Nt}var Ws=qs();const Et=xr(Ws);function Xt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ys(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(c,...u){const f=e[++o];let h=-1;if(c){l(c);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,f?Qs(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Qs(e,t){let n;return r;function r(...l){const a=e.length>l.length;let c;a&&l.push(i);try{c=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const ke={basename:Xs,dirname:Ks,extname:Gs,join:Js,sep:"/"};function Xs(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');it(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Ks(e){if(it(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Gs(e){it(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Js(...e){let t=-1,n;for(;++t<e.length;)it(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Zs(n)}function Zs(e){it(e);const t=e.codePointAt(0)===47;let n=eu(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eu(e,t){let n="",r=0,i=-1,o=0,l=-1,a,c;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function it(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tu={cwd:nu};function nu(){return"/"}function Kt(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ru(e){if(typeof e=="string")e=new URL(e);else if(!Kt(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return iu(e)}function iu(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pt=["history","path","basename","stem","extname","dirname"];class ni{constructor(t){let n;t?Kt(t)?n={path:t}:typeof t=="string"||lu(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pt.length;){const o=Pt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Pt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ke.basename(this.path):void 0}set basename(t){Tt(t,"basename"),At(t,"basename"),this.path=ke.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ke.dirname(this.path):void 0}set dirname(t){tr(this.basename,"dirname"),this.path=ke.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ke.extname(this.path):void 0}set extname(t){if(At(t,"extname"),tr(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ke.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Kt(t)&&(t=ru(t)),Tt(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ke.basename(this.path,this.extname):void 0}set stem(t){Tt(t,"stem"),At(t,"stem"),this.path=ke.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ae(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function At(e,t){if(e&&e.includes(ke.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ke.sep+"`")}function Tt(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function tr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function lu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ou=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),au={}.hasOwnProperty;class mn extends ou{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ys()}copy(){const t=new mn;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Et(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Rt("data",this.frozen),this.namespace[t]=n,this):au.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Rt("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=at(t),r=this.parser||this.Parser;return It("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),It("process",this.parser||this.Parser),Ft("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=at(t),c=r.parse(a);r.run(c,a,function(f,h,d){if(f||!h||!d)return u(f);const p=h,m=r.stringify(p,d);cu(m)?d.value=m:d.result=m,u(f,d)});function u(f,h){f||!h?l(f):o?o(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),It("processSync",this.parser||this.Parser),Ft("processSync",this.compiler||this.Compiler),this.process(t,i),rr("processSync","process",n),r;function i(o,l){n=!0,Zn(o),r=l}}run(t,n,r){nr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const c=at(n);i.run(t,c,u);function u(f,h,d){const p=h||t;f?a(f):l?l(p):r(void 0,p,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),rr("runSync","run",r),i;function o(l,a){Zn(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=at(n),i=this.compiler||this.Compiler;return Ft("stringify",i),nr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Rt("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...h]=u;c(f,h)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Et(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const h=u[f];o(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,f){let h=-1,d=-1;for(;++h<r.length;)if(r[h][0]===u){d=h;break}if(d===-1)r.push([u,...f]);else if(f.length>0){let[p,...m]=f;const k=r[d][1];Xt(k)&&Xt(p)&&(p=Et(!0,k,p)),r[d]=[u,p,...m]}}}}const su=new mn().freeze();function It(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ft(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Rt(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nr(e){if(!Xt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function rr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function at(e){return uu(e)?e:new ni(e)}function uu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cu(e){return typeof e=="string"||hu(e)}function hu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ir=[],lr={allowDangerousHtml:!0},pu=/^(https?|ircs?|mailto|xmpp)$/i,du=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mu(e){const t=gu(e),n=xu(e);return yu(t.runSync(t.parse(n),n),e)}function gu(e){const t=e.rehypePlugins||ir,n=e.remarkPlugins||ir,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lr}:lr;return su().use(Ka).use(n).use(Us,r).use(t)}function xu(e){const t=e.children||"",n=new ni;return typeof t=="string"&&(n.value=t),n}function yu(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,c=t.urlTransform||bu;for(const f of du)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+fu+f.id,void 0);return dn(e,u),Fl(e,{Fragment:s.Fragment,components:i,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function u(f,h,d){if(f.type==="raw"&&d&&typeof h=="number")return l?d.children.splice(h,1):d.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in vt)if(Object.hasOwn(vt,p)&&Object.hasOwn(f.properties,p)){const m=f.properties[p],k=vt[p];(k===null||k.includes(f.tagName))&&(f.properties[p]=c(String(m||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(f,h,d)),p&&d&&typeof h=="number")return a&&f.children?d.children.splice(h,1,...f.children):d.children.splice(h,1),h}}}function bu(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||pu.test(e.slice(0,t))?e:""}function or(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ku(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wu(e,t,n){const i=yt((n||{}).ignore||[]),o=Cu(t);let l=-1;for(;++l<o.length;)ti(e,"text",a);function a(u,f){let h=-1,d;for(;++h<f.length;){const p=f[h],m=d?d.children:void 0;if(i(p,m?m.indexOf(p):void 0,d))return;d=p}if(d)return c(u,f)}function c(u,f){const h=f[f.length-1],d=o[l][0],p=o[l][1];let m=0;const C=h.children.indexOf(u);let y=!1,j=[];d.lastIndex=0;let N=d.exec(u.value);for(;N;){const A=N.index,P={index:N.index,input:N.input,stack:[...f,u]};let b=p(...N,P);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?d.lastIndex=A+1:(m!==A&&j.push({type:"text",value:u.value.slice(m,A)}),Array.isArray(b)?j.push(...b):b&&j.push(b),m=A+N[0].length,y=!0),!d.global)break;N=d.exec(u.value)}return y?(m<u.value.length&&j.push({type:"text",value:u.value.slice(m)}),h.children.splice(C,1,...j)):j=[u],C+j.length}}function Cu(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([vu(i[0]),ju(i[1])])}return t}function vu(e){return typeof e=="string"?new RegExp(ku(e),"g"):e}function ju(e){return typeof e=="function"?e:function(){return e}}const Dt="phrasing",Lt=["autolink","link","image","label"];function Su(){return{transforms:[Fu],enter:{literalAutolink:Eu,literalAutolinkEmail:Mt,literalAutolinkHttp:Mt,literalAutolinkWww:Mt},exit:{literalAutolink:Iu,literalAutolinkEmail:Tu,literalAutolinkHttp:Pu,literalAutolinkWww:Au}}}function Nu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dt,notInConstruct:Lt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dt,notInConstruct:Lt},{character:":",before:"[ps]",after:"\\/",inConstruct:Dt,notInConstruct:Lt}]}}function Eu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Mt(e){this.config.enter.autolinkProtocol.call(this,e)}function Pu(e){this.config.exit.autolinkProtocol.call(this,e)}function Au(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Tu(e){this.config.exit.autolinkEmail.call(this,e)}function Iu(e){this.exit(e)}function Fu(e){wu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Ru],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Du]],{ignore:["link","linkReference"]})}function Ru(e,t,n,r,i){let o="";if(!ri(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Lu(n)))return!1;const l=Mu(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Du(e,t,n,r){return!ri(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Lu(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Mu(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=or(e,"(");let o=or(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ri(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Te(n)||mt(n))&&(!t||n!==47)}ii.peek=qu;function zu(){this.buffer()}function _u(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ou(){this.buffer()}function Bu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $u(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Hu(e){this.exit(e)}function Vu(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ye(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Uu(e){this.exit(e)}function qu(){return"["}function ii(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Wu(){return{enter:{gfmFootnoteCallString:zu,gfmFootnoteCall:_u,gfmFootnoteDefinitionLabelString:Ou,gfmFootnoteDefinition:Bu},exit:{gfmFootnoteCallString:$u,gfmFootnoteCall:Hu,gfmFootnoteDefinitionLabelString:Vu,gfmFootnoteDefinition:Uu}}}function Yu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ii},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let c=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return c+=a.move(o.safe(o.associationId(r),{before:c,after:"]"})),f(),c+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),c+=a.move((t?`
|
|
55
|
-
`:" ")+o.indentLines(o.containerFlow(r,a.current()),t?li:Qu))),u(),c}}function Qu(e,t,n){return t===0?e:li(e,t,n)}function li(e,t,n){return(n?"":" ")+e}const Xu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];oi.peek=ec;function Ku(){return{canContainEols:["delete"],enter:{strikethrough:Ju},exit:{strikethrough:Zu}}}function Gu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Xu}],handlers:{delete:oi}}}function Ju(e){this.enter({type:"delete",children:[]},e)}function Zu(e){this.exit(e)}function oi(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function ec(){return"~"}function tc(e){return e.length}function nc(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||tc,o=[],l=[],a=[],c=[];let u=0,f=-1;for(;++f<e.length;){const k=[],C=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const j=rc(e[f][y]);if(n.alignDelimiters!==!1){const N=i(j);C[y]=N,(c[y]===void 0||N>c[y])&&(c[y]=N)}k.push(j)}l[f]=k,a[f]=C}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)o[h]=ar(r[h]);else{const k=ar(r);for(;++h<u;)o[h]=k}h=-1;const d=[],p=[];for(;++h<u;){const k=o[h];let C="",y="";k===99?(C=":",y=":"):k===108?C=":":k===114&&(y=":");let j=n.alignDelimiters===!1?1:Math.max(1,c[h]-C.length-y.length);const N=C+"-".repeat(j)+y;n.alignDelimiters!==!1&&(j=C.length+j+y.length,j>c[h]&&(c[h]=j),p[h]=j),d[h]=N}l.splice(1,0,d),a.splice(1,0,p),f=-1;const m=[];for(;++f<l.length;){const k=l[f],C=a[f];h=-1;const y=[];for(;++h<u;){const j=k[h]||"";let N="",A="";if(n.alignDelimiters!==!1){const P=c[h]-(C[h]||0),b=o[h];b===114?N=" ".repeat(P):b===99?P%2?(N=" ".repeat(P/2+.5),A=" ".repeat(P/2-.5)):(N=" ".repeat(P/2),A=N):A=" ".repeat(P)}n.delimiterStart!==!1&&!h&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||h)&&y.push(" "),n.alignDelimiters!==!1&&y.push(N),y.push(j),n.alignDelimiters!==!1&&y.push(A),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
|
|
56
|
-
`)}function rc(e){return e==null?"":String(e)}function ar(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function ic(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),lc);return i(),l}function lc(e,t,n){return">"+(n?"":" ")+e}function oc(e,t){return sr(e,t.inConstruct,!0)&&!sr(e,t.notInConstruct,!1)}function sr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ur(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
57
|
-
`&&oc(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
58
|
-
`}function ac(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function sc(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function uc(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cc(e,t,n,r){const i=uc(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(sc(e,n)){const h=n.enter("codeIndented"),d=n.indentLines(o,hc);return h(),d}const a=n.createTracker(r),c=i.repeat(Math.max(ac(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(c);if(e.lang){const h=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
|
|
59
|
-
`,encode:["`"],...a.current()})),h()}return f+=a.move(`
|
|
60
|
-
`),o&&(f+=a.move(o+`
|
|
61
|
-
`)),f+=a.move(c),u(),f}function hc(e,t,n){return(n?"":" ")+e}function gn(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function fc(e,t,n,r){const i=gn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
62
|
-
`,...c.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),l(),u}function pc(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function et(e){return"&#x"+e.toString(16).toUpperCase()+";"}function dt(e,t,n){const r=_e(e),i=_e(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ai.peek=dc;function ai(e,t,n,r){const i=pc(n),o=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let c=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=c.charCodeAt(0),f=dt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=et(u)+c.slice(1));const h=c.charCodeAt(c.length-1),d=dt(r.after.charCodeAt(0),h,i);d.inside&&(c=c.slice(0,-1)+et(h));const p=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+p}function dc(e,t,n){return n.options.emphasis||"*"}function mc(e,t){let n=!1;return dn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Yt}),!!((!e.depth||e.depth<3)&&an(e)&&(t.options.setext||n))}function gc(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(mc(e,n)){const f=n.enter("headingSetext"),h=n.enter("phrasing"),d=n.containerPhrasing(e,{...o.current(),before:`
|
|
63
|
-
`,after:`
|
|
64
|
-
`});return h(),f(),d+`
|
|
65
|
-
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
66
|
-
`))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),c=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
67
|
-
`,...o.current()});return/^[\t ]/.test(u)&&(u=et(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),c(),a(),u}si.peek=xc;function si(e){return e.value||""}function xc(){return"<"}ui.peek=yc;function ui(e,t,n,r){const i=gn(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(n.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),u+=c.move(")"),l(),u}function yc(){return"!"}ci.peek=bc;function ci(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let c=a.move("![");const u=n.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==h?c+=a.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function bc(){return"!"}hi.peek=kc;function hi(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let c;if(l.atBreak)for(;c=a.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return i+r+i}function kc(){return"`"}function fi(e,t){const n=an(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}pi.peek=wc;function pi(e,t,n,r){const i=gn(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,c;if(fi(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let h=l.move("<");return h+=l.move(n.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),a(),n.stack=f,h}a=n.enter("link"),c=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(c=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),c()),u+=l.move(")"),a(),u}function wc(e,t,n){return fi(e,n)?"<":"["}di.peek=Cc;function di(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let c=a.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==h?c+=a.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Cc(){return"["}function xn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function vc(e){const t=xn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function jc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mi(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Sc(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?jc(n):xn(n);const a=e.ordered?l==="."?")":".":vc(n);let c=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),mi(n)===l&&f){let h=-1;for(;++h<e.children.length;){const d=e.children[h];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function Nc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ec(e,t,n,r){const i=Nc(n);let o=n.bulletCurrent||xn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return c(),u;function f(h,d,p){return d?(p?"":" ".repeat(l))+h:(p?o:o+" ".repeat(l-o.length))+h}}function Pc(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const Ac=yt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tc(e,t,n,r){return(e.children.some(function(l){return Ac(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ic(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}gi.peek=Fc;function gi(e,t,n,r){const i=Ic(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let c=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=c.charCodeAt(0),f=dt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=et(u)+c.slice(1));const h=c.charCodeAt(c.length-1),d=dt(r.after.charCodeAt(0),h,i);d.inside&&(c=c.slice(0,-1)+et(h));const p=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+p}function Fc(e,t,n){return n.options.strong||"*"}function Rc(e,t,n,r){return n.safe(e.value,r)}function Dc(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Lc(e,t,n){const r=(mi(n)+(n.options.ruleSpaces?" ":"")).repeat(Dc(n));return n.options.ruleSpaces?r.slice(0,-1):r}const xi={blockquote:ic,break:ur,code:cc,definition:fc,emphasis:ai,hardBreak:ur,heading:gc,html:si,image:ui,imageReference:ci,inlineCode:hi,link:pi,linkReference:di,list:Sc,listItem:Ec,paragraph:Pc,root:Tc,strong:gi,text:Rc,thematicBreak:Lc};function Mc(){return{enter:{table:zc,tableData:cr,tableHeader:cr,tableRow:Oc},exit:{codeText:Bc,table:_c,tableData:zt,tableHeader:zt,tableRow:zt}}}function zc(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function _c(e){this.exit(e),this.data.inTable=void 0}function Oc(e){this.enter({type:"tableRow",children:[]},e)}function zt(e){this.exit(e)}function cr(e){this.enter({type:"tableCell",children:[]},e)}function Bc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$c));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function $c(e,t){return t==="|"?t:e}function Hc(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
68
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:l,tableCell:c,tableRow:a}};function l(p,m,k,C){return u(f(p,k,C),p.align)}function a(p,m,k,C){const y=h(p,k,C),j=u([y]);return j.slice(0,j.indexOf(`
|
|
69
|
-
`))}function c(p,m,k,C){const y=k.enter("tableCell"),j=k.enter("phrasing"),N=k.containerPhrasing(p,{...C,before:o,after:o});return j(),y(),N}function u(p,m){return nc(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(p,m,k){const C=p.children;let y=-1;const j=[],N=m.enter("table");for(;++y<C.length;)j[y]=h(C[y],m,k);return N(),j}function h(p,m,k){const C=p.children;let y=-1;const j=[],N=m.enter("tableRow");for(;++y<C.length;)j[y]=c(C[y],p,m,k);return N(),j}function d(p,m,k){let C=xi.inlineCode(p,m,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Vc(){return{exit:{taskListCheckValueChecked:hr,taskListCheckValueUnchecked:hr,paragraph:qc}}}function Uc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wc}}}function hr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function qc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Wc(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let c=xi.listItem(e,t,n,{...r,...a.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(f){return f+l}}function Yc(){return[Su(),Wu(),Ku(),Mc(),Vc()]}function Qc(e){return{extensions:[Nu(),Yu(e),Gu(),Hc(e),Uc()]}}const Xc={tokenize:th,partial:!0},yi={tokenize:nh,partial:!0},bi={tokenize:rh,partial:!0},ki={tokenize:ih,partial:!0},Kc={tokenize:lh,partial:!0},wi={name:"wwwAutolink",tokenize:Zc,previous:vi},Ci={name:"protocolAutolink",tokenize:eh,previous:ji},je={name:"emailAutolink",tokenize:Jc,previous:Si},we={};function Gc(){return{text:we}}let Ae=48;for(;Ae<123;)we[Ae]=je,Ae++,Ae===58?Ae=65:Ae===91&&(Ae=97);we[43]=je;we[45]=je;we[46]=je;we[95]=je;we[72]=[je,Ci];we[104]=[je,Ci];we[87]=[je,wi];we[119]=[je,wi];function Jc(e,t,n){const r=this;let i,o;return l;function l(h){return!Gt(h)||!Si.call(r,r.previous)||yn(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return Gt(h)?(e.consume(h),a):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(Kc,f,u)(h):h===45||h===95||oe(h)?(o=!0,e.consume(h),c):f(h)}function u(h){return e.consume(h),i=!0,c}function f(h){return o&&i&&ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function Zc(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!vi.call(r,r.previous)||yn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Xc,e.attempt(yi,e.attempt(bi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function eh(e,t,n){const r=this;let i="",o=!1;return l;function l(h){return(h===72||h===104)&&ji.call(r,r.previous)&&!yn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):n(h)}function a(h){if(ce(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),a;if(h===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),o?u:(o=!0,c)):n(h)}function u(h){return h===null||ht(h)||Z(h)||Te(h)||mt(h)?n(h):e.attempt(yi,e.attempt(bi,f),n)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function th(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function nh(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(ki,c,a)(u):u===null||Z(u)||Te(u)||u!==45&&mt(u)?c(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function c(u){return i||r||!o?n(u):t(u)}}function rh(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(ki,t,o)(l):l===null||Z(l)||Te(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function ih(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||Z(a)||Te(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Z(a)||Te(a)?t(a):r(a)}function o(a){return ce(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):ce(a)?(e.consume(a),l):n(a)}}function lh(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return oe(o)?n(o):t(o)}}function vi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Z(e)}function ji(e){return!ce(e)}function Si(e){return!(e===47||Gt(e))}function Gt(e){return e===43||e===45||e===46||e===95||oe(e)}function yn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const oh={tokenize:dh,partial:!0};function ah(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hh,continuation:{tokenize:fh},exit:ph}},text:{91:{name:"gfmFootnoteCall",tokenize:ch},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sh,resolveTo:uh}}}}function sh(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){l=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!l||!l._balanced)return n(c);const u=ye(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function uh(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function ch(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(o>999||h===93&&!l||h===null||h===91||Z(h))return n(h);if(h===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(ye(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Z(h)||(l=!0),o++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}}function hh(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(l>999||m===93&&!a||m===null||m===91||Z(m))return n(m);if(m===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=ye(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Z(m)||(a=!0),l++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),Q(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function fh(e,t,n){return e.check(rt,t,e.attempt(oh,t,n))}function ph(e){e.exit("gfmFootnoteDefinition")}function dh(e,t,n){const r=this;return Q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function mh(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let c=-1;for(;++c<l.length;)if(l[c][0]==="enter"&&l[c][1].type==="strikethroughSequenceTemporary"&&l[c][1]._close){let u=c;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[c][1].end.offset-l[c][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[c][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[c][1].end)},h={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[c][1].start)},d=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",h,a]],p=a.parser.constructs.insideSpan.null;p&&me(d,d.length,0,gt(p,l.slice(u+1,c),a)),me(d,d.length,0,[["exit",h,a],["enter",l[c][1],a],["exit",l[c][1],a],["exit",f,a]]),me(l,u-1,c-u+3,d),c=u+d.length-2;break}}for(c=-1;++c<l.length;)l[c][1].type==="strikethroughSequenceTemporary"&&(l[c][1].type="data");return l}function o(l,a,c){const u=this.previous,f=this.events;let h=0;return d;function d(m){return u===126&&f[f.length-1][1].type!=="characterEscape"?c(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const k=_e(u);if(m===126)return h>1?c(m):(l.consume(m),h++,p);if(h<2&&!n)return c(m);const C=l.exit("strikethroughSequenceTemporary"),y=_e(m);return C._open=!y||y===2&&!!k,C._close=!k||k===2&&!!y,a(m)}}}class gh{constructor(){this.map=[]}add(t,n,r){xh(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function xh(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function yh(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function bh(){return{flow:{null:{name:"table",tokenize:kh,resolveAll:wh}}}}function kh(e,t,n){const r=this;let i=0,o=0,l;return a;function a(w){let F=r.events.length-1;for(;F>-1;){const L=r.events[F][1].type;if(L==="lineEnding"||L==="linePrefix")F--;else break}const D=F>-1?r.events[F][1].type:null,Y=D==="tableHead"||D==="tableRow"?b:c;return Y===b&&r.parser.lazy[r.now().line]?n(w):Y(w)}function c(w){return e.enter("tableHead"),e.enter("tableRow"),u(w)}function u(w){return w===124||(l=!0,o+=1),f(w)}function f(w){return w===null?n(w):O(w)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),p):n(w):U(w)?Q(e,f,"whitespace")(w):(o+=1,l&&(l=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),h(w)))}function h(w){return w===null||w===124||Z(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?d:h)}function d(w){return w===92||w===124?(e.consume(w),h):h(w)}function p(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),l=!1,U(w)?Q(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):m(w))}function m(w){return w===45||w===58?C(w):w===124?(l=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),k):P(w)}function k(w){return U(w)?Q(e,C,"whitespace")(w):C(w)}function C(w){return w===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),y):w===45?(o+=1,y(w)):w===null||O(w)?A(w):P(w)}function y(w){return w===45?(e.enter("tableDelimiterFiller"),j(w)):P(w)}function j(w){return w===45?(e.consume(w),j):w===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(w))}function N(w){return U(w)?Q(e,A,"whitespace")(w):A(w)}function A(w){return w===124?m(w):w===null||O(w)?!l||i!==o?P(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):P(w)}function P(w){return n(w)}function b(w){return e.enter("tableRow"),R(w)}function R(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),R):w===null||O(w)?(e.exit("tableRow"),t(w)):U(w)?Q(e,R,"whitespace")(w):(e.enter("data"),_(w))}function _(w){return w===null||w===124||Z(w)?(e.exit("data"),R(w)):(e.consume(w),w===92?q:_)}function q(w){return w===92||w===124?(e.consume(w),_):_(w)}}function wh(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,c=0,u,f,h;const d=new gh;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,c!==0&&(fr(d,t,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],h=st(d,t,o,i,void 0,h),o=[0,0,0,0]),l[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],h=st(d,t,o,i,void 0,h)),o=l,l=[o[1],n,0,0])):m.type==="tableHead"?(a=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,o[1]!==0?(l[0]=l[1],h=st(d,t,o,i,n,h)):l[1]!==0&&(h=st(d,t,l,i,n,h)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=n)}for(c!==0&&fr(d,t,c,u,f),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=yh(t.events,n))}return e}function st(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Le(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=Le(t.events,n[1]);if(o={type:l,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Le(t.events,n[2]),f=Le(t.events,n[3]),h={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,k=n[3]-n[2]-1;e.add(m,k,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(o.end=Object.assign({},Le(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function fr(e,t,n,r,i){const o=[],l=Le(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Le(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Ch={name:"tasklistCheck",tokenize:jh};function vh(){return{text:{91:Ch}}}function jh(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return Z(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),l):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),l):n(c)}function l(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(c)}function a(c){return O(c)?t(c):U(c)?e.check({tokenize:Sh},t,n)(c):n(c)}}function Sh(e,t,n){return Q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Nh(e){return Mr([Gc(),ah(),mh(e),bh(),vh()])}const Eh={};function Ph(e){const t=this,n=e||Eh,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Nh(n)),o.push(Yc()),l.push(Qc(n))}function Ni({content:e,className:t}){const n=e.trim().replace(/^#+ .+$/m,"").trim();return s.jsx(mu,{remarkPlugins:[Ph],components:{h1:({children:r})=>s.jsx("h1",{className:"text-lg font-bold text-gray-900 mb-3 mt-6 first:mt-0 pb-1 border-b border-gray-200",children:r}),h2:({children:r})=>s.jsx("h2",{className:"text-base font-semibold text-gray-900 mb-2 mt-5 first:mt-0",children:r}),h3:({children:r})=>s.jsx("h3",{className:"text-sm font-semibold text-gray-800 mb-2 mt-4 first:mt-0",children:r}),p:({children:r})=>s.jsx("p",{className:"text-sm text-gray-700 mb-3 leading-relaxed",children:r}),ul:({children:r})=>s.jsx("ul",{className:"list-disc ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),ol:({children:r})=>s.jsx("ol",{className:"list-decimal ml-5 text-sm text-gray-700 mb-3 space-y-1.5",children:r}),li:({children:r})=>s.jsx("li",{className:"leading-relaxed",children:r}),code:({children:r,className:i})=>(i==null?void 0:i.includes("language-"))?s.jsx("pre",{className:"bg-gray-100 rounded p-3 text-xs font-mono overflow-x-auto mb-3",children:s.jsx("code",{children:r})}):s.jsx("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs font-mono text-gray-800",children:r}),pre:({children:r})=>s.jsx(s.Fragment,{children:r}),strong:({children:r})=>s.jsx("strong",{className:"font-semibold text-gray-900",children:r}),blockquote:({children:r})=>s.jsx("blockquote",{className:"border-l-4 border-gray-300 pl-4 italic text-gray-600 mb-3",children:r}),table:({children:r})=>s.jsx("div",{className:"overflow-x-auto mb-3",children:s.jsx("table",{className:"min-w-full text-sm border-collapse border border-gray-200",children:r})}),thead:({children:r})=>s.jsx("thead",{className:"bg-gray-50",children:r}),th:({children:r})=>s.jsx("th",{className:"border border-gray-200 px-3 py-2 text-left font-semibold text-gray-900",children:r}),td:({children:r})=>s.jsx("td",{className:"border border-gray-200 px-3 py-2 text-gray-700",children:r}),a:({children:r,href:i})=>s.jsx("a",{href:i,className:"text-[#005C75] hover:underline",target:"_blank",rel:"noopener noreferrer",children:r})},children:n})}function Ei(e){const t={name:"root",path:"",memories:[],children:new Map};for(const n of e){const r=n.filePath.split("/");r.pop();let i=t,o="";for(const l of r)o=o?`${o}/${l}`:l,i.children.has(l)||i.children.set(l,{name:l,path:o,memories:[],children:new Map}),i=i.children.get(l);r.length===0?t.memories.push(n):i.memories.push(n)}return t}function Pi(e){let t=e.memories.length;for(const n of e.children.values())t+=Pi(n);return t}function kt(e,t){var r;const n=e.match(/^#+ (.+)$/m);return n?n[1]:((r=t.split("/").pop())==null?void 0:r.replace(".md",""))||t}function Je(e){return Math.round(e/3.5)}function Me(e){const t=new Date(e),n=new Date;if(t.toDateString()===n.toDateString()){const c=n.getTime()-t.getTime(),u=Math.floor(c/(1e3*60)),f=Math.floor(c/(1e3*60*60));return u<3?"Just now":u<60?`${u}min ago`:f===1?"1h ago":`${f}h ago`}const i=t.toLocaleDateString("en-US",{month:"short"}),o=t.getDate(),l=t.getFullYear(),a=n.getFullYear();return l===a?`${i} ${o}`:`${i} ${o}, ${l}`}function Ah({rule:e,onEdit:t,onDelete:n,onView:r,isReviewed:i,onToggleReviewed:o,changeType:l,isUncommitted:a,changeDate:c,diff:u,isFadingOut:f,showLeftBorder:h}){const[d,p]=I.useState(!1),[m,k]=I.useState(!1),C=I.useMemo(()=>kt(e.body,e.filePath),[e.body,e.filePath]),y=Je(e.body.length),j=d?"#3e3e3e":a?"#d97706":"#c7c7c7",N=`rounded-lg border overflow-hidden transition-all ease-in-out ${a?"bg-amber-50 border-amber-300":"bg-white border-gray-200"}`,A={...f&&{opacity:0,maxHeight:0,paddingTop:0,paddingBottom:0,marginBottom:0,borderWidth:0,transitionDuration:"600ms"}};return s.jsxs("div",{className:N,style:A,children:[s.jsx("div",{className:`p-4 cursor-pointer ${a?"hover:bg-amber-100":"hover:bg-gray-50"}`,onClick:()=>r?r(e):p(!d),children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:d?"rotate(90deg)":"none",transition:"transform 0.2s"},children:s.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:j})})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h3",{style:{fontSize:"14px",lineHeight:"18px",fontWeight:500,color:a?"#78350f":"#000"},children:C}),l&&s.jsx("span",{className:`px-2 py-0.5 rounded uppercase font-medium tracking-wider ${l==="deleted"?"bg-red-100 text-red-700":""}`,style:{fontSize:"10px",...l==="added"&&{backgroundColor:"#CBF3FA",color:"#005C75"},...l==="modified"&&{backgroundColor:"#FFE8C1",color:"#C67E06"}},children:l}),a&&s.jsx("span",{className:"px-2 py-0.5 bg-amber-200 text-amber-800 rounded font-medium uppercase tracking-wider",style:{fontSize:"10px"},children:"Uncommitted"}),s.jsxs("span",{className:"text-xs text-gray-400",children:["~",y.toLocaleString()," tokens"]})]}),s.jsx("div",{className:"flex items-center gap-2 text-xs text-gray-500 flex-wrap",children:e.frontmatter.paths&&e.frontmatter.paths.length>0&&s.jsxs(s.Fragment,{children:[e.frontmatter.paths.slice(0,2).map((P,b)=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded font-mono",children:P},b)),e.frontmatter.paths.length>2&&s.jsxs("span",{className:"text-gray-400 whitespace-nowrap",children:["+",e.frontmatter.paths.length-2," more"]})]})})]})]}),s.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[c&&s.jsx("span",{className:"text-xs text-gray-400",children:Me(c)}),o&&s.jsx("button",{onClick:P=>{P.stopPropagation(),o(e.filePath,e.lastModified,i??!1)},className:`w-5 h-5 rounded-full border-2 flex items-center justify-center cursor-pointer transition-colors ${i?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,title:i?"Mark as unreviewed":"Mark as reviewed",children:i&&s.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}),d&&s.jsxs("div",{className:`border-t ${a?"border-amber-200":"border-gray-100"}`,children:[s.jsxs("div",{className:`px-4 py-3 flex items-center justify-between ${a?"bg-amber-50":"bg-white"}`,children:[s.jsx("div",{className:"flex items-center gap-2",children:l==="modified"&&u&&s.jsxs("button",{onClick:P=>{P.stopPropagation(),k(!m)},className:`flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer ${m?a?"bg-amber-200 text-amber-900":"bg-gray-200 text-gray-900":a?"text-amber-700 hover:text-amber-900 hover:bg-amber-100":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:[s.jsx(yr,{className:"w-3 h-3"}),m?"Hide Diff":"Show Diff"]})}),l!=="deleted"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:P=>{P.stopPropagation(),t(e)},className:`flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer ${a?"text-amber-700 hover:text-amber-900 hover:bg-amber-100":"text-gray-600 hover:text-gray-900 hover:bg-gray-100"}`,children:[s.jsx(Zi,{className:"w-3 h-3"}),"Edit"]}),s.jsxs("button",{onClick:P=>{P.stopPropagation(),n(e)},className:"flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer text-red-600 hover:text-red-800 hover:bg-red-100",children:[s.jsx(nl,{className:"w-3 h-3"}),"Delete"]})]})]}),m&&u&&s.jsx("pre",{className:"mx-4 mb-4 p-4 text-xs font-mono overflow-x-auto bg-gray-900 text-gray-100 max-h-64 overflow-y-auto rounded-md",children:u.split(`
|
|
70
|
-
`).map((P,b)=>{let R="";return P.startsWith("+")&&!P.startsWith("+++")?R="text-green-400":P.startsWith("-")&&!P.startsWith("---")?R="text-red-400":P.startsWith("@@")&&(R="text-cyan-400"),s.jsx("div",{className:R,children:P},b)})}),s.jsxs("div",{className:"mx-4 mb-3",children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Edit with Claude:"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"px-2 py-1 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:["Claude, can you help me edit this rule: `",e.filePath,"`"]}),s.jsx(br,{content:`Claude, can you help me edit this rule: \`${e.filePath}\``,icon:!0,iconSize:14,className:"p-1 text-gray-400 hover:text-gray-600 rounded transition-colors"})]})]}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&s.jsxs("div",{className:"mx-4 mb-3",children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1.5 font-medium",children:"Applies to paths:"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.frontmatter.paths.map((P,b)=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:P},b))})]}),!m&&s.jsx("div",{className:"mx-4 mb-4 p-4 rounded border max-h-[500px] overflow-auto bg-white border-gray-200",children:s.jsx(Ni,{content:e.body})})]})]})}function Th(){return new Date().toISOString().split(".")[0]+"",`---
|
|
71
|
-
paths:
|
|
72
|
-
- '**/*.ts'
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Title
|
|
76
|
-
|
|
77
|
-
Description here.
|
|
78
|
-
`}function Ih({rule:e,onSave:t,onCancel:n}){const[r,i]=I.useState(e?`.claude/rules/${e.filePath}`:""),[o,l]=I.useState((e==null?void 0:e.content)||Th()),[a,c]=I.useState(!!e),[u,f]=I.useState(!1),h=!e;return s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold",style:{fontFamily:"Sora"},children:e?"Edit Rule":"Create New Rule"}),s.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-5 h-5"})})]}),h&&s.jsxs("div",{className:"mb-6",children:[s.jsx("div",{className:"bg-[#f0f9ff] border border-[#bae6fd] rounded-lg p-4 mb-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(yr,{className:"w-5 h-5 text-[#0284c7] mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-[#0c4a6e] mb-1",children:"Recommended: Use Claude Code"}),s.jsx("p",{className:"text-sm text-[#0369a1] mb-2",children:"Run this command in Claude Code to create a properly formatted rule with the right file location and paths:"}),s.jsxs("div",{className:"relative",children:[s.jsx("code",{className:"block bg-white px-3 py-2 pr-9 rounded border border-[#bae6fd] font-mono text-sm text-[#0c4a6e]",children:"/codeyam-new-rule"}),s.jsx("button",{onClick:()=>{navigator.clipboard.writeText("/codeyam-new-rule"),f(!0),setTimeout(()=>f(!1),2e3)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-[#0284c7] hover:text-[#0c4a6e] cursor-pointer transition-colors",title:"Copy command",children:u?s.jsx(Oe,{className:"w-4 h-4 text-green-500"}):s.jsx(Qe,{className:"w-4 h-4"})})]})]})]})}),s.jsxs("button",{onClick:()=>c(!a),className:"flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900 cursor-pointer",children:[s.jsx("span",{className:"w-4 inline-flex items-center justify-center shrink-0",style:{transform:a?"rotate(90deg)":"none",transition:"transform 0.2s"},children:s.jsx("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M1.5 1.268L8.5 6L1.5 10.732V1.268Z",fill:a?"#3e3e3e":"#c7c7c7"})})}),"Or create manually"]})]}),(a||!h)&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path (relative to .claude/rules/)"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"text",value:r,onChange:d=>i(d.target.value),placeholder:"e.g., src/webserver/architecture.md",className:"w-full px-3 py-2 pr-10 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent font-mono text-sm",disabled:!!e}),s.jsx("button",{onClick:()=>{navigator.clipboard.writeText(r)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600 cursor-pointer",title:"Copy path",children:s.jsx(Qe,{className:"w-4 h-4"})})]})]}),e&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Ask Claude for help editing:"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"text",value:`Claude, can you help me edit the rule: \`${r}\``,readOnly:!0,className:"w-full px-3 py-2 pr-10 border border-gray-300 rounded-md bg-gray-50 font-mono text-sm text-gray-600"}),s.jsx("button",{onClick:()=>{navigator.clipboard.writeText(`Claude, can you help me edit the rule: \`${r}\``)},className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-gray-400 hover:text-gray-600 cursor-pointer",title:"Copy prompt",children:s.jsx(Qe,{className:"w-4 h-4"})})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),s.jsx("textarea",{value:o,onChange:d=>l(d.target.value),rows:20,className:"w-full px-3 py-2 border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent font-mono text-sm bg-gray-900 text-gray-100 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-gray-800 [&::-webkit-scrollbar-thumb]:bg-gray-600 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:hover:bg-gray-500 [&::-webkit-resizer]:bg-gray-700"})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:n,className:"px-4 py-2 text-[#001f3f] hover:text-[#001530] rounded-md cursor-pointer font-mono uppercase text-xs font-semibold",children:"Cancel"}),s.jsx("button",{onClick:()=>t(r.replace(/^\.claude\/rules\//,""),o),disabled:!r.trim()||!o.trim(),className:"px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer font-mono uppercase text-xs font-semibold",children:"Save"})]})]})]})}function Fh({memories:e,selectedPath:t,onSelectPath:n,expandedFolders:r,onToggleFolder:i}){const o=I.useMemo(()=>Ei(e),[e]),l=(u,f,h)=>{if(u.target.closest(".chevron-toggle")){h&&i(f||"root");return}const p=f||null;n(t===p?null:p),h&&!r.has(f||"root")&&i(f||"root")},a=u=>{n(t===u?null:u)},c=(u,f=0)=>{const h=r.has(u.path||"root"),d=Pi(u),p=u.children.size>0,m=u.name==="root"?"(root)":u.name,k=u.memories.length>0||p,C=u.path||"",y=t===C||t===null&&C==="";return s.jsxs("div",{children:[s.jsxs("div",{className:`flex items-center gap-2 py-2.5 cursor-pointer rounded px-2 relative ${y?"bg-[#E0E9EC]":"hover:bg-gray-100"}`,style:{paddingLeft:`${f*12+8}px`},onClick:j=>l(j,u.path,k),children:[k&&s.jsx("span",{className:"chevron-toggle p-0.5 -m-0.5 hover:bg-gray-200 rounded",onClick:j=>{j.stopPropagation(),i(u.path||"root")},children:s.jsx(Jt,{className:`w-3 h-3 text-gray-500 transition-transform ${h?"rotate-90":""}`})}),!k&&s.jsx("div",{className:"w-3"}),s.jsx(wr,{className:"w-3.5 h-3.5 text-[#005C75]"}),s.jsx("span",{className:`text-xs font-mono font-semibold ${y?"text-[#005C75]":""}`,style:{color:"#005C75"},children:m}),s.jsxs("span",{className:"text-xs ml-auto",style:{color:"#005C75"},children:[d," rules"]})]}),h&&s.jsxs("div",{className:"relative",children:[(u.memories.length>0||p)&&s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:`${f*12+8+6}px`}}),u.memories.length>0&&s.jsx("div",{style:{paddingLeft:`${(f+1)*12+8}px`},children:u.memories.map(j=>{var A;const N=t===j.filePath;return s.jsx("div",{className:`flex items-center gap-2 py-1 px-2 text-sm rounded cursor-pointer relative ${N?"bg-[#E0E9EC] text-[#005C75]":"text-gray-600 hover:bg-gray-50"}`,onClick:()=>a(j.filePath),children:s.jsx("span",{className:"text-xs",children:(A=j.filePath.split("/").pop())==null?void 0:A.replace(".md","")})},j.filePath)})}),p&&s.jsx("div",{children:Array.from(u.children.values()).sort((j,N)=>j.name.localeCompare(N.name)).map(j=>c(j,f+1))})]})]},u.path||"root")};return s.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-8",children:c(o)})}function Rh({memories:e,onEdit:t,onDelete:n,expandedFolders:r,onToggleFolder:i,reviewedStatus:o,onMarkReviewed:l,onMarkUnreviewed:a,onViewRule:c}){const[u,f]=I.useState({});I.useEffect(()=>{f({})},[o]);const h=I.useMemo(()=>({...o,...u}),[o,u]),d=I.useMemo(()=>Ei(e),[e]),p=(k,C,y)=>{f(j=>({...j,[k]:!y})),y?a(k):l(k,C)},m=(k,C=0)=>{const y=r.has(k.path||"root"),j=k.children.size>0,N=k.name==="root"?"root":k.name,A=k.memories.length>0||j;return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 py-2 cursor-pointer hover:bg-gray-50 rounded px-2 mb-2",style:{backgroundColor:"rgba(224, 233, 236, 0.5)"},onClick:()=>A&&i(k.path||"root"),children:[A&&s.jsx(Jt,{className:`w-4 h-4 text-gray-500 transition-transform ${y?"rotate-90":""}`}),!A&&s.jsx("div",{className:"w-4"}),s.jsx(wr,{className:"w-4 h-4 text-[#005C75]"}),s.jsx("span",{className:"text-sm font-mono font-semibold",style:{color:"#001f3f"},children:N})]}),y&&s.jsxs("div",{className:"ml-10 space-y-4 relative",children:[(k.memories.length>0||j)&&s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:"-24px"}}),k.memories.length>0&&s.jsx("div",{className:"space-y-2",children:k.memories.map(P=>s.jsx(Ah,{rule:P,onEdit:t,onDelete:n,onView:c,isReviewed:h[P.filePath]??!1,onToggleReviewed:p},P.filePath))}),j&&s.jsx("div",{className:"space-y-4",children:Array.from(k.children.values()).sort((P,b)=>P.name.localeCompare(b.name)).map(P=>m(P,C+1))})]})]},k.path||"root")};return s.jsx("div",{children:m(d)})}function Dh({memories:e,reviewedStatus:t,onViewRule:n,refreshKey:r}){const[i,o]=I.useState("unreviewed"),[l,a]=I.useState("by-date"),[c,u]=I.useState(null),[f,h]=I.useState(!0),[d,p]=I.useState(new Map),m=I.useRef(t),k=I.useRef([]);I.useEffect(()=>()=>{k.current.forEach(clearTimeout)},[]),I.useEffect(()=>{(async()=>{h(!0);try{const b=await(await fetch("/api/memory?action=rule-coverage")).json();u(b.coverage??null)}catch{u(null)}finally{h(!1)}})()},[r]),I.useEffect(()=>{const A=m.current,P=[];for(const[b,R]of Object.entries(t))R&&!A[b]&&P.push(b);m.current=t,P.length!==0&&(p(b=>{const R=new Map(b);return P.forEach(_=>R.set(_,"approved")),R}),k.current.push(setTimeout(()=>{p(b=>{const R=new Map(b);return P.forEach(_=>R.set(_,"fading")),R})},1500)),k.current.push(setTimeout(()=>{p(b=>{const R=new Map(b);return P.forEach(_=>R.delete(_)),R})},2500)))},[t]);const C=I.useMemo(()=>{const A=[...e];return l==="by-impact"&&c!==null?A.sort((P,b)=>{const R=c[P.filePath]??0,_=c[b.filePath]??0;return _!==R?_-R:new Date(b.lastModified).getTime()-new Date(P.lastModified).getTime()}):A.sort((P,b)=>new Date(b.lastModified).getTime()-new Date(P.lastModified).getTime()),A},[e,l,c]),y=I.useMemo(()=>C.filter(A=>!t[A.filePath]).length,[C,t]),j=I.useMemo(()=>i==="unreviewed"?C.filter(A=>!t[A.filePath]||d.has(A.filePath)):C,[C,i,t,d]),N=!f&&c!==null;return s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[s.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:s.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Recently Changed Rules"})}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),s.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:["Unreviewed Rules (",y,")"]})]}),s.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),s.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:["All (",C.length,")"]})]})]}),s.jsxs("div",{className:"grid grid-cols-[1fr_90px_80px_100px] px-5 py-2 border-b border-gray-100",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Rule"}),s.jsxs("button",{onClick:()=>N&&a("by-impact"),className:`text-[11px] uppercase tracking-wider font-medium text-center flex items-center justify-center gap-0.5 whitespace-nowrap bg-transparent border-none p-0 ${N?"cursor-pointer hover:text-gray-600":"cursor-default"} ${l==="by-impact"?"text-[#005C75]":"text-gray-400"}`,children:["Src Files",l==="by-impact"&&s.jsx(_t,{className:"w-3 h-3"})]}),s.jsxs("button",{onClick:()=>a("by-date"),className:`text-[11px] uppercase tracking-wider font-medium text-center flex items-center justify-center gap-0.5 whitespace-nowrap bg-transparent border-none cursor-pointer p-0 hover:text-gray-600 ${l==="by-date"?"text-[#005C75]":"text-gray-400"}`,children:["Changed At",l==="by-date"&&s.jsx(_t,{className:"w-3 h-3"})]}),s.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium text-center flex items-center justify-center gap-1 whitespace-nowrap",children:["✓ Reviewed",s.jsxs("span",{className:"relative group",children:[s.jsx(Bt,{className:"w-3 h-3 text-gray-300 cursor-help"}),s.jsx("span",{className:"absolute top-full right-0 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-52 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Showing which rules have been reviewed and approved. Click a rule to view it and approve it"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto max-h-[400px]",children:j.map(A=>{const P=t[A.filePath]??!1,b=d.get(A.filePath),R=kt(A.body,A.filePath),_=(c==null?void 0:c[A.filePath])??0;return s.jsx("div",{className:`border-b border-gray-50 transition-all ${b==="fading"?"duration-1000":"duration-300"}`,style:{opacity:b==="fading"?0:1},children:s.jsxs("div",{className:`grid grid-cols-[1fr_90px_80px_100px] px-5 py-2.5 items-center cursor-pointer transition-colors duration-300 ${b==="approved"?"bg-[#f0fdf4]":"hover:bg-gray-50"}`,onClick:()=>n(A),children:[s.jsx("div",{className:"flex items-center gap-2 min-w-0",children:s.jsx("span",{className:"text-sm text-gray-900 truncate",children:R})}),s.jsx("span",{className:"text-xs text-center",children:f?s.jsx("span",{className:"inline-block w-6 h-3 bg-gray-100 rounded animate-pulse"}):c!==null?s.jsx("span",{className:_>0?"text-gray-700 font-medium":"text-gray-300",children:_}):s.jsx("span",{className:"text-gray-300",children:"—"})}),s.jsx("span",{className:"text-xs text-gray-500 text-center",children:Me(A.lastModified)}),s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors duration-300 ${P?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:P&&s.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})},A.filePath)})}),j.length===0&&i==="unreviewed"&&s.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:"All rules have been reviewed"})]})}function Lh(e,t){const n=t.map(r=>`- \`${r}\``).join(`
|
|
79
|
-
`);return`Please audit the following Claude Rules that apply to the file \`${e}\`:
|
|
80
|
-
|
|
81
|
-
${n}
|
|
82
|
-
|
|
83
|
-
Please review these rules in conjunction with one another as they all apply to this file.
|
|
84
|
-
|
|
85
|
-
Review each rule with the other rules in mind:
|
|
86
|
-
- Efficiency: Are the rules concise and well-structured?
|
|
87
|
-
- Effectiveness: Does the rules provide clear, actionable guidance?
|
|
88
|
-
- Context window impact: Can the rules be shortened without losing important information?
|
|
89
|
-
- Overlap: Is there any redundant information across the rules that can be consolidated?
|
|
90
|
-
- Duplication: Are there any rules that are nearly identical that can be merged or removed?
|
|
91
|
-
|
|
92
|
-
Note: Each rule may apply to multiple files, not just the file listed above. Consider this when suggesting changes — modifications should not negatively impact the rule's usefulness for other files it covers.`}function Mh({filePath:e,rulePaths:t,onClose:n}){const[r,i]=I.useState(!1),o=Lh(e,t),l=()=>{navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),2e3)};return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:n,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:a=>a.stopPropagation(),children:[s.jsx("button",{onClick:n,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-1",children:"Audit Rules For File"}),s.jsx("p",{className:"font-mono text-sm text-gray-500 mb-4 truncate",title:e,children:e}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can audit these rules to try and make them as efficient and effective as possible, reducing the impact on the context window."}),s.jsx("textarea",{readOnly:!0,value:o,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-4",children:s.jsx("button",{onClick:l,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:r?s.jsxs(s.Fragment,{children:[s.jsx(Oe,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(Qe,{className:"w-4 h-4"}),"Copy Prompt"]})})})]})})}function zh({refreshKey:e,reviewedStatus:t,memories:n,onViewRule:r}){const[i,o]=I.useState("unreviewed"),[l,a]=I.useState(null),[c,u]=I.useState(""),[f,h]=I.useState(0),[d,p]=I.useState(!1),[m,k]=I.useState(null),[C,y]=I.useState(null),j=I.useRef(null),N=I.useRef(null),[A,P]=I.useState({topPaths:[],totalFilesWithCoverage:0,allSourceFiles:[]}),[b,R]=I.useState(!0);I.useEffect(()=>{(async()=>{R(!0);try{const B=await(await fetch("/api/memory?action=audit")).json();P({topPaths:B.topPaths||[],totalFilesWithCoverage:B.totalFilesWithCoverage||0,allSourceFiles:B.allSourceFiles||[]})}catch(M){console.error("Failed to load audit data:",M)}finally{R(!1)}})()},[e]);const _=I.useMemo(()=>i==="all"?A.topPaths:A.topPaths.filter(v=>v.matchingRules.some(M=>!t[M.filePath])),[A.topPaths,i,t]);I.useMemo(()=>A.topPaths.filter(v=>v.matchingRules.some(M=>!t[M.filePath])).length,[A.topPaths,t]);const q=v=>v.split("/").pop()||v,w=I.useMemo(()=>{const v=new Map;for(const M of A.topPaths)v.set(M.filePath,M);return v},[A.topPaths]),F=I.useMemo(()=>{if(!c.trim())return[];const v=c.toLowerCase(),M=[],B=[];for(const K of A.allSourceFiles){const X=K.toLowerCase();if(!X.includes(v))continue;const g=w.get(K)||{filePath:K,matchingRules:[],totalTextLength:0};X.startsWith(v)?M.push(g):B.push(g)}return M.sort((K,X)=>K.filePath.localeCompare(X.filePath)),B.sort((K,X)=>K.filePath.localeCompare(X.filePath)),[...M,...B].slice(0,8)},[c,A.allSourceFiles,w]),D=I.useCallback(v=>{var M;k(v),a(v.filePath),u(v.filePath),p(!1),(M=j.current)==null||M.blur()},[]),Y=I.useCallback(()=>{var v;u(""),k(null),a(null),(v=j.current)==null||v.focus()},[]),L=I.useCallback(v=>{var M;!d||F.length===0||(v.key==="ArrowDown"?(v.preventDefault(),h(B=>Math.min(B+1,F.length-1))):v.key==="ArrowUp"?(v.preventDefault(),h(B=>Math.max(B-1,0))):v.key==="Enter"?(v.preventDefault(),D(F[f])):v.key==="Escape"&&(p(!1),(M=j.current)==null||M.blur()))},[d,F,f,D]);return I.useEffect(()=>{h(0)},[F]),s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-4 border-b border-[#e1e1e1] px-5",children:[s.jsx("button",{className:"py-3 border-b-2 border-[#232323] text-[#232323] bg-transparent cursor-pointer",children:s.jsx("span",{className:"text-[14px] leading-6",style:{fontFamily:"Sora",fontWeight:600},children:"Rule Audit"})}),s.jsxs("div",{className:"relative flex-1 max-w-[300px]",children:[s.jsx(kr,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),s.jsx("input",{ref:j,type:"text",value:c,onChange:v=>{u(v.target.value),p(!0)},onFocus:()=>{c.trim()&&p(!0)},onBlur:()=>{setTimeout(()=>p(!1),200)},onKeyDown:L,placeholder:"Search files...",className:`w-full pl-8 ${c?"pr-7":"pr-3"} py-1 text-xs border border-gray-200 rounded-md focus:outline-none focus:ring-1 focus:ring-[#005C75] focus:border-[#005C75] bg-gray-50`}),c&&s.jsx("button",{type:"button",onMouseDown:v=>{v.preventDefault(),Y()},className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 flex items-center justify-center text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"w-3 h-3",children:s.jsx("path",{d:"M1 1l12 12M13 1L1 13"})})}),d&&F.length>0&&s.jsx("div",{ref:N,className:"absolute left-0 top-full mt-0.5 bg-white border border-gray-200 rounded-md shadow-lg z-10 max-h-75 overflow-y-auto min-w-75 max-w-120",children:F.map((v,M)=>s.jsxs("div",{onMouseDown:B=>{B.preventDefault(),D(v)},onMouseEnter:()=>h(M),className:`flex items-center gap-2 px-3 py-2 cursor-pointer text-sm ${M===f?"bg-[#f0f9ff]":"hover:bg-gray-50"}`,children:[s.jsx(Ot,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700 truncate",title:v.filePath,children:(()=>{const B=v.filePath.toLowerCase().indexOf(c.toLowerCase());if(B===-1)return v.filePath;const K=v.filePath.slice(0,B),X=v.filePath.slice(B,B+c.length),g=v.filePath.slice(B+c.length);return s.jsxs(s.Fragment,{children:[K,s.jsx("span",{className:"font-semibold text-[#005C75]",children:X}),g]})})()}),s.jsxs("span",{className:"text-xs text-gray-400 ml-auto flex-shrink-0",children:[v.matchingRules.length," rule",v.matchingRules.length!==1?"s":""]})]},v.filePath))})]}),s.jsx("div",{className:"flex-1"}),s.jsxs("button",{onClick:()=>o("unreviewed"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="unreviewed"?"#005C75":"#d1d5db"}}),s.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="unreviewed"?600:400,color:i==="unreviewed"?"#005C75":"#626262"},children:"Unreviewed Rules"})]}),s.jsxs("button",{onClick:()=>o("all"),className:"flex items-center gap-1.5 bg-transparent cursor-pointer py-3",children:[s.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:i==="all"?"#005C75":"#d1d5db"}}),s.jsx("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:i==="all"?600:400,color:i==="all"?"#005C75":"#626262"},children:"All"})]})]}),s.jsxs("div",{className:"grid grid-cols-[1fr_140px_150px] px-5 py-2 border-b border-gray-100",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium",children:"Source file"}),s.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium flex items-center justify-center gap-1 whitespace-nowrap",children:["Unreviewed Rules",s.jsxs("span",{className:"relative group",children:[s.jsx(Bt,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),s.jsx("span",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-48 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Number of rules not yet reviewed for this file / Total number of rules that apply to this file"})]})]}),s.jsxs("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium flex items-center justify-center gap-1 whitespace-nowrap",children:["Unreviewed Tokens",s.jsxs("span",{className:"relative group",children:[s.jsx(Bt,{className:"w-3 h-3 text-gray-300 flex-shrink-0 cursor-help"}),s.jsx("span",{className:"absolute top-full right-0 mt-1.5 px-3 py-2 bg-gray-800 text-white text-[10px] leading-relaxed rounded shadow-lg w-52 text-center whitespace-normal opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-20",children:"Estimated tokens from unreviewed rules / Total number of tokens from all rules that apply to this file"})]})]})]}),b&&s.jsx("div",{className:"px-5 py-6",children:s.jsxs("div",{className:"animate-pulse space-y-3",children:[s.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"}),s.jsx("div",{className:"h-3 bg-gray-100 rounded w-1/2"}),s.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3 mt-4"})]})}),!b&&(_.length>0||m)&&s.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:(m?[m,..._.filter(M=>M.filePath!==m.filePath)].slice(0,8):_.slice(0,8)).map((v,M)=>{const B=v.matchingRules.length,K=v.matchingRules.filter(G=>!t[G.filePath]),X=K.length,g=K.reduce((G,re)=>G+re.bodyLength,0),le=X>0,se=l===v.filePath,x=(m==null?void 0:m.filePath)===v.filePath;return s.jsxs("div",{children:[s.jsxs("div",{onClick:()=>a(se?null:v.filePath),className:`grid grid-cols-[1fr_140px_150px] px-5 py-2.5 items-center border-b border-gray-50 cursor-pointer ${x?"bg-[#f0f9ff] hover:bg-[#e0f2fe]":"hover:bg-gray-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[se?s.jsx(_t,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}):s.jsx(Jt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx(Ot,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-900 truncate",title:v.filePath,children:x?v.filePath:q(v.filePath)})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:X}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:B})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:Je(g).toLocaleString()}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:Je(v.totalTextLength).toLocaleString()})]})]}),se&&s.jsxs("div",{className:"bg-gray-50 border-b border-gray-100",children:[v.matchingRules.map(G=>{const re=n.find(z=>z.filePath===G.filePath),ne=t[G.filePath]??!1;return s.jsxs("div",{onClick:z=>{z.stopPropagation(),re&&r(re)},className:"flex items-center gap-2 px-5 pl-12 py-2 hover:bg-gray-100 cursor-pointer",children:[s.jsx(qi,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-700 truncate flex-1",children:re?kt(re.body,re.filePath):G.filePath}),s.jsxs("span",{className:"text-xs text-gray-400 flex-shrink-0",children:[Je(G.bodyLength).toLocaleString()," ","tokens"]}),s.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${ne?"bg-[#005C75] border-[#005C75]":"bg-white border-gray-300"}`,children:ne&&s.jsx("svg",{width:"8",height:"6",viewBox:"0 0 10 8",fill:"none",children:s.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},G.filePath)}),s.jsxs("div",{className:"flex items-center justify-center gap-3 px-5 py-2 border-t border-gray-200",children:[s.jsx("span",{className:"text-xs text-gray-400",children:"Have Claude audit these rules"}),s.jsx("button",{onClick:G=>{G.stopPropagation(),y({filePath:v.filePath,rulePaths:v.matchingRules.map(re=>re.filePath)})},className:"px-3 py-1 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer",children:"Prompt"})]})]})]},v.filePath)})}),!b&&_.length===0&&s.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:i==="unreviewed"?"No files have unreviewed rules":"No files have rule coverage yet"}),C&&s.jsx(Mh,{filePath:C.filePath,rulePaths:C.rulePaths,onClose:()=>y(null)})]})}function _h({rule:e,changeInfo:t,isReviewed:n,onApprove:r,onEdit:i,onDelete:o,onClose:l}){const a=kt(e.body,e.filePath),c=Je(e.body.length),u=e.frontmatter.category,f=`.claude/rules/${e.filePath}`,[h,d]=I.useState(null),p=(t==null?void 0:t.changeType)==="added"||h!=null&&h.commitCount!=null&&h.commitCount<=1&&!(h.commitCount===1&&h.isUncommitted);return I.useEffect(()=>{d(null),fetch(`/api/memory?action=rule-diff&filePath=${encodeURIComponent(e.filePath)}`).then(m=>m.json()).then(m=>{m.diff&&d(m.diff)}).catch(()=>{})},[e.filePath]),I.useEffect(()=>{const m=k=>{k.key==="Escape"&&l()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]),s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:l,children:s.jsxs("div",{className:"rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",style:{backgroundColor:"#F8F7F6"},onClick:m=>m.stopPropagation(),children:[s.jsx("div",{className:"px-6 pt-5 pb-4",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[s.jsx("h2",{className:"text-[16px] font-bold text-gray-900",children:a}),t&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:Me(t.date)}),s.jsx("span",{className:`flex-shrink-0 text-[11px] uppercase font-semibold tracking-wider ${t.changeType==="added"?"text-green-600":t.changeType==="modified"?"text-orange-600":"text-red-600"}`,children:t.changeType})]})]}),u&&s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"TYPE:"}),s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] uppercase font-semibold tracking-wider bg-[#E0F2F1] text-[#00796B]",children:u})]}),s.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:"FILE:"}),s.jsx("code",{className:"text-[11px] text-gray-600 font-mono",children:f}),s.jsx(br,{content:f,icon:!0,iconSize:12,className:"p-0.5 rounded text-gray-400 hover:text-gray-600 transition-colors",ariaLabel:"Copy file path"})]}),s.jsxs("div",{className:"text-[11px] text-gray-400 uppercase tracking-wider font-medium",children:["TOKENS: ~",c.toLocaleString()]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0 ml-4",children:[s.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer transition-colors ${n?"bg-green-600 text-white":"border border-green-600 text-green-700 hover:bg-green-50"}`,children:[s.jsx(Oe,{className:"w-3.5 h-3.5"}),n?"Approved":"Approve"]}),s.jsx("button",{onClick:i,className:"px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer border border-gray-300 text-gray-600 hover:bg-gray-50 transition-colors",children:"Edit"}),s.jsx("button",{onClick:o,className:"px-3 py-1.5 rounded text-xs font-medium uppercase tracking-wider cursor-pointer border border-red-300 text-red-600 hover:bg-red-50 transition-colors",children:"Delete"}),s.jsx("button",{onClick:l,className:"p-1.5 rounded text-gray-400 hover:text-gray-600 hover:bg-gray-200 cursor-pointer transition-colors ml-1",children:s.jsx(tt,{className:"w-5 h-5"})})]})]})}),e.frontmatter.paths&&e.frontmatter.paths.length>0&&s.jsxs("div",{className:"px-6 pb-4",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Applies to paths:"}),s.jsx("div",{className:"bg-white rounded-lg p-4 space-y-2.5",style:{border:"1px solid #E6E6E6"},children:e.frontmatter.paths.map((m,k)=>{const C=m.split("/"),y=C.pop()||m,j=C.length>0?C.join("/")+"/":"";return s.jsxs("div",{className:"flex items-center gap-2 text-[13px] font-mono",children:[s.jsx(Ot,{className:"w-4 h-4 text-[#005C75] flex-shrink-0"}),s.jsxs("span",{children:[j&&s.jsx("span",{className:"text-gray-500",children:j}),s.jsx("span",{className:"font-bold text-gray-900",children:y})]})]},k)})})]}),p?s.jsx("div",{className:"px-6 pb-4",children:s.jsxs("div",{className:"text-[13px] text-gray-500",children:["Created"," ",t!=null&&t.date?Me(t.date):h!=null&&h.date?Me(h.date):"recently"]})}):h&&s.jsx("div",{className:"px-6 pb-4",children:s.jsxs("details",{children:[s.jsxs("summary",{className:"text-[13px] text-gray-700 font-semibold cursor-pointer",children:["Recent change: ",h.commitMessage," —"," ",Me(h.date)]}),s.jsx("pre",{className:"mt-2 p-4 text-xs font-mono overflow-x-auto bg-gray-900 text-gray-100 max-h-64 overflow-y-auto rounded-md",children:h.diff.split(`
|
|
93
|
-
`).map((m,k)=>{let C="";return m.startsWith("+")&&!m.startsWith("+++")?C="text-green-400":m.startsWith("-")&&!m.startsWith("---")?C="text-red-400":m.startsWith("@@")&&(C="text-cyan-400"),s.jsx("div",{className:C,children:m},k)})})]})}),s.jsxs("div",{className:"px-6 pb-6",children:[s.jsx("div",{className:"text-[13px] text-gray-700 font-semibold mb-2",children:"Rule Text:"}),s.jsx("div",{className:"bg-white rounded-lg p-6",style:{border:"1px solid #E6E6E6"},children:s.jsx(Ni,{content:e.body})})]})]})})}function Oh(){return s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#232323"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#232323"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#232323"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#232323"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#232323"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#232323"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#232323"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#232323"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#232323"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#232323"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#232323"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#232323"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#232323"})]})}function Bh(){return s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"3",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(90 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(90 27 12)",fill:"#005C75"}),s.jsx("rect",{x:"18",y:"24",width:"3",height:"3",transform:"rotate(90 18 24)",fill:"#005C75"}),s.jsx("rect",{x:"18",width:"3",height:"3",transform:"rotate(90 18 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"18",width:"3",height:"3",transform:"rotate(-180 3 18)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"18",width:"3",height:"3",transform:"rotate(-180 27 18)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"24",width:"3",height:"3",transform:"rotate(90 21 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"21",width:"3",height:"3",transform:"rotate(-180 3 21)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"21",width:"3",height:"3",transform:"rotate(-180 27 21)",fill:"#005C75"}),s.jsx("rect",{x:"6",y:"24",width:"3",height:"3",transform:"rotate(90 6 24)",fill:"#005C75"}),s.jsx("rect",{x:"6",width:"3",height:"3",transform:"rotate(90 6 0)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"6",width:"3",height:"3",transform:"rotate(-180 3 6)",fill:"#005C75"}),s.jsx("rect",{x:"21",y:"6",width:"3",height:"3",transform:"rotate(-180 21 6)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"24",width:"3",height:"3",transform:"rotate(90 24 24)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"24",width:"3",height:"3",transform:"rotate(-180 3 24)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"24",width:"3",height:"3",transform:"rotate(-180 27 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"24",width:"3",height:"3",transform:"rotate(90 9 24)",fill:"#005C75"}),s.jsx("rect",{x:"9",width:"3",height:"3",transform:"rotate(90 9 0)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"3",width:"3",height:"3",transform:"rotate(90 9 3)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"6",width:"3",height:"3",transform:"rotate(90 9 6)",fill:"#005C75"}),s.jsx("rect",{x:"9",y:"18",width:"3",height:"3",transform:"rotate(90 9 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"9",width:"3",height:"3",transform:"rotate(-180 3 9)",fill:"#005C75"}),s.jsx("rect",{x:"24",y:"9",width:"3",height:"3",transform:"rotate(-180 24 9)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"24",width:"3",height:"3",transform:"rotate(90 12 24)",fill:"#005C75"}),s.jsx("rect",{x:"12",width:"3",height:"3",transform:"rotate(90 12 0)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"6",width:"3",height:"3",transform:"rotate(90 12 6)",fill:"#005C75"}),s.jsx("rect",{x:"12",y:"18",width:"3",height:"3",transform:"rotate(90 12 18)",fill:"#005C75"}),s.jsx("rect",{x:"3",y:"12",width:"3",height:"3",transform:"rotate(-180 3 12)",fill:"#005C75"}),s.jsx("rect",{x:"27",y:"12",width:"3",height:"3",transform:"rotate(-180 27 12)",fill:"#005C75"})]})}function $h(){return s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans max-w-3xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h1",{className:"text-[22px] font-semibold mb-4",style:{fontFamily:"Sora",color:"#232323"},children:"Get Started with CodeYam Memory"}),s.jsx("p",{className:"text-[15px] text-gray-500 leading-relaxed max-w-2xl mx-auto",children:"CodeYam Memory generates path-scoped Claude Rules that load automatically when Claude works on matching files. These rules capture any confusion, architectural decisions, and tribal knowledge from your as you work with Claude, ensuring sessions become more efficient and aligned with your codebase over time."})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"Setup Steps"}),s.jsxs("ol",{className:"space-y-5",children:[s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"1"}),s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Open Claude Code in your project terminal"})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"2"}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-[14px] font-medium text-gray-900",children:"in the Claude Code session"})]}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"This kicks off analysis of your git history to find confusion patterns."})]})]}),s.jsxs("li",{className:"flex gap-3 items-start",children:[s.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded-md flex items-center justify-center text-sm font-semibold",style:{backgroundColor:"#005C75",color:"#fff"},children:"3"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Return to this dashboard page to review the new rules"}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"You can review, edit, and approve the rules Claude creates."})]})]})]})]}),s.jsxs("div",{className:"rounded-lg p-8 mb-6",style:{backgroundColor:"#EDF8FA",border:"1px solid #C8E6EC"},children:[s.jsx("h2",{className:"text-[18px] font-semibold mb-6",style:{fontFamily:"Sora",color:"#232323"},children:"What Gets Created"}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-[15px] top-8 bottom-4",style:{borderLeft:"2px dotted #B0BEC5"}}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsxs("p",{className:"text-[14px] font-medium text-gray-900",children:[s.jsx("code",{className:"bg-gray-200/60 px-1.5 py-0.5 rounded text-[13px]",children:".claude/rules/*.md"}),s.jsx("span",{className:"text-gray-400 mx-1.5",children:"—"}),"path-scoped guidance files"]}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"Markdown files with frontmatter specifying which file paths they apply to."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Rules load automatically when Claude works on matching files"}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"No manual steps needed — Claude picks up relevant rules based on the files it touches."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 relative",children:[s.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded flex items-center justify-center",style:{backgroundColor:"#2C3E50"},children:s.jsx("div",{className:"w-3 h-3 rounded-sm bg-white/30"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900",children:"Pre-commit hook to keep rules fresh and capture new patterns"}),s.jsx("p",{className:"text-[13px] text-gray-500 mt-1",children:"A git hook runs automatically to update rules when related code changes and looks for any new patterns of confusion in work sessions."})]})]})]})]})]}),s.jsxs("div",{className:"rounded-lg px-8 py-5 flex items-center justify-center gap-3",style:{backgroundColor:"#1A2332"},children:[s.jsx("span",{className:"text-white text-[15px] font-medium",children:"Run"}),s.jsx(pr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-white text-[15px] font-medium",children:"in Claude Code to get started"})]})]})})}function pr({value:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return s.jsxs("button",{onClick:r,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded text-[13px] font-mono cursor-pointer border-0",style:{backgroundColor:"#2C3E50",color:"#E0E0E0"},title:"Copy to clipboard",children:[e,t?s.jsx(Oe,{className:"w-3.5 h-3.5 text-green-400"}):s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400",children:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})]})}function ut({label:e,count:t,icon:n,bgColor:r,iconBgColor:i,textColor:o}){return s.jsx("div",{className:"rounded-lg p-4",style:{backgroundColor:r,border:"1px solid #EFEFEF"},children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:i},children:n}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-[32px] font-semibold leading-none mb-1",style:{color:o},children:t}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider font-medium",style:{color:o},children:e})]})]})})}function Hh({searchFilter:e,onSearchChange:t,onCreateNew:n,onLearnMore:r,reviewCounts:i}){return s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(Oh,{}),s.jsx("h1",{className:"text-[24px] font-semibold mb-0",style:{fontFamily:"Sora",color:"#232323"},children:"Memory"})]}),s.jsxs("p",{className:"text-[15px] text-gray-500",children:["Rules help Claude understand your codebase patterns and conventions."," ",s.jsx("button",{onClick:r,className:"text-[#005C75] underline cursor-pointer",children:"Learn more about rules."})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx(kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),s.jsx("input",{type:"text",value:e,onChange:o=>t(o.target.value),placeholder:"Search rules...",className:"w-64 pl-10 pr-4 py-2 border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-[#005C75] focus:border-transparent text-sm"})]}),s.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[s.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(ut,{label:"Total Rules",count:i.total,icon:s.jsx(Bh,{}),bgColor:"#EDF1F3",iconBgColor:"#E0E9EC",textColor:"#005C75"}),s.jsx(ut,{label:"Unreviewed",count:i.unreviewed,icon:s.jsx(Yi,{className:"w-5 h-5 text-[#1A5276]"}),bgColor:"#E9F0FB",iconBgColor:"#DBE9FF",textColor:"#1A5276"}),s.jsx(ut,{label:"Reviewed",count:i.reviewed,icon:s.jsx(Oe,{className:"w-5 h-5 text-[#1B7A4A]"}),bgColor:"#EAFBEF",iconBgColor:"#D4EDDB",textColor:"#1B7A4A"}),s.jsx(ut,{label:"Stale",count:i.stale,icon:s.jsx(Ui,{className:"w-5 h-5 text-[#5B21B6]"}),bgColor:"#EDE9FB",iconBgColor:"#DDD6FE",textColor:"#5B21B6"})]})]})}function Vh({onClose:e,onCreateNew:t}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative",onClick:n=>n.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-4",children:"What are Claude Rules?"}),s.jsx("h3",{className:"mb-4 font-semibold",children:"And how does CodeYam Memory work with Claude Rules?"}),s.jsxs("div",{className:"text-gray-600 text-[15px] space-y-3 mb-6",children:[s.jsxs("p",{children:["Claude Rules are a component of"," ",s.jsx("a",{href:"https://code.claude.com/docs/en/memory#modular-rules-with-claude%2Frules%2F",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Memory Management in Claude Code"}),'. The text of each rule is passed into the context window when working on the specific files described in the "paths" frontmatter field of the rule.']}),s.jsx("p",{children:"This allows you to provide context that is surgically specific to certain files in your codebase. They are a powerful tool but are harder to write and maintain than CLAUDE.md files."}),s.jsx("p",{children:"CodeYam Memory helps write and maintain Claude Rules. Hooks ensure that rules are reviewed and added during Claude Code working sessions. The CodeYam CLI Dashboard provides a page dedicated to Memory where you can view, edit, create, delete, and review Claude Rules."})]}),s.jsx("div",{className:"flex justify-center",children:s.jsxs("button",{onClick:t,className:"flex items-center gap-2 px-5 py-2.5 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:[s.jsx(Zt,{className:"w-4 h-4"}),"New Rule"]})})]})})}function Uh({rule:e,onConfirm:t,onCancel:n}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Delete Memory?"}),s.jsxs("p",{className:"text-gray-600 mb-4",children:["Are you sure you want to delete"," ",s.jsx("span",{className:"font-mono text-sm",children:e.filePath}),"? This cannot be undone."]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:n,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),s.jsx("button",{onClick:()=>t(e),className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 cursor-pointer",children:"Delete"})]})]})})}const dr="Can you help me perform an interactive rules audit? Please look at all of the rules in `.claude/rules`. Are they organized properly? Ideally they should be in a folder that is the best representation of the files they impact (e.g. if the rule impacts `folder1/folder2/file1` and `folder1/folder2/folder3/file2` then the rule should be in `.claude/rules/folder1/folder2`). Do they make sense? Are they oriented toward avoiding future confusion (vs documenting bug fixes or temporary workarounds, etc)? Please literally read each one to ensure you understand what it is saying and learn something useful from it. Are they concise and efficient in their communication? We want to be respectful of the context window so any information in a rule that does not make sense, is not particularly helpful, or is repetitive should be removed. All other information should be presented as directly as possible. Bullets and tables can help with this as opposed to paragraphs. Take into consideration how rules interact as any one file may have multiple rules applied to it. Please look at the impacted files as well to ensure that it is an appropriate rule for them and to ensure the rules is not just repeating information that can be ascertained from the code. We don't want Claude to have to read a large number of files (or a single very large file) to figure out how everything works, so architectural guidance can be quite valuable, but information that is specific to one file and can be ascertained by the code and comments in that file is unnecessary. If you have any questions please ask!",mr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function gr({text:e}){const[t,n]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return s.jsx("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 rounded-md hover:opacity-90 cursor-pointer font-mono uppercase text-xs font-semibold text-white",style:{backgroundColor:"#1A2332"},children:t?s.jsxs(s.Fragment,{children:[s.jsx(Oe,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(Qe,{className:"w-4 h-4"}),"Copy Prompt"]})})}function qh({onClose:e}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:s.jsxs("div",{className:"bg-white rounded-lg p-8 max-w-xl w-full mx-4 relative max-h-[90vh] overflow-y-auto",onClick:t=>t.stopPropagation(),children:[s.jsx("button",{onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(tt,{className:"w-6 h-6"})}),s.jsx("h2",{className:"text-xl font-bold mb-2",children:"Audit All Rules"}),s.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Claude can review all rules to look for information that is inconsistent, inappropriate, duplicative, inefficient, etc."}),s.jsx("textarea",{readOnly:!0,value:dr,className:"w-full h-48 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:dr})}),s.jsxs("div",{className:"border-t border-gray-200 mt-6 pt-5",children:[s.jsx("p",{className:"text-gray-500 text-sm mb-3",children:"If you would like to avoid reviewing all of the changes Claude makes you can ask Claude to mark all rules as reviewed."}),s.jsx("textarea",{readOnly:!0,value:mr,className:"w-full h-16 p-3 text-sm font-mono bg-gray-50 border border-gray-200 rounded-md resize-none focus:outline-none"}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(gr,{text:mr})})]})]})})}function Wh(){const[e,t]=I.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"border border-gray-200 rounded-lg px-5 py-4 mb-8 flex items-center gap-3",children:[s.jsx("h3",{className:"text-[14px] leading-6 text-[#232323] flex-shrink-0",style:{fontFamily:"Sora",fontWeight:600},children:"Audit All Rules"}),s.jsx("p",{className:"text-sm text-gray-500",children:"Ask Claude to review, audit, and improve all rules."}),s.jsx("button",{onClick:()=>t(!0),className:"px-4 py-2 text-xs font-medium text-[#005C75] border border-[#005C75] rounded hover:bg-[#f0f9ff] cursor-pointer flex-shrink-0",children:"Get Prompt"})]}),e&&s.jsx(qh,{onClose:()=>t(!1)})]})}const rf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],lf=_i(function(){const{memories:t,reviewedStatus:n,memoryInitialized:r,error:i}=Oi(),o=Bi(),l=$i(),[a,c]=I.useState(""),[u,f]=I.useState(null),[h,d]=I.useState(new Set(["root"])),[p,m]=I.useState(null),[k,C]=I.useState(!1),[y,j]=I.useState(null),[N,A]=I.useState(0),[P,b]=I.useState(!1),[R,_]=I.useState(null),[q,w]=I.useState(null),[F,D]=I.useState({}),Y=z=>{d(H=>{const ee=new Set(H);return ee.has(z)?ee.delete(z):ee.add(z),ee})};Vi({source:"memory-page"});const L=I.useMemo(()=>({...n,...F}),[n,F]),v=I.useRef(o.state);I.useEffect(()=>{const z=v.current==="loading"||v.current==="submitting",H=o.state==="idle";z&&H&&o.data&&(l.revalidate(),m(null),C(!1),A(ee=>ee+1)),v.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{D(z=>{const H={};for(const[ee,ue]of Object.entries(z))n[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(z).length?z:H})},[n]);const M=(z,H)=>{D(ee=>({...ee,[z]:!0})),o.submit({action:"mark-reviewed",filePath:z,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},B=z=>{D(H=>({...H,[z]:!1})),o.submit({action:"mark-unreviewed",filePath:z},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(z,H)=>{_(z),w(H??null)},X=I.useMemo(()=>{let z=t;if(a.trim()){const H=a.toLowerCase();z=z.filter(ee=>{var be;return(((be=ee.filePath.split("/").pop())==null?void 0:be.replace(".md",""))||"").toLowerCase().includes(H)||ee.body.toLowerCase().includes(H)})}return z},[t,a]),g=I.useMemo(()=>u?X.some(H=>H.filePath===u)?X.filter(H=>H.filePath===u):X.filter(H=>H.filePath.startsWith(u+"/")||H.filePath===u):X,[X,u]),le=(z,H)=>{const ee=p?"update":"create";o.submit({action:ee,filePath:z,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=z=>{o.submit({action:"delete",filePath:z.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),j(null)},x=I.useMemo(()=>{const z=t.filter(H=>L[H.filePath]).length;return{total:t.length,reviewed:z,unreviewed:t.length-z,stale:0}},[t,L]),G=I.useMemo(()=>{const z=new Set(["root"]);for(const H of X){const ee=H.filePath.split("/");ee.pop();let ue="";for(const be of ee)ue=ue?`${ue}/${be}`:be,z.add(ue)}return z},[X]),re=G.size===h.size&&[...G].every(z=>h.has(z)),ne=()=>{d(re?new Set(["root"]):new Set(G))};return i?s.jsx("div",{className:"bg-[#F8F7F6] min-h-screen",children:s.jsxs("div",{className:"px-12 py-6 font-sans",children:[s.jsx("h1",{className:"text-[28px] font-semibold text-gray-900",children:"Error"}),s.jsx("p",{className:"text-base text-gray-500",children:i})]})}):r?s.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:s.jsxs("div",{className:"px-6 sm:px-12 lg:px-20 py-8 lg:py-12 font-sans",children:[s.jsx(Hh,{searchFilter:a,onSearchChange:c,onCreateNew:()=>C(!0),onLearnMore:()=>b(!0),reviewCounts:x}),(k||p)&&s.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999] p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.8)"},onClick:()=>{C(!1),m(null)},children:s.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:z=>z.stopPropagation(),children:s.jsx(Ih,{rule:p,onSave:le,onCancel:()=>{C(!1),m(null)}})})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8 mb-8",children:[s.jsx(Dh,{memories:X,reviewedStatus:L,onViewRule:K,refreshKey:N}),s.jsx(zh,{onEditRule:m,onDeleteRule:j,refreshKey:N,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,memories:t,onViewRule:K})]}),s.jsx(Wh,{}),s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-xl leading-6 text-[#232323]",style:{fontFamily:"Sora",fontWeight:600},children:"All Rules"}),s.jsx("div",{className:"flex items-center gap-4",children:G.size>1&&s.jsx("button",{onClick:ne,className:"text-xs text-[#005C75] hover:underline cursor-pointer font-mono uppercase font-semibold",children:re?"Collapse All":"Expand All"})})]}),s.jsxs("div",{className:"flex gap-6",children:[s.jsx("div",{className:"hidden lg:block w-80 flex-shrink-0",children:s.jsx(Fh,{memories:X,selectedPath:u,onSelectPath:f,expandedFolders:h,onToggleFolder:Y})}),s.jsx("div",{className:"flex-1 min-w-0",children:t.length===0?s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-12 text-center",children:[s.jsx(Xi,{className:"w-12 h-12 text-gray-300 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Rules Yet"}),s.jsxs("p",{className:"text-gray-500 mb-4",children:["Run"," ",s.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"/codeyam-memory"})," ","to generate initial memories for your codebase."]}),s.jsxs("button",{onClick:()=>C(!0),className:"inline-flex items-center gap-2 px-4 py-2 bg-[#005C75] text-white rounded-md hover:bg-[#004a5e] cursor-pointer",children:[s.jsx(Zt,{className:"w-4 h-4"}),"Create Your First Memory"]})]}):s.jsxs("div",{children:[u&&s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600 mb-4",children:["Showing rules in"," ",s.jsx("span",{className:"font-mono bg-gray-100 px-1.5 py-0.5 rounded",children:u||"(root)"}),s.jsx("button",{onClick:()=>f(null),className:"text-[#005C75] hover:underline cursor-pointer",children:"Clear filter"})]}),s.jsx(Rh,{memories:g,onEdit:m,onDelete:j,expandedFolders:h,onToggleFolder:Y,reviewedStatus:L,onMarkReviewed:M,onMarkUnreviewed:B,onViewRule:K})]})})]}),s.jsx("div",{className:"mt-8 mb-8",children:s.jsx(Hi,{to:"/agent-transcripts",className:"block bg-white border border-gray-200 rounded-lg p-5 hover:border-[#005C75] hover:shadow-sm transition-all group",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#EDF1F3] flex items-center justify-center",children:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#005C75",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"4 17 10 11 4 5"}),s.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-[#232323] group-hover:text-[#005C75]",style:{fontFamily:"Sora"},children:"Agent Transcripts"}),s.jsx("p",{className:"text-xs text-gray-500",children:"View background agent transcripts and tool call history"})]})]})})}),R&&!p&&(()=>{const z=t.find(H=>H.filePath===R.filePath)??R;return s.jsx(_h,{rule:z,changeInfo:q??void 0,isReviewed:L[z.filePath]??!1,onApprove:()=>{L[z.filePath]??!1?B(z.filePath):M(z.filePath,z.lastModified),_(null)},onEdit:()=>{m(z)},onDelete:()=>{j(z),_(null)},onClose:()=>_(null)})})(),P&&s.jsx(Vh,{onClose:()=>b(!1),onCreateNew:()=>{b(!1),C(!0)}}),y&&s.jsx(Uh,{rule:y,onConfirm:se,onCancel:()=>j(null)})]})}):s.jsx($h,{})});export{lf as default,rf as meta};
|