genaicode 1.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +371 -88
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/client.d.ts +42 -0
- package/dist/core/client.js +190 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/errors.d.ts +38 -0
- package/dist/core/errors.js +118 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/middleware.d.ts +43 -0
- package/dist/core/middleware.js +173 -0
- package/dist/core/middleware.js.map +1 -0
- package/dist/core/plugins.d.ts +21 -0
- package/dist/core/plugins.js +55 -0
- package/dist/core/plugins.js.map +1 -0
- package/dist/core/prompt.d.ts +14 -0
- package/dist/core/prompt.js +47 -0
- package/dist/core/prompt.js.map +1 -0
- package/dist/core/result.d.ts +5 -0
- package/dist/core/result.js +27 -0
- package/dist/core/result.js.map +1 -0
- package/dist/core/stream.d.ts +11 -0
- package/dist/core/stream.js +93 -0
- package/dist/core/stream.js.map +1 -0
- package/dist/core/types.d.ts +153 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +12 -8
- package/dist/index.js +8 -11
- package/dist/index.js.map +1 -1
- package/dist/pivot-notice.d.ts +1 -0
- package/dist/pivot-notice.js +13 -0
- package/dist/pivot-notice.js.map +1 -0
- package/dist/providers/anthropic-converter.d.ts +12 -0
- package/dist/providers/anthropic-converter.js +111 -0
- package/dist/providers/anthropic-converter.js.map +1 -0
- package/dist/providers/anthropic.d.ts +11 -0
- package/dist/providers/anthropic.js +90 -0
- package/dist/providers/anthropic.js.map +1 -0
- package/dist/providers/fixtures/multimodal-tool-roundtrip.d.ts +4 -0
- package/dist/providers/fixtures/multimodal-tool-roundtrip.js +32 -0
- package/dist/providers/fixtures/multimodal-tool-roundtrip.js.map +1 -0
- package/dist/providers/google-converter.d.ts +10 -0
- package/dist/providers/google-converter.js +142 -0
- package/dist/providers/google-converter.js.map +1 -0
- package/dist/providers/google.d.ts +22 -0
- package/dist/providers/google.js +97 -0
- package/dist/providers/google.js.map +1 -0
- package/dist/providers/openai-converter.d.ts +33 -0
- package/dist/providers/openai-converter.js +192 -0
- package/dist/providers/openai-converter.js.map +1 -0
- package/dist/providers/openai.d.ts +13 -0
- package/dist/providers/openai.js +45 -0
- package/dist/providers/openai.js.map +1 -0
- package/dist/providers.d.ts +11 -0
- package/dist/providers.js +7 -0
- package/dist/providers.js.map +1 -0
- package/docs/pivot.md +111 -0
- package/docs/provider-packages.md +60 -0
- package/docs/retry.md +62 -0
- package/docs/semver.md +55 -0
- package/package.json +34 -91
- package/bin/genaicode-dev.js +0 -12
- package/bin/genaicode.cjs +0 -23
- package/dist/ai-service/ai-studio.d.ts +0 -6
- package/dist/ai-service/ai-studio.js +0 -460
- package/dist/ai-service/ai-studio.js.map +0 -1
- package/dist/ai-service/anthropic.d.ts +0 -5
- package/dist/ai-service/anthropic.js +0 -353
- package/dist/ai-service/anthropic.js.map +0 -1
- package/dist/ai-service/common-types.d.ts +0 -131
- package/dist/ai-service/common-types.js +0 -10
- package/dist/ai-service/common-types.js.map +0 -1
- package/dist/ai-service/common.d.ts +0 -23
- package/dist/ai-service/common.js +0 -59
- package/dist/ai-service/common.js.map +0 -1
- package/dist/ai-service/dall-e.d.ts +0 -7
- package/dist/ai-service/dall-e.js +0 -44
- package/dist/ai-service/dall-e.js.map +0 -1
- package/dist/ai-service/files-api.d.ts +0 -33
- package/dist/ai-service/files-api.js +0 -239
- package/dist/ai-service/files-api.js.map +0 -1
- package/dist/ai-service/github-models.d.ts +0 -13
- package/dist/ai-service/github-models.js +0 -49
- package/dist/ai-service/github-models.js.map +0 -1
- package/dist/ai-service/local-llm.d.ts +0 -6
- package/dist/ai-service/local-llm.js +0 -74
- package/dist/ai-service/local-llm.js.map +0 -1
- package/dist/ai-service/openai-responses.d.ts +0 -9
- package/dist/ai-service/openai-responses.js +0 -332
- package/dist/ai-service/openai-responses.js.map +0 -1
- package/dist/ai-service/openai.d.ts +0 -9
- package/dist/ai-service/openai.js +0 -395
- package/dist/ai-service/openai.js.map +0 -1
- package/dist/ai-service/service-configurations-types.d.ts +0 -79
- package/dist/ai-service/service-configurations-types.js +0 -6
- package/dist/ai-service/service-configurations-types.js.map +0 -1
- package/dist/ai-service/service-configurations.d.ts +0 -42
- package/dist/ai-service/service-configurations.js +0 -241
- package/dist/ai-service/service-configurations.js.map +0 -1
- package/dist/ai-service/unescape-function-call.d.ts +0 -7
- package/dist/ai-service/unescape-function-call.js +0 -59
- package/dist/ai-service/unescape-function-call.js.map +0 -1
- package/dist/ai-service/vertex-ai-claude.d.ts +0 -5
- package/dist/ai-service/vertex-ai-claude.js +0 -160
- package/dist/ai-service/vertex-ai-claude.js.map +0 -1
- package/dist/ai-service/vertex-ai-imagen.d.ts +0 -7
- package/dist/ai-service/vertex-ai-imagen.js +0 -70
- package/dist/ai-service/vertex-ai-imagen.js.map +0 -1
- package/dist/ai-service/vertex-ai.d.ts +0 -6
- package/dist/ai-service/vertex-ai.js +0 -18
- package/dist/ai-service/vertex-ai.js.map +0 -1
- package/dist/cli/cli-options.d.ts +0 -10
- package/dist/cli/cli-options.js +0 -116
- package/dist/cli/cli-options.js.map +0 -1
- package/dist/cli/cli-params.d.ts +0 -29
- package/dist/cli/cli-params.js +0 -118
- package/dist/cli/cli-params.js.map +0 -1
- package/dist/cli/service-autodetect.d.ts +0 -2
- package/dist/cli/service-autodetect.js +0 -17
- package/dist/cli/service-autodetect.js.map +0 -1
- package/dist/cli/validate-cli-params.d.ts +0 -18
- package/dist/cli/validate-cli-params.js +0 -146
- package/dist/cli/validate-cli-params.js.map +0 -1
- package/dist/files/cache-file.d.ts +0 -10
- package/dist/files/cache-file.js +0 -57
- package/dist/files/cache-file.js.map +0 -1
- package/dist/files/file-id-utils.d.ts +0 -7
- package/dist/files/file-id-utils.js +0 -25
- package/dist/files/file-id-utils.js.map +0 -1
- package/dist/files/file-utils.d.ts +0 -2
- package/dist/files/file-utils.js +0 -7
- package/dist/files/file-utils.js.map +0 -1
- package/dist/files/find-files.d.ts +0 -10
- package/dist/files/find-files.js +0 -87
- package/dist/files/find-files.js.map +0 -1
- package/dist/files/path-utils.d.ts +0 -1
- package/dist/files/path-utils.js +0 -12
- package/dist/files/path-utils.js.map +0 -1
- package/dist/files/read-files.d.ts +0 -18
- package/dist/files/read-files.js +0 -107
- package/dist/files/read-files.js.map +0 -1
- package/dist/files/search-files.d.ts +0 -53
- package/dist/files/search-files.js +0 -97
- package/dist/files/search-files.js.map +0 -1
- package/dist/files/source-code-tree.d.ts +0 -16
- package/dist/files/source-code-tree.js +0 -41
- package/dist/files/source-code-tree.js.map +0 -1
- package/dist/files/source-code-types.d.ts +0 -53
- package/dist/files/source-code-types.js +0 -2
- package/dist/files/source-code-types.js.map +0 -1
- package/dist/files/source-code-utils.d.ts +0 -31
- package/dist/files/source-code-utils.js +0 -126
- package/dist/files/source-code-utils.js.map +0 -1
- package/dist/files/summary-cache.d.ts +0 -25
- package/dist/files/summary-cache.js +0 -23
- package/dist/files/summary-cache.js.map +0 -1
- package/dist/files/temp-buffer.d.ts +0 -2
- package/dist/files/temp-buffer.js +0 -12
- package/dist/files/temp-buffer.js.map +0 -1
- package/dist/files/update-files.d.ts +0 -7
- package/dist/files/update-files.js +0 -30
- package/dist/files/update-files.js.map +0 -1
- package/dist/help-docs/genaicode-help-document.d.ts +0 -1
- package/dist/help-docs/genaicode-help-document.js +0 -287
- package/dist/help-docs/genaicode-help-document.js.map +0 -1
- package/dist/images/ensure-alpha.d.ts +0 -1
- package/dist/images/ensure-alpha.js +0 -5
- package/dist/images/ensure-alpha.js.map +0 -1
- package/dist/images/imgly-remove-background.d.ts +0 -2
- package/dist/images/imgly-remove-background.js +0 -21
- package/dist/images/imgly-remove-background.js.map +0 -1
- package/dist/images/resize-image.d.ts +0 -19
- package/dist/images/resize-image.js +0 -22
- package/dist/images/resize-image.js.map +0 -1
- package/dist/images/split-image.d.ts +0 -18
- package/dist/images/split-image.js +0 -25
- package/dist/images/split-image.js.map +0 -1
- package/dist/main/codegen-non-interactive.d.ts +0 -2
- package/dist/main/codegen-non-interactive.js +0 -20
- package/dist/main/codegen-non-interactive.js.map +0 -1
- package/dist/main/codegen-types.d.ts +0 -145
- package/dist/main/codegen-types.js +0 -2
- package/dist/main/codegen-types.js.map +0 -1
- package/dist/main/codegen-utils.d.ts +0 -8
- package/dist/main/codegen-utils.js +0 -43
- package/dist/main/codegen-utils.js.map +0 -1
- package/dist/main/codegen.d.ts +0 -5
- package/dist/main/codegen.js +0 -105
- package/dist/main/codegen.js.map +0 -1
- package/dist/main/codegen.test-utils.d.ts +0 -81
- package/dist/main/codegen.test-utils.js +0 -87
- package/dist/main/codegen.test-utils.js.map +0 -1
- package/dist/main/common/abort-controller.d.ts +0 -2
- package/dist/main/common/abort-controller.js +0 -5
- package/dist/main/common/abort-controller.js.map +0 -1
- package/dist/main/common/app-context-bus.d.ts +0 -11
- package/dist/main/common/app-context-bus.js +0 -29
- package/dist/main/common/app-context-bus.js.map +0 -1
- package/dist/main/common/console-types.d.ts +0 -23
- package/dist/main/common/console-types.js +0 -8
- package/dist/main/common/console-types.js.map +0 -1
- package/dist/main/common/content-bus-types.d.ts +0 -60
- package/dist/main/common/content-bus-types.js +0 -12
- package/dist/main/common/content-bus-types.js.map +0 -1
- package/dist/main/common/content-bus.d.ts +0 -16
- package/dist/main/common/content-bus.js +0 -102
- package/dist/main/common/content-bus.js.map +0 -1
- package/dist/main/common/cost-collector.d.ts +0 -12
- package/dist/main/common/cost-collector.js +0 -90
- package/dist/main/common/cost-collector.js.map +0 -1
- package/dist/main/common/user-actions.d.ts +0 -36
- package/dist/main/common/user-actions.js +0 -59
- package/dist/main/common/user-actions.js.map +0 -1
- package/dist/main/config-lib.d.ts +0 -13
- package/dist/main/config-lib.js +0 -90
- package/dist/main/config-lib.js.map +0 -1
- package/dist/main/config-schema.d.ts +0 -15
- package/dist/main/config-schema.js +0 -320
- package/dist/main/config-schema.js.map +0 -1
- package/dist/main/config-types.d.ts +0 -96
- package/dist/main/config-types.js +0 -4
- package/dist/main/config-types.js.map +0 -1
- package/dist/main/config.d.ts +0 -14
- package/dist/main/config.js +0 -110
- package/dist/main/config.js.map +0 -1
- package/dist/main/generate-content-functions.d.ts +0 -3
- package/dist/main/generate-content-functions.js +0 -19
- package/dist/main/generate-content-functions.js.map +0 -1
- package/dist/main/interactive/codegen-interactive.d.ts +0 -2
- package/dist/main/interactive/codegen-interactive.js +0 -57
- package/dist/main/interactive/codegen-interactive.js.map +0 -1
- package/dist/main/interactive/codegen-worker.d.ts +0 -2
- package/dist/main/interactive/codegen-worker.js +0 -55
- package/dist/main/interactive/codegen-worker.js.map +0 -1
- package/dist/main/interactive/common.d.ts +0 -5
- package/dist/main/interactive/common.js +0 -49
- package/dist/main/interactive/common.js.map +0 -1
- package/dist/main/interactive/configure.d.ts +0 -2
- package/dist/main/interactive/configure.js +0 -95
- package/dist/main/interactive/configure.js.map +0 -1
- package/dist/main/interactive/error-handling.d.ts +0 -1
- package/dist/main/interactive/error-handling.js +0 -43
- package/dist/main/interactive/error-handling.js.map +0 -1
- package/dist/main/interactive/help.d.ts +0 -1
- package/dist/main/interactive/help.js +0 -20
- package/dist/main/interactive/help.js.map +0 -1
- package/dist/main/interactive/select-ai-service.d.ts +0 -2
- package/dist/main/interactive/select-ai-service.js +0 -27
- package/dist/main/interactive/select-ai-service.js.map +0 -1
- package/dist/main/interactive/task-file.d.ts +0 -2
- package/dist/main/interactive/task-file.js +0 -35
- package/dist/main/interactive/task-file.js.map +0 -1
- package/dist/main/interactive/text-prompt.d.ts +0 -2
- package/dist/main/interactive/text-prompt.js +0 -18
- package/dist/main/interactive/text-prompt.js.map +0 -1
- package/dist/main/interactive/user-action-handlers.d.ts +0 -1
- package/dist/main/interactive/user-action-handlers.js +0 -20
- package/dist/main/interactive/user-action-handlers.js.map +0 -1
- package/dist/main/interactive/user-interrupt.d.ts +0 -1
- package/dist/main/interactive/user-interrupt.js +0 -36
- package/dist/main/interactive/user-interrupt.js.map +0 -1
- package/dist/main/knowledge/knowledge-store.d.ts +0 -6
- package/dist/main/knowledge/knowledge-store.js +0 -128
- package/dist/main/knowledge/knowledge-store.js.map +0 -1
- package/dist/main/knowledge/types.d.ts +0 -20
- package/dist/main/knowledge/types.js +0 -2
- package/dist/main/knowledge/types.js.map +0 -1
- package/dist/main/plugin-loader.d.ts +0 -36
- package/dist/main/plugin-loader.js +0 -245
- package/dist/main/plugin-loader.js.map +0 -1
- package/dist/main/ui/backend/api-handlers.d.ts +0 -6
- package/dist/main/ui/backend/api-handlers.js +0 -5
- package/dist/main/ui/backend/api-handlers.js.map +0 -1
- package/dist/main/ui/backend/api-utils.d.ts +0 -2
- package/dist/main/ui/backend/api-utils.js +0 -18
- package/dist/main/ui/backend/api-utils.js.map +0 -1
- package/dist/main/ui/backend/api.d.ts +0 -3
- package/dist/main/ui/backend/api.js +0 -25
- package/dist/main/ui/backend/api.js.map +0 -1
- package/dist/main/ui/backend/endpoints/compress-context-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/compress-context-endpoint.js +0 -18
- package/dist/main/ui/backend/endpoints/compress-context-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/config-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/config-endpoint.js +0 -51
- package/dist/main/ui/backend/endpoints/config-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/console-logs-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/console-logs-endpoint.js +0 -19
- package/dist/main/ui/backend/endpoints/console-logs-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/content-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/content-endpoint.js +0 -14
- package/dist/main/ui/backend/endpoints/content-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/context-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/context-endpoint.js +0 -169
- package/dist/main/ui/backend/endpoints/context-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/edit-message-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/edit-message-endpoint.js +0 -37
- package/dist/main/ui/backend/endpoints/edit-message-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.js +0 -44
- package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/execution-status-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/execution-status-endpoint.js +0 -37
- package/dist/main/ui/backend/endpoints/execution-status-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/generate-content-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/generate-content-endpoint.js +0 -29
- package/dist/main/ui/backend/endpoints/generate-content-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/index.d.ts +0 -13
- package/dist/main/ui/backend/endpoints/index.js +0 -14
- package/dist/main/ui/backend/endpoints/index.js.map +0 -1
- package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.js +0 -28
- package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/iteration-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/iteration-endpoint.js +0 -16
- package/dist/main/ui/backend/endpoints/iteration-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/question-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/question-endpoint.js +0 -72
- package/dist/main/ui/backend/endpoints/question-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/service-configuration-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/service-configuration-endpoint.js +0 -54
- package/dist/main/ui/backend/endpoints/service-configuration-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/usage-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/usage-endpoint.js +0 -15
- package/dist/main/ui/backend/endpoints/usage-endpoint.js.map +0 -1
- package/dist/main/ui/backend/server.d.ts +0 -8
- package/dist/main/ui/backend/server.js +0 -84
- package/dist/main/ui/backend/server.js.map +0 -1
- package/dist/main/ui/backend/service.d.ts +0 -159
- package/dist/main/ui/backend/service.js +0 -626
- package/dist/main/ui/backend/service.js.map +0 -1
- package/dist/main/ui/codegen-ui.d.ts +0 -6
- package/dist/main/ui/codegen-ui.js +0 -22
- package/dist/main/ui/codegen-ui.js.map +0 -1
- package/dist/main/ui/common/api-types.d.ts +0 -170
- package/dist/main/ui/common/api-types.js +0 -13
- package/dist/main/ui/common/api-types.js.map +0 -1
- package/dist/main/ui/frontend/assets/favicon-DvroFOpS.png +0 -0
- package/dist/main/ui/frontend/assets/index-5QDg_0vR.css +0 -1
- package/dist/main/ui/frontend/assets/index-C_k1AhO2.js +0 -3445
- package/dist/main/ui/frontend/assets/logo-BGHkG1-J.png +0 -0
- package/dist/main/ui/frontend/assets/logo-dark-KAsU1C78.png +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-cyrillic-400-normal-oElOGqNf.woff2 +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-cyrillic-ext-400-normal-COIQET2s.woff2 +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-greek-400-normal-DUIT0YPZ.woff2 +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-latin-400-normal-BKfmdmKK.woff +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-latin-400-normal-xj9lRvVs.woff2 +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-latin-ext-400-normal-B18ub5-k.woff +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-latin-ext-400-normal-DDIa4im3.woff2 +0 -0
- package/dist/main/ui/frontend/assets/wolf-bark-Bl17CX4O.mp3 +0 -0
- package/dist/main/ui/frontend/index.html +0 -16
- package/dist/main/ui/user-action-handlers.d.ts +0 -2
- package/dist/main/ui/user-action-handlers.js +0 -34
- package/dist/main/ui/user-action-handlers.js.map +0 -1
- package/dist/operations/create-directory/create-directory-def.d.ts +0 -9
- package/dist/operations/create-directory/create-directory-def.js +0 -22
- package/dist/operations/create-directory/create-directory-def.js.map +0 -1
- package/dist/operations/create-directory/create-directory-executor.d.ts +0 -6
- package/dist/operations/create-directory/create-directory-executor.js +0 -22
- package/dist/operations/create-directory/create-directory-executor.js.map +0 -1
- package/dist/operations/create-file/create-file-def.d.ts +0 -10
- package/dist/operations/create-file/create-file-def.js +0 -29
- package/dist/operations/create-file/create-file-def.js.map +0 -1
- package/dist/operations/create-file/create-file-executor.d.ts +0 -6
- package/dist/operations/create-file/create-file-executor.js +0 -27
- package/dist/operations/create-file/create-file-executor.js.map +0 -1
- package/dist/operations/delete-file/delete-file-def.d.ts +0 -9
- package/dist/operations/delete-file/delete-file-def.js +0 -22
- package/dist/operations/delete-file/delete-file-def.js.map +0 -1
- package/dist/operations/delete-file/delete-file-executor.d.ts +0 -6
- package/dist/operations/delete-file/delete-file-executor.js +0 -23
- package/dist/operations/delete-file/delete-file-executor.js.map +0 -1
- package/dist/operations/download-file/download-file-def.d.ts +0 -10
- package/dist/operations/download-file/download-file-def.js +0 -26
- package/dist/operations/download-file/download-file-def.js.map +0 -1
- package/dist/operations/download-file/download-file-executor.d.ts +0 -6
- package/dist/operations/download-file/download-file-executor.js +0 -44
- package/dist/operations/download-file/download-file-executor.js.map +0 -1
- package/dist/operations/imgly-remove-background/imgly-remove-background-def.d.ts +0 -10
- package/dist/operations/imgly-remove-background/imgly-remove-background-def.js +0 -26
- package/dist/operations/imgly-remove-background/imgly-remove-background-def.js.map +0 -1
- package/dist/operations/imgly-remove-background/imgly-remove-background-executor.d.ts +0 -6
- package/dist/operations/imgly-remove-background/imgly-remove-background-executor.js +0 -40
- package/dist/operations/imgly-remove-background/imgly-remove-background-executor.js.map +0 -1
- package/dist/operations/move-file/move-file-def.d.ts +0 -10
- package/dist/operations/move-file/move-file-def.js +0 -26
- package/dist/operations/move-file/move-file-def.js.map +0 -1
- package/dist/operations/move-file/move-file-executor.d.ts +0 -6
- package/dist/operations/move-file/move-file-executor.js +0 -29
- package/dist/operations/move-file/move-file-executor.js.map +0 -1
- package/dist/operations/operations-index.d.ts +0 -3
- package/dist/operations/operations-index.js +0 -33
- package/dist/operations/operations-index.js.map +0 -1
- package/dist/operations/patch-file/patch-file-def.d.ts +0 -10
- package/dist/operations/patch-file/patch-file-def.js +0 -40
- package/dist/operations/patch-file/patch-file-def.js.map +0 -1
- package/dist/operations/patch-file/patch-file-executor.d.ts +0 -5
- package/dist/operations/patch-file/patch-file-executor.js +0 -26
- package/dist/operations/patch-file/patch-file-executor.js.map +0 -1
- package/dist/operations/resize-image/resize-image-def.d.ts +0 -13
- package/dist/operations/resize-image/resize-image-def.js +0 -37
- package/dist/operations/resize-image/resize-image-def.js.map +0 -1
- package/dist/operations/resize-image/resize-image-executor.d.ts +0 -5
- package/dist/operations/resize-image/resize-image-executor.js +0 -30
- package/dist/operations/resize-image/resize-image-executor.js.map +0 -1
- package/dist/operations/split-image/split-image-def.d.ts +0 -18
- package/dist/operations/split-image/split-image-def.js +0 -46
- package/dist/operations/split-image/split-image-def.js.map +0 -1
- package/dist/operations/split-image/split-image-executor.d.ts +0 -6
- package/dist/operations/split-image/split-image-executor.js +0 -51
- package/dist/operations/split-image/split-image-executor.js.map +0 -1
- package/dist/operations/update-file/update-file-def.d.ts +0 -10
- package/dist/operations/update-file/update-file-def.js +0 -27
- package/dist/operations/update-file/update-file-def.js.map +0 -1
- package/dist/operations/update-file/update-file-executor.d.ts +0 -5
- package/dist/operations/update-file/update-file-executor.js +0 -22
- package/dist/operations/update-file/update-file-executor.js.map +0 -1
- package/dist/project-profiles/detection.d.ts +0 -40
- package/dist/project-profiles/detection.js +0 -131
- package/dist/project-profiles/detection.js.map +0 -1
- package/dist/project-profiles/index.d.ts +0 -35
- package/dist/project-profiles/index.js +0 -72
- package/dist/project-profiles/index.js.map +0 -1
- package/dist/project-profiles/profiles/golang.d.ts +0 -65
- package/dist/project-profiles/profiles/golang.js +0 -208
- package/dist/project-profiles/profiles/golang.js.map +0 -1
- package/dist/project-profiles/profiles/java-maven.d.ts +0 -80
- package/dist/project-profiles/profiles/java-maven.js +0 -165
- package/dist/project-profiles/profiles/java-maven.js.map +0 -1
- package/dist/project-profiles/profiles/javascript-npm.d.ts +0 -40
- package/dist/project-profiles/profiles/javascript-npm.js +0 -118
- package/dist/project-profiles/profiles/javascript-npm.js.map +0 -1
- package/dist/project-profiles/profiles/javascript-react.d.ts +0 -46
- package/dist/project-profiles/profiles/javascript-react.js +0 -147
- package/dist/project-profiles/profiles/javascript-react.js.map +0 -1
- package/dist/project-profiles/profiles/python-django.d.ts +0 -58
- package/dist/project-profiles/profiles/python-django.js +0 -200
- package/dist/project-profiles/profiles/python-django.js.map +0 -1
- package/dist/project-profiles/types.d.ts +0 -122
- package/dist/project-profiles/types.js +0 -77
- package/dist/project-profiles/types.js.map +0 -1
- package/dist/prompt/ai-service-fallback.d.ts +0 -4
- package/dist/prompt/ai-service-fallback.js +0 -47
- package/dist/prompt/ai-service-fallback.js.map +0 -1
- package/dist/prompt/context-utils.d.ts +0 -7
- package/dist/prompt/context-utils.js +0 -33
- package/dist/prompt/context-utils.js.map +0 -1
- package/dist/prompt/dynamic-function-generator.d.ts +0 -2
- package/dist/prompt/dynamic-function-generator.js +0 -58
- package/dist/prompt/dynamic-function-generator.js.map +0 -1
- package/dist/prompt/function-calling-validate.d.ts +0 -4
- package/dist/prompt/function-calling-validate.js +0 -109
- package/dist/prompt/function-calling-validate.js.map +0 -1
- package/dist/prompt/function-calling.d.ts +0 -5
- package/dist/prompt/function-calling.js +0 -88
- package/dist/prompt/function-calling.js.map +0 -1
- package/dist/prompt/function-defs/analysis-result.d.ts +0 -7
- package/dist/prompt/function-defs/analysis-result.js +0 -24
- package/dist/prompt/function-defs/analysis-result.js.map +0 -1
- package/dist/prompt/function-defs/ask-question.d.ts +0 -20
- package/dist/prompt/function-defs/ask-question.js +0 -373
- package/dist/prompt/function-defs/ask-question.js.map +0 -1
- package/dist/prompt/function-defs/code-execution.d.ts +0 -7
- package/dist/prompt/function-defs/code-execution.js +0 -27
- package/dist/prompt/function-defs/code-execution.js.map +0 -1
- package/dist/prompt/function-defs/codegen-planning.d.ts +0 -8
- package/dist/prompt/function-defs/codegen-planning.js +0 -60
- package/dist/prompt/function-defs/codegen-planning.js.map +0 -1
- package/dist/prompt/function-defs/codegen-summary.d.ts +0 -5
- package/dist/prompt/function-defs/codegen-summary.js +0 -103
- package/dist/prompt/function-defs/codegen-summary.js.map +0 -1
- package/dist/prompt/function-defs/compound-action-list.d.ts +0 -7
- package/dist/prompt/function-defs/compound-action-list.js +0 -38
- package/dist/prompt/function-defs/compound-action-list.js.map +0 -1
- package/dist/prompt/function-defs/compound-action.d.ts +0 -2
- package/dist/prompt/function-defs/compound-action.js +0 -47
- package/dist/prompt/function-defs/compound-action.js.map +0 -1
- package/dist/prompt/function-defs/container-task-commands.d.ts +0 -10
- package/dist/prompt/function-defs/container-task-commands.js +0 -185
- package/dist/prompt/function-defs/container-task-commands.js.map +0 -1
- package/dist/prompt/function-defs/context-compression.d.ts +0 -47
- package/dist/prompt/function-defs/context-compression.js +0 -49
- package/dist/prompt/function-defs/context-compression.js.map +0 -1
- package/dist/prompt/function-defs/conversation-graph.d.ts +0 -33
- package/dist/prompt/function-defs/conversation-graph.js +0 -110
- package/dist/prompt/function-defs/conversation-graph.js.map +0 -1
- package/dist/prompt/function-defs/conversation-summary.d.ts +0 -2
- package/dist/prompt/function-defs/conversation-summary.js +0 -15
- package/dist/prompt/function-defs/conversation-summary.js.map +0 -1
- package/dist/prompt/function-defs/explanation.d.ts +0 -5
- package/dist/prompt/function-defs/explanation.js +0 -18
- package/dist/prompt/function-defs/explanation.js.map +0 -1
- package/dist/prompt/function-defs/explore-external-directories.d.ts +0 -16
- package/dist/prompt/function-defs/explore-external-directories.js +0 -48
- package/dist/prompt/function-defs/explore-external-directories.js.map +0 -1
- package/dist/prompt/function-defs/extract-file-fragments.d.ts +0 -27
- package/dist/prompt/function-defs/extract-file-fragments.js +0 -36
- package/dist/prompt/function-defs/extract-file-fragments.js.map +0 -1
- package/dist/prompt/function-defs/genaicode-help.d.ts +0 -6
- package/dist/prompt/function-defs/genaicode-help.js +0 -23
- package/dist/prompt/function-defs/genaicode-help.js.map +0 -1
- package/dist/prompt/function-defs/generate-image.d.ts +0 -5
- package/dist/prompt/function-defs/generate-image.js +0 -42
- package/dist/prompt/function-defs/generate-image.js.map +0 -1
- package/dist/prompt/function-defs/get-image-assets.d.ts +0 -5
- package/dist/prompt/function-defs/get-image-assets.js +0 -21
- package/dist/prompt/function-defs/get-image-assets.js.map +0 -1
- package/dist/prompt/function-defs/get-source-code.d.ts +0 -5
- package/dist/prompt/function-defs/get-source-code.js +0 -49
- package/dist/prompt/function-defs/get-source-code.js.map +0 -1
- package/dist/prompt/function-defs/iterate.d.ts +0 -20
- package/dist/prompt/function-defs/iterate.js +0 -373
- package/dist/prompt/function-defs/iterate.js.map +0 -1
- package/dist/prompt/function-defs/optimize-context.d.ts +0 -5
- package/dist/prompt/function-defs/optimize-context.js +0 -74
- package/dist/prompt/function-defs/optimize-context.js.map +0 -1
- package/dist/prompt/function-defs/perform-analysis.d.ts +0 -8
- package/dist/prompt/function-defs/perform-analysis.js +0 -28
- package/dist/prompt/function-defs/perform-analysis.js.map +0 -1
- package/dist/prompt/function-defs/pull-console-logs.d.ts +0 -2
- package/dist/prompt/function-defs/pull-console-logs.js +0 -29
- package/dist/prompt/function-defs/pull-console-logs.js.map +0 -1
- package/dist/prompt/function-defs/read-external-files.d.ts +0 -9
- package/dist/prompt/function-defs/read-external-files.js +0 -30
- package/dist/prompt/function-defs/read-external-files.js.map +0 -1
- package/dist/prompt/function-defs/read-history.d.ts +0 -2
- package/dist/prompt/function-defs/read-history.js +0 -14
- package/dist/prompt/function-defs/read-history.js.map +0 -1
- package/dist/prompt/function-defs/reasoning-inference.d.ts +0 -3
- package/dist/prompt/function-defs/reasoning-inference.js +0 -39
- package/dist/prompt/function-defs/reasoning-inference.js.map +0 -1
- package/dist/prompt/function-defs/run-bash-command.d.ts +0 -2
- package/dist/prompt/function-defs/run-bash-command.js +0 -29
- package/dist/prompt/function-defs/run-bash-command.js.map +0 -1
- package/dist/prompt/function-defs/run-container-task.d.ts +0 -11
- package/dist/prompt/function-defs/run-container-task.js +0 -41
- package/dist/prompt/function-defs/run-container-task.js.map +0 -1
- package/dist/prompt/function-defs/run-project-command.d.ts +0 -2
- package/dist/prompt/function-defs/run-project-command.js +0 -40
- package/dist/prompt/function-defs/run-project-command.js.map +0 -1
- package/dist/prompt/function-defs/set-summaries.d.ts +0 -5
- package/dist/prompt/function-defs/set-summaries.js +0 -59
- package/dist/prompt/function-defs/set-summaries.js.map +0 -1
- package/dist/prompt/function-defs/structured-question.d.ts +0 -2
- package/dist/prompt/function-defs/structured-question.js +0 -64
- package/dist/prompt/function-defs/structured-question.js.map +0 -1
- package/dist/prompt/function-defs/update-history.d.ts +0 -5
- package/dist/prompt/function-defs/update-history.js +0 -22
- package/dist/prompt/function-defs/update-history.js.map +0 -1
- package/dist/prompt/function-defs/web-search.d.ts +0 -9
- package/dist/prompt/function-defs/web-search.js +0 -16
- package/dist/prompt/function-defs/web-search.js.map +0 -1
- package/dist/prompt/limits.d.ts +0 -3
- package/dist/prompt/limits.js +0 -21
- package/dist/prompt/limits.js.map +0 -1
- package/dist/prompt/prompt-codegen.d.ts +0 -9
- package/dist/prompt/prompt-codegen.js +0 -45
- package/dist/prompt/prompt-codegen.js.map +0 -1
- package/dist/prompt/prompt-service.d.ts +0 -8
- package/dist/prompt/prompt-service.js +0 -147
- package/dist/prompt/prompt-service.js.map +0 -1
- package/dist/prompt/prompt-service.test-utils.d.ts +0 -66
- package/dist/prompt/prompt-service.test-utils.js +0 -171
- package/dist/prompt/prompt-service.test-utils.js.map +0 -1
- package/dist/prompt/source-code-optimize.d.ts +0 -2
- package/dist/prompt/source-code-optimize.js +0 -27
- package/dist/prompt/source-code-optimize.js.map +0 -1
- package/dist/prompt/static-prompts.d.ts +0 -17
- package/dist/prompt/static-prompts.js +0 -23
- package/dist/prompt/static-prompts.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/ask-question-handler.d.ts +0 -3
- package/dist/prompt/steps/step-ask-question/ask-question-handler.js +0 -13
- package/dist/prompt/steps/step-ask-question/ask-question-handler.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.d.ts +0 -7
- package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.js +0 -301
- package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.d.ts +0 -12
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.js +0 -41
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.js +0 -49
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.js +0 -190
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.js +0 -139
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.d.ts +0 -10
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.js +0 -93
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.js +0 -72
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.d.ts +0 -10
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.js +0 -125
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.d.ts +0 -19
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.js +0 -33
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.js +0 -85
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.d.ts +0 -6
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.js +0 -122
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.d.ts +0 -7
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.js +0 -146
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.js +0 -56
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.js +0 -56
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.js +0 -39
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.d.ts +0 -10
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.js +0 -95
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.js +0 -96
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.js +0 -123
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.d.ts +0 -34
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.js +0 -332
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.d.ts +0 -11
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.js +0 -50
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.d.ts +0 -28
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.js +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.js +0 -202
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.d.ts +0 -52
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.js +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.js +0 -15
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.d.ts +0 -50
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.js +0 -358
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.d.ts +0 -47
- package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.js +0 -114
- package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js +0 -177
- package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.d.ts +0 -20
- package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.js +0 -305
- package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.js +0 -40
- package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.js +0 -35
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.js +0 -34
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.d.ts +0 -11
- package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js +0 -503
- package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js +0 -159
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js +0 -30
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.js +0 -280
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js +0 -105
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js +0 -110
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.d.ts +0 -6
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js +0 -60
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.d.ts +0 -6
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js +0 -110
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.js +0 -282
- package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.d.ts +0 -9
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js +0 -94
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.js +0 -174
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.d.ts +0 -9
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js +0 -104
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.js +0 -149
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.d.ts +0 -7
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js +0 -119
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js +0 -100
- package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js +0 -145
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js +0 -197
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.d.ts +0 -3
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.js +0 -251
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js +0 -83
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.js +0 -185
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.js +0 -7
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js +0 -96
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js +0 -21
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.d.ts +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.js +0 -72
- package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js +0 -161
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.d.ts +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.js +0 -85
- package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.d.ts +0 -3
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js +0 -5
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts +0 -257
- package/dist/prompt/steps/step-ask-question/step-ask-question-types.js +0 -2
- package/dist/prompt/steps/step-ask-question/step-ask-question-types.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts +0 -37
- package/dist/prompt/steps/step-ask-question/step-ask-question.js +0 -132
- package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +0 -1
- package/dist/prompt/steps/step-auto-context-refresh.d.ts +0 -6
- package/dist/prompt/steps/step-auto-context-refresh.js +0 -98
- package/dist/prompt/steps/step-auto-context-refresh.js.map +0 -1
- package/dist/prompt/steps/step-codegen-planning.d.ts +0 -11
- package/dist/prompt/steps/step-codegen-planning.js +0 -147
- package/dist/prompt/steps/step-codegen-planning.js.map +0 -1
- package/dist/prompt/steps/step-context-compression.d.ts +0 -8
- package/dist/prompt/steps/step-context-compression.js +0 -231
- package/dist/prompt/steps/step-context-compression.js.map +0 -1
- package/dist/prompt/steps/step-context-optimization.d.ts +0 -8
- package/dist/prompt/steps/step-context-optimization.js +0 -308
- package/dist/prompt/steps/step-context-optimization.js.map +0 -1
- package/dist/prompt/steps/step-ensure-context.d.ts +0 -8
- package/dist/prompt/steps/step-ensure-context.js +0 -114
- package/dist/prompt/steps/step-ensure-context.js.map +0 -1
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.d.ts +0 -2
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.js +0 -133
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.js.map +0 -1
- package/dist/prompt/steps/step-generate-codegen-summary.d.ts +0 -14
- package/dist/prompt/steps/step-generate-codegen-summary.js +0 -68
- package/dist/prompt/steps/step-generate-codegen-summary.js.map +0 -1
- package/dist/prompt/steps/step-generate-image.d.ts +0 -10
- package/dist/prompt/steps/step-generate-image.js +0 -32
- package/dist/prompt/steps/step-generate-image.js.map +0 -1
- package/dist/prompt/steps/step-generate-summary.d.ts +0 -10
- package/dist/prompt/steps/step-generate-summary.js +0 -63
- package/dist/prompt/steps/step-generate-summary.js.map +0 -1
- package/dist/prompt/steps/step-history-update.d.ts +0 -6
- package/dist/prompt/steps/step-history-update.js +0 -69
- package/dist/prompt/steps/step-history-update.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.d.ts +0 -7
- package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.js +0 -301
- package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.js +0 -49
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.js +0 -190
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.js +0 -139
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.d.ts +0 -10
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.js +0 -93
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.js +0 -72
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.d.ts +0 -10
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.js +0 -125
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.d.ts +0 -19
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.js +0 -33
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.d.ts +0 -8
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.js +0 -85
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.d.ts +0 -6
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.js +0 -122
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.d.ts +0 -7
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.js +0 -146
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.js +0 -56
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.js +0 -56
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.js +0 -39
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.d.ts +0 -10
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.js +0 -95
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.js +0 -96
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.js +0 -123
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.d.ts +0 -11
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.js +0 -50
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.d.ts +0 -28
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.js +0 -2
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.js +0 -202
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.js +0 -15
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.d.ts +0 -50
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.js +0 -358
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/file-request-utils.d.ts +0 -47
- package/dist/prompt/steps/step-iterate/handlers/file-request-utils.js +0 -114
- package/dist/prompt/steps/step-iterate/handlers/file-request-utils.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.d.ts +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.js +0 -133
- package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.js +0 -177
- package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.d.ts +0 -20
- package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.js +0 -305
- package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.js +0 -40
- package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.js +0 -35
- package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.js +0 -34
- package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.d.ts +0 -11
- package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.js +0 -503
- package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-create-file.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-create-file.js +0 -159
- package/dist/prompt/steps/step-iterate/handlers/handle-create-file.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.js +0 -30
- package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.js +0 -280
- package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.d.ts +0 -8
- package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.js +0 -105
- package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.js +0 -110
- package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.d.ts +0 -6
- package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.js +0 -110
- package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-project-command.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-project-command.js +0 -280
- package/dist/prompt/steps/step-iterate/handlers/handle-project-command.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.d.ts +0 -9
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.js +0 -94
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.js +0 -174
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.d.ts +0 -9
- package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.js +0 -104
- package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.js +0 -149
- package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.d.ts +0 -7
- package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.js +0 -119
- package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.js +0 -100
- package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.d.ts +0 -8
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.js +0 -146
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.d.ts +0 -8
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.js +0 -197
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.d.ts +0 -3
- package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.js +0 -251
- package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.js +0 -83
- package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.js +0 -185
- package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.js +0 -7
- package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-search-code.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-search-code.js +0 -96
- package/dist/prompt/steps/step-iterate/handlers/handle-search-code.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-send-message.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-send-message.js +0 -21
- package/dist/prompt/steps/step-iterate/handlers/handle-send-message.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.d.ts +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.js +0 -72
- package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-update-file.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-update-file.js +0 -161
- package/dist/prompt/steps/step-iterate/handlers/handle-update-file.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-web-search.d.ts +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-web-search.js +0 -85
- package/dist/prompt/steps/step-iterate/handlers/handle-web-search.js.map +0 -1
- package/dist/prompt/steps/step-iterate/iterate-handler.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/iterate-handler.js +0 -14
- package/dist/prompt/steps/step-iterate/iterate-handler.js.map +0 -1
- package/dist/prompt/steps/step-iterate/step-iterate-handlers.d.ts +0 -3
- package/dist/prompt/steps/step-iterate/step-iterate-handlers.js +0 -5
- package/dist/prompt/steps/step-iterate/step-iterate-handlers.js.map +0 -1
- package/dist/prompt/steps/step-iterate/step-iterate-types.d.ts +0 -255
- package/dist/prompt/steps/step-iterate/step-iterate-types.js +0 -2
- package/dist/prompt/steps/step-iterate/step-iterate-types.js.map +0 -1
- package/dist/prompt/steps/step-iterate/step-iterate.d.ts +0 -37
- package/dist/prompt/steps/step-iterate/step-iterate.js +0 -132
- package/dist/prompt/steps/step-iterate/step-iterate.js.map +0 -1
- package/dist/prompt/steps/step-process-file-updates.d.ts +0 -12
- package/dist/prompt/steps/step-process-file-updates.js +0 -148
- package/dist/prompt/steps/step-process-file-updates.js.map +0 -1
- package/dist/prompt/steps/step-summarization.d.ts +0 -10
- package/dist/prompt/steps/step-summarization.js +0 -167
- package/dist/prompt/steps/step-summarization.js.map +0 -1
- package/dist/prompt/steps/step-validate-recover.d.ts +0 -2
- package/dist/prompt/steps/step-validate-recover.js +0 -71
- package/dist/prompt/steps/step-validate-recover.js.map +0 -1
- package/dist/prompt/steps/step-verify-patch.d.ts +0 -10
- package/dist/prompt/steps/step-verify-patch.js +0 -52
- package/dist/prompt/steps/step-verify-patch.js.map +0 -1
- package/dist/prompt/steps/steps-types.d.ts +0 -4
- package/dist/prompt/steps/steps-types.js +0 -6
- package/dist/prompt/steps/steps-types.js.map +0 -1
- package/dist/prompt/steps/steps-utils.d.ts +0 -7
- package/dist/prompt/steps/steps-utils.js +0 -11
- package/dist/prompt/steps/steps-utils.js.map +0 -1
- package/dist/prompt/systemprompt.d.ts +0 -4
- package/dist/prompt/systemprompt.js +0 -113
- package/dist/prompt/systemprompt.js.map +0 -1
- package/dist/prompt/token-estimator.d.ts +0 -8
- package/dist/prompt/token-estimator.js +0 -31
- package/dist/prompt/token-estimator.js.map +0 -1
- package/dist/prompt-debug/current-prompt-plugin.d.ts +0 -3
- package/dist/prompt-debug/current-prompt-plugin.js +0 -10
- package/dist/prompt-debug/current-prompt-plugin.js.map +0 -1
- package/dist/utils/docker-utils.d.ts +0 -37
- package/dist/utils/docker-utils.js +0 -258
- package/dist/utils/docker-utils.js.map +0 -1
- package/dist/vite-genaicode/code-transformer.d.ts +0 -5
- package/dist/vite-genaicode/code-transformer.js +0 -83
- package/dist/vite-genaicode/code-transformer.js.map +0 -1
- package/dist/vite-genaicode/console-interceptor.d.ts +0 -53
- package/dist/vite-genaicode/console-interceptor.js +0 -117
- package/dist/vite-genaicode/console-interceptor.js.map +0 -1
- package/dist/vite-genaicode/constants.d.ts +0 -3
- package/dist/vite-genaicode/constants.js +0 -4
- package/dist/vite-genaicode/constants.js.map +0 -1
- package/dist/vite-genaicode/dynamic-function-generator.d.ts +0 -2
- package/dist/vite-genaicode/dynamic-function-generator.js +0 -47
- package/dist/vite-genaicode/dynamic-function-generator.js.map +0 -1
- package/dist/vite-genaicode/html-injector.d.ts +0 -6
- package/dist/vite-genaicode/html-injector.js +0 -14
- package/dist/vite-genaicode/html-injector.js.map +0 -1
- package/dist/vite-genaicode/server-manager.d.ts +0 -26
- package/dist/vite-genaicode/server-manager.js +0 -91
- package/dist/vite-genaicode/server-manager.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-context.d.ts +0 -31
- package/dist/vite-genaicode/vite-genaicode-context.js +0 -120
- package/dist/vite-genaicode/vite-genaicode-context.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-frontend.d.ts +0 -1
- package/dist/vite-genaicode/vite-genaicode-frontend.js +0 -329
- package/dist/vite-genaicode/vite-genaicode-frontend.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-plugin.d.ts +0 -21
- package/dist/vite-genaicode/vite-genaicode-plugin.js +0 -87
- package/dist/vite-genaicode/vite-genaicode-plugin.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-types.d.ts +0 -28
- package/dist/vite-genaicode/vite-genaicode-types.js +0 -11
- package/dist/vite-genaicode/vite-genaicode-types.js.map +0 -1
- package/media/logo-dark.png +0 -0
- package/media/logo.png +0 -0
|
@@ -1,3445 +0,0 @@
|
|
|
1
|
-
var _k=Object.defineProperty;var Fk=(e,t,r)=>t in e?_k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var In=(e,t,r)=>Fk(e,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function r(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(l){if(l.ep)return;l.ep=!0;const a=r(l);fetch(l.href,a)}})();function Bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ec={exports:{}},ze={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its 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 Em;function Ok(){if(Em)return ze;Em=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),m=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=m&&z[m]||z["@@iterator"],typeof z=="function"?z:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function j(z,q,$){this.props=z,this.context=q,this.refs=S,this.updater=$||w}j.prototype.isReactComponent={},j.prototype.setState=function(z,q){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,q,"setState")},j.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function E(){}E.prototype=j.prototype;function I(z,q,$){this.props=z,this.context=q,this.refs=S,this.updater=$||w}var A=I.prototype=new E;A.constructor=I,k(A,j.prototype),A.isPureReactComponent=!0;var _=Array.isArray,O=Object.prototype.hasOwnProperty,P={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function K(z,q,$){var ue,ge={},ke=null,he=null;if(q!=null)for(ue in q.ref!==void 0&&(he=q.ref),q.key!==void 0&&(ke=""+q.key),q)O.call(q,ue)&&!V.hasOwnProperty(ue)&&(ge[ue]=q[ue]);var pe=arguments.length-2;if(pe===1)ge.children=$;else if(1<pe){for(var le=Array(pe),ve=0;ve<pe;ve++)le[ve]=arguments[ve+2];ge.children=le}if(z&&z.defaultProps)for(ue in pe=z.defaultProps,pe)ge[ue]===void 0&&(ge[ue]=pe[ue]);return{$$typeof:e,type:z,key:ke,ref:he,props:ge,_owner:P.current}}function re(z,q){return{$$typeof:e,type:z.type,key:q,ref:z.ref,props:z.props,_owner:z._owner}}function D(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function te(z){var q={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function($){return q[$]})}var se=/\/+/g;function ee(z,q){return typeof z=="object"&&z!==null&&z.key!=null?te(""+z.key):q.toString(36)}function X(z,q,$,ue,ge){var ke=typeof z;(ke==="undefined"||ke==="boolean")&&(z=null);var he=!1;if(z===null)he=!0;else switch(ke){case"string":case"number":he=!0;break;case"object":switch(z.$$typeof){case e:case t:he=!0}}if(he)return he=z,ge=ge(he),z=ue===""?"."+ee(he,0):ue,_(ge)?($="",z!=null&&($=z.replace(se,"$&/")+"/"),X(ge,q,$,"",function(ve){return ve})):ge!=null&&(D(ge)&&(ge=re(ge,$+(!ge.key||he&&he.key===ge.key?"":(""+ge.key).replace(se,"$&/")+"/")+z)),q.push(ge)),1;if(he=0,ue=ue===""?".":ue+":",_(z))for(var pe=0;pe<z.length;pe++){ke=z[pe];var le=ue+ee(ke,pe);he+=X(ke,q,$,le,ge)}else if(le=v(z),typeof le=="function")for(z=le.call(z),pe=0;!(ke=z.next()).done;)ke=ke.value,le=ue+ee(ke,pe++),he+=X(ke,q,$,le,ge);else if(ke==="object")throw q=String(z),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return he}function W(z,q,$){if(z==null)return z;var ue=[],ge=0;return X(z,ue,"","",function(ke){return q.call($,ke,ge++)}),ue}function ce(z){if(z._status===-1){var q=z._result;q=q(),q.then(function($){(z._status===0||z._status===-1)&&(z._status=1,z._result=$)},function($){(z._status===0||z._status===-1)&&(z._status=2,z._result=$)}),z._status===-1&&(z._status=0,z._result=q)}if(z._status===1)return z._result.default;throw z._result}var de={current:null},Q={transition:null},fe={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:Q,ReactCurrentOwner:P};function T(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:W,forEach:function(z,q,$){W(z,function(){q.apply(this,arguments)},$)},count:function(z){var q=0;return W(z,function(){q++}),q},toArray:function(z){return W(z,function(q){return q})||[]},only:function(z){if(!D(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},ze.Component=j,ze.Fragment=r,ze.Profiler=l,ze.PureComponent=I,ze.StrictMode=i,ze.Suspense=f,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fe,ze.act=T,ze.cloneElement=function(z,q,$){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ue=k({},z.props),ge=z.key,ke=z.ref,he=z._owner;if(q!=null){if(q.ref!==void 0&&(ke=q.ref,he=P.current),q.key!==void 0&&(ge=""+q.key),z.type&&z.type.defaultProps)var pe=z.type.defaultProps;for(le in q)O.call(q,le)&&!V.hasOwnProperty(le)&&(ue[le]=q[le]===void 0&&pe!==void 0?pe[le]:q[le])}var le=arguments.length-2;if(le===1)ue.children=$;else if(1<le){pe=Array(le);for(var ve=0;ve<le;ve++)pe[ve]=arguments[ve+2];ue.children=pe}return{$$typeof:e,type:z.type,key:ge,ref:ke,props:ue,_owner:he}},ze.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:a,_context:z},z.Consumer=z},ze.createElement=K,ze.createFactory=function(z){var q=K.bind(null,z);return q.type=z,q},ze.createRef=function(){return{current:null}},ze.forwardRef=function(z){return{$$typeof:c,render:z}},ze.isValidElement=D,ze.lazy=function(z){return{$$typeof:x,_payload:{_status:-1,_result:z},_init:ce}},ze.memo=function(z,q){return{$$typeof:p,type:z,compare:q===void 0?null:q}},ze.startTransition=function(z){var q=Q.transition;Q.transition={};try{z()}finally{Q.transition=q}},ze.unstable_act=T,ze.useCallback=function(z,q){return de.current.useCallback(z,q)},ze.useContext=function(z){return de.current.useContext(z)},ze.useDebugValue=function(){},ze.useDeferredValue=function(z){return de.current.useDeferredValue(z)},ze.useEffect=function(z,q){return de.current.useEffect(z,q)},ze.useId=function(){return de.current.useId()},ze.useImperativeHandle=function(z,q,$){return de.current.useImperativeHandle(z,q,$)},ze.useInsertionEffect=function(z,q){return de.current.useInsertionEffect(z,q)},ze.useLayoutEffect=function(z,q){return de.current.useLayoutEffect(z,q)},ze.useMemo=function(z,q){return de.current.useMemo(z,q)},ze.useReducer=function(z,q,$){return de.current.useReducer(z,q,$)},ze.useRef=function(z){return de.current.useRef(z)},ze.useState=function(z){return de.current.useState(z)},ze.useSyncExternalStore=function(z,q,$){return de.current.useSyncExternalStore(z,q,$)},ze.useTransition=function(){return de.current.useTransition()},ze.version="18.3.1",ze}var jm;function Ud(){return jm||(jm=1,Ec.exports=Ok()),Ec.exports}var R=Ud();const Tt=Bd(R);var Ns={},jc={exports:{}},Gt={},Tc={exports:{}},Rc={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* scheduler.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Tm;function Dk(){return Tm||(Tm=1,function(e){function t(Q,fe){var T=Q.length;Q.push(fe);e:for(;0<T;){var z=T-1>>>1,q=Q[z];if(0<l(q,fe))Q[z]=fe,Q[T]=q,T=z;else break e}}function r(Q){return Q.length===0?null:Q[0]}function i(Q){if(Q.length===0)return null;var fe=Q[0],T=Q.pop();if(T!==fe){Q[0]=T;e:for(var z=0,q=Q.length,$=q>>>1;z<$;){var ue=2*(z+1)-1,ge=Q[ue],ke=ue+1,he=Q[ke];if(0>l(ge,T))ke<q&&0>l(he,ge)?(Q[z]=he,Q[ke]=T,z=ke):(Q[z]=ge,Q[ue]=T,z=ue);else if(ke<q&&0>l(he,T))Q[z]=he,Q[ke]=T,z=ke;else break e}}return fe}function l(Q,fe){var T=Q.sortIndex-fe.sortIndex;return T!==0?T:Q.id-fe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var f=[],p=[],x=1,m=null,v=3,w=!1,k=!1,S=!1,j=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(Q){for(var fe=r(p);fe!==null;){if(fe.callback===null)i(p);else if(fe.startTime<=Q)i(p),fe.sortIndex=fe.expirationTime,t(f,fe);else break;fe=r(p)}}function _(Q){if(S=!1,A(Q),!k)if(r(f)!==null)k=!0,ce(O);else{var fe=r(p);fe!==null&&de(_,fe.startTime-Q)}}function O(Q,fe){k=!1,S&&(S=!1,E(K),K=-1),w=!0;var T=v;try{for(A(fe),m=r(f);m!==null&&(!(m.expirationTime>fe)||Q&&!te());){var z=m.callback;if(typeof z=="function"){m.callback=null,v=m.priorityLevel;var q=z(m.expirationTime<=fe);fe=e.unstable_now(),typeof q=="function"?m.callback=q:m===r(f)&&i(f),A(fe)}else i(f);m=r(f)}if(m!==null)var $=!0;else{var ue=r(p);ue!==null&&de(_,ue.startTime-fe),$=!1}return $}finally{m=null,v=T,w=!1}}var P=!1,V=null,K=-1,re=5,D=-1;function te(){return!(e.unstable_now()-D<re)}function se(){if(V!==null){var Q=e.unstable_now();D=Q;var fe=!0;try{fe=V(!0,Q)}finally{fe?ee():(P=!1,V=null)}}else P=!1}var ee;if(typeof I=="function")ee=function(){I(se)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,W=X.port2;X.port1.onmessage=se,ee=function(){W.postMessage(null)}}else ee=function(){j(se,0)};function ce(Q){V=Q,P||(P=!0,ee())}function de(Q,fe){K=j(function(){Q(e.unstable_now())},fe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){k||w||(k=!0,ce(O))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var fe=3;break;default:fe=v}var T=v;v=fe;try{return Q()}finally{v=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,fe){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var T=v;v=Q;try{return fe()}finally{v=T}},e.unstable_scheduleCallback=function(Q,fe,T){var z=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?z+T:z):T=z,Q){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=T+q,Q={id:x++,callback:fe,priorityLevel:Q,startTime:T,expirationTime:q,sortIndex:-1},T>z?(Q.sortIndex=T,t(p,Q),r(f)===null&&Q===r(p)&&(S?(E(K),K=-1):S=!0,de(_,T-z))):(Q.sortIndex=q,t(f,Q),k||w||(k=!0,ce(O))),Q},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(Q){var fe=v;return function(){var T=v;v=fe;try{return Q.apply(this,arguments)}finally{v=T}}}}(Rc)),Rc}var Rm;function Mk(){return Rm||(Rm=1,Tc.exports=Dk()),Tc.exports}/**
|
|
18
|
-
* @license React
|
|
19
|
-
* react-dom.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var $m;function Bk(){if($m)return Gt;$m=1;var e=Ud(),t=Mk();function r(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,s=1;s<arguments.length;s++)o+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function a(n,o){u(n,o),u(n+"Capture",o)}function u(n,o){for(l[n]=o,n=0;n<o.length;n++)i.add(o[n])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,x={},m={};function v(n){return f.call(m,n)?!0:f.call(x,n)?!1:p.test(n)?m[n]=!0:(x[n]=!0,!1)}function w(n,o,s,d){if(s!==null&&s.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return d?!1:s!==null?!s.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,o,s,d){if(o===null||typeof o>"u"||w(n,o,s,d))return!0;if(d)return!1;if(s!==null)switch(s.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function S(n,o,s,d,g,y,b){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=s,this.propertyName=n,this.type=o,this.sanitizeURL=y,this.removeEmptyString=b}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){j[n]=new S(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];j[o]=new S(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){j[n]=new S(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){j[n]=new S(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){j[n]=new S(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){j[n]=new S(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){j[n]=new S(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){j[n]=new S(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){j[n]=new S(n,5,!1,n.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function I(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var o=n.replace(E,I);j[o]=new S(o,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var o=n.replace(E,I);j[o]=new S(o,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var o=n.replace(E,I);j[o]=new S(o,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){j[n]=new S(n,1,!1,n.toLowerCase(),null,!1,!1)}),j.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){j[n]=new S(n,1,!1,n.toLowerCase(),null,!0,!0)});function A(n,o,s,d){var g=j.hasOwnProperty(o)?j[o]:null;(g!==null?g.type!==0:d||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(k(o,s,g,d)&&(s=null),d||g===null?v(o)&&(s===null?n.removeAttribute(o):n.setAttribute(o,""+s)):g.mustUseProperty?n[g.propertyName]=s===null?g.type===3?!1:"":s:(o=g.attributeName,d=g.attributeNamespace,s===null?n.removeAttribute(o):(g=g.type,s=g===3||g===4&&s===!0?"":""+s,d?n.setAttributeNS(d,o,s):n.setAttribute(o,s))))}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),P=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),te=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),Q=Symbol.iterator;function fe(n){return n===null||typeof n!="object"?null:(n=Q&&n[Q]||n["@@iterator"],typeof n=="function"?n:null)}var T=Object.assign,z;function q(n){if(z===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);z=o&&o[1]||""}return`
|
|
26
|
-
`+z+n}var $=!1;function ue(n,o){if(!n||$)return"";$=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(U){var d=U}Reflect.construct(n,[],o)}else{try{o.call()}catch(U){d=U}n.call(o.prototype)}else{try{throw Error()}catch(U){d=U}n()}}catch(U){if(U&&d&&typeof U.stack=="string"){for(var g=U.stack.split(`
|
|
27
|
-
`),y=d.stack.split(`
|
|
28
|
-
`),b=g.length-1,N=y.length-1;1<=b&&0<=N&&g[b]!==y[N];)N--;for(;1<=b&&0<=N;b--,N--)if(g[b]!==y[N]){if(b!==1||N!==1)do if(b--,N--,0>N||g[b]!==y[N]){var L=`
|
|
29
|
-
`+g[b].replace(" at new "," at ");return n.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",n.displayName)),L}while(1<=b&&0<=N);break}}}finally{$=!1,Error.prepareStackTrace=s}return(n=n?n.displayName||n.name:"")?q(n):""}function ge(n){switch(n.tag){case 5:return q(n.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return n=ue(n.type,!1),n;case 11:return n=ue(n.type.render,!1),n;case 1:return n=ue(n.type,!0),n;default:return""}}function ke(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case V:return"Fragment";case P:return"Portal";case re:return"Profiler";case K:return"StrictMode";case ee:return"Suspense";case X:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case te:return(n.displayName||"Context")+".Consumer";case D:return(n._context.displayName||"Context")+".Provider";case se:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case W:return o=n.displayName||null,o!==null?o:ke(n.type)||"Memo";case ce:o=n._payload,n=n._init;try{return ke(n(o))}catch{}}return null}function he(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ke(o);case 8:return o===K?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function pe(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function le(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ve(n){var o=le(n)?"checked":"value",s=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),d=""+n[o];if(!n.hasOwnProperty(o)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var g=s.get,y=s.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return g.call(this)},set:function(b){d=""+b,y.call(this,b)}}),Object.defineProperty(n,o,{enumerable:s.enumerable}),{getValue:function(){return d},setValue:function(b){d=""+b},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function Le(n){n._valueTracker||(n._valueTracker=ve(n))}function Ie(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var s=o.getValue(),d="";return n&&(d=le(n)?n.checked?"true":"false":n.value),n=d,n!==s?(o.setValue(n),!0):!1}function Ge(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Rt(n,o){var s=o.checked;return T({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??n._wrapperState.initialChecked})}function bt(n,o){var s=o.defaultValue==null?"":o.defaultValue,d=o.checked!=null?o.checked:o.defaultChecked;s=pe(o.value!=null?o.value:s),n._wrapperState={initialChecked:d,initialValue:s,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Bt(n,o){o=o.checked,o!=null&&A(n,"checked",o,!1)}function qn(n,o){Bt(n,o);var s=pe(o.value),d=o.type;if(s!=null)d==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+s):n.value!==""+s&&(n.value=""+s);else if(d==="submit"||d==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?_e(n,o.type,s):o.hasOwnProperty("defaultValue")&&_e(n,o.type,pe(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function co(n,o,s){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var d=o.type;if(!(d!=="submit"&&d!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+n._wrapperState.initialValue,s||o===n.value||(n.value=o),n.defaultValue=o}s=n.name,s!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,s!==""&&(n.name=s)}function _e(n,o,s){(o!=="number"||Ge(n.ownerDocument)!==n)&&(s==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+s&&(n.defaultValue=""+s))}var dt=Array.isArray;function Ft(n,o,s,d){if(n=n.options,o){o={};for(var g=0;g<s.length;g++)o["$"+s[g]]=!0;for(s=0;s<n.length;s++)g=o.hasOwnProperty("$"+n[s].value),n[s].selected!==g&&(n[s].selected=g),g&&d&&(n[s].defaultSelected=!0)}else{for(s=""+pe(s),o=null,g=0;g<n.length;g++){if(n[g].value===s){n[g].selected=!0,d&&(n[g].defaultSelected=!0);return}o!==null||n[g].disabled||(o=n[g])}o!==null&&(o.selected=!0)}}function ft(n,o){if(o.dangerouslySetInnerHTML!=null)throw Error(r(91));return T({},o,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Me(n,o){var s=o.value;if(s==null){if(s=o.children,o=o.defaultValue,s!=null){if(o!=null)throw Error(r(92));if(dt(s)){if(1<s.length)throw Error(r(93));s=s[0]}o=s}o==null&&(o=""),s=o}n._wrapperState={initialValue:pe(s)}}function mt(n,o){var s=pe(o.value),d=pe(o.defaultValue);s!=null&&(s=""+s,s!==n.value&&(n.value=s),o.defaultValue==null&&n.defaultValue!==s&&(n.defaultValue=s)),d!=null&&(n.defaultValue=""+d)}function $t(n){var o=n.textContent;o===n._wrapperState.initialValue&&o!==""&&o!==null&&(n.value=o)}function G(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ne(n,o){return n==null||n==="http://www.w3.org/1999/xhtml"?G(o):n==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var be,Re=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,s,d,g){MSApp.execUnsafeLocalFunction(function(){return n(o,s,d,g)})}:n}(function(n,o){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=o;else{for(be=be||document.createElement("div"),be.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=be.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild)}});function Ne(n,o){if(o){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=o;return}}n.textContent=o}var St={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gn=["Webkit","ms","Moz","O"];Object.keys(St).forEach(function(n){Gn.forEach(function(o){o=o+n.charAt(0).toUpperCase()+n.substring(1),St[o]=St[n]})});function fn(n,o,s){return o==null||typeof o=="boolean"||o===""?"":s||typeof o!="number"||o===0||St.hasOwnProperty(n)&&St[n]?(""+o).trim():o+"px"}function ir(n,o){n=n.style;for(var s in o)if(o.hasOwnProperty(s)){var d=s.indexOf("--")===0,g=fn(s,o[s],d);s==="float"&&(s="cssFloat"),d?n.setProperty(s,g):n[s]=g}}var Ar=T({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ct(n,o){if(o){if(Ar[n]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(r(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(r(61))}if(o.style!=null&&typeof o.style!="object")throw Error(r(62))}}function zn(n,o){if(n.indexOf("-")===-1)return typeof o.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zt=null;function Ma(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ba=null,fo=null,po=null;function Uf(n){if(n=$i(n)){if(typeof Ba!="function")throw Error(r(280));var o=n.stateNode;o&&(o=ql(o),Ba(n.stateNode,n.type,o))}}function Vf(n){fo?po?po.push(n):po=[n]:fo=n}function Hf(){if(fo){var n=fo,o=po;if(po=fo=null,Uf(n),o)for(n=0;n<o.length;n++)Uf(o[n])}}function Wf(n,o){return n(o)}function qf(){}var Ua=!1;function Gf(n,o,s){if(Ua)return n(o,s);Ua=!0;try{return Wf(n,o,s)}finally{Ua=!1,(fo!==null||po!==null)&&(qf(),Hf())}}function ai(n,o){var s=n.stateNode;if(s===null)return null;var d=ql(s);if(d===null)return null;s=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(n=n.type,d=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!d;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(r(231,o,typeof s));return s}var Va=!1;if(c)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Va=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Va=!1}function U1(n,o,s,d,g,y,b,N,L){var U=Array.prototype.slice.call(arguments,3);try{o.apply(s,U)}catch(Z){this.onError(Z)}}var ci=!1,Cl=null,El=!1,Ha=null,V1={onError:function(n){ci=!0,Cl=n}};function H1(n,o,s,d,g,y,b,N,L){ci=!1,Cl=null,U1.apply(V1,arguments)}function W1(n,o,s,d,g,y,b,N,L){if(H1.apply(this,arguments),ci){if(ci){var U=Cl;ci=!1,Cl=null}else throw Error(r(198));El||(El=!0,Ha=U)}}function Lr(n){var o=n,s=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(s=o.return),n=o.return;while(n)}return o.tag===3?s:null}function Jf(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function Kf(n){if(Lr(n)!==n)throw Error(r(188))}function q1(n){var o=n.alternate;if(!o){if(o=Lr(n),o===null)throw Error(r(188));return o!==n?null:n}for(var s=n,d=o;;){var g=s.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){s=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===s)return Kf(g),n;if(y===d)return Kf(g),o;y=y.sibling}throw Error(r(188))}if(s.return!==d.return)s=g,d=y;else{for(var b=!1,N=g.child;N;){if(N===s){b=!0,s=g,d=y;break}if(N===d){b=!0,d=g,s=y;break}N=N.sibling}if(!b){for(N=y.child;N;){if(N===s){b=!0,s=y,d=g;break}if(N===d){b=!0,d=y,s=g;break}N=N.sibling}if(!b)throw Error(r(189))}}if(s.alternate!==d)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?n:o}function Qf(n){return n=q1(n),n!==null?Yf(n):null}function Yf(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var o=Yf(n);if(o!==null)return o;n=n.sibling}return null}var Xf=t.unstable_scheduleCallback,Zf=t.unstable_cancelCallback,G1=t.unstable_shouldYield,J1=t.unstable_requestPaint,lt=t.unstable_now,K1=t.unstable_getCurrentPriorityLevel,Wa=t.unstable_ImmediatePriority,ep=t.unstable_UserBlockingPriority,jl=t.unstable_NormalPriority,Q1=t.unstable_LowPriority,tp=t.unstable_IdlePriority,Tl=null,_n=null;function Y1(n){if(_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(Tl,n,void 0,(n.current.flags&128)===128)}catch{}}var Sn=Math.clz32?Math.clz32:ew,X1=Math.log,Z1=Math.LN2;function ew(n){return n>>>=0,n===0?32:31-(X1(n)/Z1|0)|0}var Rl=64,$l=4194304;function di(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Il(n,o){var s=n.pendingLanes;if(s===0)return 0;var d=0,g=n.suspendedLanes,y=n.pingedLanes,b=s&268435455;if(b!==0){var N=b&~g;N!==0?d=di(N):(y&=b,y!==0&&(d=di(y)))}else b=s&~g,b!==0?d=di(b):y!==0&&(d=di(y));if(d===0)return 0;if(o!==0&&o!==d&&(o&g)===0&&(g=d&-d,y=o&-o,g>=y||g===16&&(y&4194240)!==0))return o;if((d&4)!==0&&(d|=s&16),o=n.entangledLanes,o!==0)for(n=n.entanglements,o&=d;0<o;)s=31-Sn(o),g=1<<s,d|=n[s],o&=~g;return d}function tw(n,o){switch(n){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nw(n,o){for(var s=n.suspendedLanes,d=n.pingedLanes,g=n.expirationTimes,y=n.pendingLanes;0<y;){var b=31-Sn(y),N=1<<b,L=g[b];L===-1?((N&s)===0||(N&d)!==0)&&(g[b]=tw(N,o)):L<=o&&(n.expiredLanes|=N),y&=~N}}function qa(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function np(){var n=Rl;return Rl<<=1,(Rl&4194240)===0&&(Rl=64),n}function Ga(n){for(var o=[],s=0;31>s;s++)o.push(n);return o}function fi(n,o,s){n.pendingLanes|=o,o!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,o=31-Sn(o),n[o]=s}function rw(n,o){var s=n.pendingLanes&~o;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=o,n.mutableReadLanes&=o,n.entangledLanes&=o,o=n.entanglements;var d=n.eventTimes;for(n=n.expirationTimes;0<s;){var g=31-Sn(s),y=1<<g;o[g]=0,d[g]=-1,n[g]=-1,s&=~y}}function Ja(n,o){var s=n.entangledLanes|=o;for(n=n.entanglements;s;){var d=31-Sn(s),g=1<<d;g&o|n[d]&o&&(n[d]|=o),s&=~g}}var We=0;function rp(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var op,Ka,ip,lp,sp,Qa=!1,Nl=[],lr=null,sr=null,ar=null,pi=new Map,hi=new Map,ur=[],ow="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ap(n,o){switch(n){case"focusin":case"focusout":lr=null;break;case"dragenter":case"dragleave":sr=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":pi.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":hi.delete(o.pointerId)}}function mi(n,o,s,d,g,y){return n===null||n.nativeEvent!==y?(n={blockedOn:o,domEventName:s,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},o!==null&&(o=$i(o),o!==null&&Ka(o)),n):(n.eventSystemFlags|=d,o=n.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),n)}function iw(n,o,s,d,g){switch(o){case"focusin":return lr=mi(lr,n,o,s,d,g),!0;case"dragenter":return sr=mi(sr,n,o,s,d,g),!0;case"mouseover":return ar=mi(ar,n,o,s,d,g),!0;case"pointerover":var y=g.pointerId;return pi.set(y,mi(pi.get(y)||null,n,o,s,d,g)),!0;case"gotpointercapture":return y=g.pointerId,hi.set(y,mi(hi.get(y)||null,n,o,s,d,g)),!0}return!1}function up(n){var o=zr(n.target);if(o!==null){var s=Lr(o);if(s!==null){if(o=s.tag,o===13){if(o=Jf(s),o!==null){n.blockedOn=o,sp(n.priority,function(){ip(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Pl(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var s=Xa(n.domEventName,n.eventSystemFlags,o[0],n.nativeEvent);if(s===null){s=n.nativeEvent;var d=new s.constructor(s.type,s);Zt=d,s.target.dispatchEvent(d),Zt=null}else return o=$i(s),o!==null&&Ka(o),n.blockedOn=s,!1;o.shift()}return!0}function cp(n,o,s){Pl(n)&&s.delete(o)}function lw(){Qa=!1,lr!==null&&Pl(lr)&&(lr=null),sr!==null&&Pl(sr)&&(sr=null),ar!==null&&Pl(ar)&&(ar=null),pi.forEach(cp),hi.forEach(cp)}function gi(n,o){n.blockedOn===o&&(n.blockedOn=null,Qa||(Qa=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,lw)))}function xi(n){function o(g){return gi(g,n)}if(0<Nl.length){gi(Nl[0],n);for(var s=1;s<Nl.length;s++){var d=Nl[s];d.blockedOn===n&&(d.blockedOn=null)}}for(lr!==null&&gi(lr,n),sr!==null&&gi(sr,n),ar!==null&&gi(ar,n),pi.forEach(o),hi.forEach(o),s=0;s<ur.length;s++)d=ur[s],d.blockedOn===n&&(d.blockedOn=null);for(;0<ur.length&&(s=ur[0],s.blockedOn===null);)up(s),s.blockedOn===null&&ur.shift()}var ho=_.ReactCurrentBatchConfig,Al=!0;function sw(n,o,s,d){var g=We,y=ho.transition;ho.transition=null;try{We=1,Ya(n,o,s,d)}finally{We=g,ho.transition=y}}function aw(n,o,s,d){var g=We,y=ho.transition;ho.transition=null;try{We=4,Ya(n,o,s,d)}finally{We=g,ho.transition=y}}function Ya(n,o,s,d){if(Al){var g=Xa(n,o,s,d);if(g===null)mu(n,o,d,Ll,s),ap(n,d);else if(iw(g,n,o,s,d))d.stopPropagation();else if(ap(n,d),o&4&&-1<ow.indexOf(n)){for(;g!==null;){var y=$i(g);if(y!==null&&op(y),y=Xa(n,o,s,d),y===null&&mu(n,o,d,Ll,s),y===g)break;g=y}g!==null&&d.stopPropagation()}else mu(n,o,d,null,s)}}var Ll=null;function Xa(n,o,s,d){if(Ll=null,n=Ma(d),n=zr(n),n!==null)if(o=Lr(n),o===null)n=null;else if(s=o.tag,s===13){if(n=Jf(o),n!==null)return n;n=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null);return Ll=n,null}function dp(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(K1()){case Wa:return 1;case ep:return 4;case jl:case Q1:return 16;case tp:return 536870912;default:return 16}default:return 16}}var cr=null,Za=null,zl=null;function fp(){if(zl)return zl;var n,o=Za,s=o.length,d,g="value"in cr?cr.value:cr.textContent,y=g.length;for(n=0;n<s&&o[n]===g[n];n++);var b=s-n;for(d=1;d<=b&&o[s-d]===g[y-d];d++);return zl=g.slice(n,1<d?1-d:void 0)}function _l(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function Fl(){return!0}function pp(){return!1}function en(n){function o(s,d,g,y,b){this._reactName=s,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=b,this.currentTarget=null;for(var N in n)n.hasOwnProperty(N)&&(s=n[N],this[N]=s?s(y):y[N]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Fl:pp,this.isPropagationStopped=pp,this}return T(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Fl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Fl)},persist:function(){},isPersistent:Fl}),o}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=en(mo),yi=T({},mo,{view:0,detail:0}),uw=en(yi),tu,nu,vi,Ol=T({},yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ou,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==vi&&(vi&&n.type==="mousemove"?(tu=n.screenX-vi.screenX,nu=n.screenY-vi.screenY):nu=tu=0,vi=n),tu)},movementY:function(n){return"movementY"in n?n.movementY:nu}}),hp=en(Ol),cw=T({},Ol,{dataTransfer:0}),dw=en(cw),fw=T({},yi,{relatedTarget:0}),ru=en(fw),pw=T({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),hw=en(pw),mw=T({},mo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),gw=en(mw),xw=T({},mo,{data:0}),mp=en(xw),yw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ww={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kw(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=ww[n])?!!o[n]:!1}function ou(){return kw}var bw=T({},yi,{key:function(n){if(n.key){var o=yw[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=_l(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?vw[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ou,charCode:function(n){return n.type==="keypress"?_l(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?_l(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Sw=en(bw),Cw=T({},Ol,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gp=en(Cw),Ew=T({},yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ou}),jw=en(Ew),Tw=T({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rw=en(Tw),$w=T({},Ol,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Iw=en($w),Nw=[9,13,27,32],iu=c&&"CompositionEvent"in window,wi=null;c&&"documentMode"in document&&(wi=document.documentMode);var Pw=c&&"TextEvent"in window&&!wi,xp=c&&(!iu||wi&&8<wi&&11>=wi),yp=" ",vp=!1;function wp(n,o){switch(n){case"keyup":return Nw.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var go=!1;function Aw(n,o){switch(n){case"compositionend":return kp(o);case"keypress":return o.which!==32?null:(vp=!0,yp);case"textInput":return n=o.data,n===yp&&vp?null:n;default:return null}}function Lw(n,o){if(go)return n==="compositionend"||!iu&&wp(n,o)?(n=fp(),zl=Za=cr=null,go=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return xp&&o.locale!=="ko"?null:o.data;default:return null}}var zw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function bp(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!zw[n.type]:o==="textarea"}function Sp(n,o,s,d){Vf(d),o=Vl(o,"onChange"),0<o.length&&(s=new eu("onChange","change",null,s,d),n.push({event:s,listeners:o}))}var ki=null,bi=null;function _w(n){Bp(n,0)}function Dl(n){var o=ko(n);if(Ie(o))return n}function Fw(n,o){if(n==="change")return o}var Cp=!1;if(c){var lu;if(c){var su="oninput"in document;if(!su){var Ep=document.createElement("div");Ep.setAttribute("oninput","return;"),su=typeof Ep.oninput=="function"}lu=su}else lu=!1;Cp=lu&&(!document.documentMode||9<document.documentMode)}function jp(){ki&&(ki.detachEvent("onpropertychange",Tp),bi=ki=null)}function Tp(n){if(n.propertyName==="value"&&Dl(bi)){var o=[];Sp(o,bi,n,Ma(n)),Gf(_w,o)}}function Ow(n,o,s){n==="focusin"?(jp(),ki=o,bi=s,ki.attachEvent("onpropertychange",Tp)):n==="focusout"&&jp()}function Dw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Dl(bi)}function Mw(n,o){if(n==="click")return Dl(o)}function Bw(n,o){if(n==="input"||n==="change")return Dl(o)}function Uw(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var Cn=typeof Object.is=="function"?Object.is:Uw;function Si(n,o){if(Cn(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var s=Object.keys(n),d=Object.keys(o);if(s.length!==d.length)return!1;for(d=0;d<s.length;d++){var g=s[d];if(!f.call(o,g)||!Cn(n[g],o[g]))return!1}return!0}function Rp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function $p(n,o){var s=Rp(n);n=0;for(var d;s;){if(s.nodeType===3){if(d=n+s.textContent.length,n<=o&&d>=o)return{node:s,offset:o-n};n=d}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Rp(s)}}function Ip(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?Ip(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function Np(){for(var n=window,o=Ge();o instanceof n.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href=="string"}catch{s=!1}if(s)n=o.contentWindow;else break;o=Ge(n.document)}return o}function au(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function Vw(n){var o=Np(),s=n.focusedElem,d=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ip(s.ownerDocument.documentElement,s)){if(d!==null&&au(s)){if(o=d.start,n=d.end,n===void 0&&(n=o),"selectionStart"in s)s.selectionStart=o,s.selectionEnd=Math.min(n,s.value.length);else if(n=(o=s.ownerDocument||document)&&o.defaultView||window,n.getSelection){n=n.getSelection();var g=s.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!n.extend&&y>d&&(g=d,d=y,y=g),g=$p(s,y);var b=$p(s,d);g&&b&&(n.rangeCount!==1||n.anchorNode!==g.node||n.anchorOffset!==g.offset||n.focusNode!==b.node||n.focusOffset!==b.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),n.removeAllRanges(),y>d?(n.addRange(o),n.extend(b.node,b.offset)):(o.setEnd(b.node,b.offset),n.addRange(o)))}}for(o=[],n=s;n=n.parentNode;)n.nodeType===1&&o.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<o.length;s++)n=o[s],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var Hw=c&&"documentMode"in document&&11>=document.documentMode,xo=null,uu=null,Ci=null,cu=!1;function Pp(n,o,s){var d=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;cu||xo==null||xo!==Ge(d)||(d=xo,"selectionStart"in d&&au(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Ci&&Si(Ci,d)||(Ci=d,d=Vl(uu,"onSelect"),0<d.length&&(o=new eu("onSelect","select",null,o,s),n.push({event:o,listeners:d}),o.target=xo)))}function Ml(n,o){var s={};return s[n.toLowerCase()]=o.toLowerCase(),s["Webkit"+n]="webkit"+o,s["Moz"+n]="moz"+o,s}var yo={animationend:Ml("Animation","AnimationEnd"),animationiteration:Ml("Animation","AnimationIteration"),animationstart:Ml("Animation","AnimationStart"),transitionend:Ml("Transition","TransitionEnd")},du={},Ap={};c&&(Ap=document.createElement("div").style,"AnimationEvent"in window||(delete yo.animationend.animation,delete yo.animationiteration.animation,delete yo.animationstart.animation),"TransitionEvent"in window||delete yo.transitionend.transition);function Bl(n){if(du[n])return du[n];if(!yo[n])return n;var o=yo[n],s;for(s in o)if(o.hasOwnProperty(s)&&s in Ap)return du[n]=o[s];return n}var Lp=Bl("animationend"),zp=Bl("animationiteration"),_p=Bl("animationstart"),Fp=Bl("transitionend"),Op=new Map,Dp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function dr(n,o){Op.set(n,o),a(o,[n])}for(var fu=0;fu<Dp.length;fu++){var pu=Dp[fu],Ww=pu.toLowerCase(),qw=pu[0].toUpperCase()+pu.slice(1);dr(Ww,"on"+qw)}dr(Lp,"onAnimationEnd"),dr(zp,"onAnimationIteration"),dr(_p,"onAnimationStart"),dr("dblclick","onDoubleClick"),dr("focusin","onFocus"),dr("focusout","onBlur"),dr(Fp,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ei="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Gw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ei));function Mp(n,o,s){var d=n.type||"unknown-event";n.currentTarget=s,W1(d,o,void 0,n),n.currentTarget=null}function Bp(n,o){o=(o&4)!==0;for(var s=0;s<n.length;s++){var d=n[s],g=d.event;d=d.listeners;e:{var y=void 0;if(o)for(var b=d.length-1;0<=b;b--){var N=d[b],L=N.instance,U=N.currentTarget;if(N=N.listener,L!==y&&g.isPropagationStopped())break e;Mp(g,N,U),y=L}else for(b=0;b<d.length;b++){if(N=d[b],L=N.instance,U=N.currentTarget,N=N.listener,L!==y&&g.isPropagationStopped())break e;Mp(g,N,U),y=L}}}if(El)throw n=Ha,El=!1,Ha=null,n}function Xe(n,o){var s=o[ku];s===void 0&&(s=o[ku]=new Set);var d=n+"__bubble";s.has(d)||(Up(o,n,2,!1),s.add(d))}function hu(n,o,s){var d=0;o&&(d|=4),Up(s,n,d,o)}var Ul="_reactListening"+Math.random().toString(36).slice(2);function ji(n){if(!n[Ul]){n[Ul]=!0,i.forEach(function(s){s!=="selectionchange"&&(Gw.has(s)||hu(s,!1,n),hu(s,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[Ul]||(o[Ul]=!0,hu("selectionchange",!1,o))}}function Up(n,o,s,d){switch(dp(o)){case 1:var g=sw;break;case 4:g=aw;break;default:g=Ya}s=g.bind(null,o,s,n),g=void 0,!Va||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),d?g!==void 0?n.addEventListener(o,s,{capture:!0,passive:g}):n.addEventListener(o,s,!0):g!==void 0?n.addEventListener(o,s,{passive:g}):n.addEventListener(o,s,!1)}function mu(n,o,s,d,g){var y=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var b=d.tag;if(b===3||b===4){var N=d.stateNode.containerInfo;if(N===g||N.nodeType===8&&N.parentNode===g)break;if(b===4)for(b=d.return;b!==null;){var L=b.tag;if((L===3||L===4)&&(L=b.stateNode.containerInfo,L===g||L.nodeType===8&&L.parentNode===g))return;b=b.return}for(;N!==null;){if(b=zr(N),b===null)return;if(L=b.tag,L===5||L===6){d=y=b;continue e}N=N.parentNode}}d=d.return}Gf(function(){var U=y,Z=Ma(s),oe=[];e:{var Y=Op.get(n);if(Y!==void 0){var me=eu,ye=n;switch(n){case"keypress":if(_l(s)===0)break e;case"keydown":case"keyup":me=Sw;break;case"focusin":ye="focus",me=ru;break;case"focusout":ye="blur",me=ru;break;case"beforeblur":case"afterblur":me=ru;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=dw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=jw;break;case Lp:case zp:case _p:me=hw;break;case Fp:me=Rw;break;case"scroll":me=uw;break;case"wheel":me=Iw;break;case"copy":case"cut":case"paste":me=gw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=gp}var we=(o&4)!==0,st=!we&&n==="scroll",M=we?Y!==null?Y+"Capture":null:Y;we=[];for(var F=U,B;F!==null;){B=F;var ae=B.stateNode;if(B.tag===5&&ae!==null&&(B=ae,M!==null&&(ae=ai(F,M),ae!=null&&we.push(Ti(F,ae,B)))),st)break;F=F.return}0<we.length&&(Y=new me(Y,ye,null,s,Z),oe.push({event:Y,listeners:we}))}}if((o&7)===0){e:{if(Y=n==="mouseover"||n==="pointerover",me=n==="mouseout"||n==="pointerout",Y&&s!==Zt&&(ye=s.relatedTarget||s.fromElement)&&(zr(ye)||ye[Jn]))break e;if((me||Y)&&(Y=Z.window===Z?Z:(Y=Z.ownerDocument)?Y.defaultView||Y.parentWindow:window,me?(ye=s.relatedTarget||s.toElement,me=U,ye=ye?zr(ye):null,ye!==null&&(st=Lr(ye),ye!==st||ye.tag!==5&&ye.tag!==6)&&(ye=null)):(me=null,ye=U),me!==ye)){if(we=hp,ae="onMouseLeave",M="onMouseEnter",F="mouse",(n==="pointerout"||n==="pointerover")&&(we=gp,ae="onPointerLeave",M="onPointerEnter",F="pointer"),st=me==null?Y:ko(me),B=ye==null?Y:ko(ye),Y=new we(ae,F+"leave",me,s,Z),Y.target=st,Y.relatedTarget=B,ae=null,zr(Z)===U&&(we=new we(M,F+"enter",ye,s,Z),we.target=B,we.relatedTarget=st,ae=we),st=ae,me&&ye)t:{for(we=me,M=ye,F=0,B=we;B;B=vo(B))F++;for(B=0,ae=M;ae;ae=vo(ae))B++;for(;0<F-B;)we=vo(we),F--;for(;0<B-F;)M=vo(M),B--;for(;F--;){if(we===M||M!==null&&we===M.alternate)break t;we=vo(we),M=vo(M)}we=null}else we=null;me!==null&&Vp(oe,Y,me,we,!1),ye!==null&&st!==null&&Vp(oe,st,ye,we,!0)}}e:{if(Y=U?ko(U):window,me=Y.nodeName&&Y.nodeName.toLowerCase(),me==="select"||me==="input"&&Y.type==="file")var Se=Fw;else if(bp(Y))if(Cp)Se=Bw;else{Se=Dw;var Ce=Ow}else(me=Y.nodeName)&&me.toLowerCase()==="input"&&(Y.type==="checkbox"||Y.type==="radio")&&(Se=Mw);if(Se&&(Se=Se(n,U))){Sp(oe,Se,s,Z);break e}Ce&&Ce(n,Y,U),n==="focusout"&&(Ce=Y._wrapperState)&&Ce.controlled&&Y.type==="number"&&_e(Y,"number",Y.value)}switch(Ce=U?ko(U):window,n){case"focusin":(bp(Ce)||Ce.contentEditable==="true")&&(xo=Ce,uu=U,Ci=null);break;case"focusout":Ci=uu=xo=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Pp(oe,s,Z);break;case"selectionchange":if(Hw)break;case"keydown":case"keyup":Pp(oe,s,Z)}var Ee;if(iu)e:{switch(n){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else go?wp(n,s)&&($e="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&($e="onCompositionStart");$e&&(xp&&s.locale!=="ko"&&(go||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&go&&(Ee=fp()):(cr=Z,Za="value"in cr?cr.value:cr.textContent,go=!0)),Ce=Vl(U,$e),0<Ce.length&&($e=new mp($e,n,null,s,Z),oe.push({event:$e,listeners:Ce}),Ee?$e.data=Ee:(Ee=kp(s),Ee!==null&&($e.data=Ee)))),(Ee=Pw?Aw(n,s):Lw(n,s))&&(U=Vl(U,"onBeforeInput"),0<U.length&&(Z=new mp("onBeforeInput","beforeinput",null,s,Z),oe.push({event:Z,listeners:U}),Z.data=Ee))}Bp(oe,o)})}function Ti(n,o,s){return{instance:n,listener:o,currentTarget:s}}function Vl(n,o){for(var s=o+"Capture",d=[];n!==null;){var g=n,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=ai(n,s),y!=null&&d.unshift(Ti(n,y,g)),y=ai(n,o),y!=null&&d.push(Ti(n,y,g))),n=n.return}return d}function vo(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Vp(n,o,s,d,g){for(var y=o._reactName,b=[];s!==null&&s!==d;){var N=s,L=N.alternate,U=N.stateNode;if(L!==null&&L===d)break;N.tag===5&&U!==null&&(N=U,g?(L=ai(s,y),L!=null&&b.unshift(Ti(s,L,N))):g||(L=ai(s,y),L!=null&&b.push(Ti(s,L,N)))),s=s.return}b.length!==0&&n.push({event:o,listeners:b})}var Jw=/\r\n?/g,Kw=/\u0000|\uFFFD/g;function Hp(n){return(typeof n=="string"?n:""+n).replace(Jw,`
|
|
30
|
-
`).replace(Kw,"")}function Hl(n,o,s){if(o=Hp(o),Hp(n)!==o&&s)throw Error(r(425))}function Wl(){}var gu=null,xu=null;function yu(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var vu=typeof setTimeout=="function"?setTimeout:void 0,Qw=typeof clearTimeout=="function"?clearTimeout:void 0,Wp=typeof Promise=="function"?Promise:void 0,Yw=typeof queueMicrotask=="function"?queueMicrotask:typeof Wp<"u"?function(n){return Wp.resolve(null).then(n).catch(Xw)}:vu;function Xw(n){setTimeout(function(){throw n})}function wu(n,o){var s=o,d=0;do{var g=s.nextSibling;if(n.removeChild(s),g&&g.nodeType===8)if(s=g.data,s==="/$"){if(d===0){n.removeChild(g),xi(o);return}d--}else s!=="$"&&s!=="$?"&&s!=="$!"||d++;s=g}while(s);xi(o)}function fr(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return n}function qp(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"){if(o===0)return n;o--}else s==="/$"&&o++}n=n.previousSibling}return null}var wo=Math.random().toString(36).slice(2),Fn="__reactFiber$"+wo,Ri="__reactProps$"+wo,Jn="__reactContainer$"+wo,ku="__reactEvents$"+wo,Zw="__reactListeners$"+wo,ek="__reactHandles$"+wo;function zr(n){var o=n[Fn];if(o)return o;for(var s=n.parentNode;s;){if(o=s[Jn]||s[Fn]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(n=qp(n);n!==null;){if(s=n[Fn])return s;n=qp(n)}return o}n=s,s=n.parentNode}return null}function $i(n){return n=n[Fn]||n[Jn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function ko(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function ql(n){return n[Ri]||null}var bu=[],bo=-1;function pr(n){return{current:n}}function Ze(n){0>bo||(n.current=bu[bo],bu[bo]=null,bo--)}function Ke(n,o){bo++,bu[bo]=n.current,n.current=o}var hr={},It=pr(hr),Ut=pr(!1),_r=hr;function So(n,o){var s=n.type.contextTypes;if(!s)return hr;var d=n.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===o)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in s)g[y]=o[y];return d&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=g),g}function Vt(n){return n=n.childContextTypes,n!=null}function Gl(){Ze(Ut),Ze(It)}function Gp(n,o,s){if(It.current!==hr)throw Error(r(168));Ke(It,o),Ke(Ut,s)}function Jp(n,o,s){var d=n.stateNode;if(o=o.childContextTypes,typeof d.getChildContext!="function")return s;d=d.getChildContext();for(var g in d)if(!(g in o))throw Error(r(108,he(n)||"Unknown",g));return T({},s,d)}function Jl(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||hr,_r=It.current,Ke(It,n),Ke(Ut,Ut.current),!0}function Kp(n,o,s){var d=n.stateNode;if(!d)throw Error(r(169));s?(n=Jp(n,o,_r),d.__reactInternalMemoizedMergedChildContext=n,Ze(Ut),Ze(It),Ke(It,n)):Ze(Ut),Ke(Ut,s)}var Kn=null,Kl=!1,Su=!1;function Qp(n){Kn===null?Kn=[n]:Kn.push(n)}function tk(n){Kl=!0,Qp(n)}function mr(){if(!Su&&Kn!==null){Su=!0;var n=0,o=We;try{var s=Kn;for(We=1;n<s.length;n++){var d=s[n];do d=d(!0);while(d!==null)}Kn=null,Kl=!1}catch(g){throw Kn!==null&&(Kn=Kn.slice(n+1)),Xf(Wa,mr),g}finally{We=o,Su=!1}}return null}var Co=[],Eo=0,Ql=null,Yl=0,pn=[],hn=0,Fr=null,Qn=1,Yn="";function Or(n,o){Co[Eo++]=Yl,Co[Eo++]=Ql,Ql=n,Yl=o}function Yp(n,o,s){pn[hn++]=Qn,pn[hn++]=Yn,pn[hn++]=Fr,Fr=n;var d=Qn;n=Yn;var g=32-Sn(d)-1;d&=~(1<<g),s+=1;var y=32-Sn(o)+g;if(30<y){var b=g-g%5;y=(d&(1<<b)-1).toString(32),d>>=b,g-=b,Qn=1<<32-Sn(o)+g|s<<g|d,Yn=y+n}else Qn=1<<y|s<<g|d,Yn=n}function Cu(n){n.return!==null&&(Or(n,1),Yp(n,1,0))}function Eu(n){for(;n===Ql;)Ql=Co[--Eo],Co[Eo]=null,Yl=Co[--Eo],Co[Eo]=null;for(;n===Fr;)Fr=pn[--hn],pn[hn]=null,Yn=pn[--hn],pn[hn]=null,Qn=pn[--hn],pn[hn]=null}var tn=null,nn=null,tt=!1,En=null;function Xp(n,o){var s=yn(5,null,null,0);s.elementType="DELETED",s.stateNode=o,s.return=n,o=n.deletions,o===null?(n.deletions=[s],n.flags|=16):o.push(s)}function Zp(n,o){switch(n.tag){case 5:var s=n.type;return o=o.nodeType!==1||s.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(n.stateNode=o,tn=n,nn=fr(o.firstChild),!0):!1;case 6:return o=n.pendingProps===""||o.nodeType!==3?null:o,o!==null?(n.stateNode=o,tn=n,nn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(s=Fr!==null?{id:Qn,overflow:Yn}:null,n.memoizedState={dehydrated:o,treeContext:s,retryLane:1073741824},s=yn(18,null,null,0),s.stateNode=o,s.return=n,n.child=s,tn=n,nn=null,!0):!1;default:return!1}}function ju(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Tu(n){if(tt){var o=nn;if(o){var s=o;if(!Zp(n,o)){if(ju(n))throw Error(r(418));o=fr(s.nextSibling);var d=tn;o&&Zp(n,o)?Xp(d,s):(n.flags=n.flags&-4097|2,tt=!1,tn=n)}}else{if(ju(n))throw Error(r(418));n.flags=n.flags&-4097|2,tt=!1,tn=n}}}function eh(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;tn=n}function Xl(n){if(n!==tn)return!1;if(!tt)return eh(n),tt=!0,!1;var o;if((o=n.tag!==3)&&!(o=n.tag!==5)&&(o=n.type,o=o!=="head"&&o!=="body"&&!yu(n.type,n.memoizedProps)),o&&(o=nn)){if(ju(n))throw th(),Error(r(418));for(;o;)Xp(n,o),o=fr(o.nextSibling)}if(eh(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"){if(o===0){nn=fr(n.nextSibling);break e}o--}else s!=="$"&&s!=="$!"&&s!=="$?"||o++}n=n.nextSibling}nn=null}}else nn=tn?fr(n.stateNode.nextSibling):null;return!0}function th(){for(var n=nn;n;)n=fr(n.nextSibling)}function jo(){nn=tn=null,tt=!1}function Ru(n){En===null?En=[n]:En.push(n)}var nk=_.ReactCurrentBatchConfig;function Ii(n,o,s){if(n=s.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(r(309));var d=s.stateNode}if(!d)throw Error(r(147,n));var g=d,y=""+n;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===y?o.ref:(o=function(b){var N=g.refs;b===null?delete N[y]:N[y]=b},o._stringRef=y,o)}if(typeof n!="string")throw Error(r(284));if(!s._owner)throw Error(r(290,n))}return n}function Zl(n,o){throw n=Object.prototype.toString.call(o),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n))}function nh(n){var o=n._init;return o(n._payload)}function rh(n){function o(M,F){if(n){var B=M.deletions;B===null?(M.deletions=[F],M.flags|=16):B.push(F)}}function s(M,F){if(!n)return null;for(;F!==null;)o(M,F),F=F.sibling;return null}function d(M,F){for(M=new Map;F!==null;)F.key!==null?M.set(F.key,F):M.set(F.index,F),F=F.sibling;return M}function g(M,F){return M=Sr(M,F),M.index=0,M.sibling=null,M}function y(M,F,B){return M.index=B,n?(B=M.alternate,B!==null?(B=B.index,B<F?(M.flags|=2,F):B):(M.flags|=2,F)):(M.flags|=1048576,F)}function b(M){return n&&M.alternate===null&&(M.flags|=2),M}function N(M,F,B,ae){return F===null||F.tag!==6?(F=vc(B,M.mode,ae),F.return=M,F):(F=g(F,B),F.return=M,F)}function L(M,F,B,ae){var Se=B.type;return Se===V?Z(M,F,B.props.children,ae,B.key):F!==null&&(F.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===ce&&nh(Se)===F.type)?(ae=g(F,B.props),ae.ref=Ii(M,F,B),ae.return=M,ae):(ae=Ss(B.type,B.key,B.props,null,M.mode,ae),ae.ref=Ii(M,F,B),ae.return=M,ae)}function U(M,F,B,ae){return F===null||F.tag!==4||F.stateNode.containerInfo!==B.containerInfo||F.stateNode.implementation!==B.implementation?(F=wc(B,M.mode,ae),F.return=M,F):(F=g(F,B.children||[]),F.return=M,F)}function Z(M,F,B,ae,Se){return F===null||F.tag!==7?(F=qr(B,M.mode,ae,Se),F.return=M,F):(F=g(F,B),F.return=M,F)}function oe(M,F,B){if(typeof F=="string"&&F!==""||typeof F=="number")return F=vc(""+F,M.mode,B),F.return=M,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case O:return B=Ss(F.type,F.key,F.props,null,M.mode,B),B.ref=Ii(M,null,F),B.return=M,B;case P:return F=wc(F,M.mode,B),F.return=M,F;case ce:var ae=F._init;return oe(M,ae(F._payload),B)}if(dt(F)||fe(F))return F=qr(F,M.mode,B,null),F.return=M,F;Zl(M,F)}return null}function Y(M,F,B,ae){var Se=F!==null?F.key:null;if(typeof B=="string"&&B!==""||typeof B=="number")return Se!==null?null:N(M,F,""+B,ae);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return B.key===Se?L(M,F,B,ae):null;case P:return B.key===Se?U(M,F,B,ae):null;case ce:return Se=B._init,Y(M,F,Se(B._payload),ae)}if(dt(B)||fe(B))return Se!==null?null:Z(M,F,B,ae,null);Zl(M,B)}return null}function me(M,F,B,ae,Se){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return M=M.get(B)||null,N(F,M,""+ae,Se);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case O:return M=M.get(ae.key===null?B:ae.key)||null,L(F,M,ae,Se);case P:return M=M.get(ae.key===null?B:ae.key)||null,U(F,M,ae,Se);case ce:var Ce=ae._init;return me(M,F,B,Ce(ae._payload),Se)}if(dt(ae)||fe(ae))return M=M.get(B)||null,Z(F,M,ae,Se,null);Zl(F,ae)}return null}function ye(M,F,B,ae){for(var Se=null,Ce=null,Ee=F,$e=F=0,yt=null;Ee!==null&&$e<B.length;$e++){Ee.index>$e?(yt=Ee,Ee=null):yt=Ee.sibling;var Ue=Y(M,Ee,B[$e],ae);if(Ue===null){Ee===null&&(Ee=yt);break}n&&Ee&&Ue.alternate===null&&o(M,Ee),F=y(Ue,F,$e),Ce===null?Se=Ue:Ce.sibling=Ue,Ce=Ue,Ee=yt}if($e===B.length)return s(M,Ee),tt&&Or(M,$e),Se;if(Ee===null){for(;$e<B.length;$e++)Ee=oe(M,B[$e],ae),Ee!==null&&(F=y(Ee,F,$e),Ce===null?Se=Ee:Ce.sibling=Ee,Ce=Ee);return tt&&Or(M,$e),Se}for(Ee=d(M,Ee);$e<B.length;$e++)yt=me(Ee,M,$e,B[$e],ae),yt!==null&&(n&&yt.alternate!==null&&Ee.delete(yt.key===null?$e:yt.key),F=y(yt,F,$e),Ce===null?Se=yt:Ce.sibling=yt,Ce=yt);return n&&Ee.forEach(function(Cr){return o(M,Cr)}),tt&&Or(M,$e),Se}function we(M,F,B,ae){var Se=fe(B);if(typeof Se!="function")throw Error(r(150));if(B=Se.call(B),B==null)throw Error(r(151));for(var Ce=Se=null,Ee=F,$e=F=0,yt=null,Ue=B.next();Ee!==null&&!Ue.done;$e++,Ue=B.next()){Ee.index>$e?(yt=Ee,Ee=null):yt=Ee.sibling;var Cr=Y(M,Ee,Ue.value,ae);if(Cr===null){Ee===null&&(Ee=yt);break}n&&Ee&&Cr.alternate===null&&o(M,Ee),F=y(Cr,F,$e),Ce===null?Se=Cr:Ce.sibling=Cr,Ce=Cr,Ee=yt}if(Ue.done)return s(M,Ee),tt&&Or(M,$e),Se;if(Ee===null){for(;!Ue.done;$e++,Ue=B.next())Ue=oe(M,Ue.value,ae),Ue!==null&&(F=y(Ue,F,$e),Ce===null?Se=Ue:Ce.sibling=Ue,Ce=Ue);return tt&&Or(M,$e),Se}for(Ee=d(M,Ee);!Ue.done;$e++,Ue=B.next())Ue=me(Ee,M,$e,Ue.value,ae),Ue!==null&&(n&&Ue.alternate!==null&&Ee.delete(Ue.key===null?$e:Ue.key),F=y(Ue,F,$e),Ce===null?Se=Ue:Ce.sibling=Ue,Ce=Ue);return n&&Ee.forEach(function(zk){return o(M,zk)}),tt&&Or(M,$e),Se}function st(M,F,B,ae){if(typeof B=="object"&&B!==null&&B.type===V&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case O:e:{for(var Se=B.key,Ce=F;Ce!==null;){if(Ce.key===Se){if(Se=B.type,Se===V){if(Ce.tag===7){s(M,Ce.sibling),F=g(Ce,B.props.children),F.return=M,M=F;break e}}else if(Ce.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===ce&&nh(Se)===Ce.type){s(M,Ce.sibling),F=g(Ce,B.props),F.ref=Ii(M,Ce,B),F.return=M,M=F;break e}s(M,Ce);break}else o(M,Ce);Ce=Ce.sibling}B.type===V?(F=qr(B.props.children,M.mode,ae,B.key),F.return=M,M=F):(ae=Ss(B.type,B.key,B.props,null,M.mode,ae),ae.ref=Ii(M,F,B),ae.return=M,M=ae)}return b(M);case P:e:{for(Ce=B.key;F!==null;){if(F.key===Ce)if(F.tag===4&&F.stateNode.containerInfo===B.containerInfo&&F.stateNode.implementation===B.implementation){s(M,F.sibling),F=g(F,B.children||[]),F.return=M,M=F;break e}else{s(M,F);break}else o(M,F);F=F.sibling}F=wc(B,M.mode,ae),F.return=M,M=F}return b(M);case ce:return Ce=B._init,st(M,F,Ce(B._payload),ae)}if(dt(B))return ye(M,F,B,ae);if(fe(B))return we(M,F,B,ae);Zl(M,B)}return typeof B=="string"&&B!==""||typeof B=="number"?(B=""+B,F!==null&&F.tag===6?(s(M,F.sibling),F=g(F,B),F.return=M,M=F):(s(M,F),F=vc(B,M.mode,ae),F.return=M,M=F),b(M)):s(M,F)}return st}var To=rh(!0),oh=rh(!1),es=pr(null),ts=null,Ro=null,$u=null;function Iu(){$u=Ro=ts=null}function Nu(n){var o=es.current;Ze(es),n._currentValue=o}function Pu(n,o,s){for(;n!==null;){var d=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),n===s)break;n=n.return}}function $o(n,o){ts=n,$u=Ro=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&o)!==0&&(Ht=!0),n.firstContext=null)}function mn(n){var o=n._currentValue;if($u!==n)if(n={context:n,memoizedValue:o,next:null},Ro===null){if(ts===null)throw Error(r(308));Ro=n,ts.dependencies={lanes:0,firstContext:n}}else Ro=Ro.next=n;return o}var Dr=null;function Au(n){Dr===null?Dr=[n]:Dr.push(n)}function ih(n,o,s,d){var g=o.interleaved;return g===null?(s.next=s,Au(o)):(s.next=g.next,g.next=s),o.interleaved=s,Xn(n,d)}function Xn(n,o){n.lanes|=o;var s=n.alternate;for(s!==null&&(s.lanes|=o),s=n,n=n.return;n!==null;)n.childLanes|=o,s=n.alternate,s!==null&&(s.childLanes|=o),s=n,n=n.return;return s.tag===3?s.stateNode:null}var gr=!1;function Lu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lh(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Zn(n,o){return{eventTime:n,lane:o,tag:0,payload:null,callback:null,next:null}}function xr(n,o,s){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,(Be&2)!==0){var g=d.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),d.pending=o,Xn(n,s)}return g=d.interleaved,g===null?(o.next=o,Au(d)):(o.next=g.next,g.next=o),d.interleaved=o,Xn(n,s)}function ns(n,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194240)!==0)){var d=o.lanes;d&=n.pendingLanes,s|=d,o.lanes=s,Ja(n,s)}}function sh(n,o){var s=n.updateQueue,d=n.alternate;if(d!==null&&(d=d.updateQueue,s===d)){var g=null,y=null;if(s=s.firstBaseUpdate,s!==null){do{var b={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};y===null?g=y=b:y=y.next=b,s=s.next}while(s!==null);y===null?g=y=o:y=y.next=o}else g=y=o;s={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=o:n.next=o,s.lastBaseUpdate=o}function rs(n,o,s,d){var g=n.updateQueue;gr=!1;var y=g.firstBaseUpdate,b=g.lastBaseUpdate,N=g.shared.pending;if(N!==null){g.shared.pending=null;var L=N,U=L.next;L.next=null,b===null?y=U:b.next=U,b=L;var Z=n.alternate;Z!==null&&(Z=Z.updateQueue,N=Z.lastBaseUpdate,N!==b&&(N===null?Z.firstBaseUpdate=U:N.next=U,Z.lastBaseUpdate=L))}if(y!==null){var oe=g.baseState;b=0,Z=U=L=null,N=y;do{var Y=N.lane,me=N.eventTime;if((d&Y)===Y){Z!==null&&(Z=Z.next={eventTime:me,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var ye=n,we=N;switch(Y=o,me=s,we.tag){case 1:if(ye=we.payload,typeof ye=="function"){oe=ye.call(me,oe,Y);break e}oe=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=we.payload,Y=typeof ye=="function"?ye.call(me,oe,Y):ye,Y==null)break e;oe=T({},oe,Y);break e;case 2:gr=!0}}N.callback!==null&&N.lane!==0&&(n.flags|=64,Y=g.effects,Y===null?g.effects=[N]:Y.push(N))}else me={eventTime:me,lane:Y,tag:N.tag,payload:N.payload,callback:N.callback,next:null},Z===null?(U=Z=me,L=oe):Z=Z.next=me,b|=Y;if(N=N.next,N===null){if(N=g.shared.pending,N===null)break;Y=N,N=Y.next,Y.next=null,g.lastBaseUpdate=Y,g.shared.pending=null}}while(!0);if(Z===null&&(L=oe),g.baseState=L,g.firstBaseUpdate=U,g.lastBaseUpdate=Z,o=g.shared.interleaved,o!==null){g=o;do b|=g.lane,g=g.next;while(g!==o)}else y===null&&(g.shared.lanes=0);Ur|=b,n.lanes=b,n.memoizedState=oe}}function ah(n,o,s){if(n=o.effects,o.effects=null,n!==null)for(o=0;o<n.length;o++){var d=n[o],g=d.callback;if(g!==null){if(d.callback=null,d=s,typeof g!="function")throw Error(r(191,g));g.call(d)}}}var Ni={},On=pr(Ni),Pi=pr(Ni),Ai=pr(Ni);function Mr(n){if(n===Ni)throw Error(r(174));return n}function zu(n,o){switch(Ke(Ai,o),Ke(Pi,n),Ke(On,Ni),n=o.nodeType,n){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ne(null,"");break;default:n=n===8?o.parentNode:o,o=n.namespaceURI||null,n=n.tagName,o=ne(o,n)}Ze(On),Ke(On,o)}function Io(){Ze(On),Ze(Pi),Ze(Ai)}function uh(n){Mr(Ai.current);var o=Mr(On.current),s=ne(o,n.type);o!==s&&(Ke(Pi,n),Ke(On,s))}function _u(n){Pi.current===n&&(Ze(On),Ze(Pi))}var rt=pr(0);function os(n){for(var o=n;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Fu=[];function Ou(){for(var n=0;n<Fu.length;n++)Fu[n]._workInProgressVersionPrimary=null;Fu.length=0}var is=_.ReactCurrentDispatcher,Du=_.ReactCurrentBatchConfig,Br=0,ot=null,pt=null,gt=null,ls=!1,Li=!1,zi=0,rk=0;function Nt(){throw Error(r(321))}function Mu(n,o){if(o===null)return!1;for(var s=0;s<o.length&&s<n.length;s++)if(!Cn(n[s],o[s]))return!1;return!0}function Bu(n,o,s,d,g,y){if(Br=y,ot=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,is.current=n===null||n.memoizedState===null?sk:ak,n=s(d,g),Li){y=0;do{if(Li=!1,zi=0,25<=y)throw Error(r(301));y+=1,gt=pt=null,o.updateQueue=null,is.current=uk,n=s(d,g)}while(Li)}if(is.current=us,o=pt!==null&&pt.next!==null,Br=0,gt=pt=ot=null,ls=!1,o)throw Error(r(300));return n}function Uu(){var n=zi!==0;return zi=0,n}function Dn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?ot.memoizedState=gt=n:gt=gt.next=n,gt}function gn(){if(pt===null){var n=ot.alternate;n=n!==null?n.memoizedState:null}else n=pt.next;var o=gt===null?ot.memoizedState:gt.next;if(o!==null)gt=o,pt=n;else{if(n===null)throw Error(r(310));pt=n,n={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},gt===null?ot.memoizedState=gt=n:gt=gt.next=n}return gt}function _i(n,o){return typeof o=="function"?o(n):o}function Vu(n){var o=gn(),s=o.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var d=pt,g=d.baseQueue,y=s.pending;if(y!==null){if(g!==null){var b=g.next;g.next=y.next,y.next=b}d.baseQueue=g=y,s.pending=null}if(g!==null){y=g.next,d=d.baseState;var N=b=null,L=null,U=y;do{var Z=U.lane;if((Br&Z)===Z)L!==null&&(L=L.next={lane:0,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),d=U.hasEagerState?U.eagerState:n(d,U.action);else{var oe={lane:Z,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null};L===null?(N=L=oe,b=d):L=L.next=oe,ot.lanes|=Z,Ur|=Z}U=U.next}while(U!==null&&U!==y);L===null?b=d:L.next=N,Cn(d,o.memoizedState)||(Ht=!0),o.memoizedState=d,o.baseState=b,o.baseQueue=L,s.lastRenderedState=d}if(n=s.interleaved,n!==null){g=n;do y=g.lane,ot.lanes|=y,Ur|=y,g=g.next;while(g!==n)}else g===null&&(s.lanes=0);return[o.memoizedState,s.dispatch]}function Hu(n){var o=gn(),s=o.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var d=s.dispatch,g=s.pending,y=o.memoizedState;if(g!==null){s.pending=null;var b=g=g.next;do y=n(y,b.action),b=b.next;while(b!==g);Cn(y,o.memoizedState)||(Ht=!0),o.memoizedState=y,o.baseQueue===null&&(o.baseState=y),s.lastRenderedState=y}return[y,d]}function ch(){}function dh(n,o){var s=ot,d=gn(),g=o(),y=!Cn(d.memoizedState,g);if(y&&(d.memoizedState=g,Ht=!0),d=d.queue,Wu(hh.bind(null,s,d,n),[n]),d.getSnapshot!==o||y||gt!==null&>.memoizedState.tag&1){if(s.flags|=2048,Fi(9,ph.bind(null,s,d,g,o),void 0,null),xt===null)throw Error(r(349));(Br&30)!==0||fh(s,o,g)}return g}function fh(n,o,s){n.flags|=16384,n={getSnapshot:o,value:s},o=ot.updateQueue,o===null?(o={lastEffect:null,stores:null},ot.updateQueue=o,o.stores=[n]):(s=o.stores,s===null?o.stores=[n]:s.push(n))}function ph(n,o,s,d){o.value=s,o.getSnapshot=d,mh(o)&&gh(n)}function hh(n,o,s){return s(function(){mh(o)&&gh(n)})}function mh(n){var o=n.getSnapshot;n=n.value;try{var s=o();return!Cn(n,s)}catch{return!0}}function gh(n){var o=Xn(n,1);o!==null&&$n(o,n,1,-1)}function xh(n){var o=Dn();return typeof n=="function"&&(n=n()),o.memoizedState=o.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:n},o.queue=n,n=n.dispatch=lk.bind(null,ot,n),[o.memoizedState,n]}function Fi(n,o,s,d){return n={tag:n,create:o,destroy:s,deps:d,next:null},o=ot.updateQueue,o===null?(o={lastEffect:null,stores:null},ot.updateQueue=o,o.lastEffect=n.next=n):(s=o.lastEffect,s===null?o.lastEffect=n.next=n:(d=s.next,s.next=n,n.next=d,o.lastEffect=n)),n}function yh(){return gn().memoizedState}function ss(n,o,s,d){var g=Dn();ot.flags|=n,g.memoizedState=Fi(1|o,s,void 0,d===void 0?null:d)}function as(n,o,s,d){var g=gn();d=d===void 0?null:d;var y=void 0;if(pt!==null){var b=pt.memoizedState;if(y=b.destroy,d!==null&&Mu(d,b.deps)){g.memoizedState=Fi(o,s,y,d);return}}ot.flags|=n,g.memoizedState=Fi(1|o,s,y,d)}function vh(n,o){return ss(8390656,8,n,o)}function Wu(n,o){return as(2048,8,n,o)}function wh(n,o){return as(4,2,n,o)}function kh(n,o){return as(4,4,n,o)}function bh(n,o){if(typeof o=="function")return n=n(),o(n),function(){o(null)};if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function Sh(n,o,s){return s=s!=null?s.concat([n]):null,as(4,4,bh.bind(null,o,n),s)}function qu(){}function Ch(n,o){var s=gn();o=o===void 0?null:o;var d=s.memoizedState;return d!==null&&o!==null&&Mu(o,d[1])?d[0]:(s.memoizedState=[n,o],n)}function Eh(n,o){var s=gn();o=o===void 0?null:o;var d=s.memoizedState;return d!==null&&o!==null&&Mu(o,d[1])?d[0]:(n=n(),s.memoizedState=[n,o],n)}function jh(n,o,s){return(Br&21)===0?(n.baseState&&(n.baseState=!1,Ht=!0),n.memoizedState=s):(Cn(s,o)||(s=np(),ot.lanes|=s,Ur|=s,n.baseState=!0),o)}function ok(n,o){var s=We;We=s!==0&&4>s?s:4,n(!0);var d=Du.transition;Du.transition={};try{n(!1),o()}finally{We=s,Du.transition=d}}function Th(){return gn().memoizedState}function ik(n,o,s){var d=kr(n);if(s={lane:d,action:s,hasEagerState:!1,eagerState:null,next:null},Rh(n))$h(o,s);else if(s=ih(n,o,s,d),s!==null){var g=Dt();$n(s,n,d,g),Ih(s,o,d)}}function lk(n,o,s){var d=kr(n),g={lane:d,action:s,hasEagerState:!1,eagerState:null,next:null};if(Rh(n))$h(o,g);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=o.lastRenderedReducer,y!==null))try{var b=o.lastRenderedState,N=y(b,s);if(g.hasEagerState=!0,g.eagerState=N,Cn(N,b)){var L=o.interleaved;L===null?(g.next=g,Au(o)):(g.next=L.next,L.next=g),o.interleaved=g;return}}catch{}finally{}s=ih(n,o,g,d),s!==null&&(g=Dt(),$n(s,n,d,g),Ih(s,o,d))}}function Rh(n){var o=n.alternate;return n===ot||o!==null&&o===ot}function $h(n,o){Li=ls=!0;var s=n.pending;s===null?o.next=o:(o.next=s.next,s.next=o),n.pending=o}function Ih(n,o,s){if((s&4194240)!==0){var d=o.lanes;d&=n.pendingLanes,s|=d,o.lanes=s,Ja(n,s)}}var us={readContext:mn,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useInsertionEffect:Nt,useLayoutEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useMutableSource:Nt,useSyncExternalStore:Nt,useId:Nt,unstable_isNewReconciler:!1},sk={readContext:mn,useCallback:function(n,o){return Dn().memoizedState=[n,o===void 0?null:o],n},useContext:mn,useEffect:vh,useImperativeHandle:function(n,o,s){return s=s!=null?s.concat([n]):null,ss(4194308,4,bh.bind(null,o,n),s)},useLayoutEffect:function(n,o){return ss(4194308,4,n,o)},useInsertionEffect:function(n,o){return ss(4,2,n,o)},useMemo:function(n,o){var s=Dn();return o=o===void 0?null:o,n=n(),s.memoizedState=[n,o],n},useReducer:function(n,o,s){var d=Dn();return o=s!==void 0?s(o):o,d.memoizedState=d.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},d.queue=n,n=n.dispatch=ik.bind(null,ot,n),[d.memoizedState,n]},useRef:function(n){var o=Dn();return n={current:n},o.memoizedState=n},useState:xh,useDebugValue:qu,useDeferredValue:function(n){return Dn().memoizedState=n},useTransition:function(){var n=xh(!1),o=n[0];return n=ok.bind(null,n[1]),Dn().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,s){var d=ot,g=Dn();if(tt){if(s===void 0)throw Error(r(407));s=s()}else{if(s=o(),xt===null)throw Error(r(349));(Br&30)!==0||fh(d,o,s)}g.memoizedState=s;var y={value:s,getSnapshot:o};return g.queue=y,vh(hh.bind(null,d,y,n),[n]),d.flags|=2048,Fi(9,ph.bind(null,d,y,s,o),void 0,null),s},useId:function(){var n=Dn(),o=xt.identifierPrefix;if(tt){var s=Yn,d=Qn;s=(d&~(1<<32-Sn(d)-1)).toString(32)+s,o=":"+o+"R"+s,s=zi++,0<s&&(o+="H"+s.toString(32)),o+=":"}else s=rk++,o=":"+o+"r"+s.toString(32)+":";return n.memoizedState=o},unstable_isNewReconciler:!1},ak={readContext:mn,useCallback:Ch,useContext:mn,useEffect:Wu,useImperativeHandle:Sh,useInsertionEffect:wh,useLayoutEffect:kh,useMemo:Eh,useReducer:Vu,useRef:yh,useState:function(){return Vu(_i)},useDebugValue:qu,useDeferredValue:function(n){var o=gn();return jh(o,pt.memoizedState,n)},useTransition:function(){var n=Vu(_i)[0],o=gn().memoizedState;return[n,o]},useMutableSource:ch,useSyncExternalStore:dh,useId:Th,unstable_isNewReconciler:!1},uk={readContext:mn,useCallback:Ch,useContext:mn,useEffect:Wu,useImperativeHandle:Sh,useInsertionEffect:wh,useLayoutEffect:kh,useMemo:Eh,useReducer:Hu,useRef:yh,useState:function(){return Hu(_i)},useDebugValue:qu,useDeferredValue:function(n){var o=gn();return pt===null?o.memoizedState=n:jh(o,pt.memoizedState,n)},useTransition:function(){var n=Hu(_i)[0],o=gn().memoizedState;return[n,o]},useMutableSource:ch,useSyncExternalStore:dh,useId:Th,unstable_isNewReconciler:!1};function jn(n,o){if(n&&n.defaultProps){o=T({},o),n=n.defaultProps;for(var s in n)o[s]===void 0&&(o[s]=n[s]);return o}return o}function Gu(n,o,s,d){o=n.memoizedState,s=s(d,o),s=s==null?o:T({},o,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var cs={isMounted:function(n){return(n=n._reactInternals)?Lr(n)===n:!1},enqueueSetState:function(n,o,s){n=n._reactInternals;var d=Dt(),g=kr(n),y=Zn(d,g);y.payload=o,s!=null&&(y.callback=s),o=xr(n,y,g),o!==null&&($n(o,n,g,d),ns(o,n,g))},enqueueReplaceState:function(n,o,s){n=n._reactInternals;var d=Dt(),g=kr(n),y=Zn(d,g);y.tag=1,y.payload=o,s!=null&&(y.callback=s),o=xr(n,y,g),o!==null&&($n(o,n,g,d),ns(o,n,g))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var s=Dt(),d=kr(n),g=Zn(s,d);g.tag=2,o!=null&&(g.callback=o),o=xr(n,g,d),o!==null&&($n(o,n,d,s),ns(o,n,d))}};function Nh(n,o,s,d,g,y,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(d,y,b):o.prototype&&o.prototype.isPureReactComponent?!Si(s,d)||!Si(g,y):!0}function Ph(n,o,s){var d=!1,g=hr,y=o.contextType;return typeof y=="object"&&y!==null?y=mn(y):(g=Vt(o)?_r:It.current,d=o.contextTypes,y=(d=d!=null)?So(n,g):hr),o=new o(s,y),n.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=cs,n.stateNode=o,o._reactInternals=n,d&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=g,n.__reactInternalMemoizedMaskedChildContext=y),o}function Ah(n,o,s,d){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(s,d),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(s,d),o.state!==n&&cs.enqueueReplaceState(o,o.state,null)}function Ju(n,o,s,d){var g=n.stateNode;g.props=s,g.state=n.memoizedState,g.refs={},Lu(n);var y=o.contextType;typeof y=="object"&&y!==null?g.context=mn(y):(y=Vt(o)?_r:It.current,g.context=So(n,y)),g.state=n.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(Gu(n,o,y,s),g.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&cs.enqueueReplaceState(g,g.state,null),rs(n,s,g,d),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308)}function No(n,o){try{var s="",d=o;do s+=ge(d),d=d.return;while(d);var g=s}catch(y){g=`
|
|
31
|
-
Error generating stack: `+y.message+`
|
|
32
|
-
`+y.stack}return{value:n,source:o,stack:g,digest:null}}function Ku(n,o,s){return{value:n,source:null,stack:s??null,digest:o??null}}function Qu(n,o){try{console.error(o.value)}catch(s){setTimeout(function(){throw s})}}var ck=typeof WeakMap=="function"?WeakMap:Map;function Lh(n,o,s){s=Zn(-1,s),s.tag=3,s.payload={element:null};var d=o.value;return s.callback=function(){xs||(xs=!0,dc=d),Qu(n,o)},s}function zh(n,o,s){s=Zn(-1,s),s.tag=3;var d=n.type.getDerivedStateFromError;if(typeof d=="function"){var g=o.value;s.payload=function(){return d(g)},s.callback=function(){Qu(n,o)}}var y=n.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(s.callback=function(){Qu(n,o),typeof d!="function"&&(vr===null?vr=new Set([this]):vr.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})}),s}function _h(n,o,s){var d=n.pingCache;if(d===null){d=n.pingCache=new ck;var g=new Set;d.set(o,g)}else g=d.get(o),g===void 0&&(g=new Set,d.set(o,g));g.has(s)||(g.add(s),n=Ck.bind(null,n,o,s),o.then(n,n))}function Fh(n){do{var o;if((o=n.tag===13)&&(o=n.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return n;n=n.return}while(n!==null);return null}function Oh(n,o,s,d,g){return(n.mode&1)===0?(n===o?n.flags|=65536:(n.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(o=Zn(-1,1),o.tag=2,xr(s,o,1))),s.lanes|=1),n):(n.flags|=65536,n.lanes=g,n)}var dk=_.ReactCurrentOwner,Ht=!1;function Ot(n,o,s,d){o.child=n===null?oh(o,null,s,d):To(o,n.child,s,d)}function Dh(n,o,s,d,g){s=s.render;var y=o.ref;return $o(o,g),d=Bu(n,o,s,d,y,g),s=Uu(),n!==null&&!Ht?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~g,er(n,o,g)):(tt&&s&&Cu(o),o.flags|=1,Ot(n,o,d,g),o.child)}function Mh(n,o,s,d,g){if(n===null){var y=s.type;return typeof y=="function"&&!yc(y)&&y.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(o.tag=15,o.type=y,Bh(n,o,y,d,g)):(n=Ss(s.type,null,d,o,o.mode,g),n.ref=o.ref,n.return=o,o.child=n)}if(y=n.child,(n.lanes&g)===0){var b=y.memoizedProps;if(s=s.compare,s=s!==null?s:Si,s(b,d)&&n.ref===o.ref)return er(n,o,g)}return o.flags|=1,n=Sr(y,d),n.ref=o.ref,n.return=o,o.child=n}function Bh(n,o,s,d,g){if(n!==null){var y=n.memoizedProps;if(Si(y,d)&&n.ref===o.ref)if(Ht=!1,o.pendingProps=d=y,(n.lanes&g)!==0)(n.flags&131072)!==0&&(Ht=!0);else return o.lanes=n.lanes,er(n,o,g)}return Yu(n,o,s,d,g)}function Uh(n,o,s){var d=o.pendingProps,g=d.children,y=n!==null?n.memoizedState:null;if(d.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ke(Ao,rn),rn|=s;else{if((s&1073741824)===0)return n=y!==null?y.baseLanes|s:s,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:n,cachePool:null,transitions:null},o.updateQueue=null,Ke(Ao,rn),rn|=n,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:s,Ke(Ao,rn),rn|=d}else y!==null?(d=y.baseLanes|s,o.memoizedState=null):d=s,Ke(Ao,rn),rn|=d;return Ot(n,o,g,s),o.child}function Vh(n,o){var s=o.ref;(n===null&&s!==null||n!==null&&n.ref!==s)&&(o.flags|=512,o.flags|=2097152)}function Yu(n,o,s,d,g){var y=Vt(s)?_r:It.current;return y=So(o,y),$o(o,g),s=Bu(n,o,s,d,y,g),d=Uu(),n!==null&&!Ht?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~g,er(n,o,g)):(tt&&d&&Cu(o),o.flags|=1,Ot(n,o,s,g),o.child)}function Hh(n,o,s,d,g){if(Vt(s)){var y=!0;Jl(o)}else y=!1;if($o(o,g),o.stateNode===null)fs(n,o),Ph(o,s,d),Ju(o,s,d,g),d=!0;else if(n===null){var b=o.stateNode,N=o.memoizedProps;b.props=N;var L=b.context,U=s.contextType;typeof U=="object"&&U!==null?U=mn(U):(U=Vt(s)?_r:It.current,U=So(o,U));var Z=s.getDerivedStateFromProps,oe=typeof Z=="function"||typeof b.getSnapshotBeforeUpdate=="function";oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==d||L!==U)&&Ah(o,b,d,U),gr=!1;var Y=o.memoizedState;b.state=Y,rs(o,d,b,g),L=o.memoizedState,N!==d||Y!==L||Ut.current||gr?(typeof Z=="function"&&(Gu(o,s,Z,d),L=o.memoizedState),(N=gr||Nh(o,s,N,d,Y,L,U))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=L),b.props=d,b.state=L,b.context=U,d=N):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{b=o.stateNode,lh(n,o),N=o.memoizedProps,U=o.type===o.elementType?N:jn(o.type,N),b.props=U,oe=o.pendingProps,Y=b.context,L=s.contextType,typeof L=="object"&&L!==null?L=mn(L):(L=Vt(s)?_r:It.current,L=So(o,L));var me=s.getDerivedStateFromProps;(Z=typeof me=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==oe||Y!==L)&&Ah(o,b,d,L),gr=!1,Y=o.memoizedState,b.state=Y,rs(o,d,b,g);var ye=o.memoizedState;N!==oe||Y!==ye||Ut.current||gr?(typeof me=="function"&&(Gu(o,s,me,d),ye=o.memoizedState),(U=gr||Nh(o,s,U,d,Y,ye,L)||!1)?(Z||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,ye,L),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,ye,L)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||N===n.memoizedProps&&Y===n.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===n.memoizedProps&&Y===n.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=ye),b.props=d,b.state=ye,b.context=L,d=U):(typeof b.componentDidUpdate!="function"||N===n.memoizedProps&&Y===n.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===n.memoizedProps&&Y===n.memoizedState||(o.flags|=1024),d=!1)}return Xu(n,o,s,d,y,g)}function Xu(n,o,s,d,g,y){Vh(n,o);var b=(o.flags&128)!==0;if(!d&&!b)return g&&Kp(o,s,!1),er(n,o,y);d=o.stateNode,dk.current=o;var N=b&&typeof s.getDerivedStateFromError!="function"?null:d.render();return o.flags|=1,n!==null&&b?(o.child=To(o,n.child,null,y),o.child=To(o,null,N,y)):Ot(n,o,N,y),o.memoizedState=d.state,g&&Kp(o,s,!0),o.child}function Wh(n){var o=n.stateNode;o.pendingContext?Gp(n,o.pendingContext,o.pendingContext!==o.context):o.context&&Gp(n,o.context,!1),zu(n,o.containerInfo)}function qh(n,o,s,d,g){return jo(),Ru(g),o.flags|=256,Ot(n,o,s,d),o.child}var Zu={dehydrated:null,treeContext:null,retryLane:0};function ec(n){return{baseLanes:n,cachePool:null,transitions:null}}function Gh(n,o,s){var d=o.pendingProps,g=rt.current,y=!1,b=(o.flags&128)!==0,N;if((N=b)||(N=n!==null&&n.memoizedState===null?!1:(g&2)!==0),N?(y=!0,o.flags&=-129):(n===null||n.memoizedState!==null)&&(g|=1),Ke(rt,g&1),n===null)return Tu(o),n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((o.mode&1)===0?o.lanes=1:n.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(b=d.children,n=d.fallback,y?(d=o.mode,y=o.child,b={mode:"hidden",children:b},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=b):y=Cs(b,d,0,null),n=qr(n,d,s,null),y.return=o,n.return=o,y.sibling=n,o.child=y,o.child.memoizedState=ec(s),o.memoizedState=Zu,n):tc(o,b));if(g=n.memoizedState,g!==null&&(N=g.dehydrated,N!==null))return fk(n,o,b,d,N,g,s);if(y){y=d.fallback,b=o.mode,g=n.child,N=g.sibling;var L={mode:"hidden",children:d.children};return(b&1)===0&&o.child!==g?(d=o.child,d.childLanes=0,d.pendingProps=L,o.deletions=null):(d=Sr(g,L),d.subtreeFlags=g.subtreeFlags&14680064),N!==null?y=Sr(N,y):(y=qr(y,b,s,null),y.flags|=2),y.return=o,d.return=o,d.sibling=y,o.child=d,d=y,y=o.child,b=n.child.memoizedState,b=b===null?ec(s):{baseLanes:b.baseLanes|s,cachePool:null,transitions:b.transitions},y.memoizedState=b,y.childLanes=n.childLanes&~s,o.memoizedState=Zu,d}return y=n.child,n=y.sibling,d=Sr(y,{mode:"visible",children:d.children}),(o.mode&1)===0&&(d.lanes=s),d.return=o,d.sibling=null,n!==null&&(s=o.deletions,s===null?(o.deletions=[n],o.flags|=16):s.push(n)),o.child=d,o.memoizedState=null,d}function tc(n,o){return o=Cs({mode:"visible",children:o},n.mode,0,null),o.return=n,n.child=o}function ds(n,o,s,d){return d!==null&&Ru(d),To(o,n.child,null,s),n=tc(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function fk(n,o,s,d,g,y,b){if(s)return o.flags&256?(o.flags&=-257,d=Ku(Error(r(422))),ds(n,o,b,d)):o.memoizedState!==null?(o.child=n.child,o.flags|=128,null):(y=d.fallback,g=o.mode,d=Cs({mode:"visible",children:d.children},g,0,null),y=qr(y,g,b,null),y.flags|=2,d.return=o,y.return=o,d.sibling=y,o.child=d,(o.mode&1)!==0&&To(o,n.child,null,b),o.child.memoizedState=ec(b),o.memoizedState=Zu,y);if((o.mode&1)===0)return ds(n,o,b,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var N=d.dgst;return d=N,y=Error(r(419)),d=Ku(y,d,void 0),ds(n,o,b,d)}if(N=(b&n.childLanes)!==0,Ht||N){if(d=xt,d!==null){switch(b&-b){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|b))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Xn(n,g),$n(d,n,g,-1))}return xc(),d=Ku(Error(r(421))),ds(n,o,b,d)}return g.data==="$?"?(o.flags|=128,o.child=n.child,o=Ek.bind(null,n),g._reactRetry=o,null):(n=y.treeContext,nn=fr(g.nextSibling),tn=o,tt=!0,En=null,n!==null&&(pn[hn++]=Qn,pn[hn++]=Yn,pn[hn++]=Fr,Qn=n.id,Yn=n.overflow,Fr=o),o=tc(o,d.children),o.flags|=4096,o)}function Jh(n,o,s){n.lanes|=o;var d=n.alternate;d!==null&&(d.lanes|=o),Pu(n.return,o,s)}function nc(n,o,s,d,g){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:s,tailMode:g}:(y.isBackwards=o,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=s,y.tailMode=g)}function Kh(n,o,s){var d=o.pendingProps,g=d.revealOrder,y=d.tail;if(Ot(n,o,d.children,s),d=rt.current,(d&2)!==0)d=d&1|2,o.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Jh(n,s,o);else if(n.tag===19)Jh(n,s,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}d&=1}if(Ke(rt,d),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(s=o.child,g=null;s!==null;)n=s.alternate,n!==null&&os(n)===null&&(g=s),s=s.sibling;s=g,s===null?(g=o.child,o.child=null):(g=s.sibling,s.sibling=null),nc(o,!1,g,s,y);break;case"backwards":for(s=null,g=o.child,o.child=null;g!==null;){if(n=g.alternate,n!==null&&os(n)===null){o.child=g;break}n=g.sibling,g.sibling=s,s=g,g=n}nc(o,!0,s,null,y);break;case"together":nc(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function fs(n,o){(o.mode&1)===0&&n!==null&&(n.alternate=null,o.alternate=null,o.flags|=2)}function er(n,o,s){if(n!==null&&(o.dependencies=n.dependencies),Ur|=o.lanes,(s&o.childLanes)===0)return null;if(n!==null&&o.child!==n.child)throw Error(r(153));if(o.child!==null){for(n=o.child,s=Sr(n,n.pendingProps),o.child=s,s.return=o;n.sibling!==null;)n=n.sibling,s=s.sibling=Sr(n,n.pendingProps),s.return=o;s.sibling=null}return o.child}function pk(n,o,s){switch(o.tag){case 3:Wh(o),jo();break;case 5:uh(o);break;case 1:Vt(o.type)&&Jl(o);break;case 4:zu(o,o.stateNode.containerInfo);break;case 10:var d=o.type._context,g=o.memoizedProps.value;Ke(es,d._currentValue),d._currentValue=g;break;case 13:if(d=o.memoizedState,d!==null)return d.dehydrated!==null?(Ke(rt,rt.current&1),o.flags|=128,null):(s&o.child.childLanes)!==0?Gh(n,o,s):(Ke(rt,rt.current&1),n=er(n,o,s),n!==null?n.sibling:null);Ke(rt,rt.current&1);break;case 19:if(d=(s&o.childLanes)!==0,(n.flags&128)!==0){if(d)return Kh(n,o,s);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Ke(rt,rt.current),d)break;return null;case 22:case 23:return o.lanes=0,Uh(n,o,s)}return er(n,o,s)}var Qh,rc,Yh,Xh;Qh=function(n,o){for(var s=o.child;s!==null;){if(s.tag===5||s.tag===6)n.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},rc=function(){},Yh=function(n,o,s,d){var g=n.memoizedProps;if(g!==d){n=o.stateNode,Mr(On.current);var y=null;switch(s){case"input":g=Rt(n,g),d=Rt(n,d),y=[];break;case"select":g=T({},g,{value:void 0}),d=T({},d,{value:void 0}),y=[];break;case"textarea":g=ft(n,g),d=ft(n,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(n.onclick=Wl)}Ct(s,d);var b;s=null;for(U in g)if(!d.hasOwnProperty(U)&&g.hasOwnProperty(U)&&g[U]!=null)if(U==="style"){var N=g[U];for(b in N)N.hasOwnProperty(b)&&(s||(s={}),s[b]="")}else U!=="dangerouslySetInnerHTML"&&U!=="children"&&U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&U!=="autoFocus"&&(l.hasOwnProperty(U)?y||(y=[]):(y=y||[]).push(U,null));for(U in d){var L=d[U];if(N=g!=null?g[U]:void 0,d.hasOwnProperty(U)&&L!==N&&(L!=null||N!=null))if(U==="style")if(N){for(b in N)!N.hasOwnProperty(b)||L&&L.hasOwnProperty(b)||(s||(s={}),s[b]="");for(b in L)L.hasOwnProperty(b)&&N[b]!==L[b]&&(s||(s={}),s[b]=L[b])}else s||(y||(y=[]),y.push(U,s)),s=L;else U==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,N=N?N.__html:void 0,L!=null&&N!==L&&(y=y||[]).push(U,L)):U==="children"?typeof L!="string"&&typeof L!="number"||(y=y||[]).push(U,""+L):U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&(l.hasOwnProperty(U)?(L!=null&&U==="onScroll"&&Xe("scroll",n),y||N===L||(y=[])):(y=y||[]).push(U,L))}s&&(y=y||[]).push("style",s);var U=y;(o.updateQueue=U)&&(o.flags|=4)}},Xh=function(n,o,s,d){s!==d&&(o.flags|=4)};function Oi(n,o){if(!tt)switch(n.tailMode){case"hidden":o=n.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:d.sibling=null}}function Pt(n){var o=n.alternate!==null&&n.alternate.child===n.child,s=0,d=0;if(o)for(var g=n.child;g!==null;)s|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=n,g=g.sibling;else for(g=n.child;g!==null;)s|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=n,g=g.sibling;return n.subtreeFlags|=d,n.childLanes=s,o}function hk(n,o,s){var d=o.pendingProps;switch(Eu(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pt(o),null;case 1:return Vt(o.type)&&Gl(),Pt(o),null;case 3:return d=o.stateNode,Io(),Ze(Ut),Ze(It),Ou(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(n===null||n.child===null)&&(Xl(o)?o.flags|=4:n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,En!==null&&(hc(En),En=null))),rc(n,o),Pt(o),null;case 5:_u(o);var g=Mr(Ai.current);if(s=o.type,n!==null&&o.stateNode!=null)Yh(n,o,s,d,g),n.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!d){if(o.stateNode===null)throw Error(r(166));return Pt(o),null}if(n=Mr(On.current),Xl(o)){d=o.stateNode,s=o.type;var y=o.memoizedProps;switch(d[Fn]=o,d[Ri]=y,n=(o.mode&1)!==0,s){case"dialog":Xe("cancel",d),Xe("close",d);break;case"iframe":case"object":case"embed":Xe("load",d);break;case"video":case"audio":for(g=0;g<Ei.length;g++)Xe(Ei[g],d);break;case"source":Xe("error",d);break;case"img":case"image":case"link":Xe("error",d),Xe("load",d);break;case"details":Xe("toggle",d);break;case"input":bt(d,y),Xe("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},Xe("invalid",d);break;case"textarea":Me(d,y),Xe("invalid",d)}Ct(s,y),g=null;for(var b in y)if(y.hasOwnProperty(b)){var N=y[b];b==="children"?typeof N=="string"?d.textContent!==N&&(y.suppressHydrationWarning!==!0&&Hl(d.textContent,N,n),g=["children",N]):typeof N=="number"&&d.textContent!==""+N&&(y.suppressHydrationWarning!==!0&&Hl(d.textContent,N,n),g=["children",""+N]):l.hasOwnProperty(b)&&N!=null&&b==="onScroll"&&Xe("scroll",d)}switch(s){case"input":Le(d),co(d,y,!0);break;case"textarea":Le(d),$t(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=Wl)}d=g,o.updateQueue=d,d!==null&&(o.flags|=4)}else{b=g.nodeType===9?g:g.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=G(s)),n==="http://www.w3.org/1999/xhtml"?s==="script"?(n=b.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof d.is=="string"?n=b.createElement(s,{is:d.is}):(n=b.createElement(s),s==="select"&&(b=n,d.multiple?b.multiple=!0:d.size&&(b.size=d.size))):n=b.createElementNS(n,s),n[Fn]=o,n[Ri]=d,Qh(n,o,!1,!1),o.stateNode=n;e:{switch(b=zn(s,d),s){case"dialog":Xe("cancel",n),Xe("close",n),g=d;break;case"iframe":case"object":case"embed":Xe("load",n),g=d;break;case"video":case"audio":for(g=0;g<Ei.length;g++)Xe(Ei[g],n);g=d;break;case"source":Xe("error",n),g=d;break;case"img":case"image":case"link":Xe("error",n),Xe("load",n),g=d;break;case"details":Xe("toggle",n),g=d;break;case"input":bt(n,d),g=Rt(n,d),Xe("invalid",n);break;case"option":g=d;break;case"select":n._wrapperState={wasMultiple:!!d.multiple},g=T({},d,{value:void 0}),Xe("invalid",n);break;case"textarea":Me(n,d),g=ft(n,d),Xe("invalid",n);break;default:g=d}Ct(s,g),N=g;for(y in N)if(N.hasOwnProperty(y)){var L=N[y];y==="style"?ir(n,L):y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&Re(n,L)):y==="children"?typeof L=="string"?(s!=="textarea"||L!=="")&&Ne(n,L):typeof L=="number"&&Ne(n,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(l.hasOwnProperty(y)?L!=null&&y==="onScroll"&&Xe("scroll",n):L!=null&&A(n,y,L,b))}switch(s){case"input":Le(n),co(n,d,!1);break;case"textarea":Le(n),$t(n);break;case"option":d.value!=null&&n.setAttribute("value",""+pe(d.value));break;case"select":n.multiple=!!d.multiple,y=d.value,y!=null?Ft(n,!!d.multiple,y,!1):d.defaultValue!=null&&Ft(n,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(n.onclick=Wl)}switch(s){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Pt(o),null;case 6:if(n&&o.stateNode!=null)Xh(n,o,n.memoizedProps,d);else{if(typeof d!="string"&&o.stateNode===null)throw Error(r(166));if(s=Mr(Ai.current),Mr(On.current),Xl(o)){if(d=o.stateNode,s=o.memoizedProps,d[Fn]=o,(y=d.nodeValue!==s)&&(n=tn,n!==null))switch(n.tag){case 3:Hl(d.nodeValue,s,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Hl(d.nodeValue,s,(n.mode&1)!==0)}y&&(o.flags|=4)}else d=(s.nodeType===9?s:s.ownerDocument).createTextNode(d),d[Fn]=o,o.stateNode=d}return Pt(o),null;case 13:if(Ze(rt),d=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(tt&&nn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)th(),jo(),o.flags|=98560,y=!1;else if(y=Xl(o),d!==null&&d.dehydrated!==null){if(n===null){if(!y)throw Error(r(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Fn]=o}else jo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Pt(o),y=!1}else En!==null&&(hc(En),En=null),y=!0;if(!y)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=s,o):(d=d!==null,d!==(n!==null&&n.memoizedState!==null)&&d&&(o.child.flags|=8192,(o.mode&1)!==0&&(n===null||(rt.current&1)!==0?ht===0&&(ht=3):xc())),o.updateQueue!==null&&(o.flags|=4),Pt(o),null);case 4:return Io(),rc(n,o),n===null&&ji(o.stateNode.containerInfo),Pt(o),null;case 10:return Nu(o.type._context),Pt(o),null;case 17:return Vt(o.type)&&Gl(),Pt(o),null;case 19:if(Ze(rt),y=o.memoizedState,y===null)return Pt(o),null;if(d=(o.flags&128)!==0,b=y.rendering,b===null)if(d)Oi(y,!1);else{if(ht!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(b=os(n),b!==null){for(o.flags|=128,Oi(y,!1),d=b.updateQueue,d!==null&&(o.updateQueue=d,o.flags|=4),o.subtreeFlags=0,d=s,s=o.child;s!==null;)y=s,n=d,y.flags&=14680066,b=y.alternate,b===null?(y.childLanes=0,y.lanes=n,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=b.childLanes,y.lanes=b.lanes,y.child=b.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=b.memoizedProps,y.memoizedState=b.memoizedState,y.updateQueue=b.updateQueue,y.type=b.type,n=b.dependencies,y.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),s=s.sibling;return Ke(rt,rt.current&1|2),o.child}n=n.sibling}y.tail!==null&<()>Lo&&(o.flags|=128,d=!0,Oi(y,!1),o.lanes=4194304)}else{if(!d)if(n=os(b),n!==null){if(o.flags|=128,d=!0,s=n.updateQueue,s!==null&&(o.updateQueue=s,o.flags|=4),Oi(y,!0),y.tail===null&&y.tailMode==="hidden"&&!b.alternate&&!tt)return Pt(o),null}else 2*lt()-y.renderingStartTime>Lo&&s!==1073741824&&(o.flags|=128,d=!0,Oi(y,!1),o.lanes=4194304);y.isBackwards?(b.sibling=o.child,o.child=b):(s=y.last,s!==null?s.sibling=b:o.child=b,y.last=b)}return y.tail!==null?(o=y.tail,y.rendering=o,y.tail=o.sibling,y.renderingStartTime=lt(),o.sibling=null,s=rt.current,Ke(rt,d?s&1|2:s&1),o):(Pt(o),null);case 22:case 23:return gc(),d=o.memoizedState!==null,n!==null&&n.memoizedState!==null!==d&&(o.flags|=8192),d&&(o.mode&1)!==0?(rn&1073741824)!==0&&(Pt(o),o.subtreeFlags&6&&(o.flags|=8192)):Pt(o),null;case 24:return null;case 25:return null}throw Error(r(156,o.tag))}function mk(n,o){switch(Eu(o),o.tag){case 1:return Vt(o.type)&&Gl(),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return Io(),Ze(Ut),Ze(It),Ou(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 5:return _u(o),null;case 13:if(Ze(rt),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(r(340));jo()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return Ze(rt),null;case 4:return Io(),null;case 10:return Nu(o.type._context),null;case 22:case 23:return gc(),null;case 24:return null;default:return null}}var ps=!1,At=!1,gk=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Po(n,o){var s=n.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(d){it(n,o,d)}else s.current=null}function oc(n,o,s){try{s()}catch(d){it(n,o,d)}}var Zh=!1;function xk(n,o){if(gu=Al,n=Np(),au(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var d=s.getSelection&&s.getSelection();if(d&&d.rangeCount!==0){s=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{s.nodeType,y.nodeType}catch{s=null;break e}var b=0,N=-1,L=-1,U=0,Z=0,oe=n,Y=null;t:for(;;){for(var me;oe!==s||g!==0&&oe.nodeType!==3||(N=b+g),oe!==y||d!==0&&oe.nodeType!==3||(L=b+d),oe.nodeType===3&&(b+=oe.nodeValue.length),(me=oe.firstChild)!==null;)Y=oe,oe=me;for(;;){if(oe===n)break t;if(Y===s&&++U===g&&(N=b),Y===y&&++Z===d&&(L=b),(me=oe.nextSibling)!==null)break;oe=Y,Y=oe.parentNode}oe=me}s=N===-1||L===-1?null:{start:N,end:L}}else s=null}s=s||{start:0,end:0}}else s=null;for(xu={focusedElem:n,selectionRange:s},Al=!1,xe=o;xe!==null;)if(o=xe,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,xe=n;else for(;xe!==null;){o=xe;try{var ye=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var we=ye.memoizedProps,st=ye.memoizedState,M=o.stateNode,F=M.getSnapshotBeforeUpdate(o.elementType===o.type?we:jn(o.type,we),st);M.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var B=o.stateNode.containerInfo;B.nodeType===1?B.textContent="":B.nodeType===9&&B.documentElement&&B.removeChild(B.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ae){it(o,o.return,ae)}if(n=o.sibling,n!==null){n.return=o.return,xe=n;break}xe=o.return}return ye=Zh,Zh=!1,ye}function Di(n,o,s){var d=o.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&n)===n){var y=g.destroy;g.destroy=void 0,y!==void 0&&oc(o,s,y)}g=g.next}while(g!==d)}}function hs(n,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var s=o=o.next;do{if((s.tag&n)===n){var d=s.create;s.destroy=d()}s=s.next}while(s!==o)}}function ic(n){var o=n.ref;if(o!==null){var s=n.stateNode;switch(n.tag){case 5:n=s;break;default:n=s}typeof o=="function"?o(n):o.current=n}}function em(n){var o=n.alternate;o!==null&&(n.alternate=null,em(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&(delete o[Fn],delete o[Ri],delete o[ku],delete o[Zw],delete o[ek])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function tm(n){return n.tag===5||n.tag===3||n.tag===4}function nm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||tm(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function lc(n,o,s){var d=n.tag;if(d===5||d===6)n=n.stateNode,o?s.nodeType===8?s.parentNode.insertBefore(n,o):s.insertBefore(n,o):(s.nodeType===8?(o=s.parentNode,o.insertBefore(n,s)):(o=s,o.appendChild(n)),s=s._reactRootContainer,s!=null||o.onclick!==null||(o.onclick=Wl));else if(d!==4&&(n=n.child,n!==null))for(lc(n,o,s),n=n.sibling;n!==null;)lc(n,o,s),n=n.sibling}function sc(n,o,s){var d=n.tag;if(d===5||d===6)n=n.stateNode,o?s.insertBefore(n,o):s.appendChild(n);else if(d!==4&&(n=n.child,n!==null))for(sc(n,o,s),n=n.sibling;n!==null;)sc(n,o,s),n=n.sibling}var Et=null,Tn=!1;function yr(n,o,s){for(s=s.child;s!==null;)rm(n,o,s),s=s.sibling}function rm(n,o,s){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(Tl,s)}catch{}switch(s.tag){case 5:At||Po(s,o);case 6:var d=Et,g=Tn;Et=null,yr(n,o,s),Et=d,Tn=g,Et!==null&&(Tn?(n=Et,s=s.stateNode,n.nodeType===8?n.parentNode.removeChild(s):n.removeChild(s)):Et.removeChild(s.stateNode));break;case 18:Et!==null&&(Tn?(n=Et,s=s.stateNode,n.nodeType===8?wu(n.parentNode,s):n.nodeType===1&&wu(n,s),xi(n)):wu(Et,s.stateNode));break;case 4:d=Et,g=Tn,Et=s.stateNode.containerInfo,Tn=!0,yr(n,o,s),Et=d,Tn=g;break;case 0:case 11:case 14:case 15:if(!At&&(d=s.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,b=y.destroy;y=y.tag,b!==void 0&&((y&2)!==0||(y&4)!==0)&&oc(s,o,b),g=g.next}while(g!==d)}yr(n,o,s);break;case 1:if(!At&&(Po(s,o),d=s.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=s.memoizedProps,d.state=s.memoizedState,d.componentWillUnmount()}catch(N){it(s,o,N)}yr(n,o,s);break;case 21:yr(n,o,s);break;case 22:s.mode&1?(At=(d=At)||s.memoizedState!==null,yr(n,o,s),At=d):yr(n,o,s);break;default:yr(n,o,s)}}function om(n){var o=n.updateQueue;if(o!==null){n.updateQueue=null;var s=n.stateNode;s===null&&(s=n.stateNode=new gk),o.forEach(function(d){var g=jk.bind(null,n,d);s.has(d)||(s.add(d),d.then(g,g))})}}function Rn(n,o){var s=o.deletions;if(s!==null)for(var d=0;d<s.length;d++){var g=s[d];try{var y=n,b=o,N=b;e:for(;N!==null;){switch(N.tag){case 5:Et=N.stateNode,Tn=!1;break e;case 3:Et=N.stateNode.containerInfo,Tn=!0;break e;case 4:Et=N.stateNode.containerInfo,Tn=!0;break e}N=N.return}if(Et===null)throw Error(r(160));rm(y,b,g),Et=null,Tn=!1;var L=g.alternate;L!==null&&(L.return=null),g.return=null}catch(U){it(g,o,U)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)im(o,n),o=o.sibling}function im(n,o){var s=n.alternate,d=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(Rn(o,n),Mn(n),d&4){try{Di(3,n,n.return),hs(3,n)}catch(we){it(n,n.return,we)}try{Di(5,n,n.return)}catch(we){it(n,n.return,we)}}break;case 1:Rn(o,n),Mn(n),d&512&&s!==null&&Po(s,s.return);break;case 5:if(Rn(o,n),Mn(n),d&512&&s!==null&&Po(s,s.return),n.flags&32){var g=n.stateNode;try{Ne(g,"")}catch(we){it(n,n.return,we)}}if(d&4&&(g=n.stateNode,g!=null)){var y=n.memoizedProps,b=s!==null?s.memoizedProps:y,N=n.type,L=n.updateQueue;if(n.updateQueue=null,L!==null)try{N==="input"&&y.type==="radio"&&y.name!=null&&Bt(g,y),zn(N,b);var U=zn(N,y);for(b=0;b<L.length;b+=2){var Z=L[b],oe=L[b+1];Z==="style"?ir(g,oe):Z==="dangerouslySetInnerHTML"?Re(g,oe):Z==="children"?Ne(g,oe):A(g,Z,oe,U)}switch(N){case"input":qn(g,y);break;case"textarea":mt(g,y);break;case"select":var Y=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var me=y.value;me!=null?Ft(g,!!y.multiple,me,!1):Y!==!!y.multiple&&(y.defaultValue!=null?Ft(g,!!y.multiple,y.defaultValue,!0):Ft(g,!!y.multiple,y.multiple?[]:"",!1))}g[Ri]=y}catch(we){it(n,n.return,we)}}break;case 6:if(Rn(o,n),Mn(n),d&4){if(n.stateNode===null)throw Error(r(162));g=n.stateNode,y=n.memoizedProps;try{g.nodeValue=y}catch(we){it(n,n.return,we)}}break;case 3:if(Rn(o,n),Mn(n),d&4&&s!==null&&s.memoizedState.isDehydrated)try{xi(o.containerInfo)}catch(we){it(n,n.return,we)}break;case 4:Rn(o,n),Mn(n);break;case 13:Rn(o,n),Mn(n),g=n.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(cc=lt())),d&4&&om(n);break;case 22:if(Z=s!==null&&s.memoizedState!==null,n.mode&1?(At=(U=At)||Z,Rn(o,n),At=U):Rn(o,n),Mn(n),d&8192){if(U=n.memoizedState!==null,(n.stateNode.isHidden=U)&&!Z&&(n.mode&1)!==0)for(xe=n,Z=n.child;Z!==null;){for(oe=xe=Z;xe!==null;){switch(Y=xe,me=Y.child,Y.tag){case 0:case 11:case 14:case 15:Di(4,Y,Y.return);break;case 1:Po(Y,Y.return);var ye=Y.stateNode;if(typeof ye.componentWillUnmount=="function"){d=Y,s=Y.return;try{o=d,ye.props=o.memoizedProps,ye.state=o.memoizedState,ye.componentWillUnmount()}catch(we){it(d,s,we)}}break;case 5:Po(Y,Y.return);break;case 22:if(Y.memoizedState!==null){am(oe);continue}}me!==null?(me.return=Y,xe=me):am(oe)}Z=Z.sibling}e:for(Z=null,oe=n;;){if(oe.tag===5){if(Z===null){Z=oe;try{g=oe.stateNode,U?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(N=oe.stateNode,L=oe.memoizedProps.style,b=L!=null&&L.hasOwnProperty("display")?L.display:null,N.style.display=fn("display",b))}catch(we){it(n,n.return,we)}}}else if(oe.tag===6){if(Z===null)try{oe.stateNode.nodeValue=U?"":oe.memoizedProps}catch(we){it(n,n.return,we)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===n)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===n)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===n)break e;Z===oe&&(Z=null),oe=oe.return}Z===oe&&(Z=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Rn(o,n),Mn(n),d&4&&om(n);break;case 21:break;default:Rn(o,n),Mn(n)}}function Mn(n){var o=n.flags;if(o&2){try{e:{for(var s=n.return;s!==null;){if(tm(s)){var d=s;break e}s=s.return}throw Error(r(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(Ne(g,""),d.flags&=-33);var y=nm(n);sc(n,y,g);break;case 3:case 4:var b=d.stateNode.containerInfo,N=nm(n);lc(n,N,b);break;default:throw Error(r(161))}}catch(L){it(n,n.return,L)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function yk(n,o,s){xe=n,lm(n)}function lm(n,o,s){for(var d=(n.mode&1)!==0;xe!==null;){var g=xe,y=g.child;if(g.tag===22&&d){var b=g.memoizedState!==null||ps;if(!b){var N=g.alternate,L=N!==null&&N.memoizedState!==null||At;N=ps;var U=At;if(ps=b,(At=L)&&!U)for(xe=g;xe!==null;)b=xe,L=b.child,b.tag===22&&b.memoizedState!==null?um(g):L!==null?(L.return=b,xe=L):um(g);for(;y!==null;)xe=y,lm(y),y=y.sibling;xe=g,ps=N,At=U}sm(n)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,xe=y):sm(n)}}function sm(n){for(;xe!==null;){var o=xe;if((o.flags&8772)!==0){var s=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:At||hs(5,o);break;case 1:var d=o.stateNode;if(o.flags&4&&!At)if(s===null)d.componentDidMount();else{var g=o.elementType===o.type?s.memoizedProps:jn(o.type,s.memoizedProps);d.componentDidUpdate(g,s.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=o.updateQueue;y!==null&&ah(o,y,d);break;case 3:var b=o.updateQueue;if(b!==null){if(s=null,o.child!==null)switch(o.child.tag){case 5:s=o.child.stateNode;break;case 1:s=o.child.stateNode}ah(o,b,s)}break;case 5:var N=o.stateNode;if(s===null&&o.flags&4){s=N;var L=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&s.focus();break;case"img":L.src&&(s.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var U=o.alternate;if(U!==null){var Z=U.memoizedState;if(Z!==null){var oe=Z.dehydrated;oe!==null&&xi(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}At||o.flags&512&&ic(o)}catch(Y){it(o,o.return,Y)}}if(o===n){xe=null;break}if(s=o.sibling,s!==null){s.return=o.return,xe=s;break}xe=o.return}}function am(n){for(;xe!==null;){var o=xe;if(o===n){xe=null;break}var s=o.sibling;if(s!==null){s.return=o.return,xe=s;break}xe=o.return}}function um(n){for(;xe!==null;){var o=xe;try{switch(o.tag){case 0:case 11:case 15:var s=o.return;try{hs(4,o)}catch(L){it(o,s,L)}break;case 1:var d=o.stateNode;if(typeof d.componentDidMount=="function"){var g=o.return;try{d.componentDidMount()}catch(L){it(o,g,L)}}var y=o.return;try{ic(o)}catch(L){it(o,y,L)}break;case 5:var b=o.return;try{ic(o)}catch(L){it(o,b,L)}}}catch(L){it(o,o.return,L)}if(o===n){xe=null;break}var N=o.sibling;if(N!==null){N.return=o.return,xe=N;break}xe=o.return}}var vk=Math.ceil,ms=_.ReactCurrentDispatcher,ac=_.ReactCurrentOwner,xn=_.ReactCurrentBatchConfig,Be=0,xt=null,at=null,jt=0,rn=0,Ao=pr(0),ht=0,Mi=null,Ur=0,gs=0,uc=0,Bi=null,Wt=null,cc=0,Lo=1/0,tr=null,xs=!1,dc=null,vr=null,ys=!1,wr=null,vs=0,Ui=0,fc=null,ws=-1,ks=0;function Dt(){return(Be&6)!==0?lt():ws!==-1?ws:ws=lt()}function kr(n){return(n.mode&1)===0?1:(Be&2)!==0&&jt!==0?jt&-jt:nk.transition!==null?(ks===0&&(ks=np()),ks):(n=We,n!==0||(n=window.event,n=n===void 0?16:dp(n.type)),n)}function $n(n,o,s,d){if(50<Ui)throw Ui=0,fc=null,Error(r(185));fi(n,s,d),((Be&2)===0||n!==xt)&&(n===xt&&((Be&2)===0&&(gs|=s),ht===4&&br(n,jt)),qt(n,d),s===1&&Be===0&&(o.mode&1)===0&&(Lo=lt()+500,Kl&&mr()))}function qt(n,o){var s=n.callbackNode;nw(n,o);var d=Il(n,n===xt?jt:0);if(d===0)s!==null&&Zf(s),n.callbackNode=null,n.callbackPriority=0;else if(o=d&-d,n.callbackPriority!==o){if(s!=null&&Zf(s),o===1)n.tag===0?tk(dm.bind(null,n)):Qp(dm.bind(null,n)),Yw(function(){(Be&6)===0&&mr()}),s=null;else{switch(rp(d)){case 1:s=Wa;break;case 4:s=ep;break;case 16:s=jl;break;case 536870912:s=tp;break;default:s=jl}s=vm(s,cm.bind(null,n))}n.callbackPriority=o,n.callbackNode=s}}function cm(n,o){if(ws=-1,ks=0,(Be&6)!==0)throw Error(r(327));var s=n.callbackNode;if(zo()&&n.callbackNode!==s)return null;var d=Il(n,n===xt?jt:0);if(d===0)return null;if((d&30)!==0||(d&n.expiredLanes)!==0||o)o=bs(n,d);else{o=d;var g=Be;Be|=2;var y=pm();(xt!==n||jt!==o)&&(tr=null,Lo=lt()+500,Hr(n,o));do try{bk();break}catch(N){fm(n,N)}while(!0);Iu(),ms.current=y,Be=g,at!==null?o=0:(xt=null,jt=0,o=ht)}if(o!==0){if(o===2&&(g=qa(n),g!==0&&(d=g,o=pc(n,g))),o===1)throw s=Mi,Hr(n,0),br(n,d),qt(n,lt()),s;if(o===6)br(n,d);else{if(g=n.current.alternate,(d&30)===0&&!wk(g)&&(o=bs(n,d),o===2&&(y=qa(n),y!==0&&(d=y,o=pc(n,y))),o===1))throw s=Mi,Hr(n,0),br(n,d),qt(n,lt()),s;switch(n.finishedWork=g,n.finishedLanes=d,o){case 0:case 1:throw Error(r(345));case 2:Wr(n,Wt,tr);break;case 3:if(br(n,d),(d&130023424)===d&&(o=cc+500-lt(),10<o)){if(Il(n,0)!==0)break;if(g=n.suspendedLanes,(g&d)!==d){Dt(),n.pingedLanes|=n.suspendedLanes&g;break}n.timeoutHandle=vu(Wr.bind(null,n,Wt,tr),o);break}Wr(n,Wt,tr);break;case 4:if(br(n,d),(d&4194240)===d)break;for(o=n.eventTimes,g=-1;0<d;){var b=31-Sn(d);y=1<<b,b=o[b],b>g&&(g=b),d&=~y}if(d=g,d=lt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*vk(d/1960))-d,10<d){n.timeoutHandle=vu(Wr.bind(null,n,Wt,tr),d);break}Wr(n,Wt,tr);break;case 5:Wr(n,Wt,tr);break;default:throw Error(r(329))}}}return qt(n,lt()),n.callbackNode===s?cm.bind(null,n):null}function pc(n,o){var s=Bi;return n.current.memoizedState.isDehydrated&&(Hr(n,o).flags|=256),n=bs(n,o),n!==2&&(o=Wt,Wt=s,o!==null&&hc(o)),n}function hc(n){Wt===null?Wt=n:Wt.push.apply(Wt,n)}function wk(n){for(var o=n;;){if(o.flags&16384){var s=o.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var d=0;d<s.length;d++){var g=s[d],y=g.getSnapshot;g=g.value;try{if(!Cn(y(),g))return!1}catch{return!1}}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function br(n,o){for(o&=~uc,o&=~gs,n.suspendedLanes|=o,n.pingedLanes&=~o,n=n.expirationTimes;0<o;){var s=31-Sn(o),d=1<<s;n[s]=-1,o&=~d}}function dm(n){if((Be&6)!==0)throw Error(r(327));zo();var o=Il(n,0);if((o&1)===0)return qt(n,lt()),null;var s=bs(n,o);if(n.tag!==0&&s===2){var d=qa(n);d!==0&&(o=d,s=pc(n,d))}if(s===1)throw s=Mi,Hr(n,0),br(n,o),qt(n,lt()),s;if(s===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=o,Wr(n,Wt,tr),qt(n,lt()),null}function mc(n,o){var s=Be;Be|=1;try{return n(o)}finally{Be=s,Be===0&&(Lo=lt()+500,Kl&&mr())}}function Vr(n){wr!==null&&wr.tag===0&&(Be&6)===0&&zo();var o=Be;Be|=1;var s=xn.transition,d=We;try{if(xn.transition=null,We=1,n)return n()}finally{We=d,xn.transition=s,Be=o,(Be&6)===0&&mr()}}function gc(){rn=Ao.current,Ze(Ao)}function Hr(n,o){n.finishedWork=null,n.finishedLanes=0;var s=n.timeoutHandle;if(s!==-1&&(n.timeoutHandle=-1,Qw(s)),at!==null)for(s=at.return;s!==null;){var d=s;switch(Eu(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&Gl();break;case 3:Io(),Ze(Ut),Ze(It),Ou();break;case 5:_u(d);break;case 4:Io();break;case 13:Ze(rt);break;case 19:Ze(rt);break;case 10:Nu(d.type._context);break;case 22:case 23:gc()}s=s.return}if(xt=n,at=n=Sr(n.current,null),jt=rn=o,ht=0,Mi=null,uc=gs=Ur=0,Wt=Bi=null,Dr!==null){for(o=0;o<Dr.length;o++)if(s=Dr[o],d=s.interleaved,d!==null){s.interleaved=null;var g=d.next,y=s.pending;if(y!==null){var b=y.next;y.next=g,d.next=b}s.pending=d}Dr=null}return n}function fm(n,o){do{var s=at;try{if(Iu(),is.current=us,ls){for(var d=ot.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}ls=!1}if(Br=0,gt=pt=ot=null,Li=!1,zi=0,ac.current=null,s===null||s.return===null){ht=1,Mi=o,at=null;break}e:{var y=n,b=s.return,N=s,L=o;if(o=jt,N.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var U=L,Z=N,oe=Z.tag;if((Z.mode&1)===0&&(oe===0||oe===11||oe===15)){var Y=Z.alternate;Y?(Z.updateQueue=Y.updateQueue,Z.memoizedState=Y.memoizedState,Z.lanes=Y.lanes):(Z.updateQueue=null,Z.memoizedState=null)}var me=Fh(b);if(me!==null){me.flags&=-257,Oh(me,b,N,y,o),me.mode&1&&_h(y,U,o),o=me,L=U;var ye=o.updateQueue;if(ye===null){var we=new Set;we.add(L),o.updateQueue=we}else ye.add(L);break e}else{if((o&1)===0){_h(y,U,o),xc();break e}L=Error(r(426))}}else if(tt&&N.mode&1){var st=Fh(b);if(st!==null){(st.flags&65536)===0&&(st.flags|=256),Oh(st,b,N,y,o),Ru(No(L,N));break e}}y=L=No(L,N),ht!==4&&(ht=2),Bi===null?Bi=[y]:Bi.push(y),y=b;do{switch(y.tag){case 3:y.flags|=65536,o&=-o,y.lanes|=o;var M=Lh(y,L,o);sh(y,M);break e;case 1:N=L;var F=y.type,B=y.stateNode;if((y.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||B!==null&&typeof B.componentDidCatch=="function"&&(vr===null||!vr.has(B)))){y.flags|=65536,o&=-o,y.lanes|=o;var ae=zh(y,N,o);sh(y,ae);break e}}y=y.return}while(y!==null)}mm(s)}catch(Se){o=Se,at===s&&s!==null&&(at=s=s.return);continue}break}while(!0)}function pm(){var n=ms.current;return ms.current=us,n===null?us:n}function xc(){(ht===0||ht===3||ht===2)&&(ht=4),xt===null||(Ur&268435455)===0&&(gs&268435455)===0||br(xt,jt)}function bs(n,o){var s=Be;Be|=2;var d=pm();(xt!==n||jt!==o)&&(tr=null,Hr(n,o));do try{kk();break}catch(g){fm(n,g)}while(!0);if(Iu(),Be=s,ms.current=d,at!==null)throw Error(r(261));return xt=null,jt=0,ht}function kk(){for(;at!==null;)hm(at)}function bk(){for(;at!==null&&!G1();)hm(at)}function hm(n){var o=ym(n.alternate,n,rn);n.memoizedProps=n.pendingProps,o===null?mm(n):at=o,ac.current=null}function mm(n){var o=n;do{var s=o.alternate;if(n=o.return,(o.flags&32768)===0){if(s=hk(s,o,rn),s!==null){at=s;return}}else{if(s=mk(s,o),s!==null){s.flags&=32767,at=s;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{ht=6,at=null;return}}if(o=o.sibling,o!==null){at=o;return}at=o=n}while(o!==null);ht===0&&(ht=5)}function Wr(n,o,s){var d=We,g=xn.transition;try{xn.transition=null,We=1,Sk(n,o,s,d)}finally{xn.transition=g,We=d}return null}function Sk(n,o,s,d){do zo();while(wr!==null);if((Be&6)!==0)throw Error(r(327));s=n.finishedWork;var g=n.finishedLanes;if(s===null)return null;if(n.finishedWork=null,n.finishedLanes=0,s===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var y=s.lanes|s.childLanes;if(rw(n,y),n===xt&&(at=xt=null,jt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||ys||(ys=!0,vm(jl,function(){return zo(),null})),y=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||y){y=xn.transition,xn.transition=null;var b=We;We=1;var N=Be;Be|=4,ac.current=null,xk(n,s),im(s,n),Vw(xu),Al=!!gu,xu=gu=null,n.current=s,yk(s),J1(),Be=N,We=b,xn.transition=y}else n.current=s;if(ys&&(ys=!1,wr=n,vs=g),y=n.pendingLanes,y===0&&(vr=null),Y1(s.stateNode),qt(n,lt()),o!==null)for(d=n.onRecoverableError,s=0;s<o.length;s++)g=o[s],d(g.value,{componentStack:g.stack,digest:g.digest});if(xs)throw xs=!1,n=dc,dc=null,n;return(vs&1)!==0&&n.tag!==0&&zo(),y=n.pendingLanes,(y&1)!==0?n===fc?Ui++:(Ui=0,fc=n):Ui=0,mr(),null}function zo(){if(wr!==null){var n=rp(vs),o=xn.transition,s=We;try{if(xn.transition=null,We=16>n?16:n,wr===null)var d=!1;else{if(n=wr,wr=null,vs=0,(Be&6)!==0)throw Error(r(331));var g=Be;for(Be|=4,xe=n.current;xe!==null;){var y=xe,b=y.child;if((xe.flags&16)!==0){var N=y.deletions;if(N!==null){for(var L=0;L<N.length;L++){var U=N[L];for(xe=U;xe!==null;){var Z=xe;switch(Z.tag){case 0:case 11:case 15:Di(8,Z,y)}var oe=Z.child;if(oe!==null)oe.return=Z,xe=oe;else for(;xe!==null;){Z=xe;var Y=Z.sibling,me=Z.return;if(em(Z),Z===U){xe=null;break}if(Y!==null){Y.return=me,xe=Y;break}xe=me}}}var ye=y.alternate;if(ye!==null){var we=ye.child;if(we!==null){ye.child=null;do{var st=we.sibling;we.sibling=null,we=st}while(we!==null)}}xe=y}}if((y.subtreeFlags&2064)!==0&&b!==null)b.return=y,xe=b;else e:for(;xe!==null;){if(y=xe,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:Di(9,y,y.return)}var M=y.sibling;if(M!==null){M.return=y.return,xe=M;break e}xe=y.return}}var F=n.current;for(xe=F;xe!==null;){b=xe;var B=b.child;if((b.subtreeFlags&2064)!==0&&B!==null)B.return=b,xe=B;else e:for(b=F;xe!==null;){if(N=xe,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:hs(9,N)}}catch(Se){it(N,N.return,Se)}if(N===b){xe=null;break e}var ae=N.sibling;if(ae!==null){ae.return=N.return,xe=ae;break e}xe=N.return}}if(Be=g,mr(),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(Tl,n)}catch{}d=!0}return d}finally{We=s,xn.transition=o}}return!1}function gm(n,o,s){o=No(s,o),o=Lh(n,o,1),n=xr(n,o,1),o=Dt(),n!==null&&(fi(n,1,o),qt(n,o))}function it(n,o,s){if(n.tag===3)gm(n,n,s);else for(;o!==null;){if(o.tag===3){gm(o,n,s);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(vr===null||!vr.has(d))){n=No(s,n),n=zh(o,n,1),o=xr(o,n,1),n=Dt(),o!==null&&(fi(o,1,n),qt(o,n));break}}o=o.return}}function Ck(n,o,s){var d=n.pingCache;d!==null&&d.delete(o),o=Dt(),n.pingedLanes|=n.suspendedLanes&s,xt===n&&(jt&s)===s&&(ht===4||ht===3&&(jt&130023424)===jt&&500>lt()-cc?Hr(n,0):uc|=s),qt(n,o)}function xm(n,o){o===0&&((n.mode&1)===0?o=1:(o=$l,$l<<=1,($l&130023424)===0&&($l=4194304)));var s=Dt();n=Xn(n,o),n!==null&&(fi(n,o,s),qt(n,s))}function Ek(n){var o=n.memoizedState,s=0;o!==null&&(s=o.retryLane),xm(n,s)}function jk(n,o){var s=0;switch(n.tag){case 13:var d=n.stateNode,g=n.memoizedState;g!==null&&(s=g.retryLane);break;case 19:d=n.stateNode;break;default:throw Error(r(314))}d!==null&&d.delete(o),xm(n,s)}var ym;ym=function(n,o,s){if(n!==null)if(n.memoizedProps!==o.pendingProps||Ut.current)Ht=!0;else{if((n.lanes&s)===0&&(o.flags&128)===0)return Ht=!1,pk(n,o,s);Ht=(n.flags&131072)!==0}else Ht=!1,tt&&(o.flags&1048576)!==0&&Yp(o,Yl,o.index);switch(o.lanes=0,o.tag){case 2:var d=o.type;fs(n,o),n=o.pendingProps;var g=So(o,It.current);$o(o,s),g=Bu(null,o,d,n,g,s);var y=Uu();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Vt(d)?(y=!0,Jl(o)):y=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Lu(o),g.updater=cs,o.stateNode=g,g._reactInternals=o,Ju(o,d,n,s),o=Xu(null,o,d,!0,y,s)):(o.tag=0,tt&&y&&Cu(o),Ot(null,o,g,s),o=o.child),o;case 16:d=o.elementType;e:{switch(fs(n,o),n=o.pendingProps,g=d._init,d=g(d._payload),o.type=d,g=o.tag=Rk(d),n=jn(d,n),g){case 0:o=Yu(null,o,d,n,s);break e;case 1:o=Hh(null,o,d,n,s);break e;case 11:o=Dh(null,o,d,n,s);break e;case 14:o=Mh(null,o,d,jn(d.type,n),s);break e}throw Error(r(306,d,""))}return o;case 0:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:jn(d,g),Yu(n,o,d,g,s);case 1:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:jn(d,g),Hh(n,o,d,g,s);case 3:e:{if(Wh(o),n===null)throw Error(r(387));d=o.pendingProps,y=o.memoizedState,g=y.element,lh(n,o),rs(o,d,null,s);var b=o.memoizedState;if(d=b.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},o.updateQueue.baseState=y,o.memoizedState=y,o.flags&256){g=No(Error(r(423)),o),o=qh(n,o,d,s,g);break e}else if(d!==g){g=No(Error(r(424)),o),o=qh(n,o,d,s,g);break e}else for(nn=fr(o.stateNode.containerInfo.firstChild),tn=o,tt=!0,En=null,s=oh(o,null,d,s),o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(jo(),d===g){o=er(n,o,s);break e}Ot(n,o,d,s)}o=o.child}return o;case 5:return uh(o),n===null&&Tu(o),d=o.type,g=o.pendingProps,y=n!==null?n.memoizedProps:null,b=g.children,yu(d,g)?b=null:y!==null&&yu(d,y)&&(o.flags|=32),Vh(n,o),Ot(n,o,b,s),o.child;case 6:return n===null&&Tu(o),null;case 13:return Gh(n,o,s);case 4:return zu(o,o.stateNode.containerInfo),d=o.pendingProps,n===null?o.child=To(o,null,d,s):Ot(n,o,d,s),o.child;case 11:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:jn(d,g),Dh(n,o,d,g,s);case 7:return Ot(n,o,o.pendingProps,s),o.child;case 8:return Ot(n,o,o.pendingProps.children,s),o.child;case 12:return Ot(n,o,o.pendingProps.children,s),o.child;case 10:e:{if(d=o.type._context,g=o.pendingProps,y=o.memoizedProps,b=g.value,Ke(es,d._currentValue),d._currentValue=b,y!==null)if(Cn(y.value,b)){if(y.children===g.children&&!Ut.current){o=er(n,o,s);break e}}else for(y=o.child,y!==null&&(y.return=o);y!==null;){var N=y.dependencies;if(N!==null){b=y.child;for(var L=N.firstContext;L!==null;){if(L.context===d){if(y.tag===1){L=Zn(-1,s&-s),L.tag=2;var U=y.updateQueue;if(U!==null){U=U.shared;var Z=U.pending;Z===null?L.next=L:(L.next=Z.next,Z.next=L),U.pending=L}}y.lanes|=s,L=y.alternate,L!==null&&(L.lanes|=s),Pu(y.return,s,o),N.lanes|=s;break}L=L.next}}else if(y.tag===10)b=y.type===o.type?null:y.child;else if(y.tag===18){if(b=y.return,b===null)throw Error(r(341));b.lanes|=s,N=b.alternate,N!==null&&(N.lanes|=s),Pu(b,s,o),b=y.sibling}else b=y.child;if(b!==null)b.return=y;else for(b=y;b!==null;){if(b===o){b=null;break}if(y=b.sibling,y!==null){y.return=b.return,b=y;break}b=b.return}y=b}Ot(n,o,g.children,s),o=o.child}return o;case 9:return g=o.type,d=o.pendingProps.children,$o(o,s),g=mn(g),d=d(g),o.flags|=1,Ot(n,o,d,s),o.child;case 14:return d=o.type,g=jn(d,o.pendingProps),g=jn(d.type,g),Mh(n,o,d,g,s);case 15:return Bh(n,o,o.type,o.pendingProps,s);case 17:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:jn(d,g),fs(n,o),o.tag=1,Vt(d)?(n=!0,Jl(o)):n=!1,$o(o,s),Ph(o,d,g),Ju(o,d,g,s),Xu(null,o,d,!0,n,s);case 19:return Kh(n,o,s);case 22:return Uh(n,o,s)}throw Error(r(156,o.tag))};function vm(n,o){return Xf(n,o)}function Tk(n,o,s,d){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(n,o,s,d){return new Tk(n,o,s,d)}function yc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Rk(n){if(typeof n=="function")return yc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===se)return 11;if(n===W)return 14}return 2}function Sr(n,o){var s=n.alternate;return s===null?(s=yn(n.tag,o,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=o,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&14680064,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,o=n.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s}function Ss(n,o,s,d,g,y){var b=2;if(d=n,typeof n=="function")yc(n)&&(b=1);else if(typeof n=="string")b=5;else e:switch(n){case V:return qr(s.children,g,y,o);case K:b=8,g|=8;break;case re:return n=yn(12,s,o,g|2),n.elementType=re,n.lanes=y,n;case ee:return n=yn(13,s,o,g),n.elementType=ee,n.lanes=y,n;case X:return n=yn(19,s,o,g),n.elementType=X,n.lanes=y,n;case de:return Cs(s,g,y,o);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case D:b=10;break e;case te:b=9;break e;case se:b=11;break e;case W:b=14;break e;case ce:b=16,d=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return o=yn(b,s,o,g),o.elementType=n,o.type=d,o.lanes=y,o}function qr(n,o,s,d){return n=yn(7,n,d,o),n.lanes=s,n}function Cs(n,o,s,d){return n=yn(22,n,d,o),n.elementType=de,n.lanes=s,n.stateNode={isHidden:!1},n}function vc(n,o,s){return n=yn(6,n,null,o),n.lanes=s,n}function wc(n,o,s){return o=yn(4,n.children!==null?n.children:[],n.key,o),o.lanes=s,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function $k(n,o,s,d,g){this.tag=o,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ga(0),this.expirationTimes=Ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ga(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function kc(n,o,s,d,g,y,b,N,L){return n=new $k(n,o,s,N,L),o===1?(o=1,y===!0&&(o|=8)):o=0,y=yn(3,null,null,o),n.current=y,y.stateNode=n,y.memoizedState={element:d,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lu(y),n}function Ik(n,o,s){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:d==null?null:""+d,children:n,containerInfo:o,implementation:s}}function wm(n){if(!n)return hr;n=n._reactInternals;e:{if(Lr(n)!==n||n.tag!==1)throw Error(r(170));var o=n;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Vt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(r(171))}if(n.tag===1){var s=n.type;if(Vt(s))return Jp(n,s,o)}return o}function km(n,o,s,d,g,y,b,N,L){return n=kc(s,d,!0,n,g,y,b,N,L),n.context=wm(null),s=n.current,d=Dt(),g=kr(s),y=Zn(d,g),y.callback=o??null,xr(s,y,g),n.current.lanes=g,fi(n,g,d),qt(n,d),n}function Es(n,o,s,d){var g=o.current,y=Dt(),b=kr(g);return s=wm(s),o.context===null?o.context=s:o.pendingContext=s,o=Zn(y,b),o.payload={element:n},d=d===void 0?null:d,d!==null&&(o.callback=d),n=xr(g,o,b),n!==null&&($n(n,g,b,y),ns(n,g,b)),b}function js(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function bm(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<o?s:o}}function bc(n,o){bm(n,o),(n=n.alternate)&&bm(n,o)}function Nk(){return null}var Sm=typeof reportError=="function"?reportError:function(n){console.error(n)};function Sc(n){this._internalRoot=n}Ts.prototype.render=Sc.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(r(409));Es(n,o,null,null)},Ts.prototype.unmount=Sc.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;Vr(function(){Es(null,n,null,null)}),o[Jn]=null}};function Ts(n){this._internalRoot=n}Ts.prototype.unstable_scheduleHydration=function(n){if(n){var o=lp();n={blockedOn:null,target:n,priority:o};for(var s=0;s<ur.length&&o!==0&&o<ur[s].priority;s++);ur.splice(s,0,n),s===0&&up(n)}};function Cc(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Rs(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Cm(){}function Pk(n,o,s,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var U=js(b);y.call(U)}}var b=km(o,d,n,0,null,!1,!1,"",Cm);return n._reactRootContainer=b,n[Jn]=b.current,ji(n.nodeType===8?n.parentNode:n),Vr(),b}for(;g=n.lastChild;)n.removeChild(g);if(typeof d=="function"){var N=d;d=function(){var U=js(L);N.call(U)}}var L=kc(n,0,!1,null,null,!1,!1,"",Cm);return n._reactRootContainer=L,n[Jn]=L.current,ji(n.nodeType===8?n.parentNode:n),Vr(function(){Es(o,L,s,d)}),L}function $s(n,o,s,d,g){var y=s._reactRootContainer;if(y){var b=y;if(typeof g=="function"){var N=g;g=function(){var L=js(b);N.call(L)}}Es(o,b,n,g)}else b=Pk(s,o,n,g,d);return js(b)}op=function(n){switch(n.tag){case 3:var o=n.stateNode;if(o.current.memoizedState.isDehydrated){var s=di(o.pendingLanes);s!==0&&(Ja(o,s|1),qt(o,lt()),(Be&6)===0&&(Lo=lt()+500,mr()))}break;case 13:Vr(function(){var d=Xn(n,1);if(d!==null){var g=Dt();$n(d,n,1,g)}}),bc(n,1)}},Ka=function(n){if(n.tag===13){var o=Xn(n,134217728);if(o!==null){var s=Dt();$n(o,n,134217728,s)}bc(n,134217728)}},ip=function(n){if(n.tag===13){var o=kr(n),s=Xn(n,o);if(s!==null){var d=Dt();$n(s,n,o,d)}bc(n,o)}},lp=function(){return We},sp=function(n,o){var s=We;try{return We=n,o()}finally{We=s}},Ba=function(n,o,s){switch(o){case"input":if(qn(n,s),o=s.name,s.type==="radio"&&o!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<s.length;o++){var d=s[o];if(d!==n&&d.form===n.form){var g=ql(d);if(!g)throw Error(r(90));Ie(d),qn(d,g)}}}break;case"textarea":mt(n,s);break;case"select":o=s.value,o!=null&&Ft(n,!!s.multiple,o,!1)}},Wf=mc,qf=Vr;var Ak={usingClientEntryPoint:!1,Events:[$i,ko,ql,Vf,Hf,mc]},Vi={findFiberByHostInstance:zr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Lk={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Qf(n),n===null?null:n.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||Nk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Is.isDisabled&&Is.supportsFiber)try{Tl=Is.inject(Lk),_n=Is}catch{}}return Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ak,Gt.createPortal=function(n,o){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cc(o))throw Error(r(200));return Ik(n,o,null,s)},Gt.createRoot=function(n,o){if(!Cc(n))throw Error(r(299));var s=!1,d="",g=Sm;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=kc(n,1,!1,null,null,s,!1,d,g),n[Jn]=o.current,ji(n.nodeType===8?n.parentNode:n),new Sc(o)},Gt.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=Qf(o),n=n===null?null:n.stateNode,n},Gt.flushSync=function(n){return Vr(n)},Gt.hydrate=function(n,o,s){if(!Rs(o))throw Error(r(200));return $s(null,n,o,!0,s)},Gt.hydrateRoot=function(n,o,s){if(!Cc(n))throw Error(r(405));var d=s!=null&&s.hydratedSources||null,g=!1,y="",b=Sm;if(s!=null&&(s.unstable_strictMode===!0&&(g=!0),s.identifierPrefix!==void 0&&(y=s.identifierPrefix),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),o=km(o,null,n,1,s??null,g,!1,y,b),n[Jn]=o.current,ji(n),d)for(n=0;n<d.length;n++)s=d[n],g=s._getVersion,g=g(s._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[s,g]:o.mutableSourceEagerHydrationData.push(s,g);return new Ts(o)},Gt.render=function(n,o,s){if(!Rs(o))throw Error(r(200));return $s(null,n,o,!1,s)},Gt.unmountComponentAtNode=function(n){if(!Rs(n))throw Error(r(40));return n._reactRootContainer?(Vr(function(){$s(null,null,n,!1,function(){n._reactRootContainer=null,n[Jn]=null})}),!0):!1},Gt.unstable_batchedUpdates=mc,Gt.unstable_renderSubtreeIntoContainer=function(n,o,s,d){if(!Rs(s))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return $s(n,o,s,!1,d)},Gt.version="18.3.1-next-f1338f8080-20240426",Gt}var Im;function Uk(){if(Im)return jc.exports;Im=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jc.exports=Bk(),jc.exports}var Nm;function Vk(){if(Nm)return Ns;Nm=1;var e=Uk();return Ns.createRoot=e.createRoot,Ns.hydrateRoot=e.hydrateRoot,Ns}var Hk=Vk(),$c={exports:{}},Hi={};/**
|
|
33
|
-
* @license React
|
|
34
|
-
* react-jsx-runtime.production.min.js
|
|
35
|
-
*
|
|
36
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
-
*
|
|
38
|
-
* This source code is licensed under the MIT license found in the
|
|
39
|
-
* LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/var Pm;function Wk(){if(Pm)return Hi;Pm=1;var e=Ud(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,f,p){var x,m={},v=null,w=null;p!==void 0&&(v=""+p),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(w=f.ref);for(x in f)i.call(f,x)&&!a.hasOwnProperty(x)&&(m[x]=f[x]);if(c&&c.defaultProps)for(x in f=c.defaultProps,f)m[x]===void 0&&(m[x]=f[x]);return{$$typeof:t,type:c,key:v,ref:w,props:m,_owner:l.current}}return Hi.Fragment=r,Hi.jsx=u,Hi.jsxs=u,Hi}var Am;function qk(){return Am||(Am=1,$c.exports=Wk()),$c.exports}var h=qk(),kt=function(){return kt=Object.assign||function(t){for(var r,i=1,l=arguments.length;i<l;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},kt.apply(this,arguments)};function qo(e,t,r){if(r||arguments.length===2)for(var i=0,l=t.length,a;i<l;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var et="-ms-",ol="-moz-",He="-webkit-",Dx="comm",wa="rule",Vd="decl",Gk="@import",Mx="@keyframes",Jk="@layer",Bx=Math.abs,Hd=String.fromCharCode,ld=Object.assign;function Kk(e,t){return vt(e,0)^45?(((t<<2^vt(e,0))<<2^vt(e,1))<<2^vt(e,2))<<2^vt(e,3):0}function Ux(e){return e.trim()}function nr(e,t){return(e=t.exec(e))?e[0]:e}function Ae(e,t,r){return e.replace(t,r)}function Ws(e,t,r){return e.indexOf(t,r)}function vt(e,t){return e.charCodeAt(t)|0}function Go(e,t,r){return e.slice(t,r)}function Vn(e){return e.length}function Vx(e){return e.length}function nl(e,t){return t.push(e),e}function Qk(e,t){return e.map(t).join("")}function Lm(e,t){return e.filter(function(r){return!nr(r,t)})}var ka=1,Jo=1,Hx=0,kn=0,ct=0,ei="";function ba(e,t,r,i,l,a,u,c){return{value:e,root:t,parent:r,type:i,props:l,children:a,line:ka,column:Jo,length:u,return:"",siblings:c}}function Tr(e,t){return ld(ba("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function _o(e){for(;e.root;)e=Tr(e.root,{children:[e]});nl(e,e.siblings)}function Yk(){return ct}function Xk(){return ct=kn>0?vt(ei,--kn):0,Jo--,ct===10&&(Jo=1,ka--),ct}function Nn(){return ct=kn<Hx?vt(ei,kn++):0,Jo++,ct===10&&(Jo=1,ka++),ct}function Xr(){return vt(ei,kn)}function qs(){return kn}function Sa(e,t){return Go(ei,e,t)}function sd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zk(e){return ka=Jo=1,Hx=Vn(ei=e),kn=0,[]}function eb(e){return ei="",e}function Ic(e){return Ux(Sa(kn-1,ad(e===91?e+2:e===40?e+1:e)))}function tb(e){for(;(ct=Xr())&&ct<33;)Nn();return sd(e)>2||sd(ct)>3?"":" "}function nb(e,t){for(;--t&&Nn()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return Sa(e,qs()+(t<6&&Xr()==32&&Nn()==32))}function ad(e){for(;Nn();)switch(ct){case e:return kn;case 34:case 39:e!==34&&e!==39&&ad(ct);break;case 40:e===41&&ad(e);break;case 92:Nn();break}return kn}function rb(e,t){for(;Nn()&&e+ct!==57;)if(e+ct===84&&Xr()===47)break;return"/*"+Sa(t,kn-1)+"*"+Hd(e===47?e:Nn())}function ob(e){for(;!sd(Xr());)Nn();return Sa(e,kn)}function ib(e){return eb(Gs("",null,null,null,[""],e=Zk(e),0,[0],e))}function Gs(e,t,r,i,l,a,u,c,f){for(var p=0,x=0,m=u,v=0,w=0,k=0,S=1,j=1,E=1,I=0,A="",_=l,O=a,P=i,V=A;j;)switch(k=I,I=Nn()){case 40:if(k!=108&&vt(V,m-1)==58){Ws(V+=Ae(Ic(I),"&","&\f"),"&\f",Bx(p?c[p-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:V+=Ic(I);break;case 9:case 10:case 13:case 32:V+=tb(k);break;case 92:V+=nb(qs()-1,7);continue;case 47:switch(Xr()){case 42:case 47:nl(lb(rb(Nn(),qs()),t,r,f),f);break;default:V+="/"}break;case 123*S:c[p++]=Vn(V)*E;case 125*S:case 59:case 0:switch(I){case 0:case 125:j=0;case 59+x:E==-1&&(V=Ae(V,/\f/g,"")),w>0&&Vn(V)-m&&nl(w>32?_m(V+";",i,r,m-1,f):_m(Ae(V," ","")+";",i,r,m-2,f),f);break;case 59:V+=";";default:if(nl(P=zm(V,t,r,p,x,l,c,A,_=[],O=[],m,a),a),I===123)if(x===0)Gs(V,t,P,P,_,a,m,c,O);else switch(v===99&&vt(V,3)===110?100:v){case 100:case 108:case 109:case 115:Gs(e,P,P,i&&nl(zm(e,P,P,0,0,l,c,A,l,_=[],m,O),O),l,O,m,c,i?_:O);break;default:Gs(V,P,P,P,[""],O,0,c,O)}}p=x=w=0,S=E=1,A=V="",m=u;break;case 58:m=1+Vn(V),w=k;default:if(S<1){if(I==123)--S;else if(I==125&&S++==0&&Xk()==125)continue}switch(V+=Hd(I),I*S){case 38:E=x>0?1:(V+="\f",-1);break;case 44:c[p++]=(Vn(V)-1)*E,E=1;break;case 64:Xr()===45&&(V+=Ic(Nn())),v=Xr(),x=m=Vn(A=V+=ob(qs())),I++;break;case 45:k===45&&Vn(V)==2&&(S=0)}}return a}function zm(e,t,r,i,l,a,u,c,f,p,x,m){for(var v=l-1,w=l===0?a:[""],k=Vx(w),S=0,j=0,E=0;S<i;++S)for(var I=0,A=Go(e,v+1,v=Bx(j=u[S])),_=e;I<k;++I)(_=Ux(j>0?w[I]+" "+A:Ae(A,/&\f/g,w[I])))&&(f[E++]=_);return ba(e,t,r,l===0?wa:c,f,p,x,m)}function lb(e,t,r,i){return ba(e,t,r,Dx,Hd(Yk()),Go(e,2,-2),0,i)}function _m(e,t,r,i,l){return ba(e,t,r,Vd,Go(e,0,i),Go(e,i+1,-1),i,l)}function Wx(e,t,r){switch(Kk(e,t)){case 5103:return He+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return He+e+e;case 4789:return ol+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return He+e+ol+e+et+e+e;case 5936:switch(vt(e,t+11)){case 114:return He+e+et+Ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return He+e+et+Ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return He+e+et+Ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return He+e+et+e+e;case 6165:return He+e+et+"flex-"+e+e;case 5187:return He+e+Ae(e,/(\w+).+(:[^]+)/,He+"box-$1$2"+et+"flex-$1$2")+e;case 5443:return He+e+et+"flex-item-"+Ae(e,/flex-|-self/g,"")+(nr(e,/flex-|baseline/)?"":et+"grid-row-"+Ae(e,/flex-|-self/g,""))+e;case 4675:return He+e+et+"flex-line-pack"+Ae(e,/align-content|flex-|-self/g,"")+e;case 5548:return He+e+et+Ae(e,"shrink","negative")+e;case 5292:return He+e+et+Ae(e,"basis","preferred-size")+e;case 6060:return He+"box-"+Ae(e,"-grow","")+He+e+et+Ae(e,"grow","positive")+e;case 4554:return He+Ae(e,/([^-])(transform)/g,"$1"+He+"$2")+e;case 6187:return Ae(Ae(Ae(e,/(zoom-|grab)/,He+"$1"),/(image-set)/,He+"$1"),e,"")+e;case 5495:case 3959:return Ae(e,/(image-set\([^]*)/,He+"$1$`$1");case 4968:return Ae(Ae(e,/(.+:)(flex-)?(.*)/,He+"box-pack:$3"+et+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+He+e+e;case 4200:if(!nr(e,/flex-|baseline/))return et+"grid-column-align"+Go(e,t)+e;break;case 2592:case 3360:return et+Ae(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(i,l){return t=l,nr(i.props,/grid-\w+-end/)})?~Ws(e+(r=r[t].value),"span",0)?e:et+Ae(e,"-start","")+e+et+"grid-row-span:"+(~Ws(r,"span",0)?nr(r,/\d+/):+nr(r,/\d+/)-+nr(e,/\d+/))+";":et+Ae(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(i){return nr(i.props,/grid-\w+-start/)})?e:et+Ae(Ae(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ae(e,/(.+)-inline(.+)/,He+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Vn(e)-1-t>6)switch(vt(e,t+1)){case 109:if(vt(e,t+4)!==45)break;case 102:return Ae(e,/(.+:)(.+)-([^]+)/,"$1"+He+"$2-$3$1"+ol+(vt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ws(e,"stretch",0)?Wx(Ae(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Ae(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(i,l,a,u,c,f,p){return et+l+":"+a+p+(u?et+l+"-span:"+(c?f:+f-+a)+p:"")+e});case 4949:if(vt(e,t+6)===121)return Ae(e,":",":"+He)+e;break;case 6444:switch(vt(e,vt(e,14)===45?18:11)){case 120:return Ae(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+He+(vt(e,14)===45?"inline-":"")+"box$3$1"+He+"$2$3$1"+et+"$2box$3")+e;case 100:return Ae(e,":",":"+et)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ae(e,"scroll-","scroll-snap-")+e}return e}function ra(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function sb(e,t,r,i){switch(e.type){case Jk:if(e.children.length)break;case Gk:case Vd:return e.return=e.return||e.value;case Dx:return"";case Mx:return e.return=e.value+"{"+ra(e.children,i)+"}";case wa:if(!Vn(e.value=e.props.join(",")))return""}return Vn(r=ra(e.children,i))?e.return=e.value+"{"+r+"}":""}function ab(e){var t=Vx(e);return function(r,i,l,a){for(var u="",c=0;c<t;c++)u+=e[c](r,i,l,a)||"";return u}}function ub(e){return function(t){t.root||(t=t.return)&&e(t)}}function cb(e,t,r,i){if(e.length>-1&&!e.return)switch(e.type){case Vd:e.return=Wx(e.value,e.length,r);return;case Mx:return ra([Tr(e,{value:Ae(e.value,"@","@"+He)})],i);case wa:if(e.length)return Qk(r=e.props,function(l){switch(nr(l,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":_o(Tr(e,{props:[Ae(l,/:(read-\w+)/,":"+ol+"$1")]})),_o(Tr(e,{props:[l]})),ld(e,{props:Lm(r,i)});break;case"::placeholder":_o(Tr(e,{props:[Ae(l,/:(plac\w+)/,":"+He+"input-$1")]})),_o(Tr(e,{props:[Ae(l,/:(plac\w+)/,":"+ol+"$1")]})),_o(Tr(e,{props:[Ae(l,/:(plac\w+)/,et+"input-$1")]})),_o(Tr(e,{props:[l]})),ld(e,{props:Lm(r,i)});break}return""})}}var db={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ln={},Ko=typeof process<"u"&&ln!==void 0&&(ln.REACT_APP_SC_ATTR||ln.SC_ATTR)||"data-styled",qx="active",Gx="data-styled-version",Ca="6.1.13",Wd=`/*!sc*/
|
|
41
|
-
`,oa=typeof window<"u"&&"HTMLElement"in window,fb=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&ln!==void 0&&ln.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&ln.REACT_APP_SC_DISABLE_SPEEDY!==""?ln.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&ln.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&ln!==void 0&&ln.SC_DISABLE_SPEEDY!==void 0&&ln.SC_DISABLE_SPEEDY!==""&&ln.SC_DISABLE_SPEEDY!=="false"&&ln.SC_DISABLE_SPEEDY),pb={},Ea=Object.freeze([]),Qo=Object.freeze({});function Jx(e,t,r){return r===void 0&&(r=Qo),e.theme!==r.theme&&e.theme||t||r.theme}var Kx=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),hb=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,mb=/(^-|-$)/g;function Fm(e){return e.replace(hb,"-").replace(mb,"")}var gb=/(a)(d)/gi,Ps=52,Om=function(e){return String.fromCharCode(e+(e>25?39:97))};function ud(e){var t,r="";for(t=Math.abs(e);t>Ps;t=t/Ps|0)r=Om(t%Ps)+r;return(Om(t%Ps)+r).replace(gb,"$1-$2")}var Nc,Qx=5381,Bo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Yx=function(e){return Bo(Qx,e)};function qd(e){return ud(Yx(e)>>>0)}function xb(e){return e.displayName||e.name||"Component"}function Pc(e){return typeof e=="string"&&!0}var Xx=typeof Symbol=="function"&&Symbol.for,Zx=Xx?Symbol.for("react.memo"):60115,yb=Xx?Symbol.for("react.forward_ref"):60112,vb={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},wb={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ey={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},kb=((Nc={})[yb]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Nc[Zx]=ey,Nc);function Dm(e){return("type"in(t=e)&&t.type.$$typeof)===Zx?ey:"$$typeof"in e?kb[e.$$typeof]:vb;var t}var bb=Object.defineProperty,Sb=Object.getOwnPropertyNames,Mm=Object.getOwnPropertySymbols,Cb=Object.getOwnPropertyDescriptor,Eb=Object.getPrototypeOf,Bm=Object.prototype;function ty(e,t,r){if(typeof t!="string"){if(Bm){var i=Eb(t);i&&i!==Bm&&ty(e,i,r)}var l=Sb(t);Mm&&(l=l.concat(Mm(t)));for(var a=Dm(e),u=Dm(t),c=0;c<l.length;++c){var f=l[c];if(!(f in wb||r&&r[f]||u&&f in u||a&&f in a)){var p=Cb(t,f);try{bb(e,f,p)}catch{}}}}return e}function ro(e){return typeof e=="function"}function Gd(e){return typeof e=="object"&&"styledComponentId"in e}function Qr(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ia(e,t){if(e.length===0)return"";for(var r=e[0],i=1;i<e.length;i++)r+=e[i];return r}function al(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function cd(e,t,r){if(r===void 0&&(r=!1),!r&&!al(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)e[i]=cd(e[i],t[i]);else if(al(t))for(var i in t)e[i]=cd(e[i],t[i]);return e}function Jd(e,t){Object.defineProperty(e,"toString",{value:t})}function $r(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var jb=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,i=0;i<t;i++)r+=this.groupSizes[i];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var i=this.groupSizes,l=i.length,a=l;t>=a;)if((a<<=1)<0)throw $r(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(i),this.length=a;for(var u=l;u<a;u++)this.groupSizes[u]=0}for(var c=this.indexOfGroup(t+1),f=(u=0,r.length);u<f;u++)this.tag.insertRule(c,r[u])&&(this.groupSizes[t]++,c++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],i=this.indexOfGroup(t),l=i+r;this.groupSizes[t]=0;for(var a=i;a<l;a++)this.tag.deleteRule(i)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var i=this.groupSizes[t],l=this.indexOfGroup(t),a=l+i,u=l;u<a;u++)r+="".concat(this.tag.getRule(u)).concat(Wd);return r},e}(),Js=new Map,la=new Map,Ks=1,As=function(e){if(Js.has(e))return Js.get(e);for(;la.has(Ks);)Ks++;var t=Ks++;return Js.set(e,t),la.set(t,e),t},Tb=function(e,t){Ks=t+1,Js.set(e,t),la.set(t,e)},Rb="style[".concat(Ko,"][").concat(Gx,'="').concat(Ca,'"]'),$b=new RegExp("^".concat(Ko,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ib=function(e,t,r){for(var i,l=r.split(","),a=0,u=l.length;a<u;a++)(i=l[a])&&e.registerName(t,i)},Nb=function(e,t){for(var r,i=((r=t.textContent)!==null&&r!==void 0?r:"").split(Wd),l=[],a=0,u=i.length;a<u;a++){var c=i[a].trim();if(c){var f=c.match($b);if(f){var p=0|parseInt(f[1],10),x=f[2];p!==0&&(Tb(x,p),Ib(e,x,f[3]),e.getTag().insertRules(p,l)),l.length=0}else l.push(c)}}},Um=function(e){for(var t=document.querySelectorAll(Rb),r=0,i=t.length;r<i;r++){var l=t[r];l&&l.getAttribute(Ko)!==qx&&(Nb(e,l),l.parentNode&&l.parentNode.removeChild(l))}};function Pb(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var ny=function(e){var t=document.head,r=e||t,i=document.createElement("style"),l=function(c){var f=Array.from(c.querySelectorAll("style[".concat(Ko,"]")));return f[f.length-1]}(r),a=l!==void 0?l.nextSibling:null;i.setAttribute(Ko,qx),i.setAttribute(Gx,Ca);var u=Pb();return u&&i.setAttribute("nonce",u),r.insertBefore(i,a),i},Ab=function(){function e(t){this.element=ny(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(r){if(r.sheet)return r.sheet;for(var i=document.styleSheets,l=0,a=i.length;l<a;l++){var u=i[l];if(u.ownerNode===r)return u}throw $r(17)}(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e}(),Lb=function(){function e(t){this.element=ny(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var i=document.createTextNode(r);return this.element.insertBefore(i,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),zb=function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),Vm=oa,_b={isServer:!oa,useCSSOMInjection:!fb},sa=function(){function e(t,r,i){t===void 0&&(t=Qo),r===void 0&&(r={});var l=this;this.options=kt(kt({},_b),t),this.gs=r,this.names=new Map(i),this.server=!!t.isServer,!this.server&&oa&&Vm&&(Vm=!1,Um(this)),Jd(this,function(){return function(a){for(var u=a.getTag(),c=u.length,f="",p=function(m){var v=function(E){return la.get(E)}(m);if(v===void 0)return"continue";var w=a.names.get(v),k=u.getGroup(m);if(w===void 0||!w.size||k.length===0)return"continue";var S="".concat(Ko,".g").concat(m,'[id="').concat(v,'"]'),j="";w!==void 0&&w.forEach(function(E){E.length>0&&(j+="".concat(E,","))}),f+="".concat(k).concat(S,'{content:"').concat(j,'"}').concat(Wd)},x=0;x<c;x++)p(x);return f}(l)})}return e.registerId=function(t){return As(t)},e.prototype.rehydrate=function(){!this.server&&oa&&Um(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(kt(kt({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(r){var i=r.useCSSOMInjection,l=r.target;return r.isServer?new zb(l):i?new Ab(l):new Lb(l)}(this.options),new jb(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(As(t),this.names.has(t))this.names.get(t).add(r);else{var i=new Set;i.add(r),this.names.set(t,i)}},e.prototype.insertRules=function(t,r,i){this.registerName(t,r),this.getTag().insertRules(As(t),i)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(As(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Fb=/&/g,Ob=/^\s*\/\/.*$/gm;function ry(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(i){return"".concat(t," ").concat(i)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=ry(r.children,t)),r})}function Db(e){var t,r,i,l=Qo,a=l.options,u=a===void 0?Qo:a,c=l.plugins,f=c===void 0?Ea:c,p=function(v,w,k){return k.startsWith(r)&&k.endsWith(r)&&k.replaceAll(r,"").length>0?".".concat(t):v},x=f.slice();x.push(function(v){v.type===wa&&v.value.includes("&")&&(v.props[0]=v.props[0].replace(Fb,r).replace(i,p))}),u.prefix&&x.push(cb),x.push(sb);var m=function(v,w,k,S){w===void 0&&(w=""),k===void 0&&(k=""),S===void 0&&(S="&"),t=S,r=w,i=new RegExp("\\".concat(r,"\\b"),"g");var j=v.replace(Ob,""),E=ib(k||w?"".concat(k," ").concat(w," { ").concat(j," }"):j);u.namespace&&(E=ry(E,u.namespace));var I=[];return ra(E,ab(x.concat(ub(function(A){return I.push(A)})))),I};return m.hash=f.length?f.reduce(function(v,w){return w.name||$r(15),Bo(v,w.name)},Qx).toString():"",m}var Mb=new sa,dd=Db(),oy=Tt.createContext({shouldForwardProp:void 0,styleSheet:Mb,stylis:dd});oy.Consumer;Tt.createContext(void 0);function fd(){return R.useContext(oy)}var iy=function(){function e(t,r){var i=this;this.inject=function(l,a){a===void 0&&(a=dd);var u=i.name+a.hash;l.hasNameForId(i.id,u)||l.insertRules(i.id,u,a(i.rules,u,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,Jd(this,function(){throw $r(12,String(i.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=dd),this.name+t.hash},e}(),Bb=function(e){return e>="A"&&e<="Z"};function Hm(e){for(var t="",r=0;r<e.length;r++){var i=e[r];if(r===1&&i==="-"&&e[0]==="-")return e;Bb(i)?t+="-"+i.toLowerCase():t+=i}return t.startsWith("ms-")?"-"+t:t}var ly=function(e){return e==null||e===!1||e===""},sy=function(e){var t,r,i=[];for(var l in e){var a=e[l];e.hasOwnProperty(l)&&!ly(a)&&(Array.isArray(a)&&a.isCss||ro(a)?i.push("".concat(Hm(l),":"),a,";"):al(a)?i.push.apply(i,qo(qo(["".concat(l," {")],sy(a),!1),["}"],!1)):i.push("".concat(Hm(l),": ").concat((t=l,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in db||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return i};function Rr(e,t,r,i){if(ly(e))return[];if(Gd(e))return[".".concat(e.styledComponentId)];if(ro(e)){if(!ro(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var l=e(t);return Rr(l,t,r,i)}var a;return e instanceof iy?r?(e.inject(r,i),[e.getName(i)]):[e]:al(e)?sy(e):Array.isArray(e)?Array.prototype.concat.apply(Ea,e.map(function(u){return Rr(u,t,r,i)})):[e.toString()]}function ay(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(ro(r)&&!Gd(r))return!1}return!0}var Ub=Yx(Ca),Vb=function(){function e(t,r,i){this.rules=t,this.staticRulesId="",this.isStatic=(i===void 0||i.isStatic)&&ay(t),this.componentId=r,this.baseHash=Bo(Ub,r),this.baseStyle=i,sa.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,i){var l=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,i):"";if(this.isStatic&&!i.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))l=Qr(l,this.staticRulesId);else{var a=ia(Rr(this.rules,t,r,i)),u=ud(Bo(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,u)){var c=i(a,".".concat(u),void 0,this.componentId);r.insertRules(this.componentId,u,c)}l=Qr(l,u),this.staticRulesId=u}else{for(var f=Bo(this.baseHash,i.hash),p="",x=0;x<this.rules.length;x++){var m=this.rules[x];if(typeof m=="string")p+=m;else if(m){var v=ia(Rr(m,t,r,i));f=Bo(f,v+x),p+=v}}if(p){var w=ud(f>>>0);r.hasNameForId(this.componentId,w)||r.insertRules(this.componentId,w,i(p,".".concat(w),void 0,this.componentId)),l=Qr(l,w)}}return l},e}(),Yo=Tt.createContext(void 0);Yo.Consumer;function Hb(){var e=R.useContext(Yo);if(!e)throw $r(18);return e}function Wm(e){var t=Tt.useContext(Yo),r=R.useMemo(function(){return function(i,l){if(!i)throw $r(14);if(ro(i)){var a=i(l);return a}if(Array.isArray(i)||typeof i!="object")throw $r(8);return l?kt(kt({},l),i):i}(e.theme,t)},[e.theme,t]);return e.children?Tt.createElement(Yo.Provider,{value:r},e.children):null}var Ac={};function Wb(e,t,r){var i=Gd(e),l=e,a=!Pc(e),u=t.attrs,c=u===void 0?Ea:u,f=t.componentId,p=f===void 0?function(_,O){var P=typeof _!="string"?"sc":Fm(_);Ac[P]=(Ac[P]||0)+1;var V="".concat(P,"-").concat(qd(Ca+P+Ac[P]));return O?"".concat(O,"-").concat(V):V}(t.displayName,t.parentComponentId):f,x=t.displayName,m=x===void 0?function(_){return Pc(_)?"styled.".concat(_):"Styled(".concat(xb(_),")")}(e):x,v=t.displayName&&t.componentId?"".concat(Fm(t.displayName),"-").concat(t.componentId):t.componentId||p,w=i&&l.attrs?l.attrs.concat(c).filter(Boolean):c,k=t.shouldForwardProp;if(i&&l.shouldForwardProp){var S=l.shouldForwardProp;if(t.shouldForwardProp){var j=t.shouldForwardProp;k=function(_,O){return S(_,O)&&j(_,O)}}else k=S}var E=new Vb(r,v,i?l.componentStyle:void 0);function I(_,O){return function(P,V,K){var re=P.attrs,D=P.componentStyle,te=P.defaultProps,se=P.foldedComponentIds,ee=P.styledComponentId,X=P.target,W=Tt.useContext(Yo),ce=fd(),de=P.shouldForwardProp||ce.shouldForwardProp,Q=Jx(V,W,te)||Qo,fe=function(ge,ke,he){for(var pe,le=kt(kt({},ke),{className:void 0,theme:he}),ve=0;ve<ge.length;ve+=1){var Le=ro(pe=ge[ve])?pe(le):pe;for(var Ie in Le)le[Ie]=Ie==="className"?Qr(le[Ie],Le[Ie]):Ie==="style"?kt(kt({},le[Ie]),Le[Ie]):Le[Ie]}return ke.className&&(le.className=Qr(le.className,ke.className)),le}(re,V,Q),T=fe.as||X,z={};for(var q in fe)fe[q]===void 0||q[0]==="$"||q==="as"||q==="theme"&&fe.theme===Q||(q==="forwardedAs"?z.as=fe.forwardedAs:de&&!de(q,T)||(z[q]=fe[q]));var $=function(ge,ke){var he=fd(),pe=ge.generateAndInjectStyles(ke,he.styleSheet,he.stylis);return pe}(D,fe),ue=Qr(se,ee);return $&&(ue+=" "+$),fe.className&&(ue+=" "+fe.className),z[Pc(T)&&!Kx.has(T)?"class":"className"]=ue,z.ref=K,R.createElement(T,z)}(A,_,O)}I.displayName=m;var A=Tt.forwardRef(I);return A.attrs=w,A.componentStyle=E,A.displayName=m,A.shouldForwardProp=k,A.foldedComponentIds=i?Qr(l.foldedComponentIds,l.styledComponentId):"",A.styledComponentId=v,A.target=i?l.target:e,Object.defineProperty(A,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(_){this._foldedDefaultProps=i?function(O){for(var P=[],V=1;V<arguments.length;V++)P[V-1]=arguments[V];for(var K=0,re=P;K<re.length;K++)cd(O,re[K],!0);return O}({},l.defaultProps,_):_}}),Jd(A,function(){return".".concat(A.styledComponentId)}),a&&ty(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),A}function qm(e,t){for(var r=[e[0]],i=0,l=t.length;i<l;i+=1)r.push(t[i],e[i+1]);return r}var Gm=function(e){return Object.assign(e,{isCss:!0})};function wt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(ro(e)||al(e))return Gm(Rr(qm(Ea,qo([e],t,!0))));var i=e;return t.length===0&&i.length===1&&typeof i[0]=="string"?Rr(i):Gm(Rr(qm(i,t)))}function pd(e,t,r){if(r===void 0&&(r=Qo),!t)throw $r(1,t);var i=function(l){for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];return e(t,r,wt.apply(void 0,qo([l],a,!1)))};return i.attrs=function(l){return pd(e,t,kt(kt({},r),{attrs:Array.prototype.concat(r.attrs,l).filter(Boolean)}))},i.withConfig=function(l){return pd(e,t,kt(kt({},r),l))},i}var uy=function(e){return pd(Wb,e)},C=uy;Kx.forEach(function(e){C[e]=uy(e)});var qb=function(){function e(t,r){this.rules=t,this.componentId=r,this.isStatic=ay(t),sa.registerId(this.componentId+1)}return e.prototype.createStyles=function(t,r,i,l){var a=l(ia(Rr(this.rules,r,i,l)),""),u=this.componentId+t;i.insertRules(u,u,a)},e.prototype.removeStyles=function(t,r){r.clearRules(this.componentId+t)},e.prototype.renderStyles=function(t,r,i,l){t>2&&sa.registerId(this.componentId+t),this.removeStyles(t,i),this.createStyles(t,r,i,l)},e}();function Gb(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=wt.apply(void 0,qo([e],t,!1)),l="sc-global-".concat(qd(JSON.stringify(i))),a=new qb(i,l),u=function(f){var p=fd(),x=Tt.useContext(Yo),m=Tt.useRef(p.styleSheet.allocateGSInstance(l)).current;return p.styleSheet.server&&c(m,f,p.styleSheet,x,p.stylis),Tt.useLayoutEffect(function(){if(!p.styleSheet.server)return c(m,f,p.styleSheet,x,p.stylis),function(){return a.removeStyles(m,p.styleSheet)}},[m,f,p.styleSheet,x,p.stylis]),null};function c(f,p,x,m,v){if(a.isStatic)a.renderStyles(f,pb,x,v);else{var w=kt(kt({},p),{theme:Jx(p,m,u.defaultProps)});a.renderStyles(f,w,x,v)}}return Tt.memo(u)}function ti(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=ia(wt.apply(void 0,qo([e],t,!1))),l=qd(i);return new iy(l,i)}const Jb="/assets/logo-BGHkG1-J.png",Kb="/assets/logo-dark-KAsU1C78.png",Jm={name:"light",colors:{background:"#ffffffaa",overlayBackground:"#ffffffdd",pageBackground:"#ffffff",backgroundSecondary:"#f6f8fa",text:"#333333",textSecondary:"#6a737d",primary:"#0056b3",primaryHover:"#004494",error:"#d32f2f",errorHover:"#b71c1c",warning:"#f57c00",info:"#0288d1",secondary:"#616161",secondaryHover:"#424242",border:"#e1e4e8",buttonBg:"#e0e0e0",buttonText:"#333333",buttonHoverBg:"#bdbdbd",inputBg:"#ffffff",inputBorder:"#bdbdbd",inputText:"#333333",codeBackground:"#f5f5f5",codeText:"#24292e",systemMessageBackground:"#e3f2fd",systemMessageText:"#0d47a1",systemMessageBorder:"#bbdefb",systemMessageTimestamp:"#1565c0",disabled:"#9e9e9e",userMessageBackground:"#e8f5e9",userMessageText:"#1b5e20",userMessageTimestamp:"#2e7d32",menuBackdrop:"rgba(0, 0, 0, 0.5)",menuBackground:"#ffffff",menuHover:"#f6f8fa",menuBorder:"#e1e4e8",menuShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",diffAddedText:"rgba(0, 128, 0, 0.7)",diffRemovedText:"rgba(255, 0, 0, 0.7)"},backgroundImage:Jb,zIndex:{modal:1e3,menuBackdrop:998,menu:999},transitions:{menuFade:"0.2s ease",menuSlide:"0.2s ease",menuHover:"0.2s ease"}},Km={name:"dark",colors:{background:"#00000055",overlayBackground:"#000000cc",pageBackground:"#1e1e1e",backgroundSecondary:"#2d333b",text:"#d4d4d4",textSecondary:"#8b949e",primary:"#58a6ff",primaryHover:"#79b8ff",secondary:"#8b949e",error:"#f44336",errorHover:"#d32f2f",secondaryHover:"#9aa3ad",warning:"#ffa726",info:"#29b6f6",border:"#30363d",buttonBg:"#21262d",buttonText:"#c9d1d9",buttonHoverBg:"#30363d",inputBg:"#0d1117",inputBorder:"#30363d",inputText:"#c9d1d9",codeBackground:"#161b22",codeText:"#c9d1d9",systemMessageBackground:"#1c2128",systemMessageText:"#8b949e",systemMessageBorder:"#30363d",systemMessageTimestamp:"#6e7681",disabled:"#41464b",userMessageBackground:"#1c4a7d",userMessageText:"#e6f3ff",userMessageTimestamp:"#a8c7f0",menuBackdrop:"rgba(0, 0, 0, 0.7)",menuBackground:"#1e1e1e",menuHover:"#2d333b",menuBorder:"#30363d",menuShadow:"0 4px 12px rgba(0, 0, 0, 0.3)",diffAddedText:"rgba(0, 255, 0, 0.7)",diffRemovedText:"rgba(255, 0, 0, 0.7)"},backgroundImage:Kb,zIndex:{modal:1e3,menuBackdrop:998,menu:999},transitions:{menuFade:"0.2s ease",menuSlide:"0.2s ease",menuHover:"0.2s ease"}},Qb=({usage:e})=>{const[t,r]=R.useState("total"),i=m=>{r(m.target.value)},l=e.usageMetrics[t],a=e.usageMetrics[t].cost||0,u=Wi(a.toFixed(2)),c=Wi(l.rpm),f=Wi(l.rpd),p=Wi(Qm(l.tpm)),x=Wi(Qm(l.tpd));return h.jsx(Xb,{children:h.jsxs(Zb,{children:[h.jsx(eS,{onChange:i,value:t,children:Object.keys(e.usageMetrics).map(m=>h.jsx("option",{value:m,children:m},m))}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"Cost:"}),h.jsxs(Ji,{children:["$",u]},u)]}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"RPM:"}),h.jsx(Ji,{children:c},c)]}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"RPD:"}),h.jsx(Ji,{children:f},f)]}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"TPM:"}),h.jsx(Ji,{children:p},p)]}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"TPD:"}),h.jsx(Ji,{children:x},x)]})]})})},Qm=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(0)+"K":e.toString(),Wi=e=>{const[t,r]=R.useState(e),i=R.useRef(e);return R.useEffect(()=>{e!==i.current&&(r(e),i.current=e)},[e]),t},Yb=ti`
|
|
42
|
-
0% {
|
|
43
|
-
transform: scale(1);
|
|
44
|
-
opacity: 1;
|
|
45
|
-
}
|
|
46
|
-
50% {
|
|
47
|
-
transform: scale(1.2);
|
|
48
|
-
opacity: 0.7;
|
|
49
|
-
}
|
|
50
|
-
100% {
|
|
51
|
-
transform: scale(1);
|
|
52
|
-
opacity: 1;
|
|
53
|
-
}
|
|
54
|
-
`,Xb=C.div`
|
|
55
|
-
background-color: ${({theme:e})=>e.colors.background};
|
|
56
|
-
border-radius: 4px;
|
|
57
|
-
padding: 4px 4px;
|
|
58
|
-
box-shadow:
|
|
59
|
-
0 1px 3px rgba(0, 0, 0, 0.12),
|
|
60
|
-
0 1px 2px rgba(0, 0, 0, 0.24);
|
|
61
|
-
`,Zb=C.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-wrap: wrap;
|
|
64
|
-
gap: 8px;
|
|
65
|
-
align-items: center;
|
|
66
|
-
`,eS=C.select`
|
|
67
|
-
padding: 2px 4px;
|
|
68
|
-
border-radius: 4px;
|
|
69
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
70
|
-
background-color: ${({theme:e})=>e.colors.background};
|
|
71
|
-
color: ${({theme:e})=>e.colors.text};
|
|
72
|
-
font-size: 0.9em;
|
|
73
|
-
`,qi=C.div`
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-direction: column;
|
|
76
|
-
align-items: center;
|
|
77
|
-
margin-left: 8px;
|
|
78
|
-
`,Gi=C.span`
|
|
79
|
-
font-size: 0.8em;
|
|
80
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
81
|
-
`,Ji=C.span`
|
|
82
|
-
font-size: 0.9em;
|
|
83
|
-
font-weight: bold;
|
|
84
|
-
color: ${({theme:e})=>e.colors.text};
|
|
85
|
-
animation: ${Yb} 0.5s ease-in-out;
|
|
86
|
-
`;function cy(e,t){return function(){return e.apply(t,arguments)}}const{toString:tS}=Object.prototype,{getPrototypeOf:Kd}=Object,{iterator:ja,toStringTag:dy}=Symbol,Ta=(e=>t=>{const r=tS.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),An=e=>(e=e.toLowerCase(),t=>Ta(t)===e),Ra=e=>t=>typeof t===e,{isArray:ni}=Array,Xo=Ra("undefined");function pl(e){return e!==null&&!Xo(e)&&e.constructor!==null&&!Xo(e.constructor)&&Kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fy=An("ArrayBuffer");function nS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fy(e.buffer),t}const rS=Ra("string"),Kt=Ra("function"),py=Ra("number"),hl=e=>e!==null&&typeof e=="object",oS=e=>e===!0||e===!1,Qs=e=>{if(Ta(e)!=="object")return!1;const t=Kd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dy in e)&&!(ja in e)},iS=e=>{if(!hl(e)||pl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},lS=An("Date"),sS=An("File"),aS=An("Blob"),uS=An("FileList"),cS=e=>hl(e)&&Kt(e.pipe),dS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Kt(e.append)&&((t=Ta(e))==="formdata"||t==="object"&&Kt(e.toString)&&e.toString()==="[object FormData]"))},fS=An("URLSearchParams"),[pS,hS,mS,gS]=["ReadableStream","Request","Response","Headers"].map(An),xS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ml(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,l;if(typeof e!="object"&&(e=[e]),ni(e))for(i=0,l=e.length;i<l;i++)t.call(null,e[i],i,e);else{if(pl(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(i=0;i<u;i++)c=a[i],t.call(null,e[c],c,e)}}function hy(e,t){if(pl(e))return null;t=t.toLowerCase();const r=Object.keys(e);let i=r.length,l;for(;i-- >0;)if(l=r[i],t===l.toLowerCase())return l;return null}const Yr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,my=e=>!Xo(e)&&e!==Yr;function hd(){const{caseless:e,skipUndefined:t}=my(this)&&this||{},r={},i=(l,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&hy(r,a)||a;Qs(r[u])&&Qs(l)?r[u]=hd(r[u],l):Qs(l)?r[u]=hd({},l):ni(l)?r[u]=l.slice():(!t||!Xo(l))&&(r[u]=l)};for(let l=0,a=arguments.length;l<a;l++)arguments[l]&&ml(arguments[l],i);return r}const yS=(e,t,r,{allOwnKeys:i}={})=>(ml(t,(l,a)=>{r&&Kt(l)?Object.defineProperty(e,a,{value:cy(l,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),vS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wS=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},kS=(e,t,r,i)=>{let l,a,u;const c={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),a=l.length;a-- >0;)u=l[a],(!i||i(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=r!==!1&&Kd(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},bS=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r},SS=e=>{if(!e)return null;if(ni(e))return e;let t=e.length;if(!py(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},CS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kd(Uint8Array)),ES=(e,t)=>{const i=(e&&e[ja]).call(e);let l;for(;(l=i.next())&&!l.done;){const a=l.value;t.call(e,a[0],a[1])}},jS=(e,t)=>{let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},TS=An("HTMLFormElement"),RS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,l){return i.toUpperCase()+l}),Ym=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),$S=An("RegExp"),gy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};ml(r,(l,a)=>{let u;(u=t(l,a,e))!==!1&&(i[a]=u||l)}),Object.defineProperties(e,i)},IS=e=>{gy(e,(t,r)=>{if(Kt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(Kt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},NS=(e,t)=>{const r={},i=l=>{l.forEach(a=>{r[a]=!0})};return ni(e)?i(e):i(String(e).split(t)),r},PS=()=>{},AS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function LS(e){return!!(e&&Kt(e.append)&&e[dy]==="FormData"&&e[ja])}const zS=e=>{const t=new Array(10),r=(i,l)=>{if(hl(i)){if(t.indexOf(i)>=0)return;if(pl(i))return i;if(!("toJSON"in i)){t[l]=i;const a=ni(i)?[]:{};return ml(i,(u,c)=>{const f=r(u,l+1);!Xo(f)&&(a[c]=f)}),t[l]=void 0,a}}return i};return r(e,0)},_S=An("AsyncFunction"),FS=e=>e&&(hl(e)||Kt(e))&&Kt(e.then)&&Kt(e.catch),xy=((e,t)=>e?setImmediate:t?((r,i)=>(Yr.addEventListener("message",({source:l,data:a})=>{l===Yr&&a===r&&i.length&&i.shift()()},!1),l=>{i.push(l),Yr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Kt(Yr.postMessage)),OS=typeof queueMicrotask<"u"?queueMicrotask.bind(Yr):typeof process<"u"&&process.nextTick||xy,DS=e=>e!=null&&Kt(e[ja]),H={isArray:ni,isArrayBuffer:fy,isBuffer:pl,isFormData:dS,isArrayBufferView:nS,isString:rS,isNumber:py,isBoolean:oS,isObject:hl,isPlainObject:Qs,isEmptyObject:iS,isReadableStream:pS,isRequest:hS,isResponse:mS,isHeaders:gS,isUndefined:Xo,isDate:lS,isFile:sS,isBlob:aS,isRegExp:$S,isFunction:Kt,isStream:cS,isURLSearchParams:fS,isTypedArray:CS,isFileList:uS,forEach:ml,merge:hd,extend:yS,trim:xS,stripBOM:vS,inherits:wS,toFlatObject:kS,kindOf:Ta,kindOfTest:An,endsWith:bS,toArray:SS,forEachEntry:ES,matchAll:jS,isHTMLForm:TS,hasOwnProperty:Ym,hasOwnProp:Ym,reduceDescriptors:gy,freezeMethods:IS,toObjectSet:NS,toCamelCase:RS,noop:PS,toFiniteNumber:AS,findKey:hy,global:Yr,isContextDefined:my,isSpecCompliantForm:LS,toJSONObject:zS,isAsyncFn:_S,isThenable:FS,setImmediate:xy,asap:OS,isIterable:DS};let Te=class yy extends Error{static from(t,r,i,l,a,u){const c=new yy(t.message,r||t.code,i,l,a);return c.cause=t,c.name=t.name,u&&Object.assign(c,u),c}constructor(t,r,i,l,a){super(t),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),i&&(this.config=i),l&&(this.request=l),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}};Te.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Te.ERR_BAD_OPTION="ERR_BAD_OPTION";Te.ECONNABORTED="ECONNABORTED";Te.ETIMEDOUT="ETIMEDOUT";Te.ERR_NETWORK="ERR_NETWORK";Te.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Te.ERR_DEPRECATED="ERR_DEPRECATED";Te.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Te.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Te.ERR_CANCELED="ERR_CANCELED";Te.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Te.ERR_INVALID_URL="ERR_INVALID_URL";const MS=null;function md(e){return H.isPlainObject(e)||H.isArray(e)}function vy(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function Xm(e,t,r){return e?e.concat(t).map(function(l,a){return l=vy(l),!r&&a?"["+l+"]":l}).join(r?".":""):t}function BS(e){return H.isArray(e)&&!e.some(md)}const US=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function $a(e,t,r){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=H.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,j){return!H.isUndefined(j[S])});const i=r.metaTokens,l=r.visitor||x,a=r.dots,u=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(l))throw new TypeError("visitor must be a function");function p(k){if(k===null)return"";if(H.isDate(k))return k.toISOString();if(H.isBoolean(k))return k.toString();if(!f&&H.isBlob(k))throw new Te("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(k)||H.isTypedArray(k)?f&&typeof Blob=="function"?new Blob([k]):Buffer.from(k):k}function x(k,S,j){let E=k;if(k&&!j&&typeof k=="object"){if(H.endsWith(S,"{}"))S=i?S:S.slice(0,-2),k=JSON.stringify(k);else if(H.isArray(k)&&BS(k)||(H.isFileList(k)||H.endsWith(S,"[]"))&&(E=H.toArray(k)))return S=vy(S),E.forEach(function(A,_){!(H.isUndefined(A)||A===null)&&t.append(u===!0?Xm([S],_,a):u===null?S:S+"[]",p(A))}),!1}return md(k)?!0:(t.append(Xm(j,S,a),p(k)),!1)}const m=[],v=Object.assign(US,{defaultVisitor:x,convertValue:p,isVisitable:md});function w(k,S){if(!H.isUndefined(k)){if(m.indexOf(k)!==-1)throw Error("Circular reference detected in "+S.join("."));m.push(k),H.forEach(k,function(E,I){(!(H.isUndefined(E)||E===null)&&l.call(t,E,H.isString(I)?I.trim():I,S,v))===!0&&w(E,S?S.concat(I):[I])}),m.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Zm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Qd(e,t){this._pairs=[],e&&$a(e,this,t)}const wy=Qd.prototype;wy.append=function(t,r){this._pairs.push([t,r])};wy.toString=function(t){const r=t?function(i){return t.call(this,i,Zm)}:Zm;return this._pairs.map(function(l){return r(l[0])+"="+r(l[1])},"").join("&")};function VS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ky(e,t,r){if(!t)return e;const i=r&&r.encode||VS,l=H.isFunction(r)?{serialize:r}:r,a=l&&l.serialize;let u;if(a?u=a(t,l):u=H.isURLSearchParams(t)?t.toString():new Qd(t,l).toString(i),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class eg{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Yd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},HS=typeof URLSearchParams<"u"?URLSearchParams:Qd,WS=typeof FormData<"u"?FormData:null,qS=typeof Blob<"u"?Blob:null,GS={isBrowser:!0,classes:{URLSearchParams:HS,FormData:WS,Blob:qS},protocols:["http","https","file","blob","url","data"]},Xd=typeof window<"u"&&typeof document<"u",gd=typeof navigator=="object"&&navigator||void 0,JS=Xd&&(!gd||["ReactNative","NativeScript","NS"].indexOf(gd.product)<0),KS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",QS=Xd&&window.location.href||"http://localhost",YS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xd,hasStandardBrowserEnv:JS,hasStandardBrowserWebWorkerEnv:KS,navigator:gd,origin:QS},Symbol.toStringTag,{value:"Module"})),Lt={...YS,...GS};function XS(e,t){return $a(e,new Lt.classes.URLSearchParams,{visitor:function(r,i,l,a){return Lt.isNode&&H.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function ZS(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function eC(e){const t={},r=Object.keys(e);let i;const l=r.length;let a;for(i=0;i<l;i++)a=r[i],t[a]=e[a];return t}function by(e){function t(r,i,l,a){let u=r[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),f=a>=r.length;return u=!u&&H.isArray(l)?l.length:u,f?(H.hasOwnProp(l,u)?l[u]=[l[u],i]:l[u]=i,!c):((!l[u]||!H.isObject(l[u]))&&(l[u]=[]),t(r,i,l[u],a)&&H.isArray(l[u])&&(l[u]=eC(l[u])),!c)}if(H.isFormData(e)&&H.isFunction(e.entries)){const r={};return H.forEachEntry(e,(i,l)=>{t(ZS(i),l,r,0)}),r}return null}function tC(e,t,r){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const gl={transitional:Yd,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const i=r.getContentType()||"",l=i.indexOf("application/json")>-1,a=H.isObject(t);if(a&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return l?JSON.stringify(by(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return XS(t,this.formSerializer).toString();if((c=H.isFileList(t))||i.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return $a(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||l?(r.setContentType("application/json",!1),tC(t)):t}],transformResponse:[function(t){const r=this.transitional||gl.transitional,i=r&&r.forcedJSONParsing,l=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(i&&!this.responseType||l)){const u=!(r&&r.silentJSONParsing)&&l;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?Te.from(c,Te.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{gl.headers[e]={}});const nC=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),rC=e=>{const t={};let r,i,l;return e&&e.split(`
|
|
87
|
-
`).forEach(function(u){l=u.indexOf(":"),r=u.substring(0,l).trim().toLowerCase(),i=u.substring(l+1).trim(),!(!r||t[r]&&nC[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},tg=Symbol("internals");function Ki(e){return e&&String(e).trim().toLowerCase()}function Ys(e){return e===!1||e==null?e:H.isArray(e)?e.map(Ys):String(e)}function oC(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const iC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Lc(e,t,r,i,l){if(H.isFunction(i))return i.call(this,t,r);if(l&&(t=r),!!H.isString(t)){if(H.isString(i))return t.indexOf(i)!==-1;if(H.isRegExp(i))return i.test(t)}}function lC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function sC(e,t){const r=H.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(l,a,u){return this[i].call(this,t,l,a,u)},configurable:!0})})}let Qt=class{constructor(t){t&&this.set(t)}set(t,r,i){const l=this;function a(c,f,p){const x=Ki(f);if(!x)throw new Error("header name must be a non-empty string");const m=H.findKey(l,x);(!m||l[m]===void 0||p===!0||p===void 0&&l[m]!==!1)&&(l[m||f]=Ys(c))}const u=(c,f)=>H.forEach(c,(p,x)=>a(p,x,f));if(H.isPlainObject(t)||t instanceof this.constructor)u(t,r);else if(H.isString(t)&&(t=t.trim())&&!iC(t))u(rC(t),r);else if(H.isObject(t)&&H.isIterable(t)){let c={},f,p;for(const x of t){if(!H.isArray(x))throw TypeError("Object iterator must return a key-value pair");c[p=x[0]]=(f=c[p])?H.isArray(f)?[...f,x[1]]:[f,x[1]]:x[1]}u(c,r)}else t!=null&&a(r,t,i);return this}get(t,r){if(t=Ki(t),t){const i=H.findKey(this,t);if(i){const l=this[i];if(!r)return l;if(r===!0)return oC(l);if(H.isFunction(r))return r.call(this,l,i);if(H.isRegExp(r))return r.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Ki(t),t){const i=H.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||Lc(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let l=!1;function a(u){if(u=Ki(u),u){const c=H.findKey(i,u);c&&(!r||Lc(i,i[c],c,r))&&(delete i[c],l=!0)}}return H.isArray(t)?t.forEach(a):a(t),l}clear(t){const r=Object.keys(this);let i=r.length,l=!1;for(;i--;){const a=r[i];(!t||Lc(this,this[a],a,t,!0))&&(delete this[a],l=!0)}return l}normalize(t){const r=this,i={};return H.forEach(this,(l,a)=>{const u=H.findKey(i,a);if(u){r[u]=Ys(l),delete r[a];return}const c=t?lC(a):String(a).trim();c!==a&&delete r[a],r[c]=Ys(l),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return H.forEach(this,(i,l)=>{i!=null&&i!==!1&&(r[l]=t&&H.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
88
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(l=>i.set(l)),i}static accessor(t){const i=(this[tg]=this[tg]={accessors:{}}).accessors,l=this.prototype;function a(u){const c=Ki(u);i[c]||(sC(l,u),i[c]=!0)}return H.isArray(t)?t.forEach(a):a(t),this}};Qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Qt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});H.freezeMethods(Qt);function zc(e,t){const r=this||gl,i=t||r,l=Qt.from(i.headers);let a=i.data;return H.forEach(e,function(c){a=c.call(r,a,l.normalize(),t?t.status:void 0)}),l.normalize(),a}function Sy(e){return!!(e&&e.__CANCEL__)}let xl=class extends Te{constructor(t,r,i){super(t??"canceled",Te.ERR_CANCELED,r,i),this.name="CanceledError",this.__CANCEL__=!0}};function Cy(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Te("Request failed with status code "+r.status,[Te.ERR_BAD_REQUEST,Te.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function aC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function uC(e,t){e=e||10;const r=new Array(e),i=new Array(e);let l=0,a=0,u;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),x=i[a];u||(u=p),r[l]=f,i[l]=p;let m=a,v=0;for(;m!==l;)v+=r[m++],m=m%e;if(l=(l+1)%e,l===a&&(a=(a+1)%e),p-u<t)return;const w=x&&p-x;return w?Math.round(v*1e3/w):void 0}}function cC(e,t){let r=0,i=1e3/t,l,a;const u=(p,x=Date.now())=>{r=x,l=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const x=Date.now(),m=x-r;m>=i?u(p,x):(l=p,a||(a=setTimeout(()=>{a=null,u(l)},i-m)))},()=>l&&u(l)]}const aa=(e,t,r=3)=>{let i=0;const l=uC(50,250);return cC(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,f=u-i,p=l(f),x=u<=c;i=u;const m={loaded:u,total:c,progress:c?u/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c&&x?(c-u)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},r)},ng=(e,t)=>{const r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},rg=e=>(...t)=>H.asap(()=>e(...t)),dC=Lt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Lt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,fC=Lt.hasStandardBrowserEnv?{write(e,t,r,i,l,a,u){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];H.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),H.isString(i)&&c.push(`path=${i}`),H.isString(l)&&c.push(`domain=${l}`),a===!0&&c.push("secure"),H.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ey(e,t,r){let i=!pC(t);return e&&(i||r==!1)?hC(e,t):t}const og=e=>e instanceof Qt?{...e}:e;function oo(e,t){t=t||{};const r={};function i(p,x,m,v){return H.isPlainObject(p)&&H.isPlainObject(x)?H.merge.call({caseless:v},p,x):H.isPlainObject(x)?H.merge({},x):H.isArray(x)?x.slice():x}function l(p,x,m,v){if(H.isUndefined(x)){if(!H.isUndefined(p))return i(void 0,p,m,v)}else return i(p,x,m,v)}function a(p,x){if(!H.isUndefined(x))return i(void 0,x)}function u(p,x){if(H.isUndefined(x)){if(!H.isUndefined(p))return i(void 0,p)}else return i(void 0,x)}function c(p,x,m){if(m in t)return i(p,x);if(m in e)return i(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(p,x,m)=>l(og(p),og(x),m,!0)};return H.forEach(Object.keys({...e,...t}),function(x){if(x==="__proto__"||x==="constructor"||x==="prototype")return;const m=H.hasOwnProp(f,x)?f[x]:l,v=m(e[x],t[x],x);H.isUndefined(v)&&m!==c||(r[x]=v)}),r}const jy=e=>{const t=oo({},e);let{data:r,withXSRFToken:i,xsrfHeaderName:l,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=Qt.from(u),t.url=ky(Ey(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),H.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(H.isFunction(r.getHeaders)){const f=r.getHeaders(),p=["content-type","content-length"];Object.entries(f).forEach(([x,m])=>{p.includes(x.toLowerCase())&&u.set(x,m)})}}if(Lt.hasStandardBrowserEnv&&(i&&H.isFunction(i)&&(i=i(t)),i||i!==!1&&dC(t.url))){const f=l&&a&&fC.read(a);f&&u.set(l,f)}return t},mC=typeof XMLHttpRequest<"u",gC=mC&&function(e){return new Promise(function(r,i){const l=jy(e);let a=l.data;const u=Qt.from(l.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:p}=l,x,m,v,w,k;function S(){w&&w(),k&&k(),l.cancelToken&&l.cancelToken.unsubscribe(x),l.signal&&l.signal.removeEventListener("abort",x)}let j=new XMLHttpRequest;j.open(l.method.toUpperCase(),l.url,!0),j.timeout=l.timeout;function E(){if(!j)return;const A=Qt.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),O={data:!c||c==="text"||c==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:A,config:e,request:j};Cy(function(V){r(V),S()},function(V){i(V),S()},O),j=null}"onloadend"in j?j.onloadend=E:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(E)},j.onabort=function(){j&&(i(new Te("Request aborted",Te.ECONNABORTED,e,j)),j=null)},j.onerror=function(_){const O=_&&_.message?_.message:"Network Error",P=new Te(O,Te.ERR_NETWORK,e,j);P.event=_||null,i(P),j=null},j.ontimeout=function(){let _=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const O=l.transitional||Yd;l.timeoutErrorMessage&&(_=l.timeoutErrorMessage),i(new Te(_,O.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,j)),j=null},a===void 0&&u.setContentType(null),"setRequestHeader"in j&&H.forEach(u.toJSON(),function(_,O){j.setRequestHeader(O,_)}),H.isUndefined(l.withCredentials)||(j.withCredentials=!!l.withCredentials),c&&c!=="json"&&(j.responseType=l.responseType),p&&([v,k]=aa(p,!0),j.addEventListener("progress",v)),f&&j.upload&&([m,w]=aa(f),j.upload.addEventListener("progress",m),j.upload.addEventListener("loadend",w)),(l.cancelToken||l.signal)&&(x=A=>{j&&(i(!A||A.type?new xl(null,e,j):A),j.abort(),j=null)},l.cancelToken&&l.cancelToken.subscribe(x),l.signal&&(l.signal.aborted?x():l.signal.addEventListener("abort",x)));const I=aC(l.url);if(I&&Lt.protocols.indexOf(I)===-1){i(new Te("Unsupported protocol "+I+":",Te.ERR_BAD_REQUEST,e));return}j.send(a||null)})},xC=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let i=new AbortController,l;const a=function(p){if(!l){l=!0,c();const x=p instanceof Error?p:this.reason;i.abort(x instanceof Te?x:new xl(x instanceof Error?x.message:x))}};let u=t&&setTimeout(()=>{u=null,a(new Te(`timeout of ${t}ms exceeded`,Te.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),e=null)};e.forEach(p=>p.addEventListener("abort",a));const{signal:f}=i;return f.unsubscribe=()=>H.asap(c),f}},yC=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let i=0,l;for(;i<r;)l=i+t,yield e.slice(i,l),i=l},vC=async function*(e,t){for await(const r of wC(e))yield*yC(r,t)},wC=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:i}=await t.read();if(r)break;yield i}}finally{await t.cancel()}},ig=(e,t,r,i)=>{const l=vC(e,t);let a=0,u,c=f=>{u||(u=!0,i&&i(f))};return new ReadableStream({async pull(f){try{const{done:p,value:x}=await l.next();if(p){c(),f.close();return}let m=x.byteLength;if(r){let v=a+=m;r(v)}f.enqueue(new Uint8Array(x))}catch(p){throw c(p),p}},cancel(f){return c(f),l.return()}},{highWaterMark:2})},lg=64*1024,{isFunction:Ls}=H,kC=(({Request:e,Response:t})=>({Request:e,Response:t}))(H.global),{ReadableStream:sg,TextEncoder:ag}=H.global,ug=(e,...t)=>{try{return!!e(...t)}catch{return!1}},bC=e=>{e=H.merge.call({skipUndefined:!0},kC,e);const{fetch:t,Request:r,Response:i}=e,l=t?Ls(t):typeof fetch=="function",a=Ls(r),u=Ls(i);if(!l)return!1;const c=l&&Ls(sg),f=l&&(typeof ag=="function"?(k=>S=>k.encode(S))(new ag):async k=>new Uint8Array(await new r(k).arrayBuffer())),p=a&&c&&ug(()=>{let k=!1;const S=new r(Lt.origin,{body:new sg,method:"POST",get duplex(){return k=!0,"half"}}).headers.has("Content-Type");return k&&!S}),x=u&&c&&ug(()=>H.isReadableStream(new i("").body)),m={stream:x&&(k=>k.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!m[k]&&(m[k]=(S,j)=>{let E=S&&S[k];if(E)return E.call(S);throw new Te(`Response type '${k}' is not supported`,Te.ERR_NOT_SUPPORT,j)})});const v=async k=>{if(k==null)return 0;if(H.isBlob(k))return k.size;if(H.isSpecCompliantForm(k))return(await new r(Lt.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(H.isArrayBufferView(k)||H.isArrayBuffer(k))return k.byteLength;if(H.isURLSearchParams(k)&&(k=k+""),H.isString(k))return(await f(k)).byteLength},w=async(k,S)=>{const j=H.toFiniteNumber(k.getContentLength());return j??v(S)};return async k=>{let{url:S,method:j,data:E,signal:I,cancelToken:A,timeout:_,onDownloadProgress:O,onUploadProgress:P,responseType:V,headers:K,withCredentials:re="same-origin",fetchOptions:D}=jy(k),te=t||fetch;V=V?(V+"").toLowerCase():"text";let se=xC([I,A&&A.toAbortSignal()],_),ee=null;const X=se&&se.unsubscribe&&(()=>{se.unsubscribe()});let W;try{if(P&&p&&j!=="get"&&j!=="head"&&(W=await w(K,E))!==0){let z=new r(S,{method:"POST",body:E,duplex:"half"}),q;if(H.isFormData(E)&&(q=z.headers.get("content-type"))&&K.setContentType(q),z.body){const[$,ue]=ng(W,aa(rg(P)));E=ig(z.body,lg,$,ue)}}H.isString(re)||(re=re?"include":"omit");const ce=a&&"credentials"in r.prototype,de={...D,signal:se,method:j.toUpperCase(),headers:K.normalize().toJSON(),body:E,duplex:"half",credentials:ce?re:void 0};ee=a&&new r(S,de);let Q=await(a?te(ee,D):te(S,de));const fe=x&&(V==="stream"||V==="response");if(x&&(O||fe&&X)){const z={};["status","statusText","headers"].forEach(ge=>{z[ge]=Q[ge]});const q=H.toFiniteNumber(Q.headers.get("content-length")),[$,ue]=O&&ng(q,aa(rg(O),!0))||[];Q=new i(ig(Q.body,lg,$,()=>{ue&&ue(),X&&X()}),z)}V=V||"text";let T=await m[H.findKey(m,V)||"text"](Q,k);return!fe&&X&&X(),await new Promise((z,q)=>{Cy(z,q,{data:T,headers:Qt.from(Q.headers),status:Q.status,statusText:Q.statusText,config:k,request:ee})})}catch(ce){throw X&&X(),ce&&ce.name==="TypeError"&&/Load failed|fetch/i.test(ce.message)?Object.assign(new Te("Network Error",Te.ERR_NETWORK,k,ee,ce&&ce.response),{cause:ce.cause||ce}):Te.from(ce,ce&&ce.code,k,ee,ce&&ce.response)}}},SC=new Map,Ty=e=>{let t=e&&e.env||{};const{fetch:r,Request:i,Response:l}=t,a=[i,l,r];let u=a.length,c=u,f,p,x=SC;for(;c--;)f=a[c],p=x.get(f),p===void 0&&x.set(f,p=c?new Map:bC(t)),x=p;return p};Ty();const Zd={http:MS,xhr:gC,fetch:{get:Ty}};H.forEach(Zd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cg=e=>`- ${e}`,CC=e=>H.isFunction(e)||e===null||e===!1;function EC(e,t){e=H.isArray(e)?e:[e];const{length:r}=e;let i,l;const a={};for(let u=0;u<r;u++){i=e[u];let c;if(l=i,!CC(i)&&(l=Zd[(c=String(i)).toLowerCase()],l===void 0))throw new Te(`Unknown adapter '${c}'`);if(l&&(H.isFunction(l)||(l=l.get(t))))break;a[c||"#"+u]=l}if(!l){const u=Object.entries(a).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let c=r?u.length>1?`since :
|
|
89
|
-
`+u.map(cg).join(`
|
|
90
|
-
`):" "+cg(u[0]):"as no adapter specified";throw new Te("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return l}const Ry={getAdapter:EC,adapters:Zd};function _c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xl(null,e)}function dg(e){return _c(e),e.headers=Qt.from(e.headers),e.data=zc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ry.getAdapter(e.adapter||gl.adapter,e)(e).then(function(i){return _c(e),i.data=zc.call(e,e.transformResponse,i),i.headers=Qt.from(i.headers),i},function(i){return Sy(i)||(_c(e),i&&i.response&&(i.response.data=zc.call(e,e.transformResponse,i.response),i.response.headers=Qt.from(i.response.headers))),Promise.reject(i)})}const $y="1.13.5",Ia={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ia[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const fg={};Ia.transitional=function(t,r,i){function l(a,u){return"[Axios v"+$y+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,c)=>{if(t===!1)throw new Te(l(u," has been removed"+(r?" in "+r:"")),Te.ERR_DEPRECATED);return r&&!fg[u]&&(fg[u]=!0,console.warn(l(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,c):!0}};Ia.spelling=function(t){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function jC(e,t,r){if(typeof e!="object")throw new Te("options must be an object",Te.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let l=i.length;for(;l-- >0;){const a=i[l],u=t[a];if(u){const c=e[a],f=c===void 0||u(c,a,e);if(f!==!0)throw new Te("option "+a+" must be "+f,Te.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Te("Unknown option "+a,Te.ERR_BAD_OPTION)}}const Xs={assertOptions:jC,validators:Ia},vn=Xs.validators;let Zr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new eg,response:new eg}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const a=l.stack?l.stack.replace(/^.+\n/,""):"";try{i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
91
|
-
`+a):i.stack=a}catch{}}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=oo(this.defaults,r);const{transitional:i,paramsSerializer:l,headers:a}=r;i!==void 0&&Xs.assertOptions(i,{silentJSONParsing:vn.transitional(vn.boolean),forcedJSONParsing:vn.transitional(vn.boolean),clarifyTimeoutError:vn.transitional(vn.boolean),legacyInterceptorReqResOrdering:vn.transitional(vn.boolean)},!1),l!=null&&(H.isFunction(l)?r.paramsSerializer={serialize:l}:Xs.assertOptions(l,{encode:vn.function,serialize:vn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Xs.assertOptions(r,{baseUrl:vn.spelling("baseURL"),withXsrfToken:vn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&H.merge(a.common,a[r.method]);a&&H.forEach(["delete","get","head","post","put","patch","common"],k=>{delete a[k]}),r.headers=Qt.concat(u,a);const c=[];let f=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(r)===!1)return;f=f&&S.synchronous;const j=r.transitional||Yd;j&&j.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const p=[];this.interceptors.response.forEach(function(S){p.push(S.fulfilled,S.rejected)});let x,m=0,v;if(!f){const k=[dg.bind(this),void 0];for(k.unshift(...c),k.push(...p),v=k.length,x=Promise.resolve(r);m<v;)x=x.then(k[m++],k[m++]);return x}v=c.length;let w=r;for(;m<v;){const k=c[m++],S=c[m++];try{w=k(w)}catch(j){S.call(this,j);break}}try{x=dg.call(this,w)}catch(k){return Promise.reject(k)}for(m=0,v=p.length;m<v;)x=x.then(p[m++],p[m++]);return x}getUri(t){t=oo(this.defaults,t);const r=Ey(t.baseURL,t.url,t.allowAbsoluteUrls);return ky(r,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){Zr.prototype[t]=function(r,i){return this.request(oo(i||{},{method:t,url:r,data:(i||{}).data}))}});H.forEach(["post","put","patch"],function(t){function r(i){return function(a,u,c){return this.request(oo(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Zr.prototype[t]=r(),Zr.prototype[t+"Form"]=r(!0)});let TC=class Iy{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const i=this;this.promise.then(l=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](l);i._listeners=null}),this.promise.then=l=>{let a;const u=new Promise(c=>{i.subscribe(c),a=c}).then(l);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,c){i.reason||(i.reason=new xl(a,u,c),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=i=>{t.abort(i)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Iy(function(l){t=l}),cancel:t}}};function RC(e){return function(r){return e.apply(null,r)}}function $C(e){return H.isObject(e)&&e.isAxiosError===!0}const xd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(xd).forEach(([e,t])=>{xd[t]=e});function Ny(e){const t=new Zr(e),r=cy(Zr.prototype.request,t);return H.extend(r,Zr.prototype,t,{allOwnKeys:!0}),H.extend(r,t,null,{allOwnKeys:!0}),r.create=function(l){return Ny(oo(e,l))},r}const nt=Ny(gl);nt.Axios=Zr;nt.CanceledError=xl;nt.CancelToken=TC;nt.isCancel=Sy;nt.VERSION=$y;nt.toFormData=$a;nt.AxiosError=Te;nt.Cancel=nt.CanceledError;nt.all=function(t){return Promise.all(t)};nt.spread=RC;nt.isAxiosError=$C;nt.mergeConfig=oo;nt.AxiosHeaders=Qt;nt.formToJSON=e=>by(H.isHTMLForm(e)?new FormData(e):e);nt.getAdapter=Ry.getAdapter;nt.HttpStatusCode=xd;nt.default=nt;const{Axios:lz,AxiosError:sz,CanceledError:az,isCancel:uz,CancelToken:cz,VERSION:dz,all:fz,Cancel:pz,isAxiosError:hz,spread:mz,toFormData:gz,AxiosHeaders:xz,HttpStatusCode:yz,formToJSON:vz,getAdapter:wz,mergeConfig:kz}=nt,IC="/api",Ve=nt.create({baseURL:IC,headers:{"Content-Type":"application/json"}}),NC=async()=>{try{const t=await(await fetch("/")).text();return new DOMParser().parseFromString(t,"text/html").body.getAttribute("data-security-token")}catch(e){return console.error("Error fetching security token:",e),null}};Ve.interceptors.request.use(e=>{var r;const t=(r=document.querySelector("body[data-security-token]"))==null?void 0:r.getAttribute("data-security-token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));Ve.interceptors.response.use(e=>e,async e=>{var r;const t=e.config;if(e.response&&e.response.status===401&&!t._retry){t._retry=!0;const i=await NC();if(i)return t.headers.Authorization=`Bearer ${i}`,(r=document.querySelector("body[data-security-token]"))==null||r.setAttribute("data-security-token",i),Ve(t)}return Promise.reject(e)});const ef=async(e,t,r)=>{try{if(!e||t===void 0&&r===void 0)throw new Error("Invalid message ID, content or data");if((await Ve.post("/edit-message",{messageId:e,newContent:t,newData:r})).status!==200)throw new Error("Failed to edit message")}catch(i){throw nt.isAxiosError(i)?i.response?new Error(i.response.data.error||"Failed to edit message"):i.request?new Error("No response received from server"):new Error(`Error setting up request: ${i.message}`):i instanceof Error?i:new Error("An unexpected error occurred while editing the message")}},pg=async()=>(await Ve.get("/content")).data.content,PC=async(e,t,r)=>{const i=new FormData;i.append("prompt",e),i.append("options",JSON.stringify(t)),r&&r.length>0&&r.forEach(l=>{i.append("images",l)});try{await Ve.post("/execute-codegen",i,{headers:{"Content-Type":"multipart/form-data"}})}catch(l){throw nt.isAxiosError(l)?l.response?new Error(`Server error: ${l.response.data.message||"Unknown error"}`):l.request?new Error("No response received from server"):new Error(`Error setting up request: ${l.message}`):new Error("An unexpected error occurred")}},Py=async(e,t,r,i)=>{try{if(!e||typeof e!="string")throw new Error("Prompt must be a string");if(typeof t!="number"||t<0||t>2)throw new Error("Temperature must be a number between 0 and 2");if(!["default","cheap","lite"].includes(r))throw new Error("Model type must be one of: default, cheap, lite");return(await Ve.post("/generate-content",{prompt:e,temperature:t,modelType:r,options:i})).data.result}catch(l){if(nt.isAxiosError(l))if(l.response){const a=l.response.data.error||"Unknown server error";throw new Error(`Content generation failed: ${a}`)}else throw l.request?new Error("No response received from server during content generation"):new Error(`Request setup failed: ${l.message}`);throw l instanceof Error?l:new Error("An unexpected error occurred during content generation")}},yd=async()=>(await Ve.get("/execution-status")).data.status,AC=async()=>{await Ve.post("/interrupt-execution")},Ay=async()=>await Ve.post("/interrupt-execution",{scope:"container-command"}),LC=async()=>{await Ve.post("/pause-execution")},zC=async()=>{await Ve.post("/resume-execution")},vd=async()=>(await Ve.get("/current-question")).data.question,_C=async(e,t,r,i,l,a,u)=>{const c=new FormData;c.append("questionId",e),c.append("answer",t),r!==void 0&&c.append("confirmed",String(r)),i&&c.append("options",JSON.stringify(i)),l&&l.length>0&&l.forEach(f=>{c.append("images",f)}),a&&c.append("selectedActionType",a),u&&c.append("structuredResponse",JSON.stringify(u)),await Ve.post("/answer-question",c,{headers:{"Content-Type":"multipart/form-data"}})},hg=async()=>(await Ve.get("/usage")).data,FC=async()=>(await Ve.get("/default-codegen-options")).data.options,OC=async()=>(await Ve.get("/rcconfig")).data.rcConfig,DC=async(e,t)=>{await Ve.post(`/app-context/${e}`,{value:t})},MC=async e=>{await Ve.delete(`/delete-iteration/${e}`)},tf=async()=>(await Ve.get("/available-ai-services")).data.services,BC=async()=>(await Ve.get("/action-type-options")).data.options,Ly=async()=>{try{return(await Ve.get("/service-configurations")).data.configurations}catch{throw new Error("Failed to fetch service configurations")}},UC=async e=>{await Ve.post("/service-configuration",e)},VC=async()=>(await Ve.get("/context-files")).data.files,HC=async e=>(await Ve.post("/context-files/remove",{filePaths:e})).data,WC=async()=>(await Ve.get("/all-project-files")).data.files,qC=async e=>(await Ve.post("/context-files/add",{filePaths:e})).data,GC=async()=>(await Ve.post("/context-optimization")).data,JC=async()=>(await Ve.get("/context-preview")).data,KC=async()=>(await Ve.post("/compress-context")).data;Ve.interceptors.response.use(e=>e,e=>(console.error("API request failed:",e),e.response?(console.error("Error data:",e.response.data),console.error("Error status:",e.response.status),console.error("Error headers:",e.response.headers)):e.request?console.error("No response received:",e.request):console.error("Error message:",e.message),Promise.reject(e)));function yl(e,t){const r=new CustomEvent(e,{bubbles:!0,detail:t});document.dispatchEvent(r)}function vl(e,t){R.useEffect(()=>{const r=i=>{t(i.detail)};return document.addEventListener(e,r,!1),()=>{document.removeEventListener(e,r,!1)}},[e,t])}function QC(e,t){if(!(t!=null&&t.modelOverrides))return e;const r=[];return t.modelOverrides.default&&r.push(t.modelOverrides.default),t.modelOverrides.cheap&&r.push(t.modelOverrides.cheap),r.length>0?`${e} (${r.join("/")})`:e}function zy(){const[e,t]=R.useState([]),[r,i]=R.useState(null);return R.useEffect(()=>{(async()=>{try{const a=await tf();t(a)}catch(a){console.error("Error fetching AI services:",a),i("Failed to fetch available AI services.")}})()},[]),[e,r]}function _y(){const[e,t]=R.useState({services:[],isLoading:!0,error:null});return R.useEffect(()=>{(async()=>{try{const[i,l]=await Promise.all([tf(),Ly()]),a=i.map(u=>({service:u,config:l[u],displayName:QC(u,l[u])}));t({services:a,isLoading:!1,error:null})}catch(i){console.error("Error fetching services with configurations:",i),t(l=>({...l,isLoading:!1,error:"Failed to fetch service configurations."}))}})()},[]),e}const rr=C.button`
|
|
92
|
-
background-color: transparent;
|
|
93
|
-
color: ${({theme:e})=>e.colors.text};
|
|
94
|
-
border: none;
|
|
95
|
-
border-radius: 50%;
|
|
96
|
-
width: 40px;
|
|
97
|
-
height: 40px;
|
|
98
|
-
font-size: 20px;
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
transition: background-color 0.3s;
|
|
104
|
-
|
|
105
|
-
&:hover {
|
|
106
|
-
background-color: ${({theme:e})=>e.colors.buttonHoverBg};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:focus {
|
|
110
|
-
outline: none;
|
|
111
|
-
box-shadow: 0 0 0 2px ${({theme:e})=>e.colors.primary};
|
|
112
|
-
}
|
|
113
|
-
`;function Fy(){yl("openContentGenerationModel")}function YC(){return h.jsx(rr,{onClick:Fy,"aria-label":"Content generation modal",children:"✨"})}const XC=({currentService:e})=>{const[t,r]=R.useState(""),[i,l]=R.useState(e),[a,u]=R.useState(.7),[c,f]=R.useState("default"),[p,x]=R.useState(),[m,v]=R.useState(!1),[w,k]=R.useState(null),[S,j]=R.useState(null),[E,I]=R.useState(!1),A=()=>I(!1),[_]=zy(),{services:O,isLoading:P}=_y();if(vl("openContentGenerationModel",()=>I(!0)),R.useEffect(()=>{var re;const K=(re=O.find(D=>D.service===i))==null?void 0:re.config;K!=null&&K.modelOverrides?x(K.modelOverrides[c]):x(void 0)},[i,c,O]),!E)return null;const V=async K=>{K.preventDefault(),v(!0),k(null),j(null);try{const re=await Py(t,a,c,{aiService:i,askQuestion:!1});j(re)}catch(re){k(re instanceof Error?re.message:"An unexpected error occurred")}finally{v(!1)}};return h.jsx(ZC,{onClick:K=>K.target===K.currentTarget&&A(),children:h.jsxs(eE,{children:[h.jsx(tE,{onClick:A,children:"×"}),h.jsx("h2",{children:"Generate Content"}),h.jsxs(nE,{onSubmit:V,children:[h.jsxs(zs,{children:["Prompt",h.jsx(rE,{value:t,onChange:K=>r(K.target.value),placeholder:"Enter your prompt here...",required:!0})]}),h.jsxs(zs,{children:["AI Service",h.jsx(mg,{value:i,onChange:K=>l(K.target.value),disabled:P,children:_.map(K=>h.jsx("option",{value:K,children:K},K))})]}),h.jsxs(zs,{children:["Temperature (",a,")",h.jsxs(oE,{children:[h.jsx(iE,{type:"range",min:"0",max:"2",step:"0.1",value:a,onChange:K=>u(Number(K.target.value))}),h.jsx(lE,{children:a})]})]}),h.jsxs(zs,{children:["Model Type ",p?`(${p})`:"",h.jsxs(mg,{value:c,onChange:K=>f(K.target.value),children:[h.jsx("option",{value:"default",children:"Default"}),h.jsx("option",{value:"cheap",children:"Cheap"}),h.jsx("option",{value:"lite",children:"Lite"})]})]}),h.jsx(sE,{type:"submit",disabled:m||!t,children:m?"Generating...":"Generate"})]}),w&&h.jsx(uE,{children:w}),S&&h.jsx(aE,{children:S.map((K,re)=>h.jsxs("div",{children:[h.jsx("strong",{children:K.name}),h.jsx("pre",{children:JSON.stringify(K,null,2)})]},re))})]})})},ZC=C.div`
|
|
114
|
-
position: fixed;
|
|
115
|
-
top: 0;
|
|
116
|
-
left: 0;
|
|
117
|
-
right: 0;
|
|
118
|
-
bottom: 0;
|
|
119
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
120
|
-
display: flex;
|
|
121
|
-
justify-content: center;
|
|
122
|
-
align-items: center;
|
|
123
|
-
z-index: 1000;
|
|
124
|
-
`,eE=C.div`
|
|
125
|
-
background: ${({theme:e})=>e.colors.background};
|
|
126
|
-
padding: 2rem;
|
|
127
|
-
border-radius: 8px;
|
|
128
|
-
width: 90%;
|
|
129
|
-
max-width: 800px;
|
|
130
|
-
max-height: 90vh;
|
|
131
|
-
overflow-y: auto;
|
|
132
|
-
position: relative;
|
|
133
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
134
|
-
`,tE=C.button`
|
|
135
|
-
position: absolute;
|
|
136
|
-
top: 1rem;
|
|
137
|
-
right: 1rem;
|
|
138
|
-
background: none;
|
|
139
|
-
border: none;
|
|
140
|
-
font-size: 1.5rem;
|
|
141
|
-
cursor: pointer;
|
|
142
|
-
color: ${({theme:e})=>e.colors.text};
|
|
143
|
-
&:hover {
|
|
144
|
-
opacity: 0.8;
|
|
145
|
-
}
|
|
146
|
-
`,nE=C.form`
|
|
147
|
-
display: flex;
|
|
148
|
-
flex-direction: column;
|
|
149
|
-
gap: 1rem;
|
|
150
|
-
`,zs=C.label`
|
|
151
|
-
display: flex;
|
|
152
|
-
flex-direction: column;
|
|
153
|
-
gap: 0.5rem;
|
|
154
|
-
color: ${({theme:e})=>e.colors.text};
|
|
155
|
-
`,rE=C.textarea`
|
|
156
|
-
padding: 0.5rem;
|
|
157
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
158
|
-
border-radius: 4px;
|
|
159
|
-
background: ${({theme:e})=>e.colors.background};
|
|
160
|
-
color: ${({theme:e})=>e.colors.text};
|
|
161
|
-
min-height: 100px;
|
|
162
|
-
resize: vertical;
|
|
163
|
-
`,mg=C.select`
|
|
164
|
-
padding: 0.5rem;
|
|
165
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
166
|
-
border-radius: 4px;
|
|
167
|
-
background: ${({theme:e})=>e.colors.background};
|
|
168
|
-
color: ${({theme:e})=>e.colors.text};
|
|
169
|
-
`,oE=C.div`
|
|
170
|
-
display: flex;
|
|
171
|
-
align-items: center;
|
|
172
|
-
gap: 1rem;
|
|
173
|
-
`,iE=C.input`
|
|
174
|
-
flex: 1;
|
|
175
|
-
`,lE=C.span`
|
|
176
|
-
min-width: 3rem;
|
|
177
|
-
text-align: right;
|
|
178
|
-
`,sE=C.button`
|
|
179
|
-
padding: 0.5rem 1rem;
|
|
180
|
-
background: ${({theme:e})=>e.colors.primary};
|
|
181
|
-
color: white;
|
|
182
|
-
border: none;
|
|
183
|
-
border-radius: 4px;
|
|
184
|
-
cursor: pointer;
|
|
185
|
-
&:hover {
|
|
186
|
-
opacity: 0.9;
|
|
187
|
-
}
|
|
188
|
-
&:disabled {
|
|
189
|
-
opacity: 0.5;
|
|
190
|
-
cursor: not-allowed;
|
|
191
|
-
}
|
|
192
|
-
`,aE=C.div`
|
|
193
|
-
margin-top: 1rem;
|
|
194
|
-
padding: 1rem;
|
|
195
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
196
|
-
border-radius: 4px;
|
|
197
|
-
background: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
198
|
-
white-space: pre-wrap;
|
|
199
|
-
|
|
200
|
-
pre {
|
|
201
|
-
white-space: pre-wrap;
|
|
202
|
-
}
|
|
203
|
-
`,uE=C.div`
|
|
204
|
-
color: ${({theme:e})=>e.colors.error};
|
|
205
|
-
margin-top: 1rem;
|
|
206
|
-
padding: 0.5rem;
|
|
207
|
-
border: 1px solid ${({theme:e})=>e.colors.error};
|
|
208
|
-
border-radius: 4px;
|
|
209
|
-
`;function Oy(){yl("openHealthCheckModal")}function cE(){return h.jsx(rr,{onClick:Oy,"aria-label":"Health check modal",children:"🏥"})}async function dE(){const e=(await tf()).map(t=>[t,{status:void 0,lastChecked:new Date().toISOString()}]);return{services:Object.fromEntries(e),timestamp:new Date().toISOString()}}async function fE(e){var t,r;try{const[i]=await Py("say: hello",.7,!0,{aiService:e,askQuestion:!1});return(r=(t=i==null?void 0:i.args)==null?void 0:t.message)!=null&&r.toLowerCase().includes("hello")?"success":void 0}catch{return"error"}}const pE=()=>{const[e,t]=R.useState(!1),[r,i]=R.useState(!1),[l,a]=R.useState(null),[u,c]=R.useState(null),[f,p]=R.useState(null);vl("openHealthCheckModal",()=>t(!0));const x=()=>t(!1),m=async()=>{i(!0),a(null);try{const k=await dE();c(k),p(new Date);for(const[S,j]of Object.entries(k.services)){const E=Date.now(),I=await fE(S);j.status=I,j.responseTime=Date.now()-E,j.lastChecked=new Date().toISOString(),c(k),p(new Date)}}catch(k){a(k instanceof Error?k.message:"An unexpected error occurred")}finally{i(!1)}};if(R.useEffect(()=>{e&&m()},[e]),!e)return null;const v=k=>{switch(k){case"success":return"✅";case"error":return"❌";case"not_configured":return"⚠️";default:return"❓"}},w=k=>{switch(k){case"success":return"success";case"error":return"error";case"not_configured":return"warning";default:return"default"}};return h.jsx(hE,{onClick:k=>k.target===k.currentTarget&&x(),children:h.jsxs(mE,{children:[h.jsx(xE,{onClick:x,children:"×"}),h.jsxs(gE,{children:[h.jsx("h2",{children:"AI Services Health Check"}),h.jsx(yE,{onClick:m,disabled:r,children:r?"Checking...":"🔄 Refresh"})]}),l&&h.jsx(RE,{children:l}),h.jsx(vE,{children:u&&Object.entries(u.services).map(([k,S])=>h.jsxs(wE,{children:[h.jsxs(kE,{children:[h.jsx(bE,{children:k}),h.jsx(SE,{children:v(S.status)})]}),h.jsxs(CE,{color:w(S.status),children:[h.jsxs("div",{children:["Status: ",S.status]}),S.responseTime&&h.jsxs("div",{children:["Response time: ",S.responseTime,"ms"]}),S.error&&h.jsx(EE,{children:S.error}),h.jsxs(jE,{children:["Last checked: ",new Date(S.lastChecked).toLocaleTimeString()]})]})]},k))}),f&&h.jsxs(TE,{children:["Last updated: ",f.toLocaleTimeString()]}),r&&h.jsx($E,{children:"Checking AI Services..."})]})})},hE=C.div`
|
|
210
|
-
position: fixed;
|
|
211
|
-
top: 0;
|
|
212
|
-
left: 0;
|
|
213
|
-
right: 0;
|
|
214
|
-
bottom: 0;
|
|
215
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
216
|
-
display: flex;
|
|
217
|
-
justify-content: center;
|
|
218
|
-
align-items: center;
|
|
219
|
-
z-index: 1000;
|
|
220
|
-
`,mE=C.div`
|
|
221
|
-
background: ${({theme:e})=>e.colors.background};
|
|
222
|
-
padding: 2rem;
|
|
223
|
-
border-radius: 8px;
|
|
224
|
-
width: 90%;
|
|
225
|
-
max-width: 800px;
|
|
226
|
-
max-height: 90vh;
|
|
227
|
-
overflow-y: auto;
|
|
228
|
-
position: relative;
|
|
229
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
230
|
-
`,gE=C.div`
|
|
231
|
-
display: flex;
|
|
232
|
-
justify-content: space-between;
|
|
233
|
-
align-items: center;
|
|
234
|
-
margin-bottom: 2rem;
|
|
235
|
-
|
|
236
|
-
h2 {
|
|
237
|
-
margin: 0;
|
|
238
|
-
}
|
|
239
|
-
`,xE=C.button`
|
|
240
|
-
position: absolute;
|
|
241
|
-
top: 1rem;
|
|
242
|
-
right: 1rem;
|
|
243
|
-
background: none;
|
|
244
|
-
border: none;
|
|
245
|
-
font-size: 1.5rem;
|
|
246
|
-
cursor: pointer;
|
|
247
|
-
color: ${({theme:e})=>e.colors.text};
|
|
248
|
-
&:hover {
|
|
249
|
-
opacity: 0.8;
|
|
250
|
-
}
|
|
251
|
-
`,yE=C.button`
|
|
252
|
-
padding: 0.5rem 1rem;
|
|
253
|
-
background: ${({theme:e})=>e.colors.primary};
|
|
254
|
-
color: white;
|
|
255
|
-
border: none;
|
|
256
|
-
border-radius: 4px;
|
|
257
|
-
cursor: pointer;
|
|
258
|
-
&:hover {
|
|
259
|
-
opacity: 0.9;
|
|
260
|
-
}
|
|
261
|
-
&:disabled {
|
|
262
|
-
opacity: 0.5;
|
|
263
|
-
cursor: not-allowed;
|
|
264
|
-
}
|
|
265
|
-
`,vE=C.div`
|
|
266
|
-
display: grid;
|
|
267
|
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
268
|
-
gap: 1rem;
|
|
269
|
-
margin-bottom: 1rem;
|
|
270
|
-
`,wE=C.div`
|
|
271
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
272
|
-
border-radius: 4px;
|
|
273
|
-
padding: 1rem;
|
|
274
|
-
background: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
275
|
-
`,kE=C.div`
|
|
276
|
-
display: flex;
|
|
277
|
-
justify-content: space-between;
|
|
278
|
-
align-items: center;
|
|
279
|
-
margin-bottom: 0.5rem;
|
|
280
|
-
`,bE=C.h3`
|
|
281
|
-
margin: 0;
|
|
282
|
-
font-size: 1.1rem;
|
|
283
|
-
`,SE=C.span`
|
|
284
|
-
font-size: 1.2rem;
|
|
285
|
-
`,CE=C.div`
|
|
286
|
-
color: ${({theme:e,color:t})=>{switch(t){case"success":return e.colors.success;case"error":return e.colors.error;case"warning":return e.colors.warning;default:return e.colors.text}}};
|
|
287
|
-
font-size: 0.9rem;
|
|
288
|
-
`,EE=C.div`
|
|
289
|
-
color: ${({theme:e})=>e.colors.error};
|
|
290
|
-
margin-top: 0.5rem;
|
|
291
|
-
`,jE=C.div`
|
|
292
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
293
|
-
font-size: 0.8rem;
|
|
294
|
-
margin-top: 0.5rem;
|
|
295
|
-
`,TE=C.div`
|
|
296
|
-
text-align: right;
|
|
297
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
298
|
-
font-size: 0.8rem;
|
|
299
|
-
margin-top: 1rem;
|
|
300
|
-
`,RE=C.div`
|
|
301
|
-
color: ${({theme:e})=>e.colors.error};
|
|
302
|
-
margin-bottom: 1rem;
|
|
303
|
-
padding: 0.5rem;
|
|
304
|
-
border: 1px solid ${({theme:e})=>e.colors.error};
|
|
305
|
-
border-radius: 4px;
|
|
306
|
-
`,$E=C.div`
|
|
307
|
-
position: absolute;
|
|
308
|
-
top: 0;
|
|
309
|
-
left: 0;
|
|
310
|
-
right: 0;
|
|
311
|
-
bottom: 0;
|
|
312
|
-
background: rgba(0, 0, 0, 0.3);
|
|
313
|
-
display: flex;
|
|
314
|
-
justify-content: center;
|
|
315
|
-
align-items: center;
|
|
316
|
-
border-radius: 8px;
|
|
317
|
-
color: white;
|
|
318
|
-
font-size: 1.2rem;
|
|
319
|
-
`,Dy=C.div`
|
|
320
|
-
position: fixed;
|
|
321
|
-
top: 0;
|
|
322
|
-
left: 0;
|
|
323
|
-
right: 0;
|
|
324
|
-
bottom: 0;
|
|
325
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
326
|
-
display: flex;
|
|
327
|
-
justify-content: center;
|
|
328
|
-
align-items: center;
|
|
329
|
-
z-index: 1000;
|
|
330
|
-
`,My=C.div`
|
|
331
|
-
background: ${({theme:e})=>e.colors.background};
|
|
332
|
-
padding: 2rem;
|
|
333
|
-
border-radius: 8px;
|
|
334
|
-
width: 90%;
|
|
335
|
-
max-width: 800px;
|
|
336
|
-
max-height: 90vh;
|
|
337
|
-
overflow-y: auto;
|
|
338
|
-
position: relative;
|
|
339
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
340
|
-
`,By=C.div`
|
|
341
|
-
display: flex;
|
|
342
|
-
justify-content: space-between;
|
|
343
|
-
align-items: center;
|
|
344
|
-
margin-bottom: 2rem;
|
|
345
|
-
|
|
346
|
-
h2 {
|
|
347
|
-
margin: 0;
|
|
348
|
-
}
|
|
349
|
-
`,Uy=C.button`
|
|
350
|
-
position: absolute;
|
|
351
|
-
top: 1rem;
|
|
352
|
-
right: 1rem;
|
|
353
|
-
background: none;
|
|
354
|
-
border: none;
|
|
355
|
-
font-size: 1.5rem;
|
|
356
|
-
cursor: pointer;
|
|
357
|
-
color: ${({theme:e})=>e.colors.text};
|
|
358
|
-
&:hover {
|
|
359
|
-
opacity: 0.8;
|
|
360
|
-
}
|
|
361
|
-
`,IE=C.div`
|
|
362
|
-
display: grid;
|
|
363
|
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
364
|
-
gap: 1rem;
|
|
365
|
-
margin-bottom: 1rem;
|
|
366
|
-
`,NE=C.div`
|
|
367
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
368
|
-
border-radius: 4px;
|
|
369
|
-
background: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
370
|
-
transition: box-shadow 0.2s ease;
|
|
371
|
-
|
|
372
|
-
&:hover {
|
|
373
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
374
|
-
}
|
|
375
|
-
`,PE=C.div`
|
|
376
|
-
cursor: pointer;
|
|
377
|
-
padding: 1rem;
|
|
378
|
-
user-select: none;
|
|
379
|
-
display: flex;
|
|
380
|
-
justify-content: space-between;
|
|
381
|
-
align-items: center;
|
|
382
|
-
width: 100%;
|
|
383
|
-
background: none;
|
|
384
|
-
border: none;
|
|
385
|
-
color: ${({theme:e})=>e.colors.text};
|
|
386
|
-
transition: background-color 0.2s ease;
|
|
387
|
-
|
|
388
|
-
&:hover {
|
|
389
|
-
background-color: ${({theme:e})=>`${e.colors.border}20`};
|
|
390
|
-
}
|
|
391
|
-
`,AE=C.div`
|
|
392
|
-
display: flex;
|
|
393
|
-
align-items: center;
|
|
394
|
-
gap: 0.5rem;
|
|
395
|
-
`,LE=C.h3`
|
|
396
|
-
margin: 0;
|
|
397
|
-
font-size: 1.1rem;
|
|
398
|
-
`,zE=C.span`
|
|
399
|
-
display: inline-block;
|
|
400
|
-
transition: transform 0.2s ease;
|
|
401
|
-
transform: rotate(${({$isCollapsed:e})=>e?"0deg":"180deg"});
|
|
402
|
-
font-size: 0.8rem;
|
|
403
|
-
`,_E=C.div`
|
|
404
|
-
overflow: hidden;
|
|
405
|
-
transition: height 0.3s ease;
|
|
406
|
-
height: ${({$isCollapsed:e})=>e?"0":"auto"};
|
|
407
|
-
padding: ${({$isCollapsed:e})=>e?"0 1rem":"0 1rem 1rem"};
|
|
408
|
-
opacity: ${({$isCollapsed:e})=>e?"0":"1"};
|
|
409
|
-
transition: all 0.3s ease;
|
|
410
|
-
`,FE=C.form`
|
|
411
|
-
display: flex;
|
|
412
|
-
flex-direction: column;
|
|
413
|
-
gap: 1rem;
|
|
414
|
-
`,sn=C.div`
|
|
415
|
-
display: flex;
|
|
416
|
-
flex-direction: column;
|
|
417
|
-
gap: 0.5rem;
|
|
418
|
-
`,an=C.label`
|
|
419
|
-
font-size: 0.9rem;
|
|
420
|
-
color: ${({theme:e})=>e.colors.text};
|
|
421
|
-
`,Gr=C.input`
|
|
422
|
-
padding: 0.5rem;
|
|
423
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
424
|
-
border-radius: 4px;
|
|
425
|
-
background: ${({theme:e})=>e.colors.background};
|
|
426
|
-
color: ${({theme:e})=>e.colors.text};
|
|
427
|
-
font-size: 0.9rem;
|
|
428
|
-
|
|
429
|
-
&:focus {
|
|
430
|
-
outline: none;
|
|
431
|
-
border-color: ${({theme:e})=>e.colors.primary};
|
|
432
|
-
}
|
|
433
|
-
`,OE=C.button`
|
|
434
|
-
padding: 0.5rem 1rem;
|
|
435
|
-
background: ${({theme:e})=>e.colors.primary};
|
|
436
|
-
color: white;
|
|
437
|
-
border: none;
|
|
438
|
-
border-radius: 4px;
|
|
439
|
-
cursor: pointer;
|
|
440
|
-
font-size: 0.9rem;
|
|
441
|
-
|
|
442
|
-
&:hover {
|
|
443
|
-
opacity: 0.9;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
&:disabled {
|
|
447
|
-
opacity: 0.5;
|
|
448
|
-
cursor: not-allowed;
|
|
449
|
-
}
|
|
450
|
-
`,DE=C.div`
|
|
451
|
-
color: ${({theme:e})=>e.colors.error};
|
|
452
|
-
margin-bottom: 1rem;
|
|
453
|
-
padding: 0.5rem;
|
|
454
|
-
border: 1px solid ${({theme:e})=>e.colors.error};
|
|
455
|
-
border-radius: 4px;
|
|
456
|
-
`,ME=C.div`
|
|
457
|
-
color: ${({theme:e})=>e.colors.success};
|
|
458
|
-
margin-bottom: 1rem;
|
|
459
|
-
padding: 0.5rem;
|
|
460
|
-
border: 1px solid ${({theme:e})=>e.colors.success};
|
|
461
|
-
border-radius: 4px;
|
|
462
|
-
`,BE=C.div`
|
|
463
|
-
color: ${({theme:e})=>e.colors.error};
|
|
464
|
-
`,UE=C.div`
|
|
465
|
-
position: absolute;
|
|
466
|
-
top: 0;
|
|
467
|
-
left: 0;
|
|
468
|
-
right: 0;
|
|
469
|
-
bottom: 0;
|
|
470
|
-
background: rgba(0, 0, 0, 0.3);
|
|
471
|
-
display: flex;
|
|
472
|
-
justify-content: center;
|
|
473
|
-
align-items: center;
|
|
474
|
-
border-radius: 8px;
|
|
475
|
-
color: white;
|
|
476
|
-
font-size: 1.2rem;
|
|
477
|
-
`,Er=e=>e==="vertex-ai",VE=e=>e==="openai"||e==="local-llm",HE=({serviceType:e,config:t,onUpdate:r,isLoading:i,isExpanded:l,onCardClick:a})=>{var se,ee,X;const[u,c]=R.useState(""),[f,p]=R.useState(!!(t!=null&&t.hasApiKey)),[x,m]=R.useState(((se=t==null?void 0:t.modelOverrides)==null?void 0:se.default)||""),[v,w]=R.useState(((ee=t==null?void 0:t.modelOverrides)==null?void 0:ee.cheap)||""),[k,S]=R.useState(((X=t==null?void 0:t.modelOverrides)==null?void 0:X.lite)||""),[j,E]=R.useState((t==null?void 0:t.googleCloudProjectId)||""),[I,A]=R.useState((t==null?void 0:t.googleCloudRegion)||""),[_,O]=R.useState((t==null?void 0:t.openaiBaseUrl)||""),[P,V]=R.useState(null);R.useEffect(()=>{var W,ce,de;p(!!(t!=null&&t.hasApiKey)),m(((W=t==null?void 0:t.modelOverrides)==null?void 0:W.default)||""),w(((ce=t==null?void 0:t.modelOverrides)==null?void 0:ce.cheap)||""),S(((de=t==null?void 0:t.modelOverrides)==null?void 0:de.lite)||""),E((t==null?void 0:t.googleCloudProjectId)||""),A((t==null?void 0:t.googleCloudRegion)||""),O((t==null?void 0:t.openaiBaseUrl)||"")},[t]);const K=()=>{if(Er(e)){if(!j)return V("GCP Project ID is required for Vertex AI services"),!1;if(Er(e)&&!I)return V("GCP Region is required for Vertex AI services"),!1}else if(!f&&!u)return V("API Key is required"),!1;return V(null),!0},re=W=>{if(W.preventDefault(),!K())return;const ce={modelOverrides:{default:x||void 0,cheap:v||void 0,lite:k||void 0}};Er(e)?(ce.googleCloudProjectId=j,ce.googleCloudRegion=I):(ce.apiKey=u||void 0,ce.openaiBaseUrl=_||void 0),r(ce)},D=R.useCallback(()=>{a&&a(e)},[a,e]),te=W=>{(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),D())};return h.jsxs(NE,{children:[h.jsxs(PE,{onClick:D,onKeyDown:te,role:"button",tabIndex:0,"aria-expanded":!!l,"aria-controls":`config-content-${e}`,children:[h.jsxs(AE,{children:[h.jsx(LE,{children:e}),!Er(e)&&f&&h.jsx("span",{title:"API Key is set",children:"🔑"}),Er(e)&&j&&h.jsx("span",{title:"GCP Project ID is set",children:"🌐"})]}),h.jsx(zE,{$isCollapsed:!l,children:"▼"})]}),h.jsx(_E,{$isCollapsed:!l,id:`config-content-${e}`,"aria-hidden":!l,children:h.jsxs(FE,{onSubmit:re,children:[!Er(e)&&h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`apiKey-${e}`,children:"API Key"}),h.jsx(Gr,{id:`apiKey-${e}`,type:"password",value:u,onChange:W=>c(W.target.value),placeholder:f?"API key is set":"Enter API key","aria-label":`API Key for ${e}`})]}),VE(e)&&h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`baseUrl-${e}`,children:"Base URL"}),h.jsx(Gr,{id:`baseUrl-${e}`,type:"text",value:_,onChange:W=>O(W.target.value),placeholder:"Enter base URL","aria-label":`Base URL for ${e}`})]}),Er(e)&&h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`projectId-${e}`,children:"GCP Project ID"}),h.jsx(Gr,{id:`projectId-${e}`,type:"text",value:j,onChange:W=>E(W.target.value),placeholder:"Enter GCP Project ID","aria-label":`GCP Project ID for ${e}`,required:!0})]}),Er(e)&&h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`region-${e}`,children:"GCP Region"}),h.jsx(Gr,{id:`region-${e}`,type:"text",value:I,onChange:W=>A(W.target.value),placeholder:"Enter GCP Region","aria-label":`GCP Region for ${e}`,required:!0})]}),h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`defaultModel-${e}`,children:"Default Model"}),h.jsx(Gr,{id:`defaultModel-${e}`,type:"text",value:x,onChange:W=>m(W.target.value),placeholder:"Enter model name","aria-label":`Default Model for ${e}`})]}),h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`cheapModel-${e}`,children:"Cheap Model"}),h.jsx(Gr,{id:`cheapModel-${e}`,type:"text",value:v,onChange:W=>w(W.target.value),placeholder:"Enter model name","aria-label":`Cheap Model for ${e}`})]}),h.jsxs(sn,{children:[h.jsx(an,{htmlFor:`liteModel-${e}`,children:"Lite Model"}),h.jsx(Gr,{id:`liteModel-${e}`,type:"text",value:k,onChange:W=>S(W.target.value),placeholder:"Enter model name","aria-label":`Lite Model for ${e}`})]}),P&&h.jsx(BE,{role:"alert","aria-live":"polite",children:P}),h.jsx(OE,{type:"submit",disabled:i,"aria-busy":i,children:i?"Updating...":"Update Configuration"})]})})]})};function Vy(){yl("openServiceConfigurationModal")}function WE(){return h.jsx(rr,{onClick:Vy,"aria-label":"Open service configuration",children:"⚙️"})}const Hy=e=>e==="vertex-ai",qE=e=>e==="openai"||e==="local-llm",GE=(e,t)=>{var i,l,a;const r=["Configuration updated successfully for "+e];return Hy(e)?(t.googleCloudProjectId&&r.push(`GCP Project ID: ${t.googleCloudProjectId}`),t.googleCloudRegion&&r.push(`GCP Region: ${t.googleCloudRegion}`)):t.apiKey&&r.push("API key has been updated"),(i=t.modelOverrides)!=null&&i.default&&r.push(`Default model: ${t.modelOverrides.default}`),(l=t.modelOverrides)!=null&&l.cheap&&r.push(`Cheap model: ${t.modelOverrides.cheap}`),(a=t.modelOverrides)!=null&&a.lite&&r.push(`Lite model: ${t.modelOverrides.lite}`),qE(e)&&"openaiBaseUrl"in t&&r.push(`OpenAI base URL: ${t.openaiBaseUrl}`),r.join(`
|
|
478
|
-
`)},JE=(e,t)=>{if(Hy(e)){if(!t.googleCloudProjectId)return`GCP Project ID is required for ${e}`;if(e==="vertex-ai"&&!t.googleCloudRegion)return"GCP Region is required for Vertex AI"}return null},KE=()=>{const[e,t]=R.useState(!1),[r,i]=R.useState(!1),[l,a]=R.useState(null),[u,c]=R.useState(null),[f,p]=R.useState(),[x]=zy();vl("openServiceConfigurationModal",()=>t(!0));const m=()=>{t(!1),a(null),c(null)};R.useEffect(()=>{e&&v()},[e]);const v=async()=>{i(!0),a(null);try{const E=await Ly();p(E)}catch(E){a(E instanceof Error?E.message:"Failed to fetch configurations")}finally{i(!1)}},w=async(E,I)=>{i(!0),a(null),c(null);const A=JE(E,I);if(A){a(A),i(!1);return}try{await UC({serviceType:E,config:I}),await v(),c(GE(E,I))}catch(_){let O="Failed to update configuration";_ instanceof Error&&(O=_.message,_.message.includes("auth")?O=`Authentication error for ${E}: ${_.message}`:_.message.includes("permission")&&(O=`Permission error for ${E}: ${_.message}`)),a(O)}finally{i(!1)}},[k,S]=R.useState(null),j=R.useCallback(E=>{S(I=>I===E?null:E)},[S]);return e?h.jsx(Dy,{onClick:E=>E.target===E.currentTarget&&m(),role:"dialog","aria-modal":"true","aria-labelledby":"service-config-title",children:h.jsxs(My,{children:[h.jsx(Uy,{onClick:m,"aria-label":"Close configuration modal",children:"×"}),h.jsx(By,{children:h.jsx("h2",{id:"service-config-title",children:"AI Services Configuration"})}),l&&h.jsx(DE,{role:"alert","aria-live":"polite",children:l}),u&&h.jsx(ME,{role:"status","aria-live":"polite",children:u.split(`
|
|
479
|
-
`).map((E,I)=>h.jsx("div",{children:E},I))}),h.jsx(IE,{children:f?x.map(E=>h.jsx(HE,{serviceType:E,config:f[E],onUpdate:I=>w(E,I),isLoading:r,isExpanded:k===E,onCardClick:j},E)):h.jsx("div",{"aria-live":"polite",children:"Loading configurations..."})}),r&&h.jsx(UE,{role:"status","aria-live":"polite",children:"Updating configurations..."})]})}):null},Wy=ti`
|
|
480
|
-
from {
|
|
481
|
-
opacity: 0;
|
|
482
|
-
}
|
|
483
|
-
to {
|
|
484
|
-
opacity: 1;
|
|
485
|
-
}
|
|
486
|
-
`,QE=ti`
|
|
487
|
-
from {
|
|
488
|
-
transform: translateX(100%);
|
|
489
|
-
}
|
|
490
|
-
to {
|
|
491
|
-
transform: translateX(0);
|
|
492
|
-
}
|
|
493
|
-
`,YE=C.button`
|
|
494
|
-
background: none;
|
|
495
|
-
border: none;
|
|
496
|
-
font-size: 1.5rem;
|
|
497
|
-
cursor: pointer;
|
|
498
|
-
padding: 8px;
|
|
499
|
-
color: ${({theme:e})=>e.colors.text};
|
|
500
|
-
transition: color 0.2s ease;
|
|
501
|
-
display: flex;
|
|
502
|
-
align-items: center;
|
|
503
|
-
justify-content: center;
|
|
504
|
-
|
|
505
|
-
&:hover {
|
|
506
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
&:focus {
|
|
510
|
-
outline: 2px solid ${({theme:e})=>e.colors.primary};
|
|
511
|
-
outline-offset: 2px;
|
|
512
|
-
border-radius: 4px;
|
|
513
|
-
}
|
|
514
|
-
`,XE=C.div`
|
|
515
|
-
position: fixed;
|
|
516
|
-
top: 0;
|
|
517
|
-
left: 0;
|
|
518
|
-
right: 0;
|
|
519
|
-
bottom: 0;
|
|
520
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
521
|
-
z-index: 998;
|
|
522
|
-
display: ${({isOpen:e})=>e?"block":"none"};
|
|
523
|
-
animation: ${Wy} 0.2s ease;
|
|
524
|
-
`,ZE=C.div`
|
|
525
|
-
position: absolute;
|
|
526
|
-
${({position:e})=>e?wt`
|
|
527
|
-
top: ${e.top??"auto"};
|
|
528
|
-
right: ${e.right??"auto"};
|
|
529
|
-
left: ${e.left??"auto"};
|
|
530
|
-
bottom: ${e.bottom??"auto"};
|
|
531
|
-
`:wt`
|
|
532
|
-
top: 100%;
|
|
533
|
-
right: 0;
|
|
534
|
-
`}
|
|
535
|
-
background-color: ${({theme:e})=>e.colors.pageBackground};
|
|
536
|
-
border-radius: 8px;
|
|
537
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
538
|
-
padding: 8px 0;
|
|
539
|
-
min-width: 200px;
|
|
540
|
-
z-index: 999;
|
|
541
|
-
opacity: ${({isOpen:e})=>e?1:0};
|
|
542
|
-
visibility: ${({isOpen:e})=>e?"visible":"hidden"};
|
|
543
|
-
transform-origin: top right;
|
|
544
|
-
animation: ${({isOpen:e})=>e?wt`
|
|
545
|
-
${QE} 0.2s ease,
|
|
546
|
-
${Wy} 0.2s ease
|
|
547
|
-
`:"none"};
|
|
548
|
-
|
|
549
|
-
@media (max-width: 576px) {
|
|
550
|
-
position: fixed;
|
|
551
|
-
top: 0;
|
|
552
|
-
right: 0;
|
|
553
|
-
bottom: 0;
|
|
554
|
-
min-width: 250px;
|
|
555
|
-
border-radius: 0;
|
|
556
|
-
border-top-left-radius: 8px;
|
|
557
|
-
border-bottom-left-radius: 8px;
|
|
558
|
-
transform-origin: center right;
|
|
559
|
-
}
|
|
560
|
-
`,ej=C.div`
|
|
561
|
-
padding: 12px 16px;
|
|
562
|
-
cursor: pointer;
|
|
563
|
-
transition: background-color 0.2s ease;
|
|
564
|
-
display: flex;
|
|
565
|
-
align-items: center;
|
|
566
|
-
gap: 8px;
|
|
567
|
-
color: ${({theme:e})=>e.colors.text};
|
|
568
|
-
|
|
569
|
-
&:hover {
|
|
570
|
-
background-color: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
&:focus-within {
|
|
574
|
-
background-color: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
575
|
-
outline: 2px solid ${({theme:e})=>e.colors.primary};
|
|
576
|
-
outline-offset: -2px;
|
|
577
|
-
}
|
|
578
|
-
`,tj=C.div`
|
|
579
|
-
position: relative;
|
|
580
|
-
display: inline-block;
|
|
581
|
-
`,nj=({menuItems:e,isOpen:t,onToggle:r,className:i,buttonAriaLabel:l="Toggle menu",menuAriaLabel:a="Navigation menu",position:u})=>{const c=R.useRef(null),f=R.useRef(null),p=R.useRef(null);R.useEffect(()=>{const v=k=>{var S;t&&c.current&&!c.current.contains(k.target)&&!((S=p.current)!=null&&S.contains(k.target))&&r()},w=k=>{var S;t&&k.key==="Escape"&&(r(),(S=p.current)==null||S.focus())};return document.addEventListener("mousedown",v),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("keydown",w)}},[t,r]),R.useEffect(()=>{var v;t&&((v=f.current)==null||v.focus())},[t]);const x=v=>{var S,j;if(!t)return;const w=Array.from(((S=c.current)==null?void 0:S.querySelectorAll('[role="menuitem"]'))||[]),k=w.indexOf(document.activeElement);switch(v.key){case"ArrowDown":v.preventDefault(),k<w.length-1?w[k+1].focus():w[0].focus();break;case"ArrowUp":v.preventDefault(),k>0?w[k-1].focus():w[w.length-1].focus();break;case"Home":v.preventDefault(),w[0].focus();break;case"End":v.preventDefault(),w[w.length-1].focus();break;case"Enter":case" ":v.preventDefault(),k>=0&&(e[k].onClick(),r(),(j=p.current)==null||j.focus());break}},m=v=>{var w;v(),r(),(w=p.current)==null||w.focus()};return h.jsxs(tj,{className:i,children:[h.jsx(YE,{onClick:r,"aria-expanded":t,"aria-haspopup":"true","aria-controls":"menu-items","aria-label":l,ref:p,children:"☰"}),h.jsx(XE,{isOpen:t,onClick:r}),h.jsx(ZE,{isOpen:t,position:u,ref:c,role:"menu","aria-label":a,id:"menu-items",onKeyDown:x,children:e.map((v,w)=>h.jsxs(ej,{onClick:()=>m(v.onClick),role:"menuitem",tabIndex:t?0:-1,ref:w===0?f:null,"aria-label":v.ariaLabel,children:[v.content," ",v.ariaLabel]},v.key||w))})]})};function qy(){yl("openRcConfigModal")}const rj=({rcConfig:e})=>{const[t,r]=R.useState(!1);vl("openRcConfigModal",()=>r(!0));const i=()=>{r(!1)};return!t||!e?null:h.jsx(Dy,{onClick:l=>l.target===l.currentTarget&&i(),role:"dialog","aria-modal":"true","aria-labelledby":"rc-config-title",children:h.jsxs(My,{children:[h.jsx(Uy,{onClick:i,"aria-label":"Close RC configuration modal",children:"×"}),h.jsx(By,{children:h.jsx("h2",{id:"rc-config-title",children:"RC Configuration"})}),h.jsxs(oj,{children:[h.jsxs(sn,{children:[h.jsx(an,{children:"Root Directory"}),h.jsx(Fo,{children:e.rootDir})]}),e.lintCommand&&h.jsxs(sn,{children:[h.jsx(an,{children:"Lint Command"}),h.jsx(Fo,{children:e.lintCommand})]}),e.extensions&&e.extensions.length>0&&h.jsxs(sn,{children:[h.jsx(an,{children:"Extensions"}),h.jsx(Fo,{children:e.extensions.join(", ")})]}),e.ignorePaths&&e.ignorePaths.length>0&&h.jsxs(sn,{children:[h.jsx(an,{children:"Ignore Paths"}),h.jsx(Fo,{children:e.ignorePaths.join(", ")})]}),e.importantContext&&h.jsxs(sn,{children:[h.jsx(an,{children:"Important Context"}),h.jsx(Fo,{children:e.importantContext.files?`Files: ${e.importantContext.files.join(", ")}`:"None"})]}),e.modelOverrides&&h.jsxs(sn,{children:[h.jsx(an,{children:"Model Overrides"}),h.jsx(Fo,{children:h.jsx("pre",{children:JSON.stringify(e.modelOverrides,null,2)})})]})]})]})})},oj=C.div`
|
|
582
|
-
display: flex;
|
|
583
|
-
flex-direction: column;
|
|
584
|
-
gap: 1rem;
|
|
585
|
-
margin-top: 1rem;
|
|
586
|
-
`,Fo=C.div`
|
|
587
|
-
color: ${({theme:e})=>e.colors.text};
|
|
588
|
-
font-family: monospace;
|
|
589
|
-
background-color: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
590
|
-
padding: 0.5rem;
|
|
591
|
-
border-radius: 4px;
|
|
592
|
-
overflow-x: auto;
|
|
593
|
-
|
|
594
|
-
pre {
|
|
595
|
-
margin: 0;
|
|
596
|
-
white-space: pre-wrap;
|
|
597
|
-
}
|
|
598
|
-
`,ij=()=>h.jsx(rr,{onClick:qy,children:"ℹ️"}),lj=C.div`
|
|
599
|
-
position: fixed;
|
|
600
|
-
top: 0;
|
|
601
|
-
left: 0;
|
|
602
|
-
right: 0;
|
|
603
|
-
bottom: 0;
|
|
604
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
605
|
-
display: flex;
|
|
606
|
-
justify-content: center;
|
|
607
|
-
align-items: center;
|
|
608
|
-
z-index: 1000;
|
|
609
|
-
`,sj=C.div`
|
|
610
|
-
background: ${({theme:e})=>e.colors.background};
|
|
611
|
-
padding: 2rem;
|
|
612
|
-
border-radius: 8px;
|
|
613
|
-
width: 90%;
|
|
614
|
-
max-width: 800px;
|
|
615
|
-
max-height: 90vh;
|
|
616
|
-
overflow-y: auto;
|
|
617
|
-
position: relative;
|
|
618
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
619
|
-
`,aj=C.div`
|
|
620
|
-
display: flex;
|
|
621
|
-
justify-content: space-between;
|
|
622
|
-
align-items: center;
|
|
623
|
-
margin-bottom: 2rem;
|
|
624
|
-
|
|
625
|
-
h2 {
|
|
626
|
-
margin: 0;
|
|
627
|
-
}
|
|
628
|
-
`,uj=C.button`
|
|
629
|
-
position: absolute;
|
|
630
|
-
top: 1rem;
|
|
631
|
-
right: 1rem;
|
|
632
|
-
background: none;
|
|
633
|
-
border: none;
|
|
634
|
-
font-size: 1.5rem;
|
|
635
|
-
cursor: pointer;
|
|
636
|
-
color: ${({theme:e})=>e.colors.text};
|
|
637
|
-
&:hover {
|
|
638
|
-
opacity: 0.8;
|
|
639
|
-
}
|
|
640
|
-
`,cj=C.div`
|
|
641
|
-
display: flex;
|
|
642
|
-
flex-direction: column;
|
|
643
|
-
gap: 1rem;
|
|
644
|
-
margin-bottom: 1rem;
|
|
645
|
-
`,dj=C.div`
|
|
646
|
-
color: ${({theme:e})=>e.colors.error};
|
|
647
|
-
margin-bottom: 1rem;
|
|
648
|
-
padding: 0.5rem;
|
|
649
|
-
border: 1px solid ${({theme:e})=>e.colors.error};
|
|
650
|
-
border-radius: 4px;
|
|
651
|
-
`,fj=C.div`
|
|
652
|
-
color: ${({theme:e})=>e.colors.success};
|
|
653
|
-
margin-bottom: 1rem;
|
|
654
|
-
padding: 0.5rem;
|
|
655
|
-
border: 1px solid ${({theme:e})=>e.colors.success};
|
|
656
|
-
border-radius: 4px;
|
|
657
|
-
`,pj=C.div`
|
|
658
|
-
position: absolute;
|
|
659
|
-
top: 0;
|
|
660
|
-
left: 0;
|
|
661
|
-
right: 0;
|
|
662
|
-
bottom: 0;
|
|
663
|
-
background: rgba(0, 0, 0, 0.3);
|
|
664
|
-
display: flex;
|
|
665
|
-
justify-content: center;
|
|
666
|
-
align-items: center;
|
|
667
|
-
border-radius: 8px;
|
|
668
|
-
color: white;
|
|
669
|
-
font-size: 1.2rem;
|
|
670
|
-
`,ua=({value:e,onChange:t,disabled:r})=>{const{services:i,isLoading:l,error:a}=_y(),u=c=>{t(c.target.value)};return h.jsxs(hj,{children:[h.jsxs(mj,{id:"aiService",value:e,onChange:u,disabled:r||l||a!==null,children:[h.jsx("option",{value:"",children:"Select AI Service"}),i.map(({service:c,displayName:f})=>h.jsx("option",{value:c,children:f},c))]}),l&&h.jsx(gj,{children:"Loading services..."}),a&&h.jsx(xj,{children:a})]})},hj=C.div`
|
|
671
|
-
display: flex;
|
|
672
|
-
flex-direction: column;
|
|
673
|
-
gap: 4px;
|
|
674
|
-
`,mj=C.select`
|
|
675
|
-
padding: 8px;
|
|
676
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
677
|
-
border-radius: 4px;
|
|
678
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
679
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
680
|
-
font-size: 14px;
|
|
681
|
-
max-width: 200px; /* Ensure enough space for longer options */
|
|
682
|
-
|
|
683
|
-
&:disabled {
|
|
684
|
-
background-color: ${({theme:e})=>e.colors.disabled};
|
|
685
|
-
cursor: not-allowed;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
option {
|
|
689
|
-
padding: 4px;
|
|
690
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
691
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
692
|
-
}
|
|
693
|
-
`,gj=C.div`
|
|
694
|
-
color: ${({theme:e})=>e.colors.text};
|
|
695
|
-
font-size: 14px;
|
|
696
|
-
font-style: italic;
|
|
697
|
-
`,xj=C.div`
|
|
698
|
-
color: ${({theme:e})=>e.colors.error};
|
|
699
|
-
font-size: 14px;
|
|
700
|
-
`;function Gy(){yl("openGenaicodeConfigModal")}function yj(){return h.jsx(rr,{onClick:Gy,"aria-label":"Open Genaicode configuration",children:"🐺"})}const vj=({options:e,onOptionsChange:t})=>{const[r,i]=R.useState(!1),[l,a]=R.useState(!1),[u,c]=R.useState(null),[f,p]=R.useState(null);vl("openGenaicodeConfigModal",()=>i(!0));const x=()=>{i(!1),c(null),p(null)},m=async S=>{a(!0),c(null),p(null);try{t(S),p("Configuration updated successfully")}catch{c("Failed to update configuration")}finally{a(!1)}},v=S=>{const{name:j,value:E,type:I}=S.target,A=I==="checkbox"?S.target.checked:E;m({...e,[j]:A})},w=S=>{m({...e,aiService:S})},k=S=>{const j=S.target.value.split(",").map(E=>E.trim());m({...e,ignorePatterns:j})};return r?h.jsx(lj,{onClick:S=>S.target===S.currentTarget&&x(),role:"dialog","aria-modal":"true","aria-labelledby":"genaicode-config-title",children:h.jsxs(sj,{children:[h.jsx(uj,{onClick:x,"aria-label":"Close configuration modal",children:"×"}),h.jsx(aj,{children:h.jsx("h2",{id:"genaicode-config-title",children:"Genaicode Configuration"})}),u&&h.jsx(dj,{role:"alert","aria-live":"polite",children:u}),f&&h.jsx(fj,{role:"status","aria-live":"polite",children:f}),h.jsxs(cj,{children:[h.jsxs(Qi,{children:[h.jsx(Bn,{htmlFor:"aiService",children:"Default AI Service:"}),h.jsx(ua,{value:e.aiService,onChange:w,disabled:l})]}),h.jsxs(Qi,{children:[h.jsx(Bn,{htmlFor:"contentMask",children:"Content Mask:"}),h.jsx(gg,{type:"text",id:"contentMask",name:"contentMask",value:e.contentMask||"",onChange:v,disabled:l})]}),h.jsxs(Qi,{children:[h.jsx(Bn,{htmlFor:"ignorePatterns",children:"Ignore Patterns:"}),h.jsx(gg,{type:"text",id:"ignorePatterns",name:"ignorePatterns",value:e.ignorePatterns?e.ignorePatterns.join(", "):"",onChange:k,disabled:l}),h.jsx("small",{children:"Comma-separated list of patterns"})]}),h.jsxs(Qi,{children:[h.jsx(Bn,{children:"File Operations:"}),h.jsxs(Bn,{htmlFor:"allowFileCreate",children:[h.jsx("input",{type:"checkbox",id:"allowFileCreate",name:"allowFileCreate",checked:e.allowFileCreate!==!1,onChange:v,disabled:l}),"Allow File Create"]}),h.jsxs(Bn,{htmlFor:"allowFileDelete",children:[h.jsx("input",{type:"checkbox",id:"allowFileDelete",name:"allowFileDelete",checked:e.allowFileDelete!==!1,onChange:v,disabled:l}),"Allow File Delete"]}),h.jsxs(Bn,{htmlFor:"allowDirectoryCreate",children:[h.jsx("input",{type:"checkbox",id:"allowDirectoryCreate",name:"allowDirectoryCreate",checked:e.allowDirectoryCreate!==!1,onChange:v,disabled:l}),"Allow Directory Create"]}),h.jsxs(Bn,{htmlFor:"allowFileMove",children:[h.jsx("input",{type:"checkbox",id:"allowFileMove",name:"allowFileMove",checked:e.allowFileMove!==!1,onChange:v,disabled:l}),"Allow File Move"]})]}),h.jsxs(Qi,{children:[h.jsx(Bn,{children:"Notification Settings:"}),h.jsxs(Bn,{htmlFor:"muteNotifications",children:[h.jsx("input",{type:"checkbox",id:"muteNotifications",name:"muteNotifications",checked:e.muteNotifications===!0,onChange:v,disabled:l}),"Mute Sound Notifications"]})]})]}),l&&h.jsx(pj,{role:"status","aria-live":"polite",children:"Updating configuration..."})]})}):null},Qi=C.div`
|
|
701
|
-
margin-bottom: 16px;
|
|
702
|
-
`,Bn=C.label`
|
|
703
|
-
display: block;
|
|
704
|
-
margin-bottom: 4px;
|
|
705
|
-
color: ${e=>e.theme.colors.text};
|
|
706
|
-
`,gg=C.input`
|
|
707
|
-
width: 100%;
|
|
708
|
-
padding: 8px;
|
|
709
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
710
|
-
border-radius: 4px;
|
|
711
|
-
background-color: ${e=>e.theme.colors.inputBg};
|
|
712
|
-
color: ${e=>e.theme.colors.inputText};
|
|
713
|
-
|
|
714
|
-
&:disabled {
|
|
715
|
-
background-color: ${e=>e.theme.colors.disabled};
|
|
716
|
-
cursor: not-allowed;
|
|
717
|
-
}
|
|
718
|
-
`,wj="1.0.0",Jy=()=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM13.96 12.29L11.21 15.83L9.25 13.47L6.5 17H17.5L13.96 12.29Z",fill:"currentColor"})}),kj=()=>h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M10 3H8C6.89543 3 6 3.89543 6 5V7M10 21H8C6.89543 21 6 20.1046 6 19V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M14 3H16C17.1046 3 18 3.89543 18 5V7M14 21H16C17.1046 21 18 20.1046 18 19V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("rect",{x:"6",y:"10",width:"12",height:"4",rx:"1",stroke:"currentColor",strokeWidth:"2"}),h.jsx("path",{d:"M12 7V10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M12 14V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),bj=500,_s=5e3,ri=R.createContext({messages:[],executionStatus:"idle",currentQuestion:null,suggestions:[],currentPrompt:"",theme:"dark",usage:void 0,codegenOptions:void 0,rcConfig:null,lastFinishedExecutionId:null,initialDataLoaded:!1,conversationGraphState:null,isGraphVisualiserOpen:!1,terminalEvents:{},isTerminalOpen:!1,isContextManagerOpen:!1,isCompressionModalOpen:!1,setMessages:()=>{},setExecutionStatus:()=>{},setCurrentQuestion:()=>{},setSuggestions:()=>{},setCurrentPrompt:()=>{},toggleTheme:()=>{},setCodegenOptions:()=>{},setLastFinishedExecutionId:()=>{},startPolling:()=>{},stopPolling:()=>{},handlePauseExecution:async()=>{},handleResumeExecution:async()=>{},setConversationGraphState:()=>{},toggleGraphVisualiser:()=>{},toggleTerminal:()=>{},toggleContextManager:()=>{},toggleCompressionModal:()=>{},clearTerminalEvents:()=>{},updateMessage:()=>{}}),Sj=({children:e})=>{const[t,r]=R.useState([]),[i,l]=R.useState("idle"),[a,u]=R.useState(null),[c,f]=R.useState([]),[p,x]=R.useState(""),[m,v]=R.useState("dark"),[w,k]=R.useState(),[S,j]=R.useState(void 0),[E,I]=R.useState(null),[A,_]=R.useState(null),O=R.useRef(!1),[P,V]=R.useState(!1),K=R.useRef(null),[re,D]=R.useState(null),[te,se]=R.useState(!1),[ee,X]=R.useState({}),[W,ce]=R.useState(!1),[de,Q]=R.useState(!1),[fe,T]=R.useState(!1),[z,q]=R.useState(!0),$=R.useCallback(()=>{v(_e=>_e==="light"?"dark":"light")},[]),ue=R.useCallback(_e=>{j(_e)},[]),ge=R.useCallback(()=>{se(_e=>!_e)},[]),ke=R.useCallback(()=>{ce(_e=>!_e)},[]),he=R.useCallback(()=>{Q(_e=>!_e)},[]),pe=R.useCallback(()=>{T(_e=>!_e)},[]),le=R.useCallback(()=>{q(_e=>!_e)},[]),ve=R.useCallback(_e=>{X(dt=>({...dt,[_e]:[]}))},[]),Le=R.useCallback((_e,dt)=>{r(Ft=>Ft.map(ft=>ft.id===_e?{...ft,...dt}:ft))},[]),Ie=R.useCallback(async()=>{try{const[_e,dt,Ft,ft,Me,mt]=await Promise.all([yd(),vd(),pg(),hg(),FC(),OC()]);l(_e),u(dt);const $t=[],G={};for(const ne of Ft)if(ne.message&&$t.push({...ne.message,timestamp:new Date(ne.message.timestamp),data:ne.data}),ne.terminalEvent){const{iterationId:be}=ne.terminalEvent;G[be]||(G[be]=[]),G[be].push({...ne.terminalEvent,timestamp:new Date(ne.terminalEvent.timestamp).toString()})}for(const ne in G)G[ne].length>_s&&(G[ne]=G[ne].slice(-_s));r($t),X(G),k(ft),j(Me),I(mt),V(!0)}catch(_e){console.error("Failed to fetch initial data:",_e),V(!1)}},[]);R.useEffect(()=>{Ie()},[Ie]);const Ge=R.useCallback(async()=>{try{const[_e,dt,Ft,ft]=await Promise.all([yd(),vd(),pg(),hg()]);l(Me=>Me!==_e?_e:Me),u(Me=>(Me==null?void 0:Me.id)!==(dt==null?void 0:dt.id)?dt:Me),r(Me=>{const mt=Ft.filter($t=>!!$t.message).map($t=>({...$t.message,timestamp:new Date($t.message.timestamp),data:$t.data}));return Me.length!==mt.length||Me.length>0&&mt.length>0&&Me[Me.length-1].id!==mt[mt.length-1].id?mt:Me}),X(Me=>{const mt={};let $t=!1;for(const be of Ft)if(be.terminalEvent){const{iterationId:Re}=be.terminalEvent;mt[Re]||(mt[Re]=[]),mt[Re].push({...be.terminalEvent,timestamp:new Date(be.terminalEvent.timestamp).toString()})}const G=new Set([...Object.keys(Me),...Object.keys(mt)]),ne={...Me};for(const be of G){const Re=Me[be]||[],Ne=mt[be]||[];(Re.length!==Ne.length||Ne.length>0&&Re.length>0&&Re[Re.length-1].id!==Ne[Ne.length-1].id)&&($t=!0,ne[be]=Ne.length>_s?Ne.slice(-_s):Ne)}return $t?ne:Me}),k(Me=>(Me==null?void 0:Me.usageMetrics.total.cost)!==(ft==null?void 0:ft.usageMetrics.total.cost)||(Me==null?void 0:Me.usageMetrics.total.tpd)!==(ft==null?void 0:ft.usageMetrics.total.tpd)?ft:Me)}catch(_e){console.error("Failed to poll data:",_e)}K.current&&clearTimeout(K.current),O.current&&(K.current=setTimeout(Ge,bj))},[]),Rt=R.useCallback(()=>{O.current||(console.log("Starting polling..."),O.current=!0,K.current&&clearTimeout(K.current),requestAnimationFrame(()=>{Ge()}))},[Ge]),bt=R.useCallback(()=>{O.current&&(console.log("Stopping polling..."),O.current=!1,K.current&&(clearTimeout(K.current),K.current=null))},[]);R.useEffect(()=>(P&&Rt(),()=>{bt()}),[P,Rt,bt]);const Bt=R.useCallback(async()=>{try{await LC(),l("paused")}catch(_e){console.error("Failed to pause execution:",_e)}},[]),qn=R.useCallback(async()=>{try{await zC(),l("executing")}catch(_e){console.error("Failed to resume execution:",_e)}},[]),co=R.useMemo(()=>({messages:t,executionStatus:i,currentQuestion:a,suggestions:c,currentPrompt:p,theme:m,usage:w,codegenOptions:S,rcConfig:E,lastFinishedExecutionId:A,initialDataLoaded:P,conversationGraphState:re,isGraphVisualiserOpen:te,terminalEvents:ee,isTerminalOpen:W,isContextManagerOpen:de,isCompressionModalOpen:fe,autoScrollTerminal:z,setMessages:r,setExecutionStatus:l,setCurrentQuestion:u,setSuggestions:f,setCurrentPrompt:x,toggleTheme:$,setCodegenOptions:ue,setLastFinishedExecutionId:_,startPolling:Rt,stopPolling:bt,handlePauseExecution:Bt,handleResumeExecution:qn,setConversationGraphState:D,toggleGraphVisualiser:ge,toggleTerminal:ke,toggleContextManager:he,toggleCompressionModal:pe,toggleAutoScrollTerminal:le,setAutoScrollTerminal:q,clearTerminalEvents:ve,updateMessage:Le}),[t,i,a,c,p,m,w,S,E,A,P,re,te,ee,W,de,fe,z,$,ue,Rt,bt,Bt,qn,ge,ke,he,pe,le,ve,Le]);return h.jsx(ri.Provider,{value:co,children:e})},cn=()=>{const e=Tt.useContext(ri);if(!e)throw new Error("useChatState must be used within a ChatStateProvider");return e},Cj=ti`
|
|
719
|
-
0% {
|
|
720
|
-
transform: scale(1);
|
|
721
|
-
box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); // Use theme primary color ideally
|
|
722
|
-
}
|
|
723
|
-
70% {
|
|
724
|
-
transform: scale(1.05);
|
|
725
|
-
box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
|
|
726
|
-
}
|
|
727
|
-
100% {
|
|
728
|
-
transform: scale(1);
|
|
729
|
-
box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
|
|
730
|
-
}
|
|
731
|
-
`,Ej=C.div`
|
|
732
|
-
position: absolute; // Positioned relative to MainContent
|
|
733
|
-
bottom: 40px;
|
|
734
|
-
right: 30px;
|
|
735
|
-
z-index: 1000; // Ensure it's above other content like scrollbars
|
|
736
|
-
`,jj=C(rr)`
|
|
737
|
-
width: 50px; // Increased size
|
|
738
|
-
height: 50px; // Increased size
|
|
739
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
740
|
-
color: ${({theme:e})=>e.colors.buttonText||"#ffffff"}; // Ensure icon is visible
|
|
741
|
-
border: none;
|
|
742
|
-
animation: ${Cj} 2s infinite;
|
|
743
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
744
|
-
|
|
745
|
-
&:hover {
|
|
746
|
-
background-color: ${({theme:e})=>e.colors.primaryHover};
|
|
747
|
-
animation-play-state: paused; // Pause animation on hover
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
// Style when the visualiser panel is open (isActive prop)
|
|
751
|
-
${({isActive:e,theme:t})=>e&&wt`
|
|
752
|
-
background-color: ${t.colors.buttonHoverBg}; // Existing active style
|
|
753
|
-
border: 1px solid ${t.colors.primary};
|
|
754
|
-
animation: none; // Turn off animation when visualiser is open
|
|
755
|
-
`}
|
|
756
|
-
`,Tj=()=>{const{toggleGraphVisualiser:e,isGraphVisualiserOpen:t,conversationGraphState:r}=cn();return r!=null&&r.isActive?h.jsx(Ej,{children:h.jsx(jj,{onClick:e,"aria-label":"Toggle Conversation Graph",title:"Toggle Conversation Graph",isActive:t,children:h.jsx(kj,{})})}):null},xg=C.div`
|
|
757
|
-
position: fixed;
|
|
758
|
-
top: 0;
|
|
759
|
-
left: 0;
|
|
760
|
-
right: 0;
|
|
761
|
-
bottom: 0;
|
|
762
|
-
background-color: ${e=>e.theme.colors.menuBackdrop};
|
|
763
|
-
display: flex;
|
|
764
|
-
justify-content: center;
|
|
765
|
-
align-items: center;
|
|
766
|
-
z-index: ${e=>e.theme.zIndex.modal};
|
|
767
|
-
`,yg=C.div`
|
|
768
|
-
background-color: ${e=>e.theme.colors.pageBackground};
|
|
769
|
-
border-radius: 8px;
|
|
770
|
-
width: 90%;
|
|
771
|
-
max-width: 800px;
|
|
772
|
-
max-height: 90vh;
|
|
773
|
-
display: flex;
|
|
774
|
-
flex-direction: column;
|
|
775
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
776
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
777
|
-
color: ${e=>e.theme.colors.text};
|
|
778
|
-
`,vg=C.div`
|
|
779
|
-
padding: 16px 20px;
|
|
780
|
-
border-bottom: 1px solid ${e=>e.theme.colors.border};
|
|
781
|
-
display: flex;
|
|
782
|
-
justify-content: space-between;
|
|
783
|
-
align-items: center;
|
|
784
|
-
|
|
785
|
-
h2 {
|
|
786
|
-
margin: 0;
|
|
787
|
-
font-size: 1.2rem;
|
|
788
|
-
color: ${e=>e.theme.colors.text};
|
|
789
|
-
}
|
|
790
|
-
`,wg=C.button`
|
|
791
|
-
background: none;
|
|
792
|
-
border: none;
|
|
793
|
-
font-size: 1.5rem;
|
|
794
|
-
cursor: pointer;
|
|
795
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
796
|
-
padding: 0;
|
|
797
|
-
line-height: 1;
|
|
798
|
-
|
|
799
|
-
&:hover {
|
|
800
|
-
color: ${e=>e.theme.colors.text};
|
|
801
|
-
}
|
|
802
|
-
`,kg=C.div`
|
|
803
|
-
padding: 20px;
|
|
804
|
-
overflow-y: auto;
|
|
805
|
-
flex-grow: 1;
|
|
806
|
-
display: flex;
|
|
807
|
-
flex-direction: column;
|
|
808
|
-
gap: 16px;
|
|
809
|
-
`,Rj=C.div`
|
|
810
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
811
|
-
border-radius: 4px;
|
|
812
|
-
padding: 10px;
|
|
813
|
-
background-color: ${e=>e.theme.colors.inputBg};
|
|
814
|
-
max-height: 60vh;
|
|
815
|
-
overflow-y: auto;
|
|
816
|
-
`,$j=C.div`
|
|
817
|
-
display: flex;
|
|
818
|
-
align-items: center;
|
|
819
|
-
padding: 4px 0;
|
|
820
|
-
gap: 8px;
|
|
821
|
-
font-family: monospace;
|
|
822
|
-
font-size: 0.9rem;
|
|
823
|
-
|
|
824
|
-
&:hover {
|
|
825
|
-
background-color: ${e=>e.theme.colors.menuHover};
|
|
826
|
-
}
|
|
827
|
-
`,Ij=C.div`
|
|
828
|
-
width: ${e=>e.level*20}px;
|
|
829
|
-
flex-shrink: 0;
|
|
830
|
-
`,bg=C.input.attrs({type:"checkbox"})`
|
|
831
|
-
cursor: pointer;
|
|
832
|
-
margin: 0;
|
|
833
|
-
width: 16px;
|
|
834
|
-
height: 16px;
|
|
835
|
-
`,Nj=C.span`
|
|
836
|
-
cursor: pointer;
|
|
837
|
-
color: ${e=>e.type==="folder"?e.theme.colors.primary:e.theme.colors.text};
|
|
838
|
-
font-weight: ${e=>e.type==="folder"?"bold":"normal"};
|
|
839
|
-
flex-grow: 1;
|
|
840
|
-
white-space: nowrap;
|
|
841
|
-
overflow: hidden;
|
|
842
|
-
text-overflow: ellipsis;
|
|
843
|
-
`,Sg=C.div`
|
|
844
|
-
display: flex;
|
|
845
|
-
justify-content: flex-end;
|
|
846
|
-
gap: 12px;
|
|
847
|
-
padding-top: 16px;
|
|
848
|
-
border-top: 1px solid ${e=>e.theme.colors.border};
|
|
849
|
-
`,Jr=C.button`
|
|
850
|
-
padding: 8px 16px;
|
|
851
|
-
border-radius: 4px;
|
|
852
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
853
|
-
cursor: pointer;
|
|
854
|
-
font-size: 0.9rem;
|
|
855
|
-
transition: background-color 0.2s;
|
|
856
|
-
|
|
857
|
-
${e=>{switch(e.variant){case"primary":return`
|
|
858
|
-
background-color: ${e.theme.colors.primary};
|
|
859
|
-
color: white;
|
|
860
|
-
border-color: ${e.theme.colors.primary};
|
|
861
|
-
&:hover { background-color: ${e.theme.colors.primaryHover}; }
|
|
862
|
-
`;case"danger":return`
|
|
863
|
-
background-color: ${e.theme.colors.error};
|
|
864
|
-
color: white;
|
|
865
|
-
border-color: ${e.theme.colors.error};
|
|
866
|
-
&:hover { background-color: ${e.theme.colors.errorHover}; }
|
|
867
|
-
`;default:return`
|
|
868
|
-
background-color: ${e.theme.colors.buttonBg};
|
|
869
|
-
color: ${e.theme.colors.buttonText};
|
|
870
|
-
&:hover { background-color: ${e.theme.colors.buttonHoverBg}; }
|
|
871
|
-
`}}}
|
|
872
|
-
|
|
873
|
-
&:disabled {
|
|
874
|
-
opacity: 0.6;
|
|
875
|
-
cursor: not-allowed;
|
|
876
|
-
background-color: ${e=>e.theme.colors.disabled};
|
|
877
|
-
border-color: ${e=>e.theme.colors.disabled};
|
|
878
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
879
|
-
}
|
|
880
|
-
`,Cg=C.div`
|
|
881
|
-
text-align: center;
|
|
882
|
-
padding: 40px;
|
|
883
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
884
|
-
font-style: italic;
|
|
885
|
-
`,Pj=C.div`
|
|
886
|
-
display: flex;
|
|
887
|
-
gap: 20px;
|
|
888
|
-
font-size: 0.85rem;
|
|
889
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
890
|
-
margin-bottom: 8px;
|
|
891
|
-
font-weight: 500;
|
|
892
|
-
`,Aj=C.span`
|
|
893
|
-
display: inline-flex;
|
|
894
|
-
align-items: center;
|
|
895
|
-
font-size: 0.8rem;
|
|
896
|
-
margin-left: 8px;
|
|
897
|
-
font-weight: 500;
|
|
898
|
-
color: ${e=>{switch(e.category){case"small":return e.theme.colors.success||"#4CAF50";case"medium":return e.theme.colors.warning||"#FFA726";case"large":return e.theme.colors.error||"#EF5350";default:return e.theme.colors.textSecondary}}};
|
|
899
|
-
`,Lj=C.div`
|
|
900
|
-
position: absolute;
|
|
901
|
-
top: -4px;
|
|
902
|
-
right: -4px;
|
|
903
|
-
min-width: 20px;
|
|
904
|
-
height: 20px;
|
|
905
|
-
border-radius: 10px;
|
|
906
|
-
font-size: 0.65rem;
|
|
907
|
-
font-weight: bold;
|
|
908
|
-
display: flex;
|
|
909
|
-
align-items: center;
|
|
910
|
-
justify-content: center;
|
|
911
|
-
padding: 2px 4px;
|
|
912
|
-
color: white;
|
|
913
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
914
|
-
background-color: ${e=>{switch(e.category){case"small":return e.theme.colors.success||"#4CAF50";case"medium":return e.theme.colors.warning||"#FFA726";case"large":return e.theme.colors.error||"#EF5350";default:return e.theme.colors.textSecondary}}};
|
|
915
|
-
`;C.div`
|
|
916
|
-
display: flex;
|
|
917
|
-
flex-direction: column;
|
|
918
|
-
gap: 4px;
|
|
919
|
-
font-size: 0.85rem;
|
|
920
|
-
`;const zj=C.input`
|
|
921
|
-
width: 100%;
|
|
922
|
-
padding: 10px;
|
|
923
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
924
|
-
border-radius: 4px;
|
|
925
|
-
background-color: ${e=>e.theme.colors.inputBg};
|
|
926
|
-
color: ${e=>e.theme.colors.text};
|
|
927
|
-
margin-bottom: 12px;
|
|
928
|
-
font-size: 0.95rem;
|
|
929
|
-
|
|
930
|
-
&:focus {
|
|
931
|
-
outline: none;
|
|
932
|
-
border-color: ${e=>e.theme.colors.primary};
|
|
933
|
-
}
|
|
934
|
-
`,_j=C.span`
|
|
935
|
-
cursor: pointer;
|
|
936
|
-
display: inline-flex;
|
|
937
|
-
width: 16px;
|
|
938
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
939
|
-
&:hover {
|
|
940
|
-
color: ${e=>e.theme.colors.text};
|
|
941
|
-
}
|
|
942
|
-
`,Fj=C.div`
|
|
943
|
-
display: flex;
|
|
944
|
-
align-items: center;
|
|
945
|
-
gap: 4px;
|
|
946
|
-
flex-grow: 1;
|
|
947
|
-
overflow: hidden;
|
|
948
|
-
`,Oj=C.span`
|
|
949
|
-
font-size: 0.7rem;
|
|
950
|
-
padding: 2px 6px;
|
|
951
|
-
border-radius: 3px;
|
|
952
|
-
background-color: ${e=>e.theme.colors.success||"#4CAF50"};
|
|
953
|
-
color: white;
|
|
954
|
-
font-weight: 500;
|
|
955
|
-
margin-left: 8px;
|
|
956
|
-
`,Dj=C.div`
|
|
957
|
-
display: flex;
|
|
958
|
-
align-items: center;
|
|
959
|
-
gap: 12px;
|
|
960
|
-
margin-bottom: 12px;
|
|
961
|
-
`,Mj=C.label`
|
|
962
|
-
display: flex;
|
|
963
|
-
align-items: center;
|
|
964
|
-
gap: 6px;
|
|
965
|
-
font-size: 0.9rem;
|
|
966
|
-
cursor: pointer;
|
|
967
|
-
color: ${e=>e.theme.colors.text};
|
|
968
|
-
user-select: none;
|
|
969
|
-
`,Bj=C.div`
|
|
970
|
-
color: ${e=>e.theme.colors.error};
|
|
971
|
-
padding: 10px;
|
|
972
|
-
margin-bottom: 10px;
|
|
973
|
-
border: 1px solid ${e=>e.theme.colors.error};
|
|
974
|
-
border-radius: 4px;
|
|
975
|
-
background-color: rgba(255, 0, 0, 0.1);
|
|
976
|
-
`,Uj=C.div`
|
|
977
|
-
color: ${e=>e.theme.colors.success||"#4CAF50"};
|
|
978
|
-
padding: 10px;
|
|
979
|
-
margin-bottom: 10px;
|
|
980
|
-
border: 1px solid ${e=>e.theme.colors.success||"#4CAF50"};
|
|
981
|
-
border-radius: 4px;
|
|
982
|
-
background-color: rgba(0, 255, 0, 0.1);
|
|
983
|
-
`,Vj=C.div`
|
|
984
|
-
display: flex;
|
|
985
|
-
flex-direction: column;
|
|
986
|
-
align-items: center;
|
|
987
|
-
justify-content: center;
|
|
988
|
-
padding: 20px;
|
|
989
|
-
text-align: center;
|
|
990
|
-
gap: 20px;
|
|
991
|
-
height: 100%;
|
|
992
|
-
`;function ca(e){return e<1e3?`${e} tokens`:e<1e6?`${(e/1e3).toFixed(1)}K tokens`:`${(e/1e6).toFixed(1)}M tokens`}function Ky(e){return e<1e4?"small":e<1e5?"medium":"large"}function Qy(e,t){if(e.type==="file"){const r=t[e.path]||0;e.tokenCount=r,e.aggregatedTokenCount=r}else if(e.children){let r=0;for(const i of e.children)Qy(i,t),r+=i.aggregatedTokenCount||0;e.aggregatedTokenCount=r}else e.aggregatedTokenCount=0;e.formattedSize=ca(e.aggregatedTokenCount||0)}function Hj(e,t){var f;const r={children:[]},i=[...e].sort(),l=i.map(p=>p.split("/").filter(x=>x.length>0));let a=[];if(l.length>0){a=[...l[0]],a.pop();for(let p=1;p<l.length;p++){const x=l[p];let m=0;for(;m<a.length&&m<x.length-1&&x[m]===a[m];)m++;if(a=a.slice(0,m),a.length===0)break}}const u=a.length>0?"/"+a.join("/"):"";for(let p=0;p<i.length;p++){const m=l[p].slice(a.length);let v=r,w=u;for(let k=0;k<m.length;k++){const S=m[k],j=k===m.length-1;w+="/"+S;let E=(f=v.children)==null?void 0:f.find(I=>I.name===S);E||(E={name:S,path:w,type:j?"file":"folder",children:j?void 0:[],checked:!1,indeterminate:!1,collapsed:!1,visible:!0,inContext:!1},v.children=v.children||[],v.children.push(E)),v=E}}const c=r.children||[];if(t)for(const p of c)Qy(p,t);return{nodes:c,rootPath:u}}function Wj(e){e.type==="folder"&&(e.collapsed=!e.collapsed)}function Zs(e,t,r=!1){const i=t.toLowerCase();for(const l of e){const a=!t||l.name.toLowerCase().includes(i),u=!r||l.type==="file"&&!!l.inContext;if(l.children){Zs(l.children,t,r);const c=l.children.some(f=>f.visible);r?l.visible=c:l.visible=a||c}else l.visible=a&&u}}function ea(e,t){let r=!1;for(const i of e)i.type==="file"?i.visible&&(r=!0):i.children&&(ea(i.children)&&(i.collapsed=!1,r=!0),i.visible&&(r=!0));return r}function Yy(e,t){if(e.visible!==!1&&(e.checked=t,e.indeterminate=!1,e.children))for(const r of e.children)Yy(r,t)}function Xy(e){if(!e.children||e.children.length===0)return;let t=!0,r=!1,i=!1,l=0;for(const a of e.children)a.type==="folder"&&Xy(a),a.visible!==!1&&(l++,a.checked||(t=!1),a.checked&&(r=!0),a.indeterminate&&(i=!0));l>0&&(e.checked=t,e.indeterminate=!t&&(r||i))}function Fs(e){const t=[];function r(i){if(i.type==="file"&&i.checked&&t.push(i.path),i.children)for(const l of i.children)r(l)}for(const i of e)r(i);return t}function Zy(e){for(const t of e)t.children&&(Zy(t.children),t.containsContext=t.children.some(r=>r.inContext||r.containsContext))}function ev(e){e.sort((t,r)=>{const i=t.inContext||t.containsContext,l=r.inContext||r.containsContext;return i!==l?i?-1:1:t.type!==r.type?t.type==="folder"?-1:1:t.name.localeCompare(r.name)});for(const t of e)t.children&&ev(t.children)}const qj=()=>{const{isContextManagerOpen:e,toggleContextManager:t}=cn(),[r,i]=R.useState([]),[l,a]=R.useState(!1),[u,c]=R.useState(0),[,f]=R.useState(0),[p,x]=R.useState(0),[m,v]=R.useState(0),[w,k]=R.useState(0),[S,j]=R.useState("Loading..."),[E,I]=R.useState(""),[A,_]=R.useState(!0),[,O]=R.useState([]),[P,V]=R.useState(""),[K,re]=R.useState(null),[D,te]=R.useState(null),[se,ee]=R.useState(null),X=R.useCallback(async()=>{a(!0),j("Fetching files..."),re(null),te(null);try{const[he,pe]=await Promise.all([VC(),WC()]);O(pe),x(pe.length),v(he.length),f(he.length),j("Processing files...");const le={},ve=new Set;let Le=0;for(const bt of he)le[bt.path]=bt.tokenCount,ve.add(bt.path),Le+=bt.tokenCount;k(Le);const{nodes:Ie,rootPath:Ge}=Hj(pe,le);V(Ge);const Rt=bt=>{for(const Bt of bt)Bt.type==="file"?Bt.inContext=ve.has(Bt.path):Bt.children&&Rt(Bt.children)};Rt(Ie),Zy(Ie),ev(Ie),Zs(Ie,E,A),(E||A)&&ea(Ie,E),i(Ie),c(0)}catch(he){console.error("Failed to fetch context files:",he),re("Failed to fetch context files. Please try again.")}finally{a(!1)}},[E,A]);R.useEffect(()=>{e&&X()},[e,X]);const W=()=>{I(""),_(!0),re(null),te(null),ee(null),t()},ce=he=>{const pe=he.target.value;I(pe);const le=[...r];Zs(le,pe,A),(pe||A)&&ea(le),i(le)},de=he=>{const pe=he.target.checked;_(pe);const le=[...r];Zs(le,E,pe),(E||pe)&&ea(le),i(le)},Q=he=>{Wj(he),i([...r])},fe=he=>{const pe=!he.checked;Yy(he,pe);const le=Ie=>{for(const Ge of Ie)Ge.children&&(le(Ge.children),Xy(Ge))},ve=[...r];le(ve),i(ve);const Le=Fs(ve);c(Le.length)},T=async()=>{const he=Fs(r),pe=[],le=(ve,Le)=>{for(const Ie of ve){if(Ie.path===Le)return Ie;if(Ie.children){const Ge=le(Ie.children,Le);if(Ge)return Ge}}};for(const ve of he){const Le=le(r,ve);Le&&!Le.inContext&&pe.push(ve)}pe.length!==0&&ee({message:`Are you sure you want to add ${pe.length} file${pe.length>1?"s":""} to the context?`,onConfirm:async()=>{ee(null),a(!0),j("Adding files..."),re(null),te(null);try{const ve=await qC(pe);console.log("Context addition result:",ve),te(`Successfully added ${ve.added} file${ve.added>1?"s":""} to context.`),await X()}catch(ve){console.error("Failed to add context files:",ve),re("Failed to add files. Check console for details.")}finally{a(!1)}},onCancel:()=>{ee(null)}})},z=async()=>{const he=Fs(r),pe=[],le=(ve,Le)=>{for(const Ie of ve){if(Ie.path===Le)return Ie;if(Ie.children){const Ge=le(Ie.children,Le);if(Ge)return Ge}}};for(const ve of he){const Le=le(r,ve);Le&&Le.inContext&&pe.push(ve)}pe.length!==0&&ee({message:`Are you sure you want to remove ${pe.length} file${pe.length>1?"s":""} from the context?`,onConfirm:async()=>{ee(null),a(!0),j("Removing files..."),re(null),te(null);try{const ve=await HC(pe);console.log("Context removal result:",ve),te(`Successfully removed ${ve.removed} file${ve.removed>1?"s":""} from context.`),await X()}catch(ve){console.error("Failed to remove context files:",ve),re("Failed to remove files. Check console for details.")}finally{a(!1)}},onCancel:()=>{ee(null)}})},q=async()=>{ee({message:"This will analyze your context and remove files that are less relevant. Continue?",onConfirm:async()=>{ee(null),a(!0),j("Optimizing context..."),re(null),te(null);try{(await GC()).success?(te("Context optimization complete."),await X()):re("Context optimization failed. Please try again.")}catch(he){console.error("Failed to optimize context:",he),re("Failed to optimize context. Check console for details.")}finally{a(!1)}},onCancel:()=>{ee(null)}})},$=(he,pe=0)=>he.map(le=>le.visible===!1?null:h.jsxs(Tt.Fragment,{children:[h.jsxs($j,{children:[h.jsx(Ij,{level:pe}),le.type==="folder"?h.jsx(_j,{onClick:()=>Q(le),children:le.collapsed?"▶":"▼"}):h.jsx("span",{style:{width:"16px",display:"inline-block"}}),h.jsx(bg,{checked:le.checked||!1,ref:ve=>{ve&&(ve.indeterminate=le.indeterminate||!1)},onChange:()=>fe(le)}),h.jsxs(Fj,{onClick:()=>le.type==="folder"?Q(le):fe(le),children:[h.jsxs(Nj,{type:le.type,title:le.path,children:[le.type==="folder"?"📁 ":"📄 ",le.name]}),le.type==="file"&&le.inContext&&!A&&h.jsx(Oj,{children:"In Context"}),le.aggregatedTokenCount!==void 0&&le.aggregatedTokenCount>0&&h.jsxs(Aj,{category:Ky(le.aggregatedTokenCount),children:["(",le.formattedSize,")"]})]})]}),le.children&&!le.collapsed&&$(le.children,pe+1)]},le.path)),ue=()=>{const he=Fs(r);let pe=0,le=0;const ve=(Le,Ie)=>{for(const Ge of Le){if(Ge.path===Ie)return Ge;if(Ge.children){const Rt=ve(Ge.children,Ie);if(Rt)return Rt}}};for(const Le of he){const Ie=ve(r,Le);Ie&&(Ie.inContext?pe++:le++)}return{inContextCount:pe,notInContextCount:le}},{inContextCount:ge,notInContextCount:ke}=ue();return e?se?h.jsx(xg,{onClick:()=>ee(null),children:h.jsxs(yg,{onClick:he=>he.stopPropagation(),style:{maxWidth:"500px"},children:[h.jsxs(vg,{children:[h.jsx("h2",{children:"Confirm Action"}),h.jsx(wg,{onClick:()=>ee(null),children:"×"})]}),h.jsx(kg,{children:h.jsxs(Vj,{children:[h.jsx("p",{children:se.message}),h.jsxs(Sg,{children:[h.jsx(Jr,{onClick:se.onCancel,children:"Cancel"}),h.jsx(Jr,{variant:"primary",onClick:se.onConfirm,children:"Confirm"})]})]})})]})}):h.jsx(xg,{onClick:W,children:h.jsxs(yg,{onClick:he=>he.stopPropagation(),children:[h.jsxs(vg,{children:[h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[h.jsx("h2",{children:"Manage Context Files"}),P&&h.jsx("span",{style:{fontSize:"0.8rem",opacity:.7,fontFamily:"monospace"},children:P})]}),h.jsx(wg,{onClick:W,children:"×"})]}),h.jsxs(kg,{children:[K&&h.jsx(Bj,{children:K}),D&&h.jsx(Uj,{children:D}),h.jsxs(Pj,{children:[h.jsxs("span",{children:["Total Project Files: ",p]}),h.jsxs("span",{children:["In Context: ",m]}),h.jsxs("span",{children:["Selected: ",u]}),w>0&&h.jsxs("span",{children:["Total Context Size: ",ca(w)]})]}),h.jsx(zj,{placeholder:"Search files...",value:E,onChange:ce,autoFocus:!0}),h.jsx(Dj,{children:h.jsxs(Mj,{children:[h.jsx(bg,{checked:A,onChange:de}),"Show only in context"]})}),h.jsx(Rj,{children:l?h.jsx(Cg,{children:S}):r.length>0?$(r):h.jsx(Cg,{children:"No files found."})}),h.jsxs(Sg,{children:[h.jsx(Jr,{onClick:X,disabled:l,children:"Refresh"}),h.jsx(Jr,{onClick:q,disabled:l,title:"Optimize Context (Remove less relevant files)",children:"Optimize..."}),h.jsx(Jr,{variant:"primary",onClick:T,disabled:l||ke===0,children:"Add Selected"}),h.jsx(Jr,{variant:"danger",onClick:z,disabled:l||ge===0,children:"Remove Selected"}),h.jsx(Jr,{onClick:W,children:"Close"})]})]})]})}):null},Gj=C.span`
|
|
993
|
-
position: relative;
|
|
994
|
-
display: inline-flex;
|
|
995
|
-
align-items: center;
|
|
996
|
-
justify-content: center;
|
|
997
|
-
`,tv=()=>h.jsx(Gj,{children:h.jsx("span",{role:"img","aria-label":"Context Manager",children:"📂"})});var Hn=(e=>(e.USER="user",e.ASSISTANT="assistant",e.SYSTEM="system",e))(Hn||{}),nf=(e=>(e.CONVERSATION_SUMMARY="conversation-summary",e.MESSAGE_EDITABLE="editable",e))(nf||{});const wd=e=>e>=1e3?`Context size: ${(e/1e3).toFixed(1)}K tokens`:`Context size: ${e} tokens`,Eg=e=>e>=1e3?`${(e/1e3).toFixed(1)}K`:`${e}`,Jj=e=>{var r;const t=e.filter(i=>{var l;return[Hn.ASSISTANT,Hn.SYSTEM].includes(i.type)&&typeof((l=i.data)==null?void 0:l.contextSize)=="number"});if(t.length!==0)return(r=t[t.length-1].data)==null?void 0:r.contextSize},Kj=e=>{var r;const t=e.filter(i=>{var l;return i.type===Hn.SYSTEM&&typeof((l=i.data)==null?void 0:l.filesContextSize)=="number"});if(t.length!==0)return(r=t[t.length-1].data)==null?void 0:r.filesContextSize},rf=e=>{const t=Jj(e),r=Kj(e),i=t!==void 0?wd(t):"Context size N/A",l=r!==void 0?wd(r):"Files context N/A",[a,u]=R.useState(null),[c,f]=R.useState(null),[p,x]=R.useState(!1),[m,v]=R.useState(null),w=R.useCallback(async()=>{x(!0),v(null);try{const k=await fetch("/api/prompt",{method:"GET"});if(!k.ok)throw new Error(`Failed to fetch prompt context: ${k.status} ${k.statusText}`);const S=await k.json();u(S.promptItems??[]),f(typeof S.totalTokens=="number"?S.totalTokens:0)}catch(k){const S=k instanceof Error?k.message:"Unknown error fetching prompt context";v(S),u([]),f(0)}finally{x(!1)}},[]);return{contextSize:t,filesOnlyContextSize:r,formattedSize:i,formattedFilesSize:l,promptItems:a,totalTokens:c,loading:p,error:m,refreshPromptContext:w}},Qj=C.div`
|
|
998
|
-
position: absolute;
|
|
999
|
-
bottom: 100px;
|
|
1000
|
-
right: 30px;
|
|
1001
|
-
z-index: 1000;
|
|
1002
|
-
`,Yj=C.div`
|
|
1003
|
-
position: relative;
|
|
1004
|
-
display: inline-block;
|
|
1005
|
-
`,Xj=C(rr)`
|
|
1006
|
-
width: 50px;
|
|
1007
|
-
height: 50px;
|
|
1008
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
1009
|
-
color: ${({theme:e})=>e.colors.buttonText||"#ffffff"};
|
|
1010
|
-
border: none;
|
|
1011
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
1012
|
-
|
|
1013
|
-
&:hover {
|
|
1014
|
-
background-color: ${({theme:e})=>e.colors.primaryHover};
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
${({isActive:e,theme:t})=>e&&wt`
|
|
1018
|
-
background-color: ${t.colors.buttonHoverBg};
|
|
1019
|
-
border: 1px solid ${t.colors.primary};
|
|
1020
|
-
`}
|
|
1021
|
-
`,Zj=()=>{const{toggleContextManager:e,isContextManagerOpen:t,messages:r,executionStatus:i}=cn(),{filesOnlyContextSize:l}=rf(r),a=l?Ky(l):"small",u=l?ca(l).split(" ")[0]:"N/A";return i==="idle"?null:h.jsx(Qj,{children:h.jsxs(Yj,{children:[h.jsx(Xj,{onClick:e,"aria-label":"Toggle Context Manager",title:"Toggle Context Manager",isActive:t,children:h.jsx(tv,{})}),l!==void 0&&h.jsx(Lj,{category:a,title:`Context size: ${ca(l)}`,children:u})]})})},e2=C.div`
|
|
1022
|
-
position: fixed;
|
|
1023
|
-
top: 0;
|
|
1024
|
-
left: 0;
|
|
1025
|
-
right: 0;
|
|
1026
|
-
bottom: 0;
|
|
1027
|
-
background-color: rgba(0, 0, 0, 0.7);
|
|
1028
|
-
display: flex;
|
|
1029
|
-
justify-content: center;
|
|
1030
|
-
align-items: center;
|
|
1031
|
-
z-index: 1000;
|
|
1032
|
-
`,t2=C.div`
|
|
1033
|
-
background-color: ${({theme:e})=>e.colors.background};
|
|
1034
|
-
color: ${({theme:e})=>e.colors.text};
|
|
1035
|
-
border-radius: 8px;
|
|
1036
|
-
width: 90%;
|
|
1037
|
-
max-width: 800px;
|
|
1038
|
-
max-height: 90vh;
|
|
1039
|
-
display: flex;
|
|
1040
|
-
flex-direction: column;
|
|
1041
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
1042
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1043
|
-
`,n2=C.div`
|
|
1044
|
-
padding: 16px 24px;
|
|
1045
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
1046
|
-
display: flex;
|
|
1047
|
-
justify-content: space-between;
|
|
1048
|
-
align-items: center;
|
|
1049
|
-
|
|
1050
|
-
h2 {
|
|
1051
|
-
margin: 0;
|
|
1052
|
-
font-size: 1.25rem;
|
|
1053
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
1054
|
-
}
|
|
1055
|
-
`,r2=C.button`
|
|
1056
|
-
background: none;
|
|
1057
|
-
border: none;
|
|
1058
|
-
color: ${({theme:e})=>e.colors.text};
|
|
1059
|
-
font-size: 1.5rem;
|
|
1060
|
-
cursor: pointer;
|
|
1061
|
-
padding: 0;
|
|
1062
|
-
line-height: 1;
|
|
1063
|
-
|
|
1064
|
-
&:hover {
|
|
1065
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
1066
|
-
}
|
|
1067
|
-
`,o2=C.div`
|
|
1068
|
-
padding: 24px;
|
|
1069
|
-
overflow-y: auto;
|
|
1070
|
-
flex-grow: 1;
|
|
1071
|
-
display: flex;
|
|
1072
|
-
flex-direction: column;
|
|
1073
|
-
gap: 20px;
|
|
1074
|
-
`,i2=C.div`
|
|
1075
|
-
display: flex;
|
|
1076
|
-
justify-content: flex-end;
|
|
1077
|
-
gap: 12px;
|
|
1078
|
-
margin-top: 20px;
|
|
1079
|
-
padding-top: 20px;
|
|
1080
|
-
border-top: 1px solid ${({theme:e})=>e.colors.border};
|
|
1081
|
-
`,jg=C.button`
|
|
1082
|
-
padding: 8px 16px;
|
|
1083
|
-
border-radius: 4px;
|
|
1084
|
-
font-weight: 500;
|
|
1085
|
-
cursor: pointer;
|
|
1086
|
-
transition: all 0.2s;
|
|
1087
|
-
border: 1px solid transparent;
|
|
1088
|
-
|
|
1089
|
-
${({variant:e,theme:t})=>{switch(e){case"primary":return`
|
|
1090
|
-
background-color: ${t.colors.primary};
|
|
1091
|
-
color: white;
|
|
1092
|
-
&:hover { background-color: ${t.colors.primaryHover||t.colors.primary}; opacity: 0.9; }
|
|
1093
|
-
&:disabled { background-color: ${t.colors.border}; cursor: not-allowed; }
|
|
1094
|
-
`;case"danger":return`
|
|
1095
|
-
background-color: ${t.colors.error||"#dc3545"};
|
|
1096
|
-
color: white;
|
|
1097
|
-
&:hover { opacity: 0.9; }
|
|
1098
|
-
`;default:return`
|
|
1099
|
-
background-color: transparent;
|
|
1100
|
-
border-color: ${t.colors.border};
|
|
1101
|
-
color: ${t.colors.text};
|
|
1102
|
-
&:hover { background-color: ${t.colors.backgroundAlt}; }
|
|
1103
|
-
`}}}
|
|
1104
|
-
`,l2=C.div`
|
|
1105
|
-
background-color: ${({theme:e})=>e.colors.backgroundAlt};
|
|
1106
|
-
border-radius: 6px;
|
|
1107
|
-
padding: 16px;
|
|
1108
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1109
|
-
`,s2=C.h3`
|
|
1110
|
-
margin: 0 0 12px 0;
|
|
1111
|
-
font-size: 1rem;
|
|
1112
|
-
color: ${({theme:e})=>e.colors.text};
|
|
1113
|
-
display: flex;
|
|
1114
|
-
justify-content: space-between;
|
|
1115
|
-
align-items: center;
|
|
1116
|
-
`,a2=C.div`
|
|
1117
|
-
display: grid;
|
|
1118
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
1119
|
-
gap: 16px;
|
|
1120
|
-
margin-bottom: 16px;
|
|
1121
|
-
`,Tg=C.div`
|
|
1122
|
-
display: flex;
|
|
1123
|
-
flex-direction: column;
|
|
1124
|
-
gap: 4px;
|
|
1125
|
-
|
|
1126
|
-
span.label {
|
|
1127
|
-
font-size: 0.8rem;
|
|
1128
|
-
color: ${({theme:e})=>e.colors.textSecondary||"#888"};
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
span.value {
|
|
1132
|
-
font-size: 1.1rem;
|
|
1133
|
-
font-weight: 600;
|
|
1134
|
-
color: ${({theme:e})=>e.colors.text};
|
|
1135
|
-
}
|
|
1136
|
-
`,u2=C.div`
|
|
1137
|
-
display: flex;
|
|
1138
|
-
flex-direction: column;
|
|
1139
|
-
gap: 8px;
|
|
1140
|
-
max-height: 300px;
|
|
1141
|
-
overflow-y: auto;
|
|
1142
|
-
padding-right: 8px;
|
|
1143
|
-
|
|
1144
|
-
&::-webkit-scrollbar {
|
|
1145
|
-
width: 6px;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
&::-webkit-scrollbar-track {
|
|
1149
|
-
background: ${({theme:e})=>e.colors.background};
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
&::-webkit-scrollbar-thumb {
|
|
1153
|
-
background: ${({theme:e})=>e.colors.border};
|
|
1154
|
-
border-radius: 3px;
|
|
1155
|
-
}
|
|
1156
|
-
`,c2=C.div`
|
|
1157
|
-
display: flex;
|
|
1158
|
-
flex-direction: column;
|
|
1159
|
-
padding: 8px 12px;
|
|
1160
|
-
background-color: ${({theme:e})=>e.colors.background};
|
|
1161
|
-
border-left: 3px solid
|
|
1162
|
-
${({type:e,theme:t})=>e==="systemPrompt"?t.colors.warning||"#f0ad4e":e==="user"?t.colors.success||"#5cb85c":t.colors.primary};
|
|
1163
|
-
border-radius: 4px;
|
|
1164
|
-
font-size: 0.9rem;
|
|
1165
|
-
cursor: help;
|
|
1166
|
-
transition: background-color 0.2s;
|
|
1167
|
-
|
|
1168
|
-
&:hover {
|
|
1169
|
-
background-color: ${({theme:e})=>e.colors.backgroundAlt};
|
|
1170
|
-
}
|
|
1171
|
-
`,d2=C.div`
|
|
1172
|
-
display: flex;
|
|
1173
|
-
justify-content: space-between;
|
|
1174
|
-
align-items: center;
|
|
1175
|
-
margin-bottom: 4px;
|
|
1176
|
-
`,f2=C.span`
|
|
1177
|
-
font-weight: 600;
|
|
1178
|
-
text-transform: capitalize;
|
|
1179
|
-
min-width: 100px;
|
|
1180
|
-
`,p2=C.span`
|
|
1181
|
-
font-family: monospace;
|
|
1182
|
-
font-size: 0.8rem;
|
|
1183
|
-
opacity: 0.7;
|
|
1184
|
-
min-width: 60px;
|
|
1185
|
-
text-align: right;
|
|
1186
|
-
`,h2=C.div`
|
|
1187
|
-
font-size: 0.85rem;
|
|
1188
|
-
opacity: 0.8;
|
|
1189
|
-
white-space: nowrap;
|
|
1190
|
-
overflow: hidden;
|
|
1191
|
-
text-overflow: ellipsis;
|
|
1192
|
-
max-width: 100%;
|
|
1193
|
-
`,m2=C.div`
|
|
1194
|
-
height: 4px;
|
|
1195
|
-
background-color: ${({theme:e})=>e.colors.border};
|
|
1196
|
-
border-radius: 2px;
|
|
1197
|
-
overflow: hidden;
|
|
1198
|
-
margin-top: 20px;
|
|
1199
|
-
|
|
1200
|
-
&::after {
|
|
1201
|
-
content: '';
|
|
1202
|
-
display: block;
|
|
1203
|
-
height: 100%;
|
|
1204
|
-
width: ${({progress:e})=>e}%;
|
|
1205
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
1206
|
-
transition: width 0.3s ease;
|
|
1207
|
-
}
|
|
1208
|
-
`,g2=C.div`
|
|
1209
|
-
padding: 12px;
|
|
1210
|
-
border-radius: 4px;
|
|
1211
|
-
margin-top: 16px;
|
|
1212
|
-
background-color: ${({type:e,theme:t})=>e==="success"?t.colors.successBg||"rgba(92, 184, 92, 0.1)":t.colors.errorBg||"rgba(220, 53, 69, 0.1)"};
|
|
1213
|
-
color: ${({type:e,theme:t})=>e==="success"?t.colors.success||"#5cb85c":t.colors.error||"#dc3545"};
|
|
1214
|
-
border: 1px solid
|
|
1215
|
-
${({type:e,theme:t})=>e==="success"?t.colors.success||"#5cb85c":t.colors.error||"#dc3545"};
|
|
1216
|
-
`,x2=()=>{const{isCompressionModalOpen:e,toggleCompressionModal:t}=cn(),[r,i]=R.useState(!1),[l,a]=R.useState(null),[u,c]=R.useState([]),[f,p]=R.useState(0),x=R.useCallback(async()=>{i(!0);try{const v=await JC();c(v.preview),p(v.totalTokens)}catch(v){console.error("Failed to get context preview:",v)}finally{i(!1)}},[]);R.useEffect(()=>{e&&(x(),a(null))},[e,x]);const m=async()=>{i(!0),a(null);try{const v=await KC();a({success:!0,message:`Compression successful! Reduced context by ${v.savedTokens||"unknown"} tokens.`}),x()}catch(v){a({success:!1,message:v instanceof Error?v.message:"Compression failed"})}finally{i(!1)}};return e?h.jsx(e2,{onClick:t,children:h.jsxs(t2,{onClick:v=>v.stopPropagation(),children:[h.jsxs(n2,{children:[h.jsx("h2",{children:"Context Compression Tool"}),h.jsx(r2,{onClick:t,children:"×"})]}),h.jsxs(o2,{children:[h.jsx("p",{children:"This tool analyzes the current conversation context and compresses it to save tokens while preserving essential information. It will summarize past interactions and remove redundant data."}),h.jsxs(l2,{children:[h.jsxs(s2,{children:["Context Preview",h.jsx("span",{style:{fontSize:"0.8rem",fontWeight:"normal",opacity:.7},children:"(Actual breakdown)"})]}),h.jsxs(a2,{children:[h.jsxs(Tg,{children:[h.jsx("span",{className:"label",children:"Total Items"}),h.jsx("span",{className:"value",children:u.length})]}),h.jsxs(Tg,{children:[h.jsx("span",{className:"label",children:"Total Tokens"}),h.jsx("span",{className:"value",children:f.toLocaleString()})]})]}),h.jsx(u2,{children:u.map((v,w)=>h.jsxs(c2,{type:v.type,title:v.summary,children:[h.jsxs(d2,{children:[h.jsx(f2,{children:v.type==="systemPrompt"?"System":v.type}),h.jsxs(p2,{children:[v.tokenCount,"t"]})]}),h.jsx(h2,{children:v.summary})]},w))})]}),r&&h.jsx(m2,{progress:100,className:"animate-pulse"}),l&&h.jsx(g2,{type:l.success?"success":"error",children:l.message}),h.jsxs(i2,{children:[h.jsx(jg,{onClick:t,disabled:r,children:"Close"}),h.jsx(jg,{variant:"primary",onClick:m,disabled:r,children:r?"Compressing...":"Compress Context"})]})]})]})}):null},y2=C.button`
|
|
1217
|
-
position: absolute;
|
|
1218
|
-
bottom: 160px; /* Positioned above the context manager button (which is at ~90px) */
|
|
1219
|
-
right: 30px;
|
|
1220
|
-
width: 48px;
|
|
1221
|
-
height: 48px;
|
|
1222
|
-
border-radius: 50%;
|
|
1223
|
-
background-color: ${({theme:e})=>e.colors.background};
|
|
1224
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
1225
|
-
color: ${({theme:e})=>e.colors.text};
|
|
1226
|
-
display: flex;
|
|
1227
|
-
justify-content: center;
|
|
1228
|
-
align-items: center;
|
|
1229
|
-
cursor: pointer;
|
|
1230
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1231
|
-
z-index: 95;
|
|
1232
|
-
font-size: 1.5rem;
|
|
1233
|
-
transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
1234
|
-
|
|
1235
|
-
&:hover {
|
|
1236
|
-
transform: scale(1.1);
|
|
1237
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
1238
|
-
color: white;
|
|
1239
|
-
border-color: ${({theme:e})=>e.colors.primary};
|
|
1240
|
-
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
&:active {
|
|
1244
|
-
transform: scale(0.95);
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
@media (max-width: 768px) {
|
|
1248
|
-
bottom: 140px;
|
|
1249
|
-
right: 16px;
|
|
1250
|
-
width: 42px;
|
|
1251
|
-
height: 42px;
|
|
1252
|
-
font-size: 1.2rem;
|
|
1253
|
-
}
|
|
1254
|
-
`,v2=C.div`
|
|
1255
|
-
position: absolute;
|
|
1256
|
-
top: -8px;
|
|
1257
|
-
right: -8px;
|
|
1258
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
1259
|
-
color: white;
|
|
1260
|
-
border-radius: 12px;
|
|
1261
|
-
min-width: 32px;
|
|
1262
|
-
height: 24px;
|
|
1263
|
-
padding: 0 8px;
|
|
1264
|
-
font-size: 11px;
|
|
1265
|
-
font-weight: 600;
|
|
1266
|
-
line-height: 24px;
|
|
1267
|
-
text-align: center;
|
|
1268
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
1269
|
-
pointer-events: none;
|
|
1270
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
|
|
1271
|
-
letter-spacing: 0.3px;
|
|
1272
|
-
|
|
1273
|
-
@media (max-width: 768px) {
|
|
1274
|
-
font-size: 10px;
|
|
1275
|
-
min-width: 28px;
|
|
1276
|
-
height: 20px;
|
|
1277
|
-
line-height: 20px;
|
|
1278
|
-
padding: 0 6px;
|
|
1279
|
-
}
|
|
1280
|
-
`,w2=()=>{const{toggleCompressionModal:e,messages:t,executionStatus:r}=cn(),{contextSize:i}=rf(t);return r==="idle"?null:h.jsxs(y2,{onClick:e,title:`Compress Context${i?` (${Eg(i)} tokens)`:""}`,"aria-label":"Open Context Compression Tool",children:["📉",i!==void 0&&i>0&&h.jsx(v2,{children:Eg(i)})]})},k2="https://github.com/gtanczyk/genaicode/issues",b2=({themeToggle:e,chatInterface:t,inputArea:r,usage:i,toggleTheme:l})=>{const[a,u]=R.useState(!1),{toggleContextManager:c}=cn(),f=[{content:h.jsx(WE,{}),ariaLabel:"Service Configuration",key:"service-config",onClick:Vy},{content:h.jsx(cE,{}),ariaLabel:"Health Check",key:"health-check",onClick:Oy},{content:h.jsx(YC,{}),ariaLabel:"Content Generation",key:"content-gen",onClick:Fy},{content:h.jsx(tv,{}),ariaLabel:"Manage Context",key:"manage-context",onClick:c},{content:h.jsx(yj,{}),ariaLabel:"Genaicode Config",key:"genaicode-config",onClick:Gy},{content:e,ariaLabel:"Theme Toggle",key:"theme-toggle",onClick:l},{content:h.jsx(ij,{}),ariaLabel:"Information",key:"info",onClick:qy},{content:h.jsx(rr,{children:"🐛"}),ariaLabel:"Report Bug",key:"report-bug",onClick:()=>window.open(k2,"_blank","noopener,noreferrer")}];return h.jsxs(S2,{children:[h.jsxs(C2,{children:[h.jsx(E2,{children:h.jsxs(j2,{children:[h.jsx(T2,{children:"GenAIcode"}),h.jsxs(R2,{children:["v",wj]})]})}),h.jsxs($2,{children:[h.jsx(I2,{children:h.jsx(Qb,{usage:i})}),h.jsx(N2,{children:h.jsx(nj,{menuItems:f,isOpen:a,onToggle:()=>u(!a),buttonAriaLabel:"Toggle navigation menu",menuAriaLabel:"Navigation menu",position:{top:"100%",right:0}})})]})]}),h.jsxs(P2,{children:[h.jsx(A2,{children:t}),h.jsx(L2,{children:r}),h.jsx(Tj,{}),h.jsx(w2,{}),h.jsx(Zj,{}),h.jsx(qj,{}),h.jsx(x2,{})]})]})},S2=C.div`
|
|
1281
|
-
display: flex;
|
|
1282
|
-
flex-direction: column;
|
|
1283
|
-
height: 100vh;
|
|
1284
|
-
max-width: 1200px;
|
|
1285
|
-
margin: 0 auto;
|
|
1286
|
-
padding: 0 10px;
|
|
1287
|
-
`,C2=C.header`
|
|
1288
|
-
position: relative;
|
|
1289
|
-
display: flex;
|
|
1290
|
-
justify-content: space-between;
|
|
1291
|
-
align-items: center;
|
|
1292
|
-
padding: 10px 0;
|
|
1293
|
-
flex-wrap: nowrap;
|
|
1294
|
-
gap: 10px;
|
|
1295
|
-
`,E2=C.div`
|
|
1296
|
-
display: flex;
|
|
1297
|
-
align-items: center;
|
|
1298
|
-
gap: 10px;
|
|
1299
|
-
`,j2=C.div`
|
|
1300
|
-
position: relative;
|
|
1301
|
-
`,T2=C.h1`
|
|
1302
|
-
text-transform: uppercase;
|
|
1303
|
-
font-family: 'Press Start 2P', system-ui;
|
|
1304
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
1305
|
-
margin: 0;
|
|
1306
|
-
font-size: clamp(0.6rem, 2.5vw, 1.5rem);
|
|
1307
|
-
white-space: nowrap;
|
|
1308
|
-
overflow: hidden;
|
|
1309
|
-
text-overflow: ellipsis;
|
|
1310
|
-
`,R2=C.span`
|
|
1311
|
-
position: absolute;
|
|
1312
|
-
bottom: 0;
|
|
1313
|
-
right: 0;
|
|
1314
|
-
font-size: 0.6rem;
|
|
1315
|
-
color: ${({theme:e})=>e.colors.text};
|
|
1316
|
-
background-color: ${({theme:e})=>e.colors.backgroundAlt};
|
|
1317
|
-
padding: 2px 4px;
|
|
1318
|
-
border-radius: 3px;
|
|
1319
|
-
transform: translateY(100%);
|
|
1320
|
-
white-space: nowrap;
|
|
1321
|
-
`,$2=C.div`
|
|
1322
|
-
display: flex;
|
|
1323
|
-
align-items: center;
|
|
1324
|
-
gap: 16px;
|
|
1325
|
-
flex-wrap: nowrap;
|
|
1326
|
-
flex-shrink: 0;
|
|
1327
|
-
|
|
1328
|
-
@media (max-width: 576px) {
|
|
1329
|
-
gap: 8px;
|
|
1330
|
-
}
|
|
1331
|
-
`,I2=C.div`
|
|
1332
|
-
flex-shrink: 1;
|
|
1333
|
-
min-width: 0;
|
|
1334
|
-
`,N2=C.div`
|
|
1335
|
-
display: flex;
|
|
1336
|
-
align-items: center;
|
|
1337
|
-
|
|
1338
|
-
@media (max-width: 576px) {
|
|
1339
|
-
position: relative;
|
|
1340
|
-
}
|
|
1341
|
-
`,P2=C.main`
|
|
1342
|
-
display: flex;
|
|
1343
|
-
flex-direction: column;
|
|
1344
|
-
flex-grow: 1;
|
|
1345
|
-
min-height: 0;
|
|
1346
|
-
position: relative;
|
|
1347
|
-
z-index: 1;
|
|
1348
|
-
`,A2=C.div`
|
|
1349
|
-
flex-grow: 1;
|
|
1350
|
-
overflow: hidden;
|
|
1351
|
-
margin-bottom: 20px;
|
|
1352
|
-
`,L2=C.div`
|
|
1353
|
-
flex-shrink: 0;
|
|
1354
|
-
`,z2=({codegenOptions:e})=>{const{setCurrentPrompt:t,setExecutionStatus:r,setCurrentQuestion:i,setCodegenOptions:l,handlePauseExecution:a,handleResumeExecution:u}=R.useContext(ri),c=async(w,k)=>{t(w),r("executing");try{if(await yd()==="executing"){console.warn("Execution is already executing"),r("executing");return}if(!e){console.error("Codegen options not available"),r("idle");return}await PC(w,e,k.length>0?k:void 0),l({...e,initialActionType:void 0}),r("executing")}catch(S){console.error("Failed to execute codegen:",S),r("idle")}},f=async(w,k,S,j,E,I)=>{const A=await vd();if(A)try{if(i(null),e){const _={...e,aiService:j??e.aiService};l(_),await _C(A.id,w,S,_,k,E,I)}else console.error("Codegen options not available for submitting answer")}catch(_){console.error("Failed to submit answer:",_),i(A)}},p=async()=>{try{i(null),await AC()}catch(w){console.error("Failed to interrupt execution:",w)}},x=R.useCallback(w=>{l(w)},[l]);return{handleExecute:c,handleQuestionSubmit:f,handleInterrupt:p,handleOptionsChange:x,handlePauseExecution:a,handleResumeExecution:u}};function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},J.apply(null,arguments)}function Oe(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var nv={},rv=R.createContext(nv),_2=(e,t)=>J({},e,t),F2=()=>R.useContext(rv),of=R.createContext(()=>{});of.displayName="JVR.DispatchShowTools";function O2(){return R.useReducer(_2,nv)}function ov(){return R.useContext(of)}var iv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(rv.Provider,{value:t,children:h.jsx(of.Provider,{value:r,children:i})})};iv.displayName="JVR.ShowTools";var lv={},sv=R.createContext(lv),D2=(e,t)=>J({},e,t),Na=()=>R.useContext(sv),lf=R.createContext(()=>{});lf.displayName="JVR.DispatchExpands";function M2(){return R.useReducer(D2,lv)}function B2(){return R.useContext(lf)}var av=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(sv.Provider,{value:t,children:h.jsx(lf.Provider,{value:r,children:i})})};av.displayName="JVR.Expands";var uv={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},cv=R.createContext(uv),U2=(e,t)=>J({},e,t),Ye=()=>R.useContext(cv),sf=R.createContext(()=>{});sf.displayName="JVR.DispatchTypes";function V2(){return R.useReducer(U2,uv)}function H2(){return R.useContext(sf)}function dv(e){var{initial:t,dispatch:r,children:i}=e;return h.jsx(cv.Provider,{value:t,children:h.jsx(sf.Provider,{value:r,children:i})})}dv.displayName="JVR.Types";var W2=["style"];function fv(e){var{style:t}=e,r=Oe(e,W2),i=J({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},t);return h.jsx("svg",J({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:i},r,{children:h.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}fv.displayName="JVR.TriangleArrow";var pv={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:h.jsx(fv,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},hv=R.createContext(pv),q2=(e,t)=>J({},e,t),Yt=()=>R.useContext(hv),af=R.createContext(()=>{});af.displayName="JVR.DispatchSymbols";function G2(){return R.useReducer(q2,pv)}function J2(){return R.useContext(af)}var mv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(hv.Provider,{value:t,children:h.jsx(af.Provider,{value:r,children:i})})};mv.displayName="JVR.Symbols";var gv={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},xv=R.createContext(gv),K2=(e,t)=>J({},e,t),bn=()=>R.useContext(xv),uf=R.createContext(()=>{});uf.displayName="JVR.DispatchSection";function Q2(){return R.useReducer(K2,gv)}function Y2(){return R.useContext(uf)}var yv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(xv.Provider,{value:t,children:h.jsx(uf.Provider,{value:r,children:i})})};yv.displayName="JVR.Section";var vv={objectSortKeys:!1,indentWidth:15},cf=R.createContext(vv);cf.displayName="JVR.Context";var wv=R.createContext(()=>{});wv.displayName="JVR.DispatchContext";function X2(e,t){return J({},e,t)}var ao=()=>R.useContext(cf),kv=e=>{var{children:t,initialState:r,initialTypes:i}=e,[l,a]=R.useReducer(X2,Object.assign({},vv,r)),[u,c]=O2(),[f,p]=M2(),[x,m]=V2(),[v,w]=G2(),[k,S]=Q2();return R.useEffect(()=>a(J({},r)),[r]),h.jsx(cf.Provider,{value:l,children:h.jsx(wv.Provider,{value:a,children:h.jsx(iv,{initial:u,dispatch:c,children:h.jsx(av,{initial:f,dispatch:p,children:h.jsx(dv,{initial:J({},x,i),dispatch:m,children:h.jsx(mv,{initial:v,dispatch:w,children:h.jsx(yv,{initial:k,dispatch:S,children:t})})})})})})})};kv.displayName="JVR.Provider";function Z2(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var eT=["isNumber","value","parentValue","keyName","keys"],tT=["as","render"],nT=["as","render"],rT=["as","render"],oT=["as","style","render"],iT=["as","render"],lT=["as","render"],sT=["as","render"],aT=["as","render"],kd=e=>{var{Quote:t={}}=Yt(),{isNumber:r,value:i,parentValue:l,keyName:a,keys:u}=e,c=Oe(e,eT);if(r)return null;var{as:f,render:p}=t,x=Oe(t,tT),m=f||"span",v=J({},c,x),w={value:i,parentValue:l,keyName:a,keys:u||(a?[a]:[])},k=p&&typeof p=="function"&&p(v,w);return k||h.jsx(m,J({},v))};kd.displayName="JVR.Quote";var ul=e=>{var{ValueQuote:t={}}=Yt(),r=J({},(Z2(e),e)),{as:i,render:l}=t,a=Oe(t,nT),u=i||"span",c=J({},r,a),f=l&&typeof l=="function"&&l(c,{});return f||h.jsx(u,J({},c))};ul.displayName="JVR.ValueQuote";var bv=e=>{var{value:t,parentValue:r,keyName:i,keys:l}=e,{Colon:a={}}=Yt(),{as:u,render:c}=a,f=Oe(a,rT),p=u||"span",x=c&&typeof c=="function"&&c(f,{value:t,parentValue:r,keyName:i,keys:l||(i?[i]:[])});return x||h.jsx(p,J({},f))};bv.displayName="JVR.Colon";var Sv=e=>{var{Arrow:t={}}=Yt(),r=Na(),{expandKey:i,style:l,value:a,parentValue:u,keyName:c,keys:f}=e,p=!!r[i],{as:x,style:m,render:v}=t,w=Oe(t,oT),k=x||"span",S=v&&typeof v=="function",j=J({},w,{"data-expanded":p,style:J({},m,l)}),E={value:a,parentValue:u,keyName:c,keys:f||(c?[c]:[])},I=S&&v(j,E);return I||h.jsx(k,J({},w,{style:J({},m,l)}))};Sv.displayName="JVR.Arrow";var Cv=e=>{var{isBrackets:t,value:r,parentValue:i,keyName:l,keys:a}=e,{BracketsLeft:u={},BraceLeft:c={}}=Yt(),f={value:r,parentValue:i,keyName:l,keys:a||(l?[l]:[])};if(t){var{as:p,render:x}=u,m=Oe(u,iT),v=p||"span",w=x&&typeof x=="function"&&x(m,f);return w||h.jsx(v,J({},m))}var{as:k,render:S}=c,j=Oe(c,lT),E=k||"span",I=S&&typeof S=="function"&&S(j,f);return I||h.jsx(E,J({},j))};Cv.displayName="JVR.BracketsOpen";var df=e=>{var{isBrackets:t,isVisiable:r,value:i,parentValue:l,keyName:a,keys:u}=e,c={value:i,parentValue:l,keyName:a,keys:u||(a?[a]:[])};if(!r)return null;var{BracketsRight:f={},BraceRight:p={}}=Yt();if(t){var{as:x,render:m}=f,v=Oe(f,sT),w=x||"span",k=m&&typeof m=="function"&&m(v,c);return k||h.jsx(w,J({},v))}var{as:S,render:j}=p,E=Oe(p,aT),I=S||"span",A=j&&typeof j=="function"&&j(E,c);return A||h.jsx(I,J({},E))};df.displayName="JVR.BracketsClose";var Ev=e=>{var t,{value:r,expandKey:i,level:l,keys:a=[]}=e,u=Na(),c=Array.isArray(r),{collapsed:f,shouldExpandNodeInitially:p}=ao(),x=r instanceof Set,m=typeof f=="boolean"?f:typeof f=="number"?l>f:!1,v=(t=u[i])!=null?t:m,w=Object.keys(r).length;if(u[i]===void 0&&p&&p(v,{value:r,keys:a,level:l})||v||w===0)return null;var k={paddingLeft:4};return h.jsx("div",{style:k,children:h.jsx(df,{isBrackets:c||x,isVisiable:!0})})};Ev.displayName="JVR.NestedClose";var uT=["as","render"],cT=["as","render"],dT=["as","render"],fT=["as","render"],pT=["as","render"],hT=["as","render"],mT=["as","render"],gT=["as","render"],xT=["as","render"],yT=["as","render"],vT=["as","render"],wT=["as","render"],kT=["as","render"],bd=e=>{if(e===void 0)return"0n";if(typeof e=="string")try{e=BigInt(e)}catch{return"0n"}return e?e.toString()+"n":"0n"},jv=e=>{var{value:t,keyName:r}=e,{Set:i={},displayDataTypes:l}=Ye(),a=t instanceof Set;if(!a||!l)return null;var{as:u,render:c}=i,f=Oe(i,uT),p=c&&typeof c=="function",x=p&&c(f,{type:"type",value:t,keyName:r});if(x)return x;var m=u||"span";return h.jsx(m,J({},f))};jv.displayName="JVR.SetComp";var Tv=e=>{var{value:t,keyName:r}=e,{Map:i={},displayDataTypes:l}=Ye(),a=t instanceof Map;if(!a||!l)return null;var{as:u,render:c}=i,f=Oe(i,cT),p=c&&typeof c=="function",x=p&&c(f,{type:"type",value:t,keyName:r});if(x)return x;var m=u||"span";return h.jsx(m,J({},f))};Tv.displayName="JVR.MapComp";var Ln={opacity:.75,paddingRight:4},Rv=e=>{var{children:t="",keyName:r}=e,{Str:i={},displayDataTypes:l}=Ye(),{shortenTextAfterLength:a=30}=ao(),{as:u,render:c}=i,f=Oe(i,dT),p=t,[x,m]=R.useState(a&&p.length>a);R.useEffect(()=>m(a&&p.length>a),[a]);var v=u||"span",w=J({},Ln,i.style||{});a>0&&(f.style=J({},f.style,{cursor:p.length<=a?"initial":"pointer"}),p.length>a&&(f.onClick=()=>{m(!x)}));var k=x?p.slice(0,a)+"...":p,S=c&&typeof c=="function",j=S&&c(J({},f,{style:w}),{type:"type",value:t,keyName:r}),E=S&&c(J({},f,{children:k,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(j||h.jsx(v,J({},f,{style:w}))),E||h.jsxs(R.Fragment,{children:[h.jsx(ul,{}),h.jsx(v,J({},f,{className:"w-rjv-value",children:k})),h.jsx(ul,{})]})]})};Rv.displayName="JVR.TypeString";var $v=e=>{var{children:t,keyName:r}=e,{True:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,fT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v||h.jsx(f,J({},c,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};$v.displayName="JVR.TypeTrue";var Iv=e=>{var{children:t,keyName:r}=e,{False:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,pT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v||h.jsx(f,J({},c,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Iv.displayName="JVR.TypeFalse";var Nv=e=>{var{children:t,keyName:r}=e,{Float:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,hT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v||h.jsx(f,J({},c,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Nv.displayName="JVR.TypeFloat";var Pv=e=>{var{children:t,keyName:r}=e,{Int:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,mT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v||h.jsx(f,J({},c,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Pv.displayName="JVR.TypeInt";var Av=e=>{var{children:t,keyName:r}=e,{Bigint:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,gT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v||h.jsx(f,J({},c,{className:"w-rjv-value",children:bd(t==null?void 0:t.toString())}))]})};Av.displayName="JVR.TypeFloat";var Lv=e=>{var{children:t,keyName:r}=e,{Url:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,xT),f=a||"span",p=J({},Ln,i.style),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t==null?void 0:t.href,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v||h.jsxs("a",J({href:t==null?void 0:t.href,target:"_blank"},c,{className:"w-rjv-value",children:[h.jsx(ul,{}),t==null?void 0:t.href,h.jsx(ul,{})]}))]})};Lv.displayName="JVR.TypeUrl";var zv=e=>{var{children:t,keyName:r}=e,{Date:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,yT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=t instanceof Date?t.toLocaleString():t,w=x&&u(J({},c,{children:v,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),w||h.jsx(f,J({},c,{className:"w-rjv-value",children:v}))]})};zv.displayName="JVR.TypeDate";var _v=e=>{var{children:t,keyName:r}=e,{Undefined:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,vT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v]})};_v.displayName="JVR.TypeUndefined";var Fv=e=>{var{children:t,keyName:r}=e,{Null:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,wT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v]})};Fv.displayName="JVR.TypeNull";var Ov=e=>{var{children:t,keyName:r}=e,{Nan:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,c=Oe(i,kT),f=a||"span",p=J({},Ln,i.style||{}),x=u&&typeof u=="function",m=x&&u(J({},c,{style:p}),{type:"type",value:t,keyName:r}),v=x&&u(J({},c,{children:t==null?void 0:t.toString(),className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs(R.Fragment,{children:[l&&(m||h.jsx(f,J({},c,{style:p}))),v]})};Ov.displayName="JVR.TypeNan";var bT=e=>Number(e)===e&&e%1!==0||isNaN(e),Dv=e=>{var{value:t,keyName:r}=e,i={keyName:r};return t instanceof URL?h.jsx(Lv,J({},i,{children:t})):typeof t=="string"?h.jsx(Rv,J({},i,{children:t})):t===!0?h.jsx($v,J({},i,{children:t})):t===!1?h.jsx(Iv,J({},i,{children:t})):t===null?h.jsx(Fv,J({},i,{children:t})):t===void 0?h.jsx(_v,J({},i,{children:t})):t instanceof Date?h.jsx(zv,J({},i,{children:t})):typeof t=="number"&&isNaN(t)?h.jsx(Ov,J({},i,{children:t})):typeof t=="number"&&bT(t)?h.jsx(Nv,J({},i,{children:t})):typeof t=="bigint"?h.jsx(Av,J({},i,{children:t})):typeof t=="number"?h.jsx(Pv,J({},i,{children:t})):null};Dv.displayName="JVR.Value";function Ir(e,t,r){var i=J2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});R.useEffect(()=>i({[r]:a}),[t])}function dn(e,t,r){var i=H2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});R.useEffect(()=>i({[r]:a}),[t])}function oi(e,t,r){var i=Y2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});R.useEffect(()=>i({[r]:a}),[t])}var ST=["as","render"],Mv=e=>{var{KeyName:t={}}=bn();return oi(t,e,"KeyName"),null};Mv.displayName="JVR.KeyName";var Bv=e=>{var{children:t,value:r,parentValue:i,keyName:l,keys:a}=e,u=typeof t=="number",c={color:u?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:f={}}=bn(),{as:p,render:x}=f,m=Oe(f,ST);m.style=J({},m.style,c);var v=p||"span",w=x&&typeof x=="function"&&x(J({},m,{children:t}),{value:r,parentValue:i,keyName:l,keys:a||(l?[l]:[])});return w||h.jsx(v,J({},m,{children:t}))};Bv.displayName="JVR.KeyNameComp";var CT=["children","value","parentValue","keyName","keys"],ET=["as","render","children"],Uv=e=>{var{Row:t={}}=bn();return oi(t,e,"Row"),null};Uv.displayName="JVR.Row";var Vv=e=>{var{children:t,value:r,parentValue:i,keyName:l,keys:a}=e,u=Oe(e,CT),{Row:c={}}=bn(),{as:f,render:p}=c,x=Oe(c,ET),m=f||"div",v=p&&typeof p=="function"&&p(J({},u,x,{children:t}),{value:r,keyName:l,parentValue:i,keys:a});return v||h.jsx(m,J({},u,x,{children:t}))};Vv.displayName="JVR.RowComp";function jT(e){var t=R.useRef();return R.useEffect(()=>{t.current=e}),t.current}function TT(e){var{value:t,highlightUpdates:r,highlightContainer:i}=e,l=jT(t),a=R.useMemo(()=>{if(!r||l===void 0)return!1;if(typeof t!=typeof l)return!0;if(typeof t=="number")return isNaN(t)&&isNaN(l)?!1:t!==l;if(Array.isArray(t)!==Array.isArray(l))return!0;if(typeof t=="object"||typeof t=="function")return!1;if(t!==l)return!0},[r,t]);R.useEffect(()=>{i&&i.current&&a&&"animate"in i.current&&i.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[a,t,i])}var RT=["keyName","value","parentValue","expandKey","keys"],$T=["as","render"],ff=e=>{var{keyName:t,value:r,parentValue:i,expandKey:l,keys:a}=e,u=Oe(e,RT),{onCopied:c,enableClipboard:f}=ao(),p=F2(),x=p[l],[m,v]=R.useState(!1),{Copied:w={}}=bn();if(f===!1||!x)return null;var k=O=>{O.stopPropagation();var P="";typeof r=="number"&&r===1/0?P="Infinity":typeof r=="number"&&isNaN(r)?P="NaN":typeof r=="bigint"?P=bd(r):r instanceof Date?P=r.toLocaleString():P=JSON.stringify(r,(K,re)=>typeof re=="bigint"?bd(re):re,2),c&&c(P,r),v(!0);var V=navigator.clipboard||{writeText(K){return new Promise((re,D)=>{var te=document.createElement("textarea");te.style.position="absolute",te.style.opacity="0",te.style.left="-99999999px",te.value=K,document.body.appendChild(te),te.select(),document.execCommand("copy")?re():D(),te.remove()})}};V.writeText(P).then(()=>{var K=setTimeout(()=>{v(!1),clearTimeout(K)},3e3)}).catch(K=>{})},S={style:{display:"inline-flex"},fill:m?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:k},{render:j}=w,E=Oe(w,$T),I=J({},E,u,S,{style:J({},E.style,u.style,S.style)}),A=j&&typeof j=="function",_=A&&j(J({},I,{"data-copied":m}),{value:r,keyName:t,keys:a,parentValue:i});return _||(m?h.jsx("svg",J({viewBox:"0 0 32 36"},I,{children:h.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):h.jsx("svg",J({viewBox:"0 0 32 36"},I,{children:h.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};ff.displayName="JVR.Copied";function Hv(){var e=R.useRef(null);return e.current===null&&(e.current="custom-id-"+Math.random().toString(36).substr(2,9)),e.current}var Wv=e=>{var t,{value:r,expandKey:i="",level:l,keys:a=[]}=e,u=Na(),{objectSortKeys:c,indentWidth:f,collapsed:p,shouldExpandNodeInitially:x}=ao(),m=Array.isArray(r),v=typeof p=="boolean"?p:typeof p=="number"?l>p:!1,w=(t=u[i])!=null?t:v;if(u[i]===void 0&&x&&x(w,{value:r,keys:a,level:l})||w)return null;var k=m?Object.entries(r).map(j=>[Number(j[0]),j[1]]):Object.entries(r);c&&(k=c===!0?k.sort((j,E)=>{var[I]=j,[A]=E;return typeof I=="string"&&typeof A=="string"?I.localeCompare(A):0}):k.sort((j,E)=>{var[I,A]=j,[_,O]=E;return typeof I=="string"&&typeof _=="string"?c(I,_,A,O):0}));var S={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:f,marginLeft:6};return h.jsx("div",{className:"w-rjv-wrap",style:S,children:k.map((j,E)=>{var[I,A]=j;return h.jsx(qv,{parentValue:r,keyName:I,keys:[...a,I],value:A,level:l},E)})})};Wv.displayName="JVR.KeyValues";var pf=e=>{var{keyName:t,parentValue:r,keys:i,value:l}=e,{highlightUpdates:a}=ao(),u=typeof t=="number",c=R.useRef(null);TT({value:l,highlightUpdates:a,highlightContainer:c});var f={keyName:t,value:l,keys:i,parentValue:r};return h.jsxs(R.Fragment,{children:[h.jsxs("span",{ref:c,children:[h.jsx(kd,J({isNumber:u,"data-placement":"left"},f)),h.jsx(Bv,J({},f,{children:t})),h.jsx(kd,J({isNumber:u,"data-placement":"right"},f))]}),h.jsx(bv,J({},f))]})};pf.displayName="JVR.KayName";var qv=e=>{var{keyName:t,value:r,parentValue:i,level:l=0,keys:a=[]}=e,u=ov(),c=Hv(),f=Array.isArray(r),p=r instanceof Set,x=r instanceof Map,m=r instanceof Date,v=r instanceof URL,w=r&&typeof r=="object"&&!f&&!p&&!x&&!m&&!v,k=w||f||p||x;if(k){var S=p?Array.from(r):x?Object.fromEntries(r):r;return h.jsx(hf,{keyName:t,value:S,parentValue:i,initialValue:r,keys:a,level:l+1})}var j={onMouseEnter:()=>u({[c]:!0}),onMouseLeave:()=>u({[c]:!1})};return h.jsxs(Vv,J({className:"w-rjv-line",value:r,keyName:t,keys:a,parentValue:i},j,{children:[h.jsx(pf,{keyName:t,value:r,keys:a,parentValue:i}),h.jsx(Dv,{keyName:t,value:r}),h.jsx(ff,{keyName:t,value:r,keys:a,parentValue:i,expandKey:c})]}))};qv.displayName="JVR.KeyValuesItem";var IT=["value","keyName"],NT=["as","render"],Gv=e=>{var{CountInfoExtra:t={}}=bn();return oi(t,e,"CountInfoExtra"),null};Gv.displayName="JVR.CountInfoExtra";var Jv=e=>{var{value:t={},keyName:r}=e,i=Oe(e,IT),{CountInfoExtra:l={}}=bn(),{as:a,render:u}=l,c=Oe(l,NT);if(!u&&!c.children)return null;var f=a||"span",p=u&&typeof u=="function",x=J({},c,i),m=p&&u(x,{value:t,keyName:r});return m||h.jsx(f,J({},x))};Jv.displayName="JVR.CountInfoExtraComps";var PT=["value","keyName"],AT=["as","render"],Kv=e=>{var{CountInfo:t={}}=bn();return oi(t,e,"CountInfo"),null};Kv.displayName="JVR.CountInfo";var Qv=e=>{var{value:t={},keyName:r}=e,i=Oe(e,PT),{displayObjectSize:l}=ao(),{CountInfo:a={}}=bn();if(!l)return null;var{as:u,render:c}=a,f=Oe(a,AT),p=u||"span";f.style=J({},f.style,e.style);var x=Object.keys(t).length;f.children||(f.children=x+" item"+(x===1?"":"s"));var m=J({},f,i),v=c&&typeof c=="function",w=v&&c(J({},m,{"data-length":x}),{value:t,keyName:r});return w||h.jsx(p,J({},m))};Qv.displayName="JVR.CountInfoComp";var LT=["as","render"],Yv=e=>{var{Ellipsis:t={}}=bn();return oi(t,e,"Ellipsis"),null};Yv.displayName="JVR.Ellipsis";var Xv=e=>{var{isExpanded:t,value:r,keyName:i}=e,{Ellipsis:l={}}=bn(),{as:a,render:u}=l,c=Oe(l,LT),f=a||"span",p=u&&typeof u=="function"&&u(J({},c,{"data-expanded":t}),{value:r,keyName:i});return p||(!t||typeof r=="object"&&Object.keys(r).length==0?null:h.jsx(f,J({},c)))};Xv.displayName="JVR.EllipsisComp";var Zv=e=>{var t,{keyName:r,expandKey:i,keys:l=[],initialValue:a,value:u,parentValue:c,level:f}=e,p=Na(),x=B2(),{onExpand:m,collapsed:v,shouldExpandNodeInitially:w}=ao(),k=Array.isArray(u),S=u instanceof Set,j=typeof v=="boolean"?v:typeof v=="number"?f>v:!1,E=typeof u=="object",I=(t=p[i])!=null?t:j,A=w&&w(I,{value:u,keys:l,level:f});p[i]===void 0&&A!==void 0&&(I=A);var _=()=>{var te={expand:!I,value:u,keyid:i,keyName:r};m&&m(te),x({[i]:te.expand})},O={display:"inline-flex",alignItems:"center"},P={transform:"rotate("+(I?"-90":"0")+"deg)",transition:"all 0.3s"},V=Object.keys(u).length,K=V!==0&&(k||S||E),re={style:O};K&&(re.onClick=_);var D={keyName:r,value:u,keys:l,parentValue:c};return h.jsxs("span",J({},re,{children:[K&&h.jsx(Sv,J({style:P,expandKey:i},D)),(r||typeof r=="number")&&h.jsx(pf,J({},D)),h.jsx(jv,{value:a,keyName:r}),h.jsx(Tv,{value:a,keyName:r}),h.jsx(Cv,J({isBrackets:k||S},D)),h.jsx(Xv,{keyName:r,value:u,isExpanded:I}),h.jsx(df,J({isVisiable:I||!K,isBrackets:k||S},D)),h.jsx(Qv,{value:u,keyName:r}),h.jsx(Jv,{value:u,keyName:r}),h.jsx(ff,{keyName:r,value:u,expandKey:i,parentValue:c,keys:l})]}))};Zv.displayName="JVR.NestedOpen";var zT=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],hf=R.forwardRef((e,t)=>{var{className:r="",parentValue:i,level:l=1,value:a,initialValue:u,keys:c,keyName:f}=e,p=Oe(e,zT),x=ov(),m=Hv(),v=[r,"w-rjv-inner"].filter(Boolean).join(" "),w={onMouseEnter:()=>x({[m]:!0}),onMouseLeave:()=>x({[m]:!1})};return h.jsxs("div",J({className:v,ref:t},p,w,{children:[h.jsx(Zv,{expandKey:m,value:a,level:l,keys:c,parentValue:i,keyName:f,initialValue:u}),h.jsx(Wv,{expandKey:m,value:a,level:l,keys:c,parentValue:i,keyName:f}),h.jsx(Ev,{expandKey:m,value:a,level:l,keys:c})]}))});hf.displayName="JVR.Container";var e0=e=>{var{BraceLeft:t={}}=Yt();return Ir(t,e,"BraceLeft"),null};e0.displayName="JVR.BraceLeft";var t0=e=>{var{BraceRight:t={}}=Yt();return Ir(t,e,"BraceRight"),null};t0.displayName="JVR.BraceRight";var n0=e=>{var{BracketsLeft:t={}}=Yt();return Ir(t,e,"BracketsLeft"),null};n0.displayName="JVR.BracketsLeft";var r0=e=>{var{BracketsRight:t={}}=Yt();return Ir(t,e,"BracketsRight"),null};r0.displayName="JVR.BracketsRight";var o0=e=>{var{Arrow:t={}}=Yt();return Ir(t,e,"Arrow"),null};o0.displayName="JVR.Arrow";var i0=e=>{var{Colon:t={}}=Yt();return Ir(t,e,"Colon"),null};i0.displayName="JVR.Colon";var l0=e=>{var{Quote:t={}}=Yt();return Ir(t,e,"Quote"),null};l0.displayName="JVR.Quote";var s0=e=>{var{ValueQuote:t={}}=Yt();return Ir(t,e,"ValueQuote"),null};s0.displayName="JVR.ValueQuote";var a0=e=>{var{Bigint:t={}}=Ye();return dn(t,e,"Bigint"),null};a0.displayName="JVR.Bigint";var u0=e=>{var{Date:t={}}=Ye();return dn(t,e,"Date"),null};u0.displayName="JVR.Date";var c0=e=>{var{False:t={}}=Ye();return dn(t,e,"False"),null};c0.displayName="JVR.False";var d0=e=>{var{Float:t={}}=Ye();return dn(t,e,"Float"),null};d0.displayName="JVR.Float";var f0=e=>{var{Int:t={}}=Ye();return dn(t,e,"Int"),null};f0.displayName="JVR.Int";var p0=e=>{var{Map:t={}}=Ye();return dn(t,e,"Map"),null};p0.displayName="JVR.Map";var h0=e=>{var{Nan:t={}}=Ye();return dn(t,e,"Nan"),null};h0.displayName="JVR.Nan";var m0=e=>{var{Null:t={}}=Ye();return dn(t,e,"Null"),null};m0.displayName="JVR.Null";var g0=e=>{var{Set:t={}}=Ye();return dn(t,e,"Set"),null};g0.displayName="JVR.Set";var x0=e=>{var{Str:t={}}=Ye();return dn(t,e,"Str"),null};x0.displayName="JVR.StringText";var y0=e=>{var{True:t={}}=Ye();return dn(t,e,"True"),null};y0.displayName="JVR.True";var v0=e=>{var{Undefined:t={}}=Ye();return dn(t,e,"Undefined"),null};v0.displayName="JVR.Undefined";var w0=e=>{var{Url:t={}}=Ye();return dn(t,e,"Url"),null};w0.displayName="JVR.Url";var k0=e=>{var{Copied:t={}}=bn();return oi(t,e,"Copied"),null};k0.displayName="JVR.Copied";var _T=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],qe=R.forwardRef((e,t)=>{var{className:r="",style:i,value:l,children:a,collapsed:u,shouldExpandNodeInitially:c,indentWidth:f=15,displayObjectSize:p=!0,shortenTextAfterLength:x=30,highlightUpdates:m=!0,enableClipboard:v=!0,displayDataTypes:w=!0,objectSortKeys:k=!1,onExpand:S,onCopied:j}=e,E=Oe(e,_T),I=J({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},i),A=["w-json-view-container","w-rjv",r].filter(Boolean).join(" ");return h.jsxs(kv,{initialState:{value:l,objectSortKeys:k,indentWidth:f,shouldExpandNodeInitially:c,displayObjectSize:p,collapsed:u,enableClipboard:v,shortenTextAfterLength:x,highlightUpdates:m,onCopied:j,onExpand:S},initialTypes:{displayDataTypes:w},children:[h.jsx(hf,J({value:l},E,{ref:t,className:A,style:I})),a]})});qe.Bigint=a0;qe.Date=u0;qe.False=c0;qe.Float=d0;qe.Int=f0;qe.Map=p0;qe.Nan=h0;qe.Null=m0;qe.Set=g0;qe.String=x0;qe.True=y0;qe.Undefined=v0;qe.Url=w0;qe.ValueQuote=s0;qe.Arrow=o0;qe.Colon=i0;qe.Quote=l0;qe.Ellipsis=Yv;qe.BraceLeft=e0;qe.BraceRight=t0;qe.BracketsLeft=n0;qe.BracketsRight=r0;qe.Copied=k0;qe.CountInfo=Kv;qe.CountInfoExtra=Gv;qe.KeyName=Mv;qe.Row=Uv;qe.displayName="JVR.JsonView";var FT={"--w-rjv-font-family":"monospace","--w-rjv-color":"#0184a6","--w-rjv-key-string":"#0184a6","--w-rjv-background-color":"#202020","--w-rjv-line-color":"#323232","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#656565","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#0184a6","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#1896b6","--w-rjv-brackets-color":"#1896b6","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#649bd8","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#076678","--w-rjv-type-undefined-color":"#586e75"},OT={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};const DT=C.pre`
|
|
1355
|
-
margin-top: 8px;
|
|
1356
|
-
padding: 8px;
|
|
1357
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1358
|
-
border-radius: 4px;
|
|
1359
|
-
font-size: 0.9em;
|
|
1360
|
-
overflow-x: auto;
|
|
1361
|
-
white-space: pre-wrap;
|
|
1362
|
-
word-wrap: break-word;
|
|
1363
|
-
|
|
1364
|
-
.w-json-view-container {
|
|
1365
|
-
background: none !important;
|
|
1366
|
-
}
|
|
1367
|
-
`,b0=({data:e})=>{const t=Hb();return h.jsx(DT,{children:typeof e=="object"?h.jsx(qe,{value:e,shortenTextAfterLength:0,style:t.name==="dark"?FT:OT}):JSON.stringify(e,null,2)})};function MT(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const BT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VT={};function Rg(e,t){return(VT.jsx?UT:BT).test(e)}const HT=/[ \t\n\f\r]/g;function WT(e){return typeof e=="object"?e.type==="text"?$g(e.value):!1:$g(e)}function $g(e){return e.replace(HT,"")===""}class wl{constructor(t,r,i){this.normal=r,this.property=t,i&&(this.space=i)}}wl.prototype.normal={};wl.prototype.property={};wl.prototype.space=void 0;function S0(e,t){const r={},i={};for(const l of e)Object.assign(r,l.property),Object.assign(i,l.normal);return new wl(r,i,t)}function Sd(e){return e.toLowerCase()}class Xt{constructor(t,r){this.attribute=r,this.property=t}}Xt.prototype.attribute="";Xt.prototype.booleanish=!1;Xt.prototype.boolean=!1;Xt.prototype.commaOrSpaceSeparated=!1;Xt.prototype.commaSeparated=!1;Xt.prototype.defined=!1;Xt.prototype.mustUseProperty=!1;Xt.prototype.number=!1;Xt.prototype.overloadedBoolean=!1;Xt.prototype.property="";Xt.prototype.spaceSeparated=!1;Xt.prototype.space=void 0;let qT=0;const Pe=uo(),ut=uo(),Cd=uo(),ie=uo(),Qe=uo(),Uo=uo(),on=uo();function uo(){return 2**++qT}const Ed=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:ut,commaOrSpaceSeparated:on,commaSeparated:Uo,number:ie,overloadedBoolean:Cd,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),Fc=Object.keys(Ed);class mf extends Xt{constructor(t,r,i,l){let a=-1;if(super(t,r),Ig(this,"space",l),typeof i=="number")for(;++a<Fc.length;){const u=Fc[a];Ig(this,Fc[a],(i&Ed[u])===Ed[u])}}}mf.prototype.defined=!0;function Ig(e,t,r){r&&(e[t]=r)}function ii(e){const t={},r={};for(const[i,l]of Object.entries(e.properties)){const a=new mf(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(a.mustUseProperty=!0),t[i]=a,r[Sd(i)]=i,r[Sd(a.attribute)]=i}return new wl(t,r,e.space)}const C0=ii({properties:{ariaActiveDescendant:null,ariaAtomic:ut,ariaAutoComplete:null,ariaBusy:ut,ariaChecked:ut,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:ut,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:ut,ariaFlowTo:Qe,ariaGrabbed:ut,ariaHasPopup:null,ariaHidden:ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:ie,ariaLive:null,ariaModal:ut,ariaMultiLine:ut,ariaMultiSelectable:ut,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:ut,ariaReadOnly:ut,ariaRelevant:null,ariaRequired:ut,ariaRoleDescription:Qe,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:ut,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function E0(e,t){return t in e?e[t]:t}function j0(e,t){return E0(e,t.toLowerCase())}const GT=ii({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Uo,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:Qe,autoFocus:Pe,autoPlay:Pe,blocking:Qe,capture:null,charSet:null,checked:Pe,cite:null,className:Qe,cols:ie,colSpan:null,content:null,contentEditable:ut,controls:Pe,controlsList:Qe,coords:ie|Uo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:Cd,draggable:ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:Qe,height:ie,hidden:Cd,high:ie,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Pe,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Pe,optimum:ie,pattern:null,ping:Qe,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:Qe,required:Pe,reversed:Pe,rows:ie,rowSpan:ie,sandbox:Qe,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:ut,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:ut,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:j0}),JT=ii({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:on,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:Qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Uo,g2:Uo,glyphName:Uo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:E0}),T0=ii({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),R0=ii({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:j0}),$0=ii({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),KT={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},QT=/[A-Z]/g,Ng=/-[a-z]/g,YT=/^data[-\w.:]+$/i;function XT(e,t){const r=Sd(t);let i=t,l=Xt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&YT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ng,eR);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ng.test(a)){let u=a.replace(QT,ZT);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}l=mf}return new l(i,t)}function ZT(e){return"-"+e.toLowerCase()}function eR(e){return e.charAt(1).toUpperCase()}const tR=S0([C0,GT,T0,R0,$0],"html"),gf=S0([C0,JT,T0,R0,$0],"svg");function nR(e){return e.join(" ").trim()}var Oo={},Oc,Pg;function rR(){if(Pg)return Oc;Pg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
1368
|
-
`,p="/",x="*",m="",v="comment",w="declaration";Oc=function(S,j){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];j=j||{};var E=1,I=1;function A(ee){var X=ee.match(t);X&&(E+=X.length);var W=ee.lastIndexOf(f);I=~W?ee.length-W:I+ee.length}function _(){var ee={line:E,column:I};return function(X){return X.position=new O(ee),K(),X}}function O(ee){this.start=ee,this.end={line:E,column:I},this.source=j.source}O.prototype.content=S;function P(ee){var X=new Error(j.source+":"+E+":"+I+": "+ee);if(X.reason=ee,X.filename=j.source,X.line=E,X.column=I,X.source=S,!j.silent)throw X}function V(ee){var X=ee.exec(S);if(X){var W=X[0];return A(W),S=S.slice(W.length),X}}function K(){V(r)}function re(ee){var X;for(ee=ee||[];X=D();)X!==!1&&ee.push(X);return ee}function D(){var ee=_();if(!(p!=S.charAt(0)||x!=S.charAt(1))){for(var X=2;m!=S.charAt(X)&&(x!=S.charAt(X)||p!=S.charAt(X+1));)++X;if(X+=2,m===S.charAt(X-1))return P("End of comment missing");var W=S.slice(2,X-2);return I+=2,A(W),S=S.slice(X),I+=2,ee({type:v,comment:W})}}function te(){var ee=_(),X=V(i);if(X){if(D(),!V(l))return P("property missing ':'");var W=V(a),ce=ee({type:w,property:k(X[0].replace(e,m)),value:W?k(W[0].replace(e,m)):m});return V(u),ce}}function se(){var ee=[];re(ee);for(var X;X=te();)X!==!1&&(ee.push(X),re(ee));return ee}return K(),se()};function k(S){return S?S.replace(c,m):m}return Oc}var Ag;function oR(){if(Ag)return Oo;Ag=1;var e=Oo&&Oo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=r;var t=e(rR());function r(i,l){var a=null;if(!i||typeof i!="string")return a;var u=(0,t.default)(i),c=typeof l=="function";return u.forEach(function(f){if(f.type==="declaration"){var p=f.property,x=f.value;c?l(p,x,f):x&&(a=a||{},a[p]=x)}}),a}return Oo}var Yi={},Lg;function iR(){if(Lg)return Yi;Lg=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(p){return!p||r.test(p)||e.test(p)},u=function(p,x){return x.toUpperCase()},c=function(p,x){return"".concat(x,"-")},f=function(p,x){return x===void 0&&(x={}),a(p)?p:(p=p.toLowerCase(),x.reactCompat?p=p.replace(l,c):p=p.replace(i,c),p.replace(t,u))};return Yi.camelCase=f,Yi}var Xi,zg;function lR(){if(zg)return Xi;zg=1;var e=Xi&&Xi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(oR()),r=iR();function i(l,a){var u={};return!l||typeof l!="string"||(0,t.default)(l,function(c,f){c&&f&&(u[(0,r.camelCase)(c,a)]=f)}),u}return i.default=i,Xi=i,Xi}var sR=lR();const aR=Bd(sR),I0=N0("end"),xf=N0("start");function N0(e){return t;function t(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function uR(e){const t=xf(e),r=I0(e);if(t&&r)return{start:t,end:r}}function il(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_g(e.position):"start"in e||"end"in e?_g(e):"line"in e||"column"in e?jd(e):""}function jd(e){return Fg(e&&e.line)+":"+Fg(e&&e.column)}function _g(e){return jd(e&&e.start)+"-"+jd(e&&e.end)}function Fg(e){return e&&typeof e=="number"?e:1}class _t extends Error{constructor(t,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let l="",a={},u=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?l=t:!a.cause&&t&&(u=!0,l=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=l,this.line=c?c.line:void 0,this.name=il(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}_t.prototype.file="";_t.prototype.name="";_t.prototype.reason="";_t.prototype.message="";_t.prototype.stack="";_t.prototype.column=void 0;_t.prototype.line=void 0;_t.prototype.ancestors=void 0;_t.prototype.cause=void 0;_t.prototype.fatal=void 0;_t.prototype.place=void 0;_t.prototype.ruleId=void 0;_t.prototype.source=void 0;const yf={}.hasOwnProperty,cR=new Map,dR=/[A-Z]/g,fR=new Set(["table","tbody","thead","tfoot","tr"]),pR=new Set(["td","th"]),P0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hR(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=bR(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=kR(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?gf:tR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=A0(l,e,void 0);return a&&typeof a!="string"?a:l.create(e,l.Fragment,{children:a||void 0},void 0)}function A0(e,t,r){if(t.type==="element")return mR(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return gR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return yR(e,t,r);if(t.type==="mdxjsEsm")return xR(e,t);if(t.type==="root")return vR(e,t,r);if(t.type==="text")return wR(e,t)}function mR(e,t,r){const i=e.schema;let l=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=gf,e.schema=l),e.ancestors.push(t);const a=z0(e,t.tagName,!1),u=SR(e,t);let c=wf(e,t);return fR.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!WT(f):!0})),L0(e,u,a,t),vf(u,c),e.ancestors.pop(),e.schema=i,e.create(t,a,u,r)}function gR(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}cl(e,t.position)}function xR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cl(e,t.position)}function yR(e,t,r){const i=e.schema;let l=i;t.name==="svg"&&i.space==="html"&&(l=gf,e.schema=l),e.ancestors.push(t);const a=t.name===null?e.Fragment:z0(e,t.name,!0),u=CR(e,t),c=wf(e,t);return L0(e,u,a,t),vf(u,c),e.ancestors.pop(),e.schema=i,e.create(t,a,u,r)}function vR(e,t,r){const i={};return vf(i,wf(e,t)),e.create(t,e.Fragment,i,r)}function wR(e,t){return t.value}function L0(e,t,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=i)}function vf(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function kR(e,t,r){return i;function i(l,a,u,c){const p=Array.isArray(u.children)?r:t;return c?p(a,u,c):p(a,u)}}function bR(e,t){return r;function r(i,l,a,u){const c=Array.isArray(a.children),f=xf(i);return t(l,a,u,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function SR(e,t){const r={};let i,l;for(l in t.properties)if(l!=="children"&&yf.call(t.properties,l)){const a=ER(e,l,t.properties[l]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&pR.has(t.tagName)?i=c:r[u]=c}}if(i){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function CR(e,t){const r={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(r,e.evaluater.evaluateExpression(c.argument))}else cl(e,t.position);else{const l=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else cl(e,t.position);else a=i.value===null?!0:i.value;r[l]=a}return r}function wf(e,t){const r=[];let i=-1;const l=e.passKeys?new Map:cR;for(;++i<t.children.length;){const a=t.children[i];let u;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const p=l.get(f)||0;u=f+"-"+p,l.set(f,p+1)}}const c=A0(e,a,u);c!==void 0&&r.push(c)}return r}function ER(e,t,r){const i=XT(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?MT(r):nR(r)),i.property==="style"){let l=typeof r=="object"?r:jR(e,String(r));return e.stylePropertyNameCase==="css"&&(l=TR(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?KT[i.property]||i.property:i.attribute,r]}}function jR(e,t){try{return aR(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new _t("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=P0+"#cannot-parse-style-attribute",l}}function z0(e,t,r){let i;if(!r)i={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let a=-1,u;for(;++a<l.length;){const c=Rg(l[a])?{type:"Identifier",name:l[a]}:{type:"Literal",value:l[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}i=u}else i=Rg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const l=i.value;return yf.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);cl(e)}function cl(e,t){const r=new _t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=P0+"#cannot-handle-mdx-estrees-without-createevaluater",r}function TR(e){const t={};let r;for(r in e)yf.call(e,r)&&(t[RR(r)]=e[r]);return t}function RR(e){let t=e.replace(dR,$R);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function $R(e){return"-"+e.toLowerCase()}const Dc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},IR={};function kf(e,t){const r=IR,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return _0(e,i,l)}function _0(e,t,r){if(NR(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Og(e.children,t,r)}return Array.isArray(e)?Og(e,t,r):""}function Og(e,t,r){const i=[];let l=-1;for(;++l<e.length;)i[l]=_0(e[l],t,r);return i.join("")}function NR(e){return!!(e&&typeof e=="object")}const Dg=document.createElement("i");function bf(e){const t="&"+e+";";Dg.innerHTML=t;const r=Dg.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function un(e,t,r,i){const l=e.length;let a=0,u;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,i.length<1e4)u=Array.from(i),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);a<i.length;)u=i.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function wn(e,t){return e.length>0?(un(e,e.length,0,t),e):t}const Mg={}.hasOwnProperty;function F0(e){const t={};let r=-1;for(;++r<e.length;)PR(t,e[r]);return t}function PR(e,t){let r;for(r in t){const l=(Mg.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let u;if(a)for(u in a){Mg.call(l,u)||(l[u]=[]);const c=a[u];AR(l[u],Array.isArray(c)?c:c?[c]:[])}}}function AR(e,t){let r=-1;const i=[];for(;++r<t.length;)(t[r].add==="after"?e:i).push(t[r]);un(e,0,0,i)}function O0(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Pn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=Nr(/[A-Za-z]/),zt=Nr(/[\dA-Za-z]/),LR=Nr(/[#-'*+\--9=?A-Z^-~]/);function da(e){return e!==null&&(e<32||e===127)}const Td=Nr(/\d/),zR=Nr(/[\dA-Fa-f]/),_R=Nr(/[!-/:-@[-`{-~]/);function je(e){return e!==null&&e<-2}function Je(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const Pa=Nr(new RegExp("\\p{P}|\\p{S}","u")),io=Nr(/\s/);function Nr(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function li(e){const t=[];let r=-1,i=0,l=0;for(;++r<e.length;){const a=e.charCodeAt(r);let u="";if(a===37&&zt(e.charCodeAt(r+1))&&zt(e.charCodeAt(r+2)))l=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(r+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),l=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(i,r),encodeURIComponent(u)),i=r+l+1,u=""),l&&(r+=l,l=0)}return t.join("")+e.slice(i)}function De(e,t,r,i){const l=i?i-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(f){return Fe(f)?(e.enter(r),c(f)):t(f)}function c(f){return Fe(f)&&a++<l?(e.consume(f),c):(e.exit(r),t(f))}}const FR={tokenize:OR};function OR(e){const t=e.attempt(this.parser.constructs.contentInitial,i,l);let r;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),De(e,t,"linePrefix")}function l(c){return e.enter("paragraph"),a(c)}function a(c){const f=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=f),r=f,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return je(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const DR={tokenize:MR},Bg={tokenize:BR};function MR(e){const t=this,r=[];let i=0,l,a,u;return c;function c(A){if(i<r.length){const _=r[i];return t.containerState=_[1],e.attempt(_[0].continuation,f,p)(A)}return p(A)}function f(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&I();const _=t.events.length;let O=_,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){P=t.events[O][1].end;break}E(i);let V=_;for(;V<t.events.length;)t.events[V][1].end={...P},V++;return un(t.events,O+1,0,t.events.slice(_)),t.events.length=V,p(A)}return c(A)}function p(A){if(i===r.length){if(!l)return v(A);if(l.currentConstruct&&l.currentConstruct.concrete)return k(A);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bg,x,m)(A)}function x(A){return l&&I(),E(i),v(A)}function m(A){return t.parser.lazy[t.now().line]=i!==r.length,u=t.now().offset,k(A)}function v(A){return t.containerState={},e.attempt(Bg,w,k)(A)}function w(A){return i++,r.push([t.currentConstruct,t.containerState]),v(A)}function k(A){if(A===null){l&&I(),E(0),e.consume(A);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:a}),S(A)}function S(A){if(A===null){j(e.exit("chunkFlow"),!0),E(0),e.consume(A);return}return je(A)?(e.consume(A),j(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(A),S)}function j(A,_){const O=t.sliceStream(A);if(_&&O.push(null),A.previous=a,a&&(a.next=A),a=A,l.defineSkip(A.start),l.write(O),t.parser.lazy[A.start.line]){let P=l.events.length;for(;P--;)if(l.events[P][1].start.offset<u&&(!l.events[P][1].end||l.events[P][1].end.offset>u))return;const V=t.events.length;let K=V,re,D;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(re){D=t.events[K][1].end;break}re=!0}for(E(i),P=V;P<t.events.length;)t.events[P][1].end={...D},P++;un(t.events,K+1,0,t.events.slice(V)),t.events.length=P}}function E(A){let _=r.length;for(;_-- >A;){const O=r[_];t.containerState=O[1],O[0].exit.call(t,e)}r.length=A}function I(){l.write([null]),a=void 0,l=void 0,t.containerState._closeFlow=void 0}}function BR(e,t,r){return De(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zo(e){if(e===null||Je(e)||io(e))return 1;if(Pa(e))return 2}function Aa(e,t,r){const i=[];let l=-1;for(;++l<e.length;){const a=e[l].resolveAll;a&&!i.includes(a)&&(t=a(t,r),i.push(a))}return t}const Rd={name:"attention",resolveAll:UR,tokenize:VR};function UR(e,t){let r=-1,i,l,a,u,c,f,p,x;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const m={...e[i][1].end},v={...e[r][1].start};Ug(m,-f),Ug(v,f),u={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:v},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},l={type:f>1?"strong":"emphasis",start:{...u.start},end:{...c.end}},e[i][1].end={...u.start},e[r][1].start={...c.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=wn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=wn(p,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",a,t]]),p=wn(p,Aa(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),p=wn(p,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(x=2,p=wn(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):x=0,un(e,i-1,r-i+3,p),r=i+p.length-x-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function VR(e,t){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=Zo(i);let a;return u;function u(f){return a=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===a)return e.consume(f),c;const p=e.exit("attentionSequence"),x=Zo(f),m=!x||x===2&&l||r.includes(f),v=!l||l===2&&x||r.includes(i);return p._open=!!(a===42?m:m&&(l||!v)),p._close=!!(a===42?v:v&&(x||!m)),t(f)}}function Ug(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const HR={name:"autolink",tokenize:WR};function WR(e,t,r){let i=0;return l;function l(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(w){return Mt(w)?(e.consume(w),u):w===64?r(w):p(w)}function u(w){return w===43||w===45||w===46||zt(w)?(i=1,c(w)):p(w)}function c(w){return w===58?(e.consume(w),i=0,f):(w===43||w===45||w===46||zt(w))&&i++<32?(e.consume(w),c):(i=0,p(w))}function f(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||da(w)?r(w):(e.consume(w),f)}function p(w){return w===64?(e.consume(w),x):LR(w)?(e.consume(w),p):r(w)}function x(w){return zt(w)?m(w):r(w)}function m(w){return w===46?(e.consume(w),i=0,x):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):v(w)}function v(w){if((w===45||zt(w))&&i++<63){const k=w===45?v:m;return e.consume(w),k}return r(w)}}const kl={partial:!0,tokenize:qR};function qR(e,t,r){return i;function i(a){return Fe(a)?De(e,l,"linePrefix")(a):l(a)}function l(a){return a===null||je(a)?t(a):r(a)}}const D0={continuation:{tokenize:JR},exit:KR,name:"blockQuote",tokenize:GR};function GR(e,t,r){const i=this;return l;function l(u){if(u===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return r(u)}function a(u){return Fe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function JR(e,t,r){const i=this;return l;function l(u){return Fe(u)?De(e,a,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(D0,t,r)(u)}}function KR(e){e.exit("blockQuote")}const M0={name:"characterEscape",tokenize:QR};function QR(e,t,r){return i;function i(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),l}function l(a){return _R(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const B0={name:"characterReference",tokenize:YR};function YR(e,t,r){const i=this;let l=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,u=zt,x(m))}function p(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=zR,x):(e.enter("characterReferenceValue"),a=7,u=Td,x(m))}function x(m){if(m===59&&l){const v=e.exit("characterReferenceValue");return u===zt&&!bf(i.sliceSerialize(v))?r(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&l++<a?(e.consume(m),x):r(m)}}const Vg={partial:!0,tokenize:ZR},Hg={concrete:!0,name:"codeFenced",tokenize:XR};function XR(e,t,r){const i=this,l={partial:!0,tokenize:O};let a=0,u=0,c;return f;function f(P){return p(P)}function p(P){const V=i.events[i.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,c=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),x(P)}function x(P){return P===c?(u++,e.consume(P),x):u<3?r(P):(e.exit("codeFencedFenceSequence"),Fe(P)?De(e,m,"whitespace")(P):m(P))}function m(P){return P===null||je(P)?(e.exit("codeFencedFence"),i.interrupt?t(P):e.check(Vg,S,_)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(P))}function v(P){return P===null||je(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(P)):Fe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),De(e,w,"whitespace")(P)):P===96&&P===c?r(P):(e.consume(P),v)}function w(P){return P===null||je(P)?m(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(P))}function k(P){return P===null||je(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(P)):P===96&&P===c?r(P):(e.consume(P),k)}function S(P){return e.attempt(l,_,j)(P)}function j(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),E}function E(P){return a>0&&Fe(P)?De(e,I,"linePrefix",a+1)(P):I(P)}function I(P){return P===null||je(P)?e.check(Vg,S,_)(P):(e.enter("codeFlowValue"),A(P))}function A(P){return P===null||je(P)?(e.exit("codeFlowValue"),I(P)):(e.consume(P),A)}function _(P){return e.exit("codeFenced"),t(P)}function O(P,V,K){let re=0;return D;function D(W){return P.enter("lineEnding"),P.consume(W),P.exit("lineEnding"),te}function te(W){return P.enter("codeFencedFence"),Fe(W)?De(P,se,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):se(W)}function se(W){return W===c?(P.enter("codeFencedFenceSequence"),ee(W)):K(W)}function ee(W){return W===c?(re++,P.consume(W),ee):re>=u?(P.exit("codeFencedFenceSequence"),Fe(W)?De(P,X,"whitespace")(W):X(W)):K(W)}function X(W){return W===null||je(W)?(P.exit("codeFencedFence"),V(W)):K(W)}}}function ZR(e,t,r){const i=this;return l;function l(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return i.parser.lazy[i.now().line]?r(u):t(u)}}const Mc={name:"codeIndented",tokenize:t$},e$={partial:!0,tokenize:n$};function t$(e,t,r){const i=this;return l;function l(p){return e.enter("codeIndented"),De(e,a,"linePrefix",5)(p)}function a(p){const x=i.events[i.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?u(p):r(p)}function u(p){return p===null?f(p):je(p)?e.attempt(e$,u,f)(p):(e.enter("codeFlowValue"),c(p))}function c(p){return p===null||je(p)?(e.exit("codeFlowValue"),u(p)):(e.consume(p),c)}function f(p){return e.exit("codeIndented"),t(p)}}function n$(e,t,r){const i=this;return l;function l(u){return i.parser.lazy[i.now().line]?r(u):je(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):De(e,a,"linePrefix",5)(u)}function a(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):je(u)?l(u):r(u)}}const r$={name:"codeText",previous:i$,resolve:o$,tokenize:l$};function o$(e){let t=e.length-4,r=3,i,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=r;++i<t;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(i=r-1,t++;++i<=t;)l===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(l=i):(i===t||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),t-=i-l-2,i=l+2),l=void 0);return e}function i$(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function l$(e,t,r){let i=0,l,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),i++,c):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?r(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(a=e.enter("codeTextSequence"),l=0,x(m)):je(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(m))}function p(m){return m===null||m===32||m===96||je(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),p)}function x(m){return m===96?(e.consume(m),l++,x):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",p(m))}}class s${constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,r,i){const l=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&Zi(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Zi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);Zi(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zi(this.left,r.reverse())}}}function Zi(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function U0(e){const t={};let r=-1,i,l,a,u,c,f,p;const x=new s$(e);for(;++r<x.length;){for(;r in t;)r=t[r];if(i=x.get(r),r&&i[1].type==="chunkFlow"&&x.get(r-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,a$(x,r)),r=t[r],p=!0);else if(i[1]._container){for(a=r,l=void 0;a--;)if(u=x.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(x.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(i[1].end={...x.get(l)[1].start},c=x.slice(l,r),c.unshift(i),x.splice(l,r-l+1,c))}}return un(e,0,Number.POSITIVE_INFINITY,x.slice(0)),!p}function a$(e,t){const r=e.get(t)[1],i=e.get(t)[2];let l=t-1;const a=[];let u=r._tokenizer;u||(u=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,f=[],p={};let x,m,v=-1,w=r,k=0,S=0;const j=[S];for(;w;){for(;e.get(++l)[1]!==w;);a.push(l),w._tokenizer||(x=i.sliceStream(w),w.next||x.push(null),m&&u.defineSkip(w.start),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(x),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=w,w=w.next}for(w=r;++v<c.length;)c[v][0]==="exit"&&c[v-1][0]==="enter"&&c[v][1].type===c[v-1][1].type&&c[v][1].start.line!==c[v][1].end.line&&(S=v+1,j.push(S),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(u.events=[],w?(w._tokenizer=void 0,w.previous=void 0):j.pop(),v=j.length;v--;){const E=c.slice(j[v],j[v+1]),I=a.pop();f.push([I,I+E.length-1]),e.splice(I,2,E)}for(f.reverse(),v=-1;++v<f.length;)p[k+f[v][0]]=k+f[v][1],k+=f[v][1]-f[v][0]-1;return p}const u$={resolve:d$,tokenize:f$},c$={partial:!0,tokenize:p$};function d$(e){return U0(e),e}function f$(e,t){let r;return i;function i(c){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(c)}function l(c){return c===null?a(c):je(c)?e.check(c$,u,a)(c):(e.consume(c),l)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function p$(e,t,r){const i=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),De(e,a,"linePrefix")}function a(u){if(u===null||je(u))return r(u);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(i.parser.constructs.flow,r,t)(u)}}function V0(e,t,r,i,l,a,u,c,f){const p=f||Number.POSITIVE_INFINITY;let x=0;return m;function m(E){return E===60?(e.enter(i),e.enter(l),e.enter(a),e.consume(E),e.exit(a),v):E===null||E===32||E===41||da(E)?r(E):(e.enter(i),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(E))}function v(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(l),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),w(E))}function w(E){return E===62?(e.exit("chunkString"),e.exit(c),v(E)):E===null||E===60||je(E)?r(E):(e.consume(E),E===92?k:w)}function k(E){return E===60||E===62||E===92?(e.consume(E),w):w(E)}function S(E){return!x&&(E===null||E===41||Je(E))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(i),t(E)):x<p&&E===40?(e.consume(E),x++,S):E===41?(e.consume(E),x--,S):E===null||E===32||E===40||da(E)?r(E):(e.consume(E),E===92?j:S)}function j(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function H0(e,t,r,i,l,a){const u=this;let c=0,f;return p;function p(w){return e.enter(i),e.enter(l),e.consume(w),e.exit(l),e.enter(a),x}function x(w){return c>999||w===null||w===91||w===93&&!f||w===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?r(w):w===93?(e.exit(a),e.enter(l),e.consume(w),e.exit(l),e.exit(i),t):je(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x):(e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||w===91||w===93||je(w)||c++>999?(e.exit("chunkString"),x(w)):(e.consume(w),f||(f=!Fe(w)),w===92?v:m)}function v(w){return w===91||w===92||w===93?(e.consume(w),c++,m):m(w)}}function W0(e,t,r,i,l,a){let u;return c;function c(v){return v===34||v===39||v===40?(e.enter(i),e.enter(l),e.consume(v),e.exit(l),u=v===40?41:v,f):r(v)}function f(v){return v===u?(e.enter(l),e.consume(v),e.exit(l),e.exit(i),t):(e.enter(a),p(v))}function p(v){return v===u?(e.exit(a),f(u)):v===null?r(v):je(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),De(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===u||v===null||je(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?m:x)}function m(v){return v===u||v===92?(e.consume(v),x):x(v)}}function ll(e,t){let r;return i;function i(l){return je(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,i):Fe(l)?De(e,i,r?"linePrefix":"lineSuffix")(l):t(l)}}const h$={name:"definition",tokenize:g$},m$={partial:!0,tokenize:x$};function g$(e,t,r){const i=this;let l;return a;function a(w){return e.enter("definition"),u(w)}function u(w){return H0.call(i,e,c,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function c(w){return l=Pn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),f):r(w)}function f(w){return Je(w)?ll(e,p)(w):p(w)}function p(w){return V0(e,x,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function x(w){return e.attempt(m$,m,m)(w)}function m(w){return Fe(w)?De(e,v,"whitespace")(w):v(w)}function v(w){return w===null||je(w)?(e.exit("definition"),i.parser.defined.push(l),t(w)):r(w)}}function x$(e,t,r){return i;function i(c){return Je(c)?ll(e,l)(c):r(c)}function l(c){return W0(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Fe(c)?De(e,u,"whitespace")(c):u(c)}function u(c){return c===null||je(c)?t(c):r(c)}}const y$={name:"hardBreakEscape",tokenize:v$};function v$(e,t,r){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),l}function l(a){return je(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const w$={name:"headingAtx",resolve:k$,tokenize:b$};function k$(e,t){let r=e.length-2,i=3,l,a;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},a={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},un(e,i,r-i+1,[["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t]])),e}function b$(e,t,r){let i=0;return l;function l(x){return e.enter("atxHeading"),a(x)}function a(x){return e.enter("atxHeadingSequence"),u(x)}function u(x){return x===35&&i++<6?(e.consume(x),u):x===null||Je(x)?(e.exit("atxHeadingSequence"),c(x)):r(x)}function c(x){return x===35?(e.enter("atxHeadingSequence"),f(x)):x===null||je(x)?(e.exit("atxHeading"),t(x)):Fe(x)?De(e,c,"whitespace")(x):(e.enter("atxHeadingText"),p(x))}function f(x){return x===35?(e.consume(x),f):(e.exit("atxHeadingSequence"),c(x))}function p(x){return x===null||x===35||Je(x)?(e.exit("atxHeadingText"),c(x)):(e.consume(x),p)}}const S$=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Wg=["pre","script","style","textarea"],C$={concrete:!0,name:"htmlFlow",resolveTo:T$,tokenize:R$},E$={partial:!0,tokenize:I$},j$={partial:!0,tokenize:$$};function T$(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function R$(e,t,r){const i=this;let l,a,u,c,f;return p;function p($){return x($)}function x($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),m}function m($){return $===33?(e.consume($),v):$===47?(e.consume($),a=!0,S):$===63?(e.consume($),l=3,i.interrupt?t:T):Mt($)?(e.consume($),u=String.fromCharCode($),j):r($)}function v($){return $===45?(e.consume($),l=2,w):$===91?(e.consume($),l=5,c=0,k):Mt($)?(e.consume($),l=4,i.interrupt?t:T):r($)}function w($){return $===45?(e.consume($),i.interrupt?t:T):r($)}function k($){const ue="CDATA[";return $===ue.charCodeAt(c++)?(e.consume($),c===ue.length?i.interrupt?t:se:k):r($)}function S($){return Mt($)?(e.consume($),u=String.fromCharCode($),j):r($)}function j($){if($===null||$===47||$===62||Je($)){const ue=$===47,ge=u.toLowerCase();return!ue&&!a&&Wg.includes(ge)?(l=1,i.interrupt?t($):se($)):S$.includes(u.toLowerCase())?(l=6,ue?(e.consume($),E):i.interrupt?t($):se($)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?r($):a?I($):A($))}return $===45||zt($)?(e.consume($),u+=String.fromCharCode($),j):r($)}function E($){return $===62?(e.consume($),i.interrupt?t:se):r($)}function I($){return Fe($)?(e.consume($),I):D($)}function A($){return $===47?(e.consume($),D):$===58||$===95||Mt($)?(e.consume($),_):Fe($)?(e.consume($),A):D($)}function _($){return $===45||$===46||$===58||$===95||zt($)?(e.consume($),_):O($)}function O($){return $===61?(e.consume($),P):Fe($)?(e.consume($),O):A($)}function P($){return $===null||$===60||$===61||$===62||$===96?r($):$===34||$===39?(e.consume($),f=$,V):Fe($)?(e.consume($),P):K($)}function V($){return $===f?(e.consume($),f=null,re):$===null||je($)?r($):(e.consume($),V)}function K($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||Je($)?O($):(e.consume($),K)}function re($){return $===47||$===62||Fe($)?A($):r($)}function D($){return $===62?(e.consume($),te):r($)}function te($){return $===null||je($)?se($):Fe($)?(e.consume($),te):r($)}function se($){return $===45&&l===2?(e.consume($),ce):$===60&&l===1?(e.consume($),de):$===62&&l===4?(e.consume($),z):$===63&&l===3?(e.consume($),T):$===93&&l===5?(e.consume($),fe):je($)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(E$,q,ee)($)):$===null||je($)?(e.exit("htmlFlowData"),ee($)):(e.consume($),se)}function ee($){return e.check(j$,X,q)($)}function X($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),W}function W($){return $===null||je($)?ee($):(e.enter("htmlFlowData"),se($))}function ce($){return $===45?(e.consume($),T):se($)}function de($){return $===47?(e.consume($),u="",Q):se($)}function Q($){if($===62){const ue=u.toLowerCase();return Wg.includes(ue)?(e.consume($),z):se($)}return Mt($)&&u.length<8?(e.consume($),u+=String.fromCharCode($),Q):se($)}function fe($){return $===93?(e.consume($),T):se($)}function T($){return $===62?(e.consume($),z):$===45&&l===2?(e.consume($),T):se($)}function z($){return $===null||je($)?(e.exit("htmlFlowData"),q($)):(e.consume($),z)}function q($){return e.exit("htmlFlow"),t($)}}function $$(e,t,r){const i=this;return l;function l(u){return je(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):r(u)}function a(u){return i.parser.lazy[i.now().line]?r(u):t(u)}}function I$(e,t,r){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(kl,t,r)}}const N$={name:"htmlText",tokenize:P$};function P$(e,t,r){const i=this;let l,a,u;return c;function c(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),O):T===63?(e.consume(T),A):Mt(T)?(e.consume(T),K):r(T)}function p(T){return T===45?(e.consume(T),x):T===91?(e.consume(T),a=0,k):Mt(T)?(e.consume(T),I):r(T)}function x(T){return T===45?(e.consume(T),w):r(T)}function m(T){return T===null?r(T):T===45?(e.consume(T),v):je(T)?(u=m,de(T)):(e.consume(T),m)}function v(T){return T===45?(e.consume(T),w):m(T)}function w(T){return T===62?ce(T):T===45?v(T):m(T)}function k(T){const z="CDATA[";return T===z.charCodeAt(a++)?(e.consume(T),a===z.length?S:k):r(T)}function S(T){return T===null?r(T):T===93?(e.consume(T),j):je(T)?(u=S,de(T)):(e.consume(T),S)}function j(T){return T===93?(e.consume(T),E):S(T)}function E(T){return T===62?ce(T):T===93?(e.consume(T),E):S(T)}function I(T){return T===null||T===62?ce(T):je(T)?(u=I,de(T)):(e.consume(T),I)}function A(T){return T===null?r(T):T===63?(e.consume(T),_):je(T)?(u=A,de(T)):(e.consume(T),A)}function _(T){return T===62?ce(T):A(T)}function O(T){return Mt(T)?(e.consume(T),P):r(T)}function P(T){return T===45||zt(T)?(e.consume(T),P):V(T)}function V(T){return je(T)?(u=V,de(T)):Fe(T)?(e.consume(T),V):ce(T)}function K(T){return T===45||zt(T)?(e.consume(T),K):T===47||T===62||Je(T)?re(T):r(T)}function re(T){return T===47?(e.consume(T),ce):T===58||T===95||Mt(T)?(e.consume(T),D):je(T)?(u=re,de(T)):Fe(T)?(e.consume(T),re):ce(T)}function D(T){return T===45||T===46||T===58||T===95||zt(T)?(e.consume(T),D):te(T)}function te(T){return T===61?(e.consume(T),se):je(T)?(u=te,de(T)):Fe(T)?(e.consume(T),te):re(T)}function se(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),l=T,ee):je(T)?(u=se,de(T)):Fe(T)?(e.consume(T),se):(e.consume(T),X)}function ee(T){return T===l?(e.consume(T),l=void 0,W):T===null?r(T):je(T)?(u=ee,de(T)):(e.consume(T),ee)}function X(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Je(T)?re(T):(e.consume(T),X)}function W(T){return T===47||T===62||Je(T)?re(T):r(T)}function ce(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):r(T)}function de(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return Fe(T)?De(e,fe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):fe(T)}function fe(T){return e.enter("htmlTextData"),u(T)}}const Sf={name:"labelEnd",resolveAll:_$,resolveTo:F$,tokenize:O$},A$={tokenize:D$},L$={tokenize:M$},z$={tokenize:B$};function _$(e){let t=-1;const r=[];for(;++t<e.length;){const i=e[t][1];if(r.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",t+=l}}return e.length!==r.length&&un(e,0,e.length,r),e}function F$(e,t){let r=e.length,i=0,l,a,u,c;for(;r--;)if(l=e[r][1],a){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(a=r,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(u=r);const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[a][1].start},end:{...e[u][1].end}},x={type:"labelText",start:{...e[a+i+2][1].end},end:{...e[u-2][1].start}};return c=[["enter",f,t],["enter",p,t]],c=wn(c,e.slice(a+1,a+i+3)),c=wn(c,[["enter",x,t]]),c=wn(c,Aa(t.parser.constructs.insideSpan.null,e.slice(a+i+4,u-3),t)),c=wn(c,[["exit",x,t],e[u-2],e[u-1],["exit",p,t]]),c=wn(c,e.slice(u+1)),c=wn(c,[["exit",f,t]]),un(e,a,e.length,c),e}function O$(e,t,r){const i=this;let l=i.events.length,a,u;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){a=i.events[l][1];break}return c;function c(v){return a?a._inactive?m(v):(u=i.parser.defined.includes(Pn(i.sliceSerialize({start:a.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):r(v)}function f(v){return v===40?e.attempt(A$,x,u?x:m)(v):v===91?e.attempt(L$,x,u?p:m)(v):u?x(v):m(v)}function p(v){return e.attempt(z$,x,m)(v)}function x(v){return t(v)}function m(v){return a._balanced=!0,r(v)}}function D$(e,t,r){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),l}function l(m){return Je(m)?ll(e,a)(m):a(m)}function a(m){return m===41?x(m):V0(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return Je(m)?ll(e,f)(m):x(m)}function c(m){return r(m)}function f(m){return m===34||m===39||m===40?W0(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):x(m)}function p(m){return Je(m)?ll(e,x)(m):x(m)}function x(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):r(m)}}function M$(e,t,r){const i=this;return l;function l(c){return H0.call(i,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return i.parser.defined.includes(Pn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):r(c)}function u(c){return r(c)}}function B$(e,t,r){return i;function i(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),l}function l(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const U$={name:"labelStartImage",resolveAll:Sf.resolveAll,tokenize:V$};function V$(e,t,r){const i=this;return l;function l(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):r(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):t(c)}}const H$={name:"labelStartLink",resolveAll:Sf.resolveAll,tokenize:W$};function W$(e,t,r){const i=this;return l;function l(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(u):t(u)}}const Bc={name:"lineEnding",tokenize:q$};function q$(e,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),De(e,t,"linePrefix")}}const ta={name:"thematicBreak",tokenize:G$};function G$(e,t,r){let i=0,l;return a;function a(p){return e.enter("thematicBreak"),u(p)}function u(p){return l=p,c(p)}function c(p){return p===l?(e.enter("thematicBreakSequence"),f(p)):i>=3&&(p===null||je(p))?(e.exit("thematicBreak"),t(p)):r(p)}function f(p){return p===l?(e.consume(p),i++,f):(e.exit("thematicBreakSequence"),Fe(p)?De(e,c,"whitespace")(p):c(p))}}const Jt={continuation:{tokenize:Y$},exit:Z$,name:"list",tokenize:Q$},J$={partial:!0,tokenize:eI},K$={partial:!0,tokenize:X$};function Q$(e,t,r){const i=this,l=i.events[i.events.length-1];let a=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return c;function c(w){const k=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:Td(w)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(ta,r,p)(w):p(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(w)}return r(w)}function f(w){return Td(w)&&++u<10?(e.consume(w),f):(!i.interrupt||u<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),p(w)):r(w)}function p(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(kl,i.interrupt?r:x,e.attempt(J$,v,m))}function x(w){return i.containerState.initialBlankLine=!0,a++,v(w)}function m(w){return Fe(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),v):r(w)}function v(w){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function Y$(e,t,r){const i=this;return i.containerState._closeFlow=void 0,e.check(kl,l,a);function l(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,De(e,t,"listItemIndent",i.containerState.size+1)(c)}function a(c){return i.containerState.furtherBlankLines||!Fe(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(K$,t,u)(c))}function u(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,De(e,e.attempt(Jt,t,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function X$(e,t,r){const i=this;return De(e,l,"listItemIndent",i.containerState.size+1);function l(a){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?t(a):r(a)}}function Z$(e){e.exit(this.containerState.type)}function eI(e,t,r){const i=this;return De(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(a){const u=i.events[i.events.length-1];return!Fe(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const qg={name:"setextUnderline",resolveTo:tI,tokenize:nI};function tI(e,t){let r=e.length,i,l,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const u={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",a?(e.splice(l,0,["enter",u,t]),e.splice(a+1,0,["exit",e[i][1],t]),e[i][1].end={...e[a][1].end}):e[i][1]=u,e.push(["exit",u,t]),e}function nI(e,t,r){const i=this;let l;return a;function a(p){let x=i.events.length,m;for(;x--;)if(i.events[x][1].type!=="lineEnding"&&i.events[x][1].type!=="linePrefix"&&i.events[x][1].type!=="content"){m=i.events[x][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),l=p,u(p)):r(p)}function u(p){return e.enter("setextHeadingLineSequence"),c(p)}function c(p){return p===l?(e.consume(p),c):(e.exit("setextHeadingLineSequence"),Fe(p)?De(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||je(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}const rI={tokenize:oI};function oI(e){const t=this,r=e.attempt(kl,i,e.attempt(this.parser.constructs.flowInitial,l,De(e,e.attempt(this.parser.constructs.flow,l,e.attempt(u$,l)),"linePrefix")));return r;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const iI={resolveAll:G0()},lI=q0("string"),sI=q0("text");function q0(e){return{resolveAll:G0(e==="text"?aI:void 0),tokenize:t};function t(r){const i=this,l=this.parser.constructs[e],a=r.attempt(l,u,c);return u;function u(x){return p(x)?a(x):c(x)}function c(x){if(x===null){r.consume(x);return}return r.enter("data"),r.consume(x),f}function f(x){return p(x)?(r.exit("data"),a(x)):(r.consume(x),f)}function p(x){if(x===null)return!0;const m=l[x];let v=-1;if(m)for(;++v<m.length;){const w=m[v];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function G0(e){return t;function t(r,i){let l=-1,a;for(;++l<=r.length;)a===void 0?r[l]&&r[l][1].type==="data"&&(a=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==a+2&&(r[a][1].end=r[l-1][1].end,r.splice(a+2,l-a-2),l=a+2),a=void 0);return e?e(r,i):r}}function aI(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=t.sliceStream(i);let a=l.length,u=-1,c=0,f;for(;a--;){const p=l[a];if(typeof p=="string"){for(u=p.length;p.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(p===-2)f=!0,c++;else if(p!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){const p={type:r===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:i.start._bufferIndex+u,_index:i.start._index+a,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}const uI={42:Jt,43:Jt,45:Jt,48:Jt,49:Jt,50:Jt,51:Jt,52:Jt,53:Jt,54:Jt,55:Jt,56:Jt,57:Jt,62:D0},cI={91:h$},dI={[-2]:Mc,[-1]:Mc,32:Mc},fI={35:w$,42:ta,45:[qg,ta],60:C$,61:qg,95:ta,96:Hg,126:Hg},pI={38:B0,92:M0},hI={[-5]:Bc,[-4]:Bc,[-3]:Bc,33:U$,38:B0,42:Rd,60:[HR,N$],91:H$,92:[y$,M0],93:Sf,95:Rd,96:r$},mI={null:[Rd,iI]},gI={null:[42,95]},xI={null:[]},yI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:gI,contentInitial:cI,disable:xI,document:uI,flow:fI,flowInitial:dI,insideSpan:mI,string:pI,text:hI},Symbol.toStringTag,{value:"Module"}));function vI(e,t,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},a=[];let u=[],c=[];const f={attempt:V(O),check:V(P),consume:I,enter:A,exit:_,interrupt:V(P,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:v,sliceStream:w,write:m};let x=t.tokenize.call(p,f);return t.resolveAll&&a.push(t),p;function m(te){return u=wn(u,te),j(),u[u.length-1]!==null?[]:(K(t,0),p.events=Aa(a,p.events,p),p.events)}function v(te,se){return kI(w(te),se)}function w(te){return wI(u,te)}function k(){const{_bufferIndex:te,_index:se,line:ee,column:X,offset:W}=i;return{_bufferIndex:te,_index:se,line:ee,column:X,offset:W}}function S(te){l[te.line]=te.column,D()}function j(){let te;for(;i._index<u.length;){const se=u[i._index];if(typeof se=="string")for(te=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===te&&i._bufferIndex<se.length;)E(se.charCodeAt(i._bufferIndex));else E(se)}}function E(te){x=x(te)}function I(te){je(te)?(i.line++,i.column=1,i.offset+=te===-3?2:1,D()):te!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===u[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=te}function A(te,se){const ee=se||{};return ee.type=te,ee.start=k(),p.events.push(["enter",ee,p]),c.push(ee),ee}function _(te){const se=c.pop();return se.end=k(),p.events.push(["exit",se,p]),se}function O(te,se){K(te,se.from)}function P(te,se){se.restore()}function V(te,se){return ee;function ee(X,W,ce){let de,Q,fe,T;return Array.isArray(X)?q(X):"tokenize"in X?q([X]):z(X);function z(ke){return he;function he(pe){const le=pe!==null&&ke[pe],ve=pe!==null&&ke.null,Le=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return q(Le)(pe)}}function q(ke){return de=ke,Q=0,ke.length===0?ce:$(ke[Q])}function $(ke){return he;function he(pe){return T=re(),fe=ke,ke.partial||(p.currentConstruct=ke),ke.name&&p.parser.constructs.disable.null.includes(ke.name)?ge():ke.tokenize.call(se?Object.assign(Object.create(p),se):p,f,ue,ge)(pe)}}function ue(ke){return te(fe,T),W}function ge(ke){return T.restore(),++Q<de.length?$(de[Q]):ce}}}function K(te,se){te.resolveAll&&!a.includes(te)&&a.push(te),te.resolve&&un(p.events,se,p.events.length-se,te.resolve(p.events.slice(se),p)),te.resolveTo&&(p.events=te.resolveTo(p.events,p))}function re(){const te=k(),se=p.previous,ee=p.currentConstruct,X=p.events.length,W=Array.from(c);return{from:X,restore:ce};function ce(){i=te,p.previous=se,p.currentConstruct=ee,p.events.length=X,c=W,D()}}function D(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function wI(e,t){const r=t.start._index,i=t.start._bufferIndex,l=t.end._index,a=t.end._bufferIndex;let u;if(r===l)u=[e[r].slice(i,a)];else{if(u=e.slice(r,l),i>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(i):u.shift()}a>0&&u.push(e[l].slice(0,a))}return u}function kI(e,t){let r=-1;const i=[];let l;for(;++r<e.length;){const a=e[r];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
1369
|
-
`;break}case-3:{u=`\r
|
|
1370
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&l)continue;u=" ";break}default:u=String.fromCharCode(a)}l=a===-2,i.push(u)}return i.join("")}function bI(e){const i={constructs:F0([yI,...(e||{}).extensions||[]]),content:l(FR),defined:[],document:l(DR),flow:l(rI),lazy:{},string:l(lI),text:l(sI)};return i;function l(a){return u;function u(c){return vI(i,a,c)}}}function SI(e){for(;!U0(e););return e}const Gg=/[\0\t\n\r]/g;function CI(){let e=1,t="",r=!0,i;return l;function l(a,u,c){const f=[];let p,x,m,v,w;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",r&&(a.charCodeAt(0)===65279&&m++,r=void 0);m<a.length;){if(Gg.lastIndex=m,p=Gg.exec(a),v=p&&p.index!==void 0?p.index:a.length,w=a.charCodeAt(v),!p){t=a.slice(m);break}if(w===10&&m===v&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<v&&(f.push(a.slice(m,v)),e+=v-m),w){case 0:{f.push(65533),e++;break}case 9:{for(x=Math.ceil(e/4)*4,f.push(-2);e++<x;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=v+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const EI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jI(e){return e.replace(EI,TI)}function TI(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),a=l===120||l===88;return O0(r.slice(a?2:1),a?16:10)}return bf(r)||e}const J0={}.hasOwnProperty;function RI(e,t,r){return typeof t!="string"&&(r=t,t=void 0),$I(r)(SI(bI(r).document().write(CI()(e,t,!0))))}function $I(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_e),autolinkProtocol:re,autolinkEmail:re,atxHeading:a(bt),blockQuote:a(ve),characterEscape:re,characterReference:re,codeFenced:a(Le),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Le,u),codeText:a(Ie,u),codeTextData:re,data:re,codeFlowValue:re,definition:a(Ge),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Rt),hardBreakEscape:a(Bt),hardBreakTrailing:a(Bt),htmlFlow:a(qn,u),htmlFlowData:re,htmlText:a(qn,u),htmlTextData:re,image:a(co),label:u,link:a(_e),listItem:a(Ft),listItemValue:v,listOrdered:a(dt,m),listUnordered:a(dt),paragraph:a(ft),reference:$,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(bt),strong:a(Me),thematicBreak:a($t)},exit:{atxHeading:f(),atxHeadingSequence:O,autolink:f(),autolinkEmail:le,autolinkProtocol:pe,blockQuote:f(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:ke,characterReference:he,codeFenced:f(j),codeFencedFence:S,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:D,codeIndented:f(E),codeText:f(W),codeTextData:D,data:D,definition:f(),definitionDestinationString:_,definitionLabelString:I,definitionTitleString:A,emphasis:f(),hardBreakEscape:f(se),hardBreakTrailing:f(se),htmlFlow:f(ee),htmlFlowData:D,htmlText:f(X),htmlTextData:D,image:f(de),label:fe,labelText:Q,lineEnding:te,link:f(ce),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ue,resourceDestinationString:T,resourceTitleString:z,resource:q,setextHeading:f(K),setextHeadingLineSequence:V,setextHeadingText:P,strong:f(),thematicBreak:f()}};K0(t,(e||{}).mdastExtensions||[]);const r={};return i;function i(G){let ne={type:"root",children:[]};const be={stack:[ne],tokenStack:[],config:t,enter:c,exit:p,buffer:u,resume:x,data:r},Re=[];let Ne=-1;for(;++Ne<G.length;)if(G[Ne][1].type==="listOrdered"||G[Ne][1].type==="listUnordered")if(G[Ne][0]==="enter")Re.push(Ne);else{const St=Re.pop();Ne=l(G,St,Ne)}for(Ne=-1;++Ne<G.length;){const St=t[G[Ne][0]];J0.call(St,G[Ne][1].type)&&St[G[Ne][1].type].call(Object.assign({sliceSerialize:G[Ne][2].sliceSerialize},be),G[Ne][1])}if(be.tokenStack.length>0){const St=be.tokenStack[be.tokenStack.length-1];(St[1]||Jg).call(be,void 0,St[0])}for(ne.position={start:jr(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:jr(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<t.transforms.length;)ne=t.transforms[Ne](ne)||ne;return ne}function l(G,ne,be){let Re=ne-1,Ne=-1,St=!1,Gn,fn,ir,Ar;for(;++Re<=be;){const Ct=G[Re];switch(Ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ct[0]==="enter"?Ne++:Ne--,Ar=void 0;break}case"lineEndingBlank":{Ct[0]==="enter"&&(Gn&&!Ar&&!Ne&&!ir&&(ir=Re),Ar=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ar=void 0}if(!Ne&&Ct[0]==="enter"&&Ct[1].type==="listItemPrefix"||Ne===-1&&Ct[0]==="exit"&&(Ct[1].type==="listUnordered"||Ct[1].type==="listOrdered")){if(Gn){let zn=Re;for(fn=void 0;zn--;){const Zt=G[zn];if(Zt[1].type==="lineEnding"||Zt[1].type==="lineEndingBlank"){if(Zt[0]==="exit")continue;fn&&(G[fn][1].type="lineEndingBlank",St=!0),Zt[1].type="lineEnding",fn=zn}else if(!(Zt[1].type==="linePrefix"||Zt[1].type==="blockQuotePrefix"||Zt[1].type==="blockQuotePrefixWhitespace"||Zt[1].type==="blockQuoteMarker"||Zt[1].type==="listItemIndent"))break}ir&&(!fn||ir<fn)&&(Gn._spread=!0),Gn.end=Object.assign({},fn?G[fn][1].start:Ct[1].end),G.splice(fn||Re,0,["exit",Gn,Ct[2]]),Re++,be++}if(Ct[1].type==="listItemPrefix"){const zn={type:"listItem",_spread:!1,start:Object.assign({},Ct[1].start),end:void 0};Gn=zn,G.splice(Re,0,["enter",zn,Ct[2]]),Re++,be++,ir=void 0,Ar=!0}}}return G[ne][1]._spread=St,be}function a(G,ne){return be;function be(Re){c.call(this,G(Re),Re),ne&&ne.call(this,Re)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(G,ne,be){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([ne,be||void 0]),G.position={start:jr(ne.start),end:void 0}}function f(G){return ne;function ne(be){G&&G.call(this,be),p.call(this,be)}}function p(G,ne){const be=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==G.type&&(ne?ne.call(this,G,Re[0]):(Re[1]||Jg).call(this,G,Re[0]));else throw new Error("Cannot close `"+G.type+"` ("+il({start:G.start,end:G.end})+"): it’s not open");be.position.end=jr(G.end)}function x(){return kf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(G){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function w(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=G}function k(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=G}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.value=G.replace(/(\r?\n|\r)$/g,"")}function I(G){const ne=this.resume(),be=this.stack[this.stack.length-1];be.label=ne,be.identifier=Pn(this.sliceSerialize(G)).toLowerCase()}function A(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.title=G}function _(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.url=G}function O(G){const ne=this.stack[this.stack.length-1];if(!ne.depth){const be=this.sliceSerialize(G).length;ne.depth=be}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function V(G){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function re(G){const be=this.stack[this.stack.length-1].children;let Re=be[be.length-1];(!Re||Re.type!=="text")&&(Re=mt(),Re.position={start:jr(G.start),end:void 0},be.push(Re)),this.stack.push(Re)}function D(G){const ne=this.stack.pop();ne.value+=this.sliceSerialize(G),ne.position.end=jr(G.end)}function te(G){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ne.children[ne.children.length-1];be.position.end=jr(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(re.call(this,G),D.call(this,G))}function se(){this.data.atHardBreak=!0}function ee(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.value=G}function X(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.value=G}function W(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.value=G}function ce(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ne,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function de(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ne,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function Q(G){const ne=this.sliceSerialize(G),be=this.stack[this.stack.length-2];be.label=jI(ne),be.identifier=Pn(ne).toLowerCase()}function fe(){const G=this.stack[this.stack.length-1],ne=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Re=G.children;be.children=Re}else be.alt=ne}function T(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.url=G}function z(){const G=this.resume(),ne=this.stack[this.stack.length-1];ne.title=G}function q(){this.data.inReference=void 0}function $(){this.data.referenceType="collapsed"}function ue(G){const ne=this.resume(),be=this.stack[this.stack.length-1];be.label=ne,be.identifier=Pn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function ge(G){this.data.characterReferenceType=G.type}function ke(G){const ne=this.sliceSerialize(G),be=this.data.characterReferenceType;let Re;be?(Re=O0(ne,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=bf(ne);const Ne=this.stack[this.stack.length-1];Ne.value+=Re}function he(G){const ne=this.stack.pop();ne.position.end=jr(G.end)}function pe(G){D.call(this,G);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(G)}function le(G){D.call(this,G);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(G)}function ve(){return{type:"blockquote",children:[]}}function Le(){return{type:"code",lang:null,meta:null,value:""}}function Ie(){return{type:"inlineCode",value:""}}function Ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rt(){return{type:"emphasis",children:[]}}function bt(){return{type:"heading",depth:0,children:[]}}function Bt(){return{type:"break"}}function qn(){return{type:"html",value:""}}function co(){return{type:"image",title:null,url:"",alt:null}}function _e(){return{type:"link",title:null,url:"",children:[]}}function dt(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function Ft(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function ft(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function mt(){return{type:"text",value:""}}function $t(){return{type:"thematicBreak"}}}function jr(e){return{line:e.line,column:e.column,offset:e.offset}}function K0(e,t){let r=-1;for(;++r<t.length;){const i=t[r];Array.isArray(i)?K0(e,i):II(e,i)}}function II(e,t){let r;for(r in t)if(J0.call(t,r))switch(r){case"canContainEols":{const i=t[r];i&&e[r].push(...i);break}case"transforms":{const i=t[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=t[r];i&&Object.assign(e[r],i);break}}}function Jg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+il({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+il({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+il({start:t.start,end:t.end})+") is still open")}function NI(e){const t=this;t.parser=r;function r(i){return RI(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function PI(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function AI(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
1371
|
-
`}]}function LI(e,t){const r=t.value?t.value+`
|
|
1372
|
-
`:"",i={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(i.className=["language-"+l[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function zI(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _I(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FI(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=li(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let u,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function OI(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function DI(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Q0(e,t){const r=t.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const l=e.all(t),a=l[0];a&&a.type==="text"?a.value="["+a.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=i:l.push({type:"text",value:i}),l}function MI(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return Q0(e,t);const l={src:li(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,a),e.applyData(t,a)}function BI(e,t){const r={src:li(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function UI(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,i),e.applyData(t,i)}function VI(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return Q0(e,t);const l={href:li(i.url||"")};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function HI(e,t){const r={href:li(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function WI(e,t,r){const i=e.all(t),l=r?qI(r):Y0(t),a={},u=[];if(typeof t.checked=="boolean"){const x=i[0];let m;x&&x.type==="element"&&x.tagName==="p"?m=x:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const x=i[c];(l||c!==0||x.type!=="element"||x.tagName!=="p")&&u.push({type:"text",value:`
|
|
1373
|
-
`}),x.type==="element"&&x.tagName==="p"&&!l?u.push(...x.children):u.push(x)}const f=i[i.length-1];f&&(l||f.type!=="element"||f.tagName!=="p")&&u.push({type:"text",value:`
|
|
1374
|
-
`});const p={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,p),e.applyData(t,p)}function qI(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let i=-1;for(;!t&&++i<r.length;)t=Y0(r[i])}return t}function Y0(e){const t=e.spread;return t??e.children.length>1}function GI(e,t){const r={},i=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<i.length;){const u=i[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function JI(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function KI(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function QI(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function YI(e,t){const r=e.all(t),i=r.shift(),l=[];if(i){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],u),l.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},c=xf(t.children[1]),f=I0(t.children[t.children.length-1]);c&&f&&(u.position={start:c,end:f}),l.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,a),e.applyData(t,a)}function XI(e,t,r){const i=r?r.children:void 0,a=(i?i.indexOf(t):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,c=u?u.length:t.children.length;let f=-1;const p=[];for(;++f<c;){const m=t.children[f],v={},w=u?u[f]:void 0;w&&(v.align=w);let k={type:"element",tagName:a,properties:v,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),p.push(k)}const x={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,x),e.applyData(t,x)}function ZI(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Kg=9,Qg=32;function e4(e){const t=String(e),r=/\r?\n|\r/g;let i=r.exec(t),l=0;const a=[];for(;i;)a.push(Yg(t.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=r.exec(t);return a.push(Yg(t.slice(l),l>0,!1)),a.join("")}function Yg(e,t,r){let i=0,l=e.length;if(t){let a=e.codePointAt(i);for(;a===Kg||a===Qg;)i++,a=e.codePointAt(i)}if(r){let a=e.codePointAt(l-1);for(;a===Kg||a===Qg;)l--,a=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function t4(e,t){const r={type:"text",value:e4(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function n4(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const r4={blockquote:PI,break:AI,code:LI,delete:zI,emphasis:_I,footnoteReference:FI,heading:OI,html:DI,imageReference:MI,image:BI,inlineCode:UI,linkReference:VI,link:HI,listItem:WI,list:GI,paragraph:JI,root:KI,strong:QI,table:YI,tableCell:ZI,tableRow:XI,text:t4,thematicBreak:n4,toml:Os,yaml:Os,definition:Os,footnoteDefinition:Os};function Os(){}const X0=-1,La=0,fa=1,pa=2,Cf=3,Ef=4,jf=5,Tf=6,Z0=7,e1=8,Xg=typeof self=="object"?self:globalThis,o4=(e,t)=>{const r=(l,a)=>(e.set(a,l),l),i=l=>{if(e.has(l))return e.get(l);const[a,u]=t[l];switch(a){case La:case X0:return r(u,l);case fa:{const c=r([],l);for(const f of u)c.push(i(f));return c}case pa:{const c=r({},l);for(const[f,p]of u)c[i(f)]=i(p);return c}case Cf:return r(new Date(u),l);case Ef:{const{source:c,flags:f}=u;return r(new RegExp(c,f),l)}case jf:{const c=r(new Map,l);for(const[f,p]of u)c.set(i(f),i(p));return c}case Tf:{const c=r(new Set,l);for(const f of u)c.add(i(f));return c}case Z0:{const{name:c,message:f}=u;return r(new Xg[c](f),l)}case e1:return r(BigInt(u),l);case"BigInt":return r(Object(BigInt(u)),l)}return r(new Xg[a](u),l)};return i},Zg=e=>o4(new Map,e)(0),Do="",{toString:i4}={},{keys:l4}=Object,el=e=>{const t=typeof e;if(t!=="object"||!e)return[La,t];const r=i4.call(e).slice(8,-1);switch(r){case"Array":return[fa,Do];case"Object":return[pa,Do];case"Date":return[Cf,Do];case"RegExp":return[Ef,Do];case"Map":return[jf,Do];case"Set":return[Tf,Do]}return r.includes("Array")?[fa,r]:r.includes("Error")?[Z0,r]:[pa,r]},Ds=([e,t])=>e===La&&(t==="function"||t==="symbol"),s4=(e,t,r,i)=>{const l=(u,c)=>{const f=i.push(u)-1;return r.set(c,f),f},a=u=>{if(r.has(u))return r.get(u);let[c,f]=el(u);switch(c){case La:{let x=u;switch(f){case"bigint":c=e1,x=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);x=null;break;case"undefined":return l([X0],u)}return l([c,x],u)}case fa:{if(f)return l([f,[...u]],u);const x=[],m=l([c,x],u);for(const v of u)x.push(a(v));return m}case pa:{if(f)switch(f){case"BigInt":return l([f,u.toString()],u);case"Boolean":case"Number":case"String":return l([f,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const x=[],m=l([c,x],u);for(const v of l4(u))(e||!Ds(el(u[v])))&&x.push([a(v),a(u[v])]);return m}case Cf:return l([c,u.toISOString()],u);case Ef:{const{source:x,flags:m}=u;return l([c,{source:x,flags:m}],u)}case jf:{const x=[],m=l([c,x],u);for(const[v,w]of u)(e||!(Ds(el(v))||Ds(el(w))))&&x.push([a(v),a(w)]);return m}case Tf:{const x=[],m=l([c,x],u);for(const v of u)(e||!Ds(el(v)))&&x.push(a(v));return m}}const{message:p}=u;return l([c,{name:f,message:p}],u)};return a},ex=(e,{json:t,lossy:r}={})=>{const i=[];return s4(!(t||r),!!t,new Map,i)(e),i},ha=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Zg(ex(e,t)):structuredClone(e):(e,t)=>Zg(ex(e,t));function a4(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function u4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function c4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||a4,i=e.options.footnoteBackLabel||u4,l=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const x=e.all(p),m=String(p.identifier).toUpperCase(),v=li(m.toLowerCase());let w=0;const k=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++w<=S;){k.length>0&&k.push({type:"text",value:" "});let I=typeof r=="string"?r:r(f,w);typeof I=="string"&&(I={type:"text",value:I}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,w),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const j=x[x.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const I=j.children[j.children.length-1];I&&I.type==="text"?I.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...k)}else x.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(x,!0)};e.patch(p,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ha(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
1375
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
1376
|
-
`}]}}const za=function(e){if(e==null)return h4;if(typeof e=="function")return _a(e);if(typeof e=="object")return Array.isArray(e)?d4(e):f4(e);if(typeof e=="string")return p4(e);throw new Error("Expected function, string, or object as test")};function d4(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=za(e[r]);return _a(i);function i(...l){let a=-1;for(;++a<t.length;)if(t[a].apply(this,l))return!0;return!1}}function f4(e){const t=e;return _a(r);function r(i){const l=i;let a;for(a in e)if(l[a]!==t[a])return!1;return!0}}function p4(e){return _a(t);function t(r){return r&&r.type===e}}function _a(e){return t;function t(r,i,l){return!!(m4(r)&&e.call(this,r,typeof i=="number"?i:void 0,l||void 0))}}function h4(){return!0}function m4(e){return e!==null&&typeof e=="object"&&"type"in e}const t1=[],g4=!0,$d=!1,x4="skip";function n1(e,t,r,i){let l;typeof t=="function"&&typeof r!="function"?(i=r,r=t):l=t;const a=za(l),u=i?-1:1;c(e,void 0,[])();function c(f,p,x){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const w=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(f.type+(w?"<"+w+">":""))+")"})}return v;function v(){let w=t1,k,S,j;if((!t||a(f,p,x[x.length-1]||void 0))&&(w=y4(r(f,x)),w[0]===$d))return w;if("children"in f&&f.children){const E=f;if(E.children&&w[0]!==x4)for(S=(i?E.children.length:-1)+u,j=x.concat(E);S>-1&&S<E.children.length;){const I=E.children[S];if(k=c(I,S,j)(),k[0]===$d)return k;S=typeof k[1]=="number"?k[1]:S+u}}return w}}}function y4(e){return Array.isArray(e)?e:typeof e=="number"?[g4,e]:e==null?t1:[e]}function Rf(e,t,r,i){let l,a,u;typeof t=="function"&&typeof r!="function"?(a=void 0,u=t,l=r):(a=t,u=r,l=i),n1(e,a,c,l);function c(f,p){const x=p[p.length-1],m=x?x.children.indexOf(f):void 0;return u(f,m,x)}}const Id={}.hasOwnProperty,v4={};function w4(e,t){const r=t||v4,i=new Map,l=new Map,a=new Map,u={...r4,...r.handlers},c={all:p,applyData:b4,definitionById:i,footnoteById:l,footnoteCounts:a,footnoteOrder:[],handlers:u,one:f,options:r,patch:k4,wrap:C4};return Rf(e,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const m=x.type==="definition"?i:l,v=String(x.identifier).toUpperCase();m.has(v)||m.set(v,x)}}),c;function f(x,m){const v=x.type,w=c.handlers[v];if(Id.call(c.handlers,v)&&w)return w(c,x,m);if(c.options.passThrough&&c.options.passThrough.includes(v)){if("children"in x){const{children:S,...j}=x,E=ha(j);return E.children=c.all(x),E}return ha(x)}return(c.options.unknownHandler||S4)(c,x,m)}function p(x){const m=[];if("children"in x){const v=x.children;let w=-1;for(;++w<v.length;){const k=c.one(v[w],x);if(k){if(w&&v[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=tx(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=tx(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function k4(e,t){e.position&&(t.position=uR(e))}function b4(e,t){let r=t;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,a=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const u="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:u}}r.type==="element"&&a&&Object.assign(r.properties,ha(a)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function S4(e,t){const r=t.data||{},i="value"in t&&!(Id.call(r,"hProperties")||Id.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function C4(e,t){const r=[];let i=-1;for(t&&r.push({type:"text",value:`
|
|
1377
|
-
`});++i<e.length;)i&&r.push({type:"text",value:`
|
|
1378
|
-
`}),r.push(e[i]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
1379
|
-
`}),r}function tx(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function nx(e,t){const r=w4(e,t),i=r.one(e,void 0),l=c4(r),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return l&&a.children.push({type:"text",value:`
|
|
1380
|
-
`},l),a}function E4(e,t){return e&&"run"in e?async function(r,i){const l=nx(r,{file:i,...t});await e.run(l,i)}:function(r,i){return nx(r,{file:i,...e||t})}}function rx(e){if(e)throw e}var Uc,ox;function j4(){if(ox)return Uc;ox=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},a=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var x=e.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!x&&!m)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},u=function(p,x){r&&x.name==="__proto__"?r(p,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):p[x.name]=x.newValue},c=function(p,x){if(x==="__proto__")if(e.call(p,x)){if(i)return i(p,x).value}else return;return p[x]};return Uc=function f(){var p,x,m,v,w,k,S=arguments[0],j=1,E=arguments.length,I=!1;for(typeof S=="boolean"&&(I=S,S=arguments[1]||{},j=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});j<E;++j)if(p=arguments[j],p!=null)for(x in p)m=c(S,x),v=c(p,x),S!==v&&(I&&v&&(a(v)||(w=l(v)))?(w?(w=!1,k=m&&l(m)?m:[]):k=m&&a(m)?m:{},u(S,{name:x,newValue:f(I,k,v)})):typeof v<"u"&&u(S,{name:x,newValue:v}));return S},Uc}var T4=j4();const Vc=Bd(T4);function Nd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function R4(){const e=[],t={run:r,use:i};return t;function r(...l){let a=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...l);function c(f,...p){const x=e[++a];let m=-1;if(f){u(f);return}for(;++m<l.length;)(p[m]===null||p[m]===void 0)&&(p[m]=l[m]);l=p,x?$4(x,c)(...p):u(null,...p)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function $4(e,t){let r;return i;function i(...u){const c=e.length>u.length;let f;c&&u.push(l);try{f=e.apply(this,u)}catch(p){const x=p;if(c&&r)throw x;return l(x)}c||(f&&f.then&&typeof f.then=="function"?f.then(a,l):f instanceof Error?l(f):a(f))}function l(u,...c){r||(r=!0,t(u,...c))}function a(u){l(null,u)}}const Un={basename:I4,dirname:N4,extname:P4,join:A4,sep:"/"};function I4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bl(e);let r=0,i=-1,l=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else i<0&&(a=!0,i=l+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let u=-1,c=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else u<0&&(a=!0,u=l+1),c>-1&&(e.codePointAt(l)===t.codePointAt(c--)?c<0&&(i=l):(c=-1,i=u));return r===i?i=u:i<0&&(i=e.length),e.slice(r,i)}function N4(e){if(bl(e),e.length===0)return".";let t=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){t=r;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function P4(e){bl(e);let t=e.length,r=-1,i=0,l=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){i=t+1;break}continue}r<0&&(u=!0,r=t+1),c===46?l<0?l=t:a!==1&&(a=1):l>-1&&(a=-1)}return l<0||r<0||a===0||a===1&&l===r-1&&l===i+1?"":e.slice(l,r)}function A4(...e){let t=-1,r;for(;++t<e.length;)bl(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":L4(r)}function L4(e){bl(e);const t=e.codePointAt(0)===47;let r=z4(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function z4(e,t){let r="",i=0,l=-1,a=0,u=-1,c,f;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(l===u-1||a===1))if(l!==u-1&&a===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(f=r.lastIndexOf("/"),f!==r.length-1){f<0?(r="",i=0):(r=r.slice(0,f),i=r.length-1-r.lastIndexOf("/")),l=u,a=0;continue}}else if(r.length>0){r="",i=0,l=u,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(l+1,u):r=e.slice(l+1,u),i=u-l-1;l=u,a=0}else c===46&&a>-1?a++:a=-1}return r}function bl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _4={cwd:F4};function F4(){return"/"}function Pd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function O4(e){if(typeof e=="string")e=new URL(e);else if(!Pd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return D4(e)}function D4(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const i=t.codePointAt(r+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Hc=["history","path","basename","stem","extname","dirname"];class r1{constructor(t){let r;t?Pd(t)?r={path:t}:typeof t=="string"||M4(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":_4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Hc.length;){const a=Hc[i];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let l;for(l in r)Hc.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?Un.basename(this.path):void 0}set basename(t){qc(t,"basename"),Wc(t,"basename"),this.path=Un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Un.dirname(this.path):void 0}set dirname(t){ix(this.basename,"dirname"),this.path=Un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Un.extname(this.path):void 0}set extname(t){if(Wc(t,"extname"),ix(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pd(t)&&(t=O4(t)),qc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Un.basename(this.path,this.extname):void 0}set stem(t){qc(t,"stem"),Wc(t,"stem"),this.path=Un.join(this.dirname||"",t+(this.extname||""))}fail(t,r,i){const l=this.message(t,r,i);throw l.fatal=!0,l}info(t,r,i){const l=this.message(t,r,i);return l.fatal=void 0,l}message(t,r,i){const l=new _t(t,r,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Wc(e,t){if(e&&e.includes(Un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Un.sep+"`")}function qc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ix(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function M4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const B4=function(e){const i=this.constructor.prototype,l=i[e],a=function(){return l.apply(a,arguments)};return Object.setPrototypeOf(a,i),a},U4={}.hasOwnProperty;class $f extends B4{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=R4()}copy(){const t=new $f;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];t.use(...i)}return t.data(Vc(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Kc("data",this.frozen),this.namespace[t]=r,this):U4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=r.call(t,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Ms(t),i=this.parser||this.Parser;return Gc("parse",i),i(String(r),r)}process(t,r){const i=this;return this.freeze(),Gc("process",this.parser||this.Parser),Jc("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(a,u){const c=Ms(t),f=i.parse(c);i.run(f,c,function(x,m,v){if(x||!m||!v)return p(x);const w=m,k=i.stringify(w,v);W4(k)?v.value=k:v.result=k,p(x,v)});function p(x,m){x||!m?u(x):a?a(m):r(void 0,m)}}}processSync(t){let r=!1,i;return this.freeze(),Gc("processSync",this.parser||this.Parser),Jc("processSync",this.compiler||this.Compiler),this.process(t,l),sx("processSync","process",r),i;function l(a,u){r=!0,rx(a),i=u}}run(t,r,i){lx(t),this.freeze();const l=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?a(void 0,i):new Promise(a);function a(u,c){const f=Ms(r);l.run(t,f,p);function p(x,m,v){const w=m||t;x?c(x):u?u(w):i(void 0,w,v)}}}runSync(t,r){let i=!1,l;return this.run(t,r,a),sx("runSync","run",i),l;function a(u,c){rx(u),l=c,i=!0}}stringify(t,r){this.freeze();const i=Ms(r),l=this.compiler||this.Compiler;return Jc("stringify",l),lx(t),l(t,i)}use(t,...r){const i=this.attachers,l=this.namespace;if(Kc("use",this.frozen),t!=null)if(typeof t=="function")f(t,r);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[x,...m]=p;f(x,m)}else u(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function u(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(p.plugins),p.settings&&(l.settings=Vc(!0,l.settings,p.settings))}function c(p){let x=-1;if(p!=null)if(Array.isArray(p))for(;++x<p.length;){const m=p[x];a(m)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,x){let m=-1,v=-1;for(;++m<i.length;)if(i[m][0]===p){v=m;break}if(v===-1)i.push([p,...x]);else if(x.length>0){let[w,...k]=x;const S=i[v][1];Nd(S)&&Nd(w)&&(w=Vc(!0,S,w)),i[v]=[p,w,...k]}}}}const V4=new $f().freeze();function Gc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lx(e){if(!Nd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sx(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ms(e){return H4(e)?e:new r1(e)}function H4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function W4(e){return typeof e=="string"||q4(e)}function q4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const G4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ax=[],ux={allowDangerousHtml:!0},J4=/^(https?|ircs?|mailto|xmpp)$/i,K4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function lo(e){const t=Q4(e),r=Y4(e);return X4(t.runSync(t.parse(r),r),e)}function Q4(e){const t=e.rehypePlugins||ax,r=e.remarkPlugins||ax,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ux}:ux;return V4().use(NI).use(r).use(E4,i).use(t)}function Y4(e){const t=e.children||"",r=new r1;return typeof t=="string"&&(r.value=t),r}function X4(e,t){const r=t.allowedElements,i=t.allowElement,l=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||Z4;for(const x of K4)Object.hasOwn(t,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+G4+x.id,void 0);return Rf(e,p),hR(e,{Fragment:h.Fragment,components:l,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function p(x,m,v){if(x.type==="raw"&&v&&typeof m=="number")return u?v.children.splice(m,1):v.children[m]={type:"text",value:x.value},m;if(x.type==="element"){let w;for(w in Dc)if(Object.hasOwn(Dc,w)&&Object.hasOwn(x.properties,w)){const k=x.properties[w],S=Dc[w];(S===null||S.includes(x.tagName))&&(x.properties[w]=f(String(k||""),w,x))}}if(x.type==="element"){let w=r?!r.includes(x.tagName):a?a.includes(x.tagName):!1;if(!w&&i&&typeof m=="number"&&(w=!i(x,m,v)),w&&v&&typeof m=="number")return c&&x.children?v.children.splice(m,1,...x.children):v.children.splice(m,1),m}}}function Z4(e){const t=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||i!==-1&&t>i||J4.test(e.slice(0,t))?e:""}function cx(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,l=r.indexOf(t);for(;l!==-1;)i++,l=r.indexOf(t,l+t.length);return i}function eN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function tN(e,t,r){const l=za((r||{}).ignore||[]),a=nN(t);let u=-1;for(;++u<a.length;)n1(e,"text",c);function c(p,x){let m=-1,v;for(;++m<x.length;){const w=x[m],k=v?v.children:void 0;if(l(w,k?k.indexOf(w):void 0,v))return;v=w}if(v)return f(p,x)}function f(p,x){const m=x[x.length-1],v=a[u][0],w=a[u][1];let k=0;const j=m.children.indexOf(p);let E=!1,I=[];v.lastIndex=0;let A=v.exec(p.value);for(;A;){const _=A.index,O={index:A.index,input:A.input,stack:[...x,p]};let P=w(...A,O);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?v.lastIndex=_+1:(k!==_&&I.push({type:"text",value:p.value.slice(k,_)}),Array.isArray(P)?I.push(...P):P&&I.push(P),k=_+A[0].length,E=!0),!v.global)break;A=v.exec(p.value)}return E?(k<p.value.length&&I.push({type:"text",value:p.value.slice(k)}),m.children.splice(j,1,...I)):I=[p],j+I.length}}function nN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const l=r[i];t.push([rN(l[0]),oN(l[1])])}return t}function rN(e){return typeof e=="string"?new RegExp(eN(e),"g"):e}function oN(e){return typeof e=="function"?e:function(){return e}}const Qc="phrasing",Yc=["autolink","link","image","label"];function iN(){return{transforms:[fN],enter:{literalAutolink:sN,literalAutolinkEmail:Xc,literalAutolinkHttp:Xc,literalAutolinkWww:Xc},exit:{literalAutolink:dN,literalAutolinkEmail:cN,literalAutolinkHttp:aN,literalAutolinkWww:uN}}}function lN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Qc,notInConstruct:Yc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Qc,notInConstruct:Yc},{character:":",before:"[ps]",after:"\\/",inConstruct:Qc,notInConstruct:Yc}]}}function sN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Xc(e){this.config.enter.autolinkProtocol.call(this,e)}function aN(e){this.config.exit.autolinkProtocol.call(this,e)}function uN(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function cN(e){this.config.exit.autolinkEmail.call(this,e)}function dN(e){this.exit(e)}function fN(e){tN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hN]],{ignore:["link","linkReference"]})}function pN(e,t,r,i,l){let a="";if(!o1(l)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!mN(r)))return!1;const u=gN(r+i);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function hN(e,t,r,i){return!o1(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function mN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function gN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],i=r.indexOf(")");const l=cx(e,"(");let a=cx(e,")");for(;i!==-1&&l>a;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),a++;return[e,r]}function o1(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||io(r)||Pa(r))&&(!t||r!==47)}i1.peek=EN;function xN(){this.buffer()}function yN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vN(){this.buffer()}function wN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kN(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function bN(e){this.exit(e)}function SN(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function CN(e){this.exit(e)}function EN(){return"["}function i1(e,t,r,i){const l=r.createTracker(i);let a=l.move("[^");const u=r.enter("footnoteReference"),c=r.enter("reference");return a+=l.move(r.safe(r.associationId(e),{after:"]",before:a})),c(),u(),a+=l.move("]"),a}function jN(){return{enter:{gfmFootnoteCallString:xN,gfmFootnoteCall:yN,gfmFootnoteDefinitionLabelString:vN,gfmFootnoteDefinition:wN},exit:{gfmFootnoteCallString:kN,gfmFootnoteCall:bN,gfmFootnoteDefinitionLabelString:SN,gfmFootnoteDefinition:CN}}}function TN(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:i1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,l,a,u){const c=a.createTracker(u);let f=c.move("[^");const p=a.enter("footnoteDefinition"),x=a.enter("label");return f+=c.move(a.safe(a.associationId(i),{before:f,after:"]"})),x(),f+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
1381
|
-
`:" ")+a.indentLines(a.containerFlow(i,c.current()),t?l1:RN))),p(),f}}function RN(e,t,r){return t===0?e:l1(e,t,r)}function l1(e,t,r){return(r?"":" ")+e}const $N=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];s1.peek=LN;function IN(){return{canContainEols:["delete"],enter:{strikethrough:PN},exit:{strikethrough:AN}}}function NN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$N}],handlers:{delete:s1}}}function PN(e){this.enter({type:"delete",children:[]},e)}function AN(e){this.exit(e)}function s1(e,t,r,i){const l=r.createTracker(i),a=r.enter("strikethrough");let u=l.move("~~");return u+=r.containerPhrasing(e,{...l.current(),before:u,after:"~"}),u+=l.move("~~"),a(),u}function LN(){return"~"}function zN(e){return e.length}function _N(e,t){const r=t||{},i=(r.align||[]).concat(),l=r.stringLength||zN,a=[],u=[],c=[],f=[];let p=0,x=-1;for(;++x<e.length;){const S=[],j=[];let E=-1;for(e[x].length>p&&(p=e[x].length);++E<e[x].length;){const I=FN(e[x][E]);if(r.alignDelimiters!==!1){const A=l(I);j[E]=A,(f[E]===void 0||A>f[E])&&(f[E]=A)}S.push(I)}u[x]=S,c[x]=j}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<p;)a[m]=dx(i[m]);else{const S=dx(i);for(;++m<p;)a[m]=S}m=-1;const v=[],w=[];for(;++m<p;){const S=a[m];let j="",E="";S===99?(j=":",E=":"):S===108?j=":":S===114&&(E=":");let I=r.alignDelimiters===!1?1:Math.max(1,f[m]-j.length-E.length);const A=j+"-".repeat(I)+E;r.alignDelimiters!==!1&&(I=j.length+I+E.length,I>f[m]&&(f[m]=I),w[m]=I),v[m]=A}u.splice(1,0,v),c.splice(1,0,w),x=-1;const k=[];for(;++x<u.length;){const S=u[x],j=c[x];m=-1;const E=[];for(;++m<p;){const I=S[m]||"";let A="",_="";if(r.alignDelimiters!==!1){const O=f[m]-(j[m]||0),P=a[m];P===114?A=" ".repeat(O):P===99?O%2?(A=" ".repeat(O/2+.5),_=" ".repeat(O/2-.5)):(A=" ".repeat(O/2),_=A):_=" ".repeat(O)}r.delimiterStart!==!1&&!m&&E.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&I==="")&&(r.delimiterStart!==!1||m)&&E.push(" "),r.alignDelimiters!==!1&&E.push(A),E.push(I),r.alignDelimiters!==!1&&E.push(_),r.padding!==!1&&E.push(" "),(r.delimiterEnd!==!1||m!==p-1)&&E.push("|")}k.push(r.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return k.join(`
|
|
1382
|
-
`)}function FN(e){return e==null?"":String(e)}function dx(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function ON(e,t,r,i){const l=r.enter("blockquote"),a=r.createTracker(i);a.move("> "),a.shift(2);const u=r.indentLines(r.containerFlow(e,a.current()),DN);return l(),u}function DN(e,t,r){return">"+(r?"":" ")+e}function MN(e,t){return fx(e,t.inConstruct,!0)&&!fx(e,t.notInConstruct,!1)}function fx(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function px(e,t,r,i){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
|
|
1383
|
-
`&&MN(r.stack,r.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
1384
|
-
`}function BN(e,t){const r=String(e);let i=r.indexOf(t),l=i,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===l?++a>u&&(u=a):a=1,l=i+t.length,i=r.indexOf(t,l);return u}function UN(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function VN(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function HN(e,t,r,i){const l=VN(r),a=e.value||"",u=l==="`"?"GraveAccent":"Tilde";if(UN(e,r)){const m=r.enter("codeIndented"),v=r.indentLines(a,WN);return m(),v}const c=r.createTracker(i),f=l.repeat(Math.max(BN(a,l)+1,3)),p=r.enter("codeFenced");let x=c.move(f);if(e.lang){const m=r.enter(`codeFencedLang${u}`);x+=c.move(r.safe(e.lang,{before:x,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=r.enter(`codeFencedMeta${u}`);x+=c.move(" "),x+=c.move(r.safe(e.meta,{before:x,after:`
|
|
1385
|
-
`,encode:["`"],...c.current()})),m()}return x+=c.move(`
|
|
1386
|
-
`),a&&(x+=c.move(a+`
|
|
1387
|
-
`)),x+=c.move(f),p(),x}function WN(e,t,r){return(r?"":" ")+e}function If(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qN(e,t,r,i){const l=If(r),a=l==='"'?"Quote":"Apostrophe",u=r.enter("definition");let c=r.enter("label");const f=r.createTracker(i);let p=f.move("[");return p+=f.move(r.safe(r.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(r.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(c=r.enter("destinationRaw"),p+=f.move(r.safe(e.url,{before:p,after:e.title?" ":`
|
|
1388
|
-
`,...f.current()}))),c(),e.title&&(c=r.enter(`title${a}`),p+=f.move(" "+l),p+=f.move(r.safe(e.title,{before:p,after:l,...f.current()})),p+=f.move(l),c()),u(),p}function GN(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function dl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ma(e,t,r){const i=Zo(e),l=Zo(t);return i===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}a1.peek=JN;function a1(e,t,r,i){const l=GN(r),a=r.enter("emphasis"),u=r.createTracker(i),c=u.move(l);let f=u.move(r.containerPhrasing(e,{after:l,before:c,...u.current()}));const p=f.charCodeAt(0),x=ma(i.before.charCodeAt(i.before.length-1),p,l);x.inside&&(f=dl(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=ma(i.after.charCodeAt(0),m,l);v.inside&&(f=f.slice(0,-1)+dl(m));const w=u.move(l);return a(),r.attentionEncodeSurroundingInfo={after:v.outside,before:x.outside},c+f+w}function JN(e,t,r){return r.options.emphasis||"*"}function KN(e,t){let r=!1;return Rf(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,$d}),!!((!e.depth||e.depth<3)&&kf(e)&&(t.options.setext||r))}function QN(e,t,r,i){const l=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(i);if(KN(e,r)){const x=r.enter("headingSetext"),m=r.enter("phrasing"),v=r.containerPhrasing(e,{...a.current(),before:`
|
|
1389
|
-
`,after:`
|
|
1390
|
-
`});return m(),x(),v+`
|
|
1391
|
-
`+(l===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
1392
|
-
`))+1))}const u="#".repeat(l),c=r.enter("headingAtx"),f=r.enter("phrasing");a.move(u+" ");let p=r.containerPhrasing(e,{before:"# ",after:`
|
|
1393
|
-
`,...a.current()});return/^[\t ]/.test(p)&&(p=dl(p.charCodeAt(0))+p.slice(1)),p=p?u+" "+p:u,r.options.closeAtx&&(p+=" "+u),f(),c(),p}u1.peek=YN;function u1(e){return e.value||""}function YN(){return"<"}c1.peek=XN;function c1(e,t,r,i){const l=If(r),a=l==='"'?"Quote":"Apostrophe",u=r.enter("image");let c=r.enter("label");const f=r.createTracker(i);let p=f.move("![");return p+=f.move(r.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(r.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(c=r.enter("destinationRaw"),p+=f.move(r.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=r.enter(`title${a}`),p+=f.move(" "+l),p+=f.move(r.safe(e.title,{before:p,after:l,...f.current()})),p+=f.move(l),c()),p+=f.move(")"),u(),p}function XN(){return"!"}d1.peek=ZN;function d1(e,t,r,i){const l=e.referenceType,a=r.enter("imageReference");let u=r.enter("label");const c=r.createTracker(i);let f=c.move("![");const p=r.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(p+"]["),u();const x=r.stack;r.stack=[],u=r.enter("reference");const m=r.safe(r.associationId(e),{before:f,after:"]",...c.current()});return u(),r.stack=x,a(),l==="full"||!p||p!==m?f+=c.move(m+"]"):l==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function ZN(){return"!"}f1.peek=eP;function f1(e,t,r){let i=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a<r.unsafe.length;){const u=r.unsafe[a],c=r.compilePattern(u);let f;if(u.atBreak)for(;f=c.exec(i);){let p=f.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(f.index+1)}}return l+i+l}function eP(){return"`"}function p1(e,t){const r=kf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}h1.peek=tP;function h1(e,t,r,i){const l=If(r),a=l==='"'?"Quote":"Apostrophe",u=r.createTracker(i);let c,f;if(p1(e,r)){const x=r.stack;r.stack=[],c=r.enter("autolink");let m=u.move("<");return m+=u.move(r.containerPhrasing(e,{before:m,after:">",...u.current()})),m+=u.move(">"),c(),r.stack=x,m}c=r.enter("link"),f=r.enter("label");let p=u.move("[");return p+=u.move(r.containerPhrasing(e,{before:p,after:"](",...u.current()})),p+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(r.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(f=r.enter("destinationRaw"),p+=u.move(r.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),f(),e.title&&(f=r.enter(`title${a}`),p+=u.move(" "+l),p+=u.move(r.safe(e.title,{before:p,after:l,...u.current()})),p+=u.move(l),f()),p+=u.move(")"),c(),p}function tP(e,t,r){return p1(e,r)?"<":"["}m1.peek=nP;function m1(e,t,r,i){const l=e.referenceType,a=r.enter("linkReference");let u=r.enter("label");const c=r.createTracker(i);let f=c.move("[");const p=r.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(p+"]["),u();const x=r.stack;r.stack=[],u=r.enter("reference");const m=r.safe(r.associationId(e),{before:f,after:"]",...c.current()});return u(),r.stack=x,a(),l==="full"||!p||p!==m?f+=c.move(m+"]"):l==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function nP(){return"["}function Nf(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function rP(e){const t=Nf(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function oP(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function g1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function iP(e,t,r,i){const l=r.enter("list"),a=r.bulletCurrent;let u=e.ordered?oP(r):Nf(r);const c=e.ordered?u==="."?")":".":rP(r);let f=t&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const x=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&x&&(!x.children||!x.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(f=!0),g1(r)===u&&x){let m=-1;for(;++m<e.children.length;){const v=e.children[m];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(u=c),r.bulletCurrent=u;const p=r.containerFlow(e,i);return r.bulletLastUsed=u,r.bulletCurrent=a,l(),p}function lP(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function sP(e,t,r,i){const l=lP(r);let a=r.bulletCurrent||Nf(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=r.createTracker(i);c.move(a+" ".repeat(u-a.length)),c.shift(u);const f=r.enter("listItem"),p=r.indentLines(r.containerFlow(e,c.current()),x);return f(),p;function x(m,v,w){return v?(w?"":" ".repeat(u))+m:(w?a:a+" ".repeat(u-a.length))+m}}function aP(e,t,r,i){const l=r.enter("paragraph"),a=r.enter("phrasing"),u=r.containerPhrasing(e,i);return a(),l(),u}const uP=za(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function cP(e,t,r,i){return(e.children.some(function(u){return uP(u)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function dP(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}x1.peek=fP;function x1(e,t,r,i){const l=dP(r),a=r.enter("strong"),u=r.createTracker(i),c=u.move(l+l);let f=u.move(r.containerPhrasing(e,{after:l,before:c,...u.current()}));const p=f.charCodeAt(0),x=ma(i.before.charCodeAt(i.before.length-1),p,l);x.inside&&(f=dl(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=ma(i.after.charCodeAt(0),m,l);v.inside&&(f=f.slice(0,-1)+dl(m));const w=u.move(l+l);return a(),r.attentionEncodeSurroundingInfo={after:v.outside,before:x.outside},c+f+w}function fP(e,t,r){return r.options.strong||"*"}function pP(e,t,r,i){return r.safe(e.value,i)}function hP(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function mP(e,t,r){const i=(g1(r)+(r.options.ruleSpaces?" ":"")).repeat(hP(r));return r.options.ruleSpaces?i.slice(0,-1):i}const y1={blockquote:ON,break:px,code:HN,definition:qN,emphasis:a1,hardBreak:px,heading:QN,html:u1,image:c1,imageReference:d1,inlineCode:f1,link:h1,linkReference:m1,list:iP,listItem:sP,paragraph:aP,root:cP,strong:x1,text:pP,thematicBreak:mP};function gP(){return{enter:{table:xP,tableData:hx,tableHeader:hx,tableRow:vP},exit:{codeText:wP,table:yP,tableData:Zc,tableHeader:Zc,tableRow:Zc}}}function xP(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function yP(e){this.exit(e),this.data.inTable=void 0}function vP(e){this.enter({type:"tableRow",children:[]},e)}function Zc(e){this.exit(e)}function hx(e){this.enter({type:"tableCell",children:[]},e)}function wP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,kP));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function kP(e,t){return t==="|"?t:e}function bP(e){const t=e||{},r=t.tableCellPadding,i=t.tablePipeAlign,l=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
1394
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:u,tableCell:f,tableRow:c}};function u(w,k,S,j){return p(x(w,S,j),w.align)}function c(w,k,S,j){const E=m(w,S,j),I=p([E]);return I.slice(0,I.indexOf(`
|
|
1395
|
-
`))}function f(w,k,S,j){const E=S.enter("tableCell"),I=S.enter("phrasing"),A=S.containerPhrasing(w,{...j,before:a,after:a});return I(),E(),A}function p(w,k){return _N(w,{align:k,alignDelimiters:i,padding:r,stringLength:l})}function x(w,k,S){const j=w.children;let E=-1;const I=[],A=k.enter("table");for(;++E<j.length;)I[E]=m(j[E],k,S);return A(),I}function m(w,k,S){const j=w.children;let E=-1;const I=[],A=k.enter("tableRow");for(;++E<j.length;)I[E]=f(j[E],w,k,S);return A(),I}function v(w,k,S){let j=y1.inlineCode(w,k,S);return S.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function SP(){return{exit:{taskListCheckValueChecked:mx,taskListCheckValueUnchecked:mx,paragraph:EP}}}function CP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jP}}}function mx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function EP(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const l=t.children;let a=-1,u;for(;++a<l.length;){const c=l[a];if(c.type==="paragraph"){u=c;break}}u===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function jP(e,t,r,i){const l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=r.createTracker(i);a&&c.move(u);let f=y1.listItem(e,t,r,{...i,...c.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(x){return x+u}}function TP(){return[iN(),jN(),IN(),gP(),SP()]}function RP(e){return{extensions:[lN(),TN(e),NN(),bP(e),CP()]}}const $P={tokenize:zP,partial:!0},v1={tokenize:_P,partial:!0},w1={tokenize:FP,partial:!0},k1={tokenize:OP,partial:!0},IP={tokenize:DP,partial:!0},b1={name:"wwwAutolink",tokenize:AP,previous:C1},S1={name:"protocolAutolink",tokenize:LP,previous:E1},or={name:"emailAutolink",tokenize:PP,previous:j1},Wn={};function NP(){return{text:Wn}}let Kr=48;for(;Kr<123;)Wn[Kr]=or,Kr++,Kr===58?Kr=65:Kr===91&&(Kr=97);Wn[43]=or;Wn[45]=or;Wn[46]=or;Wn[95]=or;Wn[72]=[or,S1];Wn[104]=[or,S1];Wn[87]=[or,b1];Wn[119]=[or,b1];function PP(e,t,r){const i=this;let l,a;return u;function u(m){return!Ad(m)||!j1.call(i,i.previous)||Pf(i.events)?r(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Ad(m)?(e.consume(m),c):m===64?(e.consume(m),f):r(m)}function f(m){return m===46?e.check(IP,x,p)(m):m===45||m===95||zt(m)?(a=!0,e.consume(m),f):x(m)}function p(m){return e.consume(m),l=!0,f}function x(m){return a&&l&&Mt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):r(m)}}function AP(e,t,r){const i=this;return l;function l(u){return u!==87&&u!==119||!C1.call(i,i.previous)||Pf(i.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($P,e.attempt(v1,e.attempt(w1,a),r),r)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function LP(e,t,r){const i=this;let l="",a=!1;return u;function u(m){return(m===72||m===104)&&E1.call(i,i.previous)&&!Pf(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(m),e.consume(m),c):r(m)}function c(m){if(Mt(m)&&l.length<5)return l+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const v=l.toLowerCase();if(v==="http"||v==="https")return e.consume(m),f}return r(m)}function f(m){return m===47?(e.consume(m),a?p:(a=!0,f)):r(m)}function p(m){return m===null||da(m)||Je(m)||io(m)||Pa(m)?r(m):e.attempt(v1,e.attempt(w1,x),r)(m)}function x(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function zP(e,t,r){let i=0;return l;function l(u){return(u===87||u===119)&&i<3?(i++,e.consume(u),l):u===46&&i===3?(e.consume(u),a):r(u)}function a(u){return u===null?r(u):t(u)}}function _P(e,t,r){let i,l,a;return u;function u(p){return p===46||p===95?e.check(k1,f,c)(p):p===null||Je(p)||io(p)||p!==45&&Pa(p)?f(p):(a=!0,e.consume(p),u)}function c(p){return p===95?i=!0:(l=i,i=void 0),e.consume(p),u}function f(p){return l||i||!a?r(p):t(p)}}function FP(e,t){let r=0,i=0;return l;function l(u){return u===40?(r++,e.consume(u),l):u===41&&i<r?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(k1,t,a)(u):u===null||Je(u)||io(u)?t(u):(e.consume(u),l)}function a(u){return u===41&&i++,e.consume(u),l}}function OP(e,t,r){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),a):c===93?(e.consume(c),l):c===60||c===null||Je(c)||io(c)?t(c):r(c)}function l(c){return c===null||c===40||c===91||Je(c)||io(c)?t(c):i(c)}function a(c){return Mt(c)?u(c):r(c)}function u(c){return c===59?(e.consume(c),i):Mt(c)?(e.consume(c),u):r(c)}}function DP(e,t,r){return i;function i(a){return e.consume(a),l}function l(a){return zt(a)?r(a):t(a)}}function C1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Je(e)}function E1(e){return!Mt(e)}function j1(e){return!(e===47||Ad(e))}function Ad(e){return e===43||e===45||e===46||e===95||zt(e)}function Pf(e){let t=e.length,r=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const MP={tokenize:JP,partial:!0};function BP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:WP,continuation:{tokenize:qP},exit:GP}},text:{91:{name:"gfmFootnoteCall",tokenize:HP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:UP,resolveTo:VP}}}}function UP(e,t,r){const i=this;let l=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u;for(;l--;){const f=i.events[l][1];if(f.type==="labelImage"){u=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!u||!u._balanced)return r(f);const p=Pn(i.sliceSerialize({start:u.end,end:i.now()}));return p.codePointAt(0)!==94||!a.includes(p.slice(1))?r(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function VP(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...c),e}function HP(e,t,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?r(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(m){if(a>999||m===93&&!u||m===null||m===91||Je(m))return r(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return l.includes(Pn(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(m)}return Je(m)||(u=!0),a++,e.consume(m),m===92?x:p}function x(m){return m===91||m===92||m===93?(e.consume(m),a++,p):p(m)}}function WP(e,t,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,u=0,c;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",x):r(k)}function x(k){if(u>999||k===93&&!c||k===null||k===91||Je(k))return r(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Pn(i.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return Je(k)||(c=!0),u++,e.consume(k),k===92?m:x}function m(k){return k===91||k===92||k===93?(e.consume(k),u++,x):x(k)}function v(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),l.includes(a)||l.push(a),De(e,w,"gfmFootnoteDefinitionWhitespace")):r(k)}function w(k){return t(k)}}function qP(e,t,r){return e.check(kl,t,e.attempt(MP,t,r))}function GP(e){e.exit("gfmFootnoteDefinition")}function JP(e,t,r){const i=this;return De(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){const u=i.events[i.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):r(a)}}function KP(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:l};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(u,c){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let p=f;for(;p--;)if(u[p][0]==="exit"&&u[p][1].type==="strikethroughSequenceTemporary"&&u[p][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[p][1].end.offset-u[p][1].start.offset){u[f][1].type="strikethroughSequence",u[p][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},u[p][1].start),end:Object.assign({},u[f][1].end)},m={type:"strikethroughText",start:Object.assign({},u[p][1].end),end:Object.assign({},u[f][1].start)},v=[["enter",x,c],["enter",u[p][1],c],["exit",u[p][1],c],["enter",m,c]],w=c.parser.constructs.insideSpan.null;w&&un(v,v.length,0,Aa(w,u.slice(p+1,f),c)),un(v,v.length,0,[["exit",m,c],["enter",u[f][1],c],["exit",u[f][1],c],["exit",x,c]]),un(u,p-1,f-p+3,v),f=p+v.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function a(u,c,f){const p=this.previous,x=this.events;let m=0;return v;function v(k){return p===126&&x[x.length-1][1].type!=="characterEscape"?f(k):(u.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const S=Zo(p);if(k===126)return m>1?f(k):(u.consume(k),m++,w);if(m<2&&!r)return f(k);const j=u.exit("strikethroughSequenceTemporary"),E=Zo(k);return j._open=!E||E===2&&!!S,j._close=!S||S===2&&!!E,c(k)}}}class QP{constructor(){this.map=[]}add(t,r,i){YP(this,t,r,i)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];i.push(t.slice()),t.length=0;let l=i.pop();for(;l;){for(const a of l)t.push(a);l=i.pop()}this.map.length=0}}function YP(e,t,r,i){let l=0;if(!(r===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...i);return}l+=1}e.map.push([t,r,i])}}function XP(e,t){let r=!1;const i=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=i.length-1;i[a]=i[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return i}function ZP(){return{flow:{null:{name:"table",tokenize:eA,resolveAll:tA}}}}function eA(e,t,r){const i=this;let l=0,a=0,u;return c;function c(D){let te=i.events.length-1;for(;te>-1;){const X=i.events[te][1].type;if(X==="lineEnding"||X==="linePrefix")te--;else break}const se=te>-1?i.events[te][1].type:null,ee=se==="tableHead"||se==="tableRow"?P:f;return ee===P&&i.parser.lazy[i.now().line]?r(D):ee(D)}function f(D){return e.enter("tableHead"),e.enter("tableRow"),p(D)}function p(D){return D===124||(u=!0,a+=1),x(D)}function x(D){return D===null?r(D):je(D)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),w):r(D):Fe(D)?De(e,x,"whitespace")(D):(a+=1,u&&(u=!1,l+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),u=!0,x):(e.enter("data"),m(D)))}function m(D){return D===null||D===124||Je(D)?(e.exit("data"),x(D)):(e.consume(D),D===92?v:m)}function v(D){return D===92||D===124?(e.consume(D),m):m(D)}function w(D){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(D):(e.enter("tableDelimiterRow"),u=!1,Fe(D)?De(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):k(D))}function k(D){return D===45||D===58?j(D):D===124?(u=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),S):O(D)}function S(D){return Fe(D)?De(e,j,"whitespace")(D):j(D)}function j(D){return D===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),E):D===45?(a+=1,E(D)):D===null||je(D)?_(D):O(D)}function E(D){return D===45?(e.enter("tableDelimiterFiller"),I(D)):O(D)}function I(D){return D===45?(e.consume(D),I):D===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(D))}function A(D){return Fe(D)?De(e,_,"whitespace")(D):_(D)}function _(D){return D===124?k(D):D===null||je(D)?!u||l!==a?O(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):O(D)}function O(D){return r(D)}function P(D){return e.enter("tableRow"),V(D)}function V(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),V):D===null||je(D)?(e.exit("tableRow"),t(D)):Fe(D)?De(e,V,"whitespace")(D):(e.enter("data"),K(D))}function K(D){return D===null||D===124||Je(D)?(e.exit("data"),V(D)):(e.consume(D),D===92?re:K)}function re(D){return D===92||D===124?(e.consume(D),K):K(D)}}function tA(e,t){let r=-1,i=!0,l=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,f=0,p,x,m;const v=new QP;for(;++r<e.length;){const w=e[r],k=w[1];w[0]==="enter"?k.type==="tableHead"?(c=!1,f!==0&&(gx(v,t,f,p,x),x=void 0,f=0),p={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(r,0,[["enter",p,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,m=void 0,a=[0,0,0,0],u=[0,r+1,0,0],c&&(c=!1,x={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(r,0,[["enter",x,t]])),l=k.type==="tableDelimiterRow"?2:x?3:1):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Bs(v,t,a,l,void 0,m),a=[0,0,0,0]),u[2]=r)):k.type==="tableCellDivider"&&(i?i=!1:(a[1]!==0&&(u[0]=u[1],m=Bs(v,t,a,l,void 0,m)),a=u,u=[a[1],r,0,0])):k.type==="tableHead"?(c=!0,f=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=r,a[1]!==0?(u[0]=u[1],m=Bs(v,t,a,l,r,m)):u[1]!==0&&(m=Bs(v,t,u,l,r,m)),l=0):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(u[3]=r)}for(f!==0&&gx(v,t,f,p,x),v.consume(t.events),r=-1;++r<t.events.length;){const w=t.events[r];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=XP(t.events,r))}return e}function Bs(e,t,r,i,l,a){const u=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";r[0]!==0&&(a.end=Object.assign({},Mo(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const f=Mo(t.events,r[1]);if(a={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const p=Mo(t.events,r[2]),x=Mo(t.events,r[3]),m={type:c,start:Object.assign({},p),end:Object.assign({},x)};if(e.add(r[2],0,[["enter",m,t]]),i!==2){const v=t.events[r[2]],w=t.events[r[3]];if(v[1].end=Object.assign({},w[1].end),v[1].type="chunkText",v[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,S=r[3]-r[2]-1;e.add(k,S,[])}}e.add(r[3]+1,0,[["exit",m,t]])}return l!==void 0&&(a.end=Object.assign({},Mo(t.events,l)),e.add(l,0,[["exit",a,t]]),a=void 0),a}function gx(e,t,r,i,l){const a=[],u=Mo(t.events,r);l&&(l.end=Object.assign({},u),a.push(["exit",l,t])),i.end=Object.assign({},u),a.push(["exit",i,t]),e.add(r+1,0,a)}function Mo(e,t){const r=e[t],i=r[0]==="enter"?"start":"end";return r[1][i]}const nA={name:"tasklistCheck",tokenize:oA};function rA(){return{text:{91:nA}}}function oA(e,t,r){const i=this;return l;function l(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return Je(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):r(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):r(f)}function c(f){return je(f)?t(f):Fe(f)?e.check({tokenize:iA},t,r)(f):r(f)}}function iA(e,t,r){return De(e,i,"whitespace");function i(l){return l===null?r(l):t(l)}}function lA(e){return F0([NP(),BP(),KP(e),ZP(),rA()])}const sA={};function so(e){const t=this,r=e||sA,i=t.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(lA(r)),a.push(TP()),u.push(RP(r))}const si=C.div`
|
|
1396
|
-
display: flex;
|
|
1397
|
-
&[data-type='user'] {
|
|
1398
|
-
justify-content: flex-end;
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
&[data-type='assistant'] {
|
|
1402
|
-
justify-content: flex-start;
|
|
1403
|
-
}
|
|
1404
|
-
`,T1=C.div`
|
|
1405
|
-
color: ${e=>e.theme.colors.text};
|
|
1406
|
-
border-radius: 12px;
|
|
1407
|
-
padding: 8px 12px;
|
|
1408
|
-
max-width: 70%;
|
|
1409
|
-
background-color: ${e=>e.theme.colors.backgroundSecondary};
|
|
1410
|
-
|
|
1411
|
-
${si}[data-type='user'] & {
|
|
1412
|
-
background-color: ${e=>e.theme.colors.userMessageBackground};
|
|
1413
|
-
color: ${e=>e.theme.colors.userMessageText};
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
/* Add subtle transition for edit mode */
|
|
1417
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
1418
|
-
|
|
1419
|
-
&[data-edit-mode='true'] {
|
|
1420
|
-
box-shadow: 0 0 0 2px ${e=>e.theme.colors.primary};
|
|
1421
|
-
}
|
|
1422
|
-
`,aA=C.div`
|
|
1423
|
-
font-weight: bold;
|
|
1424
|
-
margin-bottom: 4px;
|
|
1425
|
-
display: flex;
|
|
1426
|
-
justify-content: space-between;
|
|
1427
|
-
align-items: center;
|
|
1428
|
-
`,R1=C.div`
|
|
1429
|
-
word-wrap: break-word;
|
|
1430
|
-
font-family: inherit;
|
|
1431
|
-
margin: 0;
|
|
1432
|
-
|
|
1433
|
-
> *:first-child {
|
|
1434
|
-
margin-top: 0;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
> *:last-child {
|
|
1438
|
-
margin-bottom: 0;
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
p {
|
|
1442
|
-
margin: 8px 0;
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
ul,
|
|
1446
|
-
ol {
|
|
1447
|
-
padding-left: 20px;
|
|
1448
|
-
margin: 8px 0;
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
li {
|
|
1452
|
-
margin-bottom: 4px;
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
pre {
|
|
1456
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1457
|
-
padding: 10px;
|
|
1458
|
-
border-radius: 4px;
|
|
1459
|
-
font-family: 'Courier New', Courier, monospace;
|
|
1460
|
-
white-space: pre-wrap;
|
|
1461
|
-
word-wrap: break-word;
|
|
1462
|
-
margin: 8px 0;
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
code {
|
|
1466
|
-
font-family: 'Courier New', Courier, monospace;
|
|
1467
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1468
|
-
padding: 2px 4px;
|
|
1469
|
-
border-radius: 3px;
|
|
1470
|
-
font-size: 0.9em;
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
pre > code {
|
|
1474
|
-
background-color: transparent;
|
|
1475
|
-
padding: 0;
|
|
1476
|
-
border-radius: 0;
|
|
1477
|
-
font-size: inherit;
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
blockquote {
|
|
1481
|
-
border-left: 4px solid ${e=>e.theme.colors.border};
|
|
1482
|
-
padding-left: 10px;
|
|
1483
|
-
margin: 8px 0;
|
|
1484
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1485
|
-
}
|
|
1486
|
-
`,Vo=C.textarea`
|
|
1487
|
-
width: 100%;
|
|
1488
|
-
min-height: 100px;
|
|
1489
|
-
padding: 8px;
|
|
1490
|
-
border: none;
|
|
1491
|
-
border-radius: 4px;
|
|
1492
|
-
background-color: ${e=>e.theme.colors.background};
|
|
1493
|
-
color: ${e=>e.theme.colors.text};
|
|
1494
|
-
font-family: inherit;
|
|
1495
|
-
font-size: inherit;
|
|
1496
|
-
resize: vertical;
|
|
1497
|
-
margin: 4px 0;
|
|
1498
|
-
field-sizing: content;
|
|
1499
|
-
box-sizing: border-box;
|
|
1500
|
-
|
|
1501
|
-
&:focus {
|
|
1502
|
-
outline: none;
|
|
1503
|
-
box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary};
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
${si}[data-type='user'] & {
|
|
1507
|
-
background-color: ${e=>e.theme.colors.userMessageBackground};
|
|
1508
|
-
color: ${e=>e.theme.colors.userMessageText};
|
|
1509
|
-
}
|
|
1510
|
-
`,uA=C.div`
|
|
1511
|
-
display: flex;
|
|
1512
|
-
justify-content: space-between;
|
|
1513
|
-
align-items: center;
|
|
1514
|
-
margin-top: 4px;
|
|
1515
|
-
gap: 8px;
|
|
1516
|
-
|
|
1517
|
-
> div {
|
|
1518
|
-
display: flex;
|
|
1519
|
-
align-items: center;
|
|
1520
|
-
gap: 8px;
|
|
1521
|
-
}
|
|
1522
|
-
`,cA=C.div`
|
|
1523
|
-
font-size: 0.8em;
|
|
1524
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1525
|
-
|
|
1526
|
-
${si}[data-type='user'] & {
|
|
1527
|
-
color: ${e=>e.theme.colors.userMessageTimestamp};
|
|
1528
|
-
}
|
|
1529
|
-
`,dA=C.span`
|
|
1530
|
-
font-size: 0.8em;
|
|
1531
|
-
color: ${e=>e.theme.colors.primary};
|
|
1532
|
-
cursor: pointer;
|
|
1533
|
-
text-decoration: underline;
|
|
1534
|
-
|
|
1535
|
-
&:hover {
|
|
1536
|
-
color: ${e=>e.theme.colors.primaryHover};
|
|
1537
|
-
}
|
|
1538
|
-
`,Af=C.div`
|
|
1539
|
-
display: flex;
|
|
1540
|
-
gap: 8px;
|
|
1541
|
-
margin-top: 8px;
|
|
1542
|
-
`,Lf=C.button`
|
|
1543
|
-
padding: 4px 8px;
|
|
1544
|
-
border: none;
|
|
1545
|
-
border-radius: 4px;
|
|
1546
|
-
cursor: pointer;
|
|
1547
|
-
font-size: 0.8em;
|
|
1548
|
-
transition: background-color 0.2s ease-in-out;
|
|
1549
|
-
|
|
1550
|
-
&:disabled {
|
|
1551
|
-
opacity: 0.5;
|
|
1552
|
-
cursor: not-allowed;
|
|
1553
|
-
}
|
|
1554
|
-
`,zf=C(Lf)`
|
|
1555
|
-
background-color: transparent;
|
|
1556
|
-
color: ${e=>e.theme.colors.primary};
|
|
1557
|
-
|
|
1558
|
-
&:hover:not(:disabled) {
|
|
1559
|
-
background-color: ${e=>e.theme.colors.primaryHover}20;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
${si}[data-type='user'] & {
|
|
1563
|
-
color: ${e=>e.theme.colors.userMessageText};
|
|
1564
|
-
&:hover:not(:disabled) {
|
|
1565
|
-
background-color: ${e=>e.theme.colors.userMessageText}20;
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
`,_f=C(Lf)`
|
|
1569
|
-
background-color: ${e=>e.theme.colors.primary};
|
|
1570
|
-
color: ${e=>e.theme.colors.buttonText};
|
|
1571
|
-
|
|
1572
|
-
&:hover:not(:disabled) {
|
|
1573
|
-
background-color: ${e=>e.theme.colors.primaryHover};
|
|
1574
|
-
}
|
|
1575
|
-
`,Ff=C(Lf)`
|
|
1576
|
-
background-color: transparent;
|
|
1577
|
-
color: ${e=>e.theme.colors.error};
|
|
1578
|
-
|
|
1579
|
-
&:hover:not(:disabled) {
|
|
1580
|
-
background-color: ${e=>e.theme.colors.error}20;
|
|
1581
|
-
}
|
|
1582
|
-
`,Of=C.div`
|
|
1583
|
-
width: 16px;
|
|
1584
|
-
height: 16px;
|
|
1585
|
-
border: 2px solid ${e=>e.theme.colors.primary};
|
|
1586
|
-
border-top-color: transparent;
|
|
1587
|
-
border-radius: 50%;
|
|
1588
|
-
animation: spin 1s linear infinite;
|
|
1589
|
-
margin: 0 8px;
|
|
1590
|
-
|
|
1591
|
-
@keyframes spin {
|
|
1592
|
-
to {
|
|
1593
|
-
transform: rotate(360deg);
|
|
1594
|
-
}
|
|
1595
|
-
}
|
|
1596
|
-
`;C.span`
|
|
1597
|
-
font-size: 0.7em;
|
|
1598
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1599
|
-
margin-left: 8px;
|
|
1600
|
-
font-style: italic;
|
|
1601
|
-
`;const fA=C.div`
|
|
1602
|
-
margin: 12px 0;
|
|
1603
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1604
|
-
border-radius: 8px;
|
|
1605
|
-
overflow: hidden;
|
|
1606
|
-
`,pA=C.div`
|
|
1607
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1608
|
-
padding: 8px 12px;
|
|
1609
|
-
font-weight: 600;
|
|
1610
|
-
font-size: 0.9em;
|
|
1611
|
-
border-bottom: 1px solid ${e=>e.theme.colors.border};
|
|
1612
|
-
color: ${e=>e.theme.colors.text};
|
|
1613
|
-
`,hA=C.div`
|
|
1614
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1615
|
-
padding: 12px;
|
|
1616
|
-
overflow-x: auto;
|
|
1617
|
-
|
|
1618
|
-
pre {
|
|
1619
|
-
margin: 0;
|
|
1620
|
-
font-family: 'Courier New', monospace;
|
|
1621
|
-
font-size: 0.9em;
|
|
1622
|
-
background-color: transparent;
|
|
1623
|
-
padding: 0;
|
|
1624
|
-
}
|
|
1625
|
-
`,mA=C.div`
|
|
1626
|
-
margin: 12px 0;
|
|
1627
|
-
border: 1px solid
|
|
1628
|
-
${e=>e.outcome==="OUTCOME_OK"?e.theme.colors.success:e.theme.colors.error};
|
|
1629
|
-
border-radius: 8px;
|
|
1630
|
-
overflow: hidden;
|
|
1631
|
-
`,gA=C.div`
|
|
1632
|
-
padding: 8px 12px;
|
|
1633
|
-
font-weight: 600;
|
|
1634
|
-
font-size: 0.9em;
|
|
1635
|
-
background-color: ${e=>e.theme.colors.backgroundSecondary};
|
|
1636
|
-
`,xA=C(R1)`
|
|
1637
|
-
padding: 12px;
|
|
1638
|
-
background-color: ${e=>e.theme.colors.background};
|
|
1639
|
-
max-height: 400px;
|
|
1640
|
-
overflow-y: auto;
|
|
1641
|
-
`,yA=C.span`
|
|
1642
|
-
font-size: 12px;
|
|
1643
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1644
|
-
white-space: nowrap;
|
|
1645
|
-
`,$1=({messages:e,className:t})=>{if(!e||e.length===0)return null;const{formattedSize:r,totalTokens:i}=rf(e),l=typeof i=="number"?wd(i):r;return h.jsx(yA,{className:t,children:l})},I1=C.div`
|
|
1646
|
-
font-weight: bold;
|
|
1647
|
-
font-size: 0.9em;
|
|
1648
|
-
color: ${e=>e.theme.colors.text};
|
|
1649
|
-
`;C.div`
|
|
1650
|
-
font-size: 0.8em;
|
|
1651
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1652
|
-
margin: 4px 0;
|
|
1653
|
-
`;C.div`
|
|
1654
|
-
font-size: 0.8em;
|
|
1655
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1656
|
-
margin: 4px 0;
|
|
1657
|
-
`;C.div`
|
|
1658
|
-
display: inline-block;
|
|
1659
|
-
padding: 2px 4px;
|
|
1660
|
-
border-radius: 4px;
|
|
1661
|
-
font-size: 0.8em;
|
|
1662
|
-
font-weight: bold;
|
|
1663
|
-
color: ${e=>e.theme.colors.text};
|
|
1664
|
-
background-color: ${e=>e.variant==="updateFile"?e.theme.colors.primary:e.variant==="createFile"?e.theme.colors.success:(e.variant==="patchFile",e.theme.colors.warning)};
|
|
1665
|
-
`;C.div`
|
|
1666
|
-
display: flex;
|
|
1667
|
-
gap: 8px;
|
|
1668
|
-
`;C.button`
|
|
1669
|
-
padding: 4px 8px;
|
|
1670
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1671
|
-
border-radius: 4px;
|
|
1672
|
-
background-color: ${e=>e.theme.colors.background};
|
|
1673
|
-
cursor: pointer;
|
|
1674
|
-
font-size: 0.8em;
|
|
1675
|
-
color: ${e=>e.theme.colors.text};
|
|
1676
|
-
|
|
1677
|
-
&:hover {
|
|
1678
|
-
background-color: ${e=>e.theme.colors.backgroundHover};
|
|
1679
|
-
}
|
|
1680
|
-
`;C.div`
|
|
1681
|
-
margin: 16px 0;
|
|
1682
|
-
`;C.div`
|
|
1683
|
-
padding: 8px;
|
|
1684
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1685
|
-
border-radius: 4px;
|
|
1686
|
-
background-color: ${e=>e.theme.colors.background};
|
|
1687
|
-
font-size: 0.9em;
|
|
1688
|
-
line-height: 1.5;
|
|
1689
|
-
|
|
1690
|
-
> *:first-child {
|
|
1691
|
-
margin-top: 0;
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
> *:last-child {
|
|
1695
|
-
margin-bottom: 0;
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
p {
|
|
1699
|
-
margin: 8px 0;
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
ul,
|
|
1703
|
-
ol {
|
|
1704
|
-
padding-left: 20px;
|
|
1705
|
-
margin: 8px 0;
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
li {
|
|
1709
|
-
margin-bottom: 4px;
|
|
1710
|
-
}
|
|
1711
|
-
|
|
1712
|
-
pre {
|
|
1713
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1714
|
-
padding: 10px;
|
|
1715
|
-
border-radius: 4px;
|
|
1716
|
-
font-family: 'Courier New', Courier, monospace;
|
|
1717
|
-
white-space: pre-wrap;
|
|
1718
|
-
word-wrap: break-word;
|
|
1719
|
-
margin: 8px 0;
|
|
1720
|
-
}
|
|
1721
|
-
|
|
1722
|
-
code {
|
|
1723
|
-
font-family: 'Courier New', Courier, monospace;
|
|
1724
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1725
|
-
padding: 2px 4px;
|
|
1726
|
-
border-radius: 3px;
|
|
1727
|
-
font-size: 0.9em;
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
pre > code {
|
|
1731
|
-
background-color: transparent;
|
|
1732
|
-
padding: 0;
|
|
1733
|
-
border-radius: 0;
|
|
1734
|
-
font-size: inherit;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
blockquote {
|
|
1738
|
-
border-left: 4px solid ${e=>e.theme.colors.border};
|
|
1739
|
-
padding-left: 10px;
|
|
1740
|
-
margin: 8px 0;
|
|
1741
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1742
|
-
}
|
|
1743
|
-
`;C.div`
|
|
1744
|
-
margin: 16px 0;
|
|
1745
|
-
`;function Pr(){}Pr.prototype={diff:function(t,r){var i,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=l.callback;typeof l=="function"&&(a=l,l={}),this.options=l;var u=this;function c(_){return a?(setTimeout(function(){a(void 0,_)},0),!0):_}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=t.length,x=1,m=f+p;l.maxEditLength&&(m=Math.min(m,l.maxEditLength));var v=(i=l.timeout)!==null&&i!==void 0?i:1/0,w=Date.now()+v,k=[{oldPos:-1,lastComponent:void 0}],S=this.extractCommon(k[0],r,t,0);if(k[0].oldPos+1>=p&&S+1>=f)return c([{value:this.join(r),count:r.length}]);var j=-1/0,E=1/0;function I(){for(var _=Math.max(j,-x);_<=Math.min(E,x);_+=2){var O=void 0,P=k[_-1],V=k[_+1];P&&(k[_-1]=void 0);var K=!1;if(V){var re=V.oldPos-_;K=V&&0<=re&&re<f}var D=P&&P.oldPos+1<p;if(!K&&!D){k[_]=void 0;continue}if(!D||K&&P.oldPos+1<V.oldPos?O=u.addToPath(V,!0,void 0,0):O=u.addToPath(P,void 0,!0,1),S=u.extractCommon(O,r,t,_),O.oldPos+1>=p&&S+1>=f)return c(vA(u,O.lastComponent,r,t,u.useLongestToken));k[_]=O,O.oldPos+1>=p&&(E=Math.min(E,_-1)),S+1>=f&&(j=Math.max(j,_+1))}x++}if(a)(function _(){setTimeout(function(){if(x>m||Date.now()>w)return a();I()||_()},0)})();else for(;x<=m&&Date.now()<=w;){var A=I();if(A)return A}},addToPath:function(t,r,i,l){var a=t.lastComponent;return a&&a.added===r&&a.removed===i?{oldPos:t.oldPos+l,lastComponent:{count:a.count+1,added:r,removed:i,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+l,lastComponent:{count:1,added:r,removed:i,previousComponent:a}}},extractCommon:function(t,r,i,l){for(var a=r.length,u=i.length,c=t.oldPos,f=c-l,p=0;f+1<a&&c+1<u&&this.equals(r[f+1],i[c+1]);)f++,c++,p++;return p&&(t.lastComponent={count:p,previousComponent:t.lastComponent}),t.oldPos=c,f},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],i=0;i<t.length;i++)t[i]&&r.push(t[i]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function vA(e,t,r,i,l){for(var a=[],u;t;)a.push(t),u=t.previousComponent,delete t.previousComponent,t=u;a.reverse();for(var c=0,f=a.length,p=0,x=0;c<f;c++){var m=a[c];if(m.removed){if(m.value=e.join(i.slice(x,x+m.count)),x+=m.count,c&&a[c-1].added){var w=a[c-1];a[c-1]=a[c],a[c]=w}}else{if(!m.added&&l){var v=r.slice(p,p+m.count);v=v.map(function(S,j){var E=i[x+j];return E.length>S.length?E:S}),m.value=e.join(v)}else m.value=e.join(r.slice(p,p+m.count));p+=m.count,m.added||(x+=m.count)}}var k=a[f-1];return f>1&&typeof k.value=="string"&&(k.added||k.removed)&&e.equals("",k.value)&&(a[f-2].value+=k.value,a.pop()),a}var xx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,yx=/\S/,N1=new Pr;N1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!yx.test(e)&&!yx.test(t)};N1.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&xx.test(t[r])&&xx.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var Df=new Pr;Df.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1746
|
-
`));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var i=0;i<r.length;i++){var l=r[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=l:(this.options.ignoreWhitespace&&(l=l.trim()),t.push(l))}return t};function wA(e,t,r){return Df.diff(e,t,r)}var kA=new Pr;kA.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var bA=new Pr;bA.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function na(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?na=function(t){return typeof t}:na=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(e)}var SA=Object.prototype.toString,fl=new Pr;fl.useLongestToken=!0;fl.tokenize=Df.tokenize;fl.castInput=function(e){var t=this.options,r=t.undefinedReplacement,i=t.stringifyReplacer,l=i===void 0?function(a,u){return typeof u>"u"?r:u}:i;return typeof e=="string"?e:JSON.stringify(Ld(e,null,null,l),l," ")};fl.equals=function(e,t){return Pr.prototype.equals.call(fl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Ld(e,t,r,i,l){t=t||[],r=r||[],i&&(e=i(l,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return r[a];var u;if(SA.call(e)==="[object Array]"){for(t.push(e),u=new Array(e.length),r.push(u),a=0;a<e.length;a+=1)u[a]=Ld(e[a],t,r,i,l);return t.pop(),r.pop(),u}if(e&&e.toJSON&&(e=e.toJSON()),na(e)==="object"&&e!==null){t.push(e),u={},r.push(u);var c=[],f;for(f in e)e.hasOwnProperty(f)&&c.push(f);for(c.sort(),a=0;a<c.length;a+=1)f=c[a],u[f]=Ld(e[f],t,r,i,f);t.pop(),r.pop()}else u=e;return u}var zd=new Pr;zd.tokenize=function(e){return e.slice()};zd.join=zd.removeEmpty=function(e){return e};const tl=({content:e})=>{const[t,r]=R.useState(null),i=async()=>{try{await navigator.clipboard.writeText(e),r("success"),setTimeout(()=>r(null),2e3)}catch{r("error"),setTimeout(()=>r(null),2e3)}};return h.jsxs(P1,{onClick:i,status:t,children:[t===null&&h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[h.jsx("path",{d:"M4 4v8h8V4H4zm1 1h6v6H5V5z"}),h.jsx("path",{d:"M3 3v9h9V3H3zm1 1h7v7H4V4z"})]}),t==="success"&&h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:h.jsx("path",{d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0z"})}),t==="error"&&h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:h.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm0 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zM6.5 11a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0zm.75-6.5h1.5v4.5h-1.5V4.5z"})})]})},P1=C.button`
|
|
1747
|
-
padding: 4px;
|
|
1748
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1749
|
-
border-radius: 4px;
|
|
1750
|
-
background-color: ${e=>{switch(e.status){case"success":return e.theme.colors.diffAdded;case"error":return e.theme.colors.diffRemoved;default:return e.theme.colors.background}}};
|
|
1751
|
-
color: ${e=>{switch(e.status){case"success":return e.theme.colors.diffAddedText;case"error":return e.theme.colors.diffRemovedText;default:return e.theme.colors.text}}};
|
|
1752
|
-
cursor: pointer;
|
|
1753
|
-
transition: background-color 0.2s ease-in-out;
|
|
1754
|
-
display: flex;
|
|
1755
|
-
align-items: center;
|
|
1756
|
-
justify-content: center;
|
|
1757
|
-
width: 24px;
|
|
1758
|
-
height: 24px;
|
|
1759
|
-
|
|
1760
|
-
&:hover {
|
|
1761
|
-
background-color: ${e=>e.theme.colors.backgroundHover};
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
svg {
|
|
1765
|
-
width: 16px;
|
|
1766
|
-
height: 16px;
|
|
1767
|
-
}
|
|
1768
|
-
`,CA=({oldContent:e,newContent:t})=>{const[r,i]=R.useState("unified"),l=wA(e??"",t),a=()=>h.jsxs(TA,{children:[h.jsx(tl,{content:t}),l.map((p,x)=>h.jsx(ed,{added:p.added,removed:p.removed,children:p.value},x))]}),u=()=>h.jsxs(RA,{children:[h.jsxs(vx,{children:[e&&h.jsx(tl,{content:e}),l.filter(p=>!p.added).map((p,x)=>h.jsx(ed,{removed:p.removed,children:p.value},x))]}),h.jsxs(vx,{children:[h.jsx(tl,{content:t}),l.filter(p=>!p.removed).map((p,x)=>h.jsx(ed,{added:p.added,children:p.value},x))]})]}),c=()=>h.jsxs(wx,{children:[e&&h.jsx(tl,{content:e}),h.jsx(kx,{children:e})]}),f=()=>h.jsxs(wx,{children:[h.jsx(tl,{content:t}),h.jsx(kx,{children:t})]});return h.jsxs(EA,{children:[h.jsxs(jA,{children:[h.jsx(Us,{active:r==="unified",onClick:()=>i("unified"),children:"Unified"}),h.jsx(Us,{active:r==="sideBySide",onClick:()=>i("sideBySide"),children:"Side by Side"}),h.jsx(Us,{active:r==="old",onClick:()=>i("old"),children:"Old Content"}),h.jsx(Us,{active:r==="new",onClick:()=>i("new"),children:"New Content"})]}),r==="unified"&&a(),r==="sideBySide"&&u(),r==="old"&&c(),r==="new"&&f()]})},EA=C.div`
|
|
1769
|
-
margin: 16px 0;
|
|
1770
|
-
position: relative;
|
|
1771
|
-
|
|
1772
|
-
${P1} {
|
|
1773
|
-
position: absolute;
|
|
1774
|
-
right: 20px;
|
|
1775
|
-
}
|
|
1776
|
-
`,jA=C.div`
|
|
1777
|
-
display: flex;
|
|
1778
|
-
gap: 8px;
|
|
1779
|
-
margin-bottom: 16px;
|
|
1780
|
-
`,Us=C.button`
|
|
1781
|
-
padding: 4px 8px;
|
|
1782
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1783
|
-
border-radius: 4px;
|
|
1784
|
-
background-color: ${e=>e.active?e.theme.colors.primary:e.theme.colors.background};
|
|
1785
|
-
color: ${e=>e.active?e.theme.colors.textOnPrimary:e.theme.colors.text};
|
|
1786
|
-
cursor: pointer;
|
|
1787
|
-
font-size: 0.8em;
|
|
1788
|
-
|
|
1789
|
-
&:hover {
|
|
1790
|
-
background-color: ${e=>e.theme.colors.primaryHover};
|
|
1791
|
-
}
|
|
1792
|
-
`,TA=C.div`
|
|
1793
|
-
margin: 16px 0;
|
|
1794
|
-
padding: 8px;
|
|
1795
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1796
|
-
border-radius: 4px;
|
|
1797
|
-
background-color: ${e=>e.theme.colors.background};
|
|
1798
|
-
max-height: 400px;
|
|
1799
|
-
overflow-y: auto;
|
|
1800
|
-
`,RA=C.div`
|
|
1801
|
-
display: grid;
|
|
1802
|
-
grid-template-columns: 1fr 1fr;
|
|
1803
|
-
gap: 16px;
|
|
1804
|
-
margin: 16px 0;
|
|
1805
|
-
`,vx=C.div`
|
|
1806
|
-
position: relative;
|
|
1807
|
-
padding: 8px;
|
|
1808
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1809
|
-
border-radius: 4px;
|
|
1810
|
-
background-color: ${e=>e.theme.colors.background};
|
|
1811
|
-
max-height: 400px;
|
|
1812
|
-
overflow-y: auto;
|
|
1813
|
-
`,wx=C.div`
|
|
1814
|
-
margin: 16px 0;
|
|
1815
|
-
padding: 8px;
|
|
1816
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1817
|
-
border-radius: 4px;
|
|
1818
|
-
background-color: ${e=>e.theme.colors.background};
|
|
1819
|
-
max-height: 400px;
|
|
1820
|
-
overflow-y: auto;
|
|
1821
|
-
`,kx=C.div`
|
|
1822
|
-
white-space: pre-wrap;
|
|
1823
|
-
font-family: monospace;
|
|
1824
|
-
font-size: 0.9em;
|
|
1825
|
-
line-height: 1.5;
|
|
1826
|
-
`,ed=C.div`
|
|
1827
|
-
white-space: pre-wrap;
|
|
1828
|
-
font-family: monospace;
|
|
1829
|
-
font-size: 0.9em;
|
|
1830
|
-
line-height: 1.5;
|
|
1831
|
-
padding: 2px 4px;
|
|
1832
|
-
margin: 2px 0;
|
|
1833
|
-
background-color: ${e=>e.added?e.theme.colors.diffAdded:e.removed?e.theme.colors.diffRemoved:"transparent"};
|
|
1834
|
-
color: ${e=>e.added?e.theme.colors.diffAddedText:e.removed?e.theme.colors.diffRemovedText:e.theme.colors.text};
|
|
1835
|
-
`,Mf=C.div`
|
|
1836
|
-
display: flex;
|
|
1837
|
-
flex-direction: column;
|
|
1838
|
-
gap: 12px;
|
|
1839
|
-
width: 100%;
|
|
1840
|
-
margin-top: 8px;
|
|
1841
|
-
font-size: 0.95em;
|
|
1842
|
-
`,eo=C.div`
|
|
1843
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1844
|
-
border-radius: 6px;
|
|
1845
|
-
overflow: hidden;
|
|
1846
|
-
background: ${e=>e.theme.colors.backgroundSecondary}11;
|
|
1847
|
-
transition: all 0.2s ease;
|
|
1848
|
-
|
|
1849
|
-
&:hover {
|
|
1850
|
-
border-color: ${e=>e.theme.colors.primary}66;
|
|
1851
|
-
}
|
|
1852
|
-
`,to=C.div`
|
|
1853
|
-
padding: 10px 12px;
|
|
1854
|
-
background: ${e=>e.theme.colors.backgroundSecondary}22;
|
|
1855
|
-
cursor: pointer;
|
|
1856
|
-
user-select: none;
|
|
1857
|
-
transition: background-color 0.2s ease;
|
|
1858
|
-
|
|
1859
|
-
&:hover {
|
|
1860
|
-
background: ${e=>e.theme.colors.backgroundSecondary}44;
|
|
1861
|
-
}
|
|
1862
|
-
`,no=C.div`
|
|
1863
|
-
padding: 12px;
|
|
1864
|
-
border-top: 1px solid ${e=>e.theme.colors.border};
|
|
1865
|
-
animation: slideDown 0.2s ease;
|
|
1866
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1867
|
-
font-size: 0.95em;
|
|
1868
|
-
|
|
1869
|
-
> *:first-child {
|
|
1870
|
-
margin-top: 0;
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
> *:last-child {
|
|
1874
|
-
margin-bottom: 0;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
p {
|
|
1878
|
-
margin: 8px 0;
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
ul,
|
|
1882
|
-
ol {
|
|
1883
|
-
padding-left: 20px;
|
|
1884
|
-
margin: 8px 0;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
li {
|
|
1888
|
-
margin-bottom: 4px;
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
pre {
|
|
1892
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1893
|
-
padding: 10px;
|
|
1894
|
-
border-radius: 4px;
|
|
1895
|
-
font-family: 'Courier New', Courier, monospace;
|
|
1896
|
-
white-space: pre-wrap;
|
|
1897
|
-
word-wrap: break-word;
|
|
1898
|
-
margin: 8px 0;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
code {
|
|
1902
|
-
font-family: 'Courier New', Courier, monospace;
|
|
1903
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
1904
|
-
padding: 2px 4px;
|
|
1905
|
-
border-radius: 3px;
|
|
1906
|
-
font-size: 0.9em;
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
pre > code {
|
|
1910
|
-
background-color: transparent;
|
|
1911
|
-
padding: 0;
|
|
1912
|
-
border-radius: 0;
|
|
1913
|
-
font-size: inherit;
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
blockquote {
|
|
1917
|
-
border-left: 4px solid ${e=>e.theme.colors.border};
|
|
1918
|
-
padding-left: 10px;
|
|
1919
|
-
margin: 8px 0;
|
|
1920
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
@keyframes slideDown {
|
|
1924
|
-
from {
|
|
1925
|
-
opacity: 0;
|
|
1926
|
-
transform: translateY(-10px);
|
|
1927
|
-
}
|
|
1928
|
-
to {
|
|
1929
|
-
opacity: 1;
|
|
1930
|
-
transform: translateY(0);
|
|
1931
|
-
}
|
|
1932
|
-
}
|
|
1933
|
-
`,Ho=C.div`
|
|
1934
|
-
display: flex;
|
|
1935
|
-
align-items: center;
|
|
1936
|
-
gap: 8px;
|
|
1937
|
-
color: ${e=>e.theme.colors.primary};
|
|
1938
|
-
font-weight: 500;
|
|
1939
|
-
|
|
1940
|
-
${e=>e.expanded&&wt`
|
|
1941
|
-
margin-bottom: -1px;
|
|
1942
|
-
`}
|
|
1943
|
-
`,Wo=C.span`
|
|
1944
|
-
display: inline-block;
|
|
1945
|
-
width: 16px;
|
|
1946
|
-
height: 16px;
|
|
1947
|
-
line-height: 16px;
|
|
1948
|
-
text-align: center;
|
|
1949
|
-
font-size: 0.8em;
|
|
1950
|
-
transition: transform 0.2s ease;
|
|
1951
|
-
`,ga=C.div`
|
|
1952
|
-
display: flex;
|
|
1953
|
-
flex-direction: column;
|
|
1954
|
-
gap: 12px;
|
|
1955
|
-
`,xa=C.div`
|
|
1956
|
-
padding: 10px;
|
|
1957
|
-
border-radius: 4px;
|
|
1958
|
-
background: ${e=>e.theme.colors.backgroundSecondary}22;
|
|
1959
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
1960
|
-
|
|
1961
|
-
&:hover {
|
|
1962
|
-
border-color: ${e=>e.theme.colors.primary}66;
|
|
1963
|
-
}
|
|
1964
|
-
`,$A=C.div`
|
|
1965
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1966
|
-
font-size: 0.95em;
|
|
1967
|
-
font-weight: 500;
|
|
1968
|
-
margin-bottom: 6px;
|
|
1969
|
-
margin-top: 8px;
|
|
1970
|
-
`,_d=C.div`
|
|
1971
|
-
font-family: monospace;
|
|
1972
|
-
padding: 4px 8px;
|
|
1973
|
-
padding-left: 0px;
|
|
1974
|
-
background: ${e=>e.theme.colors.codeBackground};
|
|
1975
|
-
border-radius: 3px;
|
|
1976
|
-
color: ${e=>e.theme.colors.codeText};
|
|
1977
|
-
word-break: break-all;
|
|
1978
|
-
`,IA=C.div`
|
|
1979
|
-
margin-top: 8px;
|
|
1980
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
1981
|
-
font-size: 0.95em;
|
|
1982
|
-
line-height: 1.4;
|
|
1983
|
-
|
|
1984
|
-
> *:first-child {
|
|
1985
|
-
margin-top: 0;
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
> *:last-child {
|
|
1989
|
-
margin-bottom: 0;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
p {
|
|
1993
|
-
margin: 8px 0;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
ul,
|
|
1997
|
-
ol {
|
|
1998
|
-
padding-left: 20px;
|
|
1999
|
-
margin: 8px 0;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
li {
|
|
2003
|
-
margin-bottom: 4px;
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
pre {
|
|
2007
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
2008
|
-
padding: 10px;
|
|
2009
|
-
border-radius: 4px;
|
|
2010
|
-
font-family: 'Courier New', Courier, monospace;
|
|
2011
|
-
white-space: pre-wrap;
|
|
2012
|
-
word-wrap: break-word;
|
|
2013
|
-
margin: 8px 0;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
code {
|
|
2017
|
-
font-family: 'Courier New', Courier, monospace;
|
|
2018
|
-
background-color: ${e=>e.theme.colors.codeBackground};
|
|
2019
|
-
padding: 2px 4px;
|
|
2020
|
-
border-radius: 3px;
|
|
2021
|
-
font-size: 0.9em;
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
pre > code {
|
|
2025
|
-
background-color: transparent;
|
|
2026
|
-
padding: 0;
|
|
2027
|
-
border-radius: 0;
|
|
2028
|
-
font-size: inherit;
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
blockquote {
|
|
2032
|
-
border-left: 4px solid ${e=>e.theme.colors.border};
|
|
2033
|
-
padding-left: 10px;
|
|
2034
|
-
margin: 8px 0;
|
|
2035
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
2036
|
-
}
|
|
2037
|
-
`,NA=C.div`
|
|
2038
|
-
font-size: 0.9em;
|
|
2039
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
2040
|
-
`,PA=C.div`
|
|
2041
|
-
margin-top: 4px;
|
|
2042
|
-
font-family: monospace;
|
|
2043
|
-
color: ${e=>e.theme.colors.info};
|
|
2044
|
-
`,Fd=C.div`
|
|
2045
|
-
display: inline-block;
|
|
2046
|
-
margin-left: 8px;
|
|
2047
|
-
padding: 2px 6px;
|
|
2048
|
-
border-radius: 3px;
|
|
2049
|
-
background: ${e=>e.theme.colors.backgroundSecondary}22;
|
|
2050
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2051
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
2052
|
-
font-size: 0.85em;
|
|
2053
|
-
cursor: pointer;
|
|
2054
|
-
transition: all 0.2s ease;
|
|
2055
|
-
|
|
2056
|
-
&:hover {
|
|
2057
|
-
background: ${e=>e.theme.colors.backgroundSecondary}44;
|
|
2058
|
-
border-color: ${e=>e.theme.colors.primary}66;
|
|
2059
|
-
}
|
|
2060
|
-
`,A1=C.div`
|
|
2061
|
-
margin-top: 8px;
|
|
2062
|
-
padding: 8px;
|
|
2063
|
-
border-radius: 4px;
|
|
2064
|
-
background: ${e=>e.theme.colors.backgroundSecondary}22;
|
|
2065
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2066
|
-
animation: slideDown 0.2s ease;
|
|
2067
|
-
`;C.pre`
|
|
2068
|
-
margin: 0;
|
|
2069
|
-
padding: 12px;
|
|
2070
|
-
background: ${e=>e.theme.colors.codeBackground};
|
|
2071
|
-
border-radius: 4px;
|
|
2072
|
-
color: ${e=>e.theme.colors.codeText};
|
|
2073
|
-
font-family: monospace;
|
|
2074
|
-
font-size: 0.9em;
|
|
2075
|
-
line-height: 1.4;
|
|
2076
|
-
overflow-x: auto;
|
|
2077
|
-
white-space: pre-wrap;
|
|
2078
|
-
word-wrap: break-word;
|
|
2079
|
-
`;const AA=(e,t)=>{switch(e){case"createFile":return wt`
|
|
2080
|
-
background: ${t.colors.info}22;
|
|
2081
|
-
color: ${t.colors.info};
|
|
2082
|
-
border-color: ${t.colors.info}44;
|
|
2083
|
-
`;case"updateFile":return wt`
|
|
2084
|
-
background: ${t.colors.primary}22;
|
|
2085
|
-
color: ${t.colors.primary};
|
|
2086
|
-
border-color: ${t.colors.primary}44;
|
|
2087
|
-
`;case"deleteFile":return wt`
|
|
2088
|
-
background: ${t.colors.error}22;
|
|
2089
|
-
color: ${t.colors.error};
|
|
2090
|
-
border-color: ${t.colors.error}44;
|
|
2091
|
-
`;case"moveFile":return wt`
|
|
2092
|
-
background: ${t.colors.warning}22;
|
|
2093
|
-
color: ${t.colors.warning};
|
|
2094
|
-
border-color: ${t.colors.warning}44;
|
|
2095
|
-
`;case"temperature":return wt`
|
|
2096
|
-
background: ${t.colors.success}22;
|
|
2097
|
-
color: ${t.colors.success};
|
|
2098
|
-
border-color: ${t.colors.success}44;
|
|
2099
|
-
margin-left: auto;
|
|
2100
|
-
`;case"cheap":return wt`
|
|
2101
|
-
background: ${t.colors.secondary}22;
|
|
2102
|
-
color: ${t.colors.secondary};
|
|
2103
|
-
border-color: ${t.colors.secondary}44;
|
|
2104
|
-
`;default:return wt`
|
|
2105
|
-
background: ${t.colors.secondary}22;
|
|
2106
|
-
color: ${t.colors.secondary};
|
|
2107
|
-
border-color: ${t.colors.secondary}44;
|
|
2108
|
-
`}},sl=C.div`
|
|
2109
|
-
display: inline-block;
|
|
2110
|
-
padding: 2px 8px;
|
|
2111
|
-
border-radius: 3px;
|
|
2112
|
-
font-size: 0.85em;
|
|
2113
|
-
font-weight: 500;
|
|
2114
|
-
margin-bottom: 6px;
|
|
2115
|
-
border: 1px solid;
|
|
2116
|
-
${e=>AA(e.variant,e.theme)}
|
|
2117
|
-
`;C.div`
|
|
2118
|
-
margin-top: 8px;
|
|
2119
|
-
font-size: 0.9em;
|
|
2120
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
2121
|
-
`;const L1=C.div`
|
|
2122
|
-
display: flex;
|
|
2123
|
-
gap: 8px;
|
|
2124
|
-
align-items: center;
|
|
2125
|
-
flex-wrap: wrap;
|
|
2126
|
-
`,LA=({data:{fileUpdates:e}})=>h.jsx("div",{children:e.map((t,r)=>h.jsx(Bf,{data:{name:t.name,args:t.args}},r))}),Bf=({data:{name:e,args:{filePath:t,explanation:r,oldContent:i,newContent:l}}})=>{const[a,u]=R.useState(!0),[c,f]=R.useState(!1);return h.jsxs(_A,{children:[h.jsxs(FA,{children:[h.jsx(sl,{variant:e,children:e}),h.jsx(I1,{children:t}),h.jsxs(OA,{children:[h.jsx(Sx,{onClick:()=>u(!a),children:a?"Hide Explanation":"Explanation"}),(i||l)&&h.jsx(Sx,{onClick:()=>f(!c),children:c?"Hide Diff":"Show Diff"})]})]}),a&&r&&h.jsx(DA,{children:h.jsx(lo,{remarkPlugins:[so],children:r})}),c&&h.jsx(MA,{children:h.jsx(CA,{oldContent:i,newContent:l})})]})},zA=["updateFile","createFile","patchFile","createDirectory","deleteFile","moveFile","downloadFile","splitImage","resizeImage","imglyRemoveBackground"];function ya(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.name!="string"||!zA.includes(t.name)?!1:typeof t.args.filePath=="string"}function bx(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.fileUpdates)&&t.fileUpdates.every(ya)}const _A=C.div`
|
|
2127
|
-
margin: 16px 0;
|
|
2128
|
-
padding: 16px;
|
|
2129
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2130
|
-
border-radius: 8px;
|
|
2131
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2132
|
-
`,FA=C.div`
|
|
2133
|
-
display: flex;
|
|
2134
|
-
gap: 8px;
|
|
2135
|
-
align-items: center;
|
|
2136
|
-
`,OA=C.div`
|
|
2137
|
-
display: flex;
|
|
2138
|
-
gap: 8px;
|
|
2139
|
-
margin-left: auto;
|
|
2140
|
-
`,Sx=C.button`
|
|
2141
|
-
padding: 4px 8px;
|
|
2142
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2143
|
-
border-radius: 4px;
|
|
2144
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2145
|
-
cursor: pointer;
|
|
2146
|
-
font-size: 0.8em;
|
|
2147
|
-
color: ${e=>e.theme.colors.text};
|
|
2148
|
-
|
|
2149
|
-
&:hover {
|
|
2150
|
-
background-color: ${e=>e.theme.colors.backgroundHover};
|
|
2151
|
-
}
|
|
2152
|
-
`,DA=C.div`
|
|
2153
|
-
margin-top: 8px;
|
|
2154
|
-
padding: 8px;
|
|
2155
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2156
|
-
border-radius: 4px;
|
|
2157
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2158
|
-
font-size: 0.9em;
|
|
2159
|
-
line-height: 1.5;
|
|
2160
|
-
`,MA=C.div`
|
|
2161
|
-
margin: 16px 0;
|
|
2162
|
-
`,BA=C.div`
|
|
2163
|
-
display: grid;
|
|
2164
|
-
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
2165
|
-
gap: 8px;
|
|
2166
|
-
max-width: 800px;
|
|
2167
|
-
margin: 8px 0;
|
|
2168
|
-
`,UA=C.div`
|
|
2169
|
-
position: relative;
|
|
2170
|
-
width: 100%;
|
|
2171
|
-
padding-bottom: 100%; /* Creates a square aspect ratio */
|
|
2172
|
-
`,VA=C.img`
|
|
2173
|
-
position: absolute;
|
|
2174
|
-
top: 0;
|
|
2175
|
-
left: 0;
|
|
2176
|
-
width: 100%;
|
|
2177
|
-
height: 100%;
|
|
2178
|
-
object-fit: contain;
|
|
2179
|
-
border-radius: 4px;
|
|
2180
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
2181
|
-
`,HA=({message:e,visibleDataIds:t,toggleDataVisibility:r})=>{var A;const{updateMessage:i}=cn(),[l,a]=R.useState(!1),[u,c]=R.useState(e.content),[f,p]=R.useState(!1),[x,m]=R.useState(null),v=R.useRef(null);R.useEffect(()=>{l&&v.current&&(v.current.focus(),v.current.selectionStart=v.current.value.length,v.current.selectionEnd=v.current.value.length)},[l]);const w=()=>{c(e.content),a(!0),m(null)},k=()=>{a(!1),c(e.content),m(null)},S=_=>_.trim()?_===e.content?(m("No changes made to the message"),!1):!0:(m("Message content cannot be empty"),!1),j=async()=>{if(S(u)){p(!0),m(null);try{await ef(e.id,u),i(e.id,{content:u}),a(!1)}catch(_){m(_ instanceof Error?_.message:"Failed to save changes")}finally{p(!1)}}},E=_=>{_.key==="Enter"&&_.ctrlKey?j():_.key==="Escape"&&k()},I=e.type!=="system"&&((A=e.flags)==null?void 0:A.includes(nf.MESSAGE_EDITABLE));return h.jsx(si,{"data-type":e.type,children:h.jsxs(T1,{"data-edit-mode":l,children:[h.jsxs(aA,{children:[h.jsx("div",{children:e.type==="user"?"You":"Assistant"}),I&&!l&&h.jsx(zf,{onClick:w,title:"Edit message",children:"✎"})]}),l?h.jsxs(h.Fragment,{children:[h.jsx(Vo,{ref:v,value:u,onChange:_=>c(_.target.value),onKeyDown:E,placeholder:"Enter your message..."}),x&&h.jsx("div",{style:{color:"red",fontSize:"0.8em",marginTop:"4px"},children:x}),h.jsxs(Af,{children:[h.jsx(_f,{onClick:j,disabled:f,children:f?h.jsx(Of,{}):"Save"}),h.jsx(Ff,{onClick:k,disabled:f,children:"Cancel"})]})]}):h.jsx(R1,{children:h.jsx(lo,{remarkPlugins:[so],children:e.content})}),e.executableCode&&h.jsxs(fA,{children:[h.jsxs(pA,{children:["Executable Code (",e.executableCode.language,")"]}),h.jsx(hA,{children:h.jsx("pre",{children:h.jsx("code",{children:e.executableCode.code})})})]}),e.codeExecutionResult&&h.jsxs(mA,{outcome:e.codeExecutionResult.outcome,children:[h.jsxs(gA,{children:["Execution Result: ",e.codeExecutionResult.outcome]}),h.jsxs(xA,{children:[h.jsx("pre",{children:e.codeExecutionResult.output}),e.codeExecutionResult.outputFiles&&e.codeExecutionResult.outputFiles.length>0&&h.jsxs("div",{style:{marginTop:"8px",fontSize:"0.9em"},children:[h.jsx("strong",{children:"Generated Files:"}),h.jsx("ul",{children:e.codeExecutionResult.outputFiles.map(_=>h.jsx("li",{children:_.filename},_.fileId))})]})]})]}),e.images&&e.images.length>0&&h.jsx(BA,{children:e.images.map((_,O)=>h.jsx(UA,{children:h.jsx(VA,{src:`data:${_.mediaType};base64,${_.base64url}`,alt:_.originalName||`Image ${O+1}`,title:_.originalName||`Image ${O+1}`})},O))}),h.jsxs(uA,{children:[h.jsx("div",{children:e.data?h.jsx(dA,{onClick:()=>r(e.id),children:t.has(e.id)?"Hide data":"Show data"}):null}),h.jsxs("div",{children:[e.timestamp&&e.type==="assistant"&&e.data&&"contextSize"in e.data&&h.jsx($1,{messages:[e]}),h.jsx(cA,{children:e.timestamp.toLocaleString()})]})]}),t.has(e.id)&&e.data?h.jsx(h.Fragment,{children:ya(e.data)?h.jsx(Bf,{data:e.data}):h.jsx(b0,{data:e.data})}):null]})})},Cx=C.div`
|
|
2182
|
-
background-color: ${e=>e.theme.colors.systemMessageBackground};
|
|
2183
|
-
color: ${e=>e.theme.colors.systemMessageText};
|
|
2184
|
-
border: 1px solid ${e=>e.theme.colors.systemMessageBorder};
|
|
2185
|
-
border-radius: 8px;
|
|
2186
|
-
padding: 8px 12px;
|
|
2187
|
-
margin: 8px 0;
|
|
2188
|
-
font-style: italic;
|
|
2189
|
-
font-size: 0.9em;
|
|
2190
|
-
opacity: 0.8;
|
|
2191
|
-
transition: margin 0.2s ease-in-out;
|
|
2192
|
-
|
|
2193
|
-
/* Increase bottom margin when followed by a codegen view */
|
|
2194
|
-
& + div {\n margin-top: 16px;
|
|
2195
|
-
}\n
|
|
2196
|
-
${e=>e.isExecutionEnd&&`
|
|
2197
|
-
border-bottom: 3px solid ${e.theme.colors.primary};
|
|
2198
|
-
`}\n`,Ex=C.div`
|
|
2199
|
-
cursor: pointer;
|
|
2200
|
-
font-weight: bold;
|
|
2201
|
-
margin-bottom: 8px;
|
|
2202
|
-
display: flex;
|
|
2203
|
-
align-items: center;
|
|
2204
|
-
gap: 4px;
|
|
2205
|
-
|
|
2206
|
-
&:hover {\n opacity: 0.8;
|
|
2207
|
-
}\n`,WA=C.div`
|
|
2208
|
-
white-space: pre-wrap;
|
|
2209
|
-
word-wrap: break-word;
|
|
2210
|
-
font-family: inherit;
|
|
2211
|
-
margin: 0;
|
|
2212
|
-
|
|
2213
|
-
/* Add spacing between content sections */
|
|
2214
|
-
& > *:not(:last-child) {\n margin-bottom: 12px;
|
|
2215
|
-
}\n`,qA=C.div`
|
|
2216
|
-
margin-bottom: 8px;
|
|
2217
|
-
position: relative;
|
|
2218
|
-
padding-right: 150px; /* Space for timestamp and data link */
|
|
2219
|
-
|
|
2220
|
-
&:last-child {\n margin-bottom: 0;
|
|
2221
|
-
}\n`,GA=C.div`
|
|
2222
|
-
font-size: 0.8em;
|
|
2223
|
-
color: ${e=>e.theme.colors.systemMessageTimestamp};
|
|
2224
|
-
position: absolute;
|
|
2225
|
-
right: 60px;
|
|
2226
|
-
top: 0;
|
|
2227
|
-
`,JA=C.span`
|
|
2228
|
-
font-size: 0.8em;
|
|
2229
|
-
color: ${e=>e.theme.colors.primary};
|
|
2230
|
-
cursor: pointer;
|
|
2231
|
-
text-decoration: underline;
|
|
2232
|
-
position: absolute;
|
|
2233
|
-
right: 0;
|
|
2234
|
-
top: 0;
|
|
2235
|
-
|
|
2236
|
-
&:hover {\n color: ${e=>e.theme.colors.primaryHover};\n }\n`,KA=({messageId:e,data:t})=>{const{updateMessage:r}=cn(),[i,l]=R.useState({analysis:!0,changes:!0,files:!0}),[a,u]=R.useState({}),[c,f]=R.useState(!1),[p,x]=R.useState({...t.args}),[m,v]=R.useState(!1),[w,k]=R.useState(null),S=O=>{l(P=>({...P,[O]:!P[O]}))},j=O=>{u(P=>({...P,[O]:!P[O]}))},E=()=>{x({...t.args}),f(!0),k(null)},I=()=>{f(!1),x({...t.args}),k(null)},A=async()=>{v(!0),k(null);try{const O={...t,args:p};await ef(e,void 0,O),r(e,{data:O}),f(!1)}catch(O){k(O instanceof Error?O.message:"Failed to save changes")}finally{v(!1)}},_=(O,P)=>{const V=[...p.affectedFiles];V[O]={...V[O],reason:P},x({...p,affectedFiles:V})};return h.jsxs(Mf,{children:[h.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"8px"},children:c?h.jsxs(Af,{children:[h.jsx(_f,{onClick:A,disabled:m,children:m?h.jsx(Of,{}):"Save"}),h.jsx(Ff,{onClick:I,disabled:m,children:"Cancel"})]}):h.jsx(zf,{onClick:E,title:"Edit planning",children:"✎ Edit"})}),w&&h.jsx("div",{style:{color:"red",fontSize:"0.8em",marginBottom:"8px"},children:w}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>S("analysis"),children:h.jsxs(Ho,{expanded:i.analysis,children:[h.jsx(Wo,{children:i.analysis?"▼":"▶"}),"Problem Analysis"]})}),i.analysis&&h.jsx(no,{children:c?h.jsx(Vo,{value:p.problemAnalysis,onChange:O=>x({...p,problemAnalysis:O.target.value}),placeholder:"Problem Analysis...",rows:5}):h.jsx(lo,{remarkPlugins:[so],children:t.args.problemAnalysis})})]}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>S("changes"),children:h.jsxs(Ho,{expanded:i.changes,children:[h.jsx(Wo,{children:i.changes?"▼":"▶"}),"Implementation Plan"]})}),i.changes&&h.jsx(no,{children:c?h.jsx(Vo,{value:p.codeChanges,onChange:O=>x({...p,codeChanges:O.target.value}),placeholder:"Implementation Plan...",rows:10}):h.jsx(lo,{remarkPlugins:[so],children:t.args.codeChanges})})]}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>S("files"),children:h.jsxs(Ho,{expanded:i.files,children:[h.jsx(Wo,{children:i.files?"▼":"▶"}),"Affected Files"]})}),i.files&&h.jsx(no,{children:h.jsx(ga,{children:(c?p.affectedFiles:t.args.affectedFiles).map((O,P)=>h.jsxs(xa,{children:[h.jsxs(_d,{children:[O.filePath,O.dependencies&&O.dependencies.length>0&&h.jsxs(Fd,{onClick:()=>j(O.filePath),title:"Dependencies",children:["(",O.dependencies.length,")"]})]}),O.dependencies&&O.dependencies.length>0&&a[O.filePath]&&h.jsx(A1,{children:h.jsxs(NA,{children:["Dependencies:",O.dependencies.map((V,K)=>h.jsx(PA,{children:V},K))]})}),c?h.jsx(Vo,{value:O.reason,onChange:V=>_(P,V.target.value),placeholder:"Reason...",rows:2,style:{marginTop:"4px"}}):h.jsx($A,{children:O.reason})]},P))})})]})]})};function jx(e){if(typeof e!="object"||e===null)return!1;const t=e;if(!t.args||typeof t.args!="object"||t.args===null)return!1;const r=t.args;return typeof r.problemAnalysis=="string"&&typeof r.codeChanges=="string"&&Array.isArray(r.affectedFiles)&&r.affectedFiles.every(i=>typeof i=="object"&&i!==null&&typeof i.reason=="string"&&typeof i.filePath=="string")}const QA=({messageId:e,data:t})=>{const{updateMessage:r}=cn(),[i,l]=R.useState({explanation:!0,updates:!0,context:!1}),[a,u]=R.useState(!1),[c,f]=R.useState({...t.args}),[p,x]=R.useState(!1),[m,v]=R.useState(null),w=I=>{l(A=>({...A,[I]:!A[I]}))},k=()=>{f({...t.args}),u(!0),v(null)},S=()=>{u(!1),f({...t.args}),v(null)},j=async()=>{x(!0),v(null);try{const I={...t,args:c};await ef(e,"",I),r(e,{data:I}),u(!1)}catch(I){v(I instanceof Error?I.message:"Failed to save changes")}finally{x(!1)}},E=(I,A)=>{const _=[...c.fileUpdates];_[I]={..._[I],prompt:A},f({...c,fileUpdates:_})};return h.jsxs(Mf,{children:[h.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:"8px"},children:a?h.jsxs(Af,{children:[h.jsx(_f,{onClick:j,disabled:p,children:p?h.jsx(Of,{}):"Save"}),h.jsx(Ff,{onClick:S,disabled:p,children:"Cancel"})]}):h.jsx(zf,{onClick:k,title:"Edit summary",children:"✎ Edit"})}),m&&h.jsx("div",{style:{color:"red",fontSize:"0.8em",marginBottom:"8px"},children:m}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>w("explanation"),children:h.jsxs(Ho,{expanded:i.explanation,children:[h.jsx(Wo,{children:i.explanation?"▼":"▶"}),"Explanation"]})}),i.explanation&&h.jsx(no,{children:a?h.jsx(Vo,{value:c.explanation,onChange:I=>f({...c,explanation:I.target.value}),placeholder:"Explanation...",rows:5}):h.jsx(lo,{remarkPlugins:[so],children:t.args.explanation})})]}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>w("updates"),children:h.jsxs(Ho,{expanded:i.updates,children:[h.jsx(Wo,{children:i.updates?"▼":"▶"}),"File Updates (",t.args.fileUpdates.length,")"]})}),i.updates&&h.jsx(no,{children:h.jsx(ga,{children:(a?c.fileUpdates:t.args.fileUpdates).map((I,A)=>{var _;return h.jsxs(xa,{id:"file-update-"+I.id,children:[h.jsxs(L1,{children:[h.jsx(sl,{variant:I.updateToolName,children:I.updateToolName}),h.jsx(_d,{children:I.filePath}),h.jsx(Fd,{onClick:()=>w(I.id),children:I.id}),I.temperature&&h.jsx(sl,{variant:"temperature",title:"Temperature",children:I.temperature}),I.cheap&&h.jsx(sl,{variant:"cheap",title:"Use cheaper model",children:"Cheap"})]}),I.dependsOn&&i[I.id]&&h.jsxs(A1,{children:["Depends on:"," ","\\n ",(_=I.dependsOn)==null?void 0:_.map(O=>h.jsx(Fd,{onClick:()=>{var P;return(P=document.getElementById("file-update-"+O))==null?void 0:P.scrollIntoView()},children:O},O))]}),a?h.jsx(Vo,{value:I.prompt,onChange:O=>E(A,O.target.value),placeholder:"Prompt...",rows:3,style:{marginTop:"8px"}}):h.jsx(IA,{title:"Prompt",children:h.jsx(lo,{remarkPlugins:[so],children:I.prompt})})]},A)})})})]}),h.jsxs(eo,{children:[h.jsx(to,{onClick:()=>w("context"),children:h.jsxs(Ho,{expanded:i.context,children:[h.jsx(Wo,{children:i.context?"▼":"▶"}),"Context Paths (",t.args.contextPaths.length,")"]})}),i.context&&h.jsx(no,{children:h.jsx(ga,{children:t.args.contextPaths.map((I,A)=>h.jsx(xa,{children:h.jsx(_d,{children:I})},A))})})]})]})};function Tx(e){if(typeof e!="object"||e===null)return!1;const t=e;if(!t.args||typeof t.args!="object"||t.args===null)return!1;const r=t.args;return typeof r.explanation=="string"&&Array.isArray(r.fileUpdates)&&Array.isArray(r.contextPaths)&&r.fileUpdates.every(i=>typeof i=="object"&&i!==null&&typeof i.prompt=="string"&&typeof i.filePath=="string"&&typeof i.updateToolName=="string")}const YA=C(sl)``;C.div`
|
|
2237
|
-
margin-top: 8px;
|
|
2238
|
-
padding: 12px;
|
|
2239
|
-
border-radius: 4px;
|
|
2240
|
-
background: ${e=>e.theme.colors.backgroundSecondary}22;
|
|
2241
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2242
|
-
animation: slideDown 0.2s ease;
|
|
2243
|
-
|
|
2244
|
-
pre {
|
|
2245
|
-
margin: 0;
|
|
2246
|
-
padding: 0;
|
|
2247
|
-
background: transparent;
|
|
2248
|
-
font-family: 'Courier New', Courier, monospace;
|
|
2249
|
-
font-size: 0.9em;
|
|
2250
|
-
white-space: pre-wrap;
|
|
2251
|
-
word-wrap: break-word;
|
|
2252
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
2253
|
-
}
|
|
2254
|
-
|
|
2255
|
-
@keyframes slideDown {
|
|
2256
|
-
from {
|
|
2257
|
-
opacity: 0;
|
|
2258
|
-
transform: translateY(-10px);
|
|
2259
|
-
}
|
|
2260
|
-
to {
|
|
2261
|
-
opacity: 1;
|
|
2262
|
-
transform: translateY(0);
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
`;function Rx(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.summary=="string"&&Array.isArray(t.actions)&&t.actions.every(r=>typeof r=="object"&&r!==null&&typeof r.name=="string"&&typeof r.filePath=="string")}const XA=({data:e})=>h.jsx(Mf,{children:h.jsxs(eo,{children:[h.jsxs(to,{children:["Inferred Actions (",e.actions.length,")"]}),h.jsxs(no,{children:[e.summary&&h.jsx(lo,{remarkPlugins:[so],children:e.summary}),h.jsx(ga,{children:e.actions.map((t,r)=>h.jsx(xa,{children:h.jsxs(L1,{children:[h.jsx(YA,{variant:t.name,children:t.name}),h.jsx(I1,{children:t.filePath})]})},r))})]})]})}),ZA=({message:e,collapsedExecutions:t,toggleExecutionCollapse:r,visibleDataIds:i,toggleDataVisibility:l})=>t.has(e.id)?h.jsx(Cx,{isExecutionEnd:e.isExecutionEnd,children:h.jsxs(Ex,{onClick:()=>r(e.id),children:["▶ Execution ",e.id.split("_")[1]]})}):e5(e.parts).map((u,c)=>u.parts.length>0?h.jsxs(Cx,{isExecutionEnd:e.isExecutionEnd,children:[h.jsxs(Ex,{onClick:()=>r(e.id),children:["▼ Execution ",e.id.split("_")[1]]}),h.jsx(WA,{children:u.parts.map(f=>h.jsxs(qA,{children:[f.content,h.jsx(GA,{children:f.timestamp.toLocaleString()}),f.data?h.jsx(JA,{onClick:()=>l(f.id),children:i.has(f.id)?"Hide data":"Show data"}):null,i.has(f.id)&&f.data?h.jsx(b0,{data:f.data}):null]},f.id))})]},`section-${c}`):u.codegenView?h.jsx(Tt.Fragment,{children:u.codegenView},`view-${c}`):null);function e5(e){const t=[];let r=[];return t.push({parts:r}),e.forEach(i=>{if(r.push(i),jx(i.data)||Tx(i.data)||ya(i.data)||bx(i.data)||Rx(i.data)){const l=jx(i.data)?h.jsx(KA,{messageId:i.id,data:i.data},`planning-${i.id}`):Tx(i.data)?h.jsx(QA,{messageId:i.id,data:i.data},`summary-${i.id}`):ya(i.data)?h.jsx(Bf,{data:i.data},`file-update-${i.id}`):bx(i.data)?h.jsx(LA,{data:i.data}):Rx(i.data)?h.jsx(XA,{data:i.data}):null;t.push({parts:[],codegenView:l}),r=[],t.push({parts:r})}}),t}const t5=C.div`
|
|
2266
|
-
display: flex;
|
|
2267
|
-
flex-direction: column;
|
|
2268
|
-
height: 100%;
|
|
2269
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2270
|
-
position: relative;
|
|
2271
|
-
overflow: hidden;
|
|
2272
|
-
`,n5=C.div`
|
|
2273
|
-
display: flex;
|
|
2274
|
-
flex-direction: column;
|
|
2275
|
-
gap: 16px;
|
|
2276
|
-
padding: 16px;
|
|
2277
|
-
overflow-y: auto;
|
|
2278
|
-
flex-grow: 1;
|
|
2279
|
-
max-height: calc(100% - 60px); // Adjust this value based on the height of your UnreadMessagesNotification
|
|
2280
|
-
margin-bottom: 60px; // This should match the height of UnreadMessagesNotification plus its bottom margin
|
|
2281
|
-
`,r5=C.div`
|
|
2282
|
-
display: flex;
|
|
2283
|
-
flex-direction: column;
|
|
2284
|
-
gap: 8px;
|
|
2285
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2286
|
-
border-radius: 8px;
|
|
2287
|
-
margin-bottom: 24px;
|
|
2288
|
-
`,o5=C.div`
|
|
2289
|
-
font-size: 16px;
|
|
2290
|
-
font-weight: bold;
|
|
2291
|
-
color: ${e=>e.theme.colors.text};
|
|
2292
|
-
background-color: ${e=>e.theme.colors.backgroundSecondary};
|
|
2293
|
-
padding: 12px 16px;
|
|
2294
|
-
border-bottom: 1px solid ${e=>e.theme.colors.border};
|
|
2295
|
-
border-top-left-radius: 8px;
|
|
2296
|
-
border-top-right-radius: 8px;
|
|
2297
|
-
display: flex;
|
|
2298
|
-
justify-content: space-between;
|
|
2299
|
-
align-items: center;
|
|
2300
|
-
cursor: pointer;
|
|
2301
|
-
position: sticky;
|
|
2302
|
-
top: -22px;
|
|
2303
|
-
z-index: 10;
|
|
2304
|
-
|
|
2305
|
-
/* Wrap title in a div to control its layout */
|
|
2306
|
-
> .title-wrapper {
|
|
2307
|
-
display: flex;
|
|
2308
|
-
align-items: start;
|
|
2309
|
-
flex-grow: 1;
|
|
2310
|
-
overflow: hidden; /* Ensure long text doesn't overflow */
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
> .title {
|
|
2314
|
-
display: flex;
|
|
2315
|
-
align-items: start;
|
|
2316
|
-
white-space: nowrap; /* Prevent text wrapping */
|
|
2317
|
-
overflow: hidden; /* Hide overflowing text */
|
|
2318
|
-
text-overflow: ellipsis; /* Add ellipsis for overflow */
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
/* Wrap meta in a div for consistent layout */
|
|
2322
|
-
> .meta-wrapper {
|
|
2323
|
-
display: flex;
|
|
2324
|
-
align-items: center; /* Align meta content vertically */
|
|
2325
|
-
flex-shrink: 0; /* Prevent meta from shrinking */
|
|
2326
|
-
margin-left: auto; /* Push meta to the right */
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
> .meta {
|
|
2330
|
-
font-size: 12px;
|
|
2331
|
-
font-weight: normal;
|
|
2332
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
2333
|
-
display: flex;
|
|
2334
|
-
flex-direction: row;
|
|
2335
|
-
align-items: center;
|
|
2336
|
-
gap: 10px;
|
|
2337
|
-
white-space: nowrap;
|
|
2338
|
-
overflow: visible;
|
|
2339
|
-
text-overflow: ellipsis;
|
|
2340
|
-
}
|
|
2341
|
-
`,i5=C.button`
|
|
2342
|
-
display: flex;
|
|
2343
|
-
justify-content: center;
|
|
2344
|
-
align-items: center;
|
|
2345
|
-
background-color: transparent;
|
|
2346
|
-
border: none;
|
|
2347
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
2348
|
-
cursor: pointer;
|
|
2349
|
-
font-size: 16px;
|
|
2350
|
-
padding: 4px 8px;
|
|
2351
|
-
border-radius: 4px;
|
|
2352
|
-
margin-left: 8px;
|
|
2353
|
-
z-index: 11;
|
|
2354
|
-
position: relative;
|
|
2355
|
-
min-width: 24px;
|
|
2356
|
-
flex-shrink: 0; /* Prevent the button from shrinking */
|
|
2357
|
-
|
|
2358
|
-
&:hover {
|
|
2359
|
-
background-color: ${e=>e.theme.colors.backgroundSecondary};
|
|
2360
|
-
color: ${e=>e.theme.colors.error};
|
|
2361
|
-
}
|
|
2362
|
-
`,l5=C.div`
|
|
2363
|
-
display: ${e=>e.isCollapsed?"none":"flex"};
|
|
2364
|
-
flex-direction: column;
|
|
2365
|
-
gap: 8px;
|
|
2366
|
-
padding: 16px;
|
|
2367
|
-
`,s5=C.p`
|
|
2368
|
-
font-size: 14px;
|
|
2369
|
-
color: ${e=>e.theme.colors.textSecondary};
|
|
2370
|
-
background-color: ${e=>e.theme.colors.backgroundTertiary};
|
|
2371
|
-
padding: 8px;
|
|
2372
|
-
border-radius: 4px;
|
|
2373
|
-
margin: 0 0 16px 0;
|
|
2374
|
-
`;C.div`
|
|
2375
|
-
margin-bottom: 16px;
|
|
2376
|
-
|
|
2377
|
-
&:last-child {
|
|
2378
|
-
margin-bottom: 0;
|
|
2379
|
-
}
|
|
2380
|
-
`;const a5=C.span`
|
|
2381
|
-
&:before {
|
|
2382
|
-
content: '▼';
|
|
2383
|
-
margin-right: 8px;
|
|
2384
|
-
}
|
|
2385
|
-
`,u5=C.span`
|
|
2386
|
-
&:before {
|
|
2387
|
-
content: '▶';
|
|
2388
|
-
margin-right: 8px;
|
|
2389
|
-
}
|
|
2390
|
-
`;C.span`
|
|
2391
|
-
color: ${e=>e.theme.colors.primary};
|
|
2392
|
-
cursor: pointer;
|
|
2393
|
-
margin-right: 8px;
|
|
2394
|
-
|
|
2395
|
-
&:hover {
|
|
2396
|
-
text-decoration: underline;
|
|
2397
|
-
}
|
|
2398
|
-
`;const c5=C.div`
|
|
2399
|
-
// TODO
|
|
2400
|
-
`;function d5(e){return R.useMemo(()=>{const t=[];let r=null,i=null,l=0;return e.sort((a,u)=>a.iterationId<u.iterationId?-1:1).forEach((a,u)=>{var c;(!r||a.iterationId!==r.iterationId)&&(r&&(r.timestampEnd=new Date(a.timestamp),t.push(r)),r={iterationId:a.iterationId,timestampStart:new Date(a.timestamp),timestampEnd:new Date(a.timestamp),conversationSummaries:[],messages:[]}),(c=a.flags)!=null&&c.includes(nf.CONVERSATION_SUMMARY)&&a.data&&(r.conversationSummaries.push(a.data),r.iterationTitle=a.data),a.type===Hn.SYSTEM?i?i.parts.push(a):(l++,i={...a,type:Hn.SYSTEM,parts:[a],id:`execution_${l}`,isExecutionEnd:u===e.length-1||e[u+1].type!==Hn.SYSTEM},r.messages.push(i)):(i&&(i.isExecutionEnd=!0),i=null,r.messages.push(a)),r.timestampEnd=new Date(a.timestamp)}),r&&t.push(r),t.sort((a,u)=>a.timestampStart.getTime()-u.timestampStart.getTime())},[e])}const f5=({onClick:e})=>h.jsxs(h5,{onClick:e,children:[h.jsx(m5,{children:"New messages"}),h.jsx(td,{}),h.jsx(td,{}),h.jsx(td,{})]}),p5=ti`
|
|
2401
|
-
0%, 80%, 100% {
|
|
2402
|
-
transform: scale(0.8);
|
|
2403
|
-
}
|
|
2404
|
-
40% {
|
|
2405
|
-
transform: scale(1.2);
|
|
2406
|
-
}
|
|
2407
|
-
`,h5=C.div`
|
|
2408
|
-
display: flex;
|
|
2409
|
-
justify-content: center;
|
|
2410
|
-
align-items: center;
|
|
2411
|
-
padding: 10px;
|
|
2412
|
-
background-color: ${e=>e.theme.colors.primary};
|
|
2413
|
-
color: ${e=>e.theme.colors.text};
|
|
2414
|
-
border-radius: 20px;
|
|
2415
|
-
position: absolute;
|
|
2416
|
-
bottom: 20px;
|
|
2417
|
-
left: 50%;
|
|
2418
|
-
transform: translateX(-50%);
|
|
2419
|
-
cursor: pointer;
|
|
2420
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
2421
|
-
transition: all 0.3s ease;
|
|
2422
|
-
z-index: 10;
|
|
2423
|
-
|
|
2424
|
-
&:hover {
|
|
2425
|
-
background-color: ${e=>e.theme.colors.primaryHover};
|
|
2426
|
-
}
|
|
2427
|
-
`,m5=C.span`
|
|
2428
|
-
margin-right: 10px;
|
|
2429
|
-
font-weight: bold;
|
|
2430
|
-
`,td=C.div`
|
|
2431
|
-
width: 8px;
|
|
2432
|
-
height: 8px;
|
|
2433
|
-
background-color: ${e=>e.theme.colors.text};
|
|
2434
|
-
border-radius: 50%;
|
|
2435
|
-
margin: 0 2px;
|
|
2436
|
-
animation: ${p5} 1.4s infinite ease-in-out both;
|
|
2437
|
-
|
|
2438
|
-
&:nth-child(2) {
|
|
2439
|
-
animation-delay: -0.32s;
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
&:nth-child(3) {
|
|
2443
|
-
animation-delay: -0.16s;
|
|
2444
|
-
}
|
|
2445
|
-
`,g5=C.div`
|
|
2446
|
-
position: relative;
|
|
2447
|
-
width: 100%;
|
|
2448
|
-
`,x5=C.textarea`
|
|
2449
|
-
width: 100%;
|
|
2450
|
-
min-height: 60px;
|
|
2451
|
-
resize: none;
|
|
2452
|
-
padding: 8px;
|
|
2453
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2454
|
-
border-radius: 4px;
|
|
2455
|
-
font-family: inherit;
|
|
2456
|
-
font-size: 14px;
|
|
2457
|
-
background-color: ${e=>e.theme.colors.inputBg};
|
|
2458
|
-
color: ${e=>e.theme.colors.inputText};
|
|
2459
|
-
box-sizing: border-box;
|
|
2460
|
-
/* Allow vertical scrolling when content exceeds max height, keep horizontal hidden */
|
|
2461
|
-
overflow-x: hidden;
|
|
2462
|
-
overflow-y: auto;
|
|
2463
|
-
-webkit-overflow-scrolling: touch;
|
|
2464
|
-
|
|
2465
|
-
&:focus {
|
|
2466
|
-
outline: none;
|
|
2467
|
-
border-color: ${e=>e.theme.colors.primary};
|
|
2468
|
-
}
|
|
2469
|
-
`,z1=({value:e,onChange:t,onKeyDown:r,onPaste:i,onImagePaste:l,maxViewportHeight:a=.5,...u})=>{const c=R.useRef(null);R.useEffect(()=>{const x=c.current;if(!x)return;const m=()=>{x.style.height="auto";const w=x.scrollHeight,k=a*window.innerHeight,S=Math.min(w,k);x.style.height=`${S}px`,x.style.overflowY=w<=k?"hidden":"auto"};m();const v=()=>m();return window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[e,a]);const f=x=>{t(x.target.value)},p=x=>{var v;const m=(v=x.clipboardData)==null?void 0:v.items;if(m){for(let w=0;w<m.length;w++)if(m[w].type.indexOf("image")!==-1){x.preventDefault();const k=m[w].getAsFile();if(k){const S=new File([k],`pasted-image-${Date.now()}.png`,{type:"image/png"});l==null||l(S)}break}}i==null||i(x)};return h.jsx(g5,{children:h.jsx(x5,{ref:c,value:e,onChange:f,onKeyDown:r,onPaste:p,...u})})},y5=5*1024*1024,$x=["image/jpeg","image/png","image/gif","image/webp"],Ix=5,_1=({images:e,onImagesChange:t,error:r,setError:i,fileInputRef:l})=>{const a=c=>{const p=Array.from(c.target.files||[]).filter(x=>$x.includes(x.type)?x.size>y5?(i(`File too large: ${x.name}. Maximum size is 5MB.`),!1):!0:(i(`Invalid file type: ${x.name}. Allowed types are JPEG, PNG, GIF, and WebP.`),!1));if(p.length+e.length>Ix){i(`Too many images. Maximum ${Ix} images allowed.`);return}t([...e,...p]),i(null)},u=c=>{const f=e.filter((p,x)=>x!==c);t(f)};return h.jsxs(v5,{children:[r&&h.jsx(w5,{children:r}),h.jsx(k5,{children:e.map((c,f)=>h.jsxs(b5,{children:[h.jsx("img",{src:URL.createObjectURL(c),alt:`Uploaded ${f+1}`}),h.jsx(S5,{onClick:()=>u(f),children:"×"})]},f))}),h.jsx("input",{type:"file",ref:l,style:{display:"none"},onChange:a,accept:$x.join(","),multiple:!0})]})},v5=C.div`
|
|
2470
|
-
margin-bottom: 8px;
|
|
2471
|
-
`,w5=C.div`
|
|
2472
|
-
color: ${e=>e.theme.colors.error};
|
|
2473
|
-
font-size: 14px;
|
|
2474
|
-
margin-bottom: 8px;
|
|
2475
|
-
`,k5=C.div`
|
|
2476
|
-
display: flex;
|
|
2477
|
-
flex-wrap: wrap;
|
|
2478
|
-
gap: 8px;
|
|
2479
|
-
`,b5=C.div`
|
|
2480
|
-
position: relative;
|
|
2481
|
-
width: 60px;
|
|
2482
|
-
height: 60px;
|
|
2483
|
-
|
|
2484
|
-
img {
|
|
2485
|
-
width: 100%;
|
|
2486
|
-
height: 100%;
|
|
2487
|
-
object-fit: cover;
|
|
2488
|
-
border-radius: 4px;
|
|
2489
|
-
}
|
|
2490
|
-
`,S5=C.button`
|
|
2491
|
-
position: absolute;
|
|
2492
|
-
top: -8px;
|
|
2493
|
-
right: -8px;
|
|
2494
|
-
background-color: ${e=>e.theme.colors.error};
|
|
2495
|
-
color: white;
|
|
2496
|
-
border: none;
|
|
2497
|
-
border-radius: 50%;
|
|
2498
|
-
width: 20px;
|
|
2499
|
-
height: 20px;
|
|
2500
|
-
font-size: 14px;
|
|
2501
|
-
line-height: 1;
|
|
2502
|
-
cursor: pointer;
|
|
2503
|
-
display: flex;
|
|
2504
|
-
align-items: center;
|
|
2505
|
-
justify-content: center;
|
|
2506
|
-
|
|
2507
|
-
&:hover {
|
|
2508
|
-
background-color: ${e=>e.theme.colors.errorHover};
|
|
2509
|
-
}
|
|
2510
|
-
`,C5={sendMessage:"Send Message ✉️",updateFile:"Update File 📝",createFile:"Create File 📄",confirmCodeGeneration:"Generate Code 🚀",runProjectCommand:"Run Command ⚙️",runBashCommand:"Run Bash Command 셸",searchCode:"Search Code 🔍",requestFilesContent:"Request Files 📂",endConversation:"End Conversation 👋",compoundAction:"Compound Action 🧱",runContainerTask:"Run Container Task 🐳",requestPermissions:"Request Permissions 🔒",performAnalysis:"Perform Analysis 🔬",contextOptimization:"Optimize Context ✨",genaicodeHelp:"GenAIcode Help ❓",conversationGraph:"Conversation Graph 📊",generateImage:"Generate Image 🎨",readExternalFiles:"Read External Files 📖",exploreExternalDirectories:"Explore External Dirs 🗺️",removeFilesFromContext:"Remove Files from Context 🗑️",requestGitContext:"Request Git Context 🐙",webSearch:"Web Search 🌐",codeGeneration:"Code Generation 💻",contextCompression:"Compress Context 📦",pullAppContext:"Pull App Context 🔽",pushAppContext:"Push App Context 🔼",requestFilesFragments:"Request Files Fragments 🧩",pullConsoleLogs:"Pull Console Logs 🖥️",structuredQuestion:"Structured Question ❓",codeExecution:"Code Execution ▶️"},E5=e=>C5[e]||e,Od=({value:e,onChange:t,disabled:r})=>{const[i,l]=R.useState([]),[a,u]=R.useState(!0),[c,f]=R.useState(null);R.useEffect(()=>{(async()=>{try{u(!0);const m=await BC();l(m),f(null)}catch(m){f("Failed to load action types."),console.error(m)}finally{u(!1)}})()},[]);const p=x=>{t(x.target.value)};return h.jsxs(j5,{children:[h.jsxs(T5,{id:"promptActionType",value:e||"",onChange:p,disabled:r||a||c!==null,children:[h.jsx("option",{value:"",children:"Auto mode"}),i.map(x=>h.jsx("option",{value:x,children:E5(x)},x))]}),a&&h.jsx(R5,{children:"Loading actions..."}),c&&h.jsx($5,{children:c})]})},j5=C.div`
|
|
2511
|
-
display: flex;
|
|
2512
|
-
flex-direction: column;
|
|
2513
|
-
gap: 4px;
|
|
2514
|
-
`,T5=C.select`
|
|
2515
|
-
padding: 8px;
|
|
2516
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
2517
|
-
border-radius: 4px;
|
|
2518
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
2519
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
2520
|
-
font-size: 14px;
|
|
2521
|
-
max-width: 200px;
|
|
2522
|
-
|
|
2523
|
-
&:disabled {
|
|
2524
|
-
background-color: ${({theme:e})=>e.colors.disabled};
|
|
2525
|
-
cursor: not-allowed;
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
option {
|
|
2529
|
-
padding: 4px;
|
|
2530
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
2531
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
2532
|
-
}
|
|
2533
|
-
`,R5=C.div`
|
|
2534
|
-
color: ${({theme:e})=>e.colors.text};
|
|
2535
|
-
font-size: 14px;
|
|
2536
|
-
font-style: italic;
|
|
2537
|
-
`,$5=C.div`
|
|
2538
|
-
color: ${({theme:e})=>e.colors.error};
|
|
2539
|
-
font-size: 14px;
|
|
2540
|
-
`,I5=C.form`
|
|
2541
|
-
display: flex;
|
|
2542
|
-
flex-direction: column;
|
|
2543
|
-
gap: 16px;
|
|
2544
|
-
padding: 24px;
|
|
2545
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
2546
|
-
border-radius: 8px;
|
|
2547
|
-
background-color: ${({theme:e})=>e.colors.background};
|
|
2548
|
-
max-width: 70%;
|
|
2549
|
-
width: 100%;
|
|
2550
|
-
box-sizing: border-box;
|
|
2551
|
-
margin-top: 10px;
|
|
2552
|
-
margin-bottom: 10px;
|
|
2553
|
-
`,N5=C.h3`
|
|
2554
|
-
margin: 0 0 8px 0;
|
|
2555
|
-
color: ${({theme:e})=>e.colors.text};
|
|
2556
|
-
font-size: 1.5rem;
|
|
2557
|
-
font-weight: 600;
|
|
2558
|
-
`,P5=C.p`
|
|
2559
|
-
margin: 0 0 16px 0;
|
|
2560
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
2561
|
-
font-size: 0.95rem;
|
|
2562
|
-
line-height: 1.5;
|
|
2563
|
-
`,Fa=C.div`
|
|
2564
|
-
display: flex;
|
|
2565
|
-
flex-direction: column;
|
|
2566
|
-
gap: 8px;
|
|
2567
|
-
`,Oa=C.label`
|
|
2568
|
-
font-weight: 600;
|
|
2569
|
-
color: ${({theme:e})=>e.colors.text};
|
|
2570
|
-
font-size: 0.95rem;
|
|
2571
|
-
`,A5=C.input`
|
|
2572
|
-
padding: 10px 12px;
|
|
2573
|
-
border: 1px solid ${({theme:e})=>e.colors.inputBorder};
|
|
2574
|
-
border-radius: 4px;
|
|
2575
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
2576
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
2577
|
-
font-size: 0.95rem;
|
|
2578
|
-
font-family: inherit;
|
|
2579
|
-
transition:
|
|
2580
|
-
border-color 0.2s ease,
|
|
2581
|
-
box-shadow 0.2s ease;
|
|
2582
|
-
|
|
2583
|
-
&:focus {
|
|
2584
|
-
outline: none;
|
|
2585
|
-
border-color: ${({theme:e})=>e.colors.primary};
|
|
2586
|
-
box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
|
-
&:disabled {
|
|
2590
|
-
background-color: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
2591
|
-
color: ${({theme:e})=>e.colors.disabled};
|
|
2592
|
-
cursor: not-allowed;
|
|
2593
|
-
}
|
|
2594
|
-
`,L5=C.textarea`
|
|
2595
|
-
padding: 10px 12px;
|
|
2596
|
-
border: 1px solid ${({theme:e})=>e.colors.inputBorder};
|
|
2597
|
-
border-radius: 4px;
|
|
2598
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
2599
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
2600
|
-
font-size: 0.95rem;
|
|
2601
|
-
font-family: inherit;
|
|
2602
|
-
resize: vertical;
|
|
2603
|
-
min-height: 100px;
|
|
2604
|
-
line-height: 1.5;
|
|
2605
|
-
transition:
|
|
2606
|
-
border-color 0.2s ease,
|
|
2607
|
-
box-shadow 0.2s ease;
|
|
2608
|
-
|
|
2609
|
-
&:focus {
|
|
2610
|
-
outline: none;
|
|
2611
|
-
border-color: ${({theme:e})=>e.colors.primary};
|
|
2612
|
-
box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
|
|
2613
|
-
}
|
|
2614
|
-
|
|
2615
|
-
&:disabled {
|
|
2616
|
-
background-color: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
2617
|
-
color: ${({theme:e})=>e.colors.disabled};
|
|
2618
|
-
cursor: not-allowed;
|
|
2619
|
-
}
|
|
2620
|
-
`,z5=C.select`
|
|
2621
|
-
padding: 10px 12px;
|
|
2622
|
-
border: 1px solid ${({theme:e})=>e.colors.inputBorder};
|
|
2623
|
-
border-radius: 4px;
|
|
2624
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
2625
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
2626
|
-
font-size: 0.95rem;
|
|
2627
|
-
font-family: inherit;
|
|
2628
|
-
cursor: pointer;
|
|
2629
|
-
transition:
|
|
2630
|
-
border-color 0.2s ease,
|
|
2631
|
-
box-shadow 0.2s ease;
|
|
2632
|
-
|
|
2633
|
-
&:focus {
|
|
2634
|
-
outline: none;
|
|
2635
|
-
border-color: ${({theme:e})=>e.colors.primary};
|
|
2636
|
-
box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
|
|
2637
|
-
}
|
|
2638
|
-
|
|
2639
|
-
&:disabled {
|
|
2640
|
-
background-color: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
2641
|
-
color: ${({theme:e})=>e.colors.disabled};
|
|
2642
|
-
cursor: not-allowed;
|
|
2643
|
-
}
|
|
2644
|
-
`,F1=C.div`
|
|
2645
|
-
display: flex;
|
|
2646
|
-
flex-direction: column;
|
|
2647
|
-
gap: 10px;
|
|
2648
|
-
`,O1=C.label`
|
|
2649
|
-
display: flex;
|
|
2650
|
-
align-items: center;
|
|
2651
|
-
gap: 10px;
|
|
2652
|
-
cursor: pointer;
|
|
2653
|
-
color: ${({theme:e})=>e.colors.text};
|
|
2654
|
-
font-size: 0.95rem;
|
|
2655
|
-
transition: color 0.2s ease;
|
|
2656
|
-
|
|
2657
|
-
&:hover {
|
|
2658
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
2659
|
-
}
|
|
2660
|
-
|
|
2661
|
-
input[type='checkbox'],
|
|
2662
|
-
input[type='radio'] {
|
|
2663
|
-
cursor: pointer;
|
|
2664
|
-
width: 16px;
|
|
2665
|
-
height: 16px;
|
|
2666
|
-
}
|
|
2667
|
-
`,_5=C.div`
|
|
2668
|
-
display: flex;
|
|
2669
|
-
justify-content: flex-end;
|
|
2670
|
-
gap: 12px;
|
|
2671
|
-
margin-top: 8px;
|
|
2672
|
-
`,Nx=C.button`
|
|
2673
|
-
padding: 10px 20px;
|
|
2674
|
-
border: none;
|
|
2675
|
-
border-radius: 4px;
|
|
2676
|
-
font-size: 0.95rem;
|
|
2677
|
-
font-weight: 500;
|
|
2678
|
-
cursor: pointer;
|
|
2679
|
-
transition:
|
|
2680
|
-
background-color 0.2s ease,
|
|
2681
|
-
transform 0.1s ease;
|
|
2682
|
-
font-family: inherit;
|
|
2683
|
-
|
|
2684
|
-
&:active {
|
|
2685
|
-
transform: translateY(1px);
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
|
-
&:disabled {
|
|
2689
|
-
background-color: ${({theme:e})=>e.colors.disabled};
|
|
2690
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
2691
|
-
cursor: not-allowed;
|
|
2692
|
-
opacity: 0.6;
|
|
2693
|
-
}
|
|
2694
|
-
|
|
2695
|
-
/* Default/Primary button */
|
|
2696
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
2697
|
-
color: white;
|
|
2698
|
-
|
|
2699
|
-
&:hover:not(:disabled) {
|
|
2700
|
-
background-color: ${({theme:e})=>e.colors.primaryHover};
|
|
2701
|
-
}
|
|
2702
|
-
|
|
2703
|
-
/* Secondary button */
|
|
2704
|
-
&[data-secondary='true'] {
|
|
2705
|
-
background-color: ${({theme:e})=>e.colors.secondary};
|
|
2706
|
-
color: white;
|
|
2707
|
-
|
|
2708
|
-
&:hover:not(:disabled) {
|
|
2709
|
-
background-color: ${({theme:e})=>e.colors.secondaryHover};
|
|
2710
|
-
}
|
|
2711
|
-
}
|
|
2712
|
-
|
|
2713
|
-
/* Error/Cancel button */
|
|
2714
|
-
&[data-error='true'] {
|
|
2715
|
-
background-color: ${({theme:e})=>e.colors.error};
|
|
2716
|
-
color: white;
|
|
2717
|
-
|
|
2718
|
-
&:hover:not(:disabled) {
|
|
2719
|
-
background-color: ${({theme:e})=>e.colors.errorHover};
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
`,Da=C.p`
|
|
2723
|
-
color: ${({theme:e})=>e.colors.error};
|
|
2724
|
-
font-size: 0.85rem;
|
|
2725
|
-
margin: 4px 0 0 0;
|
|
2726
|
-
font-weight: 500;
|
|
2727
|
-
`,F5=({field:e,value:t,onChange:r,error:i})=>{const{id:l,label:a,type:u,required:c,placeholder:f}=e,p=()=>{const x={id:l,name:l,value:t||"",onChange:m=>r(m.target.value),placeholder:f,required:c};switch(u){case"textarea":return h.jsx(L5,{...x,rows:4});case"number":case"email":case"text":default:return h.jsx(A5,{type:u,...x})}};return h.jsxs(Fa,{children:[h.jsxs(Oa,{htmlFor:l,children:[a,c&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),p(),i&&h.jsx(Da,{children:i})]})},O5=({field:e,value:t,onChange:r,error:i})=>{var a;const l=u=>{const c=t.includes(u)?t.filter(f=>f!==u):[...t,u];r(c)};return h.jsxs(Fa,{children:[h.jsxs(Oa,{children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsx(F1,{children:(a=e.options)==null?void 0:a.map(u=>h.jsxs(O1,{children:[h.jsx("input",{type:"checkbox",value:u.value,checked:t.includes(u.value),onChange:()=>l(u.value)}),u.label]},u.value))}),i&&h.jsx(Da,{children:i})]})},D5=({field:e,value:t,onChange:r,error:i})=>{var l;return h.jsxs(Fa,{children:[h.jsxs(Oa,{children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsx(F1,{children:(l=e.options)==null?void 0:l.map(a=>h.jsxs(O1,{children:[h.jsx("input",{type:"radio",id:`${e.id}-${a.value}`,name:e.id,value:a.value,checked:t===a.value,onChange:()=>r(a.value)}),a.label]},a.value))}),i&&h.jsx(Da,{children:i})]})},M5=({field:e,value:t,onChange:r,error:i})=>{var l;return h.jsxs(Fa,{children:[h.jsxs(Oa,{htmlFor:e.id,children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsxs(z5,{id:e.id,value:t||"",onChange:a=>r(a.target.value),required:e.required,children:[e.placeholder&&h.jsx("option",{value:"",children:e.placeholder}),(l=e.options)==null?void 0:l.map(a=>h.jsx("option",{value:a.value,children:a.label},a.value))]}),i&&h.jsx(Da,{children:i})]})},B5=({form:e,onSubmit:t,onCancel:r})=>{const[i,l]=R.useState(()=>{const m={};return e.fields.forEach(v=>{m[v.id]=v.defaultValue??""}),m}),[a,u]=R.useState({}),c=(m,v)=>{l(w=>({...w,[m]:v})),a[m]&&u(w=>{const k={...w};return delete k[m],k})},f=()=>{const m={};return e.fields.forEach(v=>{v.required&&(!i[v.id]||Array.isArray(i[v.id])&&i[v.id].length===0)&&(m[v.id]=`${v.label} is required.`)}),u(m),Object.keys(m).length===0},p=m=>{m.preventDefault(),f()&&t(i)},x=m=>{switch(m.type){case"checkbox":return h.jsx(O5,{field:m,value:i[m.id]||[],onChange:v=>c(m.id,v),error:a[m.id]},m.id);case"radio":return h.jsx(D5,{field:m,value:i[m.id]||"",onChange:v=>c(m.id,v),error:a[m.id]},m.id);case"select":return h.jsx(M5,{field:m,value:i[m.id]||"",onChange:v=>c(m.id,v),error:a[m.id]},m.id);case"text":case"textarea":case"number":case"email":default:return h.jsx(F5,{field:m,value:i[m.id]||"",onChange:v=>c(m.id,v),error:a[m.id]},m.id)}};return h.jsxs(I5,{onSubmit:p,children:[e.title&&h.jsx(N5,{children:e.title}),e.description&&h.jsx(P5,{children:e.description}),e.fields.map(x),h.jsxs(_5,{children:[h.jsx(Nx,{type:"submit",children:e.submitLabel||"Submit"}),e.cancelLabel&&h.jsx(Nx,{type:"button",onClick:r,"data-secondary":"true",children:e.cancelLabel})]})]})},Px=({onSubmit:e,onInterrupt:t,onPauseResume:r,question:i,codegenOptions:l,executionStatus:a})=>{var de,Q,fe,T,z,q,$;const[u,c]=R.useState(""),[f,p]=R.useState([]),[x,m]=R.useState(null),{suggestions:v}=R.useContext(ri)??{suggestions:[]},[w,k]=R.useState(null),[S,j]=R.useState(l.aiService),[E,I]=R.useState(void 0),[A,_]=R.useState(!1),O=R.useRef(null),P=R.useRef(null);R.useEffect(()=>{j(l.aiService)},[l.aiService]),R.useEffect(()=>{const ue=ge=>{O.current&&!O.current.contains(ge.target)&&_(!1)};return document.addEventListener("mousedown",ue),()=>{document.removeEventListener("mousedown",ue)}},[O]);const V=ue=>{p(ge=>[...ge,ue]),m(null)},K=async ue=>{if(ue.preventDefault(),(u.trim()||f.length>0)&&i)try{await e(u,f,void 0,S,E),c(""),p([]),k(null),m(null)}catch(ge){console.error("Error submitting answer:",ge),k("Failed to submit the answer. Please try again.")}},re=async ue=>{try{await e(u,f,ue,S,E),c(""),p([]),k(null),m(null)}catch(ge){console.error("Error submitting confirmation:",ge),k("Failed to submit the confirmation. Please try again.")}},D=async ue=>{try{await e("",void 0,void 0,S,E,{submitted:!0,values:ue}),k(null)}catch(ge){console.error("Error submitting structured question:",ge),k("Failed to submit the form. Please try again.")}},te=async()=>{try{await e("",void 0,void 0,S,E,{submitted:!1,values:{}}),k(null)}catch(ue){console.error("Error cancelling structured question:",ue),k("Failed to cancel the form. Please try again.")}},se=ue=>{c(ue),_(!1)},ee=()=>{_(!A)},X=()=>{var ue;(ue=P.current)==null||ue.click()},W=a==="paused",ce=!(i!=null&&i.confirmation)||!i.confirmation.confirmLabel&&!i.confirmation.declineLabel&&!i.confirmation.secret;return i!=null&&i.structuredForm?h.jsxs(h.Fragment,{children:[h.jsx(B5,{form:i.structuredForm,onSubmit:D,onCancel:te}),w&&h.jsx(Lx,{children:w})]}):h.jsxs(U5,{children:[i?h.jsxs(V5,{onSubmit:K,children:[h.jsx("p",{children:i.text}),(de=i.confirmation)!=null&&de.secret?h.jsx(H5,{type:"password",value:u,onChange:ue=>c(ue.target.value),placeholder:"Enter secret",autoFocus:!0}):((Q=i.confirmation)==null?void 0:Q.includeAnswer)!==!1&&h.jsxs(h.Fragment,{children:[h.jsx(z1,{value:u,onChange:c,placeholder:"Enter your answer here or select a suggestion",maxViewportHeight:.3,onImagePaste:V}),h.jsx(_1,{images:f,onImagesChange:p,error:x,setError:m,fileInputRef:P})]}),(fe=i.confirmation)!=null&&fe.secret?h.jsxs(Vs,{children:[h.jsx(Ax,{type:"submit",disabled:!u.trim(),children:"Submit"}),h.jsx(nd,{onClick:()=>re(!1),"data-secondary":"true",children:"Decline"}),h.jsx(Hs,{onClick:t,children:"Interrupt"})]}):ce?h.jsxs(Vs,{children:[h.jsx(Ax,{type:"submit",disabled:!u.trim()&&f.length===0,children:"Submit Answer"}),h.jsx(Q5,{type:"button",onClick:X,title:"Upload Images",children:h.jsx(Jy,{})}),h.jsx(ua,{value:S,onChange:j,disabled:!1}),((T=i.confirmation)==null?void 0:T.promptActionType)&&h.jsx(Od,{value:E,onChange:I,disabled:!1}),v&&v.length>0&&h.jsxs(W5,{ref:O,children:[h.jsxs(q5,{type:"button",onClick:ee,children:[v[0],v.length>1&&h.jsx(G5,{children:" ▼"})]}),A&&h.jsx(J5,{children:v.map((ue,ge)=>h.jsx(K5,{onClick:()=>se(ue),children:ue},ge))})]}),h.jsx(Hs,{onClick:t,children:"Interrupt"})]}):h.jsxs(Vs,{children:[h.jsx(nd,{onClick:()=>re(!0),children:(z=i.confirmation)==null?void 0:z.confirmLabel}),h.jsx(nd,{onClick:()=>re(!1),"data-secondary":"true",children:(q=i.confirmation)==null?void 0:q.declineLabel}),h.jsx(ua,{value:S,onChange:j,disabled:!1}),(($=i.confirmation)==null?void 0:$.promptActionType)&&h.jsx(Od,{value:E,onChange:I,disabled:!1}),h.jsx(Hs,{onClick:t,children:"Interrupt"})]})]}):h.jsxs(Vs,{children:[h.jsx(Y5,{onClick:r,isPaused:W,children:W?"Resume":"Pause"}),h.jsx(Hs,{onClick:t,children:"Interrupt"})]}),w&&h.jsx(Lx,{children:w})]})},U5=C.div`
|
|
2728
|
-
background-color: ${({theme:e})=>e.colors.background};
|
|
2729
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
2730
|
-
border-radius: 8px;
|
|
2731
|
-
padding: 15px;
|
|
2732
|
-
margin-top: 10px;
|
|
2733
|
-
margin-bottom: 10px;
|
|
2734
|
-
max-width: 70%;
|
|
2735
|
-
width: 100%;
|
|
2736
|
-
box-sizing: border-box;
|
|
2737
|
-
`,V5=C.form`
|
|
2738
|
-
display: flex;
|
|
2739
|
-
flex-direction: column;
|
|
2740
|
-
|
|
2741
|
-
> p {
|
|
2742
|
-
margin-top: 0;
|
|
2743
|
-
}
|
|
2744
|
-
`,H5=C.input`
|
|
2745
|
-
width: 100%;
|
|
2746
|
-
padding: 10px;
|
|
2747
|
-
border: 1px solid ${({theme:e})=>e.colors.inputBorder};
|
|
2748
|
-
border-radius: 4px;
|
|
2749
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
2750
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
2751
|
-
font-family: inherit;
|
|
2752
|
-
font-size: 14px;
|
|
2753
|
-
box-sizing: border-box;
|
|
2754
|
-
margin-bottom: 10px;
|
|
2755
|
-
`,W5=C.div`
|
|
2756
|
-
position: relative;
|
|
2757
|
-
display: inline-block;
|
|
2758
|
-
`,q5=C.button`
|
|
2759
|
-
background-color: ${e=>e.theme.colors.backgroundSecondary};
|
|
2760
|
-
color: ${e=>e.theme.colors.text};
|
|
2761
|
-
border: 1px solid ${e=>e.theme.colors.border};
|
|
2762
|
-
border-radius: 4px;
|
|
2763
|
-
padding: 8px 12px;
|
|
2764
|
-
font-size: 14px;
|
|
2765
|
-
cursor: pointer;
|
|
2766
|
-
transition: background-color 0.3s ease;
|
|
2767
|
-
display: flex;
|
|
2768
|
-
align-items: center;
|
|
2769
|
-
white-space: nowrap;
|
|
2770
|
-
overflow: hidden;
|
|
2771
|
-
text-overflow: ellipsis;
|
|
2772
|
-
max-width: 200px;
|
|
2773
|
-
|
|
2774
|
-
&:hover {
|
|
2775
|
-
background-color: ${e=>e.theme.colors.primary+"22"};
|
|
2776
|
-
}
|
|
2777
|
-
`,G5=C.span`
|
|
2778
|
-
margin-left: 5px;
|
|
2779
|
-
font-size: 0.8em;
|
|
2780
|
-
`,J5=C.div`
|
|
2781
|
-
position: absolute;
|
|
2782
|
-
bottom: 100%;
|
|
2783
|
-
left: 0;
|
|
2784
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
2785
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
2786
|
-
border-radius: 4px;
|
|
2787
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
2788
|
-
z-index: 1000;
|
|
2789
|
-
max-width: 300px;
|
|
2790
|
-
max-height: 200px;
|
|
2791
|
-
overflow-y: auto;
|
|
2792
|
-
margin-bottom: 5px;
|
|
2793
|
-
`,K5=C.div`
|
|
2794
|
-
padding: 8px 12px;
|
|
2795
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
2796
|
-
cursor: pointer;
|
|
2797
|
-
white-space: nowrap;
|
|
2798
|
-
overflow: hidden;
|
|
2799
|
-
text-overflow: ellipsis;
|
|
2800
|
-
|
|
2801
|
-
&:hover {
|
|
2802
|
-
background-color: ${({theme:e})=>e.colors.primary+"22"};
|
|
2803
|
-
}
|
|
2804
|
-
`,Vs=C.div`
|
|
2805
|
-
display: flex;
|
|
2806
|
-
align-items: center;
|
|
2807
|
-
justify-content: flex-start;
|
|
2808
|
-
gap: 10px;
|
|
2809
|
-
margin-top: 10px;
|
|
2810
|
-
flex-wrap: wrap;
|
|
2811
|
-
`,Sl=C.button`
|
|
2812
|
-
color: #ffffff;
|
|
2813
|
-
border: none;
|
|
2814
|
-
border-radius: 4px;
|
|
2815
|
-
padding: 8px 12px;
|
|
2816
|
-
font-size: 14px;
|
|
2817
|
-
cursor: pointer;
|
|
2818
|
-
transition: background-color 0.3s ease;
|
|
2819
|
-
|
|
2820
|
-
&:disabled {
|
|
2821
|
-
background-color: ${({theme:e})=>e.colors.disabled};
|
|
2822
|
-
cursor: not-allowed;
|
|
2823
|
-
}
|
|
2824
|
-
`,Ax=C(Sl)`
|
|
2825
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
2826
|
-
|
|
2827
|
-
&:hover:not(:disabled) {
|
|
2828
|
-
background-color: ${({theme:e})=>e.colors.primary}dd;
|
|
2829
|
-
}
|
|
2830
|
-
`,Q5=C(Sl)`
|
|
2831
|
-
background-color: ${({theme:e})=>e.colors.buttonBg}; /* Or choose another appropriate color */
|
|
2832
|
-
|
|
2833
|
-
&:hover {
|
|
2834
|
-
background-color: ${({theme:e})=>e.colors.buttonHoverBg}dd;
|
|
2835
|
-
}
|
|
2836
|
-
`,nd=C(Sl)`
|
|
2837
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
2838
|
-
&:hover {
|
|
2839
|
-
background-color: ${({theme:e})=>e.colors.primary}dd;
|
|
2840
|
-
}
|
|
2841
|
-
|
|
2842
|
-
&[data-secondary='true'] {
|
|
2843
|
-
background-color: ${({theme:e})=>e.colors.secondary};
|
|
2844
|
-
&:hover {
|
|
2845
|
-
background-color: ${({theme:e})=>e.colors.secondary}dd;
|
|
2846
|
-
}
|
|
2847
|
-
}
|
|
2848
|
-
`,Hs=C(Sl)`
|
|
2849
|
-
background-color: ${({theme:e})=>e.colors.error};
|
|
2850
|
-
margin-left: auto;
|
|
2851
|
-
|
|
2852
|
-
&:hover {
|
|
2853
|
-
background-color: ${({theme:e})=>e.colors.error}dd;
|
|
2854
|
-
}
|
|
2855
|
-
`,Y5=C(Sl)`
|
|
2856
|
-
background-color: ${({theme:e,isPaused:t})=>t?e.colors.warning:e.colors.info};
|
|
2857
|
-
|
|
2858
|
-
&:hover {
|
|
2859
|
-
background-color: ${({theme:e,isPaused:t})=>t?e.colors.warning:e.colors.info}dd;
|
|
2860
|
-
}
|
|
2861
|
-
`,Lx=C.p`
|
|
2862
|
-
color: ${({theme:e})=>e.colors.error};
|
|
2863
|
-
font-weight: bold;
|
|
2864
|
-
margin-top: 10px;
|
|
2865
|
-
margin-bottom: 0;
|
|
2866
|
-
`,X5=({isVisible:e,onInterrupt:t,onPauseResume:r,executionStatus:i})=>e?h.jsxs(eL,{children:[h.jsx(nL,{onClick:t,children:"Interrupt"}),h.jsxs(tL,{"data-execution-status":i,children:[h.jsx(rd,{}),h.jsx(rd,{}),h.jsx(rd,{})]}),h.jsx(D1,{onClick:r,children:i==="paused"?"Resume":"Pause"})]}):null,Z5=ti`
|
|
2867
|
-
0%, 80%, 100% {
|
|
2868
|
-
transform: scale(0);
|
|
2869
|
-
}
|
|
2870
|
-
40% {
|
|
2871
|
-
transform: scale(1.0);
|
|
2872
|
-
}
|
|
2873
|
-
`,eL=C.div`
|
|
2874
|
-
display: flex;
|
|
2875
|
-
flex-direction: row;
|
|
2876
|
-
align-items: center;
|
|
2877
|
-
justify-content: center;
|
|
2878
|
-
gap: 50px;
|
|
2879
|
-
padding: 10px;
|
|
2880
|
-
background-color: ${e=>e.theme.colors.background};
|
|
2881
|
-
border-top: 1px solid ${e=>e.theme.colors.border};
|
|
2882
|
-
`,tL=C.div`
|
|
2883
|
-
display: flex;
|
|
2884
|
-
align-items: center;
|
|
2885
|
-
justify-content: center;
|
|
2886
|
-
align-items: center;
|
|
2887
|
-
margin-bottom: 10px;
|
|
2888
|
-
`,rd=C.div`
|
|
2889
|
-
width: 10px;
|
|
2890
|
-
height: 10px;
|
|
2891
|
-
background-color: ${e=>e.theme.colors.primary};
|
|
2892
|
-
border-radius: 50%;
|
|
2893
|
-
margin: 0 5px;
|
|
2894
|
-
|
|
2895
|
-
[data-execution-status='executing'] & {
|
|
2896
|
-
animation: ${Z5} 1.4s infinite ease-in-out both;
|
|
2897
|
-
}
|
|
2898
|
-
|
|
2899
|
-
&:nth-child(1) {
|
|
2900
|
-
animation-delay: -0.32s;
|
|
2901
|
-
}
|
|
2902
|
-
|
|
2903
|
-
&:nth-child(2) {
|
|
2904
|
-
animation-delay: -0.16s;
|
|
2905
|
-
}
|
|
2906
|
-
`,D1=C.button`
|
|
2907
|
-
padding: 8px 16px;
|
|
2908
|
-
background-color: ${e=>e.theme.colors.primary};
|
|
2909
|
-
color: #ffffff;
|
|
2910
|
-
border: none;
|
|
2911
|
-
border-radius: 4px;
|
|
2912
|
-
cursor: pointer;
|
|
2913
|
-
font-size: 14px;
|
|
2914
|
-
font-weight: 600;
|
|
2915
|
-
transition: background-color 0.3s, transform 0.1s;
|
|
2916
|
-
|
|
2917
|
-
&:hover {
|
|
2918
|
-
background-color: ${e=>e.theme.colors.primaryHover};
|
|
2919
|
-
transform: translateY(-1px);
|
|
2920
|
-
}
|
|
2921
|
-
|
|
2922
|
-
&:active {
|
|
2923
|
-
transform: translateY(0);
|
|
2924
|
-
}
|
|
2925
|
-
`,nL=C(D1)`
|
|
2926
|
-
background-color: ${({theme:e})=>e.colors.error};
|
|
2927
|
-
|
|
2928
|
-
&:hover {
|
|
2929
|
-
background-color: ${({theme:e})=>e.colors.errorHover};
|
|
2930
|
-
}
|
|
2931
|
-
`,M1={info:"#3498db",warn:"#f39c12",error:"#e74c3c",success:"#2ecc71",debug:"#9b59b6"},rL=C.div`
|
|
2932
|
-
position: fixed;
|
|
2933
|
-
bottom: 70px;
|
|
2934
|
-
right: 20px;
|
|
2935
|
-
width: clamp(750px, 50vw, 750px);
|
|
2936
|
-
height: 55vh;
|
|
2937
|
-
background-color: ${({theme:e})=>e.colors.backgroundAlt||e.colors.overlayBackground};
|
|
2938
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
2939
|
-
border-radius: 8px;
|
|
2940
|
-
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
|
|
2941
|
-
z-index: 1001;
|
|
2942
|
-
padding: 12px;
|
|
2943
|
-
display: flex;
|
|
2944
|
-
flex-direction: column;
|
|
2945
|
-
font-family: 'Courier New', Courier, monospace;
|
|
2946
|
-
`,oL=C.div`
|
|
2947
|
-
display: flex;
|
|
2948
|
-
align-items: center;
|
|
2949
|
-
margin-bottom: 10px;
|
|
2950
|
-
padding-bottom: 10px;
|
|
2951
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
2952
|
-
color: ${({theme:e})=>e.colors.text};
|
|
2953
|
-
gap: 16px;
|
|
2954
|
-
flex-wrap: wrap;
|
|
2955
|
-
|
|
2956
|
-
h4 {
|
|
2957
|
-
margin: 0;
|
|
2958
|
-
font-size: 1.1em;
|
|
2959
|
-
}
|
|
2960
|
-
`,iL=C.button`
|
|
2961
|
-
background: none;
|
|
2962
|
-
border: none;
|
|
2963
|
-
color: ${({theme:e})=>e.colors.text};
|
|
2964
|
-
font-size: 1.2rem;
|
|
2965
|
-
cursor: pointer;
|
|
2966
|
-
padding: 0;
|
|
2967
|
-
line-height: 1;
|
|
2968
|
-
|
|
2969
|
-
&:hover {
|
|
2970
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
2971
|
-
}
|
|
2972
|
-
`,lL=C.div`
|
|
2973
|
-
display: flex;
|
|
2974
|
-
align-items: center;
|
|
2975
|
-
flex-wrap: wrap;
|
|
2976
|
-
gap: 8px;
|
|
2977
|
-
flex-grow: 1;
|
|
2978
|
-
justify-content: flex-end;
|
|
2979
|
-
`,sL=C.div`
|
|
2980
|
-
display: flex;
|
|
2981
|
-
gap: 5px;
|
|
2982
|
-
`,zx=C.button`
|
|
2983
|
-
background-color: ${({active:e,theme:t})=>e?t.colors.primary:"transparent"};
|
|
2984
|
-
color: ${({active:e,theme:t})=>e?"white":t.colors.text};
|
|
2985
|
-
border: 1px solid ${({active:e,theme:t})=>e?t.colors.primary:t.colors.border};
|
|
2986
|
-
border-radius: 6px;
|
|
2987
|
-
padding: 6px 12px;
|
|
2988
|
-
cursor: pointer;
|
|
2989
|
-
font-size: 0.9rem;
|
|
2990
|
-
font-weight: 500;
|
|
2991
|
-
transition: all 0.2s ease-in-out;
|
|
2992
|
-
|
|
2993
|
-
&:hover:not(:disabled) {
|
|
2994
|
-
background-color: ${({theme:e})=>e.colors.secondary};
|
|
2995
|
-
border-color: ${({theme:e})=>e.colors.secondary};
|
|
2996
|
-
color: white;
|
|
2997
|
-
}
|
|
2998
|
-
margin-left: auto; /* Pushes it to the right */
|
|
2999
|
-
`,od=C.button`
|
|
3000
|
-
background-color: ${({active:e,theme:t})=>e?t.colors.primary:t.colors.secondary};
|
|
3001
|
-
color: ${({active:e,theme:t})=>e?"white":t.colors.buttonText};
|
|
3002
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
3003
|
-
border-radius: 6px;
|
|
3004
|
-
padding: 6px 10px;
|
|
3005
|
-
cursor: pointer;
|
|
3006
|
-
font-size: 0.85rem;
|
|
3007
|
-
transition: opacity 0.2s ease;
|
|
3008
|
-
|
|
3009
|
-
&:hover {
|
|
3010
|
-
opacity: 0.9;
|
|
3011
|
-
}
|
|
3012
|
-
|
|
3013
|
-
&:disabled {
|
|
3014
|
-
opacity: 0.6;
|
|
3015
|
-
cursor: not-allowed;
|
|
3016
|
-
}
|
|
3017
|
-
|
|
3018
|
-
&:focus-visible {
|
|
3019
|
-
outline: 2px solid ${({theme:e})=>e.colors.primary};
|
|
3020
|
-
outline-offset: 2px;
|
|
3021
|
-
}
|
|
3022
|
-
`,aL=C.div`
|
|
3023
|
-
flex-grow: 1;
|
|
3024
|
-
overflow-y: auto;
|
|
3025
|
-
background-color: ${({theme:e})=>e.colors.inputBackground};
|
|
3026
|
-
padding: 10px;
|
|
3027
|
-
border-radius: 6px;
|
|
3028
|
-
color: ${({theme:e})=>e.colors.text};
|
|
3029
|
-
font-size: 0.9em;
|
|
3030
|
-
white-space: pre-wrap;
|
|
3031
|
-
word-wrap: break-word;
|
|
3032
|
-
|
|
3033
|
-
&::-webkit-scrollbar {
|
|
3034
|
-
width: 8px;
|
|
3035
|
-
}
|
|
3036
|
-
&::-webkit-scrollbar-track {
|
|
3037
|
-
background: ${({theme:e})=>e.colors.background};
|
|
3038
|
-
}
|
|
3039
|
-
&::-webkit-scrollbar-thumb {
|
|
3040
|
-
background-color: ${({theme:e})=>e.colors.border};
|
|
3041
|
-
border-radius: 4px;
|
|
3042
|
-
}
|
|
3043
|
-
`,uL=C.div`
|
|
3044
|
-
display: grid;
|
|
3045
|
-
grid-template-columns: 80px 70px 90px 1fr;
|
|
3046
|
-
align-items: start;
|
|
3047
|
-
gap: 8px;
|
|
3048
|
-
padding-bottom: 6px;
|
|
3049
|
-
margin-bottom: 6px;
|
|
3050
|
-
border-bottom: 1px dashed ${({theme:e})=>e.colors.border};
|
|
3051
|
-
line-height: 1.4;
|
|
3052
|
-
|
|
3053
|
-
.timestamp {
|
|
3054
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
3055
|
-
font-size: 0.8em;
|
|
3056
|
-
white-space: nowrap;
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
|
-
.source {
|
|
3060
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
3061
|
-
font-style: italic;
|
|
3062
|
-
word-break: break-word;
|
|
3063
|
-
}
|
|
3064
|
-
|
|
3065
|
-
@media (max-width: 520px) {
|
|
3066
|
-
grid-template-columns: 110px 1fr;
|
|
3067
|
-
.source {
|
|
3068
|
-
grid-column: 2;
|
|
3069
|
-
}
|
|
3070
|
-
}
|
|
3071
|
-
`,cL=C.span`
|
|
3072
|
-
background-color: ${({level:e})=>M1[e]||"#7f8c8d"};
|
|
3073
|
-
color: white;
|
|
3074
|
-
padding: 2px 6px;
|
|
3075
|
-
border-radius: 4px;
|
|
3076
|
-
font-size: 0.8em;
|
|
3077
|
-
font-weight: bold;
|
|
3078
|
-
text-transform: uppercase;
|
|
3079
|
-
flex-shrink: 0;
|
|
3080
|
-
justify-self: start;
|
|
3081
|
-
`,dL=C.div`
|
|
3082
|
-
word-wrap: break-word;
|
|
3083
|
-
white-space: pre-wrap;
|
|
3084
|
-
`,fL=C.button`
|
|
3085
|
-
background: none;
|
|
3086
|
-
border: none;
|
|
3087
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
3088
|
-
cursor: pointer;
|
|
3089
|
-
font-size: 0.8rem;
|
|
3090
|
-
margin-left: 8px;
|
|
3091
|
-
padding: 0;
|
|
3092
|
-
text-decoration: underline;
|
|
3093
|
-
|
|
3094
|
-
&:hover {
|
|
3095
|
-
opacity: 0.8;
|
|
3096
|
-
}
|
|
3097
|
-
`,pL=C.div`
|
|
3098
|
-
grid-column: 1 / -1;
|
|
3099
|
-
background-color: ${({theme:e})=>e.colors.background};
|
|
3100
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
3101
|
-
border-radius: 6px;
|
|
3102
|
-
margin-top: 8px;
|
|
3103
|
-
padding: 5px;
|
|
3104
|
-
`,hL=C.pre`
|
|
3105
|
-
margin: 0;
|
|
3106
|
-
padding: 8px;
|
|
3107
|
-
font-family: 'Courier New', Courier, monospace;
|
|
3108
|
-
font-size: 0.9em;
|
|
3109
|
-
white-space: pre-wrap;
|
|
3110
|
-
word-wrap: break-word;
|
|
3111
|
-
max-height: 220px;
|
|
3112
|
-
overflow-y: auto;
|
|
3113
|
-
background-color: ${({theme:e})=>e.colors.inputBackground};
|
|
3114
|
-
border-radius: 3px;
|
|
3115
|
-
|
|
3116
|
-
&::-webkit-scrollbar {
|
|
3117
|
-
width: 8px;
|
|
3118
|
-
}
|
|
3119
|
-
&::-webkit-scrollbar-track {
|
|
3120
|
-
background: ${({theme:e})=>e.colors.background};
|
|
3121
|
-
}
|
|
3122
|
-
&::-webkit-scrollbar-thumb {
|
|
3123
|
-
background-color: ${({theme:e})=>e.colors.border};
|
|
3124
|
-
border-radius: 4px;
|
|
3125
|
-
}
|
|
3126
|
-
`,mL=C(si)`
|
|
3127
|
-
align-items: center;
|
|
3128
|
-
`,gL=C(T1).attrs({as:"button"})`
|
|
3129
|
-
display: flex;
|
|
3130
|
-
align-items: center;
|
|
3131
|
-
gap: 8px;
|
|
3132
|
-
width: 100%;
|
|
3133
|
-
cursor: pointer;
|
|
3134
|
-
border: 1px solid transparent;
|
|
3135
|
-
text-align: left;
|
|
3136
|
-
&:hover {
|
|
3137
|
-
border-color: ${({theme:e})=>e.colors.border};
|
|
3138
|
-
}
|
|
3139
|
-
position: relative;
|
|
3140
|
-
outline: none;
|
|
3141
|
-
${({flashing:e})=>e&&wt`
|
|
3142
|
-
@keyframes flash {
|
|
3143
|
-
0%,
|
|
3144
|
-
100% {
|
|
3145
|
-
box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
|
|
3146
|
-
}
|
|
3147
|
-
50% {
|
|
3148
|
-
box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.35);
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
|
-
animation: flash 1.2s ease-in-out infinite;
|
|
3152
|
-
`}
|
|
3153
|
-
`,xL=C.span`
|
|
3154
|
-
background-color: ${({level:e})=>M1[e]||"#7f8c8d"};
|
|
3155
|
-
color: #fff;
|
|
3156
|
-
padding: 2px 6px;
|
|
3157
|
-
border-radius: 6px;
|
|
3158
|
-
font-size: 0.75em;
|
|
3159
|
-
text-transform: uppercase;
|
|
3160
|
-
flex-shrink: 0;
|
|
3161
|
-
`,yL=C.span`
|
|
3162
|
-
flex: 1;
|
|
3163
|
-
min-width: 0;
|
|
3164
|
-
white-space: nowrap;
|
|
3165
|
-
overflow: hidden;
|
|
3166
|
-
text-overflow: ellipsis;
|
|
3167
|
-
color: ${({theme:e})=>e.colors.text};
|
|
3168
|
-
`,vL=C.span`
|
|
3169
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
3170
|
-
font-size: 0.75em;
|
|
3171
|
-
flex-shrink: 0;
|
|
3172
|
-
`,wL=C.span`
|
|
3173
|
-
width: 8px;
|
|
3174
|
-
height: 8px;
|
|
3175
|
-
border-radius: 50%;
|
|
3176
|
-
background-color: ${({theme:e})=>e.colors.error};
|
|
3177
|
-
flex-shrink: 0;
|
|
3178
|
-
`,kL=C.button`
|
|
3179
|
-
background-color: ${({theme:e})=>e.colors.buttonBg};
|
|
3180
|
-
color: ${({theme:e})=>e.colors.buttonText};
|
|
3181
|
-
border: none;
|
|
3182
|
-
border-radius: 50%;
|
|
3183
|
-
width: 24px;
|
|
3184
|
-
height: 24px;
|
|
3185
|
-
font-size: 14px;
|
|
3186
|
-
line-height: 24px;
|
|
3187
|
-
text-align: center;
|
|
3188
|
-
cursor: pointer;
|
|
3189
|
-
margin-right: 8px;
|
|
3190
|
-
flex-shrink: 0;
|
|
3191
|
-
display: flex;
|
|
3192
|
-
align-items: center;
|
|
3193
|
-
justify-content: center;
|
|
3194
|
-
|
|
3195
|
-
&:hover {
|
|
3196
|
-
background-color: ${({theme:e})=>e.colors.buttonHoverBg};
|
|
3197
|
-
}
|
|
3198
|
-
`,bL=C(kL)`
|
|
3199
|
-
background-color: ${({theme:e})=>e.colors.error||"#dc3545"};
|
|
3200
|
-
color: white;
|
|
3201
|
-
|
|
3202
|
-
&:hover {
|
|
3203
|
-
background-color: ${({theme:e})=>e.colors.errorHover||"#c82333"};
|
|
3204
|
-
}
|
|
3205
|
-
`,SL=({iterationId:e})=>{const{terminalEvents:t,isTerminalOpen:r,toggleTerminal:i}=cn(),l=R.useRef({}),a=R.useMemo(()=>!e||!t[e]?[]:t[e],[e,t]),u=a[a.length-1];if(R.useEffect(()=>{r&&e&&u&&(l.current[e]=u.id)},[r,e,u]),!e||a.length===0)return null;const c=!r&&u&&l.current[e]!==u.id,f=()=>{i(),e&&u&&(l.current[e]=u.id)},p=async x=>{x.stopPropagation();try{await Ay()}catch(m){console.error("Failed to interrupt command:",m),alert(`Failed to interrupt command: ${m instanceof Error?m.message:"Unknown error"}`)}};return h.jsxs(mL,{"data-type":"assistant",children:[h.jsx(bL,{onClick:p,title:"Interrupt current command",children:"⏹"}),u&&h.jsxs(gL,{flashing:c,onClick:f,"aria-label":`Toggle terminal. Last log: ${u.text}`,title:`Toggle terminal. Last log: ${u.text}`,children:[h.jsx(xL,{level:u.level,children:u.level}),h.jsxs(yL,{children:["Container log: ",u.text]}),h.jsx(vL,{children:new Date(u.timestamp).toLocaleTimeString()}),c&&h.jsx(wL,{"aria-hidden":"true"})]})]})},CL=({messages:e,currentQuestion:t,codegenOptions:r,onQuestionSubmit:i,onInterrupt:l,onPauseResume:a,executionStatus:u})=>{var X;const[c,f]=R.useState(()=>new Set),[p,x]=R.useState(()=>new Set),[m,v]=R.useState(()=>new Set),[w]=R.useState(null),k=R.useRef(null),S=R.useRef(null),[j,E]=R.useState(!1),[I,A]=R.useState(!0),[_,O]=R.useState(null),P=d5(e),V=u!=="idle"?(X=P[P.length-1])==null?void 0:X.iterationId:null,K=R.useCallback(()=>{if(!S.current)return!0;const{scrollTop:W,scrollHeight:ce,clientHeight:de}=S.current;return Math.abs(ce-de-W)<5||ce<=de},[]);R.useEffect(()=>{const W=S.current;if(!W)return;const ce=()=>{const de=K();A(de),de&&E(!1)};return W.addEventListener("scroll",ce),()=>W.removeEventListener("scroll",ce)},[K]),R.useEffect(()=>{I?se():e.length>0&&E(!0)},[P,I,e.length]),R.useEffect(()=>{const W=new Set(P.slice(0,-1).map(ce=>ce.iterationId));v(W)},[P.length]);const re=W=>{f(ce=>{const de=new Set(ce);return de.has(W)?de.delete(W):de.add(W),de})},D=W=>{x(ce=>{const de=new Set(ce);return de.has(W)?de.delete(W):de.add(W),de})},te=W=>{var ce;w&&((ce=e.find(de=>de.id===w))==null?void 0:ce.iterationId)===W||v(de=>{const Q=new Set(de);return Q.has(W)?Q.delete(W):Q.add(W),Q})},se=()=>{requestAnimationFrame(()=>{var W;(W=S.current)==null||W.scrollTo({top:S.current.scrollHeight,behavior:"smooth"})}),E(!1)},ee=async W=>{if(_===W)try{await MC(W),O(null)}catch(ce){console.error("Failed to delete iteration:",ce)}else O(W)};return h.jsxs(t5,{children:[h.jsxs(n5,{ref:S,children:[P.map((W,ce)=>h.jsxs(r5,{children:[h.jsxs(o5,{children:[h.jsxs("div",{className:"title",onClick:()=>te(W.iterationId),children:[m.has(W.iterationId)?h.jsx(u5,{}):h.jsx(a5,{}),h.jsx("span",{children:W.iterationTitle??`Iteration ${W.iterationId}`})]}),h.jsxs("span",{className:"meta",children:[W.timestampStart.toLocaleString()," - ",W.timestampEnd.toLocaleString(),h.jsx($1,{messages:W.messages}),W.iterationId!==V&&h.jsx(i5,{onClick:()=>ee(W.iterationId),title:_===W.iterationId?"Confirm deletion":"Delete iteration",children:_===W.iterationId?"🗑️ Confirm":"🗑️"})]})]}),h.jsxs(l5,{isCollapsed:m.has(W.iterationId),children:[W.conversationSummaries.length>0&&h.jsx(s5,{children:W.conversationSummaries.join(" ")}),W.messages.map((de,Q)=>h.jsxs(Tt.Fragment,{children:[de.type===Hn.SYSTEM?h.jsx(ZA,{message:de,collapsedExecutions:p,toggleExecutionCollapse:D,visibleDataIds:c,toggleDataVisibility:re}):h.jsx(HA,{message:de,visibleDataIds:c,toggleDataVisibility:re}),u!=="idle"&&t&&ce===P.length-1&&Q===W.messages.length-1&&h.jsx(Px,{onSubmit:i,onInterrupt:l,onPauseResume:a,question:t,codegenOptions:r,executionStatus:u})]},de.id)),ce===P.length-1&&h.jsx(c5,{children:h.jsx(SL,{iterationId:V})})]})]},W.iterationId)),u!=="idle"&&t&&P.length>0&&P[P.length-1].messages.length===0&&h.jsx(Px,{onSubmit:i,onInterrupt:l,onPauseResume:a,question:t,codegenOptions:r,executionStatus:u}),h.jsx("div",{ref:k})]}),j&&!I&&h.jsx(f5,{onClick:se}),h.jsx(X5,{isVisible:u!=="idle"&&!t,onInterrupt:l,onPauseResume:a,executionStatus:u})]})},EL=({onSubmit:e,onUploadClick:t,onAiServiceChange:r,onInitialActionTypeChange:i,options:l,disabled:a})=>h.jsxs(TL,{children:[h.jsx(jL,{onClick:e,disabled:a,children:"Submit"}),h.jsx(B1,{onClick:t,title:"Upload Images",children:h.jsx(Jy,{})}),h.jsx(ua,{value:l.aiService,onChange:r}),h.jsx(Od,{value:l.initialActionType,onChange:u=>i(u||void 0)})]}),B1=C.button`
|
|
3206
|
-
color: ${({theme:e})=>e.colors.buttonText};
|
|
3207
|
-
background-color: ${({theme:e})=>e.colors.buttonBg};
|
|
3208
|
-
border: none;
|
|
3209
|
-
border-radius: 4px;
|
|
3210
|
-
padding: 10px 15px;
|
|
3211
|
-
font-size: 14px;
|
|
3212
|
-
cursor: pointer;
|
|
3213
|
-
transition: background-color 0.3s ease;
|
|
3214
|
-
|
|
3215
|
-
&:hover {
|
|
3216
|
-
background-color: ${({theme:e})=>e.colors.buttonHoverBg};
|
|
3217
|
-
}
|
|
3218
|
-
|
|
3219
|
-
&:disabled {
|
|
3220
|
-
background-color: ${({theme:e})=>e.colors.disabled};
|
|
3221
|
-
cursor: not-allowed;
|
|
3222
|
-
}
|
|
3223
|
-
`,jL=C(B1)`
|
|
3224
|
-
background-color: ${({theme:e})=>e.colors.primary};
|
|
3225
|
-
color: #ffffff;
|
|
3226
|
-
|
|
3227
|
-
&:hover {
|
|
3228
|
-
background-color: ${({theme:e})=>e.colors.primaryHover};
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3231
|
-
&:disabled {
|
|
3232
|
-
background-color: ${({theme:e})=>e.colors.disabled};
|
|
3233
|
-
}
|
|
3234
|
-
`,TL=C.div`
|
|
3235
|
-
display: flex;
|
|
3236
|
-
justify-content: flex-start;
|
|
3237
|
-
margin-top: 10px;
|
|
3238
|
-
gap: 10px;
|
|
3239
|
-
`,RL=e=>{const{onSubmit:t,isExecuting:r,codegenOptions:i,onOptionsChange:l}=e,[a,u]=R.useState(""),[c,f]=R.useState([]),[p,x]=R.useState(null),m=R.useRef(null);if(r)return null;const v=()=>{(a.trim()||c.length>0)&&(t(a.trim(),c),u(""),f([]))},w=I=>{f(I)},k=()=>{var I;(I=m.current)==null||I.click()},S=I=>{const A=[...c,I];w(A)},j=I=>{l({...i,aiService:I})},E=I=>{l({...i,initialActionType:I})};return h.jsxs($L,{children:[h.jsx(IL,{children:h.jsx(z1,{value:a,onChange:u,placeholder:"Enter your input here",onImagePaste:S})}),h.jsx(_1,{images:c,onImagesChange:w,error:p,setError:x,fileInputRef:m}),h.jsx(EL,{onSubmit:v,onUploadClick:k,onAiServiceChange:j,onInitialActionTypeChange:E,options:i,disabled:!a.trim()&&c.length===0})]})},$L=C.div`
|
|
3240
|
-
display: flex;
|
|
3241
|
-
flex-direction: column;
|
|
3242
|
-
background-color: ${e=>e.theme.colors.background};
|
|
3243
|
-
border-top: 1px solid ${e=>e.theme.colors.border};
|
|
3244
|
-
padding: 16px;
|
|
3245
|
-
width: 100%;
|
|
3246
|
-
box-sizing: border-box;
|
|
3247
|
-
`,IL=C.div`
|
|
3248
|
-
margin-bottom: 16px;
|
|
3249
|
-
width: 100%;
|
|
3250
|
-
`,NL=({theme:e,toggleTheme:t})=>h.jsx(rr,{onClick:t,"aria-label":`Switch to ${e==="light"?"dark":"light"} mode`,children:e==="light"?"🌙":"☀️"}),_x=Gb`
|
|
3251
|
-
body {
|
|
3252
|
-
color: ${({theme:e})=>e.colors.text};
|
|
3253
|
-
font-family: Arial, sans-serif;
|
|
3254
|
-
margin: 0;
|
|
3255
|
-
padding: 0;
|
|
3256
|
-
background-color: ${({theme:e})=>e.colors.pageBackground};
|
|
3257
|
-
}
|
|
3258
|
-
|
|
3259
|
-
body::before {
|
|
3260
|
-
content: '';
|
|
3261
|
-
position: fixed;
|
|
3262
|
-
top: 0;
|
|
3263
|
-
left: 0;
|
|
3264
|
-
right: 0;
|
|
3265
|
-
bottom: 0;
|
|
3266
|
-
transition: all 0.3s ease;
|
|
3267
|
-
opacity: 0.1;
|
|
3268
|
-
background-image: url(${e=>e.theme.backgroundImage});
|
|
3269
|
-
background-size: cover;
|
|
3270
|
-
background-position: center;
|
|
3271
|
-
background-repeat: no-repeat;
|
|
3272
|
-
background-attachment: fixed;
|
|
3273
|
-
z-index: -1;
|
|
3274
|
-
}
|
|
3275
|
-
`;var rl=(e=>(e.FOCUS="GENAICODE_FOCUS",e.BLUR="GENAICODE_BLUR",e.NEW_MESSAGES="GENAICODE_NEW_MESSAGES",e.RESET_NOTIFICATIONS="GENAICODE_RESET_NOTIFICATIONS",e))(rl||{});const PL=new URL("/assets/wolf-bark-Bl17CX4O.mp3",import.meta.url);class AL{constructor(){In(this,"context");In(this,"bufferCache",new Map);In(this,"initialized",!1);In(this,"currentSources",[]);const t=window.AudioContext||window.webkitAudioContext;this.context=new t,this.initSounds()}async initSounds(){if(!this.initialized)try{const t=await this.loadAudioBuffer(PL.href);this.bufferCache.set("bark",t),this.initialized=!0}catch(t){console.error("Failed to initialize sounds:",t)}}async loadAudioBuffer(t){const i=await(await fetch(t)).arrayBuffer();return await this.context.decodeAudioData(i)}async play(t,r=.5){this.initialized||await this.initSounds();const i=this.bufferCache.get(t);if(!i){console.warn(`Sound "${t}" not found in cache`);return}try{this.context.state==="suspended"&&await this.context.resume();const l=this.context.createBufferSource();l.buffer=i;const a=this.context.createGain();a.gain.value=Math.max(0,Math.min(1,r)),l.connect(a),a.connect(this.context.destination),l.start(0),this.currentSources.push(l)}catch(l){console.error(`Failed to play sound "${t}":`,l)}}async playBark(t=.5){return this.play("bark",t)}stop(){this.currentSources.forEach(t=>t.stop())}dispose(){this.context.close(),this.bufferCache.clear(),this.initialized=!1}}const id=new AL,LL=({currentQuestion:e,messages:t,muteNotifications:r=!1})=>{const i=R.useRef((e==null?void 0:e.id)??null),l=R.useRef(t.length),a=R.useRef(document.hasFocus()),u=R.useRef(document.title),[c,f]=R.useState(0),p=window!==window.parent;R.useEffect(()=>(u.current=document.title,()=>{document.title=u.current}),[]);const x=m=>{if(p&&window.parent){const v={...m,source:"genaicode",origin:window.location.origin};window.parent.postMessage(v,"*")}};return R.useEffect(()=>{const m=()=>{const v=document.hasFocus()&&document.visibilityState==="visible";a.current=v,p?x({type:v?rl.FOCUS:rl.BLUR,payload:{isFocused:v,timestamp:Date.now()}}):v&&(document.title=u.current),v&&(f(0),document.title=u.current,id.stop())};return window.addEventListener("focus",m),window.addEventListener("blur",m),document.addEventListener("visibilitychange",m,!1),p&&m(),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",m),document.removeEventListener("visibilitychange",m,!1)}},[]),R.useEffect(()=>{if(!p)return;const m=v=>{if(v.source===window.parent)try{const{type:w,source:k}=v.data;if(k!=="genaicode")return;switch(w){case rl.RESET_NOTIFICATIONS:f(0),id.stop();break}}catch(w){console.warn("Error handling notification message:",w)}};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[]),R.useEffect(()=>{if(t.length>l.current){const m=t.length-l.current;if(p)x({type:rl.NEW_MESSAGES,payload:{count:m,timestamp:Date.now()}});else if(!a.current){const v=c+m;f(v);const w=v>99?"99+":v;document.title=`(${w}) ${u.current}`}}l.current=t.length},[t,c]),R.useEffect(()=>{e&&e.id!==i.current?(!a.current&&!r&&id.playBark(.5),i.current=e.id):e||(i.current=null)},[e,r]),null};async function zL(e){return[]}const _L=()=>{const e=cn();if(!e)return console.warn("SuggestionGenerator used outside of ChatStateProvider"),null;const{messages:t,executionStatus:r,currentQuestion:i,setSuggestions:l}=e;return R.useEffect(()=>{var f;if(!l)return;if(r!=="executing"||!i||i.confirmation){l([]);return}const a=t.length>0?(f=t[t.length-1])==null?void 0:f.iterationId:null;if(!a){l([]);return}t.filter(p=>p.iterationId===a).flatMap(p=>p.type===Hn.SYSTEM&&"parts"in p&&Array.isArray(p.parts)?p.parts:[p]).length>0?(console.log("Attempting to generate suggestions using conversation context in SuggestionGenerator..."),zL().then(p=>{p.length>0?(console.log("Suggestions generated by SuggestionGenerator:",p),l(p)):(console.log("No suggestions generated or generation failed in SuggestionGenerator."),l([]))}).catch(p=>{console.error("Error generating suggestions in SuggestionGenerator:",p),l([])})):l([])},[r,i,t,l]),null},FL=C.div`
|
|
3276
|
-
position: fixed;
|
|
3277
|
-
bottom: 70px; /* Adjust as needed to not overlap input area */
|
|
3278
|
-
right: 20px;
|
|
3279
|
-
width: 400px;
|
|
3280
|
-
max-height: 50vh;
|
|
3281
|
-
background-color: ${({theme:e})=>e.colors.backgroundAlt};
|
|
3282
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
3283
|
-
border-radius: 8px;
|
|
3284
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
3285
|
-
z-index: 1000;
|
|
3286
|
-
overflow: auto;
|
|
3287
|
-
padding: 15px;
|
|
3288
|
-
display: flex;
|
|
3289
|
-
flex-direction: column;
|
|
3290
|
-
`,OL=C.div`
|
|
3291
|
-
display: flex;
|
|
3292
|
-
justify-content: space-between;
|
|
3293
|
-
align-items: center;
|
|
3294
|
-
margin-bottom: 10px;
|
|
3295
|
-
padding-bottom: 10px;
|
|
3296
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
3297
|
-
|
|
3298
|
-
h3 {
|
|
3299
|
-
margin: 0;
|
|
3300
|
-
font-size: 1rem;
|
|
3301
|
-
color: ${({theme:e})=>e.colors.text};
|
|
3302
|
-
}
|
|
3303
|
-
`,DL=C.button`
|
|
3304
|
-
background: none;
|
|
3305
|
-
border: none;
|
|
3306
|
-
color: ${({theme:e})=>e.colors.text};
|
|
3307
|
-
font-size: 1.2rem;
|
|
3308
|
-
cursor: pointer;
|
|
3309
|
-
padding: 0;
|
|
3310
|
-
line-height: 1;
|
|
3311
|
-
|
|
3312
|
-
&:hover {
|
|
3313
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
3314
|
-
}
|
|
3315
|
-
`,ML=C.div`
|
|
3316
|
-
flex-grow: 1;
|
|
3317
|
-
/* Basic layout for nodes and edges - consider using a graph library for actual rendering */
|
|
3318
|
-
display: flex;
|
|
3319
|
-
flex-direction: column;
|
|
3320
|
-
gap: 10px;
|
|
3321
|
-
`,BL=C.div`
|
|
3322
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
3323
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
3324
|
-
border-radius: 4px;
|
|
3325
|
-
padding: 8px 12px;
|
|
3326
|
-
font-size: 0.9rem;
|
|
3327
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
3328
|
-
|
|
3329
|
-
${({isActive:e,theme:t})=>e&&wt`
|
|
3330
|
-
border-color: ${t.colors.primary};
|
|
3331
|
-
box-shadow: 0 0 0 2px ${t.colors.primary}40;
|
|
3332
|
-
font-weight: bold;
|
|
3333
|
-
`}
|
|
3334
|
-
|
|
3335
|
-
strong {
|
|
3336
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
3337
|
-
}
|
|
3338
|
-
|
|
3339
|
-
p {
|
|
3340
|
-
margin: 5px 0 0 0;
|
|
3341
|
-
font-size: 0.8rem;
|
|
3342
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
3343
|
-
}
|
|
3344
|
-
`,UL=C.div`
|
|
3345
|
-
font-size: 0.8rem;
|
|
3346
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
3347
|
-
padding-left: 15px;
|
|
3348
|
-
position: relative;
|
|
3349
|
-
|
|
3350
|
-
&::before {
|
|
3351
|
-
content: '->';
|
|
3352
|
-
position: absolute;
|
|
3353
|
-
left: 0;
|
|
3354
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
3355
|
-
}
|
|
3356
|
-
`,VL=()=>{const{conversationGraphState:e,isGraphVisualiserOpen:t,toggleGraphVisualiser:r}=cn();if(!t||!(e!=null&&e.isActive))return null;const{nodes:i=[],edges:l=[],currentNodeId:a}=e;return h.jsxs(FL,{children:[h.jsxs(OL,{children:[h.jsx("h3",{children:"Conversation Flow"}),h.jsx(DL,{onClick:r,"aria-label":"Close visualiser",children:"×"})]}),h.jsxs(ML,{children:[h.jsx("h4",{children:"Nodes:"}),i.map(u=>h.jsxs(BL,{isActive:u.id===a,children:[h.jsxs("strong",{children:["ID: ",u.id]})," (",u.actionType,")",h.jsx("p",{children:u.instruction})]},u.id)),h.jsx("h4",{children:"Edges:"}),l.map((u,c)=>h.jsxs(UL,{children:[u.sourceNode," to ",u.targetNode,": ",u.instruction]},`${u.sourceNode}-${u.targetNode}-${c}`)),a&&h.jsxs("p",{children:[h.jsx("strong",{children:"Current Node:"})," ",a]})]})]})},HL=e=>{var t;for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.type===Hn.SYSTEM&&((t=i.data)!=null&&t.conversationGraphState))return i.data.conversationGraphState}return null},WL=()=>{const{messages:e,setConversationGraphState:t}=R.useContext(ri);return R.useEffect(()=>{const r=HL(e);t(i=>JSON.stringify(i)!==JSON.stringify(r)?r:i)},[e,t]),null};C.div`
|
|
3357
|
-
position: fixed;
|
|
3358
|
-
bottom: 70px; /* Adjust as needed to not overlap input area */
|
|
3359
|
-
right: 20px;
|
|
3360
|
-
width: 400px;
|
|
3361
|
-
max-height: 50vh;
|
|
3362
|
-
background-color: ${({theme:e})=>e.colors.backgroundSecondary};
|
|
3363
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
3364
|
-
border-radius: 8px;
|
|
3365
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
3366
|
-
z-index: 1000;
|
|
3367
|
-
overflow: auto;
|
|
3368
|
-
padding: 15px;
|
|
3369
|
-
display: flex;
|
|
3370
|
-
flex-direction: column;
|
|
3371
|
-
`;C.div`
|
|
3372
|
-
display: flex;
|
|
3373
|
-
justify-content: space-between;
|
|
3374
|
-
align-items: center;
|
|
3375
|
-
margin-bottom: 10px;
|
|
3376
|
-
padding-bottom: 10px;
|
|
3377
|
-
border-bottom: 1px solid ${({theme:e})=>e.colors.border};
|
|
3378
|
-
|
|
3379
|
-
h3 {
|
|
3380
|
-
margin: 0;
|
|
3381
|
-
font-size: 1rem;
|
|
3382
|
-
color: ${({theme:e})=>e.colors.text};
|
|
3383
|
-
}
|
|
3384
|
-
`;C.button`
|
|
3385
|
-
background: none;
|
|
3386
|
-
border: none;
|
|
3387
|
-
color: ${({theme:e})=>e.colors.text};
|
|
3388
|
-
font-size: 1.2rem;
|
|
3389
|
-
cursor: pointer;
|
|
3390
|
-
padding: 0;
|
|
3391
|
-
line-height: 1;
|
|
3392
|
-
|
|
3393
|
-
&:hover {
|
|
3394
|
-
color: ${({theme:e})=>e.colors.primary};
|
|
3395
|
-
}
|
|
3396
|
-
`;const Fx=C.div`
|
|
3397
|
-
flex-grow: 1;
|
|
3398
|
-
display: flex;
|
|
3399
|
-
flex-direction: column;
|
|
3400
|
-
gap: 10px;
|
|
3401
|
-
`,Dd={pending:e=>e.colors.textSecondary,"in-progress":e=>e.colors.info,completed:e=>e.colors.success,failed:e=>e.colors.error,skipped:e=>e.colors.warning},qL=C.div`
|
|
3402
|
-
background-color: ${({theme:e})=>e.colors.inputBg};
|
|
3403
|
-
border: 1px solid ${({theme:e})=>e.colors.border};
|
|
3404
|
-
border-left: 4px solid ${({state:e,theme:t})=>Dd[e](t)};
|
|
3405
|
-
border-radius: 4px;
|
|
3406
|
-
padding: 8px 12px;
|
|
3407
|
-
font-size: 0.9rem;
|
|
3408
|
-
color: ${({theme:e})=>e.colors.inputText};
|
|
3409
|
-
transition: border-color 0.3s ease;
|
|
3410
|
-
display: flex;
|
|
3411
|
-
align-items: center;
|
|
3412
|
-
|
|
3413
|
-
strong {
|
|
3414
|
-
color: ${({state:e,theme:t})=>Dd[e](t)};
|
|
3415
|
-
}
|
|
3416
|
-
|
|
3417
|
-
p {
|
|
3418
|
-
margin: 5px 0 0 0;
|
|
3419
|
-
font-size: 0.8rem;
|
|
3420
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
3421
|
-
}
|
|
3422
|
-
`,GL=C.div`
|
|
3423
|
-
font-weight: bold;
|
|
3424
|
-
text-transform: capitalize;
|
|
3425
|
-
color: ${({state:e,theme:t})=>Dd[e](t)};
|
|
3426
|
-
margin-right: 10px;
|
|
3427
|
-
flex-shrink: 0;
|
|
3428
|
-
width: 80px; /* Align states */
|
|
3429
|
-
`,JL=C.div`
|
|
3430
|
-
display: flex;
|
|
3431
|
-
flex-direction: column;
|
|
3432
|
-
flex-grow: 1;
|
|
3433
|
-
|
|
3434
|
-
small {
|
|
3435
|
-
margin-top: 4px;
|
|
3436
|
-
font-size: 0.8em;
|
|
3437
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
3438
|
-
}
|
|
3439
|
-
`;C.div`
|
|
3440
|
-
font-size: 0.8rem;
|
|
3441
|
-
color: ${({theme:e})=>e.colors.textSecondary};
|
|
3442
|
-
margin-top: 5px;
|
|
3443
|
-
padding-left: 10px;
|
|
3444
|
-
border-left: 2px solid ${({theme:e})=>e.colors.border};
|
|
3445
|
-
`;const KL=({executionPlan:e,planUpdates:t})=>{if(!e||!e.length)return h.jsx(Fx,{children:"No execution plan available."});const r=JSON.parse(JSON.stringify(e));for(const i of t){const l=r.find(a=>a.id===i.id);l&&(l.statusUpdate=i.statusUpdate,l.state=i.state)}return h.jsx(Fx,{children:r.map(i=>h.jsxs(qL,{state:i.state??"pending",children:[h.jsx(GL,{state:i.state??"pending",children:i.state??"pending"}),h.jsxs(JL,{children:[h.jsxs("strong",{children:["ID: ",i.id]}),h.jsx("p",{children:i.description}),i.statusUpdate&&h.jsxs("small",{children:["Update: ",i.statusUpdate]})]})]},i.id))})},Ox=5e3,QL=16,YL=({events:e,onClear:t})=>{const r=R.useRef(null),[i,l]=R.useState(!1),[a,u]=R.useState(new Set),[c,f]=R.useState("logs"),{toggleTerminal:p}=cn(),x=R.useRef(!0),{executionPlan:m,planUpdates:v}=R.useMemo(()=>{var A;const j=[...e].reverse().find(_=>{var O;return(O=_.data)==null?void 0:O.plan}),E=(A=j==null?void 0:j.data)==null?void 0:A.plan,I=e.filter(_=>{var O,P,V;return((O=_.data)==null?void 0:O.statusUpdate)&&((P=_.data)==null?void 0:P.id)&&((V=_.data)==null?void 0:V.state)}).map(_=>_.data);return{executionPlan:E,planUpdates:I}},[e]);R.useLayoutEffect(()=>{r.current&&c==="logs"&&x.current&&setTimeout(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},100)},[e,c]);const w=async()=>{try{await Ay()}catch(j){console.error("Failed to interrupt command:",j)}},k=e.length>Ox?e.slice(-Ox):e,S=()=>{r.current&&(x.current=r.current.scrollHeight-r.current.scrollTop<=r.current.clientHeight+QL)};return h.jsxs(rL,{children:[h.jsxs(oL,{children:[h.jsx("h4",{children:"Container Task"}),h.jsxs(sL,{children:[h.jsx(zx,{active:c==="logs",onClick:()=>f("logs"),children:"Logs"}),h.jsx(zx,{active:c==="plan",onClick:()=>f("plan"),disabled:!m,children:"Execution Plan"})]}),h.jsxs(lL,{children:[c==="logs"&&h.jsxs(h.Fragment,{children:[h.jsx(od,{active:!1,onClick:t,"aria-label":"Clear terminal log",children:"Clear"}),h.jsx(od,{active:i,onClick:()=>l(!i),"aria-label":i?"Hide all payloads":"Show all payloads",children:"Payloads"})]}),h.jsx(od,{active:!1,onClick:w,"aria-label":"Interrupt current container command",children:"Interrupt"}),h.jsx(iL,{onClick:p,"aria-label":"Close terminal",children:"×"})]})]}),h.jsx(aL,{ref:r,onScroll:S,children:c==="logs"?k.map(j=>{const E=!!(j.data&&Object.keys(j.data).length>0),I=i||a.has(j.id);let A="";if(E)try{A=JSON.stringify(j.data,null,2)}catch{A=String(j.data)}return h.jsxs(Tt.Fragment,{children:[h.jsxs(uL,{children:[h.jsx("span",{className:"timestamp",children:new Date(j.timestamp).toLocaleTimeString()}),h.jsx(cL,{level:j.level,children:j.level}),h.jsxs("span",{className:"source",children:["[",j.source,"]"]}),h.jsxs(dL,{children:[j.text,E&&h.jsx(fL,{onClick:()=>{const _=new Set(a);I?_.delete(j.id):_.add(j.id),u(_)},children:I?"Hide payload":"Show payload"})]})]}),E&&I&&h.jsx(pL,{children:h.jsx(hL,{children:A})})]},j.id)}):h.jsx(KL,{executionPlan:m,planUpdates:v})})]})},va=class va{constructor(t=50,r){In(this,"buffer",[]);In(this,"maxBufferSize");In(this,"callback");In(this,"pendingBatch",[]);In(this,"flushScheduled",!1);this.maxBufferSize=t,this.callback=r,this._wrapConsoleMethods()}_wrapConsoleMethods(){["log","info","warn","error","debug","trace","assert"].forEach(r=>{const i=console[r];console[r]=(...l)=>{this._enqueue(r,l),i.apply(console,l)}})}_formatMessage(t){const r=t.map(l=>{if(typeof l=="string")return l;try{return JSON.stringify(l)}catch{return String(l)}}).join(" "),i=va.MAX_ENTRY_MESSAGE_LENGTH;return r.length>i?r.slice(0,i)+` … [${r.length-i} more chars]`:r}_enqueue(t,r){const i={timestamp:Date.now(),level:t,message:this._formatMessage(r),args:r};this.buffer.push(i),this.buffer.length>this.maxBufferSize&&this.buffer.splice(0,this.buffer.length-this.maxBufferSize),this.pendingBatch.push(i),this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>this._flush()))}_flush(){if(this.pendingBatch.length===0){this.flushScheduled=!1;return}const t=this.pendingBatch;this.pendingBatch=[],this.flushScheduled=!1,this.callback(t).catch(r=>{console.warn.call(console,"ConsoleInterceptor: Failed to execute callback:",r)})}getBuffer(){return[...this.buffer]}clearBuffer(){this.buffer=[],this.pendingBatch=[],this.flushScheduled=!1}};In(va,"MAX_ENTRY_MESSAGE_LENGTH",2e3);let Md=va;const XL=()=>{const{messages:e,executionStatus:t,currentQuestion:r,theme:i,usage:l,codegenOptions:a,rcConfig:u,toggleTheme:c,setCodegenOptions:f,handlePauseExecution:p,handleResumeExecution:x,isTerminalOpen:m,terminalEvents:v,clearTerminalEvents:w}=R.useContext(ri),{handleExecute:k,handleQuestionSubmit:S,handleInterrupt:j}=z2({codegenOptions:a}),E=t!=="idle"&&e.length>0?e[e.length-1].iterationId:null,I=E&&v[E]||[];R.useEffect(()=>{if(!(a!=null&&a.isDev))return;const O=50;new Md(O,async P=>{try{await DC("__console_logs",P)}catch(V){console.warn("Failed to push console logs to app context:",V)}}),console.log("GenAIcode: Console log interception enabled in dev mode.")},[a==null?void 0:a.isDev]);const A=()=>{t==="paused"?x():p()};if(!l||!a)return h.jsxs(Wm,{theme:i==="light"?Jm:Km,children:[h.jsx(_x,{}),h.jsx("div",{children:"Loading..."})," "]});const _=t!=="idle";return h.jsxs(Wm,{theme:i==="light"?Jm:Km,children:[h.jsx(_x,{}),h.jsx(b2,{themeToggle:h.jsx(NL,{theme:i,toggleTheme:c}),toggleTheme:c,chatInterface:h.jsx(CL,{messages:e,currentQuestion:r,codegenOptions:a,onQuestionSubmit:S,onInterrupt:j,onPauseResume:A,executionStatus:t}),inputArea:!_&&h.jsx(RL,{onSubmit:k,isExecuting:_,onInterrupt:j,codegenOptions:a,onOptionsChange:f}),usage:l}),m&&E&&h.jsx(YL,{events:I,onClear:()=>w(E)}),h.jsx(XC,{currentService:a.aiService}),h.jsx(pE,{}),h.jsx(KE,{}),h.jsx(rj,{rcConfig:u}),h.jsx(vj,{options:a,onOptionsChange:f}),h.jsx(LL,{currentQuestion:r,messages:e}),h.jsx(VL,{}),h.jsx(WL,{})]})};function ZL(){return h.jsxs(Sj,{children:[h.jsx(_L,{})," ",h.jsx(XL,{})," "]})}const ez=document.getElementById("root"),tz=Hk.createRoot(ez);tz.render(Tt.createElement(ZL,null));
|