@codeyam/codeyam-cli 0.1.0-staging.dd216e0 → 0.1.0-staging.e2d4438
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/common/execAsync.ts +1 -1
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +16 -13
- package/analyzer-template/packages/ai/index.ts +21 -5
- package/analyzer-template/packages/ai/package.json +3 -3
- package/analyzer-template/packages/ai/src/lib/__mocks__/completionCall.ts +122 -0
- package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +226 -24
- package/analyzer-template/packages/ai/src/lib/astScopes/arrayDerivationDetector.ts +199 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +205 -10
- package/analyzer-template/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.ts +644 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +181 -23
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.ts +10 -17
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.ts +18 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.ts +38 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.ts +181 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +1507 -117
- package/analyzer-template/packages/ai/src/lib/astScopes/sharedPatterns.ts +28 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +324 -5
- package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +29 -10
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +216 -36
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +2227 -350
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +7 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +296 -35
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +120 -76
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.ts +16 -3
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.ts +6 -4
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +54 -3
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +161 -19
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.ts +70 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +163 -14
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.ts +179 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.ts +40 -30
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +396 -88
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.ts +129 -0
- package/analyzer-template/packages/ai/src/lib/dataStructureChunking.ts +183 -0
- package/analyzer-template/packages/ai/src/lib/deepEqual.ts +30 -0
- package/analyzer-template/packages/ai/src/lib/e2eDataTracking.ts +334 -0
- package/analyzer-template/packages/ai/src/lib/extractCriticalDataKeys.ts +120 -0
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +74 -7
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +89 -112
- package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +59 -3
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +1421 -92
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +216 -109
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +710 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +528 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +2484 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.ts +239 -0
- package/analyzer-template/packages/ai/src/lib/getConditionalUsagesFromCode.ts +143 -31
- package/analyzer-template/packages/ai/src/lib/guessScenarioDataFromDescription.ts +8 -2
- package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +328 -7
- package/analyzer-template/packages/ai/src/lib/mergeJsonTypeDefinitions.ts +5 -0
- package/analyzer-template/packages/ai/src/lib/mergeStatements.ts +111 -87
- package/analyzer-template/packages/ai/src/lib/promptGenerators/collapseNullableObjects.ts +118 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +17 -7
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.ts +1 -1
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +32 -102
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChunkPrompt.ts +82 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateCriticalKeysPrompt.ts +103 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +110 -6
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +14 -53
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.ts +58 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.ts +28 -2
- package/analyzer-template/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.ts +391 -0
- package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +824 -0
- package/analyzer-template/packages/ai/src/lib/splitOutsideParentheses.ts +5 -1
- package/analyzer-template/packages/ai/src/lib/validateExecutionFlowPaths.ts +531 -0
- package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +127 -3
- package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +114 -2
- package/analyzer-template/packages/analyze/index.ts +2 -0
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +79 -59
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +113 -26
- package/analyzer-template/packages/analyze/src/lib/analysisContext.ts +44 -4
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/index.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/isAsyncFunction.ts +67 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +19 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.ts +19 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllExports.ts +11 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.ts +8 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.ts +49 -1
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.ts +2 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +532 -275
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +34 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +6 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +3 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +4 -2
- package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +33 -10
- package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +31 -15
- package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +11 -7
- package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +11 -12
- package/analyzer-template/packages/analyze/src/lib/files/analyzeRemixRoute.ts +4 -5
- package/analyzer-template/packages/analyze/src/lib/files/enums/steps.ts +1 -1
- package/analyzer-template/packages/analyze/src/lib/files/getImportedExports.ts +14 -12
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +1315 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +201 -46
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.ts +102 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +670 -74
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.ts +1 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +28 -62
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +380 -45
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +264 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +78 -83
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +4 -8
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +970 -140
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.ts +56 -11
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/propagateArrayItemSchemas.ts +474 -0
- package/analyzer-template/packages/analyze/src/lib/files/setImportedExports.ts +2 -1
- package/analyzer-template/packages/analyze/src/lib/index.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/utils/getFileByPath.ts +19 -0
- package/analyzer-template/packages/aws/codebuild/index.ts +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts +11 -1
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js +29 -18
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts +2 -2
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js +2 -2
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts +8 -18
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js +17 -61
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.d.ts +15 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.d.ts.map +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.js +31 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.js.map +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js +8 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js.map +1 -1
- package/analyzer-template/packages/aws/package.json +3 -3
- package/analyzer-template/packages/aws/s3/index.ts +1 -0
- package/analyzer-template/packages/aws/src/lib/codebuild/waitForBuild.ts +43 -19
- package/analyzer-template/packages/aws/src/lib/ecs/ecsDefineContainer.ts +3 -3
- package/analyzer-template/packages/aws/src/lib/ecs/ecsTaskFactory.ts +17 -69
- package/analyzer-template/packages/aws/src/lib/s3/checkS3ObjectExists.ts +47 -0
- package/analyzer-template/packages/aws/src/lib/s3/uploadFileToS3.ts +8 -1
- package/analyzer-template/packages/database/package.json +1 -1
- package/analyzer-template/packages/database/src/lib/analysisBranchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/analysisToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/branchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/commitBranchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/commitToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/fileToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +18 -5
- package/analyzer-template/packages/database/src/lib/kysely/tableRelations.ts +2 -2
- package/analyzer-template/packages/database/src/lib/kysely/tables/commitsTable.ts +6 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +36 -9
- package/analyzer-template/packages/database/src/lib/kysely/tables/labsRequestsTable.ts +52 -0
- package/analyzer-template/packages/database/src/lib/loadAnalyses.ts +58 -1
- package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +13 -0
- package/analyzer-template/packages/database/src/lib/loadBranch.ts +16 -1
- package/analyzer-template/packages/database/src/lib/loadCommit.ts +11 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +28 -0
- package/analyzer-template/packages/database/src/lib/loadEntities.ts +26 -3
- package/analyzer-template/packages/database/src/lib/loadEntityBranches.ts +12 -0
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +7 -3
- package/analyzer-template/packages/database/src/lib/projectToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/saveFiles.ts +1 -1
- package/analyzer-template/packages/database/src/lib/scenarioToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +7 -14
- package/analyzer-template/packages/database/src/lib/userScenarioToDb.ts +1 -1
- package/analyzer-template/packages/generate/index.ts +3 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.ts +17 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +193 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.ts +73 -0
- package/analyzer-template/packages/generate/src/lib/deepMerge.ts +26 -1
- package/analyzer-template/packages/generate/src/lib/scenarioComponentForServer.ts +114 -0
- package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +4 -2
- 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 +13 -3
- 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/tableRelations.d.ts +2 -2
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts +1 -11
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js +3 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts +30 -7
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js +9 -3
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts +23 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +2 -6
- 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/loadAnalyses.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js +45 -2
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +8 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js +11 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js +7 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts +3 -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 +22 -1
- 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 +3 -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 +23 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js +9 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.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 +7 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts +2 -2
- 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 +5 -4
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/index.d.ts +3 -0
- package/analyzer-template/packages/github/dist/generate/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/index.js +3 -0
- package/analyzer-template/packages/github/dist/generate/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts +9 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts +20 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.js +27 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts +8 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js +89 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js.map +1 -0
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js +10 -0
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js +3 -0
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/index.d.ts +2 -2
- package/analyzer-template/packages/github/dist/types/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts +87 -13
- package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +7 -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 +11 -6
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +199 -3
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts +9 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js +29 -3
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/github/src/lib/loadOrCreateCommit.ts +14 -0
- package/analyzer-template/packages/github/src/lib/syncPrimaryBranch.ts +2 -0
- package/analyzer-template/packages/process/index.ts +2 -0
- package/analyzer-template/packages/process/package.json +12 -0
- package/analyzer-template/packages/process/tsconfig.json +8 -0
- package/analyzer-template/packages/types/index.ts +5 -0
- package/analyzer-template/packages/types/src/types/Analysis.ts +104 -13
- package/analyzer-template/packages/types/src/types/Commit.ts +2 -0
- package/analyzer-template/packages/types/src/types/Entity.ts +2 -0
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +7 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +11 -10
- package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +228 -3
- package/analyzer-template/packages/types/src/types/ScopeAnalysis.ts +6 -1
- package/analyzer-template/packages/types/src/types/StatementInfo.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/index.d.ts +2 -2
- package/analyzer-template/packages/utils/dist/types/index.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/index.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts +87 -13
- package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +7 -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 +11 -6
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +199 -3
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +93 -2
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts +9 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js +29 -3
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +108 -2
- package/analyzer-template/packages/utils/src/lib/safeFileName.ts +48 -3
- package/analyzer-template/playwright/capture.ts +57 -26
- package/analyzer-template/playwright/captureStatic.ts +1 -1
- package/analyzer-template/playwright/getCodeYamInfo.ts +12 -7
- package/analyzer-template/playwright/waitForServer.ts +21 -6
- package/analyzer-template/project/analyzeBaselineCommit.ts +9 -0
- package/analyzer-template/project/analyzeBranchCommit.ts +4 -0
- package/analyzer-template/project/analyzeFileEntities.ts +4 -0
- package/analyzer-template/project/analyzeRegularCommit.ts +9 -0
- package/analyzer-template/project/captureLibraryFunctionDirect.ts +29 -26
- package/analyzer-template/project/constructMockCode.ts +1201 -169
- package/analyzer-template/project/controller/startController.ts +16 -1
- package/analyzer-template/project/createEntitiesAndSortFiles.ts +83 -0
- package/analyzer-template/project/executeLibraryFunctionDirect.ts +7 -3
- package/analyzer-template/project/loadReadyToBeCaptured.ts +65 -41
- package/analyzer-template/project/mocks/analyzeFileMock.ts +8 -7
- package/analyzer-template/project/orchestrateCapture/AwsCaptureTaskRunner.ts +12 -4
- package/analyzer-template/project/orchestrateCapture/KyselyAnalysisLoader.ts +3 -6
- package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +18 -7
- package/analyzer-template/project/orchestrateCapture/taskRunner.ts +4 -2
- package/analyzer-template/project/orchestrateCapture.ts +81 -9
- package/analyzer-template/project/reconcileMockDataKeys.ts +245 -2
- package/analyzer-template/project/runAnalysis.ts +11 -0
- package/analyzer-template/project/serverOnlyModules.ts +127 -2
- package/analyzer-template/project/start.ts +51 -15
- package/analyzer-template/project/startScenarioCapture.ts +6 -0
- package/analyzer-template/project/writeMockDataTsx.ts +403 -61
- package/analyzer-template/project/writeScenarioClientWrapper.ts +21 -0
- package/analyzer-template/project/writeScenarioComponents.ts +409 -98
- package/analyzer-template/project/writeScenarioFiles.ts +26 -0
- package/analyzer-template/project/writeSimpleRoot.ts +31 -23
- package/analyzer-template/scripts/comboWorkerLoop.cjs +99 -50
- package/analyzer-template/scripts/defaultCmd.sh +9 -0
- package/analyzer-template/tsconfig.json +2 -1
- package/background/src/lib/local/createLocalAnalyzer.js +2 -30
- package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
- package/background/src/lib/local/execAsync.js +1 -1
- package/background/src/lib/local/execAsync.js.map +1 -1
- package/background/src/lib/virtualized/common/execAsync.js +1 -1
- package/background/src/lib/virtualized/common/execAsync.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeBaselineCommit.js +7 -1
- package/background/src/lib/virtualized/project/analyzeBaselineCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeBranchCommit.js +2 -1
- package/background/src/lib/virtualized/project/analyzeBranchCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeFileEntities.js +2 -1
- package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeRegularCommit.js +7 -1
- package/background/src/lib/virtualized/project/analyzeRegularCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js +3 -3
- package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js.map +1 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +1062 -127
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/controller/startController.js +11 -1
- package/background/src/lib/virtualized/project/controller/startController.js.map +1 -1
- package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js +73 -1
- package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js.map +1 -1
- package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js +6 -3
- package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js.map +1 -1
- package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js +19 -8
- package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js.map +1 -1
- package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js +7 -7
- package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js +2 -2
- package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js +3 -2
- package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +7 -5
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js +65 -10
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +204 -2
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/runAnalysis.js +9 -0
- package/background/src/lib/virtualized/project/runAnalysis.js.map +1 -1
- package/background/src/lib/virtualized/project/serverOnlyModules.js +106 -3
- package/background/src/lib/virtualized/project/serverOnlyModules.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +47 -15
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +7 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +350 -50
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js +15 -0
- package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js.map +1 -0
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +313 -83
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioFiles.js +19 -0
- package/background/src/lib/virtualized/project/writeScenarioFiles.js.map +1 -1
- package/background/src/lib/virtualized/project/writeSimpleRoot.js +31 -21
- package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +180 -0
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/cli.js +9 -1
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/codeyam-cli.js +18 -2
- package/codeyam-cli/src/codeyam-cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +5 -3
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/baseline.js +176 -0
- package/codeyam-cli/src/commands/baseline.js.map +1 -0
- package/codeyam-cli/src/commands/debug.js +37 -23
- package/codeyam-cli/src/commands/debug.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +30 -34
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/detect-universal-mocks.js +2 -0
- package/codeyam-cli/src/commands/detect-universal-mocks.js.map +1 -1
- package/codeyam-cli/src/commands/init.js +49 -257
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/commands/memory.js +307 -0
- package/codeyam-cli/src/commands/memory.js.map +1 -0
- package/codeyam-cli/src/commands/recapture.js +31 -18
- package/codeyam-cli/src/commands/recapture.js.map +1 -1
- package/codeyam-cli/src/commands/report.js +72 -24
- package/codeyam-cli/src/commands/report.js.map +1 -1
- package/codeyam-cli/src/commands/setup-sandbox.js +2 -0
- package/codeyam-cli/src/commands/setup-sandbox.js.map +1 -1
- package/codeyam-cli/src/commands/setup-simulations.js +284 -0
- package/codeyam-cli/src/commands/setup-simulations.js.map +1 -0
- package/codeyam-cli/src/commands/start.js +8 -12
- package/codeyam-cli/src/commands/start.js.map +1 -1
- package/codeyam-cli/src/commands/status.js +23 -1
- package/codeyam-cli/src/commands/status.js.map +1 -1
- package/codeyam-cli/src/commands/test-startup.js +3 -1
- package/codeyam-cli/src/commands/test-startup.js.map +1 -1
- package/codeyam-cli/src/commands/verify.js +14 -2
- package/codeyam-cli/src/commands/verify.js.map +1 -1
- package/codeyam-cli/src/commands/wipe.js +108 -0
- package/codeyam-cli/src/commands/wipe.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js +179 -0
- package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js +81 -0
- package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +128 -82
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js +29 -15
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/analyzer.js +7 -0
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +102 -21
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/database.js +91 -5
- package/codeyam-cli/src/utils/database.js.map +1 -1
- package/codeyam-cli/src/utils/generateReport.js +253 -106
- package/codeyam-cli/src/utils/generateReport.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +79 -0
- package/codeyam-cli/src/utils/git.js.map +1 -0
- package/codeyam-cli/src/utils/install-skills.js +76 -37
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/labsAutoCheck.js +19 -0
- package/codeyam-cli/src/utils/labsAutoCheck.js.map +1 -0
- package/codeyam-cli/src/utils/npmVersionCheck.js +76 -0
- package/codeyam-cli/src/utils/npmVersionCheck.js.map +1 -0
- package/codeyam-cli/src/utils/progress.js +7 -0
- package/codeyam-cli/src/utils/progress.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +38 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +138 -18
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +25 -7
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/queue/persistence.js.map +1 -1
- package/codeyam-cli/src/utils/requireSimulations.js +10 -0
- package/codeyam-cli/src/utils/requireSimulations.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js +82 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +230 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +67 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js +105 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js +34 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js +162 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +74 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +376 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +116 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js +127 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js +50 -0
- package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js +116 -0
- package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/index.js +5 -0
- package/codeyam-cli/src/utils/ruleReflection/index.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js +44 -0
- package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js +85 -0
- package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/types.js +5 -0
- package/codeyam-cli/src/utils/ruleReflection/types.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js +293 -0
- package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/index.js +6 -0
- package/codeyam-cli/src/utils/rules/index.js.map +1 -0
- package/codeyam-cli/src/utils/rules/parser.js +83 -0
- package/codeyam-cli/src/utils/rules/parser.js.map +1 -0
- package/codeyam-cli/src/utils/rules/pathMatcher.js +18 -0
- package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -0
- package/codeyam-cli/src/utils/rules/ruleState.js +150 -0
- package/codeyam-cli/src/utils/rules/ruleState.js.map +1 -0
- package/codeyam-cli/src/utils/rules/staleness.js +137 -0
- package/codeyam-cli/src/utils/rules/staleness.js.map +1 -0
- package/codeyam-cli/src/utils/serverState.js +37 -10
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +21 -42
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/versionInfo.js +46 -15
- package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
- package/codeyam-cli/src/utils/wipe.js +128 -0
- package/codeyam-cli/src/utils/wipe.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js +66 -0
- package/codeyam-cli/src/webserver/__tests__/dependency-smoke.test.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/database.js +88 -23
- 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/backgroundServer.js +52 -5
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/bootstrap.js +51 -0
- package/codeyam-cli/src/webserver/bootstrap.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/CopyButton-jNYXRRNI.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-bwuHPyTa.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-CMjhlvyu.js → EntityTypeBadge-CvzqMxcu.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-BH0XDim7.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-EhOseatT.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-yjIHlOGa.js +25 -0
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-DXN1aCbt.js → LibraryFunctionPreview-Cq5o8jL4.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BmEO4Lqa.js → LoadingDots-BvMu2i-g.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-CI1VaB3F.js → LogViewer-kgBTLoJD.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-BzPgx-xO.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-DQddU4F4.js → SafeScreenshot-CwZrv-Ok.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-BX2Ny2Qj.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-Dt7eySG0.js → TruncatedFilePath-CDpEprKa.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/_index-BRx8ZGZo.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-4S4yPfFw.js +27 -0
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DHKuQSmR.js +17 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.agent-transcripts-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.health-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.labs-unlock-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.memory-profile-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.restart-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.save-fixture-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/book-open-D4IPYH_y.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-ITTv_xL3.js → chevron-down-CG65viiV.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-DB3aFuEO.js +51 -0
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-mMM0RzI0.js → circle-check-igfMr5DY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/copy-Coc4o_8c.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-en9_3LGg.js → createLucideIcon-D1zB-pYc.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-C1gnJVOL.svg → cy-logo-cli-CCKUIm0S.svg} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DcX-ZS3p.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-JTAjQ54M.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-DBgKdrTR.js → entity._sha._-B0h9AqE6.js} +12 -12
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DjLxr2JB.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-CtYowLOt.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-Sf59Z2Pa.js → entity._sha_.edit._scenarioId-PePWg17F.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-BvGka1gZ.js → entry.client-I-Wo99C_.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/executionFlowCoverage-BWhdfn70.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-_IuKNgFH.js → fileTableUtils-9sMMAiWJ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-Co65J0s3.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{git-8zM4ebXo.js → git-BdHOxVfg.js} +8 -8
- package/codeyam-cli/src/webserver/build/client/assets/globals-BSZfYCkU.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-CkpJhcNC.js → index-CUM5iXwc.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-DFbRIdR_.js → index-_417gcQW.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/labs-BK0C1H1T.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-DEtRABV3.js → loader-circle-TzRHMVog.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-040dab1c.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-UIDVz141.js +92 -0
- package/codeyam-cli/src/webserver/build/client/assets/pause-hjzB7t2z.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-D1WadSdf.js +62 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-Clp3R4kH.js → search-DcAwD_Ln.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-CclxrcPK.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-DVNJVQgD.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/terminal-DbEAHMbA.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CUVskfkL.js → triangle-alert-CAD5b1o_.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BqgrAzs3.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-CHT-Bzx5.js → useLastLogLine-DAFqfEDH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-DZlYx2c4.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-BCR_pi3-.js → useToast-ihdMtlf6.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-B3dE0r28.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-DYbfdxa3.js +273 -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 +1 -3
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/server.js +35 -25
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/templates/{codeyam-debug-skill.md → codeyam-debug.md} +48 -4
- package/codeyam-cli/templates/codeyam-diagnose.md +481 -0
- package/codeyam-cli/templates/codeyam-memory-hook.sh +199 -0
- package/codeyam-cli/templates/codeyam-memory.md +396 -0
- package/codeyam-cli/templates/codeyam-new-rule.md +13 -0
- package/codeyam-cli/templates/{codeyam-setup-skill.md → codeyam-setup.md} +151 -4
- package/codeyam-cli/templates/{codeyam-sim-skill.md → codeyam-sim.md} +1 -1
- package/codeyam-cli/templates/{codeyam-test-skill.md → codeyam-test.md} +1 -1
- package/codeyam-cli/templates/{codeyam-verify-skill.md → codeyam-verify.md} +1 -1
- package/codeyam-cli/templates/rule-notification-hook.py +56 -0
- package/codeyam-cli/templates/rule-reflection-hook.py +627 -0
- package/codeyam-cli/templates/rules-instructions.md +132 -0
- package/package.json +18 -15
- package/packages/ai/index.js +8 -6
- package/packages/ai/index.js.map +1 -1
- package/packages/ai/src/lib/analyzeScope.js +179 -13
- package/packages/ai/src/lib/analyzeScope.js.map +1 -1
- package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js +150 -0
- package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js.map +1 -0
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +154 -9
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js +435 -0
- package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js.map +1 -0
- package/packages/ai/src/lib/astScopes/methodSemantics.js +138 -23
- package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js +10 -14
- package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js +8 -0
- package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js +23 -0
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js +138 -1
- package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/processExpression.js +1137 -96
- package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
- package/packages/ai/src/lib/astScopes/sharedPatterns.js +25 -0
- package/packages/ai/src/lib/astScopes/sharedPatterns.js.map +1 -1
- package/packages/ai/src/lib/checkAllAttributes.js +24 -9
- package/packages/ai/src/lib/checkAllAttributes.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +178 -31
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +1741 -208
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +7 -2
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +230 -23
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +77 -55
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js +13 -3
- package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js +6 -4
- package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +52 -3
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +139 -13
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js +63 -0
- package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +142 -12
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js +86 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js +173 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js +37 -20
- package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +334 -79
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js +107 -0
- package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructureChunking.js +130 -0
- package/packages/ai/src/lib/dataStructureChunking.js.map +1 -0
- package/packages/ai/src/lib/deepEqual.js +32 -0
- package/packages/ai/src/lib/deepEqual.js.map +1 -0
- package/packages/ai/src/lib/e2eDataTracking.js +241 -0
- package/packages/ai/src/lib/e2eDataTracking.js.map +1 -0
- package/packages/ai/src/lib/extractCriticalDataKeys.js +96 -0
- package/packages/ai/src/lib/extractCriticalDataKeys.js.map +1 -0
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js +62 -5
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarios.js +81 -90
- package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateEntityDataStructure.js +47 -2
- package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +1128 -85
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarios.js +193 -83
- package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlows.js +495 -0
- package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js +380 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +1807 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js +194 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js.map +1 -0
- package/packages/ai/src/lib/getConditionalUsagesFromCode.js +84 -14
- package/packages/ai/src/lib/getConditionalUsagesFromCode.js.map +1 -1
- package/packages/ai/src/lib/guessScenarioDataFromDescription.js +2 -1
- package/packages/ai/src/lib/guessScenarioDataFromDescription.js.map +1 -1
- package/packages/ai/src/lib/isolateScopes.js +270 -7
- package/packages/ai/src/lib/isolateScopes.js.map +1 -1
- package/packages/ai/src/lib/mergeJsonTypeDefinitions.js +5 -0
- package/packages/ai/src/lib/mergeJsonTypeDefinitions.js.map +1 -1
- package/packages/ai/src/lib/mergeStatements.js +88 -46
- package/packages/ai/src/lib/mergeStatements.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/collapseNullableObjects.js +97 -0
- package/packages/ai/src/lib/promptGenerators/collapseNullableObjects.js.map +1 -0
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +16 -4
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +21 -64
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js +54 -0
- package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js.map +1 -0
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +83 -6
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +10 -34
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js +45 -0
- package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js.map +1 -0
- package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js +16 -3
- package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js +335 -0
- package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js.map +1 -0
- package/packages/ai/src/lib/resolvePathToControllable.js +677 -0
- package/packages/ai/src/lib/resolvePathToControllable.js.map +1 -0
- package/packages/ai/src/lib/splitOutsideParentheses.js +3 -1
- package/packages/ai/src/lib/splitOutsideParentheses.js.map +1 -1
- package/packages/ai/src/lib/worker/SerializableDataStructure.js +29 -0
- package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js +94 -1
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js.map +1 -1
- package/packages/analyze/index.js +1 -0
- package/packages/analyze/index.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +75 -36
- package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +96 -26
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/analysisContext.js +30 -5
- package/packages/analyze/src/lib/analysisContext.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/index.js +1 -0
- package/packages/analyze/src/lib/asts/nodes/index.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js +52 -0
- package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js.map +1 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +14 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js +14 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js +6 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js +6 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js +39 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js +2 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +268 -52
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +24 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +5 -0
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +2 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +2 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +31 -10
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeChange.js +21 -11
- package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeEntity.js +9 -8
- package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeInitial.js +9 -10
- package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeRemixRoute.js +3 -2
- package/packages/analyze/src/lib/files/analyzeRemixRoute.js.map +1 -1
- package/packages/analyze/src/lib/files/enums/steps.js +1 -1
- package/packages/analyze/src/lib/files/enums/steps.js.map +1 -1
- package/packages/analyze/src/lib/files/getImportedExports.js +11 -7
- package/packages/analyze/src/lib/files/getImportedExports.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +880 -0
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +170 -40
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js +85 -0
- package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +522 -59
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.js +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js +29 -34
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +268 -51
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +144 -0
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +56 -69
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +4 -8
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +801 -118
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js +46 -9
- package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/setImportedExports.js +2 -1
- package/packages/analyze/src/lib/files/setImportedExports.js.map +1 -1
- package/packages/analyze/src/lib/index.js +1 -0
- package/packages/analyze/src/lib/index.js.map +1 -1
- package/packages/analyze/src/lib/utils/getFileByPath.js +12 -0
- package/packages/analyze/src/lib/utils/getFileByPath.js.map +1 -0
- package/packages/aws/src/lib/ecs/ecsDefineContainer.js +2 -2
- package/packages/aws/src/lib/ecs/ecsDefineContainer.js.map +1 -1
- package/packages/aws/src/lib/ecs/ecsTaskFactory.js +17 -61
- package/packages/aws/src/lib/ecs/ecsTaskFactory.js.map +1 -1
- package/packages/database/src/lib/analysisBranchToDb.js +1 -1
- package/packages/database/src/lib/analysisBranchToDb.js.map +1 -1
- package/packages/database/src/lib/analysisToDb.js +1 -1
- package/packages/database/src/lib/analysisToDb.js.map +1 -1
- package/packages/database/src/lib/branchToDb.js +1 -1
- package/packages/database/src/lib/branchToDb.js.map +1 -1
- package/packages/database/src/lib/commitBranchToDb.js +1 -1
- package/packages/database/src/lib/commitBranchToDb.js.map +1 -1
- package/packages/database/src/lib/commitToDb.js +1 -1
- package/packages/database/src/lib/commitToDb.js.map +1 -1
- package/packages/database/src/lib/fileToDb.js +1 -1
- package/packages/database/src/lib/fileToDb.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +13 -3
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/commitsTable.js +3 -0
- package/packages/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/debugReportsTable.js +9 -3
- package/packages/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
- package/packages/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
- package/packages/database/src/lib/loadAnalyses.js +45 -2
- package/packages/database/src/lib/loadAnalyses.js.map +1 -1
- package/packages/database/src/lib/loadAnalysis.js +8 -0
- package/packages/database/src/lib/loadAnalysis.js.map +1 -1
- package/packages/database/src/lib/loadBranch.js +11 -1
- package/packages/database/src/lib/loadBranch.js.map +1 -1
- package/packages/database/src/lib/loadCommit.js +7 -0
- package/packages/database/src/lib/loadCommit.js.map +1 -1
- package/packages/database/src/lib/loadCommits.js +22 -1
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadEntities.js +23 -4
- package/packages/database/src/lib/loadEntities.js.map +1 -1
- package/packages/database/src/lib/loadEntityBranches.js +9 -0
- package/packages/database/src/lib/loadEntityBranches.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +7 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/projectToDb.js +1 -1
- package/packages/database/src/lib/projectToDb.js.map +1 -1
- package/packages/database/src/lib/saveFiles.js +1 -1
- package/packages/database/src/lib/saveFiles.js.map +1 -1
- package/packages/database/src/lib/scenarioToDb.js +1 -1
- package/packages/database/src/lib/scenarioToDb.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +5 -4
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/generate/index.js +3 -0
- package/packages/generate/index.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
- package/packages/generate/src/lib/deepMerge.js +27 -1
- package/packages/generate/src/lib/deepMerge.js.map +1 -1
- package/packages/generate/src/lib/scenarioComponentForServer.js +89 -0
- package/packages/generate/src/lib/scenarioComponentForServer.js.map +1 -0
- package/packages/github/src/lib/loadOrCreateCommit.js +10 -0
- package/packages/github/src/lib/loadOrCreateCommit.js.map +1 -1
- package/packages/github/src/lib/syncPrimaryBranch.js +3 -0
- package/packages/github/src/lib/syncPrimaryBranch.js.map +1 -1
- package/packages/process/index.js +3 -0
- package/packages/process/index.js.map +1 -0
- package/packages/process/src/GlobalProcessManager.js.map +1 -0
- package/{background/src/lib/process → packages/process/src}/ProcessManager.js +1 -1
- package/packages/process/src/ProcessManager.js.map +1 -0
- package/packages/process/src/index.js.map +1 -0
- package/packages/process/src/managedExecAsync.js.map +1 -0
- package/packages/types/index.js.map +1 -1
- package/packages/utils/src/lib/fs/rsyncCopy.js +93 -2
- package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/packages/utils/src/lib/safeFileName.js +29 -3
- package/packages/utils/src/lib/safeFileName.js.map +1 -1
- package/scripts/finalize-analyzer.cjs +8 -76
- package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +0 -102
- package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +0 -197
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +0 -271
- package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +0 -294
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.ts +0 -67
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +0 -115
- package/analyzer-template/process/INTEGRATION_COMPLETE.md +0 -333
- package/analyzer-template/process/INTEGRATION_EXAMPLE.md +0 -525
- package/analyzer-template/process/README.md +0 -507
- package/background/src/lib/process/GlobalProcessManager.js.map +0 -1
- package/background/src/lib/process/ProcessManager.js.map +0 -1
- package/background/src/lib/process/index.js.map +0 -1
- package/background/src/lib/process/managedExecAsync.js.map +0 -1
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js +0 -238
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js.map +0 -1
- package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js +0 -7
- package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-DpUOH11S.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-Cxs_KUEt.js +0 -41
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-D_gPUolj.js +0 -25
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-MbTu_hOR.js +0 -11
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-Diqfd5nO.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/_index-D0tNX0Y7.js +0 -11
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CV8R8fpo.js +0 -32
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JMJ3UQ3L-Tv-88Jsz.js +0 -51
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-Cw7TE00E.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DUOKD0lj.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-DMW0hD4L.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-D3y4cv7l.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-18ff0544.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-BuQ6JiJU.js +0 -51
- package/codeyam-cli/src/webserver/build/client/assets/settings-DzIyX7wI.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-BKNqbrwU.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-By4FnEmE.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-CzKXayO4.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CHRMAMo8.js +0 -166
- package/codeyam-cli/templates/debug-codeyam.md +0 -576
- package/packages/ai/src/lib/findMatchingAttribute.js +0 -77
- package/packages/ai/src/lib/findMatchingAttribute.js.map +0 -1
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +0 -136
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +0 -220
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/generateEntityKeyAttributes.js +0 -241
- package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/isFrontend.js +0 -5
- package/packages/ai/src/lib/isFrontend.js.map +0 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js +0 -40
- package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js.map +0 -1
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +0 -72
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +0 -1
- /package/analyzer-template/{process → packages/process/src}/GlobalProcessManager.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/ProcessManager.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/index.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/managedExecAsync.ts +0 -0
- /package/{background/src/lib/process → packages/process/src}/GlobalProcessManager.js +0 -0
- /package/{background/src/lib/process → packages/process/src}/index.js +0 -0
- /package/{background/src/lib/process → packages/process/src}/managedExecAsync.js +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import{H as gr,j as s,r as I,w as Mi,u as zi,c as _i,f as Oi,L as Bi}from"./chunk-JZWAC4HX-DB3aFuEO.js";import{u as $i}from"./useReportContext-DZlYx2c4.js";import{c as Ne}from"./createLucideIcon-D1zB-pYc.js";import{T as xr,C as Kt}from"./terminal-DbEAHMbA.js";import{a as Ge,C as ze}from"./copy-Coc4o_8c.js";import{C as Hi}from"./CopyButton-jNYXRRNI.js";import{S as yr}from"./search-DcAwD_Ln.js";import{F as zt,P as Vi}from"./pause-hjzB7t2z.js";import{C as Ui}from"./chevron-down-CG65viiV.js";import{B as qi}from"./book-open-D4IPYH_y.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"}]],br=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"}]],_t=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"}]],Gt=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"}]],et=Ne("x",rl);function il(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.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 vn(e,n){return(al.jsx?ol:ll).test(e)}const sl=/[ \t\n\f\r]/g;function ul(e){return typeof e=="object"?e.type==="text"?jn(e.value):!1:jn(e)}function jn(e){return e.replace(sl,"")===""}class tt{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}tt.prototype.normal={};tt.prototype.property={};tt.prototype.space=void 0;function kr(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new tt(t,r,n)}function Ot(e){return e.toLowerCase()}class fe{constructor(n,t){this.attribute=t,this.property=n}}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(),Bt=Ie(),E=Ie(),te=Ie(),Me=Ie(),de=Ie();function Ie(){return 2**++cl}const $t=Object.freeze(Object.defineProperty({__proto__:null,boolean:V,booleanish:ie,commaOrSpaceSeparated:de,commaSeparated:Me,number:E,overloadedBoolean:Bt,spaceSeparated:te},Symbol.toStringTag,{value:"Module"})),kt=Object.keys($t);class Jt extends fe{constructor(n,t,r,i){let o=-1;if(super(n,t),Sn(this,"space",i),typeof r=="number")for(;++o<kt.length;){const l=kt[o];Sn(this,kt[o],(r&$t[l])===$t[l])}}}Jt.prototype.defined=!0;function Sn(e,n,t){t&&(e[n]=t)}function Oe(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new Jt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[Ot(r)]=r,t[Ot(o.attribute)]=r}return new tt(n,t,e.space)}const wr=Oe({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,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function Cr(e,n){return n in e?e[n]:n}function vr(e,n){return Cr(e,n.toLowerCase())}const hl=Oe({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Me,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|Me,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:Bt,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:Bt,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:vr}),fl=Oe({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:Me,g2:Me,glyphName:Me,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:Cr}),jr=Oe({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Sr=Oe({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vr}),Nr=Oe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.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,Nn=/-[a-z]/g,ml=/^data[-\w.:]+$/i;function gl(e,n){const t=Ot(n);let r=n,i=fe;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ml.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(Nn,yl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!Nn.test(o)){let l=o.replace(dl,xl);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=Jt}return new i(r,n)}function xl(e){return"-"+e.toLowerCase()}function yl(e){return e.charAt(1).toUpperCase()}const bl=kr([wr,hl,jr,Sr,Nr],"html"),Zt=kr([wr,fl,jr,Sr,Nr],"svg");function kl(e){return e.join(" ").trim()}var Re={},wt,En;function wl(){if(En)return wt;En=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\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 g(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var S=1,N=1;function R(D){var w=D.match(n);w&&(S+=w.length);var L=D.lastIndexOf(c);N=~L?D.length-L:N+D.length}function A(){var D={line:S,column:N};return function(w){return w.position=new C(D),q(),w}}function C(D){this.start=D,this.end={line:S,column:N},this.source=y.source}C.prototype.content=v;function _(D){var w=new Error(y.source+":"+S+":"+N+": "+D);if(w.reason=D,w.filename=y.source,w.line=S,w.column=N,w.source=v,!y.silent)throw w}function $(D){var w=D.exec(v);if(w){var L=w[0];return R(L),v=v.slice(L.length),w}}function q(){$(t)}function k(D){var w;for(D=D||[];w=T();)w!==!1&&D.push(w);return D}function T(){var D=A();if(!(u!=v.charAt(0)||f!=v.charAt(1))){for(var w=2;h!=v.charAt(w)&&(f!=v.charAt(w)||u!=v.charAt(w+1));)++w;if(w+=2,h===v.charAt(w-1))return _("End of comment missing");var L=v.slice(2,w-2);return N+=2,R(L),v=v.slice(w),N+=2,D({type:d,comment:L})}}function F(){var D=A(),w=$(r);if(w){if(T(),!$(i))return _("property missing ':'");var L=$(o),O=D({type:p,property:b(w[0].replace(e,h)),value:L?b(L[0].replace(e,h)):h});return $(l),O}}function Y(){var D=[];k(D);for(var w;w=F();)w!==!1&&(D.push(w),k(D));return D}return q(),Y()}function b(v){return v?v.replace(a,h):h}return wt=g,wt}var Pn;function Cl(){if(Pn)return Re;Pn=1;var e=Re&&Re.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.default=t;const n=e(wl());function t(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,n.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 Ve={},An;function vl(){if(An)return Ve;An=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||t.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(n,l))};return Ve.camelCase=c,Ve}var Ue,Tn;function jl(){if(Tn)return Ue;Tn=1;var e=Ue&&Ue.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(Cl()),t=vl();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,c){a&&c&&(l[(0,t.camelCase)(a,o)]=c)}),l}return r.default=r,Ue=r,Ue}var Sl=jl();const Nl=gr(Sl),Er=Pr("end"),en=Pr("start");function Pr(e){return n;function n(t){const r=t&&t.position&&t.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 n=en(e),t=Er(e);if(n&&t)return{start:n,end:t}}function Ye(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?In(e.position):"start"in e||"end"in e?In(e):"line"in e||"column"in e?Ht(e):""}function Ht(e){return Fn(e&&e.line)+":"+Fn(e&&e.column)}function In(e){return Ht(e&&e.start)+"-"+Ht(e&&e.end)}function Fn(e){return e&&typeof e=="number"?e:1}class ae extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!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=Ye(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 tn={}.hasOwnProperty,Pl=new Map,Al=/[A-Z]/g,Tl=new Set(["table","tbody","thead","tfoot","tr"]),Il=new Set(["td","th"]),Ar="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fl(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bl(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ol(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Zt:bl,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Tr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Tr(e,n,t){if(n.type==="element")return Rl(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Dl(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ml(e,n,t);if(n.type==="mdxjsEsm")return Ll(e,n);if(n.type==="root")return zl(e,n,t);if(n.type==="text")return _l(e,n)}function Rl(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Zt,e.schema=i),e.ancestors.push(n);const o=Fr(e,n.tagName,!1),l=$l(e,n);let a=rn(e,n);return Tl.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!ul(c):!0})),Ir(e,l,o,n),nn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function Dl(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Je(e,n.position)}function Ll(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Je(e,n.position)}function Ml(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Zt,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Fr(e,n.name,!0),l=Hl(e,n),a=rn(e,n);return Ir(e,l,o,n),nn(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function zl(e,n,t){const r={};return nn(r,rn(e,n)),e.create(n,e.Fragment,r,t)}function _l(e,n){return n.value}function Ir(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function nn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Ol(e,n,t){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?t:n;return a?u(o,l,a):u(o,l)}}function Bl(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),c=en(r);return n(i,o,l,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function $l(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&tn.call(n.properties,i)){const o=Vl(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&Il.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Hl(e,n){const t={};for(const r of n.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(t,e.evaluater.evaluateExpression(a.argument))}else Je(e,n.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 Je(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function rn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Pl;for(;++r<n.children.length;){const o=n.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=Tr(e,o,l);a!==void 0&&t.push(a)}return t}function Vl(e,n,t){const r=gl(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?il(t):kl(t)),r.property==="style"){let i=typeof t=="object"?t:Ul(e,String(t));return e.stylePropertyNameCase==="css"&&(i=ql(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?pl[r.property]||r.property:r.attribute,t]}}function Ul(e,n){try{return Nl(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,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=Ar+"#cannot-parse-style-attribute",i}}function Fr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=vn(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=vn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return tn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Je(e)}function Je(e,n){const t=new ae("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Ar+"#cannot-handle-mdx-estrees-without-createevaluater",t}function ql(e){const n={};let t;for(t in e)tn.call(e,t)&&(n[Wl(t)]=e[t]);return n}function Wl(e){let n=e.replace(Al,Yl);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Yl(e){return"-"+e.toLowerCase()}const Ct={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 ln(e,n){const t=Ql,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Rr(e,r,i)}function Rr(e,n,t){if(Xl(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Rn(e.children,n,t)}return Array.isArray(e)?Rn(e,n,t):""}function Rn(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Rr(e[i],n,t);return r.join("")}function Xl(e){return!!(e&&typeof e=="object")}const Dn=document.createElement("i");function on(e){const n="&"+e+";";Dn.innerHTML=n;const t=Dn.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function me(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function ge(e,n){return e.length>0?(me(e,e.length,0,n),e):n}const Ln={}.hasOwnProperty;function Dr(e){const n={};let t=-1;for(;++t<e.length;)Kl(n,e[t]);return n}function Kl(e,n){let t;for(t in n){const i=(Ln.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){Ln.call(i,l)||(i[l]=[]);const a=o[l];Gl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Gl(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);me(e,0,0,r)}function Lr(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}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 ct(e){return e!==null&&(e<32||e===127)}const Vt=Ee(/\d/),Zl=Ee(/[\dA-Fa-f]/),eo=Ee(/[!-/:-@[-`{-~]/);function z(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 dt=Ee(new RegExp("\\p{P}|\\p{S}","u")),Te=Ee(/\s/);function Ee(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Be(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&oe(e.charCodeAt(t+1))&&oe(e.charCodeAt(t+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(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function Q(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(c){return U(c)?(e.enter(t),a(c)):n(c)}function a(c){return U(c)&&o++<i?(e.consume(c),a):(e.exit(t),n(c))}}const to={tokenize:no};function no(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return z(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const ro={tokenize:io},Mn={tokenize:lo};function io(e){const n=this,t=[];let r=0,i,o,l;return a;function a(N){if(r<t.length){const R=t[r];return n.containerState=R[1],e.attempt(R[0].continuation,c,u)(N)}return u(N)}function c(N){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&S();const R=n.events.length;let A=R,C;for(;A--;)if(n.events[A][0]==="exit"&&n.events[A][1].type==="chunkFlow"){C=n.events[A][1].end;break}y(r);let _=R;for(;_<n.events.length;)n.events[_][1].end={...C},_++;return me(n.events,A+1,0,n.events.slice(R)),n.events.length=_,u(N)}return a(N)}function u(N){if(r===t.length){if(!i)return d(N);if(i.currentConstruct&&i.currentConstruct.concrete)return g(N);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Mn,f,h)(N)}function f(N){return i&&S(),y(r),d(N)}function h(N){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,g(N)}function d(N){return n.containerState={},e.attempt(Mn,p,g)(N)}function p(N){return r++,t.push([n.currentConstruct,n.containerState]),d(N)}function g(N){if(N===null){i&&S(),y(0),e.consume(N);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(N)}function b(N){if(N===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(N);return}return z(N)?(e.consume(N),v(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(N),b)}function v(N,R){const A=n.sliceStream(N);if(R&&A.push(null),N.previous=o,o&&(o.next=N),o=N,i.defineSkip(N.start),i.write(A),n.parser.lazy[N.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<l&&(!i.events[C][1].end||i.events[C][1].end.offset>l))return;const _=n.events.length;let $=_,q,k;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(q){k=n.events[$][1].end;break}q=!0}for(y(r),C=_;C<n.events.length;)n.events[C][1].end={...k},C++;me(n.events,$+1,0,n.events.slice(_)),n.events.length=C}}function y(N){let R=t.length;for(;R-- >N;){const A=t[R];n.containerState=A[1],A[0].exit.call(n,e)}t.length=N}function S(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function lo(e,n,t){return Q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _e(e){if(e===null||Z(e)||Te(e))return 1;if(dt(e))return 2}function mt(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const Ut={name:"attention",resolveAll:oo,tokenize:ao};function oo(e,n){let t=-1,r,i,o,l,a,c,u,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},d={...e[t][1].start};zn(h,-c),zn(d,c),l={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ge(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ge(u,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",o,n]]),u=ge(u,mt(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ge(u,[["exit",o,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=ge(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,me(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function ao(e,n){const t=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||t.includes(c),d=!i||i===2&&f||t.includes(r);return u._open=!!(o===42?h:h&&(i||!d)),u._close=!!(o===42?d:d&&(f||!h)),n(c)}}function zn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const so={name:"autolink",tokenize:uo};function uo(e,n,t){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?t(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"),n):p===null||p===32||p===60||ct(p)?t(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),f):Jl(p)?(e.consume(p),u):t(p)}function f(p){return oe(p)?h(p):t(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"),n):d(p)}function d(p){if((p===45||oe(p))&&r++<63){const g=p===45?d:h;return e.consume(p),g}return t(p)}}const nt={partial:!0,tokenize:co};function co(e,n,t){return r;function r(o){return U(o)?Q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||z(o)?n(o):t(o)}}const Mr={continuation:{tokenize:fo},exit:po,name:"blockQuote",tokenize:ho};function ho(e,n,t){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 t(l)}function o(l){return U(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function fo(e,n,t){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(Mr,n,t)(l)}}function po(e){e.exit("blockQuote")}const zr={name:"characterEscape",tokenize:mo};function mo(e,n,t){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"),n):t(o)}}const _r={name:"characterReference",tokenize:go};function go(e,n,t){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=Vt,f(h))}function f(h){if(h===59&&i){const d=e.exit("characterReferenceValue");return l===oe&&!on(r.sliceSerialize(d))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(h)&&i++<o?(e.consume(h),f):t(h)}}const _n={partial:!0,tokenize:yo},On={concrete:!0,name:"codeFenced",tokenize:xo};function xo(e,n,t){const r=this,i={partial:!0,tokenize:A};let o=0,l=0,a;return c;function c(C){return u(C)}function u(C){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===a?(l++,e.consume(C),f):l<3?t(C):(e.exit("codeFencedFenceSequence"),U(C)?Q(e,h,"whitespace")(C):h(C))}function h(C){return C===null||z(C)?(e.exit("codeFencedFence"),r.interrupt?n(C):e.check(_n,b,R)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(C))}function d(C){return C===null||z(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(C)):U(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,p,"whitespace")(C)):C===96&&C===a?t(C):(e.consume(C),d)}function p(C){return C===null||z(C)?h(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||z(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(C)):C===96&&C===a?t(C):(e.consume(C),g)}function b(C){return e.attempt(i,R,v)(C)}function v(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return o>0&&U(C)?Q(e,S,"linePrefix",o+1)(C):S(C)}function S(C){return C===null||z(C)?e.check(_n,b,R)(C):(e.enter("codeFlowValue"),N(C))}function N(C){return C===null||z(C)?(e.exit("codeFlowValue"),S(C)):(e.consume(C),N)}function R(C){return e.exit("codeFenced"),n(C)}function A(C,_,$){let q=0;return k;function k(w){return C.enter("lineEnding"),C.consume(w),C.exit("lineEnding"),T}function T(w){return C.enter("codeFencedFence"),U(w)?Q(C,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):F(w)}function F(w){return w===a?(C.enter("codeFencedFenceSequence"),Y(w)):$(w)}function Y(w){return w===a?(q++,C.consume(w),Y):q>=l?(C.exit("codeFencedFenceSequence"),U(w)?Q(C,D,"whitespace")(w):D(w)):$(w)}function D(w){return w===null||z(w)?(C.exit("codeFencedFence"),_(w)):$(w)}}}function yo(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const vt={name:"codeIndented",tokenize:ko},bo={partial:!0,tokenize:wo};function ko(e,n,t){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):t(u)}function l(u){return u===null?c(u):z(u)?e.attempt(bo,l,c)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||z(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function c(u){return e.exit("codeIndented"),n(u)}}function wo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):z(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?n(l):z(l)?i(l):t(l)}}const Co={name:"codeText",previous:jo,resolve:vo,tokenize:So};function vo(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=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,n,t){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?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(o=e.enter("codeTextSequence"),i=0,f(h)):z(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||z(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"),n(h)):(o.type="codeTextData",u(h))}}class No{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&qe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),qe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),qe(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);qe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);qe(this.left,t.reverse())}}}function qe(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Or(e){const n={};let t=-1,r,i,o,l,a,c,u;const f=new No(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-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(n,Eo(f,t)),t=n[t],u=!0);else if(r[1]._container){for(o=t,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,t),a.unshift(r),f.splice(i,t-i+1,a))}}return me(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Eo(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,c=[],u={};let f,h,d=-1,p=t,g=0,b=0;const v=[b];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=t;++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&&(b=d+1,v.push(b),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),d=v.length;d--;){const y=a.slice(v[d],v[d+1]),S=o.pop();c.push([S,S+y.length-1]),e.splice(S,2,y)}for(c.reverse(),d=-1;++d<c.length;)u[g+c[d][0]]=g+c[d][1],g+=c[d][1]-c[d][0]-1;return u}const Po={resolve:To,tokenize:Io},Ao={partial:!0,tokenize:Fo};function To(e){return Or(e),e}function Io(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):z(a)?e.check(Ao,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Fo(e,n,t){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||z(l))return t(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?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Br(e,n,t,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||ct(y)?t(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(y))}function d(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),n):(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||z(y)?t(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function b(y){return!f&&(y===null||y===41||Z(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(y)):f<u&&y===40?(e.consume(y),f++,b):y===41?(e.consume(y),f--,b):y===null||y===32||y===40||ct(y)?t(y):(e.consume(y),y===92?v:b)}function v(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function $r(e,n,t,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?t(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):z(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||z(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 Hr(e,n,t,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):t(d)}function c(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(o),u(d))}function u(d){return d===l?(e.exit(o),c(l)):d===null?t(d):z(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||z(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 Qe(e,n){let t;return r;function r(i){return z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):U(i)?Q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Ro={name:"definition",tokenize:Lo},Do={partial:!0,tokenize:Mo};function Lo(e,n,t){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return $r.call(r,e,a,t,"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):t(p)}function c(p){return Z(p)?Qe(e,u)(p):u(p)}function u(p){return Br(e,f,t,"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||z(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Mo(e,n,t){return r;function r(a){return Z(a)?Qe(e,i)(a):t(a)}function i(a){return Hr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return U(a)?Q(e,l,"whitespace")(a):l(a)}function l(a){return a===null||z(a)?n(a):t(a)}}const zo={name:"hardBreakEscape",tokenize:_o};function _o(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return z(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const Oo={name:"headingAtx",resolve:Bo,tokenize:$o};function Bo(e,n){let t=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},me(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])),e}function $o(e,n,t){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)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||z(f)?(e.exit("atxHeading"),n(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"],Bn=["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 n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Yo(e,n,t){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,b):x===63?(e.consume(x),i=3,r.interrupt?n:m):ce(x)?(e.consume(x),l=String.fromCharCode(x),v):t(x)}function d(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,a=0,g):ce(x)?(e.consume(x),i=4,r.interrupt?n:m):t(x)}function p(x){return x===45?(e.consume(x),r.interrupt?n:m):t(x)}function g(x){const G="CDATA[";return x===G.charCodeAt(a++)?(e.consume(x),a===G.length?r.interrupt?n:F:g):t(x)}function b(x){return ce(x)?(e.consume(x),l=String.fromCharCode(x),v):t(x)}function v(x){if(x===null||x===47||x===62||Z(x)){const G=x===47,re=l.toLowerCase();return!G&&!o&&Bn.includes(re)?(i=1,r.interrupt?n(x):F(x)):Ho.includes(l.toLowerCase())?(i=6,G?(e.consume(x),y):r.interrupt?n(x):F(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(x):o?S(x):N(x))}return x===45||oe(x)?(e.consume(x),l+=String.fromCharCode(x),v):t(x)}function y(x){return x===62?(e.consume(x),r.interrupt?n:F):t(x)}function S(x){return U(x)?(e.consume(x),S):k(x)}function N(x){return x===47?(e.consume(x),k):x===58||x===95||ce(x)?(e.consume(x),R):U(x)?(e.consume(x),N):k(x)}function R(x){return x===45||x===46||x===58||x===95||oe(x)?(e.consume(x),R):A(x)}function A(x){return x===61?(e.consume(x),C):U(x)?(e.consume(x),A):N(x)}function C(x){return x===null||x===60||x===61||x===62||x===96?t(x):x===34||x===39?(e.consume(x),c=x,_):U(x)?(e.consume(x),C):$(x)}function _(x){return x===c?(e.consume(x),c=null,q):x===null||z(x)?t(x):(e.consume(x),_)}function $(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||Z(x)?A(x):(e.consume(x),$)}function q(x){return x===47||x===62||U(x)?N(x):t(x)}function k(x){return x===62?(e.consume(x),T):t(x)}function T(x){return x===null||z(x)?F(x):U(x)?(e.consume(x),T):t(x)}function F(x){return x===45&&i===2?(e.consume(x),L):x===60&&i===1?(e.consume(x),O):x===62&&i===4?(e.consume(x),le):x===63&&i===3?(e.consume(x),m):x===93&&i===5?(e.consume(x),X):z(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Uo,se,Y)(x)):x===null||z(x)?(e.exit("htmlFlowData"),Y(x)):(e.consume(x),F)}function Y(x){return e.check(qo,D,se)(x)}function D(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),w}function w(x){return x===null||z(x)?Y(x):(e.enter("htmlFlowData"),F(x))}function L(x){return x===45?(e.consume(x),m):F(x)}function O(x){return x===47?(e.consume(x),l="",K):F(x)}function K(x){if(x===62){const G=l.toLowerCase();return Bn.includes(G)?(e.consume(x),le):F(x)}return ce(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),K):F(x)}function X(x){return x===93?(e.consume(x),m):F(x)}function m(x){return x===62?(e.consume(x),le):x===45&&i===2?(e.consume(x),m):F(x)}function le(x){return x===null||z(x)?(e.exit("htmlFlowData"),se(x)):(e.consume(x),le)}function se(x){return e.exit("htmlFlow"),n(x)}}function Qo(e,n,t){const r=this;return i;function i(l){return z(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):t(l)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Xo(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(nt,n,t)}}const Ko={name:"htmlText",tokenize:Go};function Go(e,n,t){const r=this;let i,o,l;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),u):m===47?(e.consume(m),A):m===63?(e.consume(m),N):ce(m)?(e.consume(m),$):t(m)}function u(m){return m===45?(e.consume(m),f):m===91?(e.consume(m),o=0,g):ce(m)?(e.consume(m),S):t(m)}function f(m){return m===45?(e.consume(m),p):t(m)}function h(m){return m===null?t(m):m===45?(e.consume(m),d):z(m)?(l=h,O(m)):(e.consume(m),h)}function d(m){return m===45?(e.consume(m),p):h(m)}function p(m){return m===62?L(m):m===45?d(m):h(m)}function g(m){const le="CDATA[";return m===le.charCodeAt(o++)?(e.consume(m),o===le.length?b:g):t(m)}function b(m){return m===null?t(m):m===93?(e.consume(m),v):z(m)?(l=b,O(m)):(e.consume(m),b)}function v(m){return m===93?(e.consume(m),y):b(m)}function y(m){return m===62?L(m):m===93?(e.consume(m),y):b(m)}function S(m){return m===null||m===62?L(m):z(m)?(l=S,O(m)):(e.consume(m),S)}function N(m){return m===null?t(m):m===63?(e.consume(m),R):z(m)?(l=N,O(m)):(e.consume(m),N)}function R(m){return m===62?L(m):N(m)}function A(m){return ce(m)?(e.consume(m),C):t(m)}function C(m){return m===45||oe(m)?(e.consume(m),C):_(m)}function _(m){return z(m)?(l=_,O(m)):U(m)?(e.consume(m),_):L(m)}function $(m){return m===45||oe(m)?(e.consume(m),$):m===47||m===62||Z(m)?q(m):t(m)}function q(m){return m===47?(e.consume(m),L):m===58||m===95||ce(m)?(e.consume(m),k):z(m)?(l=q,O(m)):U(m)?(e.consume(m),q):L(m)}function k(m){return m===45||m===46||m===58||m===95||oe(m)?(e.consume(m),k):T(m)}function T(m){return m===61?(e.consume(m),F):z(m)?(l=T,O(m)):U(m)?(e.consume(m),T):q(m)}function F(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,Y):z(m)?(l=F,O(m)):U(m)?(e.consume(m),F):(e.consume(m),D)}function Y(m){return m===i?(e.consume(m),i=void 0,w):m===null?t(m):z(m)?(l=Y,O(m)):(e.consume(m),Y)}function D(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||Z(m)?q(m):(e.consume(m),D)}function w(m){return m===47||m===62||Z(m)?q(m):t(m)}function L(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function O(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),K}function K(m){return U(m)?Q(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):X(m)}function X(m){return e.enter("htmlTextData"),l(m)}}const an={name:"labelEnd",resolveAll:ta,resolveTo:na,tokenize:ra},Jo={tokenize:ia},Zo={tokenize:la},ea={tokenize:oa};function ta(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&me(e,0,e.length,t),e}function na(e,n){let t=e.length,r=0,i,o,l,a;for(;t--;)if(i=e[t][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);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,n],["enter",u,n]],a=ge(a,e.slice(o+1,o+r+3)),a=ge(a,[["enter",f,n]]),a=ge(a,mt(n.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),n)),a=ge(a,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),a=ge(a,e.slice(l+1)),a=ge(a,[["exit",c,n]]),me(e,o,e.length,a),e}function ra(e,n,t){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):t(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 n(d)}function h(d){return o._balanced=!0,t(d)}}function ia(e,n,t){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)?Qe(e,o)(h):o(h)}function o(h){return h===41?f(h):Br(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return Z(h)?Qe(e,c)(h):f(h)}function a(h){return t(h)}function c(h){return h===34||h===39||h===40?Hr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return Z(h)?Qe(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function la(e,n,t){const r=this;return i;function i(a){return $r.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)))?n(a):t(a)}function l(a){return t(a)}}function oa(e,n,t){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"),n):t(o)}}const aa={name:"labelStartImage",resolveAll:an.resolveAll,tokenize:sa};function sa(e,n,t){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):t(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const ua={name:"labelStartLink",resolveAll:an.resolveAll,tokenize:ca};function ca(e,n,t){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?t(l):n(l)}}const jt={name:"lineEnding",tokenize:ha};function ha(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,n,"linePrefix")}}const ut={name:"thematicBreak",tokenize:fa};function fa(e,n,t){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||z(u))?(e.exit("thematicBreak"),n(u)):t(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,n,t){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 g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Vt(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(ut,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return Vt(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)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(nt,r.interrupt?t: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):t(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function ga(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(nt,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,n,"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,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(he,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function xa(e,n,t){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?n(o):t(o)}}function ya(e){e.exit(this.containerState.type)}function ba(e,n,t){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"?n(o):t(o)}}const $n={name:"setextUnderline",resolveTo:ka,tokenize:wa};function ka(e,n){let t=e.length,r,i,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!o&&e[t][1].type==="definition"&&(o=t);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,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function wa(e,n,t){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)):t(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||z(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const Ca={tokenize:va};function va(e){const n=this,t=e.attempt(nt,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Po,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ja={resolveAll:Ur()},Sa=Vr("string"),Na=Vr("text");function Vr(e){return{resolveAll:Ur(e==="text"?Ea:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),c}function c(f){return u(f)?(t.exit("data"),o(f)):(t.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 Ur(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Ea(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.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(n._contentTypeTextTrailing&&t===e.length&&(a=0),a){const u={type:t===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(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}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:Mr},Aa={91:Ro},Ta={[-2]:vt,[-1]:vt,32:vt},Ia={35:Oo,42:ut,45:[$n,ut],60:Vo,61:$n,95:ut,96:On,126:On},Fa={38:_r,92:zr},Ra={[-5]:jt,[-4]:jt,[-3]:jt,33:aa,38:_r,42:Ut,60:[so,Ko],91:ua,92:[zo,zr],93:an,95:Ut,96:Co},Da={null:[Ut,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,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const c={attempt:_(A),check:_(C),consume:S,enter:N,exit:R,interrupt:_(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:h};let f=n.tokenize.call(u,c);return n.resolveAll&&o.push(n),u;function h(T){return l=ge(l,T),v(),l[l.length-1]!==null?[]:($(n,0),u.events=mt(o,u.events,u),u.events)}function d(T,F){return Ba(p(T),F)}function p(T){return Oa(l,T)}function g(){const{_bufferIndex:T,_index:F,line:Y,column:D,offset:w}=r;return{_bufferIndex:T,_index:F,line:Y,column:D,offset:w}}function b(T){i[T.line]=T.column,k()}function v(){let T;for(;r._index<l.length;){const F=l[r._index];if(typeof F=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<F.length;)y(F.charCodeAt(r._bufferIndex));else y(F)}}function y(T){f=f(T)}function S(T){z(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,k()):T!==-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=T}function N(T,F){const Y=F||{};return Y.type=T,Y.start=g(),u.events.push(["enter",Y,u]),a.push(Y),Y}function R(T){const F=a.pop();return F.end=g(),u.events.push(["exit",F,u]),F}function A(T,F){$(T,F.from)}function C(T,F){F.restore()}function _(T,F){return Y;function Y(D,w,L){let O,K,X,m;return Array.isArray(D)?se(D):"tokenize"in D?se([D]):le(D);function le(ne){return M;function M(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 O=ne,K=0,ne.length===0?L:x(ne[K])}function x(ne){return M;function M(H){return m=q(),X=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?re():ne.tokenize.call(F?Object.assign(Object.create(u),F):u,c,G,re)(H)}}function G(ne){return T(X,m),w}function re(ne){return m.restore(),++K<O.length?x(O[K]):L}}}function $(T,F){T.resolveAll&&!o.includes(T)&&o.push(T),T.resolve&&me(u.events,F,u.events.length-F,T.resolve(u.events.slice(F),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function q(){const T=g(),F=u.previous,Y=u.currentConstruct,D=u.events.length,w=Array.from(a);return{from:D,restore:L};function L(){r=T,u.previous=F,u.currentConstruct=Y,u.events.length=D,a=w,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Oa(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,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,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];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=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function $a(e){const r={constructs:Dr([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(;!Or(e););return e}const Hn=/[\0\t\n\r]/g;function Va(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const c=[];let u,f,h,d,p;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===65279&&h++,t=void 0);h<o.length;){if(Hn.lastIndex=h,u=Hn.exec(o),d=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(d),!u){n=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),n&&c.push(n),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,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Lr(t.slice(o?2:1),o?16:10)}return on(t)||e}const qr={}.hasOwnProperty;function Ya(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Qa(t)(Ha($a(t).document().write(Va()(e,n,!0))))}function Qa(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(wn),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(yn),blockQuote:o(ue),characterEscape:q,characterReference:q,codeFenced:o(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(be,l),codeText:o(Ei,l),codeTextData:q,data:q,codeFlowValue:q,definition:o(Pi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ai),hardBreakEscape:o(bn),hardBreakTrailing:o(bn),htmlFlow:o(kn,l),htmlFlowData:q,htmlText:o(kn,l),htmlTextData:q,image:o(Ti),label:l,link:o(wn),listItem:o(Ii),listItemValue:d,listOrdered:o(Cn,h),listUnordered:o(Cn),paragraph:o(Fi),reference:x,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(yn),strong:o(Ri),thematicBreak:o(Li)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:ee,autolinkProtocol:H,blockQuote:c(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ne,characterReference:M,codeFenced:c(v),codeFencedFence:b,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:k,codeIndented:c(y),codeText:c(w),codeTextData:k,data:k,definition:c(),definitionDestinationString:R,definitionLabelString:S,definitionTitleString:N,emphasis:c(),hardBreakEscape:c(F),hardBreakTrailing:c(F),htmlFlow:c(Y),htmlFlowData:k,htmlText:c(D),htmlTextData:k,image:c(O),label:X,labelText:K,lineEnding:T,link:c(L),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:G,resourceDestinationString:m,resourceTitleString:le,resource:se,setextHeading:c($),setextHeadingLineSequence:_,setextHeadingText:C,strong:c(),thematicBreak:c()}};Wr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(j){let P={type:"root",children:[]};const B={stack:[P],tokenStack:[],config:n,enter:a,exit:u,buffer:l,resume:f,data:t},W=[];let J=-1;for(;++J<j.length;)if(j[J][1].type==="listOrdered"||j[J][1].type==="listUnordered")if(j[J][0]==="enter")W.push(J);else{const xe=W.pop();J=i(j,xe,J)}for(J=-1;++J<j.length;){const xe=n[j[J][0]];qr.call(xe,j[J][1].type)&&xe[j[J][1].type].call(Object.assign({sliceSerialize:j[J][2].sliceSerialize},B),j[J][1])}if(B.tokenStack.length>0){const xe=B.tokenStack[B.tokenStack.length-1];(xe[1]||Vn).call(B,void 0,xe[0])}for(P.position={start:Se(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:Se(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<n.transforms.length;)P=n.transforms[J](P)||P;return P}function i(j,P,B){let W=P-1,J=-1,xe=!1,Pe,Ce,$e,He;for(;++W<=B;){const pe=j[W];switch(pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pe[0]==="enter"?J++:J--,He=void 0;break}case"lineEndingBlank":{pe[0]==="enter"&&(Pe&&!He&&!J&&!$e&&($e=W),He=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:He=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=j[Fe];if(ve[1].type==="lineEnding"||ve[1].type==="lineEndingBlank"){if(ve[0]==="exit")continue;Ce&&(j[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}$e&&(!Ce||$e<Ce)&&(Pe._spread=!0),Pe.end=Object.assign({},Ce?j[Ce][1].start:pe[1].end),j.splice(Ce||W,0,["exit",Pe,pe[2]]),W++,B++}if(pe[1].type==="listItemPrefix"){const Fe={type:"listItem",_spread:!1,start:Object.assign({},pe[1].start),end:void 0};Pe=Fe,j.splice(W,0,["enter",Fe,pe[2]]),W++,B++,$e=void 0,He=!0}}}return j[P][1]._spread=xe,B}function o(j,P){return B;function B(W){a.call(this,j(W),W),P&&P.call(this,W)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(j,P,B){this.stack[this.stack.length-1].children.push(j),this.stack.push(j),this.tokenStack.push([P,B||void 0]),j.position={start:Se(P.start),end:void 0}}function c(j){return P;function P(B){j&&j.call(this,B),u.call(this,B)}}function u(j,P){const B=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==j.type&&(P?P.call(this,j,W[0]):(W[1]||Vn).call(this,j,W[0]));else throw new Error("Cannot close `"+j.type+"` ("+Ye({start:j.start,end:j.end})+"): it’s not open");B.position.end=Se(j.end)}function f(){return ln(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(j){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(j),10),this.data.expectingFirstListItemValue=void 0}}function p(){const j=this.resume(),P=this.stack[this.stack.length-1];P.lang=j}function g(){const j=this.resume(),P=this.stack[this.stack.length-1];P.meta=j}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const j=this.resume(),P=this.stack[this.stack.length-1];P.value=j.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const j=this.resume(),P=this.stack[this.stack.length-1];P.value=j.replace(/(\r?\n|\r)$/g,"")}function S(j){const P=this.resume(),B=this.stack[this.stack.length-1];B.label=P,B.identifier=ye(this.sliceSerialize(j)).toLowerCase()}function N(){const j=this.resume(),P=this.stack[this.stack.length-1];P.title=j}function R(){const j=this.resume(),P=this.stack[this.stack.length-1];P.url=j}function A(j){const P=this.stack[this.stack.length-1];if(!P.depth){const B=this.sliceSerialize(j).length;P.depth=B}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function _(j){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(j).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function q(j){const B=this.stack[this.stack.length-1].children;let W=B[B.length-1];(!W||W.type!=="text")&&(W=Di(),W.position={start:Se(j.start),end:void 0},B.push(W)),this.stack.push(W)}function k(j){const P=this.stack.pop();P.value+=this.sliceSerialize(j),P.position.end=Se(j.end)}function T(j){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const B=P.children[P.children.length-1];B.position.end=Se(j.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(P.type)&&(q.call(this,j),k.call(this,j))}function F(){this.data.atHardBreak=!0}function Y(){const j=this.resume(),P=this.stack[this.stack.length-1];P.value=j}function D(){const j=this.resume(),P=this.stack[this.stack.length-1];P.value=j}function w(){const j=this.resume(),P=this.stack[this.stack.length-1];P.value=j}function L(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=P,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function O(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=P,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function K(j){const P=this.sliceSerialize(j),B=this.stack[this.stack.length-2];B.label=qa(P),B.identifier=ye(P).toLowerCase()}function X(){const j=this.stack[this.stack.length-1],P=this.resume(),B=this.stack[this.stack.length-1];if(this.data.inReference=!0,B.type==="link"){const W=j.children;B.children=W}else B.alt=P}function m(){const j=this.resume(),P=this.stack[this.stack.length-1];P.url=j}function le(){const j=this.resume(),P=this.stack[this.stack.length-1];P.title=j}function se(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function G(j){const P=this.resume(),B=this.stack[this.stack.length-1];B.label=P,B.identifier=ye(this.sliceSerialize(j)).toLowerCase(),this.data.referenceType="full"}function re(j){this.data.characterReferenceType=j.type}function ne(j){const P=this.sliceSerialize(j),B=this.data.characterReferenceType;let W;B?(W=Lr(P,B==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):W=on(P);const J=this.stack[this.stack.length-1];J.value+=W}function M(j){const P=this.stack.pop();P.position.end=Se(j.end)}function H(j){k.call(this,j);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(j)}function ee(j){k.call(this,j);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(j)}function ue(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Ei(){return{type:"inlineCode",value:""}}function Pi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ai(){return{type:"emphasis",children:[]}}function yn(){return{type:"heading",depth:0,children:[]}}function bn(){return{type:"break"}}function kn(){return{type:"html",value:""}}function Ti(){return{type:"image",title:null,url:"",alt:null}}function wn(){return{type:"link",title:null,url:"",children:[]}}function Cn(j){return{type:"list",ordered:j.type==="listOrdered",start:null,spread:j._spread,children:[]}}function Ii(j){return{type:"listItem",spread:j._spread,checked:null,children:[]}}function Fi(){return{type:"paragraph",children:[]}}function Ri(){return{type:"strong",children:[]}}function Di(){return{type:"text",value:""}}function Li(){return{type:"thematicBreak"}}}function Se(e){return{line:e.line,column:e.column,offset:e.offset}}function Wr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Wr(e,r):Xa(e,r)}}function Xa(e,n){let t;for(t in n)if(qr.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Vn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ye({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ye({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ye({start:n.start,end:n.end})+") is still open")}function Ka(e){const n=this;n.parser=t;function t(r){return Ya(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Ga(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Ja(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
45
|
+
`}]}function Za(e,n){const t=n.value?n.value+`
|
|
46
|
+
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function es(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ts(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ns(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Be(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:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function rs(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function is(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Yr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),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,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Yr(e,n);const i={src:Be(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function os(e,n){const t={src:Be(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function as(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function ss(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Yr(e,n);const i={href:Be(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function us(e,n){const t={href:Be(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function cs(e,n,t){const r=e.all(n),i=t?hs(t):Qr(n),o={},l=[];if(typeof n.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:n.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(n,u),e.applyData(n,u)}function hs(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=Qr(t[r])}return n}function Qr(e){const n=e.spread;return n??e.children.length>1}function fs(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.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")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function ps(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ds(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function ms(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function gs(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=en(n.children[1]),c=Er(n.children[n.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(n,o),e.applyData(n,o)}function xs(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let c=-1;const u=[];for(;++c<a;){const h=n.children[c],d={},p=l?l[c]:void 0;p&&(d.align=p);let g={type:"element",tagName:o,properties:d,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),u.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,f),e.applyData(n,f)}function ys(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Un=9,qn=32;function bs(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const o=[];for(;r;)o.push(Wn(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(Wn(n.slice(i),i>0,!1)),o.join("")}function Wn(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===Un||o===qn;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===Un||o===qn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ks(e,n){const t={type:"text",value:bs(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function ws(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}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:it,yaml:it,definition:it,footnoteDefinition:it};function it(){}const Xr=-1,gt=0,Xe=1,ht=2,sn=3,un=4,cn=5,hn=6,Kr=7,Gr=8,Yn=typeof self=="object"?self:globalThis,vs=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case gt:case Xr:return t(l,i);case Xe:{const a=t([],i);for(const c of l)a.push(r(c));return a}case ht:{const a=t({},i);for(const[c,u]of l)a[r(c)]=r(u);return a}case sn:return t(new Date(l),i);case un:{const{source:a,flags:c}=l;return t(new RegExp(a,c),i)}case cn:{const a=t(new Map,i);for(const[c,u]of l)a.set(r(c),r(u));return a}case hn:{const a=t(new Set,i);for(const c of l)a.add(r(c));return a}case Kr:{const{name:a,message:c}=l;return t(new Yn[a](c),i)}case Gr:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(new Yn[o](l),i)};return r},Qn=e=>vs(new Map,e)(0),De="",{toString:js}={},{keys:Ss}=Object,We=e=>{const n=typeof e;if(n!=="object"||!e)return[gt,n];const t=js.call(e).slice(8,-1);switch(t){case"Array":return[Xe,De];case"Object":return[ht,De];case"Date":return[sn,De];case"RegExp":return[un,De];case"Map":return[cn,De];case"Set":return[hn,De];case"DataView":return[Xe,t]}return t.includes("Array")?[Xe,t]:t.includes("Error")?[Kr,t]:[ht,t]},lt=([e,n])=>e===gt&&(n==="function"||n==="symbol"),Ns=(e,n,t,r)=>{const i=(l,a)=>{const c=r.push(l)-1;return t.set(a,c),c},o=l=>{if(t.has(l))return t.get(l);let[a,c]=We(l);switch(a){case gt:{let f=l;switch(c){case"bigint":a=Gr,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([Xr],l)}return i([a,f],l)}case Xe:{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 ht:{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(n&&"toJSON"in l)return o(l.toJSON());const f=[],h=i([a,f],l);for(const d of Ss(l))(e||!lt(We(l[d])))&&f.push([o(d),o(l[d])]);return h}case sn:return i([a,l.toISOString()],l);case un:{const{source:f,flags:h}=l;return i([a,{source:f,flags:h}],l)}case cn:{const f=[],h=i([a,f],l);for(const[d,p]of l)(e||!(lt(We(d))||lt(We(p))))&&f.push([o(d),o(p)]);return h}case hn:{const f=[],h=i([a,f],l);for(const d of l)(e||!lt(We(d)))&&f.push(o(d));return h}}const{message:u}=l;return i([a,{name:c,message:u}],l)};return o},Xn=(e,{json:n,lossy:t}={})=>{const r=[];return Ns(!(n||t),!!n,new Map,r)(e),r},ft=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Qn(Xn(e,n)):structuredClone(e):(e,n)=>Qn(Xn(e,n));function Es(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ps(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function As(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=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=Be(h.toLowerCase());let p=0;const g=[],b=e.footnoteCounts.get(h);for(;b!==void 0&&++p<=b;){g.length>0&&g.push({type:"text",value:" "});let S=typeof t=="string"?t:t(c,p);typeof S=="string"&&(S={type:"text",value:S}),g.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const v=f[f.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const S=v.children[v.children.length-1];S&&S.type==="text"?S.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else f.push(...g);const y={type:"element",tagName:"li",properties:{id:n+"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:{...ft(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 xt=(function(e){if(e==null)return Rs;if(typeof e=="function")return yt(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 n=[];let t=-1;for(;++t<e.length;)n[t]=xt(e[t]);return yt(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function Is(e){const n=e;return yt(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function Fs(e){return yt(n);function n(t){return t&&t.type===e}}function yt(e){return n;function n(t,r,i){return!!(Ds(t)&&e.call(this,t,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 Jr=[],Ls=!0,qt=!1,Ms="skip";function Zr(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=xt(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=Jr,g,b,v;if((!n||o(c,u,f[f.length-1]||void 0))&&(p=zs(t(c,f)),p[0]===qt))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==Ms)for(b=(r?y.children.length:-1)+l,v=f.concat(y);b>-1&&b<y.children.length;){const S=y.children[b];if(g=a(S,b,v)(),g[0]===qt)return g;b=typeof g[1]=="number"?g[1]:b+l}}return p}}}function zs(e){return Array.isArray(e)?e:typeof e=="number"?[Ls,e]:e==null?Jr:[e]}function fn(e,n,t,r){let i,o,l;typeof n=="function"&&typeof t!="function"?(o=void 0,l=n,i=t):(o=n,l=t,i=r),Zr(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 Wt={}.hasOwnProperty,_s={};function Os(e,n){const t=n||_s,r=new Map,i=new Map,o=new Map,l={...Cs,...t.handlers},a={all:u,applyData:$s,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:c,options:t,patch:Bs,wrap:Vs};return fn(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(Wt.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:b,...v}=f,y=ft(v);return y.children=a.all(f),y}return ft(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 g=a.one(d[p],f);if(g){if(p&&d[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Kn(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=Kn(b.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function Bs(e,n){e.position&&(n.position=El(e))}function $s(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&o&&Object.assign(t.properties,ft(o)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Hs(e,n){const t=n.data||{},r="value"in n&&!(Wt.call(t,"hProperties")||Wt.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Vs(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
51
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
52
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
53
|
+
`}),t}function Kn(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Gn(e,n){const t=Os(e,n),r=t.one(e,void 0),i=As(t),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,n){return e&&"run"in e?async function(t,r){const i=Gn(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Gn(t,{file:r,...e||n})}}function Jn(e){if(e)throw e}var St,Zn;function qs(){if(Zn)return St;Zn=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},o=function(u){if(!u||n.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){t&&f.name==="__proto__"?t(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 St=function c(){var u,f,h,d,p,g,b=arguments[0],v=1,y=arguments.length,S=!1;for(typeof b=="boolean"&&(S=b,b=arguments[1]||{},v=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});v<y;++v)if(u=arguments[v],u!=null)for(f in u)h=a(b,f),d=a(u,f),b!==d&&(S&&d&&(o(d)||(p=i(d)))?(p?(p=!1,g=h&&i(h)?h:[]):g=h&&o(h)?h:{},l(b,{name:f,newValue:c(S,g,d)})):typeof d<"u"&&l(b,{name:f,newValue:d}));return b},St}var Ws=qs();const Nt=gr(Ws);function Yt(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ys(){const e=[],n={run:t,use:r};return n;function t(...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),n}}function Qs(e,n){let t;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&&t)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){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const ke={basename:Xs,dirname:Ks,extname:Gs,join:Js,sep:"/"};function Xs(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');rt(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Ks(e){if(rt(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Gs(e){rt(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Js(...e){let n=-1,t;for(;++n<e.length;)rt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Zs(t)}function Zs(e){rt(e);const n=e.codePointAt(0)===47;let t=eu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function eu(e,n){let t="",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(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function rt(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 Qt(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(!Qt(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const Et=["history","path","basename","stem","extname","dirname"];class ei{constructor(n){let t;n?Qt(n)?t={path:n}:typeof n=="string"||lu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":tu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Et.length;){const o=Et[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Et.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ke.basename(this.path):void 0}set basename(n){At(n,"basename"),Pt(n,"basename"),this.path=ke.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ke.dirname(this.path):void 0}set dirname(n){er(this.basename,"dirname"),this.path=ke.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ke.extname(this.path):void 0}set extname(n){if(Pt(n,"extname"),er(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ke.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Qt(n)&&(n=ru(n)),At(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ke.basename(this.path,this.extname):void 0}set stem(n){At(n,"stem"),Pt(n,"stem"),this.path=ke.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new ae(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Pt(e,n){if(e&&e.includes(ke.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ke.sep+"`")}function At(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function er(e,n){if(!e)throw new Error("Setting `"+n+"` 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 pn 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 n=new pn;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Nt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Ft("data",this.frozen),this.namespace[n]=t,this):au.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Ft("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=ot(n),r=this.parser||this.Parser;return Tt("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Tt("process",this.parser||this.Parser),It("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=ot(n),c=r.parse(a);r.run(c,a,function(f,h,d){if(f||!h||!d)return u(f);const p=h,g=r.stringify(p,d);cu(g)?d.value=g:d.result=g,u(f,d)});function u(f,h){f||!h?l(f):o?o(h):t(void 0,h)}}}processSync(n){let t=!1,r;return this.freeze(),Tt("processSync",this.parser||this.Parser),It("processSync",this.compiler||this.Compiler),this.process(n,i),nr("processSync","process",t),r;function i(o,l){t=!0,Jn(o),r=l}}run(n,t,r){tr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const c=ot(t);i.run(n,c,u);function u(f,h,d){const p=h||n;f?a(f):l?l(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),nr("runSync","run",r),i;function o(l,a){Jn(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=ot(t),i=this.compiler||this.Compiler;return It("stringify",i),tr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Ft("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");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=Nt(!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,...g]=f;const b=r[d][1];Yt(b)&&Yt(p)&&(p=Nt(!0,b,p)),r[d]=[u,p,...g]}}}}const su=new pn().freeze();function Tt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function It(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ft(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function tr(e){if(!Yt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function nr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ot(e){return uu(e)?e:new ei(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",rr=[],ir={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 n=gu(e),t=xu(e);return yu(n.runSync(n.parse(t),t),e)}function gu(e){const n=e.rehypePlugins||rr,t=e.remarkPlugins||rr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ir}:ir;return su().use(Ka).use(t).use(Us,r).use(n)}function xu(e){const n=e.children||"",t=new ei;return typeof n=="string"&&(t.value=n),t}function yu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||bu;for(const f of du)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+fu+f.id,void 0);return fn(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 Ct)if(Object.hasOwn(Ct,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],b=Ct[p];(b===null||b.includes(f.tagName))&&(f.properties[p]=c(String(g||""),p,f))}}if(f.type==="element"){let p=t?!t.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 n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||pu.test(e.slice(0,n))?e:""}function lr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.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,n,t){const i=xt((t||{}).ignore||[]),o=Cu(n);let l=-1;for(;++l<o.length;)Zr(e,"text",a);function a(u,f){let h=-1,d;for(;++h<f.length;){const p=f[h],g=d?d.children:void 0;if(i(p,g?g.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 g=0;const v=h.children.indexOf(u);let y=!1,S=[];d.lastIndex=0;let N=d.exec(u.value);for(;N;){const R=N.index,A={index:N.index,input:N.input,stack:[...f,u]};let C=p(...N,A);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?d.lastIndex=R+1:(g!==R&&S.push({type:"text",value:u.value.slice(g,R)}),Array.isArray(C)?S.push(...C):C&&S.push(C),g=R+N[0].length,y=!0),!d.global)break;N=d.exec(u.value)}return y?(g<u.value.length&&S.push({type:"text",value:u.value.slice(g)}),h.children.splice(v,1,...S)):S=[u],v+S.length}}function Cu(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([vu(i[0]),ju(i[1])])}return n}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 Rt="phrasing",Dt=["autolink","link","image","label"];function Su(){return{transforms:[Fu],enter:{literalAutolink:Eu,literalAutolinkEmail:Lt,literalAutolinkHttp:Lt,literalAutolinkWww:Lt},exit:{literalAutolink:Iu,literalAutolinkEmail:Tu,literalAutolinkHttp:Pu,literalAutolinkWww:Au}}}function Nu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rt,notInConstruct:Dt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rt,notInConstruct:Dt},{character:":",before:"[ps]",after:"\\/",inConstruct:Rt,notInConstruct:Dt}]}}function Eu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lt(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 n=this.stack[this.stack.length-1];n.type,n.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,n,t,r,i){let o="";if(!ti(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!Lu(t)))return!1;const l=Mu(t+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Du(e,n,t,r){return!ti(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function Lu(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Mu(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=lr(e,"(");let o=lr(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function ti(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Te(t)||dt(t))&&(!n||t!==47)}ni.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 n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ye(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Hu(e){this.exit(e)}function Vu(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=ye(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Uu(e){this.exit(e)}function qu(){return"["}function ni(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.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 n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:ni},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(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((n?`
|
|
55
|
+
`:" ")+o.indentLines(o.containerFlow(r,a.current()),n?ri:Qu))),u(),c}}function Qu(e,n,t){return n===0?e:ri(e,n,t)}function ri(e,n,t){return(t?"":" ")+e}const Xu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ii.peek=ec;function Ku(){return{canContainEols:["delete"],enter:{strikethrough:Ju},exit:{strikethrough:Zu}}}function Gu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Xu}],handlers:{delete:ii}}}function Ju(e){this.enter({type:"delete",children:[]},e)}function Zu(e){this.exit(e)}function ii(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function ec(){return"~"}function tc(e){return e.length}function nc(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||tc,o=[],l=[],a=[],c=[];let u=0,f=-1;for(;++f<e.length;){const b=[],v=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const S=rc(e[f][y]);if(t.alignDelimiters!==!1){const N=i(S);v[y]=N,(c[y]===void 0||N>c[y])&&(c[y]=N)}b.push(S)}l[f]=b,a[f]=v}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)o[h]=or(r[h]);else{const b=or(r);for(;++h<u;)o[h]=b}h=-1;const d=[],p=[];for(;++h<u;){const b=o[h];let v="",y="";b===99?(v=":",y=":"):b===108?v=":":b===114&&(y=":");let S=t.alignDelimiters===!1?1:Math.max(1,c[h]-v.length-y.length);const N=v+"-".repeat(S)+y;t.alignDelimiters!==!1&&(S=v.length+S+y.length,S>c[h]&&(c[h]=S),p[h]=S),d[h]=N}l.splice(1,0,d),a.splice(1,0,p),f=-1;const g=[];for(;++f<l.length;){const b=l[f],v=a[f];h=-1;const y=[];for(;++h<u;){const S=b[h]||"";let N="",R="";if(t.alignDelimiters!==!1){const A=c[h]-(v[h]||0),C=o[h];C===114?N=" ".repeat(A):C===99?A%2?(N=" ".repeat(A/2+.5),R=" ".repeat(A/2-.5)):(N=" ".repeat(A/2),R=N):R=" ".repeat(A)}t.delimiterStart!==!1&&!h&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&S==="")&&(t.delimiterStart!==!1||h)&&y.push(" "),t.alignDelimiters!==!1&&y.push(N),y.push(S),t.alignDelimiters!==!1&&y.push(R),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||h!==u-1)&&y.push("|")}g.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
|
|
56
|
+
`)}function rc(e){return e==null?"":String(e)}function or(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function ic(e,n,t,r){const i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const l=t.indentLines(t.containerFlow(e,o.current()),lc);return i(),l}function lc(e,n,t){return">"+(t?"":" ")+e}function oc(e,n){return ar(e,n.inConstruct,!0)&&!ar(e,n.notInConstruct,!1)}function ar(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function sr(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
|
|
57
|
+
`&&oc(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
58
|
+
`}function ac(e,n){const t=String(e);let r=t.indexOf(n),i=r,o=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+n.length,r=t.indexOf(n,i);return l}function sc(e,n){return!!(n.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 n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function cc(e,n,t,r){const i=uc(t),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(sc(e,t)){const h=t.enter("codeIndented"),d=t.indentLines(o,hc);return h(),d}const a=t.createTracker(r),c=i.repeat(Math.max(ac(o,i)+1,3)),u=t.enter("codeFenced");let f=a.move(c);if(e.lang){const h=t.enter(`codeFencedLang${l}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=t.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(t.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,n,t){return(t?"":" ")+e}function dn(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function fc(e,n,t,r){const i=dn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const c=t.createTracker(r);let u=c.move("[");return u+=c.move(t.safe(t.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":`
|
|
62
|
+
`,...c.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(t.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),l(),u}function pc(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Ze(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pt(e,n,t){const r=_e(e),i=_e(n);return r===void 0?i===void 0?t==="_"?{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}}li.peek=dc;function li(e,n,t,r){const i=pc(t),o=t.enter("emphasis"),l=t.createTracker(r),a=l.move(i);let c=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=c.charCodeAt(0),f=pt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=Ze(u)+c.slice(1));const h=c.charCodeAt(c.length-1),d=pt(r.after.charCodeAt(0),h,i);d.inside&&(c=c.slice(0,-1)+Ze(h));const p=l.move(i);return o(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+p}function dc(e,n,t){return t.options.emphasis||"*"}function mc(e,n){let t=!1;return fn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,qt}),!!((!e.depth||e.depth<3)&&ln(e)&&(n.options.setext||t))}function gc(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(mc(e,t)){const f=t.enter("headingSetext"),h=t.enter("phrasing"),d=t.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=t.enter("headingAtx"),c=t.enter("phrasing");o.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
|
|
67
|
+
`,...o.current()});return/^[\t ]/.test(u)&&(u=Ze(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),c(),a(),u}oi.peek=xc;function oi(e){return e.value||""}function xc(){return"<"}ai.peek=yc;function ai(e,n,t,r){const i=dn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const c=t.createTracker(r);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(a=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=c.move(" "+i),u+=c.move(t.safe(e.title,{before:u,after:i,...c.current()})),u+=c.move(i),a()),u+=c.move(")"),l(),u}function yc(){return"!"}si.peek=bc;function si(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("![");const u=t.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return l(),t.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"!"}ui.peek=kc;function ui(e,n,t){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<t.unsafe.length;){const l=t.unsafe[o],a=t.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 ci(e,n){const t=ln(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}hi.peek=wc;function hi(e,n,t,r){const i=dn(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,c;if(ci(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let h=l.move("<");return h+=l.move(t.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),a(),t.stack=f,h}a=t.enter("link"),c=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(c=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),c()),u+=l.move(")"),a(),u}function wc(e,n,t){return ci(e,t)?"<":"["}fi.peek=Cc;function fi(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const h=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return l(),t.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 mn(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function vc(e){const n=mn(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function jc(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function pi(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Sc(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?jc(t):mn(t);const a=e.ordered?l==="."?")":".":vc(t);let c=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),pi(t)===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),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=o,i(),u}function Nc(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Ec(e,n,t,r){const i=Nc(t);let o=t.bulletCurrent||mn(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const c=t.enter("listItem"),u=t.indentLines(t.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,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),i(),l}const Ac=xt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tc(e,n,t,r){return(e.children.some(function(l){return Ac(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Ic(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}di.peek=Fc;function di(e,n,t,r){const i=Ic(t),o=t.enter("strong"),l=t.createTracker(r),a=l.move(i+i);let c=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=c.charCodeAt(0),f=pt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(c=Ze(u)+c.slice(1));const h=c.charCodeAt(c.length-1),d=pt(r.after.charCodeAt(0),h,i);d.inside&&(c=c.slice(0,-1)+Ze(h));const p=l.move(i+i);return o(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+p}function Fc(e,n,t){return t.options.strong||"*"}function Rc(e,n,t,r){return t.safe(e.value,r)}function Dc(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function Lc(e,n,t){const r=(pi(t)+(t.options.ruleSpaces?" ":"")).repeat(Dc(t));return t.options.ruleSpaces?r.slice(0,-1):r}const mi={blockquote:ic,break:sr,code:cc,definition:fc,emphasis:li,hardBreak:sr,heading:gc,html:oi,image:ai,imageReference:si,inlineCode:ui,link:hi,linkReference:fi,list:Sc,listItem:Ec,paragraph:Pc,root:Tc,strong:di,text:Rc,thematicBreak:Lc};function Mc(){return{enter:{table:zc,tableData:ur,tableHeader:ur,tableRow:Oc},exit:{codeText:Bc,table:_c,tableData:Mt,tableHeader:Mt,tableRow:Mt}}}function zc(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),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 Mt(e){this.exit(e)}function ur(e){this.enter({type:"tableCell",children:[]},e)}function Bc(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,$c));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function $c(e,n){return n==="|"?n:e}function Hc(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";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,g,b,v){return u(f(p,b,v),p.align)}function a(p,g,b,v){const y=h(p,b,v),S=u([y]);return S.slice(0,S.indexOf(`
|
|
69
|
+
`))}function c(p,g,b,v){const y=b.enter("tableCell"),S=b.enter("phrasing"),N=b.containerPhrasing(p,{...v,before:o,after:o});return S(),y(),N}function u(p,g){return nc(p,{align:g,alignDelimiters:r,padding:t,stringLength:i})}function f(p,g,b){const v=p.children;let y=-1;const S=[],N=g.enter("table");for(;++y<v.length;)S[y]=h(v[y],g,b);return N(),S}function h(p,g,b){const v=p.children;let y=-1;const S=[],N=g.enter("tableRow");for(;++y<v.length;)S[y]=c(v[y],p,g,b);return N(),S}function d(p,g,b){let v=mi.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function Vc(){return{exit:{taskListCheckValueChecked:cr,taskListCheckValueUnchecked:cr,paragraph:qc}}}function Uc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wc}}}function cr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function qc(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Wc(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let c=mi.listItem(e,n,t,{...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},gi={tokenize:nh,partial:!0},xi={tokenize:rh,partial:!0},yi={tokenize:ih,partial:!0},Kc={tokenize:lh,partial:!0},bi={name:"wwwAutolink",tokenize:Zc,previous:wi},ki={name:"protocolAutolink",tokenize:eh,previous:Ci},je={name:"emailAutolink",tokenize:Jc,previous:vi},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,ki];we[104]=[je,ki];we[87]=[je,bi];we[119]=[je,bi];function Jc(e,n,t){const r=this;let i,o;return l;function l(h){return!Xt(h)||!vi.call(r,r.previous)||gn(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(h))}function a(h){return Xt(h)?(e.consume(h),a):h===64?(e.consume(h),c):t(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"),n(h)):t(h)}}function Zc(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!wi.call(r,r.previous)||gn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Xc,e.attempt(gi,e.attempt(xi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function eh(e,n,t){const r=this;let i="",o=!1;return l;function l(h){return(h===72||h===104)&&Ci.call(r,r.previous)&&!gn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),a):t(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 t(h)}function c(h){return h===47?(e.consume(h),o?u:(o=!0,c)):t(h)}function u(h){return h===null||ct(h)||Z(h)||Te(h)||dt(h)?t(h):e.attempt(gi,e.attempt(xi,f),t)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function th(e,n,t){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):t(l)}function o(l){return l===null?t(l):n(l)}}function nh(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(yi,c,a)(u):u===null||Z(u)||Te(u)||u!==45&&dt(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?t(u):n(u)}}function rh(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?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(yi,n,o)(l):l===null||Z(l)||Te(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function ih(e,n,t){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)?n(a):t(a)}function i(a){return a===null||a===40||a===91||Z(a)||Te(a)?n(a):r(a)}function o(a){return ce(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):ce(a)?(e.consume(a),l):t(a)}}function lh(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return oe(o)?t(o):n(o)}}function wi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Z(e)}function Ci(e){return!ce(e)}function vi(e){return!(e===47||Xt(e))}function Xt(e){return e===43||e===45||e===46||e===95||oe(e)}function gn(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}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,n,t){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 t(c);const u=ye(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function uh(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+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[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function ch(e,n,t){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?t(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 t(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"),n):t(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,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||Z(g))return t(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=ye(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Z(g)||(a=!0),l++,e.consume(g),g===92?h:f}function h(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function d(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),Q(e,p,"gfmFootnoteDefinitionWhitespace")):t(g)}function p(g){return n(g)}}function fh(e,n,t){return e.check(nt,n,e.attempt(oh,n,t))}function ph(e){e.exit("gfmFootnoteDefinition")}function dh(e,n,t){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?n(o):t(o)}}function mh(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!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,mt(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(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?c(g):(l.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=_e(u);if(g===126)return h>1?c(g):(l.consume(g),h++,p);if(h<2&&!t)return c(g);const v=l.exit("strikethroughSequenceTemporary"),y=_e(g);return v._open=!y||y===2&&!!b,v._close=!b||b===2&&!!y,a(g)}}}class gh{constructor(){this.map=[]}add(n,t,r){xh(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0}}function xh(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function yh(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-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"&&(t=!0);n+=1}return r}function bh(){return{flow:{null:{name:"table",tokenize:kh,resolveAll:wh}}}}function kh(e,n,t){const r=this;let i=0,o=0,l;return a;function a(k){let T=r.events.length-1;for(;T>-1;){const D=r.events[T][1].type;if(D==="lineEnding"||D==="linePrefix")T--;else break}const F=T>-1?r.events[T][1].type:null,Y=F==="tableHead"||F==="tableRow"?C:c;return Y===C&&r.parser.lazy[r.now().line]?t(k):Y(k)}function c(k){return e.enter("tableHead"),e.enter("tableRow"),u(k)}function u(k){return k===124||(l=!0,o+=1),f(k)}function f(k){return k===null?t(k):z(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):t(k):U(k)?Q(e,f,"whitespace")(k):(o+=1,l&&(l=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),h(k)))}function h(k){return k===null||k===124||Z(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?d:h)}function d(k){return k===92||k===124?(e.consume(k),h):h(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(k):(e.enter("tableDelimiterRow"),l=!1,U(k)?Q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):g(k))}function g(k){return k===45||k===58?v(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),b):A(k)}function b(k){return U(k)?Q(e,v,"whitespace")(k):v(k)}function v(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(o+=1,y(k)):k===null||z(k)?R(k):A(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),S(k)):A(k)}function S(k){return k===45?(e.consume(k),S):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(k))}function N(k){return U(k)?Q(e,R,"whitespace")(k):R(k)}function R(k){return k===124?g(k):k===null||z(k)?!l||i!==o?A(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(k)):A(k)}function A(k){return t(k)}function C(k){return e.enter("tableRow"),_(k)}function _(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),_):k===null||z(k)?(e.exit("tableRow"),n(k)):U(k)?Q(e,_,"whitespace")(k):(e.enter("data"),$(k))}function $(k){return k===null||k===124||Z(k)?(e.exit("data"),_(k)):(e.consume(k),k===92?q:$)}function q(k){return k===92||k===124?(e.consume(k),$):$(k)}}function wh(e,n){let t=-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(;++t<e.length;){const p=e[t],g=p[1];p[0]==="enter"?g.type==="tableHead"?(a=!1,c!==0&&(hr(d,n,c,u,f),f=void 0,c=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(t,0,[["enter",u,n]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(t,0,[["enter",f,n]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],h=at(d,n,o,i,void 0,h),o=[0,0,0,0]),l[2]=t)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],h=at(d,n,o,i,void 0,h)),o=l,l=[o[1],t,0,0])):g.type==="tableHead"?(a=!0,c=t):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=t,o[1]!==0?(l[0]=l[1],h=at(d,n,o,i,t,h)):l[1]!==0&&(h=at(d,n,l,i,t,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=t)}for(c!==0&&hr(d,n,c,u,f),d.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=yh(n.events,t))}return e}function at(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Le(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const c=Le(n.events,t[1]);if(o={type:l,start:Object.assign({},c),end:Object.assign({},c)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const u=Le(n.events,t[2]),f=Le(n.events,t[3]),h={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",h,n]]),r!==2){const d=n.events[t[2]],p=n.events[t[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",t[3]>t[2]+1){const g=t[2]+1,b=t[3]-t[2]-1;e.add(g,b,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return i!==void 0&&(o.end=Object.assign({},Le(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function hr(e,n,t,r,i){const o=[],l=Le(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function Le(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Ch={name:"tasklistCheck",tokenize:jh};function vh(){return{text:{91:Ch}}}function jh(e,n,t){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(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):t(c)}function l(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(c)}function a(c){return z(c)?n(c):U(c)?e.check({tokenize:Sh},n,t)(c):t(c)}}function Sh(e,n,t){return Q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function Nh(e){return Dr([Gc(),ah(),mh(e),bh(),vh()])}const Eh={};function Ph(e){const n=this,t=e||Eh,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Nh(t)),o.push(Yc()),l.push(Qc(t))}function ji({content:e,className:n}){const t=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:t})}function Si(e){const n={name:"root",path:"",memories:[],children:new Map};for(const t of e){const r=t.filePath.split("/");r.pop();let i=n,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?n.memories.push(t):i.memories.push(t)}return n}function Ni(e){let n=e.memories.length;for(const t of e.children.values())n+=Ni(t);return n}function bt(e,n){var r;const t=e.match(/^#+ (.+)$/m);return t?t[1]:((r=n.split("/").pop())==null?void 0:r.replace(".md",""))||n}function Ke(e){return Math.round(e/3.5)}function xn(e){const n=new Date(e),t=new Date;if(n.toDateString()===t.toDateString()){const c=t.getTime()-n.getTime(),u=Math.floor(c/(1e3*60*60));return u<1?"Just now":u===1?"1h ago":`${u}h ago`}const i=n.toLocaleDateString("en-US",{month:"short"}),o=n.getDate(),l=n.getFullYear(),a=t.getFullYear();return l===a?`${i} ${o}`:`${i} ${o}, ${l}`}function Ah({rule:e,onEdit:n,onDelete:t,onView:r,isReviewed:i,onToggleReviewed:o,changeType:l,isUncommitted:a,changeDate:c,diff:u,isFadingOut:f,showLeftBorder:h}){const[d,p]=I.useState(!1),[g,b]=I.useState(!1),v=I.useMemo(()=>bt(e.body,e.filePath),[e.body,e.filePath]),y=Ke(e.body.length),S=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"}`,R={...f&&{opacity:0,maxHeight:0,paddingTop:0,paddingBottom:0,marginBottom:0,borderWidth:0,transitionDuration:"600ms"}};return s.jsxs("div",{className:N,style:R,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:S})})}),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:v}),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((A,C)=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded font-mono",children:A},C)),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:xn(c)}),o&&s.jsx("button",{onClick:A=>{A.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:A=>{A.stopPropagation(),b(!g)},className:`flex items-center gap-1 px-2 py-1 text-sm rounded cursor-pointer ${g?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(xr,{className:"w-3 h-3"}),g?"Hide Diff":"Show Diff"]})}),l!=="deleted"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:A=>{A.stopPropagation(),n(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:A=>{A.stopPropagation(),t(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"]})]})]}),g&&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((A,C)=>{let _="";return A.startsWith("+")&&!A.startsWith("+++")?_="text-green-400":A.startsWith("-")&&!A.startsWith("---")?_="text-red-400":A.startsWith("@@")&&(_="text-cyan-400"),s.jsx("div",{className:_,children:A},C)})}),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(Hi,{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((A,C)=>s.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded font-mono text-xs",children:A},C))})]}),!g&&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(ji,{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:n,onCancel:t}){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=!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:t,className:"text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{className:"w-5 h-5"})})]}),u&&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(xr,{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.jsx("code",{className:"block bg-white px-3 py-2 rounded border border-[#bae6fd] font-mono text-sm text-[#0c4a6e]",children:"/codeyam-new-rule"})]})]})}),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||!u)&&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:f=>i(f.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(Ge,{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(Ge,{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:f=>l(f.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:t,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:()=>n(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:n,onSelectPath:t,expandedFolders:r,onToggleFolder:i}){const o=I.useMemo(()=>Si(e),[e]),l=(u,f,h)=>{if(u.target.closest(".chevron-toggle")){h&&i(f||"root");return}const p=f||null;t(n===p?null:p),h&&!r.has(f||"root")&&i(f||"root")},a=u=>{t(n===u?null:u)},c=(u,f=0)=>{const h=r.has(u.path||"root"),d=Ni(u),p=u.children.size>0,g=u.name==="root"?"(root)":u.name,b=u.memories.length>0||p,v=u.path||"",y=n===v||n===null&&v==="";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:S=>l(S,u.path,b),children:[b&&s.jsx("span",{className:"chevron-toggle p-0.5 -m-0.5 hover:bg-gray-200 rounded",onClick:S=>{S.stopPropagation(),i(u.path||"root")},children:s.jsx(Kt,{className:`w-3 h-3 text-gray-500 transition-transform ${h?"rotate-90":""}`})}),!b&&s.jsx("div",{className:"w-3"}),s.jsx(br,{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:g}),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(S=>{var R;const N=n===S.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(S.filePath),children:s.jsx("span",{className:"text-xs",children:(R=S.filePath.split("/").pop())==null?void 0:R.replace(".md","")})},S.filePath)})}),p&&s.jsx("div",{children:Array.from(u.children.values()).sort((S,N)=>S.name.localeCompare(N.name)).map(S=>c(S,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:n,onDelete:t,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(()=>Si(e),[e]),p=(b,v,y)=>{f(S=>({...S,[b]:!y})),y?a(b):l(b,v)},g=(b,v=0)=>{const y=r.has(b.path||"root"),S=b.children.size>0,N=b.name==="root"?"root":b.name,R=b.memories.length>0||S;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:()=>R&&i(b.path||"root"),children:[R&&s.jsx(Kt,{className:`w-4 h-4 text-gray-500 transition-transform ${y?"rotate-90":""}`}),!R&&s.jsx("div",{className:"w-4"}),s.jsx(br,{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:[(b.memories.length>0||S)&&s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-gray-300",style:{left:"-24px"}}),b.memories.length>0&&s.jsx("div",{className:"space-y-2",children:b.memories.map(A=>s.jsx(Ah,{rule:A,onEdit:n,onDelete:t,onView:c,isReviewed:h[A.filePath]??!1,onToggleReviewed:p},A.filePath))}),S&&s.jsx("div",{className:"space-y-4",children:Array.from(b.children.values()).sort((A,C)=>A.name.localeCompare(C.name)).map(A=>g(A,v+1))})]})]},b.path||"root")};return s.jsx("div",{children:g(d)})}function Dh({memories:e,reviewedStatus:n,onViewRule:t}){const[r,i]=I.useState("unreviewed"),[o,l]=I.useState(new Map),a=I.useRef(n),c=I.useRef([]);I.useEffect(()=>()=>{c.current.forEach(clearTimeout)},[]),I.useEffect(()=>{const d=a.current,p=[];for(const[g,b]of Object.entries(n))b&&!d[g]&&p.push(g);a.current=n,p.length!==0&&(l(g=>{const b=new Map(g);return p.forEach(v=>b.set(v,"approved")),b}),c.current.push(setTimeout(()=>{l(g=>{const b=new Map(g);return p.forEach(v=>b.set(v,"fading")),b})},1500)),c.current.push(setTimeout(()=>{l(g=>{const b=new Map(g);return p.forEach(v=>b.delete(v)),b})},2500)))},[n]);const u=I.useMemo(()=>[...e].sort((d,p)=>new Date(p.lastModified).getTime()-new Date(d.lastModified).getTime()),[e]),f=I.useMemo(()=>u.filter(d=>!n[d.filePath]).length,[u,n]),h=I.useMemo(()=>r==="unreviewed"?u.filter(d=>!n[d.filePath]||o.has(d.filePath)):u,[u,r,n,o]);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:()=>i("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:r==="unreviewed"?"#005C75":"#d1d5db"}}),s.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:r==="unreviewed"?600:400,color:r==="unreviewed"?"#005C75":"#626262"},children:["Unreviewed Rules (",f,")"]})]}),s.jsxs("button",{onClick:()=>i("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:r==="all"?"#005C75":"#d1d5db"}}),s.jsxs("span",{className:"text-[12px] leading-5",style:{fontFamily:"Sora",fontWeight:r==="all"?600:400,color:r==="all"?"#005C75":"#626262"},children:["All (",u.length,")"]})]})]}),s.jsxs("div",{className:"grid grid-cols-[1fr_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.jsx("span",{className:"text-[11px] uppercase tracking-wider text-gray-400 font-medium text-center",children:"Changed At"}),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(_t,{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",children:h.slice(0,8).map(d=>{const p=n[d.filePath]??!1,g=o.get(d.filePath),b=bt(d.body,d.filePath);return s.jsx("div",{className:`border-b border-gray-50 transition-all ${g==="fading"?"duration-1000":"duration-300"}`,style:{opacity:g==="fading"?0:1},children:s.jsxs("div",{className:`grid grid-cols-[1fr_80px_100px] px-5 py-2.5 items-center cursor-pointer transition-colors duration-300 ${g==="approved"?"bg-[#f0fdf4]":"hover:bg-gray-50"}`,onClick:()=>t(d),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:b})}),s.jsx("span",{className:"text-xs text-gray-500 text-center",children:xn(d.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"})})})})]})},d.filePath)})}),h.length===0&&r==="unreviewed"&&s.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:"All rules have been reviewed"}),h.length>0&&h.length<6&&s.jsx("div",{className:"h-[60px] flex-shrink-0",style:{backgroundColor:"#F0F0F0"}})]})}function Lh(e,n){const t=n.map(r=>`- \`${r}\``).join(`
|
|
79
|
+
`);return`Please audit the following Claude Rules that apply to the file \`${e}\`:
|
|
80
|
+
|
|
81
|
+
${t}
|
|
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:n,onClose:t}){const[r,i]=I.useState(!1),o=Lh(e,n),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:t,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:t,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 cursor-pointer",children:s.jsx(et,{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(ze,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(Ge,{className:"w-4 h-4"}),"Copy Prompt"]})})})]})})}function zh({refreshKey:e,reviewedStatus:n,memories:t,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),[g,b]=I.useState(null),[v,y]=I.useState(null),S=I.useRef(null),N=I.useRef(null),[R,A]=I.useState({topPaths:[],totalFilesWithCoverage:0,allSourceFiles:[]}),[C,_]=I.useState(!0);I.useEffect(()=>{(async()=>{_(!0);try{const O=await(await fetch("/api/memory?action=audit")).json();A({topPaths:O.topPaths||[],totalFilesWithCoverage:O.totalFilesWithCoverage||0,allSourceFiles:O.allSourceFiles||[]})}catch(L){console.error("Failed to load audit data:",L)}finally{_(!1)}})()},[e]);const $=I.useMemo(()=>i==="all"?R.topPaths:R.topPaths.filter(w=>w.matchingRules.some(L=>!n[L.filePath])),[R.topPaths,i,n]);I.useMemo(()=>R.topPaths.filter(w=>w.matchingRules.some(L=>!n[L.filePath])).length,[R.topPaths,n]);const q=w=>w.split("/").pop()||w,k=I.useMemo(()=>{const w=new Map;for(const L of R.topPaths)w.set(L.filePath,L);return w},[R.topPaths]),T=I.useMemo(()=>{if(!c.trim())return[];const w=c.toLowerCase(),L=[],O=[];for(const K of R.allSourceFiles){const X=K.toLowerCase();if(!X.includes(w))continue;const m=k.get(K)||{filePath:K,matchingRules:[],totalTextLength:0};X.startsWith(w)?L.push(m):O.push(m)}return L.sort((K,X)=>K.filePath.localeCompare(X.filePath)),O.sort((K,X)=>K.filePath.localeCompare(X.filePath)),[...L,...O].slice(0,8)},[c,R.allSourceFiles,k]),F=I.useCallback(w=>{var L;b(w),a(w.filePath),u(w.filePath),p(!1),(L=S.current)==null||L.blur()},[]),Y=I.useCallback(()=>{var w;u(""),b(null),a(null),(w=S.current)==null||w.focus()},[]),D=I.useCallback(w=>{var L;!d||T.length===0||(w.key==="ArrowDown"?(w.preventDefault(),h(O=>Math.min(O+1,T.length-1))):w.key==="ArrowUp"?(w.preventDefault(),h(O=>Math.max(O-1,0))):w.key==="Enter"?(w.preventDefault(),F(T[f])):w.key==="Escape"&&(p(!1),(L=S.current)==null||L.blur()))},[d,T,f,F]);return I.useEffect(()=>{h(0)},[T]),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(yr,{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:S,type:"text",value:c,onChange:w=>{u(w.target.value),p(!0)},onFocus:()=>{c.trim()&&p(!0)},onBlur:()=>{setTimeout(()=>p(!1),200)},onKeyDown:D,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:w=>{w.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&&T.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:T.map((w,L)=>s.jsxs("div",{onMouseDown:O=>{O.preventDefault(),F(w)},onMouseEnter:()=>h(L),className:`flex items-center gap-2 px-3 py-2 cursor-pointer text-sm ${L===f?"bg-[#f0f9ff]":"hover:bg-gray-50"}`,children:[s.jsx(zt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-gray-700 truncate",title:w.filePath,children:(()=>{const O=w.filePath.toLowerCase().indexOf(c.toLowerCase());if(O===-1)return w.filePath;const K=w.filePath.slice(0,O),X=w.filePath.slice(O,O+c.length),m=w.filePath.slice(O+c.length);return s.jsxs(s.Fragment,{children:[K,s.jsx("span",{className:"font-semibold text-[#005C75]",children:X}),m]})})()}),s.jsxs("span",{className:"text-xs text-gray-400 ml-auto flex-shrink-0",children:[w.matchingRules.length," rule",w.matchingRules.length!==1?"s":""]})]},w.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(_t,{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(_t,{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"})]})]})]}),C&&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"})]})}),!C&&($.length>0||g)&&s.jsx("div",{className:"max-h-[400px] overflow-y-auto",children:(g?[g,...$.filter(L=>L.filePath!==g.filePath)].slice(0,8):$.slice(0,8)).map((w,L)=>{const O=w.matchingRules.length,K=w.matchingRules.filter(G=>!n[G.filePath]),X=K.length,m=K.reduce((G,re)=>G+re.bodyLength,0),le=X>0,se=l===w.filePath,x=(g==null?void 0:g.filePath)===w.filePath;return s.jsxs("div",{children:[s.jsxs("div",{onClick:()=>a(se?null:w.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(Ui,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}):s.jsx(Kt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx(zt,{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0"}),s.jsx("span",{className:"text-sm text-gray-900 truncate",title:w.filePath,children:x?w.filePath:q(w.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:O})]}),s.jsxs("span",{className:"text-sm text-center",children:[s.jsx("span",{className:le?"font-semibold text-[#1A5276]":"text-gray-400",children:Ke(m).toLocaleString()}),s.jsx("span",{className:"text-gray-300",children:" / "}),s.jsx("span",{className:"text-gray-500",children:Ke(w.totalTextLength).toLocaleString()})]})]}),se&&s.jsxs("div",{className:"bg-gray-50 border-b border-gray-100",children:[w.matchingRules.map(G=>{const re=t.find(M=>M.filePath===G.filePath),ne=n[G.filePath]??!1;return s.jsxs("div",{onClick:M=>{M.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?bt(re.body,re.filePath):G.filePath}),s.jsxs("span",{className:"text-xs text-gray-400 flex-shrink-0",children:[Ke(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:w.filePath,rulePaths:w.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"})]})]})]},w.filePath)})}),!C&&$.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"}),v&&s.jsx(Mh,{filePath:v.filePath,rulePaths:v.rulePaths,onClose:()=>y(null)})]})}function _h({rule:e,changeInfo:n,isReviewed:t,onApprove:r,onEdit:i,onDelete:o,onClose:l}){const a=bt(e.body,e.filePath),c=Ke(e.body.length),u=e.frontmatter.category,f=`.claude/rules/${e.filePath}`,[h,d]=I.useState(!1);return I.useEffect(()=>{const p=g=>{g.key==="Escape"&&l()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[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:p=>p.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}),n&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:xn(n.date)}),s.jsx("span",{className:`flex-shrink-0 text-[11px] uppercase font-semibold tracking-wider ${n.changeType==="added"?"text-green-600":n.changeType==="modified"?"text-orange-600":"text-red-600"}`,children:n.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("button",{onClick:()=>{navigator.clipboard.writeText(f),d(!0),setTimeout(()=>d(!1),2e3)},className:"p-0.5 rounded text-gray-400 hover:text-gray-600 cursor-pointer transition-colors",title:"Copy file path",children:h?s.jsx(ze,{className:"w-3 h-3 text-green-500"}):s.jsx(Ge,{className:"w-3 h-3"})})]}),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 ${t?"bg-green-600 text-white":"border border-green-600 text-green-700 hover:bg-green-50"}`,children:[s.jsx(ze,{className:"w-3.5 h-3.5"}),t?"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(et,{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((p,g)=>{const b=p.split("/"),v=b.pop()||p,y=b.length>0?b.join("/")+"/":"";return s.jsxs("div",{className:"flex items-center gap-2 text-[13px] font-mono",children:[s.jsx(zt,{className:"w-4 h-4 text-[#005C75] flex-shrink-0"}),s.jsxs("span",{children:[y&&s.jsx("span",{className:"text-gray-500",children:y}),s.jsx("span",{className:"font-bold text-gray-900",children:v})]})]},g)})})]}),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(ji,{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(fr,{value:"/codeyam-memory"})]}),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.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Confirm or refine the confusion patterns Claude discovers in your git history"})]}),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:"4"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[14px] font-medium text-gray-900 pt-0.5",children:"Review generated rules here, in the dashboard"}),s.jsx("p",{className:"text-[13px] text-gray-600 mt-1",children:"Come back to this page to 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(fr,{value:"/codeyam-memory"}),s.jsx("span",{className:"text-white text-[15px] font-medium",children:"in your terminal to get started"})]})]})})}function fr({value:e}){const[n,t]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!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,n?s.jsx(ze,{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 st({label:e,count:n,icon:t,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:t}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-[32px] font-semibold leading-none mb-1",style:{color:o},children:n}),s.jsx("div",{className:"text-[11px] uppercase tracking-wider font-medium",style:{color:o},children:e})]})]})})}function Hh({searchFilter:e,onSearchChange:n,onCreateNew:t,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(yr,{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=>n(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:t,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(Gt,{className:"w-4 h-4"}),"New Rule"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(st,{label:"Total Rules",count:i.total,icon:s.jsx(Bh,{}),bgColor:"#EDF1F3",iconBgColor:"#E0E9EC",textColor:"#005C75"}),s.jsx(st,{label:"Unreviewed",count:i.unreviewed,icon:s.jsx(Yi,{className:"w-5 h-5 text-[#1A5276]"}),bgColor:"#E9F0FB",iconBgColor:"#DBE9FF",textColor:"#1A5276"}),s.jsx(st,{label:"Reviewed",count:i.reviewed,icon:s.jsx(ze,{className:"w-5 h-5 text-[#1B7A4A]"}),bgColor:"#EAFBEF",iconBgColor:"#D4EDDB",textColor:"#1B7A4A"}),s.jsx(st,{label:"Stale",count:i.stale,icon:s.jsx(Vi,{className:"w-5 h-5 text-[#5B21B6]"}),bgColor:"#EDE9FB",iconBgColor:"#DDD6FE",textColor:"#5B21B6"})]})]})}function Vh({onClose:e,onCreateNew:n}){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: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(et,{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:n,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(Gt,{className:"w-4 h-4"}),"New Rule"]})})]})})}function Uh({rule:e,onConfirm:n,onCancel:t}){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:t,className:"px-4 py-2 text-gray-600 hover:bg-gray-100 rounded-md cursor-pointer",children:"Cancel"}),s.jsx("button",{onClick:()=>n(e),className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 cursor-pointer",children:"Delete"})]})]})})}const pr="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 and 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 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!",dr="Can you mark all of these rules as reviewed in `.claude/codeyam-rule-state.json`?";function mr({text:e}){const[n,t]=I.useState(!1),r=()=>{navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!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:n?s.jsxs(s.Fragment,{children:[s.jsx(ze,{className:"w-4 h-4"}),"Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsx(Ge,{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: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(et,{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:pr,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(mr,{text:pr})}),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:dr,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(mr,{text:dr})})]})]})})}function Wh(){const[e,n]=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:()=>n(!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:()=>n(!1)})]})}const rf=()=>[{title:"Memory - CodeYam"},{name:"description",content:"Manage Claude Memory documentation"}],lf=Mi(function(){const{memories:n,reviewedStatus:t,memoryInitialized:r,error:i}=zi(),o=_i(),l=Oi(),[a,c]=I.useState(""),[u,f]=I.useState(null),[h,d]=I.useState(new Set(["root"])),[p,g]=I.useState(null),[b,v]=I.useState(!1),[y,S]=I.useState(null),[N,R]=I.useState(0),[A,C]=I.useState(!1),[_,$]=I.useState(null),[q,k]=I.useState(null),[T,F]=I.useState({}),Y=M=>{d(H=>{const ee=new Set(H);return ee.has(M)?ee.delete(M):ee.add(M),ee})};$i({source:"memory-page"});const D=I.useMemo(()=>({...t,...T}),[t,T]),w=I.useRef(o.state);I.useEffect(()=>{const M=w.current==="loading"||w.current==="submitting",H=o.state==="idle";M&&H&&o.data&&(l.revalidate(),g(null),v(!1),R(ee=>ee+1)),w.current=o.state},[o.state,o.data,l]),I.useEffect(()=>{F(M=>{const H={};for(const[ee,ue]of Object.entries(M))t[ee]!==ue&&(H[ee]=ue);return Object.keys(H).length===Object.keys(M).length?M:H})},[t]);const L=(M,H)=>{F(ee=>({...ee,[M]:!0})),o.submit({action:"mark-reviewed",filePath:M,lastModified:H},{method:"POST",action:"/api/memory",encType:"application/json"})},O=M=>{F(H=>({...H,[M]:!1})),o.submit({action:"mark-unreviewed",filePath:M},{method:"POST",action:"/api/memory",encType:"application/json"})},K=(M,H)=>{$(M),k(H??null)},X=I.useMemo(()=>{let M=n;if(a.trim()){const H=a.toLowerCase();M=M.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 M},[n,a]),m=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=(M,H)=>{const ee=p?"update":"create";o.submit({action:ee,filePath:M,content:H},{method:"POST",action:"/api/memory",encType:"application/json"})},se=M=>{o.submit({action:"delete",filePath:M.filePath},{method:"POST",action:"/api/memory",encType:"application/json"}),S(null)},x=I.useMemo(()=>{const M=n.filter(H=>D[H.filePath]).length;return{total:n.length,reviewed:M,unreviewed:n.length-M,stale:0}},[n,D]),G=I.useMemo(()=>{const M=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,M.add(ue)}return M},[X]),re=G.size===h.size&&[...G].every(M=>h.has(M)),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:()=>v(!0),onLearnMore:()=>C(!0),reviewCounts:x}),(b||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:()=>{v(!1),g(null)},children:s.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-auto",onClick:M=>M.stopPropagation(),children:s.jsx(Ih,{rule:p,onSave:le,onCancel:()=>{v(!1),g(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:D,onViewRule:K}),s.jsx(zh,{onEditRule:g,onDeleteRule:S,refreshKey:N,reviewedStatus:D,onMarkReviewed:L,onMarkUnreviewed:O,memories:n,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:n.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:()=>v(!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(Gt,{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:m,onEdit:g,onDelete:S,expandedFolders:h,onToggleFolder:Y,reviewedStatus:D,onMarkReviewed:L,onMarkUnreviewed:O,onViewRule:K})]})})]}),s.jsx("div",{className:"mt-8 mb-8",children:s.jsx(Bi,{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"})]})]})})}),_&&!p&&(()=>{const M=n.find(H=>H.filePath===_.filePath)??_;return s.jsx(_h,{rule:M,changeInfo:q??void 0,isReviewed:D[M.filePath]??!1,onApprove:()=>{D[M.filePath]??!1?O(M.filePath):L(M.filePath,M.lastModified),$(null)},onEdit:()=>{g(M)},onDelete:()=>{S(M),$(null)},onClose:()=>$(null)})})(),A&&s.jsx(Vh,{onClose:()=>C(!1),onCreateNew:()=>{C(!1),v(!0)}}),y&&s.jsx(Uh,{rule:y,onConfirm:se,onCancel:()=>S(null)})]})}):s.jsx($h,{})});export{lf as default,rf as meta};
|