@codeyam/codeyam-cli 0.1.0-staging.596f0eb → 0.1.0-staging.76566f9
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 +7 -7
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +2 -1
- package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +2 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +22 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.ts +23 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +401 -106
- package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +60 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +734 -45
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +2 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +715 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +233 -75
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +19 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +34 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +23 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +34 -1
- package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +236 -24
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +18 -1
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +41 -0
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +37 -4
- package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +5 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +213 -12
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +36 -25
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +114 -11
- 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/promptGenerators/gatherAttributesMap.ts +7 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +42 -2
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +38 -2
- package/analyzer-template/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.ts +28 -2
- package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +5 -0
- package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +8 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +127 -43
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +158 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +405 -45
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.ts +1 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +260 -133
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +10 -5
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +77 -83
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +2 -5
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +196 -86
- 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/package.json +1 -1
- package/analyzer-template/packages/aws/s3/index.ts +1 -0
- package/analyzer-template/packages/aws/src/lib/s3/checkS3ObjectExists.ts +47 -0
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +4 -4
- package/analyzer-template/packages/database/src/lib/kysely/tableRelations.ts +2 -2
- package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +20 -9
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +9 -4
- package/analyzer-template/packages/generate/src/lib/deepMerge.ts +26 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -2
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +2 -2
- 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 +8 -1
- 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/debugReportsTable.d.ts +14 -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/scenariosTable.d.ts +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +8 -4
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- 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/types/index.d.ts +4 -3
- package/analyzer-template/packages/github/dist/types/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/index.js +1 -0
- package/analyzer-template/packages/github/dist/types/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts +31 -1
- package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +51 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.js +21 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +48 -0
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.js +25 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
- package/analyzer-template/packages/types/index.ts +8 -0
- package/analyzer-template/packages/types/src/types/Analysis.ts +32 -1
- package/analyzer-template/packages/types/src/types/Scenario.ts +75 -6
- package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +49 -0
- package/analyzer-template/packages/ui-components/src/components/ScenarioDetailInteractiveView.tsx +23 -7
- package/analyzer-template/packages/utils/dist/types/index.d.ts +4 -3
- package/analyzer-template/packages/utils/dist/types/index.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/index.js +1 -0
- package/analyzer-template/packages/utils/dist/types/index.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts +31 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +51 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.js +21 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +48 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.js +25 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/lightweightEntityExtractor.ts +27 -0
- package/analyzer-template/playwright/takeElementScreenshot.ts +26 -11
- package/analyzer-template/playwright/takeScreenshot.ts +9 -7
- package/analyzer-template/project/constructMockCode.ts +286 -84
- package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +77 -37
- package/analyzer-template/project/reconcileMockDataKeys.ts +5 -2
- package/analyzer-template/project/runMultiScenarioServer.ts +11 -10
- package/analyzer-template/project/serverOnlyModules.ts +71 -23
- package/analyzer-template/project/start.ts +10 -0
- package/analyzer-template/project/startScenarioCapture.ts +73 -41
- package/analyzer-template/project/writeMockDataTsx.ts +115 -54
- package/analyzer-template/project/writeScenarioComponents.ts +571 -162
- package/analyzer-template/project/writeSimpleRoot.ts +11 -13
- package/background/src/lib/virtualized/project/constructMockCode.js +265 -75
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +67 -32
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +5 -2
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/runMultiScenarioServer.js +11 -9
- package/background/src/lib/virtualized/project/runMultiScenarioServer.js.map +1 -1
- package/background/src/lib/virtualized/project/serverOnlyModules.js +62 -25
- package/background/src/lib/virtualized/project/serverOnlyModules.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +6 -0
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +54 -31
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +106 -46
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +399 -106
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/background/src/lib/virtualized/project/writeSimpleRoot.js +11 -11
- package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
- package/codeyam-cli/src/cli.js +2 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/debug.js +14 -2
- package/codeyam-cli/src/commands/debug.js.map +1 -1
- package/codeyam-cli/src/commands/recapture.js +215 -0
- package/codeyam-cli/src/commands/recapture.js.map +1 -0
- package/codeyam-cli/src/commands/report.js +26 -23
- package/codeyam-cli/src/commands/report.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +2 -2
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/generateReport.js +252 -106
- package/codeyam-cli/src/utils/generateReport.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +2 -2
- package/codeyam-cli/src/utils/install-skills.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 +140 -16
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +19 -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/webserver/app/lib/database.js +47 -0
- 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 +5 -10
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/bootstrap.js +9 -0
- package/codeyam-cli/src/webserver/bootstrap.js.map +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-wXL1Z2Aq.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-efWKDYMr.js → EntityTypeBadge-CzGX-miz.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-CXFKsCOD.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-D-9pXIaY.js +25 -0
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-CBQPrpT0.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/LoadingDots-D1CdlbrV.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/LogViewer-wDPcZNKx.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-4lcOlid-.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-BfmDgXxG.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-CUxUNEEC.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-COPstp9J.js → TruncatedFilePath-6J7zDUD5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/_index-DHImXdXq.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-CVP_WGQ3.js +32 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.link-scenario-value-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.update-key-attributes-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.update-valid-values-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/chevron-down-BYimnrHg.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JMJ3UQ3L-BambyYE_.js +51 -0
- package/codeyam-cli/src/webserver/build/client/assets/circle-check-CaVsIRxt.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CgUsG7ib.js +21 -0
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-CKnwPCDr.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DW_hdGUc.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-Dt-SjPsw.js +23 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DyB90fWk.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-D_3ero5o.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-CfLCUi9S.js +5 -0
- package/codeyam-cli/src/webserver/build/client/assets/entry.client-DKJyZfAY.js +29 -0
- package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-DAtOlaWE.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/files-ClR0d32A.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/git-D62Lxxmv.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-C9s7Lhdl.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-fmIEn3Bc.js +9 -0
- package/codeyam-cli/src/webserver/build/client/assets/index-BosqDOlH.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/index-CzNNiTkw.js +9 -0
- package/codeyam-cli/src/webserver/build/client/assets/keyAttributeCoverage-CTlFMihX.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-CNp9QFCX.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/manifest-0d27da29.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/preload-helper-ckwbz45p.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-B_wIKCIf.js +56 -0
- package/codeyam-cli/src/webserver/build/client/assets/scenarioStatus-B_8jpV3e.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/search-DDGjYAMJ.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/settings-DgTyB-Wg.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CoNWGt0K.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-CBc5dE1s.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BMIGFP-m.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/useInteractiveMode-Dk_FQqWJ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-3pmpUQB-.js → useLastLogLine-BqPPNjAl.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-DsJbgMY9.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-DEyawJ8r.js → useToast-DWHcCcl1.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-CU58-Ttc.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-D35o2uae.js +175 -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/templates/codeyam-setup-skill.md +138 -3
- package/codeyam-cli/templates/debug-codeyam.md +625 -0
- package/package.json +14 -14
- package/packages/ai/src/lib/analyzeScope.js +2 -0
- package/packages/ai/src/lib/analyzeScope.js.map +1 -1
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +16 -0
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js +16 -0
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/processExpression.js +305 -88
- package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +582 -41
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +2 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +454 -0
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +173 -55
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +16 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +30 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +20 -0
- 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/fillInSchemaGapsAndUnknowns.js +28 -2
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +179 -17
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +6 -0
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js +41 -0
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarios.js +37 -4
- package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateEntityDataStructure.js +4 -0
- package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
- package/packages/ai/src/lib/generateEntityKeyAttributes.js +176 -9
- package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +29 -25
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarios.js +105 -9
- package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
- 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/promptGenerators/gatherAttributesMap.js +6 -0
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +38 -2
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +38 -2
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js.map +1 -1
- 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/worker/SerializableDataStructure.js.map +1 -1
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js +4 -0
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +100 -23
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +125 -0
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +298 -45
- 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/generateDataStructure.js +201 -80
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +10 -5
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +55 -69
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +2 -5
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +171 -81
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +2 -2
- 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/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +8 -4
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/packages/generate/src/lib/deepMerge.js +27 -1
- package/packages/generate/src/lib/deepMerge.js.map +1 -1
- package/packages/types/index.js +1 -0
- package/packages/types/index.js.map +1 -1
- package/packages/types/src/types/Scenario.js +21 -1
- package/packages/types/src/types/Scenario.js.map +1 -1
- package/packages/utils/src/lib/lightweightEntityExtractor.js +25 -0
- package/packages/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
- package/scripts/finalize-analyzer.cjs +3 -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/src/webserver/build/client/assets/EntityItem-CVbSvOjo.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-DcwcHyl5.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-WgwC1GfJ.js +0 -26
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-IEKom9O2.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/LogViewer-BYnfxbUG.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-_lBPJCzG.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-lHVhvsu_.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-d_TBk4GQ.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/_index-kGT7VUqj.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-DDGmhu7P.js +0 -7
- package/codeyam-cli/src/webserver/build/client/assets/chevron-down-n_HPRfM_.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-WWGJGFF6-CbVoyx1U.js +0 -26
- package/codeyam-cli/src/webserver/build/client/assets/circle-check-D1VOYveA.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-YR8jjAlu.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-B8vP3V_s.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-CN6aLCT1.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DA5Jeu2P.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-BTeitalf.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/entry.client-du6UEYD-.js +0 -13
- package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-BpjkhMoi.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-BQGvk4lJ.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-DVdYRT-I.js +0 -12
- package/codeyam-cli/src/webserver/build/client/assets/globals-CO-U8Bpo.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-XQCGvadH.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/index-DCG-vks0.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-GazdNeLl.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-0b694d28.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-D3tQP7hx.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/search-CIY6XmtE.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/server-build-CMKNK2uU.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-CoMDgElu.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-agkniXp2.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-B2VUcygF.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-EvdK-zXP.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-DGVHQEXD.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CghkTkIL.js +0 -166
- package/codeyam-cli/templates/debug-command.md +0 -303
- /package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-CMKNK2uU.css → styles-CMKNK2uU.css} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{g as L,G as xe}from"./chunk-JMJ3UQ3L-BambyYE_.js";import{r as Se}from"./index-CzNNiTkw.js";function je(s,v){for(var c=0;c<v.length;c++){const u=v[c];if(typeof u!="string"&&!Array.isArray(u)){for(const b in u)if(b!=="default"&&!(b in s)){const f=Object.getOwnPropertyDescriptor(u,b);f&&Object.defineProperty(s,b,f.get?f:{enumerable:!0,get:()=>u[b]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var X={exports:{}},Y={},F={exports:{}},Q={},Z={exports:{}},ee,ne;function Te(){if(ne)return ee;ne=1;var s="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ee=s,ee}var te,oe;function Ce(){if(oe)return te;oe=1;var s=Te();function v(){}function c(){}return c.resetWarningCache=v,te=function(){function u(w,O,y,g,R,m){if(m!==s){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}}u.isRequired=u;function b(){return u}var f={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:b,element:u,elementType:u,instanceOf:b,node:u,objectOf:b,oneOf:b,oneOfType:b,shape:b,exact:b,checkPropTypes:c,resetWarningCache:v};return f.PropTypes=f,f},te}var ie;function K(){return ie||(ie=1,Z.exports=Ce()()),Z.exports}var I={exports:{}},se;function Me(){if(se)return I.exports;se=1;function s(c){var u,b,f="";if(typeof c=="string"||typeof c=="number")f+=c;else if(typeof c=="object")if(Array.isArray(c)){var w=c.length;for(u=0;u<w;u++)c[u]&&(b=s(c[u]))&&(f&&(f+=" "),f+=b)}else for(b in c)c[b]&&(f&&(f+=" "),f+=b);return f}function v(){for(var c,u,b=0,f="",w=arguments.length;b<w;b++)(c=arguments[b])&&(u=s(c))&&(f&&(f+=" "),f+=u);return f}return I.exports=v,I.exports.clsx=v,I.exports}var T={},W={},ae;function J(){if(ae)return W;ae=1,Object.defineProperty(W,"__esModule",{value:!0}),W.dontSetMe=b,W.findInArray=s,W.int=u,W.isFunction=v,W.isNum=c;function s(f,w){for(let O=0,y=f.length;O<y;O++)if(w.apply(w,[f[O],O,f]))return f[O]}function v(f){return typeof f=="function"||Object.prototype.toString.call(f)==="[object Function]"}function c(f){return typeof f=="number"&&!isNaN(f)}function u(f){return parseInt(f,10)}function b(f,w,O){if(f[w])return new Error(`Invalid prop ${w} passed to ${O} - do not set this, set it on the child.`)}return W}var H={},le;function ze(){if(le)return H;le=1,Object.defineProperty(H,"__esModule",{value:!0}),H.browserPrefixToKey=c,H.browserPrefixToStyle=u,H.default=void 0,H.getPrefix=v;const s=["Moz","Webkit","O","ms"];function v(){var O,y;let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const w=(y=(O=window.document)==null?void 0:O.documentElement)==null?void 0:y.style;if(!w||f in w)return"";for(let g=0;g<s.length;g++)if(c(f,s[g])in w)return s[g];return""}function c(f,w){return w?`${w}${b(f)}`:f}function u(f,w){return w?`-${w.toLowerCase()}-${f}`:f}function b(f){let w="",O=!0;for(let y=0;y<f.length;y++)O?(w+=f[y].toUpperCase(),O=!1):f[y]==="-"?O=!0:w+=f[y];return w}return H.default=v(),H}var ue;function re(){if(ue)return T;ue=1,Object.defineProperty(T,"__esModule",{value:!0}),T.addClassName=d,T.addEvent=w,T.addUserSelectStyles=r,T.createCSSTransform=D,T.createSVGTransform=P,T.getTouch=e,T.getTouchIdentifier=t,T.getTranslation=a,T.innerHeight=R,T.innerWidth=m,T.matchesSelector=b,T.matchesSelectorAndParentsTo=f,T.offsetXYFromParent=S,T.outerHeight=y,T.outerWidth=g,T.removeClassName=p,T.removeEvent=O,T.scheduleRemoveUserSelectStyles=o;var s=J(),v=c(ze());function c(n,i){if(typeof WeakMap=="function")var h=new WeakMap,x=new WeakMap;return(c=function(_,C){if(!C&&_&&_.__esModule)return _;var j,M,E={__proto__:null,default:_};if(_===null||typeof _!="object"&&typeof _!="function")return E;if(j=C?x:h){if(j.has(_))return j.get(_);j.set(_,E)}for(const N in _)N!=="default"&&{}.hasOwnProperty.call(_,N)&&((M=(j=Object.defineProperty)&&Object.getOwnPropertyDescriptor(_,N))&&(M.get||M.set)?j(E,N,M):E[N]=_[N]);return E})(n,i)}let u="";function b(n,i){return u||(u=(0,s.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(h){return(0,s.isFunction)(n[h])})),(0,s.isFunction)(n[u])?n[u](i):!1}function f(n,i,h){let x=n;do{if(b(x,i))return!0;if(x===h)return!1;x=x.parentNode}while(x);return!1}function w(n,i,h,x){if(!n)return;const _={capture:!0,...x};n.addEventListener?n.addEventListener(i,h,_):n.attachEvent?n.attachEvent("on"+i,h):n["on"+i]=h}function O(n,i,h,x){if(!n)return;const _={capture:!0,...x};n.removeEventListener?n.removeEventListener(i,h,_):n.detachEvent?n.detachEvent("on"+i,h):n["on"+i]=null}function y(n){let i=n.clientHeight;const h=n.ownerDocument.defaultView.getComputedStyle(n);return i+=(0,s.int)(h.borderTopWidth),i+=(0,s.int)(h.borderBottomWidth),i}function g(n){let i=n.clientWidth;const h=n.ownerDocument.defaultView.getComputedStyle(n);return i+=(0,s.int)(h.borderLeftWidth),i+=(0,s.int)(h.borderRightWidth),i}function R(n){let i=n.clientHeight;const h=n.ownerDocument.defaultView.getComputedStyle(n);return i-=(0,s.int)(h.paddingTop),i-=(0,s.int)(h.paddingBottom),i}function m(n){let i=n.clientWidth;const h=n.ownerDocument.defaultView.getComputedStyle(n);return i-=(0,s.int)(h.paddingLeft),i-=(0,s.int)(h.paddingRight),i}function S(n,i,h){const _=i===i.ownerDocument.body?{left:0,top:0}:i.getBoundingClientRect(),C=(n.clientX+i.scrollLeft-_.left)/h,j=(n.clientY+i.scrollTop-_.top)/h;return{x:C,y:j}}function D(n,i){const h=a(n,i,"px");return{[(0,v.browserPrefixToKey)("transform",v.default)]:h}}function P(n,i){return a(n,i,"")}function a(n,i,h){let{x,y:_}=n,C=`translate(${x}${h},${_}${h})`;if(i){const j=`${typeof i.x=="string"?i.x:i.x+h}`,M=`${typeof i.y=="string"?i.y:i.y+h}`;C=`translate(${j}, ${M})`+C}return C}function e(n,i){return n.targetTouches&&(0,s.findInArray)(n.targetTouches,h=>i===h.identifier)||n.changedTouches&&(0,s.findInArray)(n.changedTouches,h=>i===h.identifier)}function t(n){if(n.targetTouches&&n.targetTouches[0])return n.targetTouches[0].identifier;if(n.changedTouches&&n.changedTouches[0])return n.changedTouches[0].identifier}function r(n){if(!n)return;let i=n.getElementById("react-draggable-style-el");i||(i=n.createElement("style"),i.type="text/css",i.id="react-draggable-style-el",i.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
2
|
+
`,i.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
3
|
+
`,n.getElementsByTagName("head")[0].appendChild(i)),n.body&&d(n.body,"react-draggable-transparent-selection")}function o(n){window.requestAnimationFrame?window.requestAnimationFrame(()=>{l(n)}):l(n)}function l(n){if(n)try{if(n.body&&p(n.body,"react-draggable-transparent-selection"),n.selection)n.selection.empty();else{const i=(n.defaultView||window).getSelection();i&&i.type!=="Caret"&&i.removeAllRanges()}}catch{}}function d(n,i){n.classList?n.classList.add(i):n.className.match(new RegExp(`(?:^|\\s)${i}(?!\\S)`))||(n.className+=` ${i}`)}function p(n,i){n.classList?n.classList.remove(i):n.className=n.className.replace(new RegExp(`(?:^|\\s)${i}(?!\\S)`,"g"),"")}return T}var k={},ce;function we(){if(ce)return k;ce=1,Object.defineProperty(k,"__esModule",{value:!0}),k.canDragX=b,k.canDragY=f,k.createCoreData=O,k.createDraggableData=y,k.getBoundPosition=c,k.getControlPosition=w,k.snapToGrid=u;var s=J(),v=re();function c(m,S,D){if(!m.props.bounds)return[S,D];let{bounds:P}=m.props;P=typeof P=="string"?P:g(P);const a=R(m);if(typeof P=="string"){const{ownerDocument:e}=a,t=e.defaultView;let r;if(P==="parent"?r=a.parentNode:r=a.getRootNode().querySelector(P),!(r instanceof t.HTMLElement))throw new Error('Bounds selector "'+P+'" could not find an element.');const o=r,l=t.getComputedStyle(a),d=t.getComputedStyle(o);P={left:-a.offsetLeft+(0,s.int)(d.paddingLeft)+(0,s.int)(l.marginLeft),top:-a.offsetTop+(0,s.int)(d.paddingTop)+(0,s.int)(l.marginTop),right:(0,v.innerWidth)(o)-(0,v.outerWidth)(a)-a.offsetLeft+(0,s.int)(d.paddingRight)-(0,s.int)(l.marginRight),bottom:(0,v.innerHeight)(o)-(0,v.outerHeight)(a)-a.offsetTop+(0,s.int)(d.paddingBottom)-(0,s.int)(l.marginBottom)}}return(0,s.isNum)(P.right)&&(S=Math.min(S,P.right)),(0,s.isNum)(P.bottom)&&(D=Math.min(D,P.bottom)),(0,s.isNum)(P.left)&&(S=Math.max(S,P.left)),(0,s.isNum)(P.top)&&(D=Math.max(D,P.top)),[S,D]}function u(m,S,D){const P=Math.round(S/m[0])*m[0],a=Math.round(D/m[1])*m[1];return[P,a]}function b(m){return m.props.axis==="both"||m.props.axis==="x"}function f(m){return m.props.axis==="both"||m.props.axis==="y"}function w(m,S,D){const P=typeof S=="number"?(0,v.getTouch)(m,S):null;if(typeof S=="number"&&!P)return null;const a=R(D),e=D.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,v.offsetXYFromParent)(P||m,e,D.props.scale)}function O(m,S,D){const P=!(0,s.isNum)(m.lastX),a=R(m);return P?{node:a,deltaX:0,deltaY:0,lastX:S,lastY:D,x:S,y:D}:{node:a,deltaX:S-m.lastX,deltaY:D-m.lastY,lastX:m.lastX,lastY:m.lastY,x:S,y:D}}function y(m,S){const D=m.props.scale;return{node:S.node,x:m.state.x+S.deltaX/D,y:m.state.y+S.deltaY/D,deltaX:S.deltaX/D,deltaY:S.deltaY/D,lastX:m.state.x,lastY:m.state.y}}function g(m){return{left:m.left,top:m.top,right:m.right,bottom:m.bottom}}function R(m){const S=m.findDOMNode();if(!S)throw new Error("<DraggableCore>: Unmounted during event!");return S}return k}var U={},V={},fe;function De(){if(fe)return V;fe=1,Object.defineProperty(V,"__esModule",{value:!0}),V.default=s;function s(){}return V}var de;function Ee(){if(de)return U;de=1,Object.defineProperty(U,"__esModule",{value:!0}),U.default=void 0;var s=y(L()),v=O(K()),c=O(Se()),u=re(),b=we(),f=J(),w=O(De());function O(a){return a&&a.__esModule?a:{default:a}}function y(a,e){if(typeof WeakMap=="function")var t=new WeakMap,r=new WeakMap;return(y=function(o,l){if(!l&&o&&o.__esModule)return o;var d,p,n={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return n;if(d=l?r:t){if(d.has(o))return d.get(o);d.set(o,n)}for(const i in o)i!=="default"&&{}.hasOwnProperty.call(o,i)&&((p=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,i))&&(p.get||p.set)?d(n,i,p):n[i]=o[i]);return n})(a,e)}function g(a,e,t){return(e=R(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function R(a){var e=m(a,"string");return typeof e=="symbol"?e:e+""}function m(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}const S={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let D=S.mouse,P=class extends s.Component{constructor(){super(...arguments),g(this,"dragging",!1),g(this,"lastX",NaN),g(this,"lastY",NaN),g(this,"touchIdentifier",null),g(this,"mounted",!1),g(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&typeof e.button=="number"&&e.button!==0)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!(0,u.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,u.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;e.type==="touchstart"&&!this.props.allowMobileScroll&&e.preventDefault();const o=(0,u.getTouchIdentifier)(e);this.touchIdentifier=o;const l=(0,b.getControlPosition)(e,o,this);if(l==null)return;const{x:d,y:p}=l,n=(0,b.createCoreData)(this,d,p);(0,w.default)("DraggableCore: handleDragStart: %j",n),(0,w.default)("calling",this.props.onStart),!(this.props.onStart(e,n)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,u.addUserSelectStyles)(r),this.dragging=!0,this.lastX=d,this.lastY=p,(0,u.addEvent)(r,D.move,this.handleDrag),(0,u.addEvent)(r,D.stop,this.handleDragStop))}),g(this,"handleDrag",e=>{const t=(0,b.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:r,y:o}=t;if(Array.isArray(this.props.grid)){let p=r-this.lastX,n=o-this.lastY;if([p,n]=(0,b.snapToGrid)(this.props.grid,p,n),!p&&!n)return;r=this.lastX+p,o=this.lastY+n}const l=(0,b.createCoreData)(this,r,o);if((0,w.default)("DraggableCore: handleDrag: %j",l),this.props.onDrag(e,l)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(n)}return}this.lastX=r,this.lastY=o}),g(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,b.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:r,y:o}=t;if(Array.isArray(this.props.grid)){let n=r-this.lastX||0,i=o-this.lastY||0;[n,i]=(0,b.snapToGrid)(this.props.grid,n,i),r=this.lastX+n,o=this.lastY+i}const l=(0,b.createCoreData)(this,r,o);if(this.props.onStop(e,l)===!1||this.mounted===!1)return!1;const p=this.findDOMNode();p&&this.props.enableUserSelectHack&&(0,u.scheduleRemoveUserSelectStyles)(p.ownerDocument),(0,w.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,p&&((0,w.default)("DraggableCore: Removing handlers"),(0,u.removeEvent)(p.ownerDocument,D.move,this.handleDrag),(0,u.removeEvent)(p.ownerDocument,D.stop,this.handleDragStop))}),g(this,"onMouseDown",e=>(D=S.mouse,this.handleDragStart(e))),g(this,"onMouseUp",e=>(D=S.mouse,this.handleDragStop(e))),g(this,"onTouchStart",e=>(D=S.touch,this.handleDragStart(e))),g(this,"onTouchEnd",e=>(D=S.touch,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,u.addEvent)(e,S.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,u.removeEvent)(t,S.mouse.move,this.handleDrag),(0,u.removeEvent)(t,S.touch.move,this.handleDrag),(0,u.removeEvent)(t,S.mouse.stop,this.handleDragStop),(0,u.removeEvent)(t,S.touch.stop,this.handleDragStop),(0,u.removeEvent)(e,S.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,u.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){var e,t,r;return(e=this.props)!=null&&e.nodeRef?(r=(t=this.props)==null?void 0:t.nodeRef)==null?void 0:r.current:c.default.findDOMNode(this)}render(){return s.cloneElement(s.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return U.default=P,g(P,"displayName","DraggableCore"),g(P,"propTypes",{allowAnyClick:v.default.bool,allowMobileScroll:v.default.bool,children:v.default.node.isRequired,disabled:v.default.bool,enableUserSelectHack:v.default.bool,offsetParent:function(a,e){if(a[e]&&a[e].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:v.default.arrayOf(v.default.number),handle:v.default.string,cancel:v.default.string,nodeRef:v.default.object,onStart:v.default.func,onDrag:v.default.func,onStop:v.default.func,onMouseDown:v.default.func,scale:v.default.number,className:f.dontSetMe,style:f.dontSetMe,transform:f.dontSetMe}),g(P,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),U}var pe;function Ne(){return pe||(pe=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"DraggableCore",{enumerable:!0,get:function(){return y.default}}),s.default=void 0;var v=m(L()),c=R(K()),u=R(Se()),b=Me(),f=re(),w=we(),O=J(),y=R(Ee()),g=R(De());function R(t){return t&&t.__esModule?t:{default:t}}function m(t,r){if(typeof WeakMap=="function")var o=new WeakMap,l=new WeakMap;return(m=function(d,p){if(!p&&d&&d.__esModule)return d;var n,i,h={__proto__:null,default:d};if(d===null||typeof d!="object"&&typeof d!="function")return h;if(n=p?l:o){if(n.has(d))return n.get(d);n.set(d,h)}for(const x in d)x!=="default"&&{}.hasOwnProperty.call(d,x)&&((i=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(d,x))&&(i.get||i.set)?n(h,x,i):h[x]=d[x]);return h})(t,r)}function S(){return S=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var l in o)({}).hasOwnProperty.call(o,l)&&(t[l]=o[l])}return t},S.apply(null,arguments)}function D(t,r,o){return(r=P(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function P(t){var r=a(t,"string");return typeof r=="symbol"?r:r+""}function a(t,r){if(typeof t!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var l=o.call(t,r);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class e extends v.Component{static getDerivedStateFromProps(r,o){let{position:l}=r,{prevPropsPosition:d}=o;return l&&(!d||l.x!==d.x||l.y!==d.y)?((0,g.default)("Draggable: getDerivedStateFromProps %j",{position:l,prevPropsPosition:d}),{x:l.x,y:l.y,prevPropsPosition:{...l}}):null}constructor(r){super(r),D(this,"onDragStart",(o,l)=>{if((0,g.default)("Draggable: onDragStart: %j",l),this.props.onStart(o,(0,w.createDraggableData)(this,l))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),D(this,"onDrag",(o,l)=>{if(!this.state.dragging)return!1;(0,g.default)("Draggable: onDrag: %j",l);const d=(0,w.createDraggableData)(this,l),p={x:d.x,y:d.y,slackX:0,slackY:0};if(this.props.bounds){const{x:i,y:h}=p;p.x+=this.state.slackX,p.y+=this.state.slackY;const[x,_]=(0,w.getBoundPosition)(this,p.x,p.y);p.x=x,p.y=_,p.slackX=this.state.slackX+(i-p.x),p.slackY=this.state.slackY+(h-p.y),d.x=p.x,d.y=p.y,d.deltaX=p.x-this.state.x,d.deltaY=p.y-this.state.y}if(this.props.onDrag(o,d)===!1)return!1;this.setState(p)}),D(this,"onDragStop",(o,l)=>{if(!this.state.dragging||this.props.onStop(o,(0,w.createDraggableData)(this,l))===!1)return!1;(0,g.default)("Draggable: onDragStop: %j",l);const p={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:i,y:h}=this.props.position;p.x=i,p.y=h}this.setState(p)}),this.state={dragging:!1,dragged:!1,x:r.position?r.position.x:r.defaultPosition.x,y:r.position?r.position.y:r.defaultPosition.y,prevPropsPosition:{...r.position},slackX:0,slackY:0,isElementSVG:!1},r.position&&!(r.onDrag||r.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var r,o;return((o=(r=this.props)==null?void 0:r.nodeRef)==null?void 0:o.current)??u.default.findDOMNode(this)}render(){const{axis:r,bounds:o,children:l,defaultPosition:d,defaultClassName:p,defaultClassNameDragging:n,defaultClassNameDragged:i,position:h,positionOffset:x,scale:_,...C}=this.props;let j={},M=null;const N=!!!h||this.state.dragging,q=h||d,z={x:(0,w.canDragX)(this)&&N?this.state.x:q.x,y:(0,w.canDragY)(this)&&N?this.state.y:q.y};this.state.isElementSVG?M=(0,f.createSVGTransform)(z,x):j=(0,f.createCSSTransform)(z,x);const B=(0,b.clsx)(l.props.className||"",p,{[n]:this.state.dragging,[i]:this.state.dragged});return v.createElement(y.default,S({},C,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),v.cloneElement(v.Children.only(l),{className:B,style:{...l.props.style,...j},transform:M}))}}s.default=e,D(e,"displayName","Draggable"),D(e,"propTypes",{...y.default.propTypes,axis:c.default.oneOf(["both","x","y","none"]),bounds:c.default.oneOfType([c.default.shape({left:c.default.number,right:c.default.number,top:c.default.number,bottom:c.default.number}),c.default.string,c.default.oneOf([!1])]),defaultClassName:c.default.string,defaultClassNameDragging:c.default.string,defaultClassNameDragged:c.default.string,defaultPosition:c.default.shape({x:c.default.number,y:c.default.number}),positionOffset:c.default.shape({x:c.default.oneOfType([c.default.number,c.default.string]),y:c.default.oneOfType([c.default.number,c.default.string])}),position:c.default.shape({x:c.default.number,y:c.default.number}),className:O.dontSetMe,style:O.dontSetMe,transform:O.dontSetMe}),D(e,"defaultProps",{...y.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(Q)),Q}var he;function Pe(){if(he)return F.exports;he=1;const{default:s,DraggableCore:v}=Ne();return F.exports=s,F.exports.default=s,F.exports.DraggableCore=v,F.exports}var G={},ge;function ke(){if(ge)return G;ge=1,G.__esModule=!0,G.cloneElement=O;var s=v(L());function v(y){return y&&y.__esModule?y:{default:y}}function c(y,g){var R=Object.keys(y);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(y);g&&(m=m.filter(function(S){return Object.getOwnPropertyDescriptor(y,S).enumerable})),R.push.apply(R,m)}return R}function u(y){for(var g=1;g<arguments.length;g++){var R=arguments[g]!=null?arguments[g]:{};g%2?c(Object(R),!0).forEach(function(m){b(y,m,R[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(R)):c(Object(R)).forEach(function(m){Object.defineProperty(y,m,Object.getOwnPropertyDescriptor(R,m))})}return y}function b(y,g,R){return(g=f(g))in y?Object.defineProperty(y,g,{value:R,enumerable:!0,configurable:!0,writable:!0}):y[g]=R,y}function f(y){var g=w(y,"string");return typeof g=="symbol"?g:g+""}function w(y,g){if(typeof y!="object"||!y)return y;var R=y[Symbol.toPrimitive];if(R!==void 0){var m=R.call(y,g);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(y)}function O(y,g){return g.style&&y.props.style&&(g.style=u(u({},y.props.style),g.style)),g.className&&y.props.className&&(g.className=`${y.props.className} ${g.className}`),s.default.cloneElement(y,g)}return G}var $={},me;function Oe(){if(me)return $;me=1,$.__esModule=!0,$.resizableProps=void 0;var s=v(K());Pe();function v(c){return c&&c.__esModule?c:{default:c}}return $.resizableProps={axis:s.default.oneOf(["both","x","y","none"]),className:s.default.string,children:s.default.element.isRequired,draggableOpts:s.default.shape({allowAnyClick:s.default.bool,cancel:s.default.string,children:s.default.node,disabled:s.default.bool,enableUserSelectHack:s.default.bool,offsetParent:typeof Element<"u"?s.default.instanceOf(Element):s.default.any,grid:s.default.arrayOf(s.default.number),handle:s.default.string,nodeRef:s.default.object,onStart:s.default.func,onDrag:s.default.func,onStop:s.default.func,onMouseDown:s.default.func,scale:s.default.number}),height:function(){for(var c=arguments.length,u=new Array(c),b=0;b<c;b++)u[b]=arguments[b];const[f]=u;return f.axis==="both"||f.axis==="y"?s.default.number.isRequired(...u):s.default.number(...u)},handle:s.default.oneOfType([s.default.node,s.default.func]),handleSize:s.default.arrayOf(s.default.number),lockAspectRatio:s.default.bool,maxConstraints:s.default.arrayOf(s.default.number),minConstraints:s.default.arrayOf(s.default.number),onResizeStop:s.default.func,onResizeStart:s.default.func,onResize:s.default.func,resizeHandles:s.default.arrayOf(s.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:s.default.number,width:function(){for(var c=arguments.length,u=new Array(c),b=0;b<c;b++)u[b]=arguments[b];const[f]=u;return f.axis==="both"||f.axis==="x"?s.default.number.isRequired(...u):s.default.number(...u)}},$}var ye;function Re(){if(ye)return Y;ye=1,Y.__esModule=!0,Y.default=void 0;var s=f(L()),v=Pe(),c=ke(),u=Oe();const b=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function f(a,e){if(typeof WeakMap=="function")var t=new WeakMap,r=new WeakMap;return(f=function(o,l){if(!l&&o&&o.__esModule)return o;var d,p,n={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return n;if(d=l?r:t){if(d.has(o))return d.get(o);d.set(o,n)}for(const i in o)i!=="default"&&{}.hasOwnProperty.call(o,i)&&((p=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,i))&&(p.get||p.set)?d(n,i,p):n[i]=o[i]);return n})(a,e)}function w(){return w=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},w.apply(null,arguments)}function O(a,e){if(a==null)return{};var t,r,o=y(a,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(r=0;r<l.length;r++)t=l[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(a,t)&&(o[t]=a[t])}return o}function y(a,e){if(a==null)return{};var t={};for(var r in a)if({}.hasOwnProperty.call(a,r)){if(e.indexOf(r)!==-1)continue;t[r]=a[r]}return t}function g(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),t.push.apply(t,r)}return t}function R(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?g(Object(t),!0).forEach(function(r){m(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function m(a,e,t){return(e=S(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function S(a){var e=D(a,"string");return typeof e=="symbol"?e:e+""}function D(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}let P=class extends s.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(e,t){const{minConstraints:r,maxConstraints:o,lockAspectRatio:l}=this.props;if(!r&&!o&&!l)return[e,t];if(l){const h=this.props.width/this.props.height,x=e-this.props.width,_=t-this.props.height;Math.abs(x)>Math.abs(_*h)?t=e/h:e=t*h}const[d,p]=[e,t];let[n,i]=this.slack||[0,0];return e+=n,t+=i,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),o&&(e=Math.min(o[0],e),t=Math.min(o[1],t)),this.slack=[n+(d-e),i+(p-t)],[e,t]}resizeHandler(e,t){return(r,o)=>{var q;let{node:l,deltaX:d,deltaY:p}=o;e==="onResizeStart"&&this.resetData();const n=(this.props.axis==="both"||this.props.axis==="x")&&t!=="n"&&t!=="s",i=(this.props.axis==="both"||this.props.axis==="y")&&t!=="e"&&t!=="w";if(!n&&!i)return;const h=t[0],x=t[t.length-1],_=l.getBoundingClientRect();if(this.lastHandleRect!=null){if(x==="w"){const z=_.left-this.lastHandleRect.left;d+=z}if(h==="n"){const z=_.top-this.lastHandleRect.top;p+=z}}this.lastHandleRect=_,x==="w"&&(d=-d),h==="n"&&(p=-p);let C=this.props.width+(n?d/this.props.transformScale:0),j=this.props.height+(i?p/this.props.transformScale:0);[C,j]=this.runConstraints(C,j),e==="onResizeStop"&&this.lastSize&&({width:C,height:j}=this.lastSize);const M=C!==this.props.width||j!==this.props.height;e!=="onResizeStop"&&(this.lastSize={width:C,height:j});const E=typeof this.props[e]=="function"?this.props[e]:null;E&&!(e==="onResize"&&!M)&&((q=r.persist)==null||q.call(r),E(r,{node:l,size:{width:C,height:j},handle:t})),e==="onResizeStop"&&this.resetData()}}renderResizeHandle(e,t){const{handle:r}=this.props;if(!r)return s.createElement("span",{className:`react-resizable-handle react-resizable-handle-${e}`,ref:t});if(typeof r=="function")return r(e,t);const o=typeof r.type=="string",l=R({ref:t},o?{}:{handleAxis:e});return s.cloneElement(r,l)}render(){const e=this.props,{children:t,className:r,draggableOpts:o,width:l,height:d,handle:p,handleSize:n,lockAspectRatio:i,axis:h,minConstraints:x,maxConstraints:_,onResize:C,onResizeStop:j,onResizeStart:M,resizeHandles:E,transformScale:N}=e,q=O(e,b);return(0,c.cloneElement)(t,R(R({},q),{},{className:`${r?`${r} `:""}react-resizable`,children:[...s.Children.toArray(t.props.children),...E.map(z=>{const B=this.handleRefs[z]??(this.handleRefs[z]=s.createRef());return s.createElement(v.DraggableCore,w({},o,{nodeRef:B,key:`resizableHandle-${z}`,onStop:this.resizeHandler("onResizeStop",z),onStart:this.resizeHandler("onResizeStart",z),onDrag:this.resizeHandler("onResize",z)}),this.renderResizeHandle(z,B))})]}))}};return Y.default=P,P.propTypes=u.resizableProps,P.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},Y}var A={},be;function qe(){if(be)return A;be=1,A.__esModule=!0,A.default=void 0;var s=w(L()),v=f(K()),c=f(Re()),u=Oe();const b=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function f(e){return e&&e.__esModule?e:{default:e}}function w(e,t){if(typeof WeakMap=="function")var r=new WeakMap,o=new WeakMap;return(w=function(l,d){if(!d&&l&&l.__esModule)return l;var p,n,i={__proto__:null,default:l};if(l===null||typeof l!="object"&&typeof l!="function")return i;if(p=d?o:r){if(p.has(l))return p.get(l);p.set(l,i)}for(const h in l)h!=="default"&&{}.hasOwnProperty.call(l,h)&&((n=(p=Object.defineProperty)&&Object.getOwnPropertyDescriptor(l,h))&&(n.get||n.set)?p(i,h,n):i[h]=l[h]);return i})(e,t)}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},O.apply(null,arguments)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,o)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(o){R(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function R(e,t,r){return(t=m(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=S(e,"string");return typeof t=="symbol"?t:t+""}function S(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D(e,t){if(e==null)return{};var r,o,l=P(e,t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);for(o=0;o<d.length;o++)r=d[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function P(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}let a=class extends s.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(t,r)=>{var l;const{size:o}=r;this.props.onResize?((l=t.persist)==null||l.call(t),this.setState(o,()=>this.props.onResize&&this.props.onResize(t,r))):this.setState(o)}}static getDerivedStateFromProps(t,r){return r.propsWidth!==t.width||r.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null}render(){const t=this.props,{handle:r,handleSize:o,onResize:l,onResizeStart:d,onResizeStop:p,draggableOpts:n,minConstraints:i,maxConstraints:h,lockAspectRatio:x,axis:_,width:C,height:j,resizeHandles:M,style:E,transformScale:N}=t,q=D(t,b);return s.createElement(c.default,{axis:_,draggableOpts:n,handle:r,handleSize:o,height:this.state.height,lockAspectRatio:x,maxConstraints:h,minConstraints:i,onResizeStart:d,onResize:this.onResize,onResizeStop:p,resizeHandles:M,transformScale:N,width:this.state.width},s.createElement("div",O({},q,{style:g(g({},E),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return A.default=a,a.propTypes=g(g({},u.resizableProps),{},{children:v.default.element}),A}var ve;function We(){return ve||(ve=1,X.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},X.exports.Resizable=Re().default,X.exports.ResizableBox=qe().default),X.exports}var _e=We();const He=xe(_e),Ae=je({__proto__:null,default:He},[_e]);export{Ae as i};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{g as O}from"./chunk-JMJ3UQ3L-BambyYE_.js";var y={exports:{}},n={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-dom.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var o;function S(){if(o)return n;o=1;var u=O();function g(r){var e="https://react.dev/errors/"+r;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+r+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var i={d:{f:c,r:function(){throw Error(g(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},m=Symbol.for("react.portal");function v(r,e,t){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:a==null?null:""+a,children:r,containerInfo:e,implementation:t}}var f=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(r,e){if(r==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}return n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,n.createPortal=function(r,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(g(299));return v(r,e,null,t)},n.flushSync=function(r){var e=f.T,t=i.p;try{if(f.T=null,i.p=2,r)return r()}finally{f.T=e,i.p=t,i.d.f()}},n.preconnect=function(r,e){typeof r=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,i.d.C(r,e))},n.prefetchDNS=function(r){typeof r=="string"&&i.d.D(r)},n.preinit=function(r,e){if(typeof r=="string"&&e&&typeof e.as=="string"){var t=e.as,a=d(t,e.crossOrigin),s=typeof e.integrity=="string"?e.integrity:void 0,l=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;t==="style"?i.d.S(r,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:a,integrity:s,fetchPriority:l}):t==="script"&&i.d.X(r,{crossOrigin:a,integrity:s,fetchPriority:l,nonce:typeof e.nonce=="string"?e.nonce:void 0})}},n.preinitModule=function(r,e){if(typeof r=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var t=d(e.as,e.crossOrigin);i.d.M(r,{crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&i.d.M(r)},n.preload=function(r,e){if(typeof r=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var t=e.as,a=d(t,e.crossOrigin);i.d.L(r,t,{crossOrigin:a,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}},n.preloadModule=function(r,e){if(typeof r=="string")if(e){var t=d(e.as,e.crossOrigin);i.d.m(r,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:t,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else i.d.m(r)},n.requestFormReset=function(r){i.d.r(r)},n.unstable_batchedUpdates=function(r,e){return r(e)},n.useFormState=function(r,e,t){return f.H.useFormState(r,e,t)},n.useFormStatus=function(){return f.H.useHostTransitionStatus()},n.version="19.2.3",n}var _;function T(){if(_)return y.exports;_=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(g){console.error(g)}}return u(),y.exports=S(),y.exports}export{T as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function b(t){return typeof t=="object"&&"localVariable"in t&&"instruction"in t&&("valueOptionRef"in t||"errorOptionRef"in t)}function O(t){var n;const a=(n=t.metadata)==null?void 0:n.keyAttributeInstructions;return!a||Object.keys(a).length===0?!1:Object.values(a).some(r=>typeof r=="object"&&("valueOptionRef"in r||"errorOptionRef"in r))}function g(t,a){const n=(t||[]).map(e=>({path:e.dataStructurePath||e.externalPath||e.internalPath,localVariable:e.internalPath,description:e.description,valueType:e.valueType,validValues:(e.validValueOptions||[]).map((i,u)=>({index:u,value:i,usedInScenarios:[]})),errorValues:(e.errorValueOptions||[]).map((i,u)=>({index:u,value:i,usedInScenarios:[]})),sourceLocations:e.sourceLocations,dependencies:e.dependencies})),r=new Map;n.forEach(e=>{r.set(e.path,e)});const h=[],V=[];a.forEach(e=>{var i;if(O(e)){const u=[],v=((i=e.metadata)==null?void 0:i.keyAttributeInstructions)||{};Object.entries(v).forEach(([d,l])=>{if(b(l)){const p=r.get(d);if(!p)return;if(l.valueOptionRef){const s=l.valueOptionRef,o=p.validValues[s.index];o&&(o.usedInScenarios.push({id:e.id||"",name:e.name,refType:s.refType}),u.push({path:d,valueIndex:s.index,value:o.value,isError:!1,refType:s.refType}))}if(l.errorOptionRef){const s=l.errorOptionRef,o=p.errorValues[s.index];o&&(o.usedInScenarios.push({id:e.id||"",name:e.name,refType:s.refType}),u.push({path:d,valueIndex:s.index,value:o.value,isError:!0,refType:s.refType}))}}}),h.push({scenario:e,usedAttributes:u})}else V.push(e)});let c=0,f=0;n.forEach(e=>{c+=e.validValues.length,f+=e.validValues.filter(i=>i.usedInScenarios.length>0).length});const y=c>0?f/c*100:0;return{keyAttributes:n,scenariosWithStructuredRefs:h,scenariosWithoutStructuredRefs:V,totalValidValues:c,usedValidValues:f,coveragePercentage:y}}function R(t){const a=[];return t.keyAttributes.forEach(n=>{n.validValues.forEach(r=>{r.usedInScenarios.length===0&&a.push({path:n.path,index:r.index,value:r.value})})}),a}export{g as c,R as g};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c}from"./createLucideIcon-CgUsG7ib.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 e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DKJyZfAY.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/index-CzNNiTkw.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/root-B_wIKCIf.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/index-CzNNiTkw.js","/assets/preload-helper-ckwbz45p.js","/assets/cy-logo-cli-CKnwPCDr.js","/assets/ReportIssueModal-4lcOlid-.js","/assets/useReportContext-DsJbgMY9.js","/assets/loader-circle-CNp9QFCX.js","/assets/createLucideIcon-CgUsG7ib.js","/assets/useToast-DWHcCcl1.js","/assets/useLastLogLine-BqPPNjAl.js","/assets/LogViewer-wDPcZNKx.js","/assets/EntityTypeIcon-CXFKsCOD.js","/assets/TruncatedFilePath-6J7zDUD5.js","/assets/chevron-down-BYimnrHg.js","/assets/circle-check-CaVsIRxt.js","/assets/triangle-alert-CBc5dE1s.js"],"css":[]},"routes/entity.$sha.scenarios.$scenarioId.fullscreen":{"id":"routes/entity.$sha.scenarios.$scenarioId.fullscreen","parentId":"root","path":"entity/:sha/scenarios/:scenarioId/fullscreen","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha.scenarios._scenarioId.fullscreen-DyB90fWk.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/useInteractiveMode-Dk_FQqWJ.js","/assets/useLastLogLine-BqPPNjAl.js","/assets/useCustomSizes-BMIGFP-m.js","/assets/cy-logo-cli-CKnwPCDr.js"],"css":[]},"routes/entity.$sha_.edit.$scenarioId":{"id":"routes/entity.$sha_.edit.$scenarioId","parentId":"root","path":"entity/:sha/edit/:scenarioId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha_.edit._scenarioId-CfLCUi9S.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/InteractivePreview-D-9pXIaY.js","/assets/useInteractiveMode-Dk_FQqWJ.js","/assets/preload-helper-ckwbz45p.js","/assets/useLastLogLine-BqPPNjAl.js"],"css":[]},"routes/entity.$sha_.create-scenario":{"id":"routes/entity.$sha_.create-scenario","parentId":"root","path":"entity/:sha/create-scenario","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha_.create-scenario-D_3ero5o.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/InteractivePreview-D-9pXIaY.js","/assets/useInteractiveMode-Dk_FQqWJ.js","/assets/keyAttributeCoverage-CTlFMihX.js","/assets/preload-helper-ckwbz45p.js","/assets/useLastLogLine-BqPPNjAl.js"],"css":[]},"routes/api.generate-scenario-data":{"id":"routes/api.generate-scenario-data","parentId":"root","path":"api/generate-scenario-data","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.generate-scenario-data-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.update-key-attributes":{"id":"routes/api.update-key-attributes","parentId":"root","path":"api/update-key-attributes","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.update-key-attributes-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.llm-calls.$entitySha":{"id":"routes/api.llm-calls.$entitySha","parentId":"root","path":"api/llm-calls/:entitySha","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.llm-calls._entitySha-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.link-scenario-value":{"id":"routes/api.link-scenario-value","parentId":"root","path":"api/link-scenario-value","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.link-scenario-value-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.update-valid-values":{"id":"routes/api.update-valid-values","parentId":"root","path":"api/update-valid-values","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.update-valid-values-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.branch-entity-diff":{"id":"routes/api.branch-entity-diff","parentId":"root","path":"api/branch-entity-diff","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.branch-entity-diff-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.capture-screenshot":{"id":"routes/api.capture-screenshot","parentId":"root","path":"api/capture-screenshot","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.capture-screenshot-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.recapture-scenario":{"id":"routes/api.recapture-scenario","parentId":"root","path":"api/recapture-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.recapture-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.logs.$projectSlug":{"id":"routes/api.logs.$projectSlug","parentId":"root","path":"api/logs/:projectSlug","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.logs._projectSlug-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.execute-function":{"id":"routes/api.execute-function","parentId":"root","path":"api/execute-function","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.execute-function-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.interactive-mode":{"id":"routes/api.interactive-mode","parentId":"root","path":"api/interactive-mode","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.interactive-mode-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.delete-scenario":{"id":"routes/api.delete-scenario","parentId":"root","path":"api/delete-scenario","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.delete-scenario-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.generate-report":{"id":"routes/api.generate-report","parentId":"root","path":"api/generate-report","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.generate-report-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.process-status":{"id":"routes/api.process-status","parentId":"root","path":"api/process-status","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.process-status-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.save-scenarios":{"id":"routes/api.save-scenarios","parentId":"root","path":"api/save-scenarios","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.save-scenarios-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.kill-process":{"id":"routes/api.kill-process","parentId":"root","path":"api/kill-process","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.kill-process-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.screenshot.$":{"id":"routes/api.screenshot.$","parentId":"root","path":"api/screenshot/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.screenshot._-l0sNRNKZ.js","imports":[],"css":[]},"routes/activity.($tab)":{"id":"routes/activity.($tab)","parentId":"root","path":"activity/:tab?","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/activity.(_tab)-CVP_WGQ3.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/LogViewer-wDPcZNKx.js","/assets/useLastLogLine-BqPPNjAl.js","/assets/useReportContext-DsJbgMY9.js","/assets/EntityTypeIcon-CXFKsCOD.js","/assets/EntityTypeBadge-CzGX-miz.js","/assets/SafeScreenshot-BfmDgXxG.js","/assets/LoadingDots-D1CdlbrV.js","/assets/loader-circle-CNp9QFCX.js","/assets/createLucideIcon-CgUsG7ib.js"],"css":[]},"routes/api.debug-setup":{"id":"routes/api.debug-setup","parentId":"root","path":"api/debug-setup","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.debug-setup-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.recapture":{"id":"routes/api.recapture","parentId":"root","path":"api/recapture","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.recapture-l0sNRNKZ.js","imports":[],"css":[]},"routes/entity.$sha.$":{"id":"routes/entity.$sha.$","parentId":"root","path":"entity/:sha/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/entity._sha._-Dt-SjPsw.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/useLastLogLine-BqPPNjAl.js","/assets/useInteractiveMode-Dk_FQqWJ.js","/assets/InteractivePreview-D-9pXIaY.js","/assets/SafeScreenshot-BfmDgXxG.js","/assets/LibraryFunctionPreview-CBQPrpT0.js","/assets/LoadingDots-D1CdlbrV.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/ScenarioViewer-CUxUNEEC.js","/assets/createLucideIcon-CgUsG7ib.js","/assets/keyAttributeCoverage-CTlFMihX.js","/assets/EntityTypeIcon-CXFKsCOD.js","/assets/LogViewer-wDPcZNKx.js","/assets/useReportContext-DsJbgMY9.js","/assets/preload-helper-ckwbz45p.js","/assets/useCustomSizes-BMIGFP-m.js","/assets/ReportIssueModal-4lcOlid-.js","/assets/circle-check-CaVsIRxt.js","/assets/triangle-alert-CBc5dE1s.js"],"css":[]},"routes/api.analyze":{"id":"routes/api.analyze","parentId":"root","path":"api/analyze","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.analyze-l0sNRNKZ.js","imports":[],"css":[]},"routes/simulations":{"id":"routes/simulations","parentId":"root","path":"simulations","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/simulations-CoNWGt0K.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/useReportContext-DsJbgMY9.js","/assets/SafeScreenshot-BfmDgXxG.js","/assets/LoadingDots-D1CdlbrV.js","/assets/EntityTypeIcon-CXFKsCOD.js","/assets/fileTableUtils-DAtOlaWE.js","/assets/chevron-down-BYimnrHg.js","/assets/search-DDGjYAMJ.js","/assets/loader-circle-CNp9QFCX.js","/assets/createLucideIcon-CgUsG7ib.js"],"css":[]},"routes/api.events":{"id":"routes/api.events","parentId":"root","path":"api/events","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.events-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.memory":{"id":"routes/api.memory","parentId":"root","path":"api/memory","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.memory-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.queue":{"id":"routes/api.queue","parentId":"root","path":"api/queue","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/api.queue-l0sNRNKZ.js","imports":[],"css":[]},"routes/dev.empty":{"id":"routes/dev.empty","parentId":"root","path":"dev/empty","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dev.empty-DW_hdGUc.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/ScenarioViewer-CUxUNEEC.js","/assets/InteractivePreview-D-9pXIaY.js","/assets/useCustomSizes-BMIGFP-m.js","/assets/LogViewer-wDPcZNKx.js","/assets/SafeScreenshot-BfmDgXxG.js","/assets/useLastLogLine-BqPPNjAl.js","/assets/useInteractiveMode-Dk_FQqWJ.js","/assets/preload-helper-ckwbz45p.js","/assets/ReportIssueModal-4lcOlid-.js","/assets/createLucideIcon-CgUsG7ib.js","/assets/circle-check-CaVsIRxt.js","/assets/triangle-alert-CBc5dE1s.js","/assets/scenarioStatus-B_8jpV3e.js"],"css":[]},"routes/settings":{"id":"routes/settings","parentId":"root","path":"settings","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/settings-DgTyB-Wg.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/useReportContext-DsJbgMY9.js"],"css":[]},"routes/static.$":{"id":"routes/static.$","parentId":"root","path":"static/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/static._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_index":{"id":"routes/_index","parentId":"root","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/_index-DHImXdXq.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/useLastLogLine-BqPPNjAl.js","/assets/useToast-DWHcCcl1.js","/assets/useReportContext-DsJbgMY9.js","/assets/LogViewer-wDPcZNKx.js","/assets/EntityTypeIcon-CXFKsCOD.js","/assets/SafeScreenshot-BfmDgXxG.js","/assets/createLucideIcon-CgUsG7ib.js","/assets/circle-check-CaVsIRxt.js","/assets/loader-circle-CNp9QFCX.js"],"css":[]},"routes/files":{"id":"routes/files","parentId":"root","path":"files","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/files-ClR0d32A.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/useReportContext-DsJbgMY9.js","/assets/EntityItem-wXL1Z2Aq.js","/assets/fileTableUtils-DAtOlaWE.js","/assets/chevron-down-BYimnrHg.js","/assets/search-DDGjYAMJ.js","/assets/useToast-DWHcCcl1.js","/assets/TruncatedFilePath-6J7zDUD5.js","/assets/SafeScreenshot-BfmDgXxG.js","/assets/LibraryFunctionPreview-CBQPrpT0.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/triangle-alert-CBc5dE1s.js","/assets/createLucideIcon-CgUsG7ib.js","/assets/EntityTypeIcon-CXFKsCOD.js","/assets/EntityTypeBadge-CzGX-miz.js"],"css":[]},"routes/git":{"id":"routes/git","parentId":"root","path":"git","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/git-D62Lxxmv.js","imports":["/assets/chunk-JMJ3UQ3L-BambyYE_.js","/assets/useReportContext-DsJbgMY9.js","/assets/EntityItem-wXL1Z2Aq.js","/assets/LogViewer-wDPcZNKx.js","/assets/fileTableUtils-DAtOlaWE.js","/assets/useToast-DWHcCcl1.js","/assets/TruncatedFilePath-6J7zDUD5.js","/assets/SafeScreenshot-BfmDgXxG.js","/assets/LibraryFunctionPreview-CBQPrpT0.js","/assets/scenarioStatus-B_8jpV3e.js","/assets/triangle-alert-CBc5dE1s.js","/assets/createLucideIcon-CgUsG7ib.js","/assets/EntityTypeIcon-CXFKsCOD.js","/assets/EntityTypeBadge-CzGX-miz.js"],"css":[]}},"url":"/assets/manifest-0d27da29.js","version":"0d27da29"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const v="modulepreload",E=function(i){return"/"+i},d={},y=function(f,l,p){let c=Promise.resolve();if(l&&l.length>0){let n=function(t){return Promise.all(t.map(o=>Promise.resolve(o).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))};document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),u=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));c=n(l.map(t=>{if(t=E(t),t in d)return;d[t]=!0;const o=t.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${t}"]${s}`))return;const r=document.createElement("link");if(r.rel=o?"stylesheet":v,o||(r.as="script"),r.crossOrigin="",r.href=t,u&&r.setAttribute("nonce",u),document.head.appendChild(r),o)return new Promise((m,h)=>{r.addEventListener("load",m),r.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${t}`)))})}))}function a(n){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=n,window.dispatchEvent(e),!e.defaultPrevented)throw n}return c.then(n=>{for(const e of n||[])e.status==="rejected"&&a(e.reason);return f().catch(a)})};export{y as _};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import{r as n,j as e,d as Y,a as Z,c as ee,L as H,w as se,M as te,C as ie,S as oe,D as ae,u as ne,f as le,O as re}from"./chunk-JMJ3UQ3L-BambyYE_.js";import{_ as ce}from"./preload-helper-ckwbz45p.js";import{c as de}from"./cy-logo-cli-CKnwPCDr.js";import{B as he,R as me,S as pe}from"./ReportIssueModal-4lcOlid-.js";import{a as xe,R as fe}from"./useReportContext-DsJbgMY9.js";import{L as B}from"./loader-circle-CNp9QFCX.js";import{c as z}from"./createLucideIcon-CgUsG7ib.js";import{T as ue,u as ye}from"./useToast-DWHcCcl1.js";import{u as ge}from"./useLastLogLine-BqPPNjAl.js";import{L as ve}from"./LogViewer-wDPcZNKx.js";import{E as je}from"./EntityTypeIcon-CXFKsCOD.js";import{T as Ce}from"./TruncatedFilePath-6J7zDUD5.js";import{C as we}from"./chevron-down-BYimnrHg.js";import{C as ke}from"./circle-check-CaVsIRxt.js";import"./triangle-alert-CBc5dE1s.js";function Ne({id:s,selected:a,onClick:r,icon:p,name:f}){const[c,i]=n.useState(!1);n.useEffect(()=>{i(!0)},[]);const S=n.useCallback(()=>{r==null||r(s)},[r,s]);return e.jsxs("button",{className:`
|
|
2
|
+
w-full aspect-square p-3 cursor-pointer focus:outline-none
|
|
3
|
+
flex flex-col items-center justify-center gap-1 text-[#626262]
|
|
4
|
+
hover:bg-[#d8d8d8] text-xs font-ibmPlexSans uppercase
|
|
5
|
+
`,onClick:S,children:[e.jsx("div",{className:`${a?"bg-primary-100 text-cygray-10":""} w-10 h-10 rounded-lg flex items-center justify-center`,children:c&&p}),e.jsx("span",{className:`${a?"text-primary-100":""} whitespace-nowrap`,children:f})]})}/**
|
|
6
|
+
* @license lucide-react v0.556.0 - ISC
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the ISC license.
|
|
9
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/const be=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],V=z("activity",be);/**
|
|
11
|
+
* @license lucide-react v0.556.0 - ISC
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the ISC license.
|
|
14
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/const Se=[["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Le=z("circle-equal",Se);/**
|
|
16
|
+
* @license lucide-react v0.556.0 - ISC
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the ISC license.
|
|
19
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/const Ae=[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1uwlt4"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z",key:"10291m"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z",key:"1tqoq1"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1x6lto"}]],ze=z("component",Ae);/**
|
|
21
|
+
* @license lucide-react v0.556.0 - ISC
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the ISC license.
|
|
24
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/const Te=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Ee=z("file",Te);/**
|
|
26
|
+
* @license lucide-react v0.556.0 - ISC
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the ISC license.
|
|
29
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
+
*/const Me=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],U=z("git-commit-horizontal",Me);/**
|
|
31
|
+
* @license lucide-react v0.556.0 - ISC
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the ISC license.
|
|
34
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/const _e=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],De=z("house",_e);/**
|
|
36
|
+
* @license lucide-react v0.556.0 - ISC
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the ISC license.
|
|
39
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/const Ie=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],$e=z("panels-top-left",Ie);/**
|
|
41
|
+
* @license lucide-react v0.556.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const Pe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],We=z("refresh-cw",Pe);function He(){var w;const s=Y(),a=Z(),[r,p]=n.useState(),[f,c]=n.useState(!1),[i,S]=n.useState(!1),[D,L]=n.useState(null),h=ee();n.useEffect(()=>{h.state==="idle"&&!h.data&&h.load("/api/generate-report")},[h]);const j=((w=h.data)==null?void 0:w.defaultEmail)||"",l={width:"24px",height:"24px",strokeWidth:1.5},g=[{id:"dashboard",icon:e.jsx(De,{style:l}),link:"/",name:"Dashboard"},{id:"simulations",icon:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:l,children:[e.jsx("path",{d:"M9 12.75V15.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 15.75H12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6.75 12.7498L11.325 8.17483C11.6067 7.89873 11.9858 7.7447 12.3803 7.7461C12.7747 7.74751 13.1528 7.90423 13.4325 8.18233L16.5 11.2498",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M6 8.25C6.82843 8.25 7.5 7.57843 7.5 6.75C7.5 5.92157 6.82843 5.25 6 5.25C5.17157 5.25 4.5 5.92157 4.5 6.75C4.5 7.57843 5.17157 8.25 6 8.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M15 2.25H3C2.17157 2.25 1.5 2.92157 1.5 3.75V11.25C1.5 12.0784 2.17157 12.75 3 12.75H15C15.8284 12.75 16.5 12.0784 16.5 11.25V3.75C16.5 2.92157 15.8284 2.25 15 2.25Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),link:"/simulations",name:"Simulations"},{id:"git",icon:e.jsx(U,{style:l}),link:"/git",name:"Git"},{id:"files",icon:e.jsx(Ee,{style:l}),link:"/files",name:"Files"},{id:"activity",icon:e.jsx(We,{style:l}),link:"/activity",name:"Activity"},{id:"settings",icon:e.jsx(pe,{style:l}),link:"/settings",name:"Settings"},{id:"commits",icon:e.jsx(U,{style:l}),link:"/commits",name:"Commits",hidden:!0},{id:"pages",icon:e.jsx($e,{style:l}),link:"/pages",name:"Pages",hidden:!0},{id:"components",icon:e.jsx(ze,{style:l}),link:"/components",name:"Components",hidden:!0}],I=n.useCallback(o=>{const x=g.find(u=>u.id===o);x!=null&&x.link&&a(x.link),p(u=>u===o?void 0:o)},[g,a]);n.useEffect(()=>{const o={dashboard:["/","/home"],git:["git"],commits:["commits"],simulations:["simulations"],activity:["activity"],files:["files"],settings:["settings"],pages:["pages"],components:["components"]};for(const[x,u]of Object.entries(o))if(u.some(N=>N==="/"?s.pathname==="/":s.pathname.includes(N))){p(x);return}p(void 0)},[s]);const T=async()=>{S(!0);try{const{default:o}=await ce(async()=>{const{default:N}=await import("./html2canvas-pro.esm-fmIEn3Bc.js");return{default:N}},[]),u=(await o(document.body)).toDataURL("image/jpeg",.8);L(u),c(!0)}catch(o){console.error("Screenshot capture failed:",o),c(!0)}finally{S(!1)}},C=()=>{c(!1),L(null)},A=xe();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{id:"sidebar",className:"relative w-full h-screen bg-cygray-30 flex flex-col justify-between py-3",children:[e.jsxs("div",{className:"w-full flex flex-col items-center",children:[e.jsx("div",{children:e.jsx(H,{to:"/",className:"flex items-center justify-center h-20 cursor-pointer",children:e.jsx("img",{src:de,alt:"CodeYam",className:"h-8"})})}),g.filter(o=>!o.hidden).map(o=>e.jsx(Ne,{id:o.id,selected:o.id===r,onClick:I,icon:o.icon,name:o.name},`sidebar-button-${o.id}`))]}),e.jsx("div",{className:"w-full flex flex-col items-center pb-2",children:e.jsxs("button",{onClick:()=>void T(),disabled:i,className:"flex flex-col items-center gap-1 p-2 rounded-lg text-gray-600 hover:bg-gray-100 hover:text-gray-900 transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",title:"Report an issue",children:[i?e.jsx(B,{style:l,className:"animate-spin"}):e.jsx(he,{style:l}),e.jsx("span",{className:"text-[10px] font-medium",children:i?"Capturing...":"Report Issue"})]})})]}),f&&e.jsx(me,{isOpen:!0,onClose:C,context:A,defaultEmail:j,screenshotDataUrl:D??void 0})]})}function Ve({toast:s,onClose:a}){n.useEffect(()=>{const f=s.duration||5e3;if(f>0){const c=setTimeout(()=>{a(s.id)},f);return()=>clearTimeout(c)}},[s.id,s.duration,a]);const r={success:"✅",error:"❌",info:"ℹ️",warning:"⚠️"},p={success:"bg-emerald-50 border-emerald-200 text-emerald-900",error:"bg-red-50 border-red-200 text-red-900",info:"bg-blue-50 border-blue-200 text-blue-900",warning:"bg-amber-50 border-amber-200 text-amber-900"};return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg border-2 shadow-lg min-w-[320px] max-w-[500px] animate-[slideIn_0.3s_ease-out] ${p[s.type]}`,children:[e.jsx("span",{className:"text-2xl",children:r[s.type]}),e.jsx("p",{className:"flex-1 text-sm font-medium m-0",children:s.message}),e.jsx("button",{onClick:()=>a(s.id),className:"text-gray-500 hover:text-gray-700 text-xl leading-none bg-transparent border-none cursor-pointer p-0 w-6 h-6 flex items-center justify-center rounded transition-colors hover:bg-black/10",children:"×"})]})}function qe({toasts:s,onClose:a}){return s.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-10000 flex flex-col gap-2",children:[e.jsx("style",{children:`
|
|
46
|
+
@keyframes slideIn {
|
|
47
|
+
from {
|
|
48
|
+
transform: translateX(400px);
|
|
49
|
+
opacity: 0;
|
|
50
|
+
}
|
|
51
|
+
to {
|
|
52
|
+
transform: translateX(0);
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
`}),s.map(r=>e.jsx(Ve,{toast:r,onClose:a},r.id))]})}function q({entity:s,nameSize:a="11px",pathSize:r="10px",pathMaxLength:p=50,showScenarioCount:f=!1,scenarioCount:c=0,additionalContent:i}){return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(je,{type:s.entityType||"other"}),e.jsxs(H,{to:`/entity/${s.sha}`,className:"hover:underline shrink-0 cursor-pointer",style:{fontSize:a,fontWeight:500,color:"#000",whiteSpace:"nowrap"},children:[s.name,f&&c>0&&` (${c})`]}),e.jsx(Ce,{filePath:s.filePath,maxLength:p,style:{fontSize:r,color:"#8E8E8E"}})]}),i]})}const Q={fontSize:"9px",color:"#005C75",fontStyle:"italic"};function Be({currentRun:s,projectSlug:a,currentEntities:r=[],isAnalysisStarting:p=!1,queuedJobCount:f=0,queueJobs:c=[],currentlyExecuting:i=null,historicalRuns:S=[]}){var R,F,J;const[D,L]=n.useState(!1),[h,j]=n.useState(!1),[l,g]=n.useState(null),[I,T]=n.useState(new Set),[C,A]=n.useState(new Set),w=!!i||c.length>0,o=!!i,x=(i==null?void 0:i.entities)||r;s!=null&&s.analysisCompletedAt,s==null||s.readyToBeCaptured,s==null||s.capturesCompleted;const u=(s==null?void 0:s.currentEntityShas)&&s.currentEntityShas.length>0,N=w,{lastLine:P}=ge(a,N),M=o,G=new Set(((R=i==null?void 0:i.entities)==null?void 0:R.map(t=>t.sha))||[]),W=S.filter(t=>!(t.currentEntityShas||[]).some(d=>G.has(d))),X=(()=>{const m=Date.now()-1440*60*1e3;if(s!=null&&s.createdAt&&u){const d=s.analysisCompletedAt||s.createdAt;if(new Date(d).getTime()>m)return!0}if(W.length>0){const d=W[0],b=d.analysisCompletedAt||d.archivedAt||d.createdAt;if(b&&new Date(b).getTime()>m)return!0}return!1})();return n.useEffect(()=>{const t=(i==null?void 0:i.id)||null;w&&!h&&t!==l&&j(!0),!w&&l!==null&&g(null)},[w,i==null?void 0:i.id,h,l]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`fixed bottom-4 right-4 z-9998 bg-white rounded shadow-lg border-2 border-primary-100 transition-all duration-200 ${h?"min-w-[350px] max-w-[500px]":"w-auto"}`,children:[!h&&e.jsxs("div",{onClick:()=>{j(!0),g(null)},className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 transition-colors",title:"Click to expand",children:[M?e.jsx(B,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(V,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity: No Activity Yet"}),M&&e.jsx("button",{onClick:t=>{t.stopPropagation(),L(!0)},className:"ml-auto px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"})]}),h&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[M?e.jsx(B,{size:16,className:"animate-spin",style:{color:"#005C75"}}):e.jsx("div",{className:"flex items-center justify-center rounded",style:{backgroundColor:"#E0E9EC",width:"20px",height:"20px"},children:e.jsx(V,{size:16,style:{color:"#005C75"}})}),e.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"#343434"},children:M?"Analyzing...":"Activity"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>L(!0),className:"px-2 py-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC",color:"#005C75",fontSize:"10px",fontWeight:600},children:"View Logs"}),e.jsx("button",{onClick:()=>{j(!1),g((i==null?void 0:i.id)||null)},className:"p-1 rounded transition-colors cursor-pointer",style:{backgroundColor:"#E0E9EC"},title:"Collapse","aria-label":"Collapse",children:e.jsx(we,{size:16,style:{color:"#646464"}})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsxs("div",{className:"px-3 pt-2 pb-3 space-y-3",children:[M&&i&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(V,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Current Activity"})]}),e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:x.length>0?e.jsxs("div",{className:"space-y-1.5",children:[x.map(t=>e.jsx(q,{entity:t,nameSize:"11px",pathSize:"10px",pathMaxLength:150},t.sha)),P&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:P})]}):e.jsxs("div",{children:[i.entityNames&&i.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[i.entityNames.slice(0,5).map((t,m)=>e.jsx("div",{style:{fontSize:"11px",color:"#343434"},children:t},m)),i.entityNames.length>5&&e.jsxs("div",{className:"italic",style:{fontSize:"10px",color:"#666"},children:["+",i.entityNames.length-5," ","more"]})]}):e.jsxs("div",{style:{fontSize:"11px",color:"#343434"},children:["Analyzing"," ",((F=i.entityShas)==null?void 0:F.length)||0," ",((J=i.entityShas)==null?void 0:J.length)===1?"entity":"entities","..."]}),P&&e.jsx("div",{style:{fontSize:"10px",color:"#005C75",marginTop:"4px"},children:P})]})})]}),c.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Le,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Queued Activity"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:c.map(t=>{var b,_;const m=I.has(t.id),d=m?t.entities:t.entities.slice(0,3);return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:t.entities.length>0?e.jsxs("div",{className:"space-y-1.5",children:[d.map(k=>e.jsx(q,{entity:k,nameSize:"10px",pathSize:"9px",pathMaxLength:120},k.sha)),t.entities.length>3&&e.jsx("button",{onClick:()=>{T(k=>{const E=new Set(k);return E.has(t.id)?E.delete(t.id):E.add(t.id),E})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:Q,"aria-label":m?"Show fewer entities":`Show ${t.entities.length-3} more entities`,children:m?"Show less":`+${t.entities.length-3} more`})]}):e.jsxs("div",{style:{fontSize:"10px",color:"#343434"},children:[t.type==="analysis"&&e.jsx(e.Fragment,{children:t.entityNames&&t.entityNames.length>0?e.jsxs("div",{className:"space-y-0.5",children:[t.entityNames.slice(0,5).map((k,E)=>e.jsx("div",{children:k},E)),t.entityNames.length>5&&e.jsxs("div",{className:"italic",children:["+",t.entityNames.length-5," more"]})]}):`Analyzing ${((b=t.entityShas)==null?void 0:b.length)||0} ${((_=t.entityShas)==null?void 0:_.length)===1?"entity":"entities"}`}),t.type==="recapture"&&"Recapturing scenario",t.type==="debug-setup"&&"Setting up debug environment"]})},t.id)})})]}),X&&W.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(ke,{size:12,style:{color:"#005C75"}}),e.jsx("h4",{style:{fontSize:"11px",fontWeight:600,color:"#343434"},children:"Recently Completed"})]}),e.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:W.slice(0,3).map((t,m)=>{const d=t.entities||[],b=t.analysisCompletedAt||t.archivedAt||t.createdAt||"",_=(()=>{if(!b)return"";const v=Date.now()-new Date(b).getTime(),y=Math.floor(v/6e4),$=Math.floor(v/36e5);return $>0?`${$}h ago`:y>0?`${y}m ago`:"just now"})(),k=C.has(m),K=(k?d:d.slice(0,3)).map(v=>{var y,$,O;return{...v,scenarioCount:((O=($=(y=v.analyses)==null?void 0:y[0])==null?void 0:$.scenarios)==null?void 0:O.length)||0}});return e.jsx("div",{className:"rounded p-2",style:{backgroundColor:"#f5f5f5"},children:d.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[K.map((v,y)=>e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(q,{entity:v,nameSize:"10px",pathSize:"9px",pathMaxLength:100,showScenarioCount:!0,scenarioCount:v.scenarioCount})}),y===0&&_&&e.jsx("div",{style:{fontSize:"9px",color:"#8E8E8E",whiteSpace:"nowrap",paddingTop:"2px"},children:_})]},v.sha)),d.length>3&&e.jsx("button",{onClick:()=>{A(v=>{const y=new Set(v);return y.has(m)?y.delete(m):y.add(m),y})},className:"cursor-pointer bg-transparent border-none p-0 hover:underline",style:Q,"aria-label":k?"Show fewer entities":`Show ${d.length-3} more entities`,children:k?"Show less":`+${d.length-3} more`})]})},m)})})]})]}),e.jsx("div",{style:{height:"1px",backgroundColor:"#E0E9EC",margin:"0 12px"}}),e.jsx("div",{className:"px-3 pb-2",children:e.jsx(H,{to:"/activity",className:"text-xs font-medium hover:underline cursor-pointer",style:{color:"#005C75"},children:"View All Activity →"})})]})]}),D&&a&&e.jsx(ve,{projectSlug:a,onClose:()=>L(!1)})]})}const Re="/assets/globals-C9s7Lhdl.css";function Fe({text:s,subtext:a,linkText:r,linkTo:p}){const[f,c]=n.useState(!1);return f?null:e.jsx("div",{className:"bg-blue-100 border rounded border-blue-800 shadow-sm mx-6 mt-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[e.jsx("div",{className:"shrink-0",children:e.jsx("svg",{className:"w-5 h-5 text-yellow-600",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-blue-900",children:s}),e.jsx("p",{className:"text-xs text-blue-700 mt-0.5",children:a})]}),e.jsx(H,{to:p,className:"shrink-0 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded hover:bg-blue-700 transition-colors",children:r})]}),e.jsx("button",{type:"button",onClick:()=>c(!0),className:"shrink-0 ml-4 p-1 rounded text-blue-600 hover:text-blue-800 hover:bg-blue-100 transition-colors cursor-pointer","aria-label":"Dismiss banner",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})})]})})}const ls=()=>[{rel:"stylesheet",href:Re},{rel:"icon",type:"image/x-icon",href:"/favicon.ico"}];function Je(){const{currentRun:s,projectSlug:a,currentEntities:r,availableAPIKeys:p,queuedJobCount:f,queueJobs:c,currentlyExecuting:i,historicalRuns:S}=ne(),{toasts:D,closeToast:L}=ye(),h=le(),j=n.useRef(h),l=Y();n.useEffect(()=>{j.current=h},[h]);const g=l.pathname.startsWith("/entity/")&&l.pathname.includes("/edit/")||l.pathname.startsWith("/dev/"),I=l.pathname.includes("/fullscreen");return n.useEffect(()=>{const T=new EventSource("/api/events");let C=null,A=0;const w=2e3;return T.addEventListener("message",o=>{const x=JSON.parse(o.data);if(x.type==="queue")j.current.revalidate(),A=Date.now();else if(x.type==="db-change"||x.type==="unknown"){const u=Date.now(),N=u-A;N<w?(C&&clearTimeout(C),C=setTimeout(()=>{j.current.revalidate(),A=Date.now(),C=null},w-N)):(j.current.revalidate(),A=u)}}),T.addEventListener("error",o=>{console.error("SSE connection error:",o)}),()=>{C&&clearTimeout(C),T.close()}},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`min-h-screen ${g?"":"grid"} bg-cygray-10`,style:g?void 0:{gridTemplateColumns:"96px minmax(900px, 1fr)"},children:[!g&&e.jsx(He,{}),e.jsxs("div",{className:"max-h-screen overflow-auto bg-white",children:[p.length===0&&e.jsx(Fe,{text:"No AI API keys configured. Please provide an AI API key at your earliest convenience.",subtext:"An API key is required for stable, frequent use of CodeYam",linkText:"Configure API Keys",linkTo:"/settings"}),e.jsx(re,{})]})]}),e.jsx(qe,{toasts:D,onClose:L}),!I&&e.jsx(Be,{currentRun:s,projectSlug:a,currentEntities:r,isAnalysisStarting:!1,queuedJobCount:f,queueJobs:c,currentlyExecuting:i,historicalRuns:S})]})}const rs=se(function(){return e.jsxs("html",{lang:"en",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),e.jsx(te,{}),e.jsx(ie,{})]}),e.jsxs("body",{children:[e.jsx(ue,{children:e.jsx(fe,{children:e.jsx(Je,{})})}),e.jsx(oe,{}),e.jsx(ae,{})]})]})});export{rs as default,ls as links};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function G(s,n,z,C,E){var Q,a,D,F,I,P,R,U;const e=(Q=n==null?void 0:n.scenarios)==null?void 0:Q.find(r=>r.name===s.name),k=!!(e!=null&&e.startedAt),T=!!(e!=null&&e.screenshotStartedAt),y=!!(e!=null&&e.screenshotFinishedAt),v=!!(e!=null&&e.finishedAt),L=1800*1e3,$=T&&!y&&(e==null?void 0:e.screenshotStartedAt)&&Date.now()-new Date(e.screenshotStartedAt).getTime()>L,h=!!((D=(a=s.metadata)==null?void 0:a.screenshotPaths)!=null&&D[0])||!!((F=s.metadata)!=null&&F.executionResult),m=T&&!y,A=e==null?void 0:e.error,o=(P=(I=s.metadata)==null?void 0:I.executionResult)==null?void 0:P.error,u=[];if(n!=null&&n.errors&&n.errors.length>0)for(const r of n.errors)u.push({source:`${r.phase} phase`,message:r.message});if(n!=null&&n.steps)for(const r of n.steps)r.error&&u.push({source:r.name,message:r.error});const w=!h&&!A&&!o&&u.length>0,t=!!(A||o||$||w),M=$?"Capture timed out after 30 minutes":(typeof A=="string"?A:null)||(o==null?void 0:o.message)||(w?`Analysis error: ${u[0].message}`:null),O=$?"The capture process has been running for more than 30 minutes and likely got stuck. Consider re-running the analysis.":(e==null?void 0:e.errorStack)||(o==null?void 0:o.stack)||null,p=(C&&E?E.jobs.some(r=>{var x;return((x=r.entityShas)==null?void 0:x.includes(C))||r.type==="analysis"&&r.entityShas&&r.entityShas.length===0})||((U=(R=E.currentlyExecuting)==null?void 0:R.entityShas)==null?void 0:U.includes(C)):!1)&&!k&&!t||!!(e!=null&&e.analyzing)&&!k&&!t,f=k&&!T&&!v&&!t,_=(p||f||m)&&!t,c=(p||f)&&z===!1&&!h;let d;c?d="crashed":t?d="error":h||v?d="completed":m?d="capturing":f?d="starting":p?d="queued":d="pending";let i="📷",l="pending",b=!1,g=`Not captured: ${s.name}`;const N="border-gray-300",q=t||c?"bg-red-50":"bg-white";return t||c?(i="⚠️",l="error",g=`Error: ${c?"Analysis process crashed":M||"Unknown error"}`):p?(i="⋯",l="queued",g=`Queued: ${s.name}`):f?(i="⋯",l="starting",b=!0,g=`Starting server for ${s.name}...`):m&&!t?(i="⋯",l="capturing",b=!0,g=`Capturing ${s.name}...`):h&&(i="✓",l="completed",g=s.name),{hasError:t||c,errorMessage:c?"Analysis process crashed":M,errorStack:c?"Process terminated unexpectedly before completing analysis":O,isCapturing:m,isCaptured:h,hasCrashed:c,isAnalyzing:_,isQueued:p,isServerStarting:f,status:d,icon:i,iconType:l,shouldSpin:b,title:g,borderColor:N,bgColor:q}}export{G as g};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c}from"./createLucideIcon-CgUsG7ib.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 e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],o=c("search",e);export{o as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as te,u as ae,e as re,c as ne,f as ie,r,j as e}from"./chunk-JMJ3UQ3L-BambyYE_.js";import{u as oe}from"./useReportContext-DsJbgMY9.js";const me=()=>[{title:"CodeYam - Settings"},{name:"description",content:"Configure project settings"}];function D(c){if(!c)return"";const t=[c.command];return c.args&&c.args.length>0&&t.push(...c.args),t.join(" ")}function F({mock:c,onSave:t,onCancel:o}){const[i,u]=r.useState(c.entityName),[l,n]=r.useState(c.filePath),[p,x]=r.useState(c.content),y=()=>{if(!i.trim()||!l.trim()||!p.trim()){alert("All fields are required");return}t({entityName:i,filePath:l,content:p})};return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Entity Name"}),e.jsx("input",{type:"text",value:i,onChange:m=>u(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., determineDatabaseType"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"File Path"}),e.jsx("input",{type:"text",value:l,onChange:m=>n(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., packages/database/src/lib/kysely/db.ts"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Content"}),e.jsx("textarea",{value:p,onChange:m=>x(m.target.value),rows:6,className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]",placeholder:"e.g., function determineDatabaseType() { return 'postgresql' }"})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx("button",{type:"button",onClick:o,className:"px-4 py-2 bg-gray-200 text-gray-800 border-none rounded text-sm cursor-pointer hover:bg-gray-300",children:"Cancel"}),e.jsx("button",{type:"button",onClick:y,className:"px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Save"})]})]})}function le(c){try{return new Date(c).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return c}}const xe=te(function(){var R,q;const{config:t,secrets:o,versionInfo:i,error:u}=ae(),l=re(),n=ne(),p=ie(),[x,y]=r.useState("project-metadata");oe({source:"settings-page"});const[m,h]=r.useState((t==null?void 0:t.universalMocks)||[]),[j,A]=r.useState(((t==null?void 0:t.pathsToIgnore)||[]).join(", ")),[S,V]=r.useState(((t==null?void 0:t.pathsToIgnore)||[]).join(", ")),[$,k]=r.useState((o==null?void 0:o.GROQ_API_KEY)||""),[z,P]=r.useState((o==null?void 0:o.ANTHROPIC_API_KEY)||""),[G,I]=r.useState((o==null?void 0:o.OPENAI_API_KEY)||""),[f,U]=r.useState(!1),[N,Y]=r.useState(!1),[v,H]=r.useState(!1),[K,g]=r.useState(!1),[M,L]=r.useState(!1),[T,E]=r.useState(!1),[W,C]=r.useState(null),[J,b]=r.useState(!1),[w,_]=r.useState({});r.useEffect(()=>{var s;if(t){h(t.universalMocks||[]);const a=(t.pathsToIgnore||[]).join(", ");A(a),V(a);const d={};(s=t.webapps)==null||s.forEach((O,se)=>{O.startCommand&&(d[se]=D(O.startCommand))}),_(d)}o&&(k(o.GROQ_API_KEY||""),P(o.ANTHROPIC_API_KEY||""),I(o.OPENAI_API_KEY||""))},[t,o]),r.useEffect(()=>{if(l!=null&&l.success){g(!0);const s=setTimeout(()=>g(!1),3e3);return()=>clearTimeout(s)}},[l]),r.useEffect(()=>{if(n.state==="idle"&&n.data&&!T){console.log("[Settings] Fetcher data:",n.data);const s=n.data;if(s.success){console.log("[Settings] Save successful, revalidating..."),g(!0),E(!0),(j!==S||s.requiresRestart)&&L(!0),p.revalidate();const a=setTimeout(()=>{g(!1),E(!1)},3e3);return()=>clearTimeout(a)}}},[n.state,n.data,T,p,j,S]);const Q=s=>{s.preventDefault();const a=new FormData(s.currentTarget);a.set("universalMocks",JSON.stringify(m)),a.set("startCommands",JSON.stringify(w)),console.log("[Settings] Submitting form data:",{universalMocks:a.get("universalMocks"),startCommands:a.get("startCommands"),openAiApiKey:a.get("openAiApiKey")?"***":"(empty)"}),n.submit(a,{method:"post"})},B=s=>{h([...m,s]),b(!1)},X=(s,a)=>{const d=[...m];d[s]=a,h(d),C(null)},Z=s=>{h(m.filter((a,d)=>d!==s))};if(u)return e.jsxs("div",{className:"max-w-6xl mx-auto p-8 font-sans",children:[e.jsx("header",{className:"mb-6 pb-4 border-b border-gray-200",children:e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Settings"})})}),e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:e.jsx("p",{className:"text-red-700",children:u})})]});const ee=[{id:"project-metadata",label:"Project Metadata"},{id:"ai-provider",label:"AI Provider Configuration"},{id:"commands",label:"Commands"},{id:"paths-to-ignore",label:"Paths To Ignore"},{id:"universal-mocks",label:"Universal Mocks"},{id:"current-configuration",label:"Current Configuration"}];return e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen",children:e.jsxs("div",{className:"px-20 py-12 font-sans",children:[e.jsxs("div",{className:"mb-8 flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-semibold text-gray-900 mb-2",children:"Settings"}),e.jsx("p",{className:"text-gray-600",children:"Project Configuration"})]}),e.jsx("button",{type:"submit",form:"settings-form",disabled:n.state==="submitting",className:"px-6 py-2 bg-[#005C75] text-white border-none rounded text-sm font-medium cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 hover:bg-[#004a5d] whitespace-nowrap",children:n.state==="submitting"?"Saving...":"Save Settings"})]}),e.jsxs("div",{className:"flex gap-8 items-start",children:[e.jsx("nav",{className:"w-64 flex-shrink-0",children:e.jsx("ul",{className:"space-y-1",children:ee.map(s=>e.jsx("li",{children:e.jsx("button",{type:"button",onClick:()=>y(s.id),className:`w-full text-left px-0 py-2.5 text-sm transition-colors cursor-pointer ${x===s.id?"text-[#005C75] font-medium":"text-gray-600 hover:text-gray-900"}`,children:s.label})},s.id))})}),e.jsx("div",{className:"flex-1 min-w-0 -mt-2",children:e.jsxs("form",{id:"settings-form",onSubmit:Q,className:"space-y-6",children:[x==="project-metadata"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Project Metadata"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"block mb-2 font-medium text-gray-700",children:"Web Applications"}),t!=null&&t.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,a)=>{var d;return e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.startCommand&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsxs("span",{className:"text-gray-900 font-mono text-xs",children:[s.startCommand.command," ",(d=s.startCommand.args)==null?void 0:d.join(" ")]})]})]})},a)})}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"}),e.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Web applications are detected during initialization. To modify, edit `.codeyam/config.json` or re-run `codeyam init`."})]})]}),x==="ai-provider"&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Provider API Keys"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure API keys for AI-powered analysis. Choose the provider that best fits your needs."}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Groq"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Lightning-fast inference with industry-leading speed. Groq's LPU architecture delivers exceptional performance for real-time AI applications with competitive pricing."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$0.10/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 850 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Less reliable, but capable of producing reasonable results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"groqApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:f?"text":"password",id:"groqApiKey",name:"groqApiKey",value:$,onChange:s=>k(s.target.value),placeholder:"gsk_...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>U(!f),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:f?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"Anthropic Claude"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Advanced reasoning and coding capabilities with superior context understanding. Claude excels at complex analysis tasks and provides highly accurate results with detailed explanations."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$3.00/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 120 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"anthropicApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:N?"text":"password",id:"anthropicApiKey",name:"anthropicApiKey",value:z,onChange:s=>P(s.target.value),placeholder:"sk-ant-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>Y(!N),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:N?"Hide":"Show"})]})]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsx("div",{className:"flex items-start justify-between mb-3",children:e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-semibold text-gray-900 mb-1",children:"OpenAI GPT"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Industry-standard AI with broad capabilities and extensive ecosystem. GPT models offer reliable performance across diverse tasks with good balance of speed and quality."}),e.jsxs("div",{className:"flex gap-3 text-xs",children:[e.jsxs("div",{className:"px-2 py-1 bg-green-100 text-green-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Cost:"})," ","$2.50/1M tokens"]}),e.jsxs("div",{className:"px-2 py-1 bg-cyan-100 text-cyan-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Speed:"})," 150 tokens/s"]}),e.jsxs("div",{className:"px-2 py-1 bg-purple-100 text-purple-800 rounded",children:[e.jsx("span",{className:"font-medium",children:"Reliability:"})," ","Consistent, high quality results"]})]})]})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("label",{htmlFor:"openAiApiKey",className:"block text-sm font-medium text-gray-700 mb-2",children:"API Key"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:v?"text":"password",id:"openAiApiKey",name:"openAiApiKey",value:G,onChange:s=>I(s.target.value),placeholder:"sk-...",className:"w-full px-3 py-2 pr-24 border border-gray-300 rounded text-sm focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("button",{type:"button",onClick:()=>H(!v),className:"absolute right-2 top-1/2 -translate-y-1/2 px-3 py-1 text-xs text-gray-600 hover:text-gray-800 focus:outline-none cursor-pointer",children:v?"Hide":"Show"})]})]})]})]})]}),x==="commands"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Commands"}),e.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Configure start commands for your web applications"}),t!=null&&t.webapps&&t.webapps.length>0?e.jsx("div",{className:"space-y-4",children:t.webapps.map((s,a)=>e.jsxs("div",{className:"border border-gray-200 rounded-lg p-5 bg-white",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-base font-semibold text-gray-900 mb-1",children:s.path==="."?"Root":s.path}),e.jsx("div",{className:"text-sm text-gray-600",children:s.framework})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:`startCommand-${a}`,className:"block text-sm font-medium text-gray-700 mb-2",children:"Start Command"}),e.jsx("input",{type:"text",id:`startCommand-${a}`,name:`startCommand-${a}`,value:w[a]||"",onChange:d=>_({...w,[a]:d.target.value}),placeholder:"e.g., pnpm dev --port $PORT",className:"w-full px-3 py-2 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-1 focus:ring-[#005C75]"}),e.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Use $PORT as a placeholder for the dynamic port number"})]})]},a))}):e.jsx("p",{className:"text-sm text-gray-600 italic",children:"No web applications configured"})]}),x==="paths-to-ignore"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Paths To Ignore"}),e.jsx("input",{type:"text",id:"pathsToIgnore",name:"pathsToIgnore",value:j,onChange:s=>A(s.target.value),placeholder:"e.g., __tests__, \\.test\\.ts$, ^background (no quotes needed)",className:"w-full px-3 py-3 border border-gray-300 rounded text-sm font-mono focus:outline-none focus:border-[#005C75] focus:ring-2 focus:ring-[#005C75]/10"}),e.jsxs("p",{className:"mt-2 text-sm text-gray-600",children:["Comma-separated list of regex patterns for paths to ignore during file watching. Examples:"," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"__tests__"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"\\.test\\.tsx?$"}),","," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"^background"}),e.jsx("br",{}),e.jsx("span",{className:"text-xs text-gray-500 mt-1 inline-block",children:"Note: Files matching patterns in .gitignore are also automatically ignored"})]})]}),x==="universal-mocks"&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Universal Mocks"}),e.jsx("p",{className:"mb-3 text-sm text-gray-600",children:"Mock functions that will be applied across all entity simulations"}),m.length===0?e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-sm text-gray-500 mb-3",children:"No universal mocks configured"}),e.jsx("button",{type:"button",onClick:()=>b(!0),className:"px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Add Mock"})]}):e.jsx("div",{className:"space-y-3",children:m.map((s,a)=>e.jsx("div",{className:"p-4 bg-gray-50 rounded border border-gray-200",children:W===a?e.jsx(F,{mock:s,onSave:d=>X(a,d),onCancel:()=>C(null)}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-gray-800 mb-1",children:s.entityName}),e.jsx("div",{className:"text-sm text-gray-600 mb-2",children:s.filePath}),e.jsx("pre",{className:"text-xs bg-white p-2 rounded border border-gray-200 overflow-x-auto",children:s.content})]}),e.jsxs("div",{className:"flex gap-2 ml-3",children:[e.jsx("button",{type:"button",onClick:()=>C(a),className:"px-3 py-1 bg-teal-600 text-white border-none rounded text-sm cursor-pointer hover:bg-teal-700",children:"Edit"}),e.jsx("button",{type:"button",onClick:()=>Z(a),className:"px-3 py-1 bg-red-600 text-white border-none rounded text-sm cursor-pointer hover:bg-red-700",children:"Delete"})]})]})})},a))}),m.length>0&&e.jsx("button",{type:"button",onClick:()=>b(!0),className:"mt-4 px-4 py-2 bg-[#005C75] text-white border-none rounded text-sm cursor-pointer hover:bg-[#004a5d]",children:"Add Mock"})]}),x==="current-configuration"&&e.jsxs("div",{className:"space-y-6",children:[t&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Current Configuration"}),e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded mb-6",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[t.projectSlug&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Project Slug:"})," ",e.jsx("span",{className:"text-gray-900",children:t.projectSlug})]}),t.packageManager&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"})," ",e.jsx("span",{className:"text-gray-900",children:t.packageManager})]})]})}),t.webapps&&t.webapps.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"Web Applications"}),e.jsx("div",{className:"space-y-3",children:t.webapps.map((s,a)=>e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Path:"})," ",e.jsx("span",{className:"text-gray-900",children:s.path==="."?"Root":s.path})]}),s.appDirectory&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"App Directory:"})," ",e.jsx("span",{className:"text-gray-900",children:s.appDirectory})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Framework:"})," ",e.jsx("span",{className:"text-gray-900",children:s.framework})]}),s.startCommand&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Start Command:"})," ",e.jsx("span",{className:"text-gray-900 font-mono text-xs",children:D(s.startCommand)})]})]})},a))})]})]}),i&&e.jsxs("div",{className:"mt-6",children:[e.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"Version Information"}),e.jsx("div",{className:"p-4 bg-white border border-gray-200 rounded",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[i.webserverVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Webserver:"})," ",e.jsx("span",{className:"text-gray-900 font-mono",children:i.webserverVersion.version||"unknown"})]}),i.templateVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Analyzer Template:"})," ",e.jsx("span",{className:"font-mono text-gray-900",children:i.templateVersion.version||((R=i.templateVersion.gitCommit)==null?void 0:R.slice(0,7))||"unknown"}),i.templateVersion.buildTimestamp&&e.jsxs("span",{className:"text-gray-500 ml-2",children:["(built"," ",le(i.templateVersion.buildTimestamp),")"]})]}),i.cachedAnalyzerVersion&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Cached Analyzer:"})," ",e.jsx("span",{className:"font-mono text-gray-900",children:i.cachedAnalyzerVersion.version||((q=i.cachedAnalyzerVersion.gitCommit)==null?void 0:q.slice(0,7))||"unknown"}),i.isCacheStale?e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-amber-100 text-amber-800 rounded text-xs",children:"Stale - will update on next analysis"}):e.jsx("span",{className:"ml-2 px-2 py-0.5 bg-green-100 text-green-800 rounded text-xs",children:"Up to date"})]}),!i.cachedAnalyzerVersion&&(t==null?void 0:t.projectSlug)&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Cached Analyzer:"})," ",e.jsx("span",{className:"text-gray-500 italic",children:"Not initialized - will be created on first analysis"})]})]})})]})]})]})})]}),(K||M||(l==null?void 0:l.error)||n.data&&typeof n.data=="object"&&"error"in n.data)&&e.jsxs("div",{className:"mt-6 max-w-5xl mx-auto space-y-3",children:[K&&e.jsx("div",{className:"text-emerald-600 text-sm font-medium bg-emerald-50 border border-emerald-200 rounded px-4 py-2",children:"Settings saved successfully!"}),M&&e.jsxs("div",{className:"text-amber-700 text-sm font-medium bg-amber-50 border border-amber-200 rounded px-4 py-2",children:[e.jsx("div",{children:"⚠️ Settings changed. Please restart CodeYam for changes to take effect:"}),e.jsx("code",{className:"ml-2 bg-amber-100 px-2 py-1 rounded text-xs",children:"codeyam stop && codeyam"})]}),(l==null?void 0:l.error)&&e.jsx("div",{className:"text-red-600 text-sm font-medium bg-red-50 border border-red-200 rounded px-4 py-2",children:l.error}),(()=>{if(n.data&&typeof n.data=="object"&&"error"in n.data){const s=n.data;return typeof s.error=="string"?e.jsx("div",{className:"text-red-600 text-sm font-medium bg-red-50 border border-red-200 rounded px-4 py-2",children:s.error}):null}return null})()]}),J&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-2xl w-full p-6",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-900",children:"Add Universal Mock"}),e.jsx(F,{mock:{entityName:"",filePath:"",content:""},onSave:B,onCancel:()=>b(!1)})]})})]})})});export{xe as default,me as meta};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as B,u as $,r as d,j as e,a as R,L as E,c as U}from"./chunk-JMJ3UQ3L-BambyYE_.js";import{u as _}from"./useReportContext-DsJbgMY9.js";import{S as V}from"./SafeScreenshot-BfmDgXxG.js";import{L as W}from"./LoadingDots-D1CdlbrV.js";import{E as P}from"./EntityTypeIcon-CXFKsCOD.js";import{g as H,a as Q,f as Y}from"./fileTableUtils-DAtOlaWE.js";import{C as q}from"./chevron-down-BYimnrHg.js";import{S as J}from"./search-DDGjYAMJ.js";import{L as K}from"./loader-circle-CNp9QFCX.js";import"./createLucideIcon-CgUsG7ib.js";const ie=()=>[{title:"Simulations - CodeYam"},{name:"description",content:"A visual gallery of your recently captured component screenshots"}],ce=B(function(){const l=$(),c=l.entities,p=l.queueState;_({source:"simulations-page"});const[o,S]=d.useState(""),[x,u]=d.useState("visual"),h=d.useMemo(()=>{const s=[];return c.forEach(r=>{var y;const n=(y=r.analyses)==null?void 0:y[0];if(n!=null&&n.scenarios){const b=n.scenarios.map(i=>{var C,k,A,z,L;const j=(k=(C=i.metadata)==null?void 0:C.screenshotPaths)==null?void 0:k[0],N=(A=i.metadata)==null?void 0:A.noScreenshotSaved,F=j&&!N,T=(L=(z=n.status)==null?void 0:z.scenarios)==null?void 0:L.find(I=>I.name===i.name),M=T&&T.screenshotStartedAt&&!T.screenshotFinishedAt;let w;return F?w="completed":M?w="capturing":w="error",{scenarioName:i.name,scenarioDescription:i.description||"",screenshotPath:j||"",scenarioId:i.id,state:w}}).filter(i=>i.state==="completed"||i.state==="capturing");b.length>0&&s.push({entity:r,screenshots:b,createdAt:n.createdAt||""})}}),s.sort((r,n)=>new Date(n.createdAt).getTime()-new Date(r.createdAt).getTime()),s},[c]),g=d.useMemo(()=>c.filter(s=>{var y,b;const r=(y=s.analyses)==null?void 0:y[0];return!((b=r==null?void 0:r.scenarios)==null?void 0:b.some(i=>{var j,N;return(N=(j=i.metadata)==null?void 0:j.screenshotPaths)==null?void 0:N[0]}))}),[c]),f=d.useMemo(()=>h.filter(({entity:s})=>{const r=!o||s.name.toLowerCase().includes(o.toLowerCase()),n=x==="all"||s.entityType===x;return r&&n}),[h,o,x]),a=d.useMemo(()=>g.filter(s=>{const r=!o||s.name.toLowerCase().includes(o.toLowerCase()),n=x==="all"||s.entityType===x;return r&&n}),[g,o,x]),m=d.useCallback(s=>{S(s.target.value)},[]),D=d.useCallback(s=>{u(s.target.value)},[]),v=h.length>0;return e.jsx("div",{className:"bg-[#f9f9f9] min-h-screen overflow-y-auto",children:e.jsxs("div",{className:"px-20 py-12",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-semibold text-gray-900 mb-2",children:"Simulations"}),e.jsx("p",{className:"text-gray-600",children:"A visual gallery of your recently captured simulations."})]}),!v&&e.jsx("div",{className:"bg-[#D1F3F9] border border-[#A5E8F0] rounded-lg p-4 mb-6",children:e.jsxs("p",{className:"text-sm text-gray-700 m-0",children:["This page will display a visual gallery of your recently captured component simulations."," ",e.jsx("strong",{children:"Start by analyzing your first component below."})]})}),e.jsxs("div",{className:"bg-white border-b border-gray-200 rounded-t-lg px-5 py-4 mb-3",children:[e.jsx("div",{className:"text-[11px] text-gray-500 mb-2 uppercase",children:"Filters"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"appearance-none bg-gray-50 border border-gray-200 rounded px-3 pr-8 text-[13px] h-[39px] cursor-pointer focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] hover:border-gray-300 transition-colors",value:x,onChange:D,children:[e.jsx("option",{value:"all",children:"All Types"}),e.jsx("option",{value:"visual",children:"Visual"}),e.jsx("option",{value:"library",children:"Library"})]}),e.jsx(q,{className:"absolute right-2 top-1/2 -translate-y-1/2 w-3 h-3 text-gray-500 pointer-events-none"})]}),e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(J,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"Search component",className:"w-full bg-gray-50 border border-gray-200 rounded pl-9 pr-3 text-[13px] h-[39px] placeholder:text-gray-400 focus:outline-none focus:ring-0 focus:border-2 focus:border-[#005c75] transition-colors",value:o,onChange:m})]})]})]}),v&&f.length>0&&e.jsx("div",{className:"bg-[#efefef] rounded-lg mb-2 text-[11px] font-normal leading-[16px] text-[#3e3e3e] uppercase",children:e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-2",children:[e.jsx("span",{children:"ENTITY"}),e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-[#3e3e3e]",children:e.jsx("path",{d:"M3 5L6 8L9 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),e.jsxs("div",{className:"flex flex-col gap-[3px]",children:[v&&(f.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-8 text-center text-gray-500",children:"No simulations match your filters."}):e.jsx(e.Fragment,{children:f.map(({entity:s,screenshots:r})=>e.jsx(O,{entity:s,screenshots:r,queueJobs:(p==null?void 0:p.jobs)||[]},s.sha))})),!v&&(a.length===0?e.jsx("div",{className:"bg-white border border-gray-200 rounded-b-lg p-8 text-center text-gray-500",children:"No components found matching your filters."}):a.map(s=>e.jsx(G,{entity:s},s.sha)))]})]})})});function O({entity:t,screenshots:l,queueJobs:c}){var h,g,f;const p=R(),o=l.length||(((f=(g=(h=t.analyses)==null?void 0:h[0])==null?void 0:g.scenarios)==null?void 0:f.length)??0),S=a=>{p(`/entity/${t.sha}/scenarios/${a}?from=simulations`)},x=H(t,c),u=Q(x);return e.jsx("div",{className:"bg-white rounded hover:bg-gray-50 transition-colors border-b border-[#e1e1e1]",children:e.jsxs("div",{className:"px-5 pb-[15px]",children:[e.jsxs("div",{className:"flex items-center justify-between py-[10px]",children:[e.jsxs(E,{to:`/entity/${t.sha}`,className:"flex items-center gap-2 no-underline",children:[e.jsx(P,{type:t.entityType}),e.jsxs("span",{className:"font-['IBM_Plex_Sans'] font-medium text-[12px] leading-[15px] text-[#343434]",children:[t.name," (",o,")"]})]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsxs("span",{className:"px-2 rounded inline-flex items-center gap-1.5 max-w-full whitespace-nowrap overflow-hidden",style:{backgroundColor:u.bgColor,color:u.textColor,height:"23px",fontSize:"10px",lineHeight:"15px"},children:[u.icon,u.text]}),e.jsx("button",{onClick:()=>void p(`/entity/${t.sha}/logs`),className:"bg-[#e0e9ec] text-[#005c75] rounded font-['IBM_Plex_Sans'] font-semibold hover:bg-[#d0dfe5] transition-colors px-[10px] py-0 cursor-pointer border-none",style:{fontSize:"10px",lineHeight:"22px"},children:"View Logs"})]})]}),e.jsx("div",{className:"flex gap-2.5 overflow-x-auto pb-1",children:l.length>0?l.map(a=>e.jsx("button",{onClick:()=>S(a.scenarioId||""),className:"shrink-0 block cursor-pointer bg-transparent border-none p-0",children:e.jsx("div",{className:"w-36 h-24 rounded-md border overflow-hidden flex items-center justify-center transition-all",style:{"--hover-border":"#005C75",backgroundColor:a.state==="capturing"?"#f9f9f9":"#f3f4f6",borderColor:a.state==="capturing"?"#efefef":"#d1d5db"},onMouseEnter:m=>{a.state==="completed"&&(m.currentTarget.style.borderColor="#005C75",m.currentTarget.style.boxShadow="0 4px 12px rgba(0, 92, 117, 0.15)")},onMouseLeave:m=>{m.currentTarget.style.borderColor=a.state==="capturing"?"#efefef":"#d1d5db",m.currentTarget.style.boxShadow="none"},children:a.state==="completed"?e.jsx(V,{screenshotPath:a.screenshotPath,alt:a.scenarioName,className:"max-w-full max-h-full object-contain"}):a.state==="capturing"?e.jsx(W,{size:"medium"}):null})},a.scenarioId)):e.jsx("div",{className:"text-xs text-gray-400 py-4",children:"No screenshots available"})})]})})}function G({entity:t}){const l=U(),[c,p]=d.useState(!1),o=()=>{p(!0),l.submit({entitySha:t.sha,filePath:t.filePath||""},{method:"post",action:"/api/analyze"})};return d.useEffect(()=>{l.state==="idle"&&c&&p(!1)},[l.state,c]),e.jsx("div",{className:"bg-white rounded hover:bg-gray-100 transition-colors cursor-pointer border-b border-[#e1e1e1]",onClick:o,children:e.jsxs("div",{className:"px-5 py-4 flex items-center",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx(P,{type:t.entityType}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-0.5",children:[e.jsx(E,{to:`/entity/${t.sha}`,className:"text-sm font-medium text-gray-900 no-underline",children:t.name}),e.jsx("span",{className:"text-[10px] font-semibold px-1 py-0.5 rounded",style:{color:t.entityType==="visual"?"#7c3aed":t.entityType==="library"?"#0DBFE9":t.entityType==="type"?"#dc2626":t.entityType==="data"?"#2563eb":t.entityType==="index"?"#ea580c":t.entityType==="functionCall"?"#7c3aed":t.entityType==="class"?"#059669":t.entityType==="method"?"#0891b2":"#6b7280",backgroundColor:t.entityType==="visual"?"#f3e8ff":t.entityType==="library"?"#cffafe":t.entityType==="type"?"#fee2e2":t.entityType==="data"?"#dbeafe":t.entityType==="index"?"#ffedd5":t.entityType==="functionCall"?"#f3e8ff":t.entityType==="class"?"#d1fae5":t.entityType==="method"?"#cffafe":"#f3f4f6"},children:t.entityType?t.entityType.toUpperCase():"UNKNOWN"})]}),e.jsx("div",{className:"text-xs text-gray-400 truncate",children:t.filePath})]})]}),e.jsx("div",{className:"w-32 flex justify-center",children:e.jsx("span",{className:"text-[10px] text-gray-500 bg-gray-100 px-2 py-1 rounded",children:"Not analyzed"})}),e.jsx("div",{className:"w-32 text-center text-[10px] text-gray-500",children:Y(t.createdAt||null)}),e.jsx("div",{className:"w-24 flex justify-end",children:c||l.state!=="idle"?e.jsxs("div",{className:"px-2 py-1 bg-pink-100 rounded text-xs text-pink-700 font-semibold flex items-center gap-1.5",children:[e.jsx(K,{size:14,className:"animate-spin"}),"Analyzing..."]}):e.jsx("button",{onClick:o,className:"bg-[#e0e9ec] text-[#005c75] px-4 py-1.5 rounded text-xs font-medium hover:bg-[#d0dde1] transition-colors cursor-pointer",children:"Analyze"})})]})})}export{ce as default,ie as meta};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-CgUsG7ib.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 a=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],o=e("triangle-alert",a);export{o as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as d,j as e}from"./chunk-JMJ3UQ3L-BambyYE_.js";const N=10,A=1024;function T({currentViewportWidth:g,currentPresetName:y,onDevicePresetClick:m,devicePresets:u,onHoverChange:o,hideLabel:v=!1}){const[a,l]=d.useState(null),c=d.useRef(null),h=d.useMemo(()=>[...u].sort((s,n)=>s.width-n.width),[u]),{fittingPresets:t,overflowPresets:i}=d.useMemo(()=>{const s=[],n=[];for(const r of h)r.width<=A?s.push(r):n.push(r);return n.sort((r,f)=>f.width-r.width),{fittingPresets:s,overflowPresets:n}},[h]),b=d.useCallback(s=>{if(!c.current)return null;const n=c.current.getBoundingClientRect(),r=s-n.left,f=n.width,w=f/2,z=(t.length>0?t[t.length-1].width:0)/2,E=w-z,P=w+z,M=i.length>0?(i.length-1)*N:0;if(i.length>0){if(r<E){if(r<=M){const x=Math.min(Math.floor(r/N),i.length-1);return i[x]}return i[i.length-1]}if(r>P){const x=f-r;if(x<=M){const j=Math.min(Math.floor(x/N),i.length-1);return i[j]}return i[i.length-1]}}const C=Math.abs(r-w);for(let x=t.length-1;x>=0;x--){const j=t[x],F=t[x-1],I=j.width/2,R=F?F.width/2:0;if(C<=I&&C>=R)return j}return t[0]||i[i.length-1]||null},[t,i]),p=d.useCallback(s=>{const n=b(s.clientX);l(n),o==null||o(n)},[b,o]),S=d.useCallback(()=>{l(null),o==null||o(null)},[o]),$=d.useCallback(s=>{const n=b(s.clientX);n&&m(n)},[b,m]),k=a||{name:y,width:g};return e.jsxs("div",{ref:c,className:"relative h-6 shrink-0 overflow-hidden cursor-pointer",onMouseMove:p,onMouseLeave:S,onClick:$,children:[a&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:e.jsx("div",{className:"h-full transition-all duration-100 bg-[#005C75]",style:{width:`${a.width}px`}})}),e.jsx("div",{className:"absolute inset-0 pointer-events-none",children:t.map(s=>{const n=s.width===g,r=(a==null?void 0:a.name)===s.name,f=s.width/2;return e.jsxs("div",{children:[e.jsx("div",{className:"absolute top-0 bottom-0",style:{left:`calc(50% - ${f}px)`},children:e.jsx("div",{className:`w-0.5 h-full transition-colors duration-75 ${n||r?"bg-white":"bg-[rgba(255,255,255,0.3)]"}`})}),e.jsx("div",{className:"absolute top-0 bottom-0",style:{left:`calc(50% + ${f}px)`},children:e.jsx("div",{className:`w-0.5 h-full transition-colors duration-75 ${n||r?"bg-white":"bg-[rgba(255,255,255,0.3)]"}`})})]},s.name)})}),e.jsx("div",{className:"absolute inset-0 pointer-events-none",children:i.map((s,n)=>{const r=n*N,f=s.width===g,w=(a==null?void 0:a.name)===s.name;return e.jsxs("div",{children:[e.jsx("div",{className:"absolute top-0 bottom-0",style:{left:`${r}px`},children:e.jsx("div",{className:`w-0.5 h-full transition-colors duration-75 ${f||w?"bg-white":"bg-[rgba(255,255,255,0.3)]"}`})}),e.jsx("div",{className:"absolute top-0 bottom-0",style:{right:`${r}px`},children:e.jsx("div",{className:`w-0.5 h-full transition-colors duration-75 ${f||w?"bg-white":"bg-[rgba(255,255,255,0.3)]"}`})})]},s.name)})}),!v&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:e.jsxs("div",{className:`text-[10px] px-2 py-0.5 rounded shadow-sm whitespace-nowrap transition-colors ${a?"bg-[#005c75] text-white":"bg-white/90 text-[#005c75] border border-[rgba(0,92,117,0.25)]"}`,children:[k.name," - ",k.width,"px"]})})]})}function W({width:g,height:y,onSave:m,onCancel:u}){const[o,v]=d.useState(""),[a,l]=d.useState(""),c=()=>{const t=o.trim();if(!t){l("Please enter a name for this custom size");return}m(t)},h=t=>{t.key==="Enter"&&o.trim()&&c(),t.key==="Escape"&&u()};return e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50",children:e.jsxs("div",{className:"bg-white rounded-lg max-w-md w-full p-6 shadow-xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Save Custom Size"}),e.jsx("button",{onClick:u,className:"text-gray-400 hover:text-gray-600 transition-colors cursor-pointer","aria-label":"Close",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsxs("div",{className:"mb-6 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[e.jsx("div",{className:"text-sm text-gray-500 mb-1",children:"Dimensions"}),e.jsxs("div",{className:"text-lg font-medium text-gray-900",children:[g,"px × ",y,"px"]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"custom-size-name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Name"}),e.jsx("input",{id:"custom-size-name",type:"text",value:o,onChange:t=>{v(t.target.value),l("")},onKeyDown:h,placeholder:"e.g., iPhone 15 Pro",className:`w-full px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-[#005c75] focus:border-[#005c75] ${a?"border-red-300":"border-gray-300"}`,autoFocus:!0}),a&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:a})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx("button",{onClick:u,className:"px-4 py-2 bg-gray-100 text-gray-700 text-sm font-medium rounded-md hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-300 transition-colors cursor-pointer",children:"Cancel"}),e.jsx("button",{onClick:c,disabled:!o.trim(),className:"px-4 py-2 bg-[#005c75] text-white text-sm font-medium rounded-md hover:bg-[#004a5c] focus:outline-none focus:ring-2 focus:ring-[#005c75] focus:ring-offset-1 transition-colors cursor-pointer disabled:bg-gray-300 disabled:cursor-not-allowed",children:"Save"})]})]})})}function X(g){const[y,m]=d.useState([]),u=g?`codeyam-custom-sizes-${g}`:null;d.useEffect(()=>{if(!u||typeof window>"u"){m([]);return}try{const l=localStorage.getItem(u);if(l){const c=JSON.parse(l);Array.isArray(c)&&m(c)}}catch(l){console.error("[useCustomSizes] Failed to load custom sizes:",l),m([])}},[u]);const o=d.useCallback(l=>{if(!(!u||typeof window>"u"))try{localStorage.setItem(u,JSON.stringify(l))}catch(c){console.error("[useCustomSizes] Failed to save custom sizes:",c)}},[u]),v=d.useCallback((l,c,h)=>{m(t=>{const i=t.findIndex(S=>S.name===l),b={name:l,width:c,height:h};let p;return i>=0?(p=[...t],p[i]=b):p=[...t,b],o(p),p})},[o]),a=d.useCallback(l=>{m(c=>{const h=c.filter(t=>t.name!==l);return o(h),h})},[o]);return{customSizes:y,addCustomSize:v,removeCustomSize:a}}export{W as S,T as V,X as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as D,r as e}from"./chunk-JMJ3UQ3L-BambyYE_.js";import{u as K}from"./useLastLogLine-BqPPNjAl.js";function C(s){const o=s.replace(/[^a-zA-Z0-9_]+/g,"_");return o.slice(0,1).toUpperCase()+o.slice(1)}function O({analysisId:s,scenarioId:o,scenarioName:u,projectSlug:f,enabled:h=!0,refreshTrigger:l=0}){const B=D(),[g,w]=e.useState(null),[b,E]=e.useState(!1),[q,a]=e.useState(!1),[x,i]=e.useState(!1),d=e.useRef(!1),S=e.useRef(null),R=e.useRef(null),[L,m]=e.useState(0),[A,I]=e.useState(0),r=e.useRef(null),c=e.useRef(!1),{interactiveUrl:M,resetLogs:y}=K(f,h),U=e.useRef(o),F=e.useRef(l);e.useEffect(()=>{F.current!==l&&(F.current=l,g&&(console.log("[useInteractiveMode] Manual refresh triggered"),a(!0),i(!1),m(0),I(t=>t+1),c.current=!1,r.current&&(clearTimeout(r.current),r.current=null)))},[l,g]),e.useEffect(()=>{if(U.current!==o&&(U.current=o,S.current&&R.current&&u)){const t=C(R.current),n=C(u),v=S.current.replace(t,n);w(v),a(!0),i(!1),m(0),I(p=>p+1),c.current=!1,r.current&&(clearTimeout(r.current),r.current=null);return}},[o,u]),e.useEffect(()=>{if(M){const t=M+"?width=600px";S.current=t,u&&(R.current=u),w(t),E(!1),a(!0)}},[M]),e.useEffect(()=>{const t=n=>{n.data.type==="codeyam-resize"&&(c.current||(c.current=!0,r.current&&(clearTimeout(r.current),r.current=null),m(0),i(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{a(!1)})})))};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[]);const k=()=>{c.current=!1,r.current&&clearTimeout(r.current);const t=500*Math.pow(2,L);r.current=setTimeout(()=>{c.current||(L<2?(m(n=>n+1),I(n=>n+1),a(!0)):(console.error("[useInteractiveMode] Interactive mode failed to load after 3 attempts - showing iframe anyway"),i(!0),a(!1)))},t)};return e.useEffect(()=>{h&&!d.current&&o&&s&&(d.current=!0,E(!0),i(!1),w(null),(async()=>{if(f)try{await fetch(`/api/logs/${f}`,{method:"DELETE"})}catch(n){console.error("[useInteractiveMode] Failed to clear log file:",n)}y(),B.submit({action:"start",analysisId:s,scenarioId:o},{method:"post",action:"/api/interactive-mode"})})())},[h,o,s,y,f]),e.useEffect(()=>{const t=s,n=()=>{if(d.current&&t){const p=new URLSearchParams({action:"stop",analysisId:t});console.log("[useInteractiveMode] Sending stop request via sendBeacon");const T=navigator.sendBeacon("/api/interactive-mode",p);console.log("[useInteractiveMode] sendBeacon result:",T),T||(console.log("[useInteractiveMode] sendBeacon failed, using fetch fallback"),fetch("/api/interactive-mode",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:p,keepalive:!0}).catch(z=>console.error("Failed to stop interactive mode:",z)))}},v=()=>{n()};return window.addEventListener("beforeunload",v),()=>{window.removeEventListener("beforeunload",v),console.log("[useInteractiveMode] Cleanup running:",{hasStarted:d.current,analysisId:t}),n()}},[s]),{interactiveServerUrl:g,isStarting:b,isLoading:q,showIframe:x,iframeKey:A,onIframeLoad:k}}export{O as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t}from"./chunk-
|
|
1
|
+
import{r as t}from"./chunk-JMJ3UQ3L-BambyYE_.js";function I(c,s){const[E,l]=t.useState(""),[d,n]=t.useState(!1),[g,a]=t.useState(null),[$,r]=t.useState(!1);t.useEffect(()=>{s&&(r(!1),n(!1),a(null))},[s]),t.useEffect(()=>{if(!c||!s){s||l("");return}const u=async()=>{try{const i=await fetch(`/api/logs/${c}`);if(i.ok){const o=(await i.text()).trim().split(`
|
|
2
2
|
`).filter(e=>e.length>0);if(o.length<3){n(!1),r(!1),a(null),l("");return}const f=o.filter(e=>e.includes("CodeYam Log Level 1"));if(f.length>0){const e=f[f.length-1];l(e.replace(/.*CodeYam Log Level 1: /,""))}const L=o.find(e=>e.includes("$$INTERACTIVE_SERVER_URL$$:"));if(L){const e=L.split("$$INTERACTIVE_SERVER_URL$$:")[1].trim();a(e),r(!0)}o.some(e=>e.includes("CodeYam: Exiting start.js"))&&n(!0)}}catch{}};u().catch(()=>{});const m=setInterval(()=>{u().catch(()=>{})},2e3);return()=>clearInterval(m)},[c,s]);const h=t.useCallback(()=>{l(""),n(!1),a(null),r(!1)},[]);return{lastLine:E,interactiveUrl:g,isCompleted:d,resetLogs:h}}export{I as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,j as x,d as i}from"./chunk-JMJ3UQ3L-BambyYE_.js";const s={source:"navbar"},r=e.createContext(void 0);function l({children:t}){const[n,o]=e.useState(s),a=e.useCallback(u=>{o(u)},[]),c=e.useCallback(()=>{o(s)},[]);return x.jsx(r.Provider,{value:{contextData:n,setContextData:a,resetContextData:c},children:t})}function f(t){const n=e.useContext(r),o=e.useRef(n);e.useEffect(()=>{if(o.current)return o.current.setContextData(t),()=>{var a;(a=o.current)==null||a.resetContextData()}},[t.source,t.entitySha,t.scenarioId,t.analysisId])}function D(){const t=e.useContext(r),n=i();return t?{source:t.contextData.source,entitySha:t.contextData.entitySha,scenarioId:t.contextData.scenarioId,analysisId:t.contextData.analysisId,currentUrl:n.pathname}:{source:"navbar",currentUrl:n.pathname}}export{l as R,D as a,f as u};
|
package/codeyam-cli/src/webserver/build/client/assets/{useToast-DEyawJ8r.js → useToast-DWHcCcl1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as T}from"./chunk-
|
|
1
|
+
import{r as t,j as T}from"./chunk-JMJ3UQ3L-BambyYE_.js";const n=t.createContext(void 0);function m({children:o}){const[i,r]=t.useState([]),c=t.useCallback((s,e="info",a=5e3)=>{const d={id:`toast-${Date.now()}-${Math.random()}`,message:s,type:e,duration:a};r(x=>[...x,d])},[]),u=t.useCallback(s=>{r(e=>e.filter(a=>a.id!==s))},[]);return T.jsx(n.Provider,{value:{toasts:i,showToast:c,closeToast:u},children:o})}function v(){const o=t.useContext(n);if(!o)throw new Error("useToast must be used within a ToastProvider");return o}export{m as T,v as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"fetch-retry";import{H as O,I as Q,J as R,K as V,L as W,M as X,P as Y,S as Z,d as _,a as $,b as aa,c as sa,e as ta,f as oa,g as ra,h as ia,i as ma,j as ea,k as pa,D as la,G as na,F as da,E as ba,l as ua,m as ca,n as Ta,o as Ca,p as ha,q as ya,r as Aa,s as Ba,t as Sa,u as ga,v as Ea,w as Fa,x as Pa,y as ja,z as Da,A as Ma,B as fa,C as qa}from"./server-build-D35o2uae.js";import"typescript";import"kysely";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"child_process";import"util";import"dotenv";import"events";import"uuid";import"url";import"openai";import"p-queue";import"p-retry";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"v8";import"react-diff-viewer-continued";export{O as AnalysisBranchesTableColumns,Q as BranchesTableColumns,R as CommitsTableColumns,V as EntitiesTableColumns,W as EntityBranchesTableColumns,X as FilesTableColumns,Y as ProjectsTableColumns,Z as ScenariosTableColumns,_ as dbToAnalysis,$ as dbToAnalysisBranch,aa as dbToBranch,sa as dbToCommit,ta as dbToEntity,oa as dbToFile,ra as dbToProject,ia as dbToScenario,ma as dbToUserScenario,ea as deleteScenarios,pa as generateSha,la as getDatabase,na as getJsonHelper,da as getPostgreDatabase,ba as getSqliteDatabase,ua as loadAnalyses,ca as loadAnalysis,Ta as loadBranches,Ca as loadCommitBranches,ha as loadCommits,ya as loadEntities,Aa as loadEntity,Ba as loadFiles,Sa as loadProject,ga as updateCommitMetadata,Ea as updateFreshAnalysisMetadata,Fa as updateFreshAnalysisStatus,Pa as updateProjectMetadata,ja as upsertAnalyses,Da as upsertCommitBranches,Ma as upsertCommits,fa as upsertGithubUser,qa as upsertScenarios};
|